diff --git a/public/cui.js b/public/cui.js index 57e9e260..84c30686 100644 --- a/public/cui.js +++ b/public/cui.js @@ -50533,6 +50533,9 @@ CUI.ItemList = (function(superClass) { if (item.hasLeft()) { list_has_button_left = true; } + if (item.__tooltipOpts && (!item.__tooltipOpts.placement || !item.__tooltipOpts.placements)) { + item.__tooltipOpts.placements = ["w", "e"]; + } } if (item instanceof CUI.Button || item instanceof CUI.DataField || item instanceof CUI.Label) { _this.__body.append(item); @@ -50575,6 +50578,12 @@ CUI.ItemList = (function(superClass) { if (menu) { opts.menu_parent = menu; } + if (!opts.tooltip) { + opts.tooltip = {}; + } + if (!opts.tooltip.placement || !opts.tooltip.placements) { + opts.tooltip.placements = ["w", "e"]; + } btn = new CUI.defaults["class"].Button(opts); listenButtonClick(btn); if (btn.hasLeft()) { diff --git a/public/cui.min.js b/public/cui.min.js index 7ab7e135..cbf490d4 100644 --- a/public/cui.min.js +++ b/public/cui.min.js @@ -6,7 +6,7 @@ * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ -"use strict";var L=n("./dom");b.get=function(n,b){var A=new XMLHttpRequest;A.open("GET",n,!0),A.onreadystatechange=function(){4===A.readyState&&b(A.responseText)},A.send(null)},b.loadScript=function(n,b){var A=L.getDocumentHead(),R=document.createElement("script");R.src=n,A.appendChild(R),R.onload=R.onreadystatechange=function(n,A){!A&&R.readyState&&"loaded"!=R.readyState&&"complete"!=R.readyState||(R=R.onload=R.onreadystatechange=null,A||b())}},b.qualifyURL=function(n){var b=document.createElement("a");return b.href=n,b.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(n,b,A){"use strict";b.inherits=function(n,b){n.super_=b,n.prototype=Object.create(b.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})},b.mixin=function(n,b){for(var A in b)n[A]=b[A];return n},b.implement=function(n,A){b.mixin(n,A)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(n,b,A){"use strict";var L={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};L._emit=L._dispatchEvent=function(n,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var A=this._eventRegistry[n]||[],L=this._defaultHandlers[n];if(A.length||L){"object"==typeof b&&b||(b={}),b.type||(b.type=n),b.stopPropagation||(b.stopPropagation=stopPropagation),b.preventDefault||(b.preventDefault=preventDefault),A=A.slice();for(var R=0;R1&&(R=A[A.length-2]);var B=E[b+"Path"];return null==B?B=E.basePath:"/"==L&&(b=L=""),B&&"/"!=B.slice(-1)&&(B+="/"),B+b+L+R+this.get("suffix")},b.setModuleUrl=function(n,b){return E.$moduleUrls[n]=b};var X;b.setLoader=function(n){X=n},b.dynamicModules=Object.create(null),b.$loading={},b.$loaded={},b.loadModule=function(A,L){var D;if(Array.isArray(A))var B=A[0],E=A[1];else if("string"==typeof A)E=A;var load=function(A){if(A&&!b.$loading[E])return L&&L(A);if(b.$loading[E]||(b.$loading[E]=[]),b.$loading[E].push(L),!(b.$loading[E].length>1)){var afterLoad=function(){!function(b,A){"ace/theme/textmate"===b||"./theme/textmate"===b?A(null,n("./theme/textmate")):X?X(b,A):console.error("loader is not configured")}(E,(function(n,A){A&&(b.$loaded[E]=A),b._emit("load.module",{name:E,module:A});var L=b.$loading[E];b.$loading[E]=null,L.forEach((function(n){n&&n(A)}))}))};if(!b.get("packaged"))return afterLoad();R.loadScript(b.moduleUrl(E,B),afterLoad),reportErrorIfPathIsNotConfigured()}};if(b.dynamicModules[E])b.dynamicModules[E]().then((function(n){n.default?load(n.default):load(n)}));else{try{D=this.$require(E)}catch(n){}load(D||b.$loaded[E])}},b.$require=function(n){if("function"==typeof A.require){return A.require(n)}},b.setModuleLoader=function(n,A){b.dynamicModules[n]=A};var reportErrorIfPathIsNotConfigured=function(){E.basePath||E.workerPath||E.modePath||E.themePath||Object.keys(E.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),reportErrorIfPathIsNotConfigured=function(){})};b.version="1.36.2"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(n,b,L){"use strict";n("./lib/fixoldbrowsers");var R=n("./config");R.setLoader((function(b,A){n([b],(function(n){A(null,n)}))}));var D=function(){return this||"undefined"!=typeof window&&window}();function init(b){if(D&&D.document){R.set("packaged",b||n.packaged||L.packaged||D.define&&A.amdD.packaged);var B={},E="",X=document.currentScript||document._currentScript,$=X&&X.ownerDocument||document;X&&X.src&&(E=X.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var V,K=$.getElementsByTagName("script"),Q=0;Q ["+this.end.row+"/"+this.end.column+"]"},Range.prototype.contains=function(n,b){return 0==this.compare(n,b)},Range.prototype.compareRange=function(n){var b,A=n.end,L=n.start;return 1==(b=this.compare(A.row,A.column))?1==(b=this.compare(L.row,L.column))?2:0==b?1:0:-1==b?-2:-1==(b=this.compare(L.row,L.column))?-1:1==b?42:0},Range.prototype.comparePoint=function(n){return this.compare(n.row,n.column)},Range.prototype.containsRange=function(n){return 0==this.comparePoint(n.start)&&0==this.comparePoint(n.end)},Range.prototype.intersects=function(n){var b=this.compareRange(n);return-1==b||0==b||1==b},Range.prototype.isEnd=function(n,b){return this.end.row==n&&this.end.column==b},Range.prototype.isStart=function(n,b){return this.start.row==n&&this.start.column==b},Range.prototype.setStart=function(n,b){"object"==typeof n?(this.start.column=n.column,this.start.row=n.row):(this.start.row=n,this.start.column=b)},Range.prototype.setEnd=function(n,b){"object"==typeof n?(this.end.column=n.column,this.end.row=n.row):(this.end.row=n,this.end.column=b)},Range.prototype.inside=function(n,b){return 0==this.compare(n,b)&&(!this.isEnd(n,b)&&!this.isStart(n,b))},Range.prototype.insideStart=function(n,b){return 0==this.compare(n,b)&&!this.isEnd(n,b)},Range.prototype.insideEnd=function(n,b){return 0==this.compare(n,b)&&!this.isStart(n,b)},Range.prototype.compare=function(n,b){return this.isMultiLine()||n!==this.start.row?nthis.end.row?1:this.start.row===n?b>=this.start.column?0:-1:this.end.row===n?b<=this.end.column?0:1:0:bthis.end.column?1:0},Range.prototype.compareStart=function(n,b){return this.start.row==n&&this.start.column==b?-1:this.compare(n,b)},Range.prototype.compareEnd=function(n,b){return this.end.row==n&&this.end.column==b?1:this.compare(n,b)},Range.prototype.compareInside=function(n,b){return this.end.row==n&&this.end.column==b?1:this.start.row==n&&this.start.column==b?-1:this.compare(n,b)},Range.prototype.clipRows=function(n,b){if(this.end.row>b)var A={row:b+1,column:0};else if(this.end.rowb)var L={row:b+1,column:0};else if(this.start.row1?++K>4&&(K=1):K=1,D.isIE){var B=Math.abs(n.clientX-E)>5||Math.abs(n.clientY-$)>5;V&&!B||(K=1),V&&clearTimeout(V),V=setTimeout((function(){V=null}),A[K-1]||600),1==K&&(E=n.clientX,$=n.clientY)}if(n._clicks=K,L[R]("mousedown",n),K>4)K=0;else if(K>1)return L[R](Q[K],n)}Array.isArray(n)||(n=[n]),n.forEach((function(n){X(n,"mousedown",onMousedown,B)}))},b.getModifierString=function(n){return R.KEY_MODS[getModifierHash(n)]},b.addCommandKeyListener=function(n,A,L){var $=null;X(n,"keydown",(function(n){B[n.keyCode]=(B[n.keyCode]||0)+1;var b=function normalizeCommandKeys(n,b,A){var L=getModifierHash(b);if(!A&&b.code&&(A=R.$codeToKeyCode[b.code]||A),!D.isMac&&B){if(b.getModifierState&&(b.getModifierState("OS")||b.getModifierState("Win"))&&(L|=8),B.altGr){if(!(3&~L))return;B.altGr=0}if(18===A||17===A){var X=b.location;17===A&&1===X?1==B[A]&&(E=b.timeStamp):18===A&&3===L&&2===X&&b.timeStamp-E<50&&(B.altGr=!0)}}if(A in R.MODIFIER_KEYS&&(A=-1),L||13!==A||3!==b.location||(n(b,L,-A),!b.defaultPrevented)){if(D.isChromeOS&&8&L){if(n(b,L,A),b.defaultPrevented)return;L&=-9}return!!(L||A in R.FUNCTION_KEYS||A in R.PRINTABLE_KEYS)&&n(b,L,A)}}(A,n,n.keyCode);return $=n.defaultPrevented,b}),L),X(n,"keypress",(function(n){$&&(n.ctrlKey||n.altKey||n.shiftKey||n.metaKey)&&(b.stopEvent(n),$=null)}),L),X(n,"keyup",(function(n){B[n.keyCode]=null}),L),B||(resetPressedKeys(),X(window,"focus",resetPressedKeys))},"object"==typeof window&&window.postMessage&&!D.isOldIE){var V=1;b.nextTick=function(n,A){A=A||window;var L="zero-timeout-message-"+V++,listener=function(R){R.data==L&&(b.stopPropagation(R),$(A,"message",listener),n())};X(A,"message",listener),A.postMessage(L,"*")}}b.$idleBlocked=!1,b.onIdle=function(n,A){return setTimeout((function handler(){b.$idleBlocked?setTimeout(handler,100):n()}),A)},b.$idleBlockId=null,b.blockIdle=function(n){b.$idleBlockId&&clearTimeout(b.$idleBlockId),b.$idleBlocked=!0,b.$idleBlockId=setTimeout((function(){b.$idleBlocked=!1}),n||100)},b.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(n){setTimeout(n,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(n,b,A){"use strict";var L;A.exports={lineMode:!1,pasteCancelled:function(){return!!(L&&L>Date.now()-50)||(L=!1)},cancel:function(){L=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(n,b,A){"use strict";var L,R=n("../lib/event"),D=n("../config").nls,B=n("../lib/useragent"),E=n("../lib/dom"),X=n("../lib/lang"),$=n("../clipboard"),V=B.isChrome<18,K=B.isIE,Q=B.isChrome>63,tt=400,ot=n("../lib/keys"),nt=ot.KEY_MODS,it=B.isIOS,rt=it?/\s/:/\n/,st=B.isMobile;L=function(n,b){var A=E.createElement("textarea");A.className="ace_text-input",A.setAttribute("wrap","off"),A.setAttribute("autocorrect","off"),A.setAttribute("autocapitalize","off"),A.setAttribute("spellcheck","false"),A.style.opacity="0",n.insertBefore(A,n.firstChild);var L=!1,pt=!1,lt=!1,ut=!1,bt="";st||(A.style.fontSize="1px");var Mt=!1,zt=!1,Ot="",ft=0,mt=0,_t=0,gt=Number.MAX_SAFE_INTEGER,At=Number.MIN_SAFE_INTEGER,yt=0;try{var qt=document.activeElement===A}catch(n){}this.setNumberOfExtraLines=function(n){gt=Number.MAX_SAFE_INTEGER,At=Number.MIN_SAFE_INTEGER,yt=n<0?0:n},this.setAriaOptions=function(n){if(n.activeDescendant?(A.setAttribute("aria-haspopup","true"),A.setAttribute("aria-autocomplete",n.inline?"both":"list"),A.setAttribute("aria-activedescendant",n.activeDescendant)):(A.setAttribute("aria-haspopup","false"),A.setAttribute("aria-autocomplete","both"),A.removeAttribute("aria-activedescendant")),n.role&&A.setAttribute("role",n.role),n.setLabel){A.setAttribute("aria-roledescription",D("text-input.aria-roledescription","editor"));var L="";if(b.$textInputAriaLabel&&(L+="".concat(b.$textInputAriaLabel,", ")),b.session){var R=b.session.selection.cursor.row;L+=D("text-input.aria-label","Cursor at row $0",[R+1])}A.setAttribute("aria-label",L)}},this.setAriaOptions({role:"textbox"}),R.addListener(A,"blur",(function(n){zt||(b.onBlur(n),qt=!1)}),b),R.addListener(A,"focus",(function(n){if(!zt){if(qt=!0,B.isEdge)try{if(!document.hasFocus())return}catch(n){}b.onFocus(n),B.isEdge?setTimeout(vt):vt()}}),b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),bt||Q||"browser"==this.$focusScroll)return A.focus({preventScroll:!0});var n=A.style.top;A.style.position="fixed",A.style.top="0px";try{var L=0!=A.getBoundingClientRect().top}catch(n){return}var R=[];if(L)for(var D=A.parentElement;D&&1==D.nodeType;)R.push(D),D.setAttribute("ace_nocontext","true"),D=!D.parentElement&&D.getRootNode?D.getRootNode().host:D.parentElement;A.focus({preventScroll:!0}),L&&R.forEach((function(n){n.removeAttribute("ace_nocontext")})),setTimeout((function(){A.style.position="","0px"==A.style.top&&(A.style.top=n)}),0)},this.blur=function(){A.blur()},this.isFocused=function(){return qt},b.on("beforeEndOperation",(function(){var n=b.curOp,L=n&&n.command&&n.command.name;if("insertstring"!=L){var R=L&&(n.docChanged||n.selectionChanged);lt&&R&&(Ot=A.value="",onCompositionEnd()),vt()}}));var positionToSelection=function(n,A){for(var L=A,R=1;R<=n-gt&&R<2*yt+1;R++)L+=b.session.getLine(n-R).length+1;return L},vt=it?function(n){if(qt&&(!L||n)&&!ut){n||(n="");var R="\n ab"+n+"cde fg\n";R!=A.value&&(A.value=Ot=R);var D=4+(n.length||(b.selection.isEmpty()?0:1));4==ft&&mt==D||A.setSelectionRange(4,D),ft=4,mt=D}}:function(){if(!lt&&!ut&&(qt||wt)){lt=!0;var n=0,L=0,R="";if(b.session){var D=b.selection,B=D.getRange(),E=D.cursor.row;E===At+1?At=(gt=At+1)+2*yt:E===gt-1?gt=(At=gt-1)-2*yt:(EAt+1)&&(gt=E>yt?E-yt:0,At=E>yt?E+yt:2*yt);for(var X=[],$=gt;$<=At;$++)X.push(b.session.getLine($));if(R=X.join("\n"),n=positionToSelection(B.start.row,B.start.column),L=positionToSelection(B.end.row,B.end.column),B.start.rowAt){var K=b.session.getLine(At+1);L=B.end.row>At+1?K.length:B.end.column,L+=R.length+1,R=R+"\n"+K}else st&&E>0&&(R="\n"+R,L+=1,n+=1);R.length>tt&&(n0&&Ot[Q]==n[Q];)Q++,E--;for($=$.slice(Q),Q=1;X>0&&Ot.length-Q>ft-1&&Ot[Ot.length-Q]==n[n.length-Q];)Q++,X--;V-=Q-1,K-=Q-1;var tt=$.length-Q+1;if(tt<0&&(E=-tt,tt=0),$=$.slice(0,tt),!(L||$||V||E||X||K))return"";ut=!0;var ot=!1;return B.isAndroid&&". "==$&&($=" ",ot=!0),$&&!E&&!X&&!V&&!K||Mt?b.onTextInput($):b.onTextInput($,{extendLeft:E,extendRight:X,restoreStart:V,restoreEnd:K}),ut=!1,Ot=n,ft=R,mt=D,_t=K,ot?"\n":$},onInput=function(n){if(lt)return onCompositionUpdate();if(n&&n.inputType){if("historyUndo"==n.inputType)return b.execCommand("undo");if("historyRedo"==n.inputType)return b.execCommand("redo")}var L=A.value,R=sendText(L,!0);(L.length>500||rt.test(R)||st&&ft<1&&ft==mt)&&vt()},handleClipboardData=function(n,b,A){var L=n.clipboardData||window.clipboardData;if(L&&!V){var R=K||A?"Text":"text/plain";try{return b?!1!==L.setData(R,b):L.getData(R)}catch(n){if(!A)return handleClipboardData(n,b,!0)}}},doCopy=function(n,D){var B=b.getCopyText();if(!B)return R.preventDefault(n);handleClipboardData(n,B)?(it&&(vt(B),L=B,setTimeout((function(){L=!1}),10)),D?b.onCut():b.onCopy(),R.preventDefault(n)):(L=!0,A.value=B,A.select(),setTimeout((function(){L=!1,vt(),D?b.onCut():b.onCopy()})))},onCut=function(n){doCopy(n,!0)},onCopy=function(n){doCopy(n,!1)},onPaste=function(n){var L=handleClipboardData(n);$.pasteCancelled()||("string"==typeof L?(L&&b.onPaste(L,n),B.isIE&&setTimeout(vt),R.preventDefault(n)):(A.value="",pt=!0))};R.addCommandKeyListener(A,(function(n,A,L){if(!lt)return b.onCommandKey(n,A,L)}),b),R.addListener(A,"select",(function(n){lt||(L?L=!1:!function(n){return 0===n.selectionStart&&n.selectionEnd>=Ot.length&&n.value===Ot&&Ot&&n.selectionEnd!==mt}(A)?st&&A.selectionStart!=ft&&vt():(b.selectAll(),vt()))}),b),R.addListener(A,"input",onInput,b),R.addListener(A,"cut",onCut,b),R.addListener(A,"copy",onCopy,b),R.addListener(A,"paste",onPaste,b),"oncut"in A&&"oncopy"in A&&"onpaste"in A||R.addListener(n,"keydown",(function(n){if((!B.isMac||n.metaKey)&&n.ctrlKey)switch(n.keyCode){case 67:onCopy(n);break;case 86:onPaste(n);break;case 88:onCut(n)}}),b);var onCompositionUpdate=function(){if(lt&&b.onCompositionUpdate&&!b.$readOnly){if(Mt)return cancelComposition();if(lt.useTextareaForIME)b.onCompositionUpdate(A.value);else{var n=A.value;sendText(n),lt.markerRange&&(lt.context&&(lt.markerRange.start.column=lt.selectionStart=lt.context.compositionStartOffset),lt.markerRange.end.column=lt.markerRange.start.column+mt-lt.selectionStart+_t)}}},onCompositionEnd=function(n){b.onCompositionEnd&&!b.$readOnly&&(lt=!1,b.onCompositionEnd(),b.off("mousedown",cancelComposition),n&&onInput())};function cancelComposition(){zt=!0,A.blur(),A.focus(),zt=!1}var Lt,Rt=X.delayedCall(onCompositionUpdate,50).schedule.bind(null,null);function onContextMenuClose(){clearTimeout(Lt),Lt=setTimeout((function(){bt&&(A.style.cssText=bt,bt=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()}),0)}R.addListener(A,"compositionstart",(function(n){if(!lt&&b.onCompositionStart&&!b.$readOnly&&(lt={},!Mt)){n.data&&(lt.useTextareaForIME=!1),setTimeout(onCompositionUpdate,0),b._signal("compositionStart"),b.on("mousedown",cancelComposition);var L=b.getSelectionRange();L.end.row=L.start.row,L.end.column=L.start.column,lt.markerRange=L,lt.selectionStart=ft,b.onCompositionStart(lt),lt.useTextareaForIME?(Ot=A.value="",ft=0,mt=0):(A.msGetInputContext&&(lt.context=A.msGetInputContext()),A.getInputContext&&(lt.context=A.getInputContext()))}}),b),R.addListener(A,"compositionupdate",onCompositionUpdate,b),R.addListener(A,"keyup",(function onKeyup(n){27==n.keyCode&&A.value.lengthmt&&"\n"==Ot[B]?E=ot.end:Rmt&&Ot.slice(0,B).split("\n").length>2?E=ot.down:B>mt&&" "==Ot[B-1]?(E=ot.right,X=nt.option):(B>mt||B==mt&&mt!=ft&&R==B)&&(E=ot.right),R!==B&&(X|=nt.shift),E){if(!b.onCommandKey({},X,E)&&b.commands){E=ot.keyCodeToString(E);var $=b.commands.findKeyCommand(X,E);$&&b.execCommand($)}ft=R,mt=B,vt("")}}};document.addEventListener("selectionchange",detectArrowKeys),b.on("destroy",(function(){document.removeEventListener("selectionchange",detectArrowKeys)}))}(0,b,A),this.destroy=function(){A.parentElement&&A.parentElement.removeChild(A)}},b.TextInput=L,b.$setUserAgentForTests=function(n,b){st=n,it=b}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(n,b,A){"use strict";var L=n("../lib/useragent"),R=function(){function DefaultHandlers(n){n.$clickSelection=null;var b=n.editor;b.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),b.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),b.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),b.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),b.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(b){n[b]=this[b]}),this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return DefaultHandlers.prototype.onMouseDown=function(n){var b=n.inSelection(),A=n.getDocumentPosition();this.mousedownEvent=n;var R=this.editor,D=n.getButton();return 0!==D?((R.getSelectionRange().isEmpty()||1==D)&&R.selection.moveToPosition(A),void(2==D&&(R.textInput.onContextMenu(n.domEvent),L.isMozilla||n.preventDefault()))):(this.mousedownEvent.time=Date.now(),!b||R.isFocused()||(R.focus(),!this.$focusTimeout||this.$clickSelection||R.inMultiSelectMode)?(this.captureMouse(n),this.startSelect(A,n.domEvent._clicks>1),n.preventDefault()):(this.setState("focusWait"),void this.captureMouse(n)))},DefaultHandlers.prototype.startSelect=function(n,b){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var A=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?A.selection.selectToPosition(n):b||A.selection.moveToPosition(n),b||this.select(),A.setStyle("ace_selecting"),this.setState("select"))},DefaultHandlers.prototype.select=function(){var n,b=this.editor,A=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var L=this.$clickSelection.comparePoint(A);if(-1==L)n=this.$clickSelection.end;else if(1==L)n=this.$clickSelection.start;else{var R=calcRangeOrientation(this.$clickSelection,A);A=R.cursor,n=R.anchor}b.selection.setSelectionAnchor(n.row,n.column)}b.selection.selectToPosition(A),b.renderer.scrollCursorIntoView()},DefaultHandlers.prototype.extendSelectionBy=function(n){var b,A=this.editor,L=A.renderer.screenToTextCoordinates(this.x,this.y),R=A.selection[n](L.row,L.column);if(this.$clickSelection){var D=this.$clickSelection.comparePoint(R.start),B=this.$clickSelection.comparePoint(R.end);if(-1==D&&B<=0)b=this.$clickSelection.end,R.end.row==L.row&&R.end.column==L.column||(L=R.start);else if(1==B&&D>=0)b=this.$clickSelection.start,R.start.row==L.row&&R.start.column==L.column||(L=R.end);else if(-1==D&&1==B)L=R.end,b=R.start;else{var E=calcRangeOrientation(this.$clickSelection,L);L=E.cursor,b=E.anchor}A.selection.setSelectionAnchor(b.row,b.column)}A.selection.selectToPosition(L),A.renderer.scrollCursorIntoView()},DefaultHandlers.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},DefaultHandlers.prototype.focusWait=function(){var n=function calcDistance(n,b,A,L){return Math.sqrt(Math.pow(A-n,2)+Math.pow(L-b,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(n>0||b-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},DefaultHandlers.prototype.onDoubleClick=function(n){var b=n.getDocumentPosition(),A=this.editor,L=A.session.getBracketRange(b);L?(L.isEmpty()&&(L.start.column--,L.end.column++),this.setState("select")):(L=A.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=L,this.select()},DefaultHandlers.prototype.onTripleClick=function(n){var b=n.getDocumentPosition(),A=this.editor;this.setState("selectByLines");var L=A.getSelectionRange();L.isMultiLine()&&L.contains(b.row,b.column)?(this.$clickSelection=A.selection.getLineRange(L.start.row),this.$clickSelection.end=A.selection.getLineRange(L.end.row).end):this.$clickSelection=A.selection.getLineRange(b.row),this.select()},DefaultHandlers.prototype.onQuadClick=function(n){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},DefaultHandlers.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var b=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var A=this.$lastScroll,L=n.domEvent.timeStamp,R=L-A.t,D=R?n.wheelX/R:A.vx,B=R?n.wheelY/R:A.vy;R<550&&(D=(D+A.vx)/2,B=(B+A.vy)/2);var E=Math.abs(D/B),X=!1;if(E>=1&&b.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(X=!0),E<=1&&b.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(X=!0),X)A.allowed=L;else if(L-A.allowed<550){Math.abs(D)<=1.5*Math.abs(A.vx)&&Math.abs(B)<=1.5*Math.abs(A.vy)?(X=!0,A.allowed=L):A.allowed=0}return A.t=L,A.vx=D,A.vy=B,X?(b.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()):void 0}},DefaultHandlers}();function calcRangeOrientation(n,b){if(n.start.row==n.end.row)var A=2*b.column-n.start.column-n.end.column;else if(n.start.row!=n.end.row-1||n.start.column||n.end.column)A=2*b.row-n.start.row-n.end.row;else var A=b.column-4;return A<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}R.prototype.selectEnd=R.prototype.selectByLinesEnd,R.prototype.selectAllEnd=R.prototype.selectByLinesEnd,R.prototype.selectByWordsEnd=R.prototype.selectByLinesEnd,b.DefaultHandlers=R})),ace.define("ace/lib/scroll",["require","exports","module"],(function(n,b,A){b.preventParentScroll=function preventParentScroll(n){n.stopPropagation();var b=n.currentTarget;b.scrollHeight>b.clientHeight||n.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=this&&this.__values||function(n){var b="function"==typeof Symbol&&Symbol.iterator,A=b&&n[b],L=0;if(A)return A.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&L>=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},B=n("./lib/dom"),E=(n("./lib/event"),n("./range").Range),X=n("./lib/scroll").preventParentScroll,$="ace_tooltip",V=function(){function Tooltip(n){this.isOpen=!1,this.$element=null,this.$parentNode=n}return Tooltip.prototype.$init=function(){return this.$element=B.createElement("div"),this.$element.className=$,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},Tooltip.prototype.getElement=function(){return this.$element||this.$init()},Tooltip.prototype.setText=function(n){this.getElement().textContent=n},Tooltip.prototype.setHtml=function(n){this.getElement().innerHTML=n},Tooltip.prototype.setPosition=function(n,b){this.getElement().style.left=n+"px",this.getElement().style.top=b+"px"},Tooltip.prototype.setClassName=function(n){B.addCssClass(this.getElement(),n)},Tooltip.prototype.setTheme=function(n){this.$element.className=$+" "+(n.isDark?"ace_dark ":"")+(n.cssClass||"")},Tooltip.prototype.show=function(n,b,A){null!=n&&this.setText(n),null!=b&&null!=A&&this.setPosition(b,A),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},Tooltip.prototype.hide=function(n){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=$,this.isOpen=!1)},Tooltip.prototype.getHeight=function(){return this.getElement().offsetHeight},Tooltip.prototype.getWidth=function(){return this.getElement().offsetWidth},Tooltip.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},Tooltip}(),K=new(function(){function PopupManager(){this.popups=[]}return PopupManager.prototype.addPopup=function(n){this.popups.push(n),this.updatePopups()},PopupManager.prototype.removePopup=function(n){var b=this.popups.indexOf(n);-1!==b&&(this.popups.splice(b,1),this.updatePopups())},PopupManager.prototype.updatePopups=function(){var n,b,A,L;this.popups.sort((function(n,b){return b.priority-n.priority}));var R=[];try{for(var B=D(this.popups),E=B.next();!E.done;E=B.next()){var X=E.value,$=!0;try{for(var V=(A=void 0,D(R)),K=V.next();!K.done;K=V.next()){var Q=K.value;if(this.doPopupsOverlap(Q,X)){$=!1;break}}}catch(n){A={error:n}}finally{try{K&&!K.done&&(L=V.return)&&L.call(V)}finally{if(A)throw A.error}}$?R.push(X):X.hide()}}catch(b){n={error:b}}finally{try{E&&!E.done&&(b=B.return)&&b.call(B)}finally{if(n)throw n.error}}},PopupManager.prototype.doPopupsOverlap=function(n,b){var A=n.getElement().getBoundingClientRect(),L=b.getElement().getBoundingClientRect();return A.leftL.left&&A.topL.top},PopupManager}());b.popupManager=K,b.Tooltip=V;var Q=function(n){function HoverTooltip(b){void 0===b&&(b=document.body);var A=n.call(this,b)||this;A.timeout=void 0,A.lastT=0,A.idleTime=350,A.lastEvent=void 0,A.onMouseOut=A.onMouseOut.bind(A),A.onMouseMove=A.onMouseMove.bind(A),A.waitForHover=A.waitForHover.bind(A),A.hide=A.hide.bind(A);var L=A.getElement();return L.style.whiteSpace="pre-wrap",L.style.pointerEvents="auto",L.addEventListener("mouseout",A.onMouseOut),L.tabIndex=-1,L.addEventListener("blur",function(){L.contains(document.activeElement)||this.hide()}.bind(A)),L.addEventListener("wheel",X),A}return R(HoverTooltip,n),HoverTooltip.prototype.addToEditor=function(n){n.on("mousemove",this.onMouseMove),n.on("mousedown",this.hide),n.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},HoverTooltip.prototype.removeFromEditor=function(n){n.off("mousemove",this.onMouseMove),n.off("mousedown",this.hide),n.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},HoverTooltip.prototype.onMouseMove=function(n,b){this.lastEvent=n,this.lastT=Date.now();var A=b.$mouseHandler.isMousePressed;if(this.isOpen){var L=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(L.row,L.column)&&!A&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||A||(this.lastEvent=n,this.timeout=setTimeout(this.waitForHover,this.idleTime))},HoverTooltip.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var n=Date.now()-this.lastT;this.idleTime-n>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-n):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},HoverTooltip.prototype.isOutsideOfText=function(n){var b=n.editor,A=n.getDocumentPosition(),L=b.session.getLine(A.row);if(A.column==L.length){var R=b.renderer.pixelToScreenCoordinates(n.clientX,n.clientY),D=b.session.documentToScreenPosition(A.row,A.column);if(D.column!=R.column||D.row!=R.row)return!0}return!1},HoverTooltip.prototype.setDataProvider=function(n){this.$gatherData=n},HoverTooltip.prototype.showForRange=function(n,b,A,L){if(!(L&&L!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var R=n.renderer;this.isOpen||(K.addPopup(this),this.$registerCloseEvents(),this.setTheme(R.theme)),this.isOpen=!0,this.addMarker(b,n.session),this.range=E.fromPoints(b.start,b.end);var D=R.textToScreenCoordinates(b.start.row,b.start.column),B=R.scroller.getBoundingClientRect();D.pageX=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},B=n("../lib/dom"),E=n("../lib/event"),X=n("../tooltip").Tooltip,$=n("../config").nls;n("../lib/lang");b.GutterHandler=function GutterHandler(n){var b,A,L=n.editor,R=L.renderer.$gutterLayer,D=new V(L);function hideTooltip(){b&&(b=clearTimeout(b)),D.isOpen&&(D.hideTooltip(),L.off("mousewheel",hideTooltip))}function moveTooltip(n){D.setPosition(n.x,n.y)}n.editor.setDefaultHandler("guttermousedown",(function(b){if(L.isFocused()&&0==b.getButton()&&"foldWidgets"!=R.getRegion(b)){var A=b.getDocumentPosition().row,D=L.session.selection;if(b.getShiftKey())D.selectTo(A,0);else{if(2==b.domEvent.detail)return L.selectAll(),b.preventDefault();n.$clickSelection=L.selection.getLineRange(A)}return n.setState("selectByLines"),n.captureMouse(b),b.preventDefault()}})),n.editor.setDefaultHandler("guttermousemove",(function(E){var X=E.domEvent.target||E.domEvent.srcElement;if(B.hasCssClass(X,"ace_fold-widget"))return hideTooltip();D.isOpen&&n.$tooltipFollowsMouse&&moveTooltip(E),A=E,b||(b=setTimeout((function(){b=null,A&&!n.isMousePressed?function showTooltip(){var b=A.getDocumentPosition().row;if(b==L.session.getLength()){var B=L.renderer.pixelToScreenCoordinates(0,A.y).row,E=A.$pos;if(B>L.session.documentToScreenRow(E.row,E.column))return hideTooltip()}if(D.showTooltip(b),D.isOpen)if(L.on("mousewheel",hideTooltip),n.$tooltipFollowsMouse)moveTooltip(A);else{var X=A.getGutterRow(),$=R.$lines.get(X);if($){var V=$.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),K=D.getElement().style;K.left=V.right+"px",K.top=V.bottom+"px"}else moveTooltip(A)}}():hideTooltip()}),50))})),E.addListener(L.renderer.$gutter,"mouseout",(function(n){A=null,D.isOpen&&!b&&(b=setTimeout((function(){b=null,hideTooltip()}),50))}),L),L.on("changeSession",hideTooltip),L.on("input",hideTooltip)};var V=function(n){function GutterTooltip(b){var A=n.call(this,b.container)||this;return A.editor=b,A}return R(GutterTooltip,n),GutterTooltip.prototype.setPosition=function(n,b){var A=window.innerWidth||document.documentElement.clientWidth,L=window.innerHeight||document.documentElement.clientHeight,R=this.getWidth(),D=this.getHeight();(n+=15)+R>A&&(n-=n+R-A),(b+=15)+D>L&&(b-=20+D),X.prototype.setPosition.call(this,n,b)},Object.defineProperty(GutterTooltip,"annotationLabels",{get:function(){return{error:{singular:$("gutter-tooltip.aria-label.error.singular","error"),plural:$("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:$("gutter-tooltip.aria-label.security.singular","security finding"),plural:$("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:$("gutter-tooltip.aria-label.warning.singular","warning"),plural:$("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:$("gutter-tooltip.aria-label.info.singular","information message"),plural:$("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:$("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:$("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),GutterTooltip.prototype.showTooltip=function(n){var b,A,L=this.editor.renderer.$gutterLayer,R=L.$annotations[n];A=R?{displayText:Array.from(R.displayText),type:Array.from(R.type)}:{displayText:[],type:[]};var D=L.session.getFoldLine(n);if(D&&L.$showFoldedAnnotations){for(var E,X={error:[],security:[],warning:[],info:[],hint:[]},$={error:1,security:2,warning:3,info:4,hint:5},V=n+1;V<=D.end.row;V++)if(L.$annotations[V])for(var K=0;K5?nt=null:L-nt>=200&&(b.renderer.scrollCursorIntoView(),nt=null)})(K=b.renderer.screenToTextCoordinates(E,X),n),function autoScroll(n,A){var L=Date.now(),R=b.renderer.layerConfig.lineHeight,D=b.renderer.layerConfig.characterWidth,B=b.renderer.scroller.getBoundingClientRect(),$={x:{left:E-B.left,right:B.right-E},y:{top:X-B.top,bottom:B.bottom-X}},V=Math.min($.x.left,$.x.right),K=Math.min($.y.top,$.y.bottom),Q={row:n.row,column:n.column};V/D<=2&&(Q.column+=$.x.left<$.x.right?-3:2),K/R<=1&&(Q.row+=$.y.top<$.y.bottom?-1:1);var tt=n.row!=Q.row,nt=n.column!=Q.column,it=!A||n.row!=A.row;tt||nt&&!it?ot?L-ot>=200&&b.renderer.scrollCursorIntoView(Q):ot=L:ot=null}(K,n)}function addDragMarker(){V=b.selection.toOrientedRange(),B=b.session.addMarker(V,"ace_selection",b.getSelectionStyle()),b.clearSelection(),b.isFocused()&&b.renderer.$cursorLayer.setBlinking(!1),clearInterval($),onDragInterval(),$=setInterval(onDragInterval,20),st=0,R.addListener(document,"mousemove",onMouseMove)}function clearDragMarker(){clearInterval($),b.session.removeMarker(B),B=null,b.selection.fromOrientedRange(V),b.isFocused()&&!tt&&b.$resetCursorStyle(),V=null,K=null,st=0,ot=null,nt=null,R.removeListener(document,"mousemove",onMouseMove)}this.onDragStart=function(n){if(this.cancelDrag||!rt.draggable){var L=this;return setTimeout((function(){L.startSelect(),L.captureMouse(n)}),0),n.preventDefault()}V=b.getSelectionRange();var R=n.dataTransfer;R.effectAllowed=b.getReadOnly()?"copy":"copyMove",b.container.appendChild(A),R.setDragImage&&R.setDragImage(A,0,0),setTimeout((function(){b.container.removeChild(A)})),R.clearData(),R.setData("Text",b.session.getTextRange()),tt=!0,this.setState("drag")},this.onDragEnd=function(n){if(rt.draggable=!1,tt=!1,this.setState(null),!b.getReadOnly()){var A=n.dataTransfer.dropEffect;Q||"move"!=A||b.session.remove(b.getSelectionRange()),b.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(n){if(!b.getReadOnly()&&canAccept(n.dataTransfer))return E=n.clientX,X=n.clientY,B||addDragMarker(),st++,n.dataTransfer.dropEffect=Q=getDropEffect(n),R.preventDefault(n)},this.onDragOver=function(n){if(!b.getReadOnly()&&canAccept(n.dataTransfer))return E=n.clientX,X=n.clientY,B||(addDragMarker(),st++),null!==pt&&(pt=null),n.dataTransfer.dropEffect=Q=getDropEffect(n),R.preventDefault(n)},this.onDragLeave=function(n){if(--st<=0&&B)return clearDragMarker(),Q=null,R.preventDefault(n)},this.onDrop=function(n){if(K){var A=n.dataTransfer;if(tt)switch(Q){case"move":V=V.contains(K.row,K.column)?{start:K,end:K}:b.moveText(V,K);break;case"copy":V=b.moveText(V,K,!0)}else{var L=A.getData("Text");V={start:K,end:b.session.insert(K,L)},b.focus(),Q=null}return clearDragMarker(),R.preventDefault(n)}},R.addListener(rt,"dragstart",this.onDragStart.bind(n),b),R.addListener(rt,"dragend",this.onDragEnd.bind(n),b),R.addListener(rt,"dragenter",this.onDragEnter.bind(n),b),R.addListener(rt,"dragover",this.onDragOver.bind(n),b),R.addListener(rt,"dragleave",this.onDragLeave.bind(n),b),R.addListener(rt,"drop",this.onDrop.bind(n),b);var pt=null;function onMouseMove(){null==pt&&(pt=setTimeout((function(){null!=pt&&B&&clearDragMarker()}),20))}function canAccept(n){var b=n.types;return!b||Array.prototype.some.call(b,(function(n){return"text/plain"==n||"Text"==n}))}function getDropEffect(n){var b=["copy","copymove","all","uninitialized"],A=D.isMac?n.altKey:n.ctrlKey,L="uninitialized";try{L=n.dataTransfer.effectAllowed.toLowerCase()}catch(n){}var R="none";return A&&b.indexOf(L)>=0?R="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(L)>=0?R="move":b.indexOf(L)>=0&&(R="copy"),R}}function calcDistance(n,b,A,L){return Math.sqrt(Math.pow(A-n,2)+Math.pow(L-b,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor;n.container.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging");var b=D.isWin?"default":"move";n.renderer.setCursorStyle(b),this.setState("dragReady")},this.onMouseDrag=function(n){var b=this.editor.container;D.isIE&&"dragReady"==this.state&&(calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&b.dragDrop());"dragWait"===this.state&&(calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(b.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(n){if(this.$dragEnabled){this.mousedownEvent=n;var b=this.editor,A=n.inSelection(),L=n.getButton();if(1===(n.domEvent.detail||1)&&0===L&&A){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();var R=n.domEvent.target||n.domEvent.srcElement;if("unselectable"in R&&(R.unselectable="on"),b.getDragDelay()){if(D.isWebKit)this.cancelDrag=!0,b.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0}}}}).call(DragdropHandler.prototype),b.DragdropHandler=DragdropHandler})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("./mouse_event").MouseEvent,R=n("../lib/event"),D=n("../lib/dom");b.addTouchListeners=function(n,b){var A,B,E,X,$,V,K,Q,tt,ot="scroll",nt=0,it=0,rt=0,st=0;function createContextMenu(){var n=window.navigator&&window.navigator.clipboard,A=!1,canExecuteCommand=function(n){return b.commands.canExecute(n,b)},handleClick=function(L){var R,B,E=L.target.getAttribute("action");if("more"==E||!A)return A=!A,R=b.getCopyText(),B=b.session.getUndoManager().hasUndo(),void tt.replaceChild(D.buildDom(A?["span",!R&&canExecuteCommand("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&canExecuteCommand("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&canExecuteCommand("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],n&&canExecuteCommand("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&canExecuteCommand("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],canExecuteCommand("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],canExecuteCommand("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),tt.firstChild);"paste"==E?n.readText().then((function(n){b.execCommand(E,n)})):E&&("cut"!=E&&"copy"!=E||(n?n.writeText(b.getCopyText()):document.execCommand("copy")),b.execCommand(E)),tt.firstChild.style.display="none",A=!1,"openCommandPalette"!=E&&b.focus()};tt=D.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(n){ot="menu",n.stopPropagation(),n.preventDefault(),b.textInput.focus()},ontouchend:function(n){n.stopPropagation(),n.preventDefault(),handleClick(n)},onclick:handleClick},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],b.container)}function showContextMenu(){if(b.getOption("enableMobileMenu")){tt||createContextMenu();var n=b.selection.cursor,A=b.renderer.textToScreenCoordinates(n.row,n.column),L=b.renderer.textToScreenCoordinates(0,0).pageX,R=b.renderer.scrollLeft,D=b.container.getBoundingClientRect();tt.style.top=A.pageY-D.top-3+"px",A.pageX-D.left1)return clearTimeout($),$=null,E=-1,void(ot="zoom");Q=b.$mouseHandler.isMousePressed=!0;var D=b.renderer.layerConfig.lineHeight,V=b.renderer.layerConfig.lineHeight,tt=n.timeStamp;X=tt;var pt=R[0],lt=pt.clientX,ut=pt.clientY;Math.abs(A-lt)+Math.abs(B-ut)>D&&(E=-1),A=n.clientX=lt,B=n.clientY=ut,rt=st=0;var bt=new L(n,b);if(K=bt.getDocumentPosition(),tt-E<500&&1==R.length&&!nt)it++,n.preventDefault(),n.button=0,function switchToSelectionMode(){$=null,clearTimeout($),b.selection.moveToPosition(K);var n=it>=2?b.selection.getLineRange(K.row):b.session.getBracketRange(K);n&&!n.isEmpty()?b.selection.setRange(n):b.selection.selectWord(),ot="wait"}();else{it=0;var Mt=b.selection.cursor,zt=b.selection.isEmpty()?Mt:b.selection.anchor,Ot=b.renderer.$cursorLayer.getPixelPosition(Mt,!0),ft=b.renderer.$cursorLayer.getPixelPosition(zt,!0),mt=b.renderer.scroller.getBoundingClientRect(),_t=b.renderer.layerConfig.offset,gt=b.renderer.scrollLeft,weightedDistance=function(n,b){return(n/=V)*n+(b=b/D-.75)*b};if(n.clientXyt?"cursor":"anchor"),ot=yt<3.5?"anchor":At<3.5?"cursor":"scroll",$=setTimeout(handleLongTap,450)}E=tt}),b),R.addListener(n,"touchend",(function(n){Q=b.$mouseHandler.isMousePressed=!1,V&&clearInterval(V),"zoom"==ot?(ot="",nt=0):$?(b.selection.moveToPosition(K),nt=0,showContextMenu()):"scroll"==ot?(!function animate(){nt+=60,V=setInterval((function(){nt--<=0&&(clearInterval(V),V=null),Math.abs(rt)<.01&&(rt=0),Math.abs(st)<.01&&(st=0),nt<20&&(rt*=.9),nt<20&&(st*=.9);var n=b.session.getScrollTop();b.renderer.scrollBy(10*rt,10*st),n==b.session.getScrollTop()&&(nt=0)}),10)}(),hideContextMenu()):showContextMenu(),clearTimeout($),$=null}),b),R.addListener(n,"touchmove",(function(n){$&&(clearTimeout($),$=null);var R=n.touches;if(!(R.length>1||"zoom"==ot)){var D=R[0],E=A-D.clientX,V=B-D.clientY;if("wait"==ot){if(!(E*E+V*V>4))return n.preventDefault();ot="cursor"}A=D.clientX,B=D.clientY,n.clientX=D.clientX,n.clientY=D.clientY;var K=n.timeStamp,Q=K-X;if(X=K,"scroll"==ot){var tt=new L(n,b);tt.speed=1,tt.wheelX=E,tt.wheelY=V,10*Math.abs(E)=n){for(D=K+1;D=n;)D++;for(E=K,X=D-1;E=b.length||(X=A[R-1])!=Q&&X!=tt||($=b[R+1])!=Q&&$!=tt?ot:(D&&($=tt),$==X?$:ot);case lt:return(X=R>0?A[R-1]:nt)==Q&&R+10&&A[R-1]==Q)return Q;if(D)return ot;for(At=R+1,gt=b.length;At=1425&&qt<=2303||64286==qt;if(X=b[At],vt&&(X==K||X==rt))return K}return R<1||(X=b[R-1])==nt?ot:A[R-1];case nt:return D=!1,B=!0,L;case it:return E=!0,ot;case Mt:case zt:case ft:case mt:case Ot:D=!1;case _t:return ot}}function _getCharacterType(n){var b=n.charCodeAt(0),A=b>>8;return 0==A?b>191?V:gt[b]:5==A?/[\u0591-\u05f4]/.test(n)?K:V:6==A?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(n)?bt:/[\u0660-\u0669\u066b-\u066c]/.test(n)?tt:1642==b?ut:/[\u06f0-\u06f9]/.test(n)?Q:rt:32==A&&b<=8287?At[255&b]:254==A&&b>=65136?rt:ot}b.L=V,b.R=K,b.EN=Q,b.ON_R=3,b.AN=4,b.R_H=5,b.B=6,b.RLE=7,b.DOT="·",b.doBidiReorder=function(n,A,V){if(n.length<2)return{};var Q=n.split(""),pt=new Array(Q.length),lt=new Array(Q.length),ut=[];L=V?1:0,function _computeLevels(n,b,A,V){var K=L?$:X,Q=null,tt=null,ot=null,rt=0,pt=null,lt=-1,ut=null,bt=null,Mt=[];if(!V)for(ut=0,V=[];ut0)if(16==pt){for(ut=lt;ut-1){for(ut=lt;ut=0&&V[zt]==st;zt--)b[zt]=L}}(Q,ut,Q.length,A);for(var bt=0;btrt&&A[bt]0&&"ل"===Q[bt-1]&&/\u0622|\u0623|\u0625|\u0627/.test(Q[bt])&&(ut[bt-1]=ut[bt]=b.R_H,bt++);Q[Q.length-1]===b.DOT&&(ut[Q.length-1]=b.B),"‫"===Q[0]&&(ut[0]=b.RLE);for(bt=0;bt=0&&(n=this.session.$docRowCache[A])}return n},BidiHandler.prototype.getSplitIndex=function(){var n=0,b=this.session.$screenRowCache;if(b.length)for(var A,L=this.session.$getRowCacheIndex(b,this.currentRow);this.currentRow-n>0&&(A=this.session.$getRowCacheIndex(b,this.currentRow-n-1))===L;)L=A,n++;else n=this.currentRow;return n},BidiHandler.prototype.updateRowLine=function(n,b){void 0===n&&(n=this.getDocumentRow());var A=n===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var D=this.session.$wrapData[n];D&&(void 0===b&&(b=this.getSplitIndex()),b>0&&D.length?(this.wrapIndent=D.indent,this.wrapOffset=this.wrapIndent*this.charWidths[L.L],this.line=bb?this.session.getOverwrite()?n:n-1:b,R=L.getVisualFromLogicalIdx(A,this.bidiMap),D=this.bidiMap.bidiLevels,B=0;!this.session.getOverwrite()&&n<=b&&D[R]%2!=0&&R++;for(var E=0;Eb&&D[R]%2==0&&(B+=this.charWidths[D[R]]),this.wrapIndent&&(B+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(B+=this.rtlLineOffset),B},BidiHandler.prototype.getSelections=function(n,b){var A,L=this.bidiMap,R=L.bidiLevels,D=[],B=0,E=Math.min(n,b)-this.wrapIndent,X=Math.max(n,b)-this.wrapIndent,$=!1,V=!1,K=0;this.wrapIndent&&(B+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var Q,tt=0;tt=E&&QA+D/2;){if(A+=D,L===R.length-1){D=0;break}D=this.charWidths[R[++L]]}return L>0&&R[L-1]%2!=0&&R[L]%2==0?(n0&&R[L-1]%2==0&&R[L]%2!=0?b=1+(n>A?this.bidiMap.logicalFromVisual[L]:this.bidiMap.logicalFromVisual[L-1]):this.isRtlDir&&L===R.length-1&&0===D&&R[L-1]%2==0||!this.isRtlDir&&0===L&&R[L]%2!=0?b=1+this.bidiMap.logicalFromVisual[L]:(L>0&&R[L-1]%2!=0&&0!==D&&L--,b=this.bidiMap.logicalFromVisual[L]),0===b&&this.isRtlDir&&b++,b+this.wrapIndent},BidiHandler}();b.BidiHandler=B})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/oop"),R=n("./lib/lang"),D=n("./lib/event_emitter").EventEmitter,B=n("./range").Range,E=function(){function Selection(n){this.session=n,this.doc=n.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var b=this;this.cursor.on("change",(function(n){b.$cursorChanged=!0,b.$silent||b._emit("changeCursor"),b.$isEmpty||b.$silent||b._emit("changeSelection"),b.$keepDesiredColumnOnChange||n.old.column==n.value.column||(b.$desiredColumn=null)})),this.anchor.on("change",(function(){b.$anchorChanged=!0,b.$isEmpty||b.$silent||b._emit("changeSelection")}))}return Selection.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},Selection.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},Selection.prototype.getCursor=function(){return this.lead.getPosition()},Selection.prototype.setAnchor=function(n,b){this.$isEmpty=!1,this.anchor.setPosition(n,b)},Selection.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},Selection.prototype.getSelectionLead=function(){return this.lead.getPosition()},Selection.prototype.isBackwards=function(){var n=this.anchor,b=this.lead;return n.row>b.row||n.row==b.row&&n.column>b.column},Selection.prototype.getRange=function(){var n=this.anchor,b=this.lead;return this.$isEmpty?B.fromPoints(b,b):this.isBackwards()?B.fromPoints(b,n):B.fromPoints(n,b)},Selection.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},Selection.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},Selection.prototype.setRange=function(n,b){var A=b?n.end:n.start,L=b?n.start:n.end;this.$setSelection(A.row,A.column,L.row,L.column)},Selection.prototype.$setSelection=function(n,b,A,L){if(!this.$silent){var R=this.$isEmpty,D=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(n,b),this.cursor.setPosition(A,L),this.$isEmpty=!B.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||R!=this.$isEmpty||D)&&this._emit("changeSelection")}},Selection.prototype.$moveSelection=function(n){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),n.call(this)},Selection.prototype.selectTo=function(n,b){this.$moveSelection((function(){this.moveCursorTo(n,b)}))},Selection.prototype.selectToPosition=function(n){this.$moveSelection((function(){this.moveCursorToPosition(n)}))},Selection.prototype.moveTo=function(n,b){this.clearSelection(),this.moveCursorTo(n,b)},Selection.prototype.moveToPosition=function(n){this.clearSelection(),this.moveCursorToPosition(n)},Selection.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},Selection.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},Selection.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},Selection.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},Selection.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},Selection.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},Selection.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},Selection.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},Selection.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},Selection.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},Selection.prototype.getWordRange=function(n,b){if(void 0===b){var A=n||this.lead;n=A.row,b=A.column}return this.session.getWordRange(n,b)},Selection.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},Selection.prototype.selectAWord=function(){var n=this.getCursor(),b=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(b)},Selection.prototype.getLineRange=function(n,b){var A,L="number"==typeof n?n:this.lead.row,R=this.session.getFoldLine(L);return R?(L=R.start.row,A=R.end.row):A=L,!0===b?new B(L,0,A,this.session.getLine(A).length):new B(L,0,A+1,0)},Selection.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},Selection.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},Selection.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},Selection.prototype.wouldMoveIntoSoftTab=function(n,b,A){var L=n.column,R=n.column+b;return A<0&&(L=n.column-b,R=n.column),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(L,R).split(" ").length-1==b},Selection.prototype.moveCursorLeft=function(){var n,b=this.lead.getPosition();if(n=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(0===b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var A=this.session.getTabSize();this.wouldMoveIntoSoftTab(b,A,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-A):this.moveCursorBy(0,-1)}},Selection.prototype.moveCursorRight=function(){var n,b=this.lead.getPosition();if(n=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(b.column=L)}}this.moveCursorTo(b.row,b.column)},Selection.prototype.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,b=this.doc.getLine(n).length;this.moveCursorTo(n,b)},Selection.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},Selection.prototype.moveCursorLongWordRight=function(){var n=this.lead.row,b=this.lead.column,A=this.doc.getLine(n),L=A.substring(b);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var R=this.session.getFoldAt(n,b,1);if(R)this.moveCursorTo(R.end.row,R.end.column);else{if(this.session.nonTokenRe.exec(L)&&(b+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,L=A.substring(b)),b>=A.length)return this.moveCursorTo(n,A.length),this.moveCursorRight(),void(n0&&this.moveCursorWordLeft());this.session.tokenRe.exec(D)&&(A-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,A)}},Selection.prototype.$shortWordEndIndex=function(n){var b,A=0,L=/\s/,R=this.session.tokenRe;if(R.lastIndex=0,this.session.tokenRe.exec(n))A=this.session.tokenRe.lastIndex;else{for(;(b=n[A])&&L.test(b);)A++;if(A<1)for(R.lastIndex=0;(b=n[A])&&!R.test(b);)if(R.lastIndex=0,A++,L.test(b)){if(A>2){A--;break}for(;(b=n[A])&&L.test(b);)A++;if(A>2)break}}return R.lastIndex=0,A},Selection.prototype.moveCursorShortWordRight=function(){var n=this.lead.row,b=this.lead.column,A=this.doc.getLine(n),L=A.substring(b),R=this.session.getFoldAt(n,b,1);if(R)return this.moveCursorTo(R.end.row,R.end.column);if(b==A.length){var D=this.doc.getLength();do{n++,L=this.doc.getLine(n)}while(n0&&/^\s*$/.test(L));A=L.length,/\s+$/.test(L)||(L="")}var D=R.stringReverse(L),B=this.$shortWordEndIndex(D);return this.moveCursorTo(b,A-B)},Selection.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},Selection.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},Selection.prototype.moveCursorBy=function(n,b){var A,L=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===b&&(0!==n&&(this.session.$bidiHandler.isBidiRow(L.row,this.lead.row)?(A=this.session.$bidiHandler.getPosLeft(L.column),L.column=Math.round(A/this.session.$bidiHandler.charWidths[0])):A=L.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?L.column=this.$desiredColumn:this.$desiredColumn=L.column),0!=n&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var R=this.session.lineWidgets[this.lead.row];n<0?n-=R.rowsAbove||0:n>0&&(n+=R.rowCount-(R.rowsAbove||0))}var D=this.session.screenToDocumentPosition(L.row+n,L.column,A);0!==n&&0===b&&D.row===this.lead.row&&(D.column,this.lead.column),this.moveCursorTo(D.row,D.column+b,0===b)},Selection.prototype.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)},Selection.prototype.moveCursorTo=function(n,b,A){var L=this.session.getFoldAt(n,b,1);L&&(n=L.start.row,b=L.start.column),this.$keepDesiredColumnOnChange=!0;var R=this.session.getLine(n);/[\uDC00-\uDFFF]/.test(R.charAt(b))&&R.charAt(b-1)&&(this.lead.row==n&&this.lead.column==b+1?b-=1:b+=1),this.lead.setPosition(n,b),this.$keepDesiredColumnOnChange=!1,A||(this.$desiredColumn=null)},Selection.prototype.moveCursorToScreen=function(n,b,A){var L=this.session.screenToDocumentPosition(n,b);this.moveCursorTo(L.row,L.column,A)},Selection.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},Selection.prototype.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start),this.$desiredColumn=n.desiredColumn||this.$desiredColumn},Selection.prototype.toOrientedRange=function(n){var b=this.getRange();return n?(n.start.column=b.start.column,n.start.row=b.start.row,n.end.column=b.end.column,n.end.row=b.end.row):n=b,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n},Selection.prototype.getRangeOfMovements=function(n){var b=this.getCursor();try{n(this);var A=this.getCursor();return B.fromPoints(b,A)}catch(n){return B.fromPoints(b,b)}finally{this.moveCursorToPosition(b)}},Selection.prototype.toJSON=function(){if(this.rangeCount)var n=this.ranges.map((function(n){var b=n.clone();return b.isBackwards=n.cursor==n.start,b}));else(n=this.getRange()).isBackwards=this.isBackwards();return n},Selection.prototype.fromJSON=function(n){if(null==n.start){if(this.rangeList&&n.length>1){this.toSingleRange(n[0]);for(var b=n.length;b--;){var A=B.fromPoints(n[b].start,n[b].end);n[b].isBackwards&&(A.cursor=A.start),this.addRange(A,!0)}return}n=n[0]}this.rangeList&&this.toSingleRange(n),this.setSelectionRange(n,n.isBackwards)},Selection.prototype.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(n[b]))return!1;return!0},Selection}();E.prototype.setSelectionAnchor=E.prototype.setAnchor,E.prototype.getSelectionAnchor=E.prototype.getAnchor,E.prototype.setSelectionRange=E.prototype.setRange,L.implement(E.prototype,D),b.Selection=E})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(n,b,A){"use strict";var L=n("./lib/report_error").reportError,R=2e3,D=function(){function Tokenizer(n){for(var b in this.splitRegex,this.states=n,this.regExps={},this.matchMappings={},this.states){for(var A=this.states[b],L=[],R=0,D=this.matchMappings[b]={defaultToken:"text"},B="g",E=[],X=0;X1?this.$applyToken:$.token),K>1&&(/\\\d/.test($.regex)?V=$.regex.replace(/\\([0-9]+)/g,(function(n,b){return"\\"+(parseInt(b,10)+R+1)})):(K=1,V=this.removeCapturingGroups($.regex)),$.splitRegex||"string"==typeof $.token||E.push($)),D[R]=X,R+=K,L.push(V),$.onMatch||($.onMatch=null)}}L.length||(D[0]=0,L.push("$")),E.forEach((function(n){n.splitRegex=this.createSplitterRegexp(n.regex,B)}),this),this.regExps[b]=new RegExp("("+L.join(")|(")+")|($)",B)}}return Tokenizer.prototype.$setMaxTokenCount=function(n){R=0|n},Tokenizer.prototype.$applyToken=function(n){var b=this.splitRegex.exec(n).slice(1),A=this.token.apply(this,b);if("string"==typeof A)return[{type:A,value:n}];for(var L=[],R=0,D=A.length;RV){var rt=n.substring(V,it-nt.length);Q.type==tt?Q.value+=rt:(Q.type&&$.push(Q),Q={type:tt,value:rt})}for(var st=0;stR){for(K>2*n.length&&this.reportError("infinite loop with in ace tokenizer",{startState:b,line:n});V1&&A[0]!==L&&A.unshift("#tmp",L),{tokens:$,state:A.length?A:L}},Tokenizer}();D.prototype.reportError=L,b.Tokenizer=D})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(n,b,A){"use strict";var L,R=n("../lib/deep_copy").deepCopy;(function(){this.addRules=function(n,b){if(b)for(var A in n){for(var L=n[A],R=0;R=this.$rowTokens.length;){if(this.$row+=1,n||(n=this.$session.getLength()),this.$row>=n)return this.$row=n-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},TokenIterator.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},TokenIterator.prototype.getCurrentTokenRow=function(){return this.$row},TokenIterator.prototype.getCurrentTokenColumn=function(){var n=this.$rowTokens,b=this.$tokenIndex,A=n[b].start;if(void 0!==A)return A;for(A=0;b>0;)A+=n[b-=1].value.length;return A},TokenIterator.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},TokenIterator.prototype.getCurrentTokenRange=function(){var n=this.$rowTokens[this.$tokenIndex],b=this.getCurrentTokenColumn();return new L(this.$row,b,this.$row,b+n.value.length)},TokenIterator}();b.TokenIterator=R})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(n,b,A){"use strict";var L,R,D=n("../../lib/oop"),B=n("../behaviour").Behaviour,E=n("../../token_iterator").TokenIterator,X=n("../../lib/lang"),$=["text","paren.rparen","rparen","paren","punctuation.operator"],V=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],K={},Q={'"':'"',"'":"'"},initContext=function(n){var b=-1;if(n.multiSelect&&(b=n.selection.index,K.rangeCount!=n.multiSelect.rangeCount&&(K={rangeCount:n.multiSelect.rangeCount})),K[b])return L=K[b];L=K[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},getWrapped=function(n,b,A,L){var R=n.end.row-n.start.row;return{text:A+b+L,selection:[0,n.start.column+1,R,n.end.column+(R?0:1)]}};(R=function(n){n=n||{},this.add("braces","insertion",(function(b,A,D,B,E){var $=D.getCursorPosition(),V=B.doc.getLine($.row);if("{"==E){initContext(D);var K=D.getSelectionRange(),Q=B.doc.getTextRange(K),tt=B.getTokenAt($.row,$.column);if(""!==Q&&"{"!==Q&&D.getWrapBehavioursEnabled())return getWrapped(K,Q,"{","}");if(tt&&/(?:string)\.quasi|\.xml/.test(tt.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(n){return n.test(tt.type)}))||/(string)\.quasi/.test(tt.type)&&"$"!==tt.value[$.column-tt.start-1])return;return R.recordAutoInsert(D,B,"}"),{text:"{}",selection:[1,1]}}if(R.isSaneInsertion(D,B))return/[\]\}\)]/.test(V[$.column])||D.inMultiSelectMode||n.braces?(R.recordAutoInsert(D,B,"}"),{text:"{}",selection:[1,1]}):(R.recordMaybeInsert(D,B,"{"),{text:"{",selection:[1,1]})}else if("}"==E){if(initContext(D),"}"==V.substring($.column,$.column+1))if(null!==B.$findOpeningBracket("}",{column:$.column+1,row:$.row})&&R.isAutoInsertedClosing($,V,E))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==E||"\r\n"==E){initContext(D);var ot="";if(R.isMaybeInsertedClosing($,V)&&(ot=X.stringRepeat("}",L.maybeInsertedBrackets),R.clearMaybeInsertedClosing()),"}"===V.substring($.column,$.column+1)){var nt=B.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!nt)return null;var it=this.$getIndent(B.getLine(nt.row))}else{if(!ot)return void R.clearMaybeInsertedClosing();it=this.$getIndent(V)}var rt=it+B.getTabString();return{text:"\n"+rt+"\n"+it+ot,selection:[1,rt.length,1,rt.length]}}R.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(n,b,A,R,D){var B=R.doc.getTextRange(D);if(!D.isMultiLine()&&"{"==B){if(initContext(A),"}"==R.doc.getLine(D.start.row).substring(D.end.column,D.end.column+1))return D.end.column++,D;L.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(n,b,A,L,D){if("("==D){initContext(A);var B=A.getSelectionRange(),E=L.doc.getTextRange(B);if(""!==E&&A.getWrapBehavioursEnabled())return getWrapped(B,E,"(",")");if(R.isSaneInsertion(A,L))return R.recordAutoInsert(A,L,")"),{text:"()",selection:[1,1]}}else if(")"==D){initContext(A);var X=A.getCursorPosition(),$=L.doc.getLine(X.row);if(")"==$.substring(X.column,X.column+1))if(null!==L.$findOpeningBracket(")",{column:X.column+1,row:X.row})&&R.isAutoInsertedClosing(X,$,D))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(n,b,A,L,R){var D=L.doc.getTextRange(R);if(!R.isMultiLine()&&"("==D&&(initContext(A),")"==L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)))return R.end.column++,R})),this.add("brackets","insertion",(function(n,b,A,L,D){if("["==D){initContext(A);var B=A.getSelectionRange(),E=L.doc.getTextRange(B);if(""!==E&&A.getWrapBehavioursEnabled())return getWrapped(B,E,"[","]");if(R.isSaneInsertion(A,L))return R.recordAutoInsert(A,L,"]"),{text:"[]",selection:[1,1]}}else if("]"==D){initContext(A);var X=A.getCursorPosition(),$=L.doc.getLine(X.row);if("]"==$.substring(X.column,X.column+1))if(null!==L.$findOpeningBracket("]",{column:X.column+1,row:X.row})&&R.isAutoInsertedClosing(X,$,D))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(n,b,A,L,R){var D=L.doc.getTextRange(R);if(!R.isMultiLine()&&"["==D&&(initContext(A),"]"==L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)))return R.end.column++,R})),this.add("string_dquotes","insertion",(function(n,b,A,L,R){var D=L.$mode.$quotes||Q;if(1==R.length&&D[R]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(R))return;initContext(A);var B=R,E=A.getSelectionRange(),X=L.doc.getTextRange(E);if(!(""===X||1==X.length&&D[X])&&A.getWrapBehavioursEnabled())return getWrapped(E,X,B,B);if(!X){var $=A.getCursorPosition(),V=L.doc.getLine($.row),K=V.substring($.column-1,$.column),tt=V.substring($.column,$.column+1),ot=L.getTokenAt($.row,$.column),nt=L.getTokenAt($.row,$.column+1);if("\\"==K&&ot&&/escape/.test(ot.type))return null;var it,rt=ot&&/string|escape/.test(ot.type),st=!nt||/string|escape/.test(nt.type);if(tt==B)(it=rt!==st)&&/string\.end/.test(nt.type)&&(it=!1);else{if(rt&&!st)return null;if(rt&&st)return null;var pt=L.$mode.tokenRe;pt.lastIndex=0;var lt=pt.test(K);pt.lastIndex=0;var ut=pt.test(tt),bt=L.$mode.$pairQuotesAfter;if(!(bt&&bt[B]&&bt[B].test(K))&<||ut)return null;if(tt&&!/[\s;,.})\]\\]/.test(tt))return null;var Mt=V[$.column-2];if(K==B&&(Mt==B||pt.test(Mt)))return null;it=!0}return{text:it?B+B:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(n,b,A,L,R){var D=L.$mode.$quotes||Q,B=L.doc.getTextRange(R);if(!R.isMultiLine()&&D.hasOwnProperty(B)&&(initContext(A),L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)==B))return R.end.column++,R})),!1!==n.closeDocComment&&this.add("doc comment end","insertion",(function(n,b,A,L,R){if("doc-start"===n&&("\n"===R||"\r\n"===R)&&A.selection.isEmpty()){var D=A.getCursorPosition();if(0===D.column)return;for(var B=L.doc.getLine(D.row),E=L.doc.getLine(D.row+1),X=L.getTokens(D.row),$=0,V=0;V=D.column){if($===D.column){if(!/\.doc/.test(K.type))return;if(/\*\//.test(K.value)){var Q=X[V+1];if(!Q||!/\.doc/.test(Q.type))return}}var tt=D.column-($-K.value.length),ot=K.value.indexOf("*/"),nt=K.value.indexOf("/**",ot>-1?ot+2:0);if(-1!==nt&&tt>nt&&tt=ot&&tt<=nt||!/\.doc/.test(K.type))return;break}}var it=this.$getIndent(B);if(/\s*\*/.test(E))return/^\s*\*/.test(B)?{text:R+it+"* ",selection:[1,2+it.length,1,2+it.length]}:{text:R+it+" * ",selection:[1,3+it.length,1,3+it.length]};if(/\/\*\*/.test(B.substring(0,D.column)))return{text:R+it+" * "+R+" "+it+"*/",selection:[1,4+it.length,1,4+it.length]}}}))}).isSaneInsertion=function(n,b){var A=n.getCursorPosition(),L=new E(b,A.row,A.column);if(!this.$matchTokenType(L.getCurrentToken()||"text",$)){if(/[)}\]]/.test(n.session.getLine(A.row)[A.column]))return!0;var R=new E(b,A.row,A.column+1);if(!this.$matchTokenType(R.getCurrentToken()||"text",$))return!1}return L.stepForward(),L.getCurrentTokenRow()!==A.row||this.$matchTokenType(L.getCurrentToken()||"text",V)},R.$matchTokenType=function(n,b){return b.indexOf(n.type||n)>-1},R.recordAutoInsert=function(n,b,A){var R=n.getCursorPosition(),D=b.doc.getLine(R.row);this.isAutoInsertedClosing(R,D,L.autoInsertedLineEnd[0])||(L.autoInsertedBrackets=0),L.autoInsertedRow=R.row,L.autoInsertedLineEnd=A+D.substr(R.column),L.autoInsertedBrackets++},R.recordMaybeInsert=function(n,b,A){var R=n.getCursorPosition(),D=b.doc.getLine(R.row);this.isMaybeInsertedClosing(R,D)||(L.maybeInsertedBrackets=0),L.maybeInsertedRow=R.row,L.maybeInsertedLineStart=D.substr(0,R.column)+A,L.maybeInsertedLineEnd=D.substr(R.column),L.maybeInsertedBrackets++},R.isAutoInsertedClosing=function(n,b,A){return L.autoInsertedBrackets>0&&n.row===L.autoInsertedRow&&A===L.autoInsertedLineEnd[0]&&b.substr(n.column)===L.autoInsertedLineEnd},R.isMaybeInsertedClosing=function(n,b){return L.maybeInsertedBrackets>0&&n.row===L.maybeInsertedRow&&b.substr(n.column)===L.maybeInsertedLineEnd&&b.substr(0,n.column)==L.maybeInsertedLineStart},R.popAutoInsertedClosing=function(){L.autoInsertedLineEnd=L.autoInsertedLineEnd.substr(1),L.autoInsertedBrackets--},R.clearMaybeInsertedClosing=function(){L&&(L.maybeInsertedBrackets=0,L.maybeInsertedRow=-1)},D.inherits(R,B),b.CstyleBehaviour=R})),ace.define("ace/unicode",["require","exports","module"],(function(n,b,A){"use strict";for(var L=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],R=0,D=[],B=0;B2?L%X!=X-1:L%X==0})}else{if(!this.blockComment)return!1;var tt=this.blockComment.start,ot=this.blockComment.end,nt=new RegExp("^(\\s*)(?:"+$.escapeRegExp(tt)+")"),it=new RegExp("(?:"+$.escapeRegExp(ot)+")\\s*$"),comment=function(n,b){testRemove(n,b)||D&&!/\S/.test(n)||(R.insertInLine({row:b,column:n.length},ot),R.insertInLine({row:b,column:E},tt))},uncomment=function(n,b){var A;(A=n.match(it))&&R.removeInLine(b,n.length-A[0].length,n.length),(A=n.match(nt))&&R.removeInLine(b,A[1].length,A[0].length)},testRemove=function(n,A){if(nt.test(n))return!0;for(var L=b.getTokens(A),R=0;Rn.length&&(rt=n.length)})),E==1/0&&(E=rt,D=!1,B=!1),V&&E%X!=0&&(E=Math.floor(E/X)*X),iter(B?uncomment:comment)},this.toggleBlockComment=function(n,b,A,L){var R=this.blockComment;if(R){!R.start&&R[0]&&(R=R[0]);var D,B,E=(nt=new V(b,L.row,L.column)).getCurrentToken(),X=(b.selection,b.selection.toOrientedRange());if(E&&/comment/.test(E.type)){for(var $,Q;E&&/comment/.test(E.type);){if(-1!=(it=E.value.indexOf(R.start))){var tt=nt.getCurrentTokenRow(),ot=nt.getCurrentTokenColumn()+it;$=new K(tt,ot,tt,ot+R.start.length);break}E=nt.stepBackward()}var nt;for(E=(nt=new V(b,L.row,L.column)).getCurrentToken();E&&/comment/.test(E.type);){var it;if(-1!=(it=E.value.indexOf(R.end))){tt=nt.getCurrentTokenRow(),ot=nt.getCurrentTokenColumn()+it;Q=new K(tt,ot,tt,ot+R.end.length);break}E=nt.stepForward()}Q&&b.remove(Q),$&&(b.remove($),D=$.start.row,B=-R.start.length)}else B=R.start.length,D=A.start.row,b.insert(A.end,R.end),b.insert(A.start,R.start);X.start.row==D&&(X.start.column+=B),X.end.row==D&&(X.end.column+=B),b.selection.fromOrientedRange(X)}},this.getNextLineIndent=function(n,b,A){return this.$getIndent(b)},this.checkOutdent=function(n,b,A){return!1},this.autoOutdent=function(n,b,A){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){for(var b in this.$embeds=[],this.$modes={},n)if(n[b]){var A=n[b],L=A.prototype.$id,D=R.$modes[L];D||(R.$modes[L]=D=new A),R.$modes[b]||(R.$modes[b]=D),this.$embeds.push(b),this.$modes[b]=D}var B=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],_loop_1=function(n){var b,A,L;L=(b=E)[A=B[n]],b[B[n]]=function(){return this.$delegator(A,arguments,L)}},E=this;for(b=0;bthis.row)){var b=function $getTransformedPoint(n,b,A){var L="insert"==n.action,R=(L?1:-1)*(n.end.row-n.start.row),D=(L?1:-1)*(n.end.column-n.start.column),B=n.start,E=L?B:n.end;if($pointsInOrder(b,B,A))return{row:b.row,column:b.column};if($pointsInOrder(E,b,!A))return{row:b.row+R,column:b.column+(b.row==E.row?D:0)};return{row:B.row,column:B.column}}(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(b.row,b.column,!0)}},Anchor.prototype.setPosition=function(n,b,A){var L;if(L=A?{row:n,column:b}:this.$clipPositionToDocument(n,b),this.row!=L.row||this.column!=L.column){var R={row:this.row,column:this.column};this.row=L.row,this.column=L.column,this._signal("change",{old:R,value:L})}},Anchor.prototype.detach=function(){this.document.off("change",this.$onChange)},Anchor.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},Anchor.prototype.$clipPositionToDocument=function(n,b){var A={};return n>=this.document.getLength()?(A.row=Math.max(0,this.document.getLength()-1),A.column=this.document.getLine(A.row).length):n<0?(A.row=0,A.column=0):(A.row=n,A.column=Math.min(this.document.getLine(A.row).length,Math.max(0,b))),b<0&&(A.column=0),A},Anchor}();function $pointsInOrder(n,b,A){var L=A?n.column<=b.column:n.column=A&&(n=A-1,b=void 0);var L=this.getLine(n);return null==b&&(b=L.length),{row:n,column:b=Math.min(Math.max(b,0),L.length)}},Document.prototype.clonePos=function(n){return{row:n.row,column:n.column}},Document.prototype.pos=function(n,b){return{row:n,column:b}},Document.prototype.$clipPosition=function(n){var b=this.getLength();return n.row>=b?(n.row=Math.max(0,b-1),n.column=this.getLine(b-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},Document.prototype.insertFullLines=function(n,b){var A=0;(n=Math.min(Math.max(n,0),this.getLength()))0,L=b=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},Document.prototype.replace=function(n,b){return n instanceof B||(n=B.fromPoints(n.start,n.end)),0===b.length&&n.isEmpty()?n.start:b==this.getTextRange(n)?n.end:(this.remove(n),b?this.insert(n.start,b):n.start)},Document.prototype.applyDeltas=function(n){for(var b=0;b=0;b--)this.revertDelta(n[b])},Document.prototype.applyDelta=function(n,b){var A="insert"==n.action;(A?n.lines.length<=1&&!n.lines[0]:!B.comparePoints(n.start,n.end))||(A&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(R(this.$lines,n,b),this._signal("change",n)))},Document.prototype.$safeApplyDelta=function(n){var b=this.$lines.length;("remove"==n.action&&n.start.row20){A.running=setTimeout(A.$worker,20);break}}A.currentLine=b,-1==L&&(L=b),D<=L&&A.fireUpdateEvent(D,L)}}}return BackgroundTokenizer.prototype.setTokenizer=function(n){this.tokenizer=n,this.lines=[],this.states=[],this.start(0)},BackgroundTokenizer.prototype.setDocument=function(n){this.doc=n,this.lines=[],this.states=[],this.stop()},BackgroundTokenizer.prototype.fireUpdateEvent=function(n,b){var A={first:n,last:b};this._signal("update",{data:A})},BackgroundTokenizer.prototype.start=function(n){this.currentLine=Math.min(n||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},BackgroundTokenizer.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},BackgroundTokenizer.prototype.$updateOnChange=function(n){var b=n.start.row,A=n.end.row-b;if(0===A)this.lines[b]=null;else if("remove"==n.action)this.lines.splice(b,A+1,null),this.states.splice(b,A+1,null);else{var L=Array(A+1);L.unshift(b,1),this.lines.splice.apply(this.lines,L),this.states.splice.apply(this.states,L)}this.currentLine=Math.min(b,this.currentLine,this.doc.getLength()),this.stop()},BackgroundTokenizer.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},BackgroundTokenizer.prototype.getTokens=function(n){return this.lines[n]||this.$tokenizeRow(n)},BackgroundTokenizer.prototype.getState=function(n){return this.currentLine==n&&this.$tokenizeRow(n),this.states[n]||"start"},BackgroundTokenizer.prototype.$tokenizeRow=function(n){var b=this.doc.getLine(n),A=this.states[n-1],L=this.tokenizer.getLineTokens(b,A,n);return this.states[n]+""!=L.state+""?(this.states[n]=L.state,this.lines[n+1]=null,this.currentLine>n+1&&(this.currentLine=n+1)):this.currentLine==n&&(this.currentLine=n+1),this.lines[n]=L.tokens},BackgroundTokenizer.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},BackgroundTokenizer}();L.implement(D.prototype,R),b.BackgroundTokenizer=D})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/lang"),R=n("./range").Range,D=function(){function SearchHighlight(n,b,A){void 0===A&&(A="text"),this.setRegexp(n),this.clazz=b,this.type=A}return SearchHighlight.prototype.setRegexp=function(n){this.regExp+""!=n+""&&(this.regExp=n,this.cache=[])},SearchHighlight.prototype.update=function(n,b,A,D){if(this.regExp)for(var B=D.firstRow,E=D.lastRow,X={},$=B;$<=E;$++){var V=this.cache[$];null==V&&((V=L.getMatchOffsets(A.getLine($),this.regExp)).length>this.MAX_RANGES&&(V=V.slice(0,this.MAX_RANGES)),V=V.map((function(n){return new R($,n.offset,$,n.offset+n.length)})),this.cache[$]=V.length?V:"");for(var K=V.length;K--;){var Q=V[K].toScreenRange(A),tt=Q.toString();X[tt]||(X[tt]=!0,b.drawSingleLineMarker(n,Q,this.clazz,D))}}},SearchHighlight}();D.prototype.MAX_RANGES=500,b.SearchHighlight=D})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(n,b,A){"use strict";var L=function(){function UndoManager(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return UndoManager.prototype.addSession=function(n){this.$session=n},UndoManager.prototype.add=function(n,b,A){if(!this.$fromUndo&&n!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===b||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),n.id=this.$rev=++this.$maxRev}"remove"!=n.action&&"insert"!=n.action||(this.$lastDelta=n),this.lastDeltas.push(n)}},UndoManager.prototype.addSelection=function(n,b){this.selections.push({value:n,rev:b||this.$rev})},UndoManager.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},UndoManager.prototype.markIgnored=function(n,b){null==b&&(b=this.$rev+1);for(var A=this.$undoStack,L=A.length;L--;){var R=A[L][0];if(R.id<=n)break;R.id0},UndoManager.prototype.canRedo=function(){return this.$redoStack.length>0},UndoManager.prototype.bookmark=function(n){null==n&&(n=this.$rev),this.mark=n},UndoManager.prototype.isAtBookmark=function(){return this.$rev===this.mark},UndoManager.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},UndoManager.prototype.fromJSON=function(n){this.reset(),this.$undoStack=n.$undoStack,this.$redoStack=n.$redoStack},UndoManager.prototype.$prettyPrint=function(n){return n?stringifyDelta(n):stringifyDelta(this.$undoStack)+"\n---\n"+stringifyDelta(this.$redoStack)},UndoManager}();L.prototype.hasUndo=L.prototype.canUndo,L.prototype.hasRedo=L.prototype.canRedo,L.prototype.isClean=L.prototype.isAtBookmark,L.prototype.markClean=L.prototype.bookmark;var R=n("./range").Range,D=R.comparePoints;R.comparePoints;function clonePos(n){return{row:n.row,column:n.column}}function stringifyDelta(n){if(n=n||this,Array.isArray(n))return n.map(stringifyDelta).join("\n");var b="";return n.action?(b="insert"==n.action?"+":"-",b+="["+n.lines+"]"):n.value&&(b=Array.isArray(n.value)?n.value.map(stringifyRange).join("\n"):stringifyRange(n.value)),n.start&&(b+=stringifyRange(n)),(n.id||n.rev)&&(b+="\t("+(n.id||n.rev)+")"),b}function stringifyRange(n){return n.start.row+":"+n.start.column+"=>"+n.end.row+":"+n.end.column}function swap(n,b){var A="insert"==n.action,L="insert"==b.action;if(A&&L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{if(!(D(b.start,n.start)<=0))return null;shift(n,b,1)}else if(A&&!L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{if(!(D(b.end,n.start)<=0))return null;shift(n,b,-1)}else if(!A&&L)if(D(b.start,n.start)>=0)shift(b,n,1);else{if(!(D(b.start,n.start)<=0))return null;shift(n,b,1)}else if(!A&&!L)if(D(b.start,n.start)>=0)shift(b,n,1);else{if(!(D(b.end,n.start)<=0))return null;shift(n,b,-1)}return[b,n]}function swapGroups(n,b){for(var A=n.length;A--;)for(var L=0;L=0?shift(n,b,-1):(D(n.start,b.start)<=0||shift(n,R.fromPoints(b.start,n.start),-1),shift(b,n,1));else if(!A&&L)D(b.start,n.end)>=0?shift(b,n,-1):(D(b.start,n.start)<=0||shift(b,R.fromPoints(n.start,b.start),-1),shift(n,b,1));else if(!A&&!L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{var B,E;if(!(D(b.end,n.start)<=0))return D(n.start,b.start)<0&&(B=n,n=splitDelta(n,b.start)),D(n.end,b.end)>0&&(E=splitDelta(n,b.end)),shiftPos(b.end,n.start,n.end,-1),E&&!B&&(n.lines=E.lines,n.start=E.start,n.end=E.end,E=n),[b,B,E].filter(Boolean);shift(n,b,-1)}return[b,n]}function shift(n,b,A){shiftPos(n.start,b.start,b.end,A),shiftPos(n.end,b.start,b.end,A)}function shiftPos(n,b,A,L){n.row==(1==L?b:A).row&&(n.column+=L*(A.column-b.column)),n.row+=L*(A.row-b.row)}function splitDelta(n,b){var A=n.lines,L=n.end;n.end=clonePos(b);var R=n.end.row-n.start.row,D=A.splice(R,A.length),B=R?b.column:b.column-n.start.column;return A.push(D[0].substring(0,B)),D[0]=D[0].substr(B),{start:clonePos(b),end:L,lines:D,action:n.action}}function moveDeltasByOne(n,b){b=function cloneDelta(n){return{start:clonePos(n.start),end:clonePos(n.end),action:n.action,lines:n.lines.slice()}}(b);for(var A=n.length;A--;){for(var L=n[A],R=0;Rthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(n),this.folds.sort((function(n,b){return-n.range.compareEnd(b.start.row,b.start.column)})),this.range.compareEnd(n.start.row,n.start.column)>0?(this.end.row=n.end.row,this.end.column=n.end.column):this.range.compareStart(n.end.row,n.end.column)<0&&(this.start.row=n.start.row,this.start.column=n.start.column)}else if(n.start.row==this.end.row)this.folds.push(n),this.end.row=n.end.row,this.end.column=n.end.column;else{if(n.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(n),this.start.row=n.start.row,this.start.column=n.start.column}n.foldLine=this},FoldLine.prototype.containsRow=function(n){return n>=this.start.row&&n<=this.end.row},FoldLine.prototype.walk=function(n,b,A){var L,R,D=0,B=this.folds,E=!0;null==b&&(b=this.end.row,A=this.end.column);for(var X=0;X0)){var X=L(n,B.start);return 0===E?b&&0!==X?-D-2:D:X>0||0===X&&!b?D:-D-1}}return-D-1},RangeList.prototype.add=function(n){var b=!n.isEmpty(),A=this.pointIndex(n.start,b);A<0&&(A=-A-1);var L=this.pointIndex(n.end,b,A);return L<0?L=-L-1:L++,this.ranges.splice(A,L-A,n)},RangeList.prototype.addList=function(n){for(var b=[],A=n.length;A--;)b.push.apply(b,this.add(n[A]));return b},RangeList.prototype.substractPoint=function(n){var b=this.pointIndex(n);if(b>=0)return this.ranges.splice(b,1)},RangeList.prototype.merge=function(){for(var n,b=[],A=this.ranges,R=(A=A.sort((function(n,b){return L(n.start,b.start)})))[0],D=1;D=0},RangeList.prototype.containsPoint=function(n){return this.pointIndex(n)>=0},RangeList.prototype.rangeAtPoint=function(n){var b=this.pointIndex(n);if(b>=0)return this.ranges[b]},RangeList.prototype.clipRows=function(n,b){var A=this.ranges;if(A[0].start.row>b||A[A.length-1].start.row=L)break}if("insert"==n.action)for(var X=R-L,$=-b.column+A.column;BL)break;if(V.start.row==L&&V.start.column>=b.column&&(V.start.column==b.column&&this.$bias<=0||(V.start.column+=$,V.start.row+=X)),V.end.row==L&&V.end.column>=b.column){if(V.end.column==b.column&&this.$bias<0)continue;V.end.column==b.column&&$>0&&BV.start.column&&V.end.column==D[B+1].start.column&&(V.end.column-=$),V.end.column+=$,V.end.row+=X}}else for(X=L-R,$=b.column-A.column;BR)break;V.end.rowb.column)&&(V.end.column=b.column,V.end.row=b.row):(V.end.column+=$,V.end.row+=X):V.end.row>R&&(V.end.row+=X),V.start.rowb.column)&&(V.start.column=b.column,V.start.row=b.row):(V.start.column+=$,V.start.row+=X):V.start.row>R&&(V.start.row+=X)}if(0!=X&&B=n)return R;if(R.end.row>n)return null}return null},this.getNextFoldLine=function(n,b){var A=this.$foldData,L=0;for(b&&(L=A.indexOf(b)),-1==L&&(L=0);L=n)return R}return null},this.getFoldedRowCount=function(n,b){for(var A=this.$foldData,L=b-n+1,R=0;R=b){E=n?L-=b-E:L=0);break}B>=n&&(L-=E>=n?B-E:B-n+1)}return L},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort((function(n,b){return n.start.row-b.start.row})),n},this.addFold=function(n,b){var A,L=this.$foldData,B=!1;n instanceof D?A=n:(A=new D(b,n)).collapseChildren=b.collapseChildren,this.$clipRangeToDocument(A.range);var E=A.start.row,X=A.start.column,$=A.end.row,V=A.end.column,K=this.getFoldAt(E,X,1),Q=this.getFoldAt($,V,-1);if(K&&Q==K)return K.addSubFold(A);K&&!K.range.isStart(E,X)&&this.removeFold(K),Q&&!Q.range.isEnd($,V)&&this.removeFold(Q);var tt=this.getFoldsInRange(A.range);tt.length>0&&(this.removeFolds(tt),A.collapseChildren||tt.forEach((function(n){A.addSubFold(n)})));for(var ot=0;ot0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach((function(n){this.expandFold(n)}),this)},this.unfold=function(n,b){var A,R;if(null==n)A=new L(0,0,this.getLength(),0),null==b&&(b=!0);else if("number"==typeof n)A=new L(n,0,n,this.getLine(n).length);else if("row"in n)A=L.fromPoints(n,n);else{if(Array.isArray(n))return R=[],n.forEach((function(n){R=R.concat(this.unfold(n))}),this),R;A=n}for(var D=R=this.getFoldsInRangeList(A);1==R.length&&L.comparePoints(R[0].start,A.start)<0&&L.comparePoints(R[0].end,A.end)>0;)this.expandFolds(R),R=this.getFoldsInRangeList(A);if(0!=b?this.removeFolds(R):this.expandFolds(R),D.length)return D},this.isRowFolded=function(n,b){return!!this.getFoldLine(n,b)},this.getRowFoldEnd=function(n,b){var A=this.getFoldLine(n,b);return A?A.end.row:n},this.getRowFoldStart=function(n,b){var A=this.getFoldLine(n,b);return A?A.start.row:n},this.getFoldDisplayLine=function(n,b,A,L,R){null==L&&(L=n.start.row),null==R&&(R=0),null==b&&(b=n.end.row),null==A&&(A=this.getLine(b).length);var D=this.doc,B="";return n.walk((function(n,b,A,E){if(!(bK)break}while(D&&X.test(D.type));D=R.stepBackward()}else D=R.getCurrentToken();return $.end.row=R.getCurrentTokenRow(),$.end.column=R.getCurrentTokenColumn(),$}},this.foldAll=function(n,b,A,L){null==A&&(A=1e5);var R=this.foldWidgets;if(R){b=b||this.getLength();for(var D=n=n||0;D=n&&(D=B.end.row,B.collapseChildren=A,this.addFold("...",B))}}},this.foldToLevel=function(n){for(this.foldAll();n-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,(function(b){for(var A=n.getTokens(b),L=0;L=0;){var D=A[R];if(null==D&&(D=A[R]=this.getFoldWidget(R)),"start"==D){var B=this.getFoldWidgetRange(R);if(L||(L=B),B&&B.end.row>=n)break}R--}return{range:-1!==R&&B,firstRange:L}},this.onFoldWidgetClick=function(n,b){b instanceof E&&(b=b.domEvent);var A={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey};if(!this.$toggleFoldWidget(n,A)){var L=b.target||b.srcElement;L&&/ace_fold-widget/.test(L.className)&&(L.className+=" ace_invalid")}},this.$toggleFoldWidget=function(n,b){if(this.getFoldWidget){var A=this.getFoldWidget(n),L=this.getLine(n),R="end"===A?-1:1,D=this.getFoldAt(n,-1===R?0:L.length,R);if(D)return b.children||b.all?this.removeFold(D):this.expandFold(D),D;var B=this.getFoldWidgetRange(n,!0);if(B&&!B.isMultiLine()&&(D=this.getFoldAt(B.start.row,B.start.column,1))&&B.isEqual(D.range))return this.removeFold(D),D;if(b.siblings){var E=this.getParentFoldRangeData(n);if(E.range)var X=E.range.start.row+1,$=E.range.end.row;this.foldAll(X,$,b.all?1e4:0)}else b.children?($=B?B.end.row:this.getLength(),this.foldAll(n+1,$,b.all?1e4:0)):B&&(b.all&&(B.collapseChildren=1e4),this.addFold("...",B));return B}},this.toggleFoldWidget=function(n){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var A=this.$toggleFoldWidget(b,{});if(!A){var L=this.getParentFoldRangeData(b,!0);if(A=L.range||L.firstRange){b=A.start.row;var R=this.getFoldAt(b,this.getLine(b).length,1);R?this.removeFold(R):this.addFold("...",A)}}},this.updateFoldWidgets=function(n){var b=n.start.row,A=n.end.row-b;if(0===A)this.foldWidgets[b]=null;else if("remove"==n.action)this.foldWidgets.splice(b,A+1,null);else{var L=Array(A+1);L.unshift(b,1),this.foldWidgets.splice.apply(this.foldWidgets,L)}},this.tokenizerUpdateFoldWidgets=function(n){var b=n.data;b.first!=b.last&&this.foldWidgets.length>b.first&&this.foldWidgets.splice(b.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(n,b,A){"use strict";var L=n("../token_iterator").TokenIterator,R=n("../range").Range;b.BracketMatch=function BracketMatch(){this.findMatchingBracket=function(n,b){if(0==n.column)return null;var A=b||this.getLine(n.row).charAt(n.column-1);if(""==A)return null;var L=A.match(/([\(\[\{])|([\)\]\}])/);return L?L[1]?this.$findClosingBracket(L[1],n):this.$findOpeningBracket(L[2],n):null},this.getBracketRange=function(n){var b,A=this.getLine(n.row),L=!0,D=A.charAt(n.column-1),B=D&&D.match(/([\(\[\{])|([\)\]\}])/);if(B||(D=A.charAt(n.column),n={row:n.row,column:n.column+1},B=D&&D.match(/([\(\[\{])|([\)\]\}])/),L=!1),!B)return null;if(B[1]){if(!(E=this.$findClosingBracket(B[1],n)))return null;b=R.fromPoints(n,E),L||(b.end.column++,b.start.column--),b.cursor=b.end}else{var E;if(!(E=this.$findOpeningBracket(B[2],n)))return null;b=R.fromPoints(E,n),L||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.getMatchingBracketRanges=function(n,b){var A=this.getLine(n.row),L=/([\(\[\{])|([\)\]\}])/,D=!b&&A.charAt(n.column-1),B=D&&D.match(L);if(B||(D=(void 0===b||b)&&A.charAt(n.column),n={row:n.row,column:n.column+1},B=D&&D.match(L)),!B)return null;var E=new R(n.row,n.column-1,n.row,n.column),X=B[1]?this.$findClosingBracket(B[1],n):this.$findOpeningBracket(B[2],n);return X?[E,new R(X.row,X.column,X.row,X.column+1)]:[E]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(n,b,A){var R=this.$brackets[n],D=1,B=new L(this,b.row,b.column),E=B.getCurrentToken();if(E||(E=B.stepForward()),E){A||(A=new RegExp("(\\.?"+E.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var X=b.column-B.getCurrentTokenColumn()-2,$=E.value;;){for(;X>=0;){var V=$.charAt(X);if(V==R){if(0==(D-=1))return{row:B.getCurrentTokenRow(),column:X+B.getCurrentTokenColumn()}}else V==n&&(D+=1);X-=1}do{E=B.stepBackward()}while(E&&!A.test(E.type));if(null==E)break;X=($=E.value).length-1}return null}},this.$findClosingBracket=function(n,b,A){var R=this.$brackets[n],D=1,B=new L(this,b.row,b.column),E=B.getCurrentToken();if(E||(E=B.stepForward()),E){A||(A=new RegExp("(\\.?"+E.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var X=b.column-B.getCurrentTokenColumn();;){for(var $=E.value,V=$.length;X"===b.value?L=!0:-1!==b.type.indexOf("tag-name")&&(A=!0))}while(b&&!A);return b},this.$findClosingTag=function(n,b){var A,L=b.value,D=b.value,B=0,E=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);b=n.stepForward();var X=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+b.value.length),$=!1;do{if(-1!==(A=b).type.indexOf("tag-close")&&!$){var V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);$=!0}if(b=n.stepForward()){if(">"===b.value&&!$){V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);$=!0}if(-1!==b.type.indexOf("tag-name")){if(D===(L=b.value))if("<"===A.value)B++;else if(""!==b.value)return;var tt=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1)}}else if(D===L&&"/>"===b.value&&--B<0)tt=Q=K=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+2),V=new R(X.end.row,X.end.column,X.end.row,X.end.column+1)}}while(b&&B>=0);if(E&&V&&K&&tt&&X&&Q)return{openTag:new R(E.start.row,E.start.column,V.end.row,V.end.column),closeTag:new R(K.start.row,K.start.column,tt.end.row,tt.end.column),openTagName:X,closeTagName:Q}},this.$findOpeningTag=function(n,b){var A=n.getCurrentToken(),L=b.value,D=0,B=n.getCurrentTokenRow(),E=n.getCurrentTokenColumn(),X=E+2,$=new R(B,E,B,X);n.stepForward();var V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+b.value.length);if(-1===b.type.indexOf("tag-close")&&(b=n.stepForward()),b&&">"===b.value){var K=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);n.stepBackward(),n.stepBackward();do{if(b=A,B=n.getCurrentTokenRow(),X=(E=n.getCurrentTokenColumn())+b.value.length,A=n.stepBackward(),b)if(-1!==b.type.indexOf("tag-name")){if(L===b.value)if("<"===A.value){if(++D>0){var Q=new R(B,E,B,X),tt=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);do{b=n.stepForward()}while(b&&">"!==b.value);var ot=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1)}}else""===b.value){for(var nt=0,it=A;it;){if(-1!==it.type.indexOf("tag-name")&&it.value===L){D--;break}if("<"===it.value)break;it=n.stepBackward(),nt++}for(var rt=0;rtA&&(this.$docRowCache.splice(A,b),this.$screenRowCache.splice(A,b))},EditSession.prototype.$getRowCacheIndex=function(n,b){for(var A=0,L=n.length-1;A<=L;){var R=A+L>>1,D=n[R];if(b>D)A=R+1;else{if(!(b=b);D++);return(A=L[D])?(A.index=D,A.start=R-A.value.length,A):null},EditSession.prototype.setUndoManager=function(n){if(this.$undoManager=n,this.$informUndoManager&&this.$informUndoManager.cancel(),n){var b=this;n.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1},this.$informUndoManager=R.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},EditSession.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},EditSession.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},EditSession.prototype.getTabString=function(){return this.getUseSoftTabs()?R.stringRepeat(" ",this.getTabSize()):"\t"},EditSession.prototype.setUseSoftTabs=function(n){this.setOption("useSoftTabs",n)},EditSession.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},EditSession.prototype.setTabSize=function(n){this.setOption("tabSize",n)},EditSession.prototype.getTabSize=function(){return this.$tabSize},EditSession.prototype.isTabStop=function(n){return this.$useSoftTabs&&n.column%this.$tabSize==0},EditSession.prototype.setNavigateWithinSoftTabs=function(n){this.setOption("navigateWithinSoftTabs",n)},EditSession.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},EditSession.prototype.setOverwrite=function(n){this.setOption("overwrite",n)},EditSession.prototype.getOverwrite=function(){return this.$overwrite},EditSession.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},EditSession.prototype.addGutterDecoration=function(n,b){this.$decorations[n]||(this.$decorations[n]=""),this.$decorations[n]+=" "+b,this._signal("changeBreakpoint",{})},EditSession.prototype.removeGutterDecoration=function(n,b){this.$decorations[n]=(this.$decorations[n]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},EditSession.prototype.getBreakpoints=function(){return this.$breakpoints},EditSession.prototype.setBreakpoints=function(n){this.$breakpoints=[];for(var b=0;b0&&(L=!!A.charAt(b-1).match(this.tokenRe)),L||(L=!!A.charAt(b).match(this.tokenRe)),L)var R=this.tokenRe;else if(/^\s+$/.test(A.slice(b-1,b+1)))R=/\s/;else R=this.nonTokenRe;var D=b;if(D>0){do{D--}while(D>=0&&A.charAt(D).match(R));D++}for(var B=b;Bn&&(n=b.screenWidth)})),this.lineWidgetWidth=n},EditSession.prototype.$computeWidth=function(n){if(this.$modified||n){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),A=this.$rowLengthCache,L=0,R=0,D=this.$foldData[R],B=D?D.start.row:1/0,E=b.length,X=0;XB){if((X=D.end.row+1)>=E)break;B=(D=this.$foldData[R++])?D.start.row:1/0}null==A[X]&&(A[X]=this.$getStringScreenWidth(b[X])[0]),A[X]>L&&(L=A[X])}this.screenWidth=L}},EditSession.prototype.getLine=function(n){return this.doc.getLine(n)},EditSession.prototype.getLines=function(n,b){return this.doc.getLines(n,b)},EditSession.prototype.getLength=function(){return this.doc.getLength()},EditSession.prototype.getTextRange=function(n){return this.doc.getTextRange(n||this.selection.getRange())},EditSession.prototype.insert=function(n,b){return this.doc.insert(n,b)},EditSession.prototype.remove=function(n){return this.doc.remove(n)},EditSession.prototype.removeFullLines=function(n,b){return this.doc.removeFullLines(n,b)},EditSession.prototype.undoChanges=function(n,b){if(n.length){this.$fromUndo=!0;for(var A=n.length-1;-1!=A;A--){var L=n[A];"insert"==L.action||"remove"==L.action?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!b&&this.$undoSelect&&(n.selectionBefore?this.selection.fromJSON(n.selectionBefore):this.selection.setRange(this.$getUndoSelection(n,!0))),this.$fromUndo=!1}},EditSession.prototype.redoChanges=function(n,b){if(n.length){this.$fromUndo=!0;for(var A=0;An.end.column&&(D.start.column+=$),D.end.row==n.end.row&&D.end.column>n.end.column&&(D.end.column+=$)),B&&D.start.row>=n.end.row&&(D.start.row+=B,D.end.row+=B)}if(D.end=this.insert(D.start,L),R.length){var E=n.start,X=D.start,$=(B=X.row-E.row,X.column-E.column);this.addFolds(R.map((function(n){return(n=n.clone()).start.row==E.row&&(n.start.column+=$),n.end.row==E.row&&(n.end.column+=$),n.start.row+=B,n.end.row+=B,n})))}return D},EditSession.prototype.indentRows=function(n,b,A){A=A.replace(/\t/g,this.getTabString());for(var L=n;L<=b;L++)this.doc.insertInLine({row:L,column:0},A)},EditSession.prototype.outdentRows=function(n){for(var b=n.collapseRows(),A=new V(0,0,0,0),L=this.getTabSize(),R=b.start.row;R<=b.end.row;++R){var D=this.getLine(R);A.start.row=R,A.end.row=R;for(var B=0;B0){var R;if((R=this.getRowFoldEnd(b+A))>this.doc.getLength()-1)return 0;L=R-b}else{n=this.$clipRowToDocument(n);L=(b=this.$clipRowToDocument(b))-n+1}var D=new V(n,0,b,Number.MAX_VALUE),B=this.getFoldsInRange(D).map((function(n){return(n=n.clone()).start.row+=L,n.end.row+=L,n})),E=0==A?this.doc.getLines(n,b):this.doc.removeFullLines(n,b);return this.doc.insertFullLines(n+L,E),B.length&&this.addFolds(B),L},EditSession.prototype.moveLinesUp=function(n,b){return this.$moveLines(n,b,-1)},EditSession.prototype.moveLinesDown=function(n,b){return this.$moveLines(n,b,1)},EditSession.prototype.duplicateLines=function(n,b){return this.$moveLines(n,b,0)},EditSession.prototype.$clipRowToDocument=function(n){return Math.max(0,Math.min(n,this.doc.getLength()-1))},EditSession.prototype.$clipColumnToRow=function(n,b){return b<0?0:Math.min(this.doc.getLine(n).length,b)},EditSession.prototype.$clipPositionToDocument=function(n,b){if(b=Math.max(0,b),n<0)n=0,b=0;else{var A=this.doc.getLength();n>=A?(n=A-1,b=this.doc.getLine(A-1).length):b=Math.min(this.doc.getLine(n).length,b)}return{row:n,column:b}},EditSession.prototype.$clipRangeToDocument=function(n){n.start.row<0?(n.start.row=0,n.start.column=0):n.start.column=this.$clipColumnToRow(n.start.row,n.start.column);var b=this.doc.getLength()-1;return n.end.row>b?(n.end.row=b,n.end.column=this.doc.getLine(b).length):n.end.column=this.$clipColumnToRow(n.end.row,n.end.column),n},EditSession.prototype.setUseWrapMode=function(n){if(n!=this.$useWrapMode){if(this.$useWrapMode=n,this.$modified=!0,this.$resetRowCache(0),n){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},EditSession.prototype.getUseWrapMode=function(){return this.$useWrapMode},EditSession.prototype.setWrapLimitRange=function(n,b){this.$wrapLimitRange.min===n&&this.$wrapLimitRange.max===b||(this.$wrapLimitRange={min:n,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},EditSession.prototype.adjustWrapLimit=function(n,b){var A=this.$wrapLimitRange;A.max<0&&(A={min:b,max:b});var L=this.$constrainWrapLimit(n,A.min,A.max);return L!=this.$wrapLimit&&L>1&&(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},EditSession.prototype.$constrainWrapLimit=function(n,b,A){return b&&(n=Math.max(b,n)),A&&(n=Math.min(A,n)),n},EditSession.prototype.getWrapLimit=function(){return this.$wrapLimit},EditSession.prototype.setWrapLimit=function(n){this.setWrapLimitRange(n,n)},EditSession.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},EditSession.prototype.$updateInternalDataOnChange=function(n){var b=this.$useWrapMode,A=n.action,L=n.start,R=n.end,D=L.row,B=R.row,E=B-D,X=null;if(this.$updating=!0,0!=E)if("remove"===A){this[b?"$wrapData":"$rowLengthCache"].splice(D,E);var $=this.$foldData;X=this.getFoldsInRange(n),this.removeFolds(X);var V=0;if(nt=this.getFoldLine(R.row)){nt.addRemoveChars(R.row,R.column,L.column-R.column),nt.shiftRow(-E);var K=this.getFoldLine(D);K&&K!==nt&&(K.merge(nt),nt=K),V=$.indexOf(nt)+1}for(;V<$.length;V++){(nt=$[V]).start.row>=R.row&&nt.shiftRow(-E)}B=D}else{var Q=Array(E);Q.unshift(D,0);var tt=b?this.$wrapData:this.$rowLengthCache;tt.splice.apply(tt,Q);$=this.$foldData,V=0;if(nt=this.getFoldLine(D)){var ot=nt.range.compareInside(L.row,L.column);0==ot?(nt=nt.split(L.row,L.column))&&(nt.shiftRow(E),nt.addRemoveChars(B,0,R.column-L.column)):-1==ot&&(nt.addRemoveChars(D,0,R.column-L.column),nt.shiftRow(E)),V=$.indexOf(nt)+1}for(;V<$.length;V++){var nt;(nt=$[V]).start.row>=D&&nt.shiftRow(E)}}else E=Math.abs(n.start.column-n.end.column),"remove"===A&&(X=this.getFoldsInRange(n),this.removeFolds(X),E=-E),(nt=this.getFoldLine(D))&&nt.addRemoveChars(D,L.column,E);return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(D,B):this.$updateRowLengthCache(D,B),X},EditSession.prototype.$updateRowLengthCache=function(n,b){this.$rowLengthCache[n]=null,this.$rowLengthCache[b]=null},EditSession.prototype.$updateWrapData=function(n,b){var A,L,R=this.doc.getAllLines(),D=this.getTabSize(),B=this.$wrapData,E=this.$wrapLimit,X=n;for(b=Math.min(b,R.length-1);X<=b;)(L=this.getFoldLine(X,L))?(A=[],L.walk(function(n,b,L,D){var B;if(null!=n){(B=this.$getDisplayTokens(n,A.length))[0]=st;for(var E=1;Eb-V;){var K=D+b-V;if(n[K-1]>=ut&&n[K]>=ut)addSplit(K);else if(n[K]!=st&&n[K]!=pt){for(var Q=Math.max(K-(b-(b>>2)),D-1);K>Q&&n[K]Q&&n[K]Q&&n[K]==lt;)K--}else for(;K>Q&&n[K]Q?addSplit(++K):(n[K=D+b]==rt&&K--,addSplit(K-V))}else{for(;K!=D-1&&n[K]!=st;K--);if(K>D){addSplit(K);continue}for(K=D+b;K39&&D<48||D>57&&D<64?L.push(lt):D>=4352&&isFullWidth(D)?L.push(it,rt):L.push(it)}return L},EditSession.prototype.$getStringScreenWidth=function(n,b,A){if(0==b)return[0,0];var L,R;for(null==b&&(b=1/0),A=A||0,R=0;R=4352&&isFullWidth(L)?A+=2:A+=1,!(A>b));R++);return[A,R]},EditSession.prototype.getRowLength=function(n){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[n]&&this.lineWidgets[n].rowCount||0),this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+b:b},EditSession.prototype.getRowLineCount=function(n){return this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+1:1},EditSession.prototype.getRowWrapIndent=function(n){if(this.$useWrapMode){var b=this.screenToDocumentPosition(n,Number.MAX_VALUE),A=this.$wrapData[b.row];return A.length&&A[0]=0){E=$[V],D=this.$docRowCache[V];var Q=n>$[K-1]}else Q=!K;for(var tt=this.getLength()-1,ot=this.getNextFoldLine(D),nt=ot?ot.start.row:1/0;E<=n&&!(E+(X=this.getRowLength(D))>n||D>=tt);)E+=X,++D>nt&&(D=ot.end.row+1,nt=(ot=this.getNextFoldLine(D,ot))?ot.start.row:1/0),Q&&(this.$docRowCache.push(D),this.$screenRowCache.push(E));if(ot&&ot.start.row<=D)L=this.getFoldDisplayLine(ot),D=ot.start.row;else{if(E+X<=n||D>tt)return{row:tt,column:this.getLine(tt).length};L=this.getLine(D),ot=null}var it=0,rt=Math.floor(n-E);if(this.$useWrapMode){var st=this.$wrapData[D];st&&(R=st[rt],rt>0&&st.length&&(it=st.indent,B=st[rt-1]||st[st.length-1],L=L.substring(B)))}return void 0!==A&&this.$bidiHandler.isBidiRow(E+rt,D,rt)&&(b=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(L,b-it)[1],this.$useWrapMode&&B>=R&&(B=R-1),ot?ot.idxToPosition(B):{row:D,column:B}},EditSession.prototype.documentToScreenPosition=function(n,b){if(void 0===b)var A=this.$clipPositionToDocument(n.row,n.column);else A=this.$clipPositionToDocument(n,b);n=A.row,b=A.column;var L,R=0,D=null;(L=this.getFoldAt(n,b,1))&&(n=L.start.row,b=L.start.column);var B,E=0,X=this.$docRowCache,$=this.$getRowCacheIndex(X,n),V=X.length;if(V&&$>=0){E=X[$],R=this.$screenRowCache[$];var K=n>X[V-1]}else K=!V;for(var Q=this.getNextFoldLine(E),tt=Q?Q.start.row:1/0;E=tt){if((B=Q.end.row+1)>n)break;tt=(Q=this.getNextFoldLine(B,Q))?Q.start.row:1/0}else B=E+1;R+=this.getRowLength(E),E=B,K&&(this.$docRowCache.push(E),this.$screenRowCache.push(R))}var ot="";Q&&E>=tt?(ot=this.getFoldDisplayLine(Q,n,b),D=Q.start.row):(ot=this.getLine(n).substring(0,b),D=n);var nt=0;if(this.$useWrapMode){var it=this.$wrapData[D];if(it){for(var rt=0;ot.length>=it[rt];)R++,rt++;ot=ot.substring(it[rt-1]||0,ot.length),nt=rt>0?it.indent:0}}return this.lineWidgets&&this.lineWidgets[E]&&this.lineWidgets[E].rowsAbove&&(R+=this.lineWidgets[E].rowsAbove),{row:R,column:nt+this.$getStringScreenWidth(ot)[0]}},EditSession.prototype.documentToScreenColumn=function(n,b){return this.documentToScreenPosition(n,b).column},EditSession.prototype.documentToScreenRow=function(n,b){return this.documentToScreenPosition(n,b).row},EditSession.prototype.getScreenLength=function(){var n=0,b=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,L=0,R=(E=0,(b=this.$foldData[E++])?b.start.row:1/0);LR&&(L=b.end.row+1,R=(b=this.$foldData[E++])?b.start.row:1/0)}else{n=this.getLength();for(var B=this.$foldData,E=0;EA);D++);return[L,D]})},EditSession.prototype.getPrecedingCharacter=function(){var n=this.selection.getCursor();return 0===n.column?0===n.row?"":this.doc.getNewLineCharacter():this.getLine(n.row)[n.column-1]},EditSession.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},EditSession}();nt.$uid=0,nt.prototype.$modes=B.$modes,nt.prototype.getValue=nt.prototype.toString,nt.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},nt.prototype.$overwrite=!1,nt.prototype.$mode=null,nt.prototype.$modeId=null,nt.prototype.$scrollTop=0,nt.prototype.$scrollLeft=0,nt.prototype.$wrapLimit=80,nt.prototype.$useWrapMode=!1,nt.prototype.$wrapLimitRange={min:null,max:null},nt.prototype.lineWidgets=null,nt.prototype.isFullWidth=isFullWidth,L.implement(nt.prototype,E);var it=1,rt=2,st=3,pt=4,lt=9,ut=10,bt=11,Mt=12;function isFullWidth(n){return!(n<4352)&&(n>=4352&&n<=4447||n>=4515&&n<=4519||n>=4602&&n<=4607||n>=9001&&n<=9002||n>=11904&&n<=11929||n>=11931&&n<=12019||n>=12032&&n<=12245||n>=12272&&n<=12283||n>=12288&&n<=12350||n>=12353&&n<=12438||n>=12441&&n<=12543||n>=12549&&n<=12589||n>=12593&&n<=12686||n>=12688&&n<=12730||n>=12736&&n<=12771||n>=12784&&n<=12830||n>=12832&&n<=12871||n>=12880&&n<=13054||n>=13056&&n<=19903||n>=19968&&n<=42124||n>=42128&&n<=42182||n>=43360&&n<=43388||n>=44032&&n<=55203||n>=55216&&n<=55238||n>=55243&&n<=55291||n>=63744&&n<=64255||n>=65040&&n<=65049||n>=65072&&n<=65106||n>=65108&&n<=65126||n>=65128&&n<=65131||n>=65281&&n<=65376||n>=65504&&n<=65510)}n("./edit_session/folding").Folding.call(nt.prototype),n("./edit_session/bracket_match").BracketMatch.call(nt.prototype),B.defineOptions(nt.prototype,"session",{wrap:{set:function(n){if(n&&"off"!=n?"free"==n?n=!0:"printMargin"==n?n=-1:"string"==typeof n&&(n=parseInt(n,10)||!1):n=!1,this.$wrap!=n)if(this.$wrap=n,n){var b="number"==typeof n?n:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(n){(n="auto"==n?"text"!=this.$mode.type:"text"!=n)!=this.$wrapAsCode&&(this.$wrapAsCode=n,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(n){this.$useWorker=n,this.$stopWorker(),n&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(n){(n=parseInt(n))>0&&this.$tabSize!==n&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=n,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(n){this.setFoldStyle(n)},handlesSet:!0},overwrite:{set:function(n){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(n){this.doc.setNewLineMode(n)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(n){this.setMode(n)},get:function(){return this.$modeId},handlesSet:!0}}),b.EditSession=nt})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/lang"),R=n("./lib/oop"),D=n("./range").Range,B=function(){function Search(){this.$options={}}return Search.prototype.set=function(n){return R.mixin(this.$options,n),this},Search.prototype.getOptions=function(){return L.copyObject(this.$options)},Search.prototype.setOptions=function(n){this.$options=n},Search.prototype.find=function(n){var b=this.$options,A=this.$matchIterator(n,b);if(!A)return!1;var L=null;return A.forEach((function(n,A,R,B){return L=new D(n,A,R,B),!(A==B&&b.start&&b.start.start&&0!=b.skipCurrent&&L.isEqual(b.start))||(L=null,!1)})),L},Search.prototype.findAll=function(n){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var A=b.range,R=A?n.getLines(A.start.row,A.end.row):n.doc.getAllLines(),B=[],E=b.re;if(b.$isMultiLine){var X,$=E.length,V=R.length-$;t:for(var K=E.offset||0;K<=V;K++){for(var Q=0;Q<$;Q++)if(-1==R[K+Q].search(E[Q]))continue t;var tt=R[K],ot=R[K+$-1],nt=tt.length-tt.match(E[0])[0].length,it=ot.match(E[$-1])[0].length;X&&X.end.row===K&&X.end.column>nt||(B.push(X=new D(K,nt,K+$-1,it)),$>2&&(K=K+$-2))}}else for(var rt=0;rtut&&B[Q].end.row==bt;)Q--;for(B=B.slice(rt,Q+1),rt=0,Q=B.length;rt=$;A--)if(forEachInLine(A,Number.MAX_VALUE,n))return;if(0!=b.wrap)for(A=V,$=X.row;A>=$;A--)if(forEachInLine(A,Number.MAX_VALUE,n))return}};else forEach=function(n){var A=X.row;if(!forEachInLine(A,X.column,n)){for(A+=1;A<=V;A++)if(forEachInLine(A,0,n))return;if(0!=b.wrap)for(A=$,V=X.row;A<=V;A++)if(forEachInLine(A,0,n))return}};if(b.$isMultiLine)var K=A.length,forEachInLine=function(b,L,D){var B=R?b-K+1:b;if(!(B<0||B+K>n.getLength())){var E=n.getLine(B),X=E.search(A[0]);if(!(!R&&XL))return!!D(B,X,B+K-1,V)||void 0}}};else if(R)forEachInLine=function(b,R,D){var E,X=n.getLine(b),$=[],V=0;for(A.lastIndex=0;E=A.exec(X);){var K=E[0].length;if(V=E.index,!K){if(V>=X.length)break;A.lastIndex=V+=L.skipEmptyMatch(X,V,B)}if(E.index+K>R)break;$.push(E.index,K)}for(var Q=$.length-1;Q>=0;Q-=2){var tt=$[Q-1];if(D(b,tt,b,tt+(K=$[Q])))return!0}};else forEachInLine=function(b,R,D){var E,X,$=n.getLine(b);for(A.lastIndex=R;X=A.exec($);){var V=X[0].length;if(D(b,E=X.index,b,E+V))return!0;if(!V&&(A.lastIndex=E+=L.skipEmptyMatch($,E,B),E>=$.length))return!1}};return{forEach}},Search}();b.Search=B})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("../lib/keys"),B=n("../lib/useragent"),E=D.KEY_MODS,X=function(){function MultiHashHandler(n,b){this.$init(n,b,!1)}return MultiHashHandler.prototype.$init=function(n,b,A){this.platform=b||(B.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(n),this.$singleCommand=A},MultiHashHandler.prototype.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n),this.commands[n.name]=n,n.bindKey&&this._buildKeyHash(n)},MultiHashHandler.prototype.removeCommand=function(n,b){var A=n&&("string"==typeof n?n:n.name);n=this.commands[A],b||delete this.commands[A];var L=this.commandKeyBinding;for(var R in L){var D=L[R];if(D==n)delete L[R];else if(Array.isArray(D)){var B=D.indexOf(n);-1!=B&&(D.splice(B,1),1==D.length&&(L[R]=D[0]))}}},MultiHashHandler.prototype.bindKey=function(n,b,A){if("object"==typeof n&&n&&(null==A&&(A=n.position),n=n[this.platform]),n)return"function"==typeof b?this.addCommand({exec:b,bindKey:n,name:b.name||n}):void n.split("|").forEach((function(n){var L="";if(-1!=n.indexOf(" ")){var R=n.split(/\s+/);n=R.pop(),R.forEach((function(n){var b=this.parseKeys(n),A=E[b.hashId]+b.key;L+=(L?" ":"")+A,this._addCommandToBinding(L,"chainKeys")}),this),L+=" "}var D=this.parseKeys(n),B=E[D.hashId]+D.key;this._addCommandToBinding(L+B,b,A)}),this)},MultiHashHandler.prototype._addCommandToBinding=function(n,b,A){var L,R=this.commandKeyBinding;if(b)if(!R[n]||this.$singleCommand)R[n]=b;else{Array.isArray(R[n])?-1!=(L=R[n].indexOf(b))&&R[n].splice(L,1):R[n]=[R[n]],"number"!=typeof A&&(A=getPosition(b));var D=R[n];for(L=0;LA)break}D.splice(L,0,b)}else delete R[n]},MultiHashHandler.prototype.addCommands=function(n){n&&Object.keys(n).forEach((function(b){var A=n[b];if(A){if("string"==typeof A)return this.bindKey(A,b);"function"==typeof A&&(A={exec:A}),"object"==typeof A&&(A.name||(A.name=b),this.addCommand(A))}}),this)},MultiHashHandler.prototype.removeCommands=function(n){Object.keys(n).forEach((function(b){this.removeCommand(n[b])}),this)},MultiHashHandler.prototype.bindKeys=function(n){Object.keys(n).forEach((function(b){this.bindKey(b,n[b])}),this)},MultiHashHandler.prototype._buildKeyHash=function(n){this.bindKey(n.bindKey,n)},MultiHashHandler.prototype.parseKeys=function(n){var b=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(n){return n})),A=b.pop(),L=D[A];if(D.FUNCTION_KEYS[L])A=D.FUNCTION_KEYS[L].toLowerCase();else{if(!b.length)return{key:A,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:A.toUpperCase(),hashId:-1}}for(var R=0,B=b.length;B--;){var E=D.KEY_MODS[b[B]];if(null==E)return"undefined"!=typeof console&&console.error("invalid modifier "+b[B]+" in "+n),!1;R|=E}return{key:A,hashId:R}},MultiHashHandler.prototype.findKeyCommand=function(n,b){var A=E[n]+b;return this.commandKeyBinding[A]},MultiHashHandler.prototype.handleKeyboard=function(n,b,A,L){if(!(L<0)){var R=E[b]+A,D=this.commandKeyBinding[R];return n.$keyChain&&(n.$keyChain+=" "+R,D=this.commandKeyBinding[n.$keyChain]||D),!D||"chainKeys"!=D&&"chainKeys"!=D[D.length-1]?(n.$keyChain&&(b&&4!=b||1!=A.length?(-1==b||L>0)&&(n.$keyChain=""):n.$keyChain=n.$keyChain.slice(0,-R.length-1)),{command:D}):(n.$keyChain=n.$keyChain||R,{command:"null"})}},MultiHashHandler.prototype.getStatusText=function(n,b){return b.$keyChain||""},MultiHashHandler}();function getPosition(n){return"object"==typeof n&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var $=function(n){function HashHandler(b,A){var L=n.call(this,b,A)||this;return L.$singleCommand=!0,L}return R(HashHandler,n),HashHandler}(X);$.call=function(n,b,A){X.prototype.$init.call(n,b,A,!0)},X.call=function(n,b,A){X.prototype.$init.call(n,b,A,!1)},b.HashHandler=$,b.MultiHashHandler=X})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("../lib/oop"),B=n("../keyboard/hash_handler").MultiHashHandler,E=n("../lib/event_emitter").EventEmitter,X=function(n){function CommandManager(b,A){var L=n.call(this,A,b)||this;return L.byName=L.commands,L.setDefaultHandler("exec",(function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)})),L}return R(CommandManager,n),CommandManager.prototype.exec=function(n,b,A){if(Array.isArray(n)){for(var L=n.length;L--;)if(this.exec(n[L],b,A))return!0;return!1}if("string"==typeof n&&(n=this.commands[n]),!this.canExecute(n,b))return!1;var R={editor:b,command:n,args:A};return R.returnValue=this._emit("exec",R),this._signal("afterExec",R),!1!==R.returnValue},CommandManager.prototype.canExecute=function(n,b){return"string"==typeof n&&(n=this.commands[n]),!!n&&(!(b&&b.$readOnly&&!n.readOnly)&&!(0!=this.$checkCommandState&&n.isAvailable&&!n.isAvailable(b)))},CommandManager.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(n){this.macro.push([n.command,n.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},CommandManager.prototype.replay=function(n){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach((function(b){"string"==typeof b?this.exec(b,n):this.exec(b[0],n,b[1])}),this)}finally{this.$inReplay=!1}}},CommandManager.prototype.trimMacro=function(n){return n.map((function(n){return"string"!=typeof n[0]&&(n[0]=n[0].name),n[1]||(n=n[0]),n}))},CommandManager}(B);D.implement(X.prototype,E),b.CommandManager=X})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(n,b,A){"use strict";var L=n("../lib/lang"),R=n("../config"),D=n("../range").Range;function bindKey(n,b){return{win:n,mac:b}}b.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:bindKey("Ctrl-,","Command-,"),exec:function(n){R.loadModule("ace/ext/settings_menu",(function(b){b.init(n),n.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:bindKey("Alt-E","F4"),exec:function(n){R.loadModule("ace/ext/error_marker",(function(b){b.showErrorMarker(n,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:bindKey("Alt-Shift-E","Shift-F4"),exec:function(n){R.loadModule("ace/ext/error_marker",(function(b){b.showErrorMarker(n,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:bindKey("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:bindKey(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:bindKey("Ctrl-L","Command-L"),exec:function(n,b){"number"!=typeof b||isNaN(b)||n.gotoLine(b),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:bindKey("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:bindKey("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:bindKey("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:bindKey("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:bindKey(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:bindKey(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:bindKey("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:bindKey("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:bindKey("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:bindKey("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:bindKey("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:bindKey("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:bindKey("Ctrl-F","Command-F"),exec:function(n){R.loadModule("ace/ext/searchbox",(function(b){b.Search(n)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:bindKey("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:bindKey("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:bindKey("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:bindKey("Up","Up|Ctrl-P"),exec:function(n,b){n.navigateUp(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:bindKey("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:bindKey("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:bindKey("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:bindKey("Down","Down|Ctrl-N"),exec:function(n,b){n.navigateDown(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:bindKey("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:bindKey("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:bindKey("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:bindKey("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:bindKey("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:bindKey("Left","Left|Ctrl-B"),exec:function(n,b){n.navigateLeft(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:bindKey("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:bindKey("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:bindKey("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:bindKey("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:bindKey("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:bindKey("Right","Right|Ctrl-F"),exec:function(n,b){n.navigateRight(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:bindKey(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:bindKey("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:bindKey(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:bindKey("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:bindKey("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:bindKey("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:bindKey("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:bindKey("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:bindKey("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:bindKey("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:bindKey(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var b=n.$copyWithEmptySelection&&n.selection.isEmpty()?n.selection.getLineRange():n.selection.getRange();n._emit("cut",b),b.isEmpty()||n.session.remove(b),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,b){n.$handlePaste(b)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:bindKey("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:bindKey("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:bindKey("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:bindKey("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:bindKey("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:bindKey("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:bindKey("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:bindKey("Ctrl-H","Command-Option-F"),exec:function(n){R.loadModule("ace/ext/searchbox",(function(b){b.Search(n,!0)}))}},{name:"undo",description:"Undo",bindKey:bindKey("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:bindKey("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:bindKey("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:bindKey("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:bindKey("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:bindKey("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:bindKey("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:bindKey("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:bindKey("Shift-Delete",null),exec:function(n){if(!n.selection.isEmpty())return!1;n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:bindKey("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:bindKey("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:bindKey("Ctrl-Shift-Backspace",null),exec:function(n){var b=n.selection.getRange();b.start.column=0,n.session.remove(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:bindKey("Ctrl-Shift-Delete",null),exec:function(n){var b=n.selection.getRange();b.end.column=Number.MAX_VALUE,n.session.remove(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:bindKey("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:bindKey("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:bindKey("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:bindKey("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:bindKey("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:bindKey("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,b){n.insert(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,b){n.insert(L.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:bindKey(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:bindKey("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:bindKey("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:bindKey("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:bindKey(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:bindKey("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var b=n.selection.getRange();b.start.column=b.end.column=0,b.end.row++,n.selection.setRange(b,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:bindKey("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:bindKey(null,null),exec:function(n){for(var b=n.selection.isBackwards(),A=b?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),R=b?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),B=n.session.doc.getLine(A.row).length,E=n.session.doc.getTextRange(n.selection.getRange()).replace(/\n\s*/," ").length,X=n.session.doc.getLine(A.row),$=A.row+1;$<=R.row+1;$++){var V=L.stringTrimLeft(L.stringTrimRight(n.session.doc.getLine($)));0!==V.length&&(V=" "+V),X+=V}R.row+10?(n.selection.moveCursorTo(A.row,A.column),n.selection.selectTo(A.row,A.column+E)):(B=n.session.doc.getLine(A.row).length>B?B+1:B,n.selection.moveCursorTo(A.row,B))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:bindKey(null,null),exec:function(n){var b=n.session.doc.getLength()-1,A=n.session.doc.getLine(b).length,L=n.selection.rangeList.ranges,R=[];L.length<1&&(L=[n.selection.getRange()]);for(var B=0;Bb[A].column&&A++,D.unshift(A,0),b.splice.apply(b,D),this.$updateRows()}}},LineWidgets.prototype.$updateRows=function(){var n=this.session.lineWidgets;if(n){var b=!0;n.forEach((function(n,A){if(n)for(b=!1,n.row=A;n.$oldWidget;)n.$oldWidget.row=A,n=n.$oldWidget})),b&&(this.session.lineWidgets=null)}},LineWidgets.prototype.$registerLineWidget=function(n){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var b=this.session.lineWidgets[n.row];return b&&(n.$oldWidget=b,b.el&&b.el.parentNode&&(b.el.parentNode.removeChild(b.el),b._inDocument=!1)),this.session.lineWidgets[n.row]=n,n},LineWidgets.prototype.addLineWidget=function(n){if(this.$registerLineWidget(n),n.session=this.session,!this.editor)return n;var b=this.editor.renderer;n.html&&!n.el&&(n.el=L.createElement("div"),n.el.innerHTML=n.html),n.text&&!n.el&&(n.el=L.createElement("div"),n.el.textContent=n.text),n.el&&(L.addCssClass(n.el,"ace_lineWidgetContainer"),n.className&&L.addCssClass(n.el,n.className),n.el.style.position="absolute",n.el.style.zIndex="5",b.container.appendChild(n.el),n._inDocument=!0,n.coverGutter||(n.el.style.zIndex="3"),null==n.pixelHeight&&(n.pixelHeight=n.el.offsetHeight)),null==n.rowCount&&(n.rowCount=n.pixelHeight/b.layerConfig.lineHeight);var A=this.session.getFoldAt(n.row,0);if(n.$fold=A,A){var R=this.session.lineWidgets;n.row!=A.end.row||R[A.start.row]?n.hidden=!0:R[A.start.row]=n}return this.session._emit("changeFold",{data:{start:{row:n.row}}}),this.$updateRows(),this.renderWidgets(null,b),this.onWidgetChanged(n),n},LineWidgets.prototype.removeLineWidget=function(n){if(n._inDocument=!1,n.session=null,n.el&&n.el.parentNode&&n.el.parentNode.removeChild(n.el),n.editor&&n.editor.destroy)try{n.editor.destroy()}catch(n){}if(this.session.lineWidgets){var b=this.session.lineWidgets[n.row];if(b==n)this.session.lineWidgets[n.row]=n.$oldWidget,n.$oldWidget&&this.onWidgetChanged(n.$oldWidget);else for(;b;){if(b.$oldWidget==n){b.$oldWidget=n.$oldWidget;break}b=b.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:n.row}}}),this.$updateRows()},LineWidgets.prototype.getWidgetsAtRow=function(n){for(var b=this.session.lineWidgets,A=b&&b[n],L=[];A;)L.push(A),A=A.$oldWidget;return L},LineWidgets.prototype.onWidgetChanged=function(n){this.session._changedWidgets.push(n),this.editor&&this.editor.renderer.updateFull()},LineWidgets.prototype.measureWidgets=function(n,b){var A=this.session._changedWidgets,L=b.layerConfig;if(A&&A.length){for(var R=1/0,D=0;D0&&!L[R];)R--;this.firstRow=A.firstRow,this.lastRow=A.lastRow,b.$cursorLayer.config=A;for(var B=R;B<=D;B++){var E=L[B];if(E&&E.el)if(E.hidden)E.el.style.top=-100-(E.pixelHeight||0)+"px";else{E._inDocument||(E._inDocument=!0,b.container.appendChild(E.el));var X=b.$cursorLayer.getPixelPosition({row:B,column:0},!0).top;E.coverLine||(X+=A.lineHeight*this.session.getRowLineCount(E.row)),E.el.style.top=X-A.offset+"px";var $=E.coverGutter?0:b.gutterWidth;E.fixedWidth||($-=b.scrollLeft),E.el.style.left=$+"px",E.fullWidth&&E.screenWidth&&(E.el.style.minWidth=A.width+2*A.padding+"px"),E.fixedWidth?E.el.style.right=b.scrollBar.getWidth()+"px":E.el.style.right=""}}}},LineWidgets}();b.LineWidgets=R})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(n,b,A){"use strict";var L=n("../lib/keys"),R=n("../mouse/default_gutter_handler").GutterTooltip,D=function(){function GutterKeyboardHandler(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new R(this.editor)}return GutterKeyboardHandler.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},GutterKeyboardHandler.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},GutterKeyboardHandler.prototype.$onGutterKeyDown=function(n){if(this.annotationTooltip.isOpen)return n.preventDefault(),void(n.keyCode===L.escape&&this.annotationTooltip.hideTooltip());if(n.target===this.element){if(n.keyCode!=L.enter)return;n.preventDefault();var b=this.editor.getCursorPosition().row;return this.editor.isRowVisible(b)||this.editor.scrollToLine(b,!0,!0),void setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),b=this.$findNearestFoldWidget(n),A=this.$findNearestAnnotation(n);if(null!==b||null!==A)return null===b&&null!==A?(this.activeRowIndex=A,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==b&&null===A?(this.activeRowIndex=b,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(A-n)0||n+b=0&&this.$isFoldWidgetVisible(n-b))return n-b;if(n+b<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+b))return n+b}return null},GutterKeyboardHandler.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var b=0;n-b>0||n+b=0&&this.$isAnnotationVisible(n-b))return n-b;if(n+b<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+b))return n+b}return null},GutterKeyboardHandler.prototype.$focusFoldWidget=function(n){if(null!=n){var b=this.$getFoldWidget(n);b.classList.add(this.editor.renderer.keyboardFocusClassName),b.focus()}},GutterKeyboardHandler.prototype.$focusAnnotation=function(n){if(null!=n){var b=this.$getAnnotation(n);b.classList.add(this.editor.renderer.keyboardFocusClassName),b.focus()}},GutterKeyboardHandler.prototype.$blurFoldWidget=function(n){var b=this.$getFoldWidget(n);b.classList.remove(this.editor.renderer.keyboardFocusClassName),b.blur()},GutterKeyboardHandler.prototype.$blurAnnotation=function(n){var b=this.$getAnnotation(n);b.classList.remove(this.editor.renderer.keyboardFocusClassName),b.blur()},GutterKeyboardHandler.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isFoldWidgetVisible(n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},GutterKeyboardHandler.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n0;)if(n--,this.$isAnnotationVisible(n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},GutterKeyboardHandler.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},R=n("./lib/oop"),D=n("./lib/dom"),B=n("./lib/lang"),E=n("./lib/useragent"),X=n("./keyboard/textinput").TextInput,$=n("./mouse/mouse_handler").MouseHandler,V=n("./mouse/fold_handler").FoldHandler,K=n("./keyboard/keybinding").KeyBinding,Q=n("./edit_session").EditSession,tt=n("./search").Search,ot=n("./range").Range,nt=n("./lib/event_emitter").EventEmitter,it=n("./commands/command_manager").CommandManager,rt=n("./commands/default_commands").commands,st=n("./config"),pt=n("./token_iterator").TokenIterator,lt=n("./line_widgets").LineWidgets,ut=n("./keyboard/gutter_handler").GutterKeyboardHandler,bt=n("./config").nls,Mt=n("./clipboard"),zt=n("./lib/keys"),Ot=function(){function Editor(n,b,A){this.session,this.$toDestroy=[];var L=n.getContainerElement();this.container=L,this.renderer=n,this.id="editor"+ ++Editor.$uid,this.commands=new it(E.isMac?"mac":"win",rt),"object"==typeof document&&(this.textInput=new X(n.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new $(this),new V(this)),this.keyBinding=new K(this),this.$search=(new tt).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=B.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(n,b){b._$emitInputEvent.schedule(31)})),this.setSession(b||A&&A.session||new Q("")),st.resetOptions(this),A&&this.setOptions(A),st._signal("editor",this)}return Editor.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=B.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},Editor.prototype.startOperation=function(n){if(this.curOp){if(!n||this.curOp.command)return;this.prevOp=this.curOp}n||(this.previousCommand=null,n={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:n.command||{},args:n.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},Editor.prototype.endOperation=function(n){if(this.curOp&&this.session){if(n&&!1===n.returnValue||!this.session)return this.curOp=null;if(1==n&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var b=this.curOp.command,A=b&&b.scrollIntoView;if(A){switch(A){case"center-animate":A="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var L=this.selection.getRange(),R=this.renderer.layerConfig;(L.start.row>=R.lastRow||L.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==A&&this.renderer.animateScrolling(this.curOp.scrollTop)}var D=this.selection.toJSON();this.curOp.selectionAfter=D,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(D),this.prevOp=this.curOp,this.curOp=null}},Editor.prototype.$historyTracker=function(n){if(this.$mergeUndoDeltas){var b=this.prevOp,A=this.$mergeableCommands,L=b.command&&n.command.name==b.command.name;if("insertstring"==n.command.name){var R=n.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),L=L&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(b.args)),this.mergeNextCommand=!0}else L=L&&-1!==A.indexOf(n.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(L=!1),L?this.session.mergeUndoDeltas=!0:-1!==A.indexOf(n.command.name)&&(this.sequenceStartTime=Date.now())}},Editor.prototype.setKeyboardHandler=function(n,b){if(n&&"string"==typeof n&&"ace"!=n){this.$keybindingId=n;var A=this;st.loadModule(["keybinding",n],(function(L){A.$keybindingId==n&&A.keyBinding.setKeyboardHandler(L&&L.handler),b&&b()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(n),b&&b()},Editor.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},Editor.prototype.setSession=function(n){if(this.session!=n){this.curOp&&this.endOperation(),this.curOp={};var b=this.session;if(b){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var A=this.session.getSelection();A.off("changeCursor",this.$onCursorChange),A.off("changeSelection",this.$onSelectionChange)}this.session=n,n?(this.$onDocumentChange=this.onDocumentChange.bind(this),n.on("change",this.$onDocumentChange),this.renderer.setSession(n),this.$onChangeMode=this.onChangeMode.bind(this),n.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),n.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),n.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),n.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),n.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),n.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=n.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(n)),this._signal("changeSession",{session:n,oldSession:b}),this.curOp=null,b&&b._signal("changeEditor",{oldEditor:this}),n&&n._signal("changeEditor",{editor:this}),n&&!n.destroyed&&n.bgTokenizer.scheduleStart()}},Editor.prototype.getSession=function(){return this.session},Editor.prototype.setValue=function(n,b){return this.session.doc.setValue(n),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),n},Editor.prototype.getValue=function(){return this.session.getValue()},Editor.prototype.getSelection=function(){return this.selection},Editor.prototype.resize=function(n){this.renderer.onResize(n)},Editor.prototype.setTheme=function(n,b){this.renderer.setTheme(n,b)},Editor.prototype.getTheme=function(){return this.renderer.getTheme()},Editor.prototype.setStyle=function(n){this.renderer.setStyle(n)},Editor.prototype.unsetStyle=function(n){this.renderer.unsetStyle(n)},Editor.prototype.getFontSize=function(){return this.getOption("fontSize")||D.computedStyle(this.container).fontSize},Editor.prototype.setFontSize=function(n){this.setOption("fontSize",n)},Editor.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var n=this;this.$highlightPending=!0,setTimeout((function(){n.$highlightPending=!1;var b=n.session;if(b&&!b.destroyed){b.$bracketHighlight&&(b.$bracketHighlight.markerIds.forEach((function(n){b.removeMarker(n)})),b.$bracketHighlight=null);var A=n.getCursorPosition(),L=n.getKeyboardHandler(),R=L&&L.$getDirectionForHighlight&&L.$getDirectionForHighlight(n),D=b.getMatchingBracketRanges(A,R);if(!D){var B=new pt(b,A.row,A.column).getCurrentToken();if(B&&/\b(?:tag-open|tag-name)/.test(B.type)){var E=b.getMatchingTags(A);E&&(D=[E.openTagName.isEmpty()?E.openTag:E.openTagName,E.closeTagName.isEmpty()?E.closeTag:E.closeTagName])}}if(!D&&b.$mode.getMatching&&(D=b.$mode.getMatching(n.session)),D){var X="ace_bracket";Array.isArray(D)?1==D.length&&(X="ace_error_bracket"):D=[D],2==D.length&&(0==ot.comparePoints(D[0].end,D[1].start)?D=[ot.fromPoints(D[0].start,D[1].end)]:0==ot.comparePoints(D[0].start,D[1].end)&&(D=[ot.fromPoints(D[1].start,D[0].end)])),b.$bracketHighlight={ranges:D,markerIds:D.map((function(n){return b.addMarker(n,X,"text")}))},n.getHighlightIndentGuides()&&n.renderer.$textLayer.$highlightIndentGuide()}else n.getHighlightIndentGuides()&&n.renderer.$textLayer.$highlightIndentGuide()}}),50)}},Editor.prototype.focus=function(){this.textInput.focus()},Editor.prototype.isFocused=function(){return this.textInput.isFocused()},Editor.prototype.blur=function(){this.textInput.blur()},Editor.prototype.onFocus=function(n){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",n))},Editor.prototype.onBlur=function(n){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",n))},Editor.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},Editor.prototype.onDocumentChange=function(n){var b=this.session.$useWrapMode,A=n.start.row==n.end.row?n.end.row:1/0;this.renderer.updateLines(n.start.row,A,b),this._signal("change",n),this.$cursorChange()},Editor.prototype.onTokenizerUpdate=function(n){var b=n.data;this.renderer.updateLines(b.first,b.last)},Editor.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},Editor.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},Editor.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},Editor.prototype.$updateHighlightActiveLine=function(){var n,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(n=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(n=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(n=!1)),b.$highlightLineMarker&&!n)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&n){var A=new ot(n.row,n.column,n.row,1/0);A.id=b.addMarker(A,"ace_active-line","screenLine"),b.$highlightLineMarker=A}else n&&(b.$highlightLineMarker.start.row=n.row,b.$highlightLineMarker.end.row=n.row,b.$highlightLineMarker.start.column=n.column,b._signal("changeBackMarker"))},Editor.prototype.onSelectionChange=function(n){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var A=this.selection.getRange(),L=this.getSelectionStyle();b.$selectionMarker=b.addMarker(A,"ace_selection",L)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},Editor.prototype.$getSelectionHighLightRegexp=function(){var n=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var A=b.start.column,L=b.end.column,R=n.getLine(b.start.row),D=R.substring(A,L);if(!(D.length>5e3)&&/[\w\d]/.test(D)){var B=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),E=R.substring(A-1,L+1);if(B.test(E))return B}}},Editor.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},Editor.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},Editor.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},Editor.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},Editor.prototype.onChangeMode=function(n){this.renderer.updateText(),this._emit("changeMode",n)},Editor.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},Editor.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},Editor.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},Editor.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},Editor.prototype.getCopyText=function(){var n=this.getSelectedText(),b=this.session.doc.getNewLineCharacter(),A=!1;if(!n&&this.$copyWithEmptySelection){A=!0;for(var L=this.selection.getAllRanges(),R=0;RE.search(/\S|$/)){var X=E.substr(R.column).search(/\S|$/);A.doc.removeInLine(R.row,R.column,R.column+X)}}this.clearSelection();var $=R.column,V=A.getState(R.row),K=(E=A.getLine(R.row),L.checkOutdent(V,E,n));if(A.insert(R,n),D&&D.selection&&(2==D.selection.length?this.selection.setSelectionRange(new ot(R.row,$+D.selection[0],R.row,$+D.selection[1])):this.selection.setSelectionRange(new ot(R.row+D.selection[0],D.selection[1],R.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(A.getDocument().isNewLine(n)){var Q=L.getNextLineIndent(V,E.slice(0,R.column),A.getTabString());A.insert({row:R.row+1,column:0},Q)}K&&L.autoOutdent(V,A,R.row)}},Editor.prototype.autoIndent=function(){for(var n=this.session,b=n.getMode(),A=this.selection.isEmpty()?[new ot(0,0,n.doc.getLength()-1,0)]:this.selection.getAllRanges(),L="",R="",D="",B=n.getTabString(),E=0;E0&&(L=n.getState(V-1),R=n.getLine(V-1),D=b.getNextLineIndent(L,R,B));var K=n.getLine(V),Q=b.$getIndent(K);if(D!==Q){if(Q.length>0){var tt=new ot(V,0,V,Q.length);n.remove(tt)}D.length>0&&n.insert({row:V,column:0},D)}b.autoOutdent(L,n,V)}},Editor.prototype.onTextInput=function(n,b){if(!b)return this.keyBinding.onTextInput(n);this.startOperation({command:{name:"insertstring"}});var A=this.applyComposition.bind(this,n,b);this.selection.rangeCount?this.forEachSelection(A):A(),this.endOperation()},Editor.prototype.applyComposition=function(n,b){var A;(b.extendLeft||b.extendRight)&&((A=this.selection.getRange()).start.column-=b.extendLeft,A.end.column+=b.extendRight,A.start.column<0&&(A.start.row--,A.start.column+=this.session.getLine(A.start.row).length+1),this.selection.setRange(A),n||A.isEmpty()||this.remove());(!n&&this.selection.isEmpty()||this.insert(n,!0),b.restoreStart||b.restoreEnd)&&((A=this.selection.getRange()).start.column-=b.restoreStart,A.end.column-=b.restoreEnd,this.selection.setRange(A))},Editor.prototype.onCommandKey=function(n,b,A){return this.keyBinding.onCommandKey(n,b,A)},Editor.prototype.setOverwrite=function(n){this.session.setOverwrite(n)},Editor.prototype.getOverwrite=function(){return this.session.getOverwrite()},Editor.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},Editor.prototype.setScrollSpeed=function(n){this.setOption("scrollSpeed",n)},Editor.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},Editor.prototype.setDragDelay=function(n){this.setOption("dragDelay",n)},Editor.prototype.getDragDelay=function(){return this.getOption("dragDelay")},Editor.prototype.setSelectionStyle=function(n){this.setOption("selectionStyle",n)},Editor.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},Editor.prototype.setHighlightActiveLine=function(n){this.setOption("highlightActiveLine",n)},Editor.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},Editor.prototype.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)},Editor.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},Editor.prototype.setHighlightSelectedWord=function(n){this.setOption("highlightSelectedWord",n)},Editor.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},Editor.prototype.setAnimatedScroll=function(n){this.renderer.setAnimatedScroll(n)},Editor.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},Editor.prototype.setShowInvisibles=function(n){this.renderer.setShowInvisibles(n)},Editor.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},Editor.prototype.setDisplayIndentGuides=function(n){this.renderer.setDisplayIndentGuides(n)},Editor.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},Editor.prototype.setHighlightIndentGuides=function(n){this.renderer.setHighlightIndentGuides(n)},Editor.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},Editor.prototype.setShowPrintMargin=function(n){this.renderer.setShowPrintMargin(n)},Editor.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},Editor.prototype.setPrintMarginColumn=function(n){this.renderer.setPrintMarginColumn(n)},Editor.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},Editor.prototype.setReadOnly=function(n){this.setOption("readOnly",n)},Editor.prototype.getReadOnly=function(){return this.getOption("readOnly")},Editor.prototype.setBehavioursEnabled=function(n){this.setOption("behavioursEnabled",n)},Editor.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},Editor.prototype.setWrapBehavioursEnabled=function(n){this.setOption("wrapBehavioursEnabled",n)},Editor.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},Editor.prototype.setShowFoldWidgets=function(n){this.setOption("showFoldWidgets",n)},Editor.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},Editor.prototype.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)},Editor.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},Editor.prototype.remove=function(n){this.selection.isEmpty()&&("left"==n?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var A=this.session,L=A.getState(b.start.row),R=A.getMode().transformAction(L,"deletion",this,A,b);if(0===b.end.column){var D=A.getTextRange(b);if("\n"==D[D.length-1]){var B=A.getLine(b.end.row);/^\s+$/.test(B)&&(b.end.column=B.length)}}R&&(b=R)}this.session.remove(b),this.clearSelection()},Editor.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var n=this.getSelectionRange();n.start.column==n.end.column&&n.start.row==n.end.row&&(n.end.column=0,n.end.row++),this.session.remove(n),this.clearSelection()},Editor.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var n=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(n)},Editor.prototype.setGhostText=function(n,b){this.session.widgetManager||(this.session.widgetManager=new lt(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(n,b)},Editor.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},Editor.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var n=this.getCursorPosition(),b=n.column;if(0!==b){var A,L,R=this.session.getLine(n.row);bb.toLowerCase()?1:0}));var R=new ot(0,0,0,0);for(L=n.first;L<=n.last;L++){var D=b.getLine(L);R.start.row=L,R.end.row=L,R.end.column=D.length,b.replace(R,A[L-n.first])}},Editor.prototype.toggleCommentLines=function(){var n=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(n,this.session,b.first,b.last)},Editor.prototype.toggleBlockComment=function(){var n=this.getCursorPosition(),b=this.session.getState(n.row),A=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,A,n)},Editor.prototype.getNumberAt=function(n,b){var A=/[\-]?[0-9]+(?:\.[0-9]+)?/g;A.lastIndex=0;for(var L=this.session.getLine(n);A.lastIndex=b)return{value:R[0],start:R.index,end:R.index+R[0].length}}return null},Editor.prototype.modifyNumber=function(n){var b=this.selection.getCursor().row,A=this.selection.getCursor().column,L=new ot(b,A-1,b,A),R=this.session.getTextRange(L);if(!isNaN(parseFloat(R))&&isFinite(R)){var D=this.getNumberAt(b,A);if(D){var B=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,E=D.start+D.value.length-B,X=parseFloat(D.value);X*=Math.pow(10,E),B!==D.end&&A=E&&D<=X&&(A=b,$.selection.clearSelection(),$.moveCursorTo(n,E+L),$.selection.selectTo(n,X+L)),E=X}));for(var V,K=this.$toggleWordPairs,Q=0;Q=X&&B<=$&&Q.match(/((?:https?|ftp):\/\/[\S]+)/)){E=Q.replace(/[\s:.,'";}\]]+$/,"");break}X=$}}catch(n){A={error:n}}finally{try{K&&!K.done&&(R=V.return)&&R.call(V)}finally{if(A)throw A.error}}return E},Editor.prototype.openLink=function(){var n=this.selection.getCursor(),b=this.findLinkAt(n.row,n.column);return b&&window.open(b,"_blank"),null!=b},Editor.prototype.removeLines=function(){var n=this.$getSelectedRows();this.session.removeFullLines(n.first,n.last),this.clearSelection()},Editor.prototype.duplicateSelection=function(){var n=this.selection,b=this.session,A=n.getRange(),L=n.isBackwards();if(A.isEmpty()){var R=A.start.row;b.duplicateLines(R,R)}else{var D=L?A.start:A.end,B=b.insert(D,b.getTextRange(A));A.start=D,A.end=B,n.setSelectionRange(A,L)}},Editor.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},Editor.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},Editor.prototype.moveText=function(n,b,A){return this.session.moveText(n,b,A)},Editor.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},Editor.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},Editor.prototype.$moveLines=function(n,b){var A,L,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var D=R.toOrientedRange();A=this.$getSelectedRows(D),L=this.session.$moveLines(A.first,A.last,b?0:n),b&&-1==n&&(L=0),D.moveBy(L,0),R.fromOrientedRange(D)}else{var B=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var E=0,X=0,$=B.length,V=0;V<$;V++){var K=V;B[V].moveBy(E,0);for(var Q=(A=this.$getSelectedRows(B[V])).first,tt=A.last;++V<$;){X&&B[V].moveBy(X,0);var ot=this.$getSelectedRows(B[V]);if(b&&ot.first!=tt)break;if(!b&&ot.first>tt+1)break;tt=ot.last}for(V--,E=this.session.$moveLines(Q,tt,b?0:n),b&&-1==n&&(K=V+1);K<=V;)B[K].moveBy(E,0),K++;b||(E=0),X+=E}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},Editor.prototype.$getSelectedRows=function(n){return n=(n||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(n.start.row),last:this.session.getRowFoldEnd(n.end.row)}},Editor.prototype.onCompositionStart=function(n){this.renderer.showComposition(n)},Editor.prototype.onCompositionUpdate=function(n){this.renderer.setCompositionText(n)},Editor.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},Editor.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},Editor.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},Editor.prototype.isRowVisible=function(n){return n>=this.getFirstVisibleRow()&&n<=this.getLastVisibleRow()},Editor.prototype.isRowFullyVisible=function(n){return n>=this.renderer.getFirstFullyVisibleRow()&&n<=this.renderer.getLastFullyVisibleRow()},Editor.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},Editor.prototype.$moveByPage=function(n,b){var A=this.renderer,L=this.renderer.layerConfig,R=n*Math.floor(L.height/L.lineHeight);!0===b?this.selection.$moveSelection((function(){this.moveCursorBy(R,0)})):!1===b&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var D=A.scrollTop;A.scrollBy(0,R*L.lineHeight),null!=b&&A.scrollCursorIntoView(null,.5),A.animateScrolling(D)},Editor.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},Editor.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},Editor.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},Editor.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},Editor.prototype.scrollPageDown=function(){this.$moveByPage(1)},Editor.prototype.scrollPageUp=function(){this.$moveByPage(-1)},Editor.prototype.scrollToRow=function(n){this.renderer.scrollToRow(n)},Editor.prototype.scrollToLine=function(n,b,A,L){this.renderer.scrollToLine(n,b,A,L)},Editor.prototype.centerSelection=function(){var n=this.getSelectionRange(),b={row:Math.floor(n.start.row+(n.end.row-n.start.row)/2),column:Math.floor(n.start.column+(n.end.column-n.start.column)/2)};this.renderer.alignCursor(b,.5)},Editor.prototype.getCursorPosition=function(){return this.selection.getCursor()},Editor.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},Editor.prototype.getSelectionRange=function(){return this.selection.getRange()},Editor.prototype.selectAll=function(){this.selection.selectAll()},Editor.prototype.clearSelection=function(){this.selection.clearSelection()},Editor.prototype.moveCursorTo=function(n,b){this.selection.moveCursorTo(n,b)},Editor.prototype.moveCursorToPosition=function(n){this.selection.moveCursorToPosition(n)},Editor.prototype.jumpToMatching=function(n,b){var A=this.getCursorPosition(),L=new pt(this.session,A.row,A.column),R=L.getCurrentToken(),D=0;R&&-1!==R.type.indexOf("tag-name")&&(R=L.stepBackward());var B=R||L.stepForward();if(B){var E,X,$=!1,V={},K=A.column-B.start,Q={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(B.value.match(/[{}()\[\]]/g)){for(;K1?V[B.value]++:"=0;--D)this.$tryReplace(A[D],n)&&L++;return this.selection.setSelectionRange(R),L},Editor.prototype.$tryReplace=function(n,b){var A=this.session.getTextRange(n);return null!==(b=this.$search.replace(A,b))?(n.end=this.session.replace(n,b),n):null},Editor.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},Editor.prototype.find=function(n,b,A){b||(b={}),"string"==typeof n||n instanceof RegExp?b.needle=n:"object"==typeof n&&R.mixin(b,n);var L=this.selection.getRange();null==b.needle&&((n=this.session.getTextRange(L)||this.$search.$options.needle)||(L=this.session.getWordRange(L.start.row,L.start.column),n=this.session.getTextRange(L)),this.$search.set({needle:n})),this.$search.set(b),b.start||this.$search.set({start:L});var D=this.$search.find(this.session);return b.preventScroll?D:D?(this.revealRange(D,A),D):(b.backwards?L.start=L.end:L.end=L.start,void this.selection.setRange(L))},Editor.prototype.findNext=function(n,b){this.find({skipCurrent:!0,backwards:!1},n,b)},Editor.prototype.findPrevious=function(n,b){this.find(n,{skipCurrent:!0,backwards:!0},b)},Editor.prototype.revealRange=function(n,b){this.session.unfold(n),this.selection.setSelectionRange(n);var A=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(n.start,n.end,.5),!1!==b&&this.renderer.animateScrolling(A)},Editor.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},Editor.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},Editor.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(n){n.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},Editor.prototype.setAutoScrollEditorIntoView=function(n){if(n){var b,A=this,L=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var D=this.on("changeSelection",(function(){L=!0})),B=this.renderer.on("beforeRender",(function(){L&&(b=A.renderer.container.getBoundingClientRect())})),E=this.renderer.on("afterRender",(function(){if(L&&b&&(A.isFocused()||A.searchBox&&A.searchBox.isFocused())){var n=A.renderer,D=n.$cursorLayer.$pixelPos,B=n.layerConfig,E=D.top-B.offset;null!=(L=D.top>=0&&E+b.top<0||!(D.topwindow.innerHeight)&&null)&&(R.style.top=E+"px",R.style.left=D.left+"px",R.style.height=B.lineHeight+"px",R.scrollIntoView(L)),L=b=null}}));this.setAutoScrollEditorIntoView=function(n){n||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",E),this.renderer.off("beforeRender",B))}}},Editor.prototype.$resetCursorStyle=function(){var n=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(n)),b.isBlinking=!this.$readOnly&&"wide"!=n,D.setCssClass(b.element,"ace_slim-cursors",/slim/.test(n)))},Editor.prototype.prompt=function(n,b,A){var L=this;st.loadModule("ace/ext/prompt",(function(R){R.prompt(L,n,b,A)}))},Editor}();Ot.$uid=0,Ot.prototype.curOp=null,Ot.prototype.prevOp={},Ot.prototype.$mergeableCommands=["backspace","del","insertstring"],Ot.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],R.implement(Ot.prototype,nt),st.defineOptions(Ot.prototype,"editor",{selectionStyle:{set:function(n){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:n})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(n){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(n){this.textInput.setReadOnly(n),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(n){this.textInput.setCopyWithEmptySelection(n)},initialValue:!1},cursorStyle:{set:function(n){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(n){this.setAutoScrollEditorIntoView(n)}},keyboardHandler:{set:function(n){this.setKeyboardHandler(n)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(n){this.session.setValue(n)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(n){this.setSession(n)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(n){this.renderer.$gutterLayer.setShowLineNumbers(n),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),n&&this.$relativeLineNumbers?ft.attach(this):ft.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(n){this.$showLineNumbers&&n?ft.attach(this):ft.detach(this)}},placeholder:{set:function(n){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var n=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(n&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),D.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(n||this.renderer.placeholderNode)!n&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),D.addCssClass(this.container,"ace_hasPlaceholder");var b=D.createElement("div");b.className="ace_placeholder",b.textContent=this.$placeholder||"",this.renderer.placeholderNode=b,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(n){var b,A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(n){n.blur(),n.renderer.scroller.focus()},readOnly:!0},focusOnEnterKeyup=function(n){if(n.target==this.renderer.scroller&&n.keyCode===zt.enter){n.preventDefault();var b=this.getCursorPosition().row;this.isRowVisible(b)||this.scrollToLine(b,!0,!0),this.focus()}};n?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(E.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",bt("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",bt("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",focusOnEnterKeyup.bind(this)),this.commands.addCommand(A),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",bt("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",bt("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),b||(b=new ut(this)),b.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",focusOnEnterKeyup.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),b&&b.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(n){this.$textInputAriaLabel=n},initialValue:""},enableMobileMenu:{set:function(n){this.$enableMobileMenu=n},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var ft={getText:function(n,b){return(Math.abs(n.selection.lead.row-b)||b+1+(b<9?"·":""))+""},getWidth:function(n,b,A){return Math.max(b.toString().length,(A.lastRow+1).toString().length,2)*A.characterWidth},update:function(n,b){b.renderer.$loop.schedule(b.renderer.CHANGE_GUTTER)},attach:function(n){n.renderer.$gutterLayer.$renderer=this,n.on("changeSelection",this.update),this.update(null,n)},detach:function(n){n.renderer.$gutterLayer.$renderer==this&&(n.renderer.$gutterLayer.$renderer=null),n.off("changeSelection",this.update),this.update(null,n)}};b.Editor=Ot})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=function(){function Lines(n,b){this.element=n,this.canvasHeight=b||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return Lines.prototype.moveContainer=function(n){L.translate(this.element,0,-n.firstRowScreen*n.lineHeight%this.canvasHeight-n.offset*this.$offsetCoefficient)},Lines.prototype.pageChanged=function(n,b){return Math.floor(n.firstRowScreen*n.lineHeight/this.canvasHeight)!==Math.floor(b.firstRowScreen*b.lineHeight/this.canvasHeight)},Lines.prototype.computeLineTop=function(n,b,A){var L=b.firstRowScreen*b.lineHeight,R=Math.floor(L/this.canvasHeight);return A.documentToScreenRow(n,0)*b.lineHeight-R*this.canvasHeight},Lines.prototype.computeLineHeight=function(n,b,A){return b.lineHeight*A.getRowLineCount(n)},Lines.prototype.getLength=function(){return this.cells.length},Lines.prototype.get=function(n){return this.cells[n]},Lines.prototype.shift=function(){this.$cacheCell(this.cells.shift())},Lines.prototype.pop=function(){this.$cacheCell(this.cells.pop())},Lines.prototype.push=function(n){if(Array.isArray(n)){this.cells.push.apply(this.cells,n);for(var b=L.createFragment(this.element),A=0;AD&&(X=R.end.row+1,D=(R=b.getNextFoldLine(X,R))?R.start.row:1/0),X>L){for(;this.$lines.getLength()>E+1;)this.$lines.pop();break}(B=this.$lines.get(++E))?B.row=X:(B=this.$lines.createCell(X,n,this.session,onCreateCell),this.$lines.push(B)),this.$renderCell(B,n,R,X),X++}this._signal("afterRender"),this.$updateGutterWidth(n)},Gutter.prototype.$updateGutterWidth=function(n){var b=this.session,A=b.gutterRenderer||this.$renderer,L=b.$firstLineNumber,R=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||b.$useWrapMode)&&(R=b.getLength()+L-1);var D=A?A.getWidth(b,R,n):R.toString().length*n.characterWidth,B=this.$padding||this.$computePadding();(D+=B.left+B.right)===this.gutterWidth||isNaN(D)||(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},Gutter.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},Gutter.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!this.$cursorCell||this.$cursorCell.row!=n){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var b=this.$lines.cells;this.$cursorCell=null;for(var A=0;A=this.$cursorRow){if(L.row>this.$cursorRow){var R=this.session.getFoldLine(this.$cursorRow);if(!(A>0&&R&&R.start.row==b[A-1].row))break;L=b[A-1]}L.element.className="ace_gutter-active-line "+L.element.className,this.$cursorCell=L;break}}}}},Gutter.prototype.scrollLines=function(n){var b=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(b,n))return this.update(n);this.$lines.moveContainer(n);var A=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),L=this.oldLastRow;if(this.oldLastRow=A,!b||L0;R--)this.$lines.shift();if(L>A)for(R=this.session.getFoldedRowCount(A+1,L);R>0;R--)this.$lines.pop();n.firstRowL&&this.$lines.push(this.$renderLines(n,L+1,A)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},Gutter.prototype.$renderLines=function(n,b,A){for(var L=[],R=b,D=this.session.getNextFoldLine(R),B=D?D.start.row:1/0;R>B&&(R=D.end.row+1,B=(D=this.session.getNextFoldLine(R,D))?D.start.row:1/0),!(R>A);){var E=this.$lines.createCell(R,n,this.session,onCreateCell);this.$renderCell(E,n,D,R),L.push(E),R++}return L},Gutter.prototype.$renderCell=function(n,b,A,R){var D=n.element,B=this.session,E=D.childNodes[0],$=D.childNodes[1],V=D.childNodes[2],K=V.firstChild,Q=B.$firstLineNumber,tt=B.$breakpoints,ot=B.$decorations,nt=B.gutterRenderer||this.$renderer,it=this.$showFoldWidgets&&B.foldWidgets,rt=A?A.start.row:Number.MAX_VALUE,st=b.lineHeight+"px",pt=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",lt=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",ut=(nt?nt.getText(B,R):R+Q).toString();if(this.$highlightGutterLine&&(R==this.$cursorRow||A&&R=rt&&this.$cursorRow<=A.end.row)&&(pt+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),tt[R]&&(pt+=tt[R]),ot[R]&&(pt+=ot[R]),this.$annotations[R]&&R!==rt&&(pt+=this.$annotations[R].className),it){var bt=it[R];null==bt&&(bt=it[R]=B.getFoldWidget(R))}if(bt){var Mt="ace_fold-widget ace_"+bt,zt="start"==bt&&R==rt&&RA.right-b.right?"foldWidgets":void 0},Gutter}();function onCreateCell(n){var b=document.createTextNode("");n.appendChild(b);var A=L.createElement("span");n.appendChild(A);var R=L.createElement("span");n.appendChild(R);var D=L.createElement("span");return R.appendChild(D),n}$.prototype.$fixedWidth=!1,$.prototype.$highlightGutterLine=!0,$.prototype.$renderer="",$.prototype.$showLineNumbers=!0,$.prototype.$showFoldWidgets=!0,R.implement($.prototype,B),b.Gutter=$})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../range").Range,R=n("../lib/dom"),D=function(){function Marker(n){this.element=R.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return Marker.prototype.setPadding=function(n){this.$padding=n},Marker.prototype.setSession=function(n){this.session=n},Marker.prototype.setMarkers=function(n){this.markers=n},Marker.prototype.elt=function(n,b){var A=-1!=this.i&&this.element.childNodes[this.i];A?this.i++:(A=document.createElement("div"),this.element.appendChild(A),this.i=-1),A.style.cssText=b,A.className=n},Marker.prototype.update=function(n){if(n){var b;for(var A in this.config=n,this.i=0,this.markers){var L=this.markers[A];if(L.range){var R=L.range.clipRows(n.firstRow,n.lastRow);if(!R.isEmpty())if(R=R.toScreenRange(this.session),L.renderer){var D=this.$getTop(R.start.row,n),B=this.$padding+R.start.column*n.characterWidth;L.renderer(b,R,B,D,n)}else"fullLine"==L.type?this.drawFullLineMarker(b,R,L.clazz,n):"screenLine"==L.type?this.drawScreenLineMarker(b,R,L.clazz,n):R.isMultiLine()?"text"==L.type?this.drawTextMarker(b,R,L.clazz,n):this.drawMultiLineMarker(b,R,L.clazz,n):this.drawSingleLineMarker(b,R,L.clazz+" ace_start ace_br15",n)}else L.update(b,this,this.session,n)}if(-1!=this.i)for(;this.iQ?4:0)|($==X?8:0)),R,$==X?0:1,D)},Marker.prototype.drawMultiLineMarker=function(n,b,A,L,R){var D=this.$padding,B=L.lineHeight,E=this.$getTop(b.start.row,L),X=D+b.start.column*L.characterWidth;(R=R||"",this.session.$bidiHandler.isBidiRow(b.start.row))?(($=b.clone()).end.row=$.start.row,$.end.column=this.session.getLine($.start.row).length,this.drawBidiSingleLineMarker(n,$,A+" ace_br1 ace_start",L,null,R)):this.elt(A+" ace_br1 ace_start","height:"+B+"px;right:"+D+"px;top:"+E+"px;left:"+X+"px;"+(R||""));if(this.session.$bidiHandler.isBidiRow(b.end.row)){var $;($=b.clone()).start.row=$.end.row,$.start.column=0,this.drawBidiSingleLineMarker(n,$,A+" ace_br12",L,null,R)}else{E=this.$getTop(b.end.row,L);var V=b.end.column*L.characterWidth;this.elt(A+" ace_br12","height:"+B+"px;width:"+V+"px;top:"+E+"px;left:"+D+"px;"+(R||""))}if(!((B=(b.end.row-b.start.row-1)*L.lineHeight)<=0)){E=this.$getTop(b.start.row+1,L);var K=(b.start.column?1:0)|(b.end.column?0:8);this.elt(A+(K?" ace_br"+K:""),"height:"+B+"px;right:"+D+"px;top:"+E+"px;left:"+D+"px;"+(R||""))}},Marker.prototype.drawSingleLineMarker=function(n,b,A,L,R,D){if(this.session.$bidiHandler.isBidiRow(b.start.row))return this.drawBidiSingleLineMarker(n,b,A,L,R,D);var B=L.lineHeight,E=(b.end.column+(R||0)-b.start.column)*L.characterWidth,X=this.$getTop(b.start.row,L),$=this.$padding+b.start.column*L.characterWidth;this.elt(A,"height:"+B+"px;width:"+E+"px;top:"+X+"px;left:"+$+"px;"+(D||""))},Marker.prototype.drawBidiSingleLineMarker=function(n,b,A,L,R,D){var B=L.lineHeight,E=this.$getTop(b.start.row,L),X=this.$padding;this.session.$bidiHandler.getSelections(b.start.column,b.end.column).forEach((function(n){this.elt(A,"height:"+B+"px;width:"+(n.width+(R||0))+"px;top:"+E+"px;left:"+(X+n.left)+"px;"+(D||""))}),this)},Marker.prototype.drawFullLineMarker=function(n,b,A,L,R){var D=this.$getTop(b.start.row,L),B=L.lineHeight;b.start.row!=b.end.row&&(B+=this.$getTop(b.end.row,L)-D),this.elt(A,"height:"+B+"px;top:"+D+"px;left:0;right:0;"+(R||""))},Marker.prototype.drawScreenLineMarker=function(n,b,A,L,R){var D=this.$getTop(b.start.row,L),B=L.lineHeight;this.elt(A,"height:"+B+"px;top:"+D+"px;left:0;right:0;"+(R||""))},Marker}();D.prototype.$padding=0,b.Marker=D})),ace.define("ace/layer/text_util",["require","exports","module"],(function(n,b,A){var L=new Set(["text","rparen","lparen"]);b.isTextToken=function(n){return L.has(n)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(n,b,A){"use strict";var L=n("../lib/oop"),R=n("../lib/dom"),D=n("../lib/lang"),B=n("./lines").Lines,E=n("../lib/event_emitter").EventEmitter,X=n("../config").nls,$=n("./text_util").isTextToken,V=function(){function Text(n){this.dom=R,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new B(this.element)}return Text.prototype.$updateEolChar=function(){var n=this.session.doc,b="\n"==n.getNewLineCharacter()&&"windows"!=n.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=b)return this.EOL_CHAR=b,!0},Text.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},Text.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},Text.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},Text.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",function(n){this._signal("changeCharacterSize",n)}.bind(this)),this.$pollSizeChanges()},Text.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},Text.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},Text.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},Text.prototype.setShowInvisibles=function(n){return this.showInvisibles!=n&&(this.showInvisibles=n,"string"==typeof n?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},Text.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides!=n&&(this.displayIndentGuides=n,this.$computeTabString(),!0)},Text.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides!==n&&(this.$highlightIndentGuides=n,n)},Text.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var b=this.$tabStrings=[0],A=1;AV&&(E=X.end.row+1,V=(X=this.session.getNextFoldLine(E,X))?X.start.row:1/0),!(E>R);){var K=D[B++];if(K){this.dom.removeChildren(K),this.$renderLine(K,E,E==V&&X),$&&(K.style.top=this.$lines.computeLineTop(E,n,this.session)+"px");var Q=n.lineHeight*this.session.getRowLength(E)+"px";K.style.height!=Q&&($=!0,K.style.height=Q)}E++}if($)for(;B0;R--)this.$lines.shift();if(b.lastRow>n.lastRow)for(R=this.session.getFoldedRowCount(n.lastRow+1,b.lastRow);R>0;R--)this.$lines.pop();n.firstRowb.lastRow&&this.$lines.push(this.$renderLinesFragment(n,b.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},Text.prototype.$renderLinesFragment=function(n,b,A){for(var L=[],D=b,B=this.session.getNextFoldLine(D),E=B?B.start.row:1/0;D>E&&(D=B.end.row+1,E=(B=this.session.getNextFoldLine(D,B))?B.start.row:1/0),!(D>A);){var X=this.$lines.createCell(D,n,this.session),$=X.element;this.dom.removeChildren($),R.setStyle($.style,"height",this.$lines.computeLineHeight(D,n,this.session)+"px"),R.setStyle($.style,"top",this.$lines.computeLineTop(D,n,this.session)+"px"),this.$renderLine($,D,D==E&&B),this.$useLineGroups()?$.className="ace_line_group":$.className="ace_line",L.push(X),D++}return L},Text.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var b=n.firstRow,A=n.lastRow,L=this.$lines;L.getLength();)L.pop();L.push(this.$renderLinesFragment(n,b,A))},Text.prototype.$renderToken=function(n,b,A,L){for(var R,B=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,V=this.dom.createFragment(this.element),K=0;R=E.exec(L);){var Q=R[1],tt=R[2],ot=R[3],nt=R[4],it=R[5];if(B.showSpaces||!tt){var rt=K!=R.index?L.slice(K,R.index):"";if(K=R.index+R[0].length,rt&&V.appendChild(this.dom.createTextNode(rt,this.element)),Q){var st=B.session.getScreenTabSize(b+R.index);V.appendChild(B.$tabStrings[st].cloneNode(!0)),b+=st-1}else if(tt){if(B.showSpaces)(lt=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",lt.textContent=D.stringRepeat(B.SPACE_CHAR,tt.length),V.appendChild(lt);else V.appendChild(this.dom.createTextNode(tt,this.element))}else if(ot){(lt=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",lt.textContent=D.stringRepeat(B.SPACE_CHAR,ot.length),V.appendChild(lt)}else if(nt){b+=1,(lt=this.dom.createElement("span")).style.width=2*B.config.characterWidth+"px",lt.className=B.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",lt.textContent=B.showSpaces?B.SPACE_CHAR:nt,V.appendChild(lt)}else if(it){b+=1,(lt=this.dom.createElement("span")).style.width=2*B.config.characterWidth+"px",lt.className="ace_cjk",lt.textContent=it,V.appendChild(lt)}}}if(V.appendChild(this.dom.createTextNode(K?L.slice(K):L,this.element)),$(A.type))n.appendChild(V);else{var pt="ace_"+A.type.replace(/\./g," ace_"),lt=this.dom.createElement("span");"fold"==A.type&&(lt.style.width=A.value.length*this.config.characterWidth+"px",lt.setAttribute("title",X("inline-fold.closed.title","Unfold code"))),lt.className=pt,lt.appendChild(V),n.appendChild(lt)}return b+L.length},Text.prototype.renderIndentGuide=function(n,b,A){var L=b.search(this.$indentGuideRe);if(L<=0||L>=A)return b;if(" "==b[0]){for(var R=(L-=L%this.tabSize)/this.tabSize,D=0;DR[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==n[b.row]&&b.column===n[b.row].length){this.$highlightIndentGuideMarker.dir=1;for(D=b.row+1;D0)for(var L=0;L=this.$highlightIndentGuideMarker.start+1){if(L.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(L,b)}}else for(A=n.length-1;A>=0;A--){L=n[A];if(this.$highlightIndentGuideMarker.end&&L.row=B;)E=this.$renderToken(X,E,V,K.substring(0,B-L)),K=K.substring(B-L),L=B,X=this.$createLineElement(),n.appendChild(X),X.appendChild(this.dom.createTextNode(D.stringRepeat(" ",A.indent),this.element)),E=0,B=A[++R]||Number.MAX_VALUE;0!=K.length&&(L+=K.length,E=this.$renderToken(X,E,V,K))}}A[A.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(X,E,null,"",!0)},Text.prototype.$renderSimpleLine=function(n,b){for(var A=0,L=0;Lthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,A,R,D);A=this.$renderToken(n,A,R,D)}}},Text.prototype.$renderOverflowMessage=function(n,b,A,L,R){A&&this.$renderToken(n,b,A,L.slice(0,this.MAX_LINE_LENGTH-b));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=R?"":"",n.appendChild(D)},Text.prototype.$renderLine=function(n,b,A){if(A||0==A||(A=this.session.getFoldLine(b)),A)var L=this.$getFoldLineTokens(b,A);else L=this.session.getTokens(b);var R=n;if(L.length){var D=this.session.getRowSplitData(b);if(D&&D.length){this.$renderWrappedLine(n,L,D);R=n.lastChild}else{R=n;this.$useLineGroups()&&(R=this.$createLineElement(),n.appendChild(R)),this.$renderSimpleLine(R,L)}}else this.$useLineGroups()&&(R=this.$createLineElement(),n.appendChild(R));if(this.showEOL&&R){A&&(b=A.end.row);var B=this.dom.createElement("span");B.className="ace_invisible ace_invisible_eol",B.textContent=b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,R.appendChild(B)}},Text.prototype.$getFoldLineTokens=function(n,b){var A=this.session,L=[];var R=A.getTokens(n);return b.walk((function(n,b,D,B,E){null!=n?L.push({type:"fold",value:n}):(E&&(R=A.getTokens(b)),R.length&&function addTokens(n,b,A){for(var R=0,D=0;D+n[R].value.lengthA-b&&(B=B.substring(0,A-b)),L.push({type:n[R].type,value:B}),D=b+B.length,R+=1);DA?L.push({type:n[R].type,value:B.substring(0,A-D)}):L.push(n[R]),D+=B.length,R+=1}}(R,B,D))}),b.end.row,this.session.getLine(b.end.row).length),L},Text.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},Text}();V.prototype.EOF_CHAR="¶",V.prototype.EOL_CHAR_LF="¬",V.prototype.EOL_CHAR_CRLF="¤",V.prototype.EOL_CHAR=V.prototype.EOL_CHAR_LF,V.prototype.TAB_CHAR="—",V.prototype.SPACE_CHAR="·",V.prototype.$padding=0,V.prototype.MAX_LINE_LENGTH=1e4,V.prototype.showInvisibles=!1,V.prototype.showSpaces=!1,V.prototype.showTabs=!1,V.prototype.showEOL=!1,V.prototype.displayIndentGuides=!0,V.prototype.$highlightIndentGuides=!0,V.prototype.$tabStrings=[],V.prototype.destroy={},V.prototype.onChangeTabSize=V.prototype.$computeTabString,L.implement(V.prototype,E),b.Text=V})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=function(){function Cursor(n){this.element=L.createElement("div"),this.element.className="ace_layer ace_cursor-layer",n.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),L.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return Cursor.prototype.$updateOpacity=function(n){for(var b=this.cursors,A=b.length;A--;)L.setStyle(b[A].style,"opacity",n?"":"0")},Cursor.prototype.$startCssAnimation=function(){for(var n=this.cursors,b=n.length;b--;)n[b].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&L.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},Cursor.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,L.removeCssClass(this.element,"ace_animate-blinking")},Cursor.prototype.setPadding=function(n){this.$padding=n},Cursor.prototype.setSession=function(n){this.session=n},Cursor.prototype.setBlinking=function(n){n!=this.isBlinking&&(this.isBlinking=n,this.restartTimer())},Cursor.prototype.setBlinkInterval=function(n){n!=this.blinkInterval&&(this.blinkInterval=n,this.restartTimer())},Cursor.prototype.setSmoothBlinking=function(n){n!=this.smoothBlinking&&(this.smoothBlinking=n,L.setCssClass(this.element,"ace_smooth-blinking",n),this.$updateCursors(!0),this.restartTimer())},Cursor.prototype.addCursor=function(){var n=L.createElement("div");return n.className="ace_cursor",this.element.appendChild(n),this.cursors.push(n),n},Cursor.prototype.removeCursor=function(){if(this.cursors.length>1){var n=this.cursors.pop();return n.parentNode.removeChild(n),n}},Cursor.prototype.hideCursor=function(){this.isVisible=!1,L.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},Cursor.prototype.showCursor=function(){this.isVisible=!0,L.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},Cursor.prototype.restartTimer=function(){var n=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,L.removeCssClass(this.element,"ace_smooth-blinking")),n(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&L.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),L.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var b=function(){this.timeoutId=setTimeout((function(){n(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){n(!0),b()}),this.blinkInterval),b()}else this.$stopCssAnimation()},Cursor.prototype.getPixelPosition=function(n,b){if(!this.config||!this.session)return{left:0,top:0};n||(n=this.session.selection.getCursor());var A=this.session.documentToScreenPosition(n);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,n.row)?this.session.$bidiHandler.getPosLeft(A.column):A.column*this.config.characterWidth),top:(A.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight}},Cursor.prototype.isCursorInView=function(n,b){return n.top>=0&&n.topn.height+n.offset||B.top<0)&&A>1)){var E=this.cursors[R++]||this.addCursor(),X=E.style;this.drawCursor?this.drawCursor(E,B,n,b[A],this.session):this.isCursorInView(B,n)?(L.setStyle(X,"display","block"),L.translate(E,B.left,B.top),L.setStyle(X,"width",Math.round(n.characterWidth)+"px"),L.setStyle(X,"height",n.lineHeight+"px")):L.setStyle(X,"display","none")}}for(;this.cursors.length>R;)this.removeCursor();var $=this.session.getOverwrite();this.$setOverwrite($),this.$pixelPos=B,this.restartTimer()},Cursor.prototype.$setOverwrite=function(n){n!=this.overwrite&&(this.overwrite=n,n?L.addCssClass(this.element,"ace_overwrite-cursors"):L.removeCssClass(this.element,"ace_overwrite-cursors"))},Cursor.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},Cursor}();R.prototype.$padding=0,R.prototype.drawCursor=null,b.Cursor=R})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("./lib/oop"),B=n("./lib/dom"),E=n("./lib/event"),X=n("./lib/event_emitter").EventEmitter,$=32768,V=function(){function Scrollbar(n,b){this.element=B.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+b,this.inner=B.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,E.addListener(this.element,"scroll",this.onScroll.bind(this)),E.addListener(this.element,"mousedown",E.preventDefault)}return Scrollbar.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},Scrollbar}();D.implement(V.prototype,X);var K=function(n){function VScrollBar(b,A){var L=n.call(this,b,"-v")||this;return L.scrollTop=0,L.scrollHeight=0,A.$scrollbarWidth=L.width=B.scrollbarWidth(b.ownerDocument),L.inner.style.width=L.element.style.width=(L.width||15)+5+"px",L.$minWidth=0,L}return R(VScrollBar,n),VScrollBar.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var n=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-n)/(this.coeff-n)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},VScrollBar.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},VScrollBar.prototype.setHeight=function(n){this.element.style.height=n+"px"},VScrollBar.prototype.setScrollHeight=function(n){this.scrollHeight=n,n>$?(this.coeff=$/n,n=$):1!=this.coeff&&(this.coeff=1),this.inner.style.height=n+"px"},VScrollBar.prototype.setScrollTop=function(n){this.scrollTop!=n&&(this.skipEvent=!0,this.scrollTop=n,this.element.scrollTop=n*this.coeff)},VScrollBar}(V);K.prototype.setInnerHeight=K.prototype.setScrollHeight;var Q=function(n){function HScrollBar(b,A){var L=n.call(this,b,"-h")||this;return L.scrollLeft=0,L.height=A.$scrollbarWidth,L.inner.style.height=L.element.style.height=(L.height||15)+5+"px",L}return R(HScrollBar,n),HScrollBar.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},HScrollBar.prototype.getHeight=function(){return this.isVisible?this.height:0},HScrollBar.prototype.setWidth=function(n){this.element.style.width=n+"px"},HScrollBar.prototype.setInnerWidth=function(n){this.inner.style.width=n+"px"},HScrollBar.prototype.setScrollWidth=function(n){this.inner.style.width=n+"px"},HScrollBar.prototype.setScrollLeft=function(n){this.scrollLeft!=n&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=n)},HScrollBar}(V);b.ScrollBar=K,b.ScrollBarV=K,b.ScrollBarH=Q,b.VScrollBar=K,b.HScrollBar=Q})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("./lib/oop"),B=n("./lib/dom"),E=n("./lib/event"),X=n("./lib/event_emitter").EventEmitter;B.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var $=function(){function ScrollBar(n,b){this.element=B.createElement("div"),this.element.className="ace_sb"+b,this.inner=B.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,E.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return ScrollBar.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},ScrollBar}();D.implement($.prototype,X);var V=function(n){function VScrollBar(b,A){var L=n.call(this,b,"-v")||this;return L.scrollTop=0,L.scrollHeight=0,L.parent=b,L.width=L.VScrollWidth,L.renderer=A,L.inner.style.width=L.element.style.width=(L.width||15)+"px",L.$minWidth=0,L}return R(VScrollBar,n),VScrollBar.prototype.onMouseDown=function(n,b){if("mousedown"===n&&0===E.getButton(b)&&2!==b.detail){if(b.target===this.inner){var A=this,L=b.clientY,R=b.clientY,D=this.thumbTop;E.capture(this.inner,(function(n){L=n.clientY}),(function(){clearInterval(B)}));var B=setInterval((function(){if(void 0!==L){var n=A.scrollTopFromThumbTop(D+L-R);n!==A.scrollTop&&A._emit("scroll",{data:n})}}),20);return E.preventDefault(b)}var X=b.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(X)}),E.preventDefault(b)}},VScrollBar.prototype.getHeight=function(){return this.height},VScrollBar.prototype.scrollTopFromThumbTop=function(n){var b=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(b|=0)<0?b=0:b>this.pageHeight-this.viewHeight&&(b=this.pageHeight-this.viewHeight),b},VScrollBar.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},VScrollBar.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},VScrollBar.prototype.setScrollHeight=function(n,b){(this.pageHeight!==n||b)&&(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},VScrollBar.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},VScrollBar}($);V.prototype.setInnerHeight=V.prototype.setScrollHeight;var K=function(n){function HScrollBar(b,A){var L=n.call(this,b,"-h")||this;return L.scrollLeft=0,L.scrollWidth=0,L.height=L.HScrollHeight,L.inner.style.height=L.element.style.height=(L.height||12)+"px",L.renderer=A,L}return R(HScrollBar,n),HScrollBar.prototype.onMouseDown=function(n,b){if("mousedown"===n&&0===E.getButton(b)&&2!==b.detail){if(b.target===this.inner){var A=this,L=b.clientX,R=b.clientX,D=this.thumbLeft;E.capture(this.inner,(function(n){L=n.clientX}),(function(){clearInterval(B)}));var B=setInterval((function(){if(void 0!==L){var n=A.scrollLeftFromThumbLeft(D+L-R);n!==A.scrollLeft&&A._emit("scroll",{data:n})}}),20);return E.preventDefault(b)}var X=b.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(X)}),E.preventDefault(b)}},HScrollBar.prototype.getHeight=function(){return this.isVisible?this.height:0},HScrollBar.prototype.scrollLeftFromThumbLeft=function(n){var b=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(b|=0)<0?b=0:b>this.pageWidth-this.viewWidth&&(b=this.pageWidth-this.viewWidth),b},HScrollBar.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},HScrollBar.prototype.setScrollWidth=function(n,b){(this.pageWidth!==n||b)&&(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},HScrollBar.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},HScrollBar}($);K.prototype.setInnerWidth=K.prototype.setScrollWidth,b.ScrollBar=V,b.ScrollBarV=V,b.ScrollBarH=K,b.VScrollBar=V,b.HScrollBar=K})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(n,b,A){"use strict";var L=n("./lib/event"),R=function(){function RenderLoop(n,b){this.onRender=n,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=b||window;var A=this;this._flush=function(n){A.pending=!1;var b=A.changes;if(b&&(L.blockIdle(100),A.changes=0,A.onRender(b)),A.changes){if(A.$recursionLimit--<0)return;A.schedule()}else A.$recursionLimit=2}}return RenderLoop.prototype.schedule=function(n){this.changes=this.changes|n,this.changes&&!this.pending&&(L.nextFrame(this._flush),this.pending=!0)},RenderLoop.prototype.clear=function(n){var b=this.changes;return this.changes=0,b},RenderLoop}();b.RenderLoop=R})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(n,b,A){var L=n("../lib/oop"),R=n("../lib/dom"),D=n("../lib/lang"),B=n("../lib/event"),E=n("../lib/useragent"),X=n("../lib/event_emitter").EventEmitter,$=512,V="function"==typeof ResizeObserver,K=200,Q=function(){function FontMetrics(n){this.el=R.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=R.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=R.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),n.appendChild(this.el),this.$measureNode.textContent=D.stringRepeat("X",$),this.$characterSize={width:0,height:0},V?this.$addObserver():this.checkForSizeChanges()}return FontMetrics.prototype.$setMeasureNodeStyles=function(n,b){n.width=n.height="auto",n.left=n.top="0px",n.visibility="hidden",n.position="absolute",n.whiteSpace="pre",E.isIE<8?n["font-family"]="inherit":n.font="inherit",n.overflow=b?"hidden":"visible"},FontMetrics.prototype.checkForSizeChanges=function(n){if(void 0===n&&(n=this.$measureSizes()),n&&(this.$characterSize.width!==n.width||this.$characterSize.height!==n.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=n,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===n.width&&b.height===n.height,this._emit("changeCharacterSize",{data:n})}},FontMetrics.prototype.$addObserver=function(){var n=this;this.$observer=new window.ResizeObserver((function(b){n.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},FontMetrics.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var n=this;return this.$pollSizeChangesTimer=B.onIdle((function cb(){n.checkForSizeChanges(),B.onIdle(cb,500)}),500)},FontMetrics.prototype.setPolling=function(n){n?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},FontMetrics.prototype.$measureSizes=function(n){var b={height:(n||this.$measureNode).clientHeight,width:(n||this.$measureNode).clientWidth/$};return 0===b.width||0===b.height?null:b},FontMetrics.prototype.$measureCharWidth=function(n){return this.$main.textContent=D.stringRepeat(n,$),this.$main.getBoundingClientRect().width/$},FontMetrics.prototype.getCharacterWidth=function(n){var b=this.charSizes[n];return void 0===b&&(b=this.charSizes[n]=this.$measureCharWidth(n)/this.$characterSize.width),b},FontMetrics.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},FontMetrics.prototype.$getZoom=function(n){return n&&n.parentElement?(Number(window.getComputedStyle(n).zoom)||1)*this.$getZoom(n.parentElement):1},FontMetrics.prototype.$initTransformMeasureNodes=function(){var t=function(n,b){return["div",{style:"position: absolute;top:"+n+"px;left:"+b+"px;"}]};this.els=R.buildDom([t(0,0),t(K,0),t(0,K),t(K,K)],this.el)},FontMetrics.prototype.transformCoordinates=function(n,b){n&&(n=mul(1/this.$getZoom(this.el),n));function solve(n,b,A){var L=n[1]*b[0]-n[0]*b[1];return[(-b[1]*A[0]+b[0]*A[1])/L,(+n[1]*A[0]-n[0]*A[1])/L]}function sub(n,b){return[n[0]-b[0],n[1]-b[1]]}function add(n,b){return[n[0]+b[0],n[1]+b[1]]}function mul(n,b){return[n*b[0],n*b[1]]}function p(n){var b=n.getBoundingClientRect();return[b.left,b.top]}this.els||this.$initTransformMeasureNodes();var A=p(this.els[0]),L=p(this.els[1]),R=p(this.els[2]),D=p(this.els[3]),B=solve(sub(D,L),sub(D,R),sub(add(L,R),add(D,A))),E=mul(1+B[0],sub(L,A)),X=mul(1+B[1],sub(R,A));if(b){var $=b,V=B[0]*$[0]/K+B[1]*$[1]/K+1,Q=add(mul($[0],E),mul($[1],X));return add(mul(1/V/K,Q),A)}var tt=sub(n,A),ot=solve(sub(E,mul(B[0],tt)),sub(X,mul(B[1],tt)),tt);return mul(K,ot)},FontMetrics}();Q.prototype.$characterSize={width:0,height:0},L.implement(Q.prototype,X),b.FontMetrics=Q})),ace.define("ace/css/editor-css",["require","exports","module"],(function(n,b,A){A.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=n("../lib/oop"),D=n("../lib/event_emitter").EventEmitter,B=function(){function Decorator(n,b){this.canvas=L.createElement("canvas"),this.renderer=b,this.pixelRatio=1,this.maxHeight=b.layerConfig.maxHeight,this.lineHeight=b.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas)}return Decorator.prototype.$updateDecorators=function(n){var b=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;n&&(this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,(n.lastRow+1)*this.lineHeightb.priority?1:0}));for(var D=this.renderer.session.$foldData,B=0;Bthis.canvasHeight&&(Q=this.canvasHeight-this.halfMinDecorationHeight),V=Math.round(Q-this.halfMinDecorationHeight),K=Math.round(Q+this.halfMinDecorationHeight)}A.fillStyle=b[L[B].type]||null,A.fillRect(0,$,this.canvasWidth,K-V)}}var tt=this.renderer.session.selection.getCursor();if(tt){X=this.compensateFoldRows(tt.row,D),$=Math.round((tt.row-X)*this.lineHeight*this.heightRatio);A.fillStyle="rgba(0, 0, 0, 0.5)",A.fillRect(0,$,this.canvasWidth,2)}},Decorator.prototype.compensateFoldRows=function(n,b){var A=0;if(b&&b.length>0)for(var L=0;Lb[L].start.row&&n=b[L].end.row&&(A+=b[L].end.row-b[L].start.row);return A},Decorator}();R.implement(B.prototype,D),b.Decorator=B})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(n,b,A){"use strict";var L=n("./lib/oop"),R=n("./lib/dom"),D=n("./lib/lang"),B=n("./config"),E=n("./layer/gutter").Gutter,X=n("./layer/marker").Marker,$=n("./layer/text").Text,V=n("./layer/cursor").Cursor,K=n("./scrollbar").HScrollBar,Q=n("./scrollbar").VScrollBar,tt=n("./scrollbar_custom").HScrollBar,ot=n("./scrollbar_custom").VScrollBar,nt=n("./renderloop").RenderLoop,it=n("./layer/font_metrics").FontMetrics,rt=n("./lib/event_emitter").EventEmitter,st=n("./css/editor-css"),pt=n("./layer/decorators").Decorator,lt=n("./lib/useragent"),ut=n("./layer/text_util").isTextToken;R.importCssString(st,"ace_editor.css",!1);var bt=function(){function VirtualRenderer(n,b){var A=this;this.container=n||R.createElement("div"),R.addCssClass(this.container,"ace_editor"),R.HI_DPI&&R.addCssClass(this.container,"ace_hidpi"),this.setTheme(b),null==B.get("useStrictCSP")&&B.set("useStrictCSP",!1),this.$gutter=R.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=R.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=R.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new E(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new X(this.content);var L=this.$textLayer=new $(this.content);this.canvas=L.element,this.$markerFront=new X(this.content),this.$cursorLayer=new V(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new Q(this.container,this),this.scrollBarH=new K(this.container,this),this.scrollBarV.on("scroll",(function(n){A.$scrollAnimation||A.session.setScrollTop(n.data-A.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(n){A.$scrollAnimation||A.session.setScrollLeft(n.data-A.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new it(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(n){A.updateCharacterSize(),A.onResize(!0,A.gutterWidth,A.$size.width,A.$size.height),A._signal("changeCharacterSize",n)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!lt.isIOS,this.$loop=new nt(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),B.resetOptions(this),B._signal("renderer",this)}return VirtualRenderer.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),R.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},VirtualRenderer.prototype.setSession=function(n){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=n,n&&this.scrollMargin.top&&n.getScrollTop()<=0&&n.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(n),this.$markerBack.setSession(n),this.$markerFront.setSession(n),this.$gutterLayer.setSession(n),this.$textLayer.setSession(n),n&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},VirtualRenderer.prototype.updateLines=function(n,b,A){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>n&&(this.$changedLines.firstRow=n),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},VirtualRenderer.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},VirtualRenderer.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},VirtualRenderer.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},VirtualRenderer.prototype.updateFull=function(n){n?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},VirtualRenderer.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},VirtualRenderer.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},VirtualRenderer.prototype.onResize=function(n,b,A,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=n?1:0;var R=this.container;L||(L=R.clientHeight||R.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(R.style.height&&"0px"!=R.style.height||(R.style.height="1px",L=R.clientHeight||R.scrollHeight)),A||(A=R.clientWidth||R.scrollWidth);var D=this.$updateCachedSize(n,b,A,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!A&&!L)return this.resizing=0;n&&(this.$gutterLayer.$padding=null),n?this.$renderChanges(D|this.$changes,!0):this.$loop.schedule(D|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},VirtualRenderer.prototype.$updateCachedSize=function(n,b,A,L){L-=this.$extraHeight||0;var D=0,B=this.$size,E={width:B.width,height:B.height,scrollerHeight:B.scrollerHeight,scrollerWidth:B.scrollerWidth};if(L&&(n||B.height!=L)&&(B.height=L,D|=this.CHANGE_SIZE,B.scrollerHeight=B.height,this.$horizScroll&&(B.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(B.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",D|=this.CHANGE_SCROLL),A&&(n||B.width!=A)){D|=this.CHANGE_SIZE,B.width=A,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,R.setStyle(this.scrollBarH.element.style,"left",b+"px"),R.setStyle(this.scroller.style,"left",b+this.margin.left+"px"),B.scrollerWidth=Math.max(0,A-b-this.scrollBarV.getWidth()-this.margin.h),R.setStyle(this.$gutter.style,"left",this.margin.left+"px");var X=this.scrollBarV.getWidth()+"px";R.setStyle(this.scrollBarH.element.style,"right",X),R.setStyle(this.scroller.style,"right",X),R.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(B.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||n)&&(D|=this.CHANGE_FULL)}return B.$dirty=!A||!L,D&&this._signal("resize",E),D},VirtualRenderer.prototype.onGutterResize=function(n){var b=this.$showGutter?n:0;b!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,b,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},VirtualRenderer.prototype.adjustWrapLimit=function(){var n=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(n/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},VirtualRenderer.prototype.setAnimatedScroll=function(n){this.setOption("animatedScroll",n)},VirtualRenderer.prototype.getAnimatedScroll=function(){return this.$animatedScroll},VirtualRenderer.prototype.setShowInvisibles=function(n){this.setOption("showInvisibles",n),this.session.$bidiHandler.setShowInvisibles(n)},VirtualRenderer.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},VirtualRenderer.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},VirtualRenderer.prototype.setDisplayIndentGuides=function(n){this.setOption("displayIndentGuides",n)},VirtualRenderer.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},VirtualRenderer.prototype.setHighlightIndentGuides=function(n){this.setOption("highlightIndentGuides",n)},VirtualRenderer.prototype.setShowPrintMargin=function(n){this.setOption("showPrintMargin",n)},VirtualRenderer.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},VirtualRenderer.prototype.setPrintMarginColumn=function(n){this.setOption("printMarginColumn",n)},VirtualRenderer.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},VirtualRenderer.prototype.getShowGutter=function(){return this.getOption("showGutter")},VirtualRenderer.prototype.setShowGutter=function(n){return this.setOption("showGutter",n)},VirtualRenderer.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},VirtualRenderer.prototype.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)},VirtualRenderer.prototype.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)},VirtualRenderer.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},VirtualRenderer.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var n=R.createElement("div");n.className="ace_layer ace_print-margin-layer",this.$printMarginEl=R.createElement("div"),this.$printMarginEl.className="ace_print-margin",n.appendChild(this.$printMarginEl),this.content.insertBefore(n,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},VirtualRenderer.prototype.getContainerElement=function(){return this.container},VirtualRenderer.prototype.getMouseEventTarget=function(){return this.scroller},VirtualRenderer.prototype.getTextAreaContainer=function(){return this.container},VirtualRenderer.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var n=this.textarea.style,b=this.$composition;if(this.$keepTextAreaAtCursor||b){var A=this.$cursorLayer.$pixelPos;if(A){b&&b.markerRange&&(A=this.$cursorLayer.getPixelPosition(b.markerRange.start,!0));var L=this.layerConfig,D=A.top,B=A.left;D-=L.offset;var E=b&&b.useTextareaForIME||lt.isMobile?this.lineHeight:1;if(D<0||D>L.height-E)R.translate(this.textarea,0,0);else{var X=1,$=this.$size.height-E;if(b)if(b.useTextareaForIME){var V=this.textarea.value;X=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else D+=this.lineHeight+2;else D+=this.lineHeight;(B-=this.scrollLeft)>this.$size.scrollerWidth-X&&(B=this.$size.scrollerWidth-X),B+=this.gutterWidth+this.margin.left,R.setStyle(n,"height",E+"px"),R.setStyle(n,"width",X+"px"),R.translate(this.textarea,Math.min(B,this.$size.scrollerWidth-X),Math.min(D,$))}}}else R.translate(this.textarea,-100,0)}},VirtualRenderer.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},VirtualRenderer.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},VirtualRenderer.prototype.getLastFullyVisibleRow=function(){var n=this.layerConfig,b=n.lastRow;return this.session.documentToScreenRow(b,0)*n.lineHeight-this.session.getScrollTop()>n.height-n.lineHeight?b-1:b},VirtualRenderer.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},VirtualRenderer.prototype.setPadding=function(n){this.$padding=n,this.$textLayer.setPadding(n),this.$cursorLayer.setPadding(n),this.$markerFront.setPadding(n),this.$markerBack.setPadding(n),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},VirtualRenderer.prototype.setScrollMargin=function(n,b,A,L){var R=this.scrollMargin;R.top=0|n,R.bottom=0|b,R.right=0|L,R.left=0|A,R.v=R.top+R.bottom,R.h=R.left+R.right,R.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-R.top),this.updateFull()},VirtualRenderer.prototype.setMargin=function(n,b,A,L){var R=this.margin;R.top=0|n,R.bottom=0|b,R.right=0|L,R.left=0|A,R.v=R.top+R.bottom,R.h=R.left+R.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},VirtualRenderer.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},VirtualRenderer.prototype.setHScrollBarAlwaysVisible=function(n){this.setOption("hScrollBarAlwaysVisible",n)},VirtualRenderer.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},VirtualRenderer.prototype.setVScrollBarAlwaysVisible=function(n){this.setOption("vScrollBarAlwaysVisible",n)},VirtualRenderer.prototype.$updateScrollBarV=function(){var n=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(n-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>n-b&&(n=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(n+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},VirtualRenderer.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},VirtualRenderer.prototype.freeze=function(){this.$frozen=!0},VirtualRenderer.prototype.unfreeze=function(){this.$frozen=!1},VirtualRenderer.prototype.$renderChanges=function(n,b){if(this.$changes&&(n|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(n||b)){if(this.$size.$dirty)return this.$changes|=n,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",n),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var A=this.layerConfig;if(n&this.CHANGE_FULL||n&this.CHANGE_SIZE||n&this.CHANGE_TEXT||n&this.CHANGE_LINES||n&this.CHANGE_SCROLL||n&this.CHANGE_H_SCROLL){if(n|=this.$computeLayerConfig()|this.$loop.clear(),A.firstRow!=this.layerConfig.firstRow&&A.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(A.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,n|=this.CHANGE_SCROLL,n|=this.$computeLayerConfig()|this.$loop.clear())}A=this.layerConfig,this.$updateScrollBarV(),n&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),R.translate(this.content,-this.scrollLeft,-A.offset);var D=A.width+2*this.$padding+"px",B=A.minHeight+"px";R.setStyle(this.content.style,"width",D),R.setStyle(this.content.style,"height",B)}if(n&this.CHANGE_H_SCROLL&&(R.translate(this.content,-this.scrollLeft,-A.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),n&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),void this._signal("afterRender",n);if(n&this.CHANGE_SCROLL)return this.$changedLines=null,n&this.CHANGE_TEXT||n&this.CHANGE_LINES?this.$textLayer.update(A):this.$textLayer.scrollLines(A),this.$showGutter&&(n&this.CHANGE_GUTTER||n&this.CHANGE_LINES?this.$gutterLayer.update(A):this.$gutterLayer.scrollLines(A)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),void this._signal("afterRender",n);n&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_LINES?((this.$updateLines()||n&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_TEXT||n&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)),n&this.CHANGE_CURSOR&&(this.$cursorLayer.update(A),this.$moveTextAreaToCursor()),n&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(A),n&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(A),this._signal("afterRender",n)}else this.$changes|=n},VirtualRenderer.prototype.$autosize=function(){var n=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,A=Math.min(b,Math.max((this.$minLines||1)*this.lineHeight,n))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(A+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&A>this.$maxPixelHeight&&(A=this.$maxPixelHeight);var L=!(A<=2*this.lineHeight)&&n>b;if(A!=this.desiredHeight||this.$size.height!=this.desiredHeight||L!=this.$vScroll){L!=this.$vScroll&&(this.$vScroll=L,this.scrollBarV.setVisible(L));var R=this.container.clientWidth;this.container.style.height=A+"px",this.$updateCachedSize(!0,this.$gutterWidth,R,A),this.desiredHeight=A,this._signal("autosize")}},VirtualRenderer.prototype.$computeLayerConfig=function(){var n=this.session,b=this.$size,A=b.height<=2*this.lineHeight,L=this.session.getScreenLength()*this.lineHeight,R=this.$getLongestLine(),D=!A&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-R-2*this.$padding<0),B=this.$horizScroll!==D;B&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var E=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var X=b.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;L+=$;var V=this.scrollMargin;this.session.setScrollTop(Math.max(-V.top,Math.min(this.scrollTop,L-b.scrollerHeight+V.bottom))),this.session.setScrollLeft(Math.max(-V.left,Math.min(this.scrollLeft,R+2*this.$padding-b.scrollerWidth+V.right)));var K=!A&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-L+$<0||this.scrollTop>V.top),Q=E!==K;Q&&(this.$vScroll=K,this.scrollBarV.setVisible(K));var tt,ot,nt=this.scrollTop%this.lineHeight,it=Math.ceil(X/this.lineHeight)-1,rt=Math.max(0,Math.round((this.scrollTop-nt)/this.lineHeight)),st=rt+it,pt=this.lineHeight;rt=n.screenToDocumentRow(rt,0);var lt=n.getFoldLine(rt);lt&&(rt=lt.start.row),tt=n.documentToScreenRow(rt,0),ot=n.getRowLength(rt)*pt,st=Math.min(n.screenToDocumentRow(st,0),n.getLength()-1),X=b.scrollerHeight+n.getRowLength(st)*pt+ot,nt=this.scrollTop-tt*pt;var ut=0;return(this.layerConfig.width!=R||B)&&(ut=this.CHANGE_H_SCROLL),(B||Q)&&(ut|=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),Q&&(R=this.$getLongestLine())),this.layerConfig={width:R,padding:this.$padding,firstRow:rt,firstRowScreen:tt,lastRow:st,lineHeight:pt,characterWidth:this.characterWidth,minHeight:X,maxHeight:L,offset:nt,gutterOffset:pt?Math.max(0,Math.ceil((nt+b.height-b.scrollerHeight)/pt)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(R-this.$padding),ut},VirtualRenderer.prototype.$updateLines=function(){if(this.$changedLines){var n=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var A=this.layerConfig;if(!(n>A.lastRow+1||bthis.$textLayer.MAX_LINE_LENGTH&&(n=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(n*this.characterWidth))},VirtualRenderer.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},VirtualRenderer.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},VirtualRenderer.prototype.addGutterDecoration=function(n,b){this.$gutterLayer.addGutterDecoration(n,b)},VirtualRenderer.prototype.removeGutterDecoration=function(n,b){this.$gutterLayer.removeGutterDecoration(n,b)},VirtualRenderer.prototype.updateBreakpoints=function(n){this._rows=n,this.$loop.schedule(this.CHANGE_GUTTER)},VirtualRenderer.prototype.setAnnotations=function(n){this.$gutterLayer.setAnnotations(n),this.$loop.schedule(this.CHANGE_GUTTER)},VirtualRenderer.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},VirtualRenderer.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},VirtualRenderer.prototype.showCursor=function(){this.$cursorLayer.showCursor()},VirtualRenderer.prototype.scrollSelectionIntoView=function(n,b,A){this.scrollCursorIntoView(n,A),this.scrollCursorIntoView(b,A)},VirtualRenderer.prototype.scrollCursorIntoView=function(n,b,A){if(0!==this.$size.scrollerHeight){var L=this.$cursorLayer.getPixelPosition(n),R=L.left,D=L.top,B=A&&A.top||0,E=A&&A.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var X=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;X+B>D?(b&&X+B>D+this.lineHeight&&(D-=b*this.$size.scrollerHeight),0===D&&(D=-this.scrollMargin.top),this.session.setScrollTop(D)):X+this.$size.scrollerHeight-E=1-this.scrollMargin.top||(b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(n<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(n>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},VirtualRenderer.prototype.pixelToScreenCoordinates=function(n,b){var A;if(this.$hasCssTransforms){A={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([n,b]);n=L[1]-this.gutterWidth-this.margin.left,b=L[0]}else A=this.scroller.getBoundingClientRect();var R=n+this.scrollLeft-A.left-this.$padding,D=R/this.characterWidth,B=Math.floor((b+this.scrollTop-A.top)/this.lineHeight),E=this.$blockCursor?Math.floor(D):Math.round(D);return{row:B,column:E,side:D-E>0?1:-1,offsetX:R}},VirtualRenderer.prototype.screenToTextCoordinates=function(n,b){var A;if(this.$hasCssTransforms){A={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([n,b]);n=L[1]-this.gutterWidth-this.margin.left,b=L[0]}else A=this.scroller.getBoundingClientRect();var R=n+this.scrollLeft-A.left-this.$padding,D=R/this.characterWidth,B=this.$blockCursor?Math.floor(D):Math.round(D),E=Math.floor((b+this.scrollTop-A.top)/this.lineHeight);return this.session.screenToDocumentPosition(E,Math.max(B,0),R)},VirtualRenderer.prototype.textToScreenCoordinates=function(n,b){var A=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(n,b),R=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,n)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),D=L.row*this.lineHeight;return{pageX:A.left+R-this.scrollLeft,pageY:A.top+D-this.scrollTop}},VirtualRenderer.prototype.visualizeFocus=function(){R.addCssClass(this.container,"ace_focus")},VirtualRenderer.prototype.visualizeBlur=function(){R.removeCssClass(this.container,"ace_focus")},VirtualRenderer.prototype.showComposition=function(n){this.$composition=n,n.cssText||(n.cssText=this.textarea.style.cssText),null==n.useTextareaForIME&&(n.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(R.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):n.markerId=this.session.addMarker(n.markerRange,"ace_composition_marker","text")},VirtualRenderer.prototype.setCompositionText=function(n){var b=this.session.selection.cursor;this.addToken(n,"composition_placeholder",b.row,b.column),this.$moveTextAreaToCursor()},VirtualRenderer.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),R.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var n=this.session.selection.cursor;this.removeExtraToken(n.row,n.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},VirtualRenderer.prototype.setGhostText=function(n,b){var A=this.session.selection.cursor,L=b||{row:A.row,column:A.column};this.removeGhostText();var D=this.$calculateWrappedTextChunks(n,L);this.addToken(D[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:n,position:{row:L.row,column:L.column}};var B=R.createElement("div");if(D.length>1){var E,X=this.hideTokensAfterPosition(L.row,L.column);D.slice(1).forEach((function(n){var b=R.createElement("div"),A=R.createElement("span");A.className="ace_ghost_text",n.wrapped&&(b.className="ghost_text_line_wrapped"),0===n.text.length&&(n.text=" "),A.appendChild(R.createTextNode(n.text)),b.appendChild(A),B.appendChild(b),E=b})),X.forEach((function(n){var b=R.createElement("span");ut(n.type)||(b.className="ace_"+n.type.replace(/\./g," ace_")),b.appendChild(R.createTextNode(n.value)),E.appendChild(b)})),this.$ghostTextWidget={el:B,row:L.row,column:L.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var $=this.$cursorLayer.getPixelPosition(L,!0),V=this.container.getBoundingClientRect().height,K=D.length*this.lineHeight;if(K0){var $=0;X.push(R[B].length);for(var V=0;V1||Math.abs(n.$size.height-L)>1?n.$resizeTimer.delay():n.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},VirtualRenderer}();bt.prototype.CHANGE_CURSOR=1,bt.prototype.CHANGE_MARKER=2,bt.prototype.CHANGE_GUTTER=4,bt.prototype.CHANGE_SCROLL=8,bt.prototype.CHANGE_LINES=16,bt.prototype.CHANGE_TEXT=32,bt.prototype.CHANGE_SIZE=64,bt.prototype.CHANGE_MARKER_BACK=128,bt.prototype.CHANGE_MARKER_FRONT=256,bt.prototype.CHANGE_FULL=512,bt.prototype.CHANGE_H_SCROLL=1024,bt.prototype.$changes=0,bt.prototype.$padding=null,bt.prototype.$frozen=!1,bt.prototype.STEPS=8,L.implement(bt.prototype,rt),B.defineOptions(bt.prototype,"renderer",{useResizeObserver:{set:function(n){!n&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):n&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(n){this.$textLayer.setShowInvisibles(n)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(n){"number"==typeof n&&(this.$printMarginColumn=n),this.$showPrintMargin=!!n,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(n){this.$gutter.style.display=n?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(n){this.$gutterLayer.$useSvgGutterIcons=n},initialValue:!1},showFoldedAnnotations:{set:function(n){this.$gutterLayer.$showFoldedAnnotations=n},initialValue:!1},fadeFoldWidgets:{set:function(n){R.setCssClass(this.$gutter,"ace_fade-fold-widgets",n)},initialValue:!1},showFoldWidgets:{set:function(n){this.$gutterLayer.setShowFoldWidgets(n),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(n){this.$textLayer.setDisplayIndentGuides(n)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(n){1==this.$textLayer.setHighlightIndentGuides(n)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(n){this.$gutterLayer.setHighlightGutterLine(n),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(n){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(n){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(n){"number"==typeof n&&(n+="px"),this.container.style.fontSize=n,this.updateFontSize()},initialValue:12},fontFamily:{set:function(n){this.container.style.fontFamily=n,this.updateFontSize()}},maxLines:{set:function(n){this.updateFull()}},minLines:{set:function(n){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(n){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(n){n=+n||0,this.$scrollPastEnd!=n&&(this.$scrollPastEnd=n,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(n){this.$gutterLayer.$fixedWidth=!!n,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(n){this.$updateCustomScrollbar(n)},initialValue:!1},theme:{set:function(n){this.setTheme(n)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!lt.isMobile&&!lt.isIE}}),b.VirtualRenderer=bt})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(n,b,A){"use strict";var L=n("../lib/oop"),R=n("../lib/net"),D=n("../lib/event_emitter").EventEmitter,B=n("../config");function createWorker(n){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(B.get("loadWorkerFromBlob")){var b=function $workerBlob(n){var b="importScripts('"+R.qualifyURL(n)+"');";try{return new Blob([b],{type:"application/javascript"})}catch(n){var A=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return A.append(b),A.getBlob("application/javascript")}}(n),A=(window.URL||window.webkitURL).createObjectURL(b);return new Worker(A)}return new Worker(n)}var WorkerClient=function(n){n.postMessage||(n=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=n,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){L.implement(this,D),this.$createWorkerFromOldConfig=function(b,A,L,R,D){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),B.get("packaged")||!n.toUrl)R=R||B.moduleUrl(A,"worker");else{var E=this.$normalizePath;R=R||E(n.toUrl("ace/worker/worker.js",null,"_"));var X={};b.forEach((function(b){X[b]=E(n.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=createWorker(R),D&&this.send("importScripts",D),this.$worker.postMessage({init:!0,tlns:X,module:A,classname:L}),this.$worker},this.onMessage=function(n){var b=n.data;switch(b.type){case"event":this._signal(b.name,{data:b.data});break;case"call":var A=this.callbacks[b.id];A&&(A(b.data),delete this.callbacks[b.id]);break;case"error":this.reportError(b.data);break;case"log":window.console&&console.log&&console.log.apply(console,b.data)}},this.reportError=function(n){window.console&&console.error&&console.error(n)},this.$normalizePath=function(n){return R.qualifyURL(n)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(n){n.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(n,b){this.$worker.postMessage({command:n,args:b})},this.call=function(n,b,A){if(A){var L=this.callbackId++;this.callbacks[L]=A,b.push(L)}this.send(n,b)},this.emit=function(n,b){try{b.data&&b.data.err&&(b.data.err={message:b.data.err.message,stack:b.data.err.stack,code:b.data.err.code}),this.$worker&&this.$worker.postMessage({event:n,data:{data:b.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(n){this.$doc&&this.terminate(),this.$doc=n,this.call("setValue",[n.getValue()]),n.on("change",this.changeListener,!0)},this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==n.action?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end)},this.$sendDeltaQueue=function(){var n=this.deltaQueue;n&&(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}))}}).call(WorkerClient.prototype);b.UIWorkerClient=function(n,b,A){var L=null,R=!1,E=Object.create(D),X=[],$=new WorkerClient({messageBuffer:X,terminate:function(){},postMessage:function(n){X.push(n),L&&(R?setTimeout(processNext):processNext())}});$.setEmitSync=function(n){R=n};var processNext=function(){var n=X.shift();n.command?L[n.command].apply(L,n.args):n.event&&E._signal(n.event,n.data)};return E.postMessage=function(n){$.onMessage({data:n})},E.callback=function(n,b){this.postMessage({type:"call",id:b,data:n})},E.emit=function(n,b){this.postMessage({type:"event",name:n,data:b})},B.loadModule(["worker",b],(function(n){for(L=new n[A](E);X.length;)processNext()})),$},b.WorkerClient=WorkerClient,b.createWorker=createWorker})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(n,b,A){"use strict";var L=n("./range").Range,R=n("./lib/event_emitter").EventEmitter,D=n("./lib/oop"),B=function(){function PlaceHolder(n,b,A,L,R,D){var B=this;this.length=b,this.session=n,this.doc=n.getDocument(),this.mainClass=R,this.othersClass=D,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=L,this.$onCursorChange=function(){setTimeout((function(){B.onCursorChange()}))},this.$pos=A;var E=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=E.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return PlaceHolder.prototype.setup=function(){var n=this,b=this.doc,A=this.session;this.selectionBefore=A.selection.toJSON(),A.selection.inMultiSelectMode&&A.selection.toSingleRange(),this.pos=b.createAnchor(this.$pos.row,this.$pos.column);var R=this.pos;R.$insertRight=!0,R.detach(),R.markerId=A.addMarker(new L(R.row,R.column,R.row,R.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(A){var L=b.createAnchor(A.row,A.column);L.$insertRight=!0,L.detach(),n.others.push(L)})),A.setUndoSelect(!1)},PlaceHolder.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,b=this;this.othersActive=!0,this.others.forEach((function(A){A.markerId=n.addMarker(new L(A.row,A.column,A.row,A.column+b.length),b.othersClass,null,!1)}))}},PlaceHolder.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n=this.pos.column&&b.start.column<=this.pos.column+this.length+1,D=b.start.column-this.pos.column;if(this.updateAnchors(n),R&&(this.length+=A),R&&!this.session.$fromUndo)if("insert"===n.action)for(var B=this.others.length-1;B>=0;B--){var E={row:(X=this.others[B]).row,column:X.column+D};this.doc.insertMergedLines(E,n.lines)}else if("remove"===n.action)for(B=this.others.length-1;B>=0;B--){var X;E={row:(X=this.others[B]).row,column:X.column+D};this.doc.remove(new L(E.row,E.column,E.row,E.column-A))}this.$updating=!1,this.updateMarkers()}},PlaceHolder.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var b=this.others.length;b--;)this.others[b].onChange(n);this.updateMarkers()},PlaceHolder.prototype.updateMarkers=function(){if(!this.$updating){var n=this,b=this.session,updateMarker=function(A,R){b.removeMarker(A.markerId),A.markerId=b.addMarker(new L(A.row,A.column,A.row,A.column+n.length),R,null,!1)};updateMarker(this.pos,this.mainClass);for(var A=this.others.length;A--;)updateMarker(this.others[A],this.othersClass)}},PlaceHolder.prototype.onCursorChange=function(n){if(!this.$updating&&this.session){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},PlaceHolder.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},PlaceHolder.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var n=this.session.getUndoManager(),b=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,A=0;A1?n.multiSelect.joinSelections():n.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(n){n.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(n){n.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(n){n.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],b.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(n){n.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(n){return n&&n.inMultiSelectMode}}];var L=n("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new L(b.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(n,b,A){var L=n("./range_list").RangeList,R=n("./range").Range,D=n("./selection").Selection,B=n("./mouse/multi_select_handler").onMouseDown,E=n("./lib/event"),X=n("./lib/lang"),$=n("./commands/multi_select_commands");b.commands=$.defaultCommands.concat($.multiSelectCommands);var V=new(0,n("./search").Search);var K=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(K.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(n,b){if(n){if(!this.inMultiSelectMode&&0===this.rangeCount){var A=this.toOrientedRange();if(this.rangeList.add(A),this.rangeList.add(n),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(n);this.rangeList.removeAll(),this.rangeList.add(A),this.$onAddRange(A)}n.cursor||(n.cursor=n.end);var L=this.rangeList.add(n);return this.$onAddRange(n),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(n)}},this.toSingleRange=function(n){n=n||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),n&&this.fromOrientedRange(n)},this.substractPoint=function(n){var b=this.rangeList.substractPoint(n);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var n=this.rangeList.merge();n.length&&this.$onRemoveRange(n)},this.$onAddRange=function(n){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(n),this._signal("addRange",{range:n})},this.$onRemoveRange=function(n){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();n.push(b),this.rangeCount=0}for(var A=n.length;A--;){var L=this.ranges.indexOf(n[A]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:n}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(b=b||this.ranges[0])&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new L,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var n=this.ranges.length?this.ranges:[this.getRange()],b=[],A=0;A1){var n=this.rangeList.ranges,b=n[n.length-1],A=R.fromPoints(n[0].start,b.end);this.toSingleRange(),this.setSelectionRange(A,b.cursor==b.start)}else{var L=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(L,D).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(n,b,A){var L=[],D=n.column0;)st--;if(st>0)for(var pt=0;L[pt].isEmpty();)pt++;for(var lt=st;lt>=pt;lt--)L[lt].isEmpty()&&L.splice(lt,1)}return L}}.call(D.prototype);var Q=n("./editor").Editor;function MultiSelect(n){n.$multiselectOnSessionChange||(n.$onAddRange=n.$onAddRange.bind(n),n.$onRemoveRange=n.$onRemoveRange.bind(n),n.$onMultiSelect=n.$onMultiSelect.bind(n),n.$onSingleSelect=n.$onSingleSelect.bind(n),n.$multiselectOnSessionChange=b.onSessionChange.bind(n),n.$checkMultiselectChange=n.$checkMultiselectChange.bind(n),n.$multiselectOnSessionChange(n),n.on("changeSession",n.$multiselectOnSessionChange),n.on("mousedown",B),n.commands.addCommands($.defaultCommands),function addAltCursorListeners(n){if(!n.textInput)return;var b=n.textInput.getElement(),A=!1;function reset(b){A&&(n.renderer.setMouseCursor(""),A=!1)}E.addListener(b,"keydown",(function(b){var L=18==b.keyCode&&!(b.ctrlKey||b.shiftKey||b.metaKey);n.$blockSelectEnabled&&L?A||(n.renderer.setMouseCursor("crosshair"),A=!0):A&&reset()}),n),E.addListener(b,"keyup",reset,n),E.addListener(b,"blur",reset,n)}(n))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(n){n.cursor||(n.cursor=n.end);var b=this.getSelectionStyle();return n.marker=this.session.addMarker(n,"ace_selection",b),this.session.$selectionMarkers.push(n),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,n},this.removeSelectionMarker=function(n){if(n.marker){this.session.removeMarker(n.marker);var b=this.session.$selectionMarkers.indexOf(n);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(n){for(var b=this.session.$selectionMarkers,A=n.length;A--;){var L=n[A];if(L.marker){this.session.removeMarker(L.marker);var R=b.indexOf(L);-1!=R&&b.splice(R,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(n){this.addSelectionMarker(n.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(n){this.removeSelectionMarkers(n.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(n){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler($.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(n){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler($.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(n){var b=n.command,A=n.editor;if(A.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?L=A.forEachSelection(b,n.args):"forEachLine"==b.multiSelectAction?L=A.forEachSelection(b,n.args,!0):"single"==b.multiSelectAction?(A.exitMultiSelectMode(),L=b.exec(A,n.args||{})):L=b.multiSelectAction(A,n.args||{});else{var L=b.exec(A,n.args||{});A.multiSelect.addRange(A.multiSelect.toOrientedRange()),A.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(n,b,A){if(!this.inVirtualSelectionMode){var L,R=A&&A.keepOrder,B=1==A||A&&A.$byLines,E=this.session,X=this.selection,$=X.rangeList,V=(R?X:$).ranges;if(!V.length)return n.exec?n.exec(this,b||{}):n(this,b||{});var K=X._eventRegistry;X._eventRegistry={};var Q=new D(E);this.inVirtualSelectionMode=!0;for(var tt=V.length;tt--;){if(B)for(;tt>0&&V[tt].start.row==V[tt-1].end.row;)tt--;Q.fromOrientedRange(V[tt]),Q.index=tt,this.selection=E.selection=Q;var ot=n.exec?n.exec(this,b||{}):n(this,b||{});L||void 0===ot||(L=ot),Q.toOrientedRange(V[tt])}Q.detach(),this.selection=E.selection=X,this.inVirtualSelectionMode=!1,X._eventRegistry=K,X.mergeOverlappingRanges(),X.ranges[0]&&X.fromOrientedRange(X.ranges[0]);var nt=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),nt&&nt.from==nt.to&&this.renderer.animateScrolling(nt.from),L}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var n="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,A=[],L=0;LB&&(B=A.column),LV?n.insert(L,X.stringRepeat(" ",D-V)):n.remove(new R(L.row,L.column,L.row,L.column-D+V)),b.start.column=b.end.column=B,b.start.row=b.end.row=L.row,b.cursor=b.end})),b.fromOrientedRange(A[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var V=this.selection.getRange(),K=V.start.row,Q=V.end.row,tt=K==Q;if(tt){var ot,nt=this.session.getLength();do{ot=this.session.getLine(Q)}while(/[=:]/.test(ot)&&++Q0);K<0&&(K=0),Q>=nt&&(Q=nt-1)}var it=this.session.removeFullLines(K,Q);it=this.$reAlignText(it,tt),this.session.insert({row:K,column:0},it.join("\n")+"\n"),tt||(V.start.column=0,V.end.column=it[it.length-1].length),this.selection.setRange(V)}},this.$reAlignText=function(n,b){var A,L,R,D=!0,B=!0;return n.map((function(n){var b=n.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==A?(A=b[1].length,L=b[2].length,R=b[3].length,b):(A+L+R!=b[1].length+b[2].length+b[3].length&&(B=!1),A!=b[1].length&&(D=!1),A>b[1].length&&(A=b[1].length),Lb[3].length&&(R=b[3].length),b):[n]})).map(b?alignLeft:D?B?function alignRight(n){return n[2]?spaces(A+L-n[2].length)+n[2]+spaces(R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}:alignLeft:function unAlign(n){return n[2]?spaces(A)+n[2]+spaces(R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]});function spaces(n){return X.stringRepeat(" ",n)}function alignLeft(n){return n[2]?spaces(A)+n[2]+spaces(L-n[2].length+R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}}}).call(Q.prototype),b.onSessionChange=function(n){var b=n.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var A=n.oldSession;A&&(A.multiSelect.off("addRange",this.$onAddRange),A.multiSelect.off("removeRange",this.$onRemoveRange),A.multiSelect.off("multiSelect",this.$onMultiSelect),A.multiSelect.off("singleSelect",this.$onSingleSelect),A.multiSelect.lead.off("change",this.$checkMultiselectChange),A.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=MultiSelect,n("./config").defineOptions(Q.prototype,"editor",{enableMultiselect:{set:function(n){MultiSelect(this),n?this.on("mousedown",B):this.off("mousedown",B)},value:!0},enableBlockSelect:{set:function(n){this.$blockSelectEnabled=n},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(n,b,A){"use strict";var L=n("../../range").Range,R=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(n,b,A){var L=n.getLine(A);return this.foldingStartMarker.test(L)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(L)?"end":""},this.getFoldWidgetRange=function(n,b,A){return null},this.indentationBlock=function(n,b,A){var R=/\S/,D=n.getLine(b),B=D.search(R);if(-1!=B){for(var E=A||D.length,X=n.getLength(),$=b,V=b;++b$){var tt=n.getLine(V).length;return new L($,E,V,tt)}}},this.openingBracketBlock=function(n,b,A,R,D){var B={row:A,column:R+1},E=n.$findClosingBracket(b,B,D);if(E){var X=n.foldWidgets[E.row];return null==X&&(X=n.getFoldWidget(E.row)),"start"==X&&E.row>B.row&&(E.row--,E.column=n.getLine(E.row).length),L.fromPoints(B,E)}},this.closingBracketBlock=function(n,b,A,R,D){var B={row:A,column:R},E=n.$findOpeningBracket(b,B);if(E)return E.column++,B.column--,L.fromPoints(E,B)}}).call(R.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(n,b,A){"use strict";var L=n("../line_widgets").LineWidgets,R=n("../lib/dom"),D=n("../range").Range,B=n("../config").nls;b.showErrorMarker=function(n,b){var A=n.session;A.widgetManager||(A.widgetManager=new L(A),A.widgetManager.attach(n));var E=n.getCursorPosition(),X=E.row,$=A.widgetManager.getWidgetsAtRow(X).filter((function(n){return"errorMarker"==n.type}))[0];$?$.destroy():X-=b;var V,K=function findAnnotations(n,b,A){var L=n.getAnnotations().sort(D.comparePoints);if(L.length){var R=function binarySearch(n,b,A){for(var L=0,R=n.length-1;L<=R;){var D=L+R>>1,B=A(b,n[D]);if(B>0)L=D+1;else{if(!(B<0))return D;R=D-1}}return-(L+1)}(L,{row:b,column:-1},D.comparePoints);R<0&&(R=-R-1),R>=L.length?R=A>0?0:L.length-1:0===R&&A<0&&(R=L.length-1);var B=L[R];if(B&&A){if(B.row===b){do{B=L[R+=A]}while(B&&B.row===b);if(!B)return L.slice()}var E=[];b=B.row;do{E[A<0?"unshift":"push"](B),B=L[R+=A]}while(B&&B.row==b);return E.length&&E}}}(A,X,b);if(K){var Q=K[0];E.column=(Q.pos&&"number"!=typeof Q.column?Q.pos.sc:Q.column)||0,E.row=Q.row,V=n.renderer.$gutterLayer.$annotations[E.row]}else{if($)return;V={displayText:[B("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(E.row),n.selection.moveToPosition(E);var tt={row:E.row,fixedWidth:!0,coverGutter:!0,el:R.createElement("div"),type:"errorMarker"},ot=tt.el.appendChild(R.createElement("div")),nt=tt.el.appendChild(R.createElement("div"));nt.className="error_widget_arrow "+V.className;var it=n.renderer.$cursorLayer.getPixelPosition(E).left;nt.style.left=it+n.renderer.gutterWidth-5+"px",tt.el.className="error_widget_wrapper",ot.className="error_widget "+V.className,V.displayText.forEach((function(n,b){ot.appendChild(R.createTextNode(n)),b{var L=A(7288),R={}.hasOwnProperty;L.CSSLoader=function(n){function CSSLoader(){return CSSLoader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CSSLoader,n),CSSLoader.prototype.readOpts=function(){CSSLoader.__super__.readOpts.call(this),this._cssName?this.__cssName=this._cssName:this.__cssName="cui-css-"+this.getUniqueId()},CSSLoader.prototype.initOpts=function(){return CSSLoader.__super__.initOpts.call(this),this.addOpts({cssName:{check:String}})},CSSLoader.prototype.__getCSSNodes=function(){return L.dom.matchSelector(document.documentElement,'link[name="'+this.__cssName+'"]')},CSSLoader.prototype.getActiveCSS=function(){var n,b,A,R;for(b=0,A=(R=this.__getCSSNodes()).length;b0?L.dom.insertAfter(V[V.length-1],R):document.head.appendChild(R),B.promise())},CSSLoader}(L.Element)},2295:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0}}})},CSVData.prototype.readOpts=function(){CSVData.__super__.readOpts.call(this),this.__max_column_count=0,this._rows?this.rows=this._rows:this.rows=[],this.giveAllRowsSameNumberOfColumns()},CSVData.prototype.giveAllRowsSameNumberOfColumns=function(){var n,b,A,L,R,D,B,E,X,$,V,K;for(this.__max_column_count=0,b=0,D=(E=this.rows).length;bthis.__max_column_count&&(this.__max_column_count=n);for(L=0,B=(X=this.rows).length;LV;A=$<=V?++R:--R)K[A]=""},CSVData.prototype.getMaxColumnCount=function(){return this.__max_column_count},CSVData.prototype.getRows=function(){return this.rows},CSVData.prototype.getRow=function(n){return this.rows[n]},CSVData.prototype.getRowsCount=function(){return this.rows.length},CSVData.prototype.debug=function(){return console.debug("rows:",this.rows)},CSVData.prototype.toText=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt;for(null==n&&(n={}),(Q=L.Element.readOpts(n,"CSVData.toText",{delimiter:{mandatory:!0,default:";",check:function(n){return L.util.isString(n)&&n.length>0}},quotechar:{mandatory:!0,default:'"',check:function(n){return L.util.isString(n)&&n.length>0}},always_quote:{mandatory:!0,default:!0,check:Boolean},equal_columns:{mandatory:!0,default:!0,check:Boolean},newline:{mandatory:!0,default:String.fromCharCode(10),check:function(n){return L.util.isString(n)&&n.length>0}}})).equal_columns&&this.giveAllRowsSameNumberOfColumns(),K=String.fromCharCode(10),D=String.fromCharCode(13),A=[],B=0,$=(tt=this.rows).length;B<$;B++){for(b=[],E=X=0,V=(ot=tt[B]).length;X0&&b.push(Q.delimiter),nt=L.util.isEmpty(R)?"":""+R,!!Q.always_quote||(nt.indexOf(Q.delimiter)>-1||(nt.indexOf(Q.quotechar)>-1||(nt.indexOf(K)>-1||nt.indexOf(D)>-1)))?b.push(L.CSVData.quote(nt,Q.quotechar)):b.push(nt);A.push(b.join(""))}return A.join(Q.newline)},CSVData.prototype.parse=function(n){var b,A,R,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt;return null==n&&(n={}),nt=L.Element.readOpts(n,"CSVData.parse",{text:{mandatory:!0,check:String},delimiter:{check:String},quotechar:{check:String},defer:{mandatory:!0,default:!0,check:Boolean}}),this.rows=[],st=nt.text,E=[],B=0,R=[],tt=st.length,K=0,Q=!1,ot=0,rt=[" "],A=['"',"'"],b=[",",";","\t"],X=void 0!==nt.delimiter?nt.delimiter:null,it=void 0!==nt.quotechar?nt.quotechar:null,nt.defer&&($=new L.Deferred),pt=this,V=function(){var n,lt,ut,bt,Mt,zt;for(ut=function(){E[B]=R.join(""),R.splice(0),B+=1},bt=function(){E.length>0&&(ot+=1,pt.rows.push(E),E=[]),B=0};K=0)K+=1;else if(null===it&&D.call(A,n)>=0&&(it=n),null===X&&D.call(b,n)>=0&&(X=n),n!==it||0!==R.length&&!Q)if(n!==X){if(lt=st.charCodeAt(K),zt=st.charCodeAt(K+1),13!==lt&&10!==lt)R.push(n),K+=1;else if(K+=13===lt&&10===zt?2:1,Q)R.push(String.fromCharCode(10));else if(ut(),bt(),ot%1e3==0&&nt.defer)return $.notify({row_count:ot,file_read_idx:K,file_length:tt}),void L.setTimeout({ms:10,call:V})}else{if(Q){R.push(n),K+=1;continue}ut(),K+=1}else{if(Q){if(st[K+1]===it){R.push(n),K+=2;continue}Q=!1,K+=1;continue}Q=!0,K+=1}return R.length>0&&ut(),E.length>0&&bt(),pt.giveAllRowsSameNumberOfColumns(),Mt={row_count:ot,file_length:tt,rows:pt.rows},nt.defer?$.resolve(Mt):Mt},nt.defer?(L.setTimeout({ms:0,call:V}),$.done((function(){})),$.promise()):V()},CSVData.quote=function(n,b){return null==b&&(b='"'),b+n.replace(new RegExp(L.util.escapeRegExp(b),"g"),b+b)+b},CSVData}(L.Element)},7288:function(n,b,A){var L,R;R=A(3185),L=function(){function CUI(){}var n;return CUI.__readyFuncs=[],CUI.__themes=[],CUI.__ng__=!0,CUI.start=function(){var n,b,L;return b=function(){return CUI.Events.trigger({type:"viewport-resize"})},CUI.Events.listen({type:"resize",node:window,call:function(n,A){CUI.browser.ie?CUI.scheduleCallback({ms:500,call:b}):b()}}),CUI.Events.listen({type:"drop",node:document.documentElement,call:function(n){return n.preventDefault()}}),CUI.Events.listen({type:"keyup",node:window,capture:!0,call:(L=this,function(n){"C+U+I"===n.getKeyboard()&&CUI.toaster({text:"CUI!"}),CUI.defaults.debug&&("Alt+Shift+U"===n.getKeyboard()&&L.__toggleUIElements(),"Control+Shift+U"===n.getKeyboard()&&L.__toggleUIElements(!0))})}),CUI.Events.listen({type:"keydown",node:window,call:function(n){var b,A,L,R,D;if("c+"===n.getKeyboard()&&CUI.toaster({text:"CUI!"}),8===n.keyCode()){for(b=0,A=(R=CUI.dom.elementsUntil(n.getTarget(),null,document.documentElement)).length;b=1}},timeout:{mandatory:!0,default:0,check:function(n){return n>=-1}},call:{mandatory:!0,check:function(n){return n instanceof Function}}}),b=B.chunk_size,E=B.timeout,CUI.util.assert(this!==CUI,"CUI.chunkWork","Cannot call CUI.chunkWork with 'this' not set to the caller."),L=0,R=B.items.length,X=this,D=function(){var n,$,V;$=L+1+" - "+Math.min(R,L+b)+" / "+R,A.notify({progress:$,idx:L,len:R,chunk_size:b}),n=function(){L+b>=R?A.resolve():(L+=b,-1===E?D():CUI.setTimeout({ms:E,call:D}))},!1!==(V=B.call.call(X,B.items.slice(L,L+B.chunk_size),L,R))?CUI.util.isPromise(V)?V.fail(A.reject).done(n):n():A.reject()},A=new CUI.Deferred,CUI.setTimeout({ms:Math.min(0,E),call:function(){return R>0?D():A.resolve()}}),A.promise()},CUI.chunkWorkOLD=function(n,b,A){var L,R,D;return null==b&&(b=10),null==A&&(A=0),L=new CUI.Deferred,D=0,R=function(){var B;for(B=0;D0&&this.__callTimeoutChangeCallbacks(),this.__startTimeout(B)},CUI.__scheduledCallbacks=[],CUI.scheduleCallback=function(n){var b,A,L,R,D,B;return R=CUI.Element.readOpts(n,"CUI.scheduleCallback",{call:{mandatory:!0,check:Function},ms:{default:0,check:function(n){return CUI.util.isInteger(n)&&n>=0}},track:{default:!1,check:Boolean}}),(L=CUI.util.idxInArray(R.call,this.__scheduledCallbacks,(function(n){return n.call===R.call})))>-1&&CUI.isTimeoutRunning(this.__scheduledCallbacks[L].timeoutID)&&(L=-1),-1!==L?(CUI.resetTimeout(this.__scheduledCallbacks[L].timeoutID),this.__scheduledCallbacks[L].promise):(L=this.__scheduledCallbacks.length,A=new CUI.Deferred,D=CUI.setTimeout({ms:R.ms,track:R.track,call:function(){return R.call(),A.resolve()}}),b=this.__scheduledCallbacks[L]={call:R.call,timeoutID:D,promise:A.promise()},A.done((B=this,function(){return CUI.util.removeFromArray(R.call,B.__scheduledCallbacks,(function(n){return n.call===R.call}))})),b.promise)},CUI.scheduleCallbackCancel=function(n){var b,A;return A=CUI.Element.readOpts(n,"CUI.scheduleCallbackCancel",{call:{mandatory:!0,check:Function}}),(b=CUI.util.idxInArray(A.call,this.__scheduledCallbacks,(function(n){return n.call===A.call})))>-1&&!CUI.isTimeoutRunning(this.__scheduledCallbacks[b].timeoutID)&&(CUI.clearTimeout(this.__scheduledCallbacks[b].timeoutID),this.__scheduledCallbacks.splice(b,1),!0)},CUI.utf8ArrayBufferToString=function(n){var b,A,L,R,D,B,E;for(E=[],B=(b=new Uint8Array(n)).length,D=0;D>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:E.push(String.fromCharCode(A));break;case 12:case 13:L=b[D++],E.push(String.fromCharCode((31&A)<<6|63&L));break;case 14:L=b[D++],R=b[D++],E.push(String.fromCharCode((15&A)<<12|(63&L)<<6|63&R))}return E.join("")},CUI.__startTimeout=function(n){var b;return b=window.setTimeout(n.call,n.ms),n.id||(n.id=b),n.real_id=b,n.id},CUI.countTimeouts=function(){var n,b,A,L;for(L=0,n=0,b=(A=this.__timeouts).length;n0&&$.push(","),A=R=0,B=(X=V.split(":")).length;R0&&$.push(":"),$.push(encodeURIComponent(K));return $.join("")},CUI.decodeURIComponentNicely=function(n){return decodeURIComponent((n||"").replace(/\+/g," "))},CUI.decodeUrlData=function(n,b,A,L,R){var D,B,E,X,$,V,K,Q,tt;for(null==b&&(b=null),null==A&&(A="&"),null==L&&(L="="),null==R&&(R=!1),V={},D=b?CUI.util.isFunction(b)?b:function(n){return CUI.util.stringMapReplace(n+"",b)}:function(n){return decodeURIComponent(n)},B=0,X=(Q=n.split(A)).length;B-1?(E=D(($=K.split(L))[0]),tt=D($[1])):(E=D(K),tt=""),R?(V[E]||(V[E]=[]),V[E].push(tt)):V[E]=tt);return V},CUI.decodeUrlDataArray=function(n,b,A,L){return null==b&&(b=null),null==A&&(A="&"),null==L&&(L="="),this.decodeUrlData(n,b,A,L,!0)},CUI.mergeMap=function(n,b){var A,L;for(A in b)L=b[A],n.hasOwnProperty(A)?CUI.util.isPlainObject(n[A])&&CUI.util.isPlainObject(L)&&CUI.util.mergeMap(n[A],L):n[A]=L;return n},CUI.revertMap=function(n){var b,A;for(b in A={},n)A[n[b]]=b;return A},CUI.stringMapReplace=function(n,b){var A,L;for(A in L=[],b)CUI.util.isEmpty(A)||L.push(A.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));return L.length>0?n.replace(new RegExp(L.join("|"),"g"),(function(n){return b[n]})):n},CUI.isFunction=function(n){return n&&"function"==typeof n},CUI.isPlainObject=function(n){var b;return n&&"object"==typeof n&&(null!=(b=n.constructor)?b.prototype.hasOwnProperty("isPrototypeOf"):void 0)},CUI.isEmptyObject=function(n){var b;for(b in n)return!1;return!0},CUI.isMap=function(n){return this.isPlainObject(n)},CUI.isArray=function(n){return Array.isArray(n)},CUI.inArray=function(n,b){return b.indexOf(n)},CUI.isString=function(n){return"string"==typeof n},CUI.downloadData=function(n,b){var A,L;return A=new Blob([n],{type:"octet/stream"}),window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(A,b):(L=window.URL.createObjectURL(A),this.__downloadDataElement.href=L,this.__downloadDataElement.download=b,this.__downloadDataElement.click(),window.URL.revokeObjectURL(L))},CUI.urlRegex=new RegExp("^(?:(?:(sftp|ftp|ftps|https|http))://|)(?:(\\S+?)(?::(\\S*))?@)?((?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:[a-z0-9\\u00a1-\\uffff](?:|[a-z\\u00a1-\\uffff0-9-]*[a-z0-9\\u00a1-\\uffff])\\.)*(?:[a-z\\u00a1-\\uffff]{2,})|(?:[a-z0-9\\u00a1-\\uffff][a-z0-9-\\u00a1-\\uffff]*[a-z0-9\\u00a1-\\uffff])))|)(?::(\\d{2,5}))?(?:([/?#]\\S*))?$","i"),CUI.evalCode=function(n){var b;return(b=document.createElement("script")).text=n,document.head.appendChild(b).parentNode.removeChild(b)},CUI.appendToUrl=function(n,b){var A,L;for(A in b)void 0!==(L=b[A])&&(n.match(/\?/)?n+="&":n+="?",n+=encodeURIComponent(A)+"="+encodeURIComponent(L));return n},CUI.parseLocation=function(n){var b,A,L,R,D;if(!CUI.util.isFunction(null!=n?n.match:void 0)||0===n.length)return null;try{L={protocol:(null!=(D=(R=new URL(n)).protocol)?D.replaceAll(":",""):void 0)||"",user:R.username,password:R.password,hostname:R.hostname,port:R.port,path:R.pathname,origin:"",search:R.search,hash:R.hash,href:R.href}}catch(b){if(!(A=n.match(this.urlRegex)))return null;L={protocol:A[1]||"",user:A[2]||"",password:A[3]||"",hostname:A[4]||"",port:A[5]||"",path:A[6]||"",origin:""}}return L.hostname?(L.protocol||(L.protocol="http"),L.origin=L.protocol+"://"+L.hostname,L.port&&(L.origin+=":"+L.port),L.url=L.protocol+"://",L.user&&(L.url=L.url+L.user+":"+L.password+"@"),L.url=L.url+L.hostname,L.port&&(L.url=L.url+":"+L.port)):L.url="",L.path.length>0?(b=L.path.match(/(.*?)(|\?.*?)(|\#.*)$/),L.pathname=b[1],L.search||(L.search=b[2]),"?"===L.search&&(L.search=""),L.fragment=b[3]):(L.search="",L.pathname="",L.fragment=""),L.href||(L.href=L.origin+L.path),L.hash||(L.hash=L.fragment),L.login&&(L.auth=btoa(L.user+":"+L.password)),L.url=L.url+L.path,L},CUI.escapeAttribute=function(n){return CUI.util.isNull(n)||!CUI.util.isString(n)?"":n=n.replace(/"/g,""").replace(/\'/g,"'")},CUI.loadScript=function(n){var b,A;return b=new CUI.Deferred,A=CUI.dom.element("script",{charset:"utf-8",src:n}),CUI.Events.listen({type:"load",node:A,instance:A,call:function(n){b.resolve(n)}}),CUI.Events.listen({type:"error",node:A,instance:A,call:function(n){document.head.removeChild(A),b.reject(n)}}),b.always((function(){return CUI.Events.ignore({instance:A})})),document.head.appendChild(A),b.promise()},CUI.browser=((n={opera:!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,firefox:"undefined"!=typeof InstallTrigger,safari:Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,ie:!!document.documentMode,chrome:!!window.chrome&&!!window.chrome.webstore}).edge=!n.ie&&!!window.StyleMedia,n.blink=(n.chrome||n.opera)&&!!window.CSS,n),CUI.__toggleUIElements=function(n){var b,A,L,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt;if(null==n&&(n=!1),(null!=(V=this.__uiHighlightDivs)?V.length:void 0)>0){for(R=0,B=(K=this.__uiHighlightDivs).length;RL.width?E.x:E.x+E.width),CUI.dom.setStyle(n,{top:B,left:R}),CUI.dom.setStyle(n,{zIndex:5},""),CUI.dom.hideElement(n);CUI.dom.remove(n)},D=0,E=st.length;D div"))?Q[0]:void 0)!==(null!=(tt=CUI.dom.parents(nt,"body > div"))?tt[0]:void 0))||(b=CUI.dom.div(),this.__uiHighlightDivs.push(b),A(b,it));for($=0,X=(ot=this.__uiHighlightDivs).length;$\x3c!-- /CUI.CUI --\x3e"),L.__downloadDataElement=b[1],L.dom.append(document.body,b)})),window.addEventListener?window.addEventListener("load",(function(){return L.start()})):alert("Your browser is not supported. Please update to a current version of Google Chrome, Mozilla Firefox or Internet Explorer."),n.exports=L},674:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DOMElement=function(n){function DOMElement(){return DOMElement.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DOMElement,n),DOMElement.prototype.initOpts=function(){return DOMElement.__super__.initOpts.call(this),this.addOpts({class:{default:"",check:String},id:{check:String},ui:{check:String},attr:{check:"PlainObject"}})},DOMElement.prototype.registerTemplate=function(n,b){return null==b&&(b=!0),L.util.assert(n instanceof L.Template,L.util.getObjectClass(this)+".registerDOMElement","template must be instance of Template but is "+L.util.getObjectClass(n)+".",{template:n}),this.__template&&(console.warn(L.util.getObjectClass(this)+".registerDO MElement","Already called before, destroying existing template",{template:this.__template}),this.__template.destroy()),this.__template=n,this.registerDOMElement(this.__template.DOM,b)},DOMElement.prototype.getDOMElementClasses=function(){return"cui-"+L.util.toDash(this.__cls)},DOMElement.prototype.registerDOMElement=function(n,b){return this.DOM=n,null==b&&(b=!0),b&&L.dom.addClass(this.DOM,this.getDOMElementClasses()),this._attr&&L.dom.setAttributeMap(this.DOM,this._attr),this._id&&L.dom.setAttribute(this.DOM,"id",this._id),this._class&&L.dom.addClass(this.DOM,this._class),this._ui&&L.dom.setAttribute(this.DOM,"ui",this._ui),L.dom.data(this.DOM,"element",this),this},DOMElement.prototype.getElementForLayer=function(){return this.DOM},DOMElement.prototype.unregisterDOMElement=function(){return L.dom.removeClass(this.DOM,this.getDOMElementClasses()),L.dom.removeAttribute(this.DOM,"id"),this._class&&L.dom.removeClass(this.DOM,this._class),L.dom.removeData(this.DOM,"element"),delete this.DOM,this},DOMElement.prototype.__assertDOMElement=function(n){return L.util.assert(this.DOM,this.__cls+"."+n,'registerDOMElement needs to be called before "'+n+'" is supported.')},DOMElement.prototype.__assertTemplateElement=function(n){return L.util.assert(this.__template,this.__cls+"."+n,'registerTemplateElement needs to be called before "'+n+'" is supported.')},DOMElement.prototype.addClass=function(n,b){return L.util.assert(1===arguments.length||2===arguments.length,"addClass","Only 'className' and 'key' parameters are allowed."),b?(this.__assertTemplateElement("addClass"),this.__template.addClass.call(this.__template,n,b,this)):(this.__assertDOMElement("addClass"),L.dom.addClass(this.DOM,n))},DOMElement.prototype.setAria=function(n,b){return this.__assertDOMElement("setAria"),L.dom.setAria(this.DOM,n,b)},DOMElement.prototype.removeClass=function(n,b){return L.util.assert(1===arguments.length||2===arguments.length,"removeClass","Only 'className' and 'key' parameters are allowed."),b?(this.__assertTemplateElement("removeClass"),this.__template.removeClass.call(this.__template,n,b,this)):(this.__assertDOMElement("removeClass"),L.dom.removeClass(this.DOM,n))},DOMElement.prototype.hide=function(n){return L.util.isEmpty(n)?(this.__assertDOMElement("hide"),L.dom.hideElement(this.DOM)):(this.__assertTemplateElement("hide"),this.__template.hide.call(this.__template,n))},DOMElement.prototype.show=function(n){return L.util.isEmpty(n)?(this.__assertDOMElement("show"),L.dom.showElement(this.DOM)):(this.__assertTemplateElement("show"),this.__template.show.call(this.__template,n))},DOMElement.prototype.showWaitBlock=function(){return this.__assertDOMElement("showWaitBlock"),this.__wb=new L.WaitBlock({element:this.DOM}).show(),this},DOMElement.prototype.hideWaitBlock=function(){return this.__wb.destroy(),delete this.__wb,this},DOMElement.prototype.hasClass=function(n){return L.util.assert(1===arguments.length,"CUI.dom.hasClass","Only one parameter allowed."),this.__assertDOMElement("hasClass"),L.dom.hasClass(this.DOM,n)},DOMElement.prototype.isDestroyed=function(n){var b;return null!=(b=this.__template)?b.isDestroyed.call(this.__template,n):void 0},DOMElement.prototype.empty=function(n){return this.__assertTemplateElement("empty"),this.__template.empty.call(this.__template,n)},DOMElement.prototype.replace=function(n,b){return this.__assertTemplateElement("replace"),this.__template.replace.call(this.__template,n,b,this)},DOMElement.prototype.append=function(n,b){return this.__assertTemplateElement("append"),this.__template.append.call(this.__template,n,b,this)},DOMElement.prototype.prepend=function(n,b){return this.__assertTemplateElement("prepend"),this.__template.prepend.call(this.__template,n,b,this)},DOMElement.prototype.text=function(n,b){return this.__assertTemplateElement("text"),this.__template.text.call(this.__template,n,b,this)},DOMElement.prototype.get=function(n){return this.__assertTemplateElement("get"),this.__template.get.call(this.__template,n,this)},DOMElement.prototype.getFlexHandle=function(n,b){return this.__assertTemplateElement("getFlexHandle"),this.__template.getFlexHandle.call(this.__template,n,b)},DOMElement.prototype.destroy=function(){var n;return DOMElement.__super__.destroy.call(this),this.__template?null!=(n=this.__template)&&n.destroy():this.DOM&&L.dom.remove(this.DOM),this},DOMElement}(L.Element)},5533:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.CheckValueError=function(){function CheckValueError(){return CheckValueError.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CheckValueError,window.Error),CheckValueError}()},9248:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.Template.loadTemplateText(A(5936)),L.DataField=function(n){function DataField(n){var b,A;DataField.__super__.constructor.call(this,n),L.util.assertImplements(this,["render"]),this._name&&L.util.assertImplements(this,["getDefaultValue"]),this.__checkChangedValue=void 0,this.initTemplate(),this.addClass("cui-data-field"),this.maximizeAddClasses(),L.Events.listen({type:"data-changed",node:this.DOM,call:(A=this,function(n,b){A.onDataChanged(n,b)})}),this.getName()&&this.DOM.setAttribute("cui-data-field-name",this.getName()),this.init(),this._data&&!L.util.isFunction(this._data)&&this.setData(this._data),this.__initDisabled(),this._hidden&&this.hide(),this._tooltip&&(this._tooltip.text||this._tooltip.content)&&((b=L.util.copyObject(this._tooltip)).element=this.DOM,this.__tooltip=new L.Tooltip(b)),this.__opacity=1,"function"==typeof this._onInit&&this._onInit(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataField,n),DataField.changed_marker_css_class="cui-data-field-changed-marker",DataField.defaults={undo_and_changed_support:!1},DataField.prototype.onDataChanged=function(n,b){if(null!=b?b.element:void 0)return"function"==typeof this._onDataChanged?this._onDataChanged(this.getData(),b.element,n,b):void 0;console.warn(L.util.getObjectClass(this)+"[DataField].listen[data-changed]: received event with element not set.",n,b,this)},DataField.prototype.initOpts=function(){return DataField.__super__.initOpts.call(this),this.addOpts({name:this.getNameOpt(),maximize:{check:Boolean},maximize_horizontal:{check:Boolean,default:!1},maximize_vertical:{check:Boolean,default:!1},padded:{check:Boolean,default:!1},data:{check:function(n){return L.util.isFunction(null!=n?n.hasOwnProperty:void 0)||L.util.isFunction(n)}},data_not_for_others:{default:!1,check:Boolean},disabled:{default:!1,check:function(n){return L.util.isBoolean(n)||L.util.isFunction(n)}},disabled_depends_on_data:{check:Function},tooltip:{check:"PlainObject"},hidden:{check:Boolean},form:{},undo_and_changed_support:{check:Boolean},undo_support:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},mark_changed:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},check_changed:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},onDataChanged:{check:Function},onDataInit:{check:Function},onInit:{check:Function},onRender:{check:Function},render_as_block:{check:Boolean}})},DataField.prototype.readOpts=function(){var n,b,A,R;if(this.opts.hasOwnProperty("undo_and_changed_support"))for(n=0,A=(R=["undo_support","check_changed","mark_changed"]).length;n")+"]}"},DataField.prototype.reload=function(){return this.remove(),this.render(),this.displayValue(),"function"==typeof this._onRender&&this._onRender(this),this},DataField.prototype.remove=function(){return this.callOnOthers("remove"),this.isDestroyed()||this.empty(),this.__isRendered=!1},DataField.prototype.getNameOpt=function(){return{check:String}},DataField.prototype.registerLabel=function(n){var b;(b=this.getUniqueIdForLabel())&&n.setAttribute("for",b)},DataField.prototype.getLabel=function(){return this._label},DataField.prototype.getMaximizeHorizontal=function(){return this.__maximize_horizontal},DataField.prototype.setForm=function(n){return L.util.assertImplements(n,["getFieldsByName","getFieldByIdx","getData","getFields"]),this.__form=n,this.getForm().getFormPath?(this.__form.getMaximizeHorizontal()&&!1!==this.getOpt("maximize_horizontal")&&this.addClass("cui-maximize-horizontal"),this):this},DataField.prototype.getFormPath=function(n,b,A){var R;return null==n&&(n=!1),null==b&&(b=[]),null==A&&(A=0),L.util.assert(A<100,"CUI.DataField.getPath","Recursion detected."),(null!=(R=this.getForm())?R.getFormPath:void 0)&&this.getForm().getFormPath(!0,b,A+1),n&&b.push(this),b},DataField.prototype.getForm=function(){return this.__form},DataField.prototype.getOtherField=function(n){var b,A;return null!=(b=this.__form)&&null!=(A=b.getFieldsByName(n))?A[0]:void 0},DataField.prototype.getRootForm=function(){return this.__form?this.__form.getRootForm():this instanceof L.Form?this:null},DataField.prototype.__initDisabled=function(){this._disabled&&(!0===this._disabled||this._disabled.call(this,this))&&this.disable()},DataField.prototype.enable=function(){return this.removeClass("cui-data-field-disabled"),this.callOnOthers("enable"),this},DataField.prototype.disable=function(){return this.addClass("cui-data-field-disabled"),this.callOnOthers("disable"),this},DataField.prototype.isDisabled=function(){return this.hasClass("cui-data-field-disabled")},DataField.prototype.isHidden=function(){return this.hasClass("cui-data-field-hidden")},DataField.prototype.isShown=function(){return!this.isHidden()},DataField.prototype.updateData=function(n){return L.util.isFunction(this._data)?this.__data=this._data.call(this,n,this):this.__data=n,this.displayValue()},DataField.prototype.unsetData=function(){delete this.__data,this.setDataOnOthers()&&this.callOnOthers("unsetData")},DataField.prototype.setData=function(n,b){var A;if(null==b&&(b=!0),!this.__data||!this._data||L.util.isFunction(this._data))return L.util.assert(!this.__data,this+".setData","data is already set.",{opts:this.opts,data:this.__data}),L.util.isFunction(this._data)?this.__data=this._data.call(this,n,this):this.__data=n,L.util.assert(L.util.isPlainObject(this.__data)||(null!=(A=this.__data)&&"function"==typeof A.hasOwnProperty?A.hasOwnProperty(this.getName()):void 0),this+".setData",'data needs to be PlainObject or have a property "'+this.getName()+'".',{data:n,opts:this.opts}),this.setDataOnOthers()&&this.callOnOthers("setData",this.__data,b),b&&this.initData(),this},DataField.prototype.setDataOnOthers=function(){return!this._data_not_for_others},DataField.prototype.hide=function(n){return null==n&&(n=!1),this.addClass("cui-data-field-hidden"),this.callOnOthers("hide"),n&&L.Events.trigger({type:"form-check-row-visibility",node:this.DOM,info:{element:this}}),this},DataField.prototype.show=function(n){return null==n&&(n=!1),this.removeClass("cui-data-field-hidden"),this.callOnOthers("show"),n&&L.Events.trigger({type:"form-check-row-visibility",node:this.DOM,info:{element:this}}),this},DataField.prototype.isRendered=function(){return this.__isRendered},DataField.prototype.render=function(n){var b,A;return b=null==(A=(null!=n?n:{}).callOnRender)||A,L.util.assert(!this.__isRendered,this.__cls+".render","Cannot be called when already rendered.",{opts:this.opts,dataField:this}),this.__isRendered=!0,this.callOnOthers("render"),this.isDisabled()&&this.disable(),this.isHidden()&&this.hide(!0),b&&"function"==typeof this._onRender&&this._onRender(this),this},DataField.prototype.displayValue=function(){return L.util.assert(!this.isDestroyed(),this.__cls+".displayValue","DataField already destroyed, cannot display value.",{data_field:this}),L.util.assert(this.__isRendered,this.__cls+".displayValue","not rendered yet, cannot display.",{opts:this.opts,data:this.__data}),this.checkChanged(),this.callOnOthers("displayValue")},DataField.prototype.start=function(){return L.util.assert(!this.__isRendered,this.__cls+".start","Cannot be called when already rendered.",{opts:this.opts,dataField:this}),this.__initDisabled(),this.render(),this.displayValue(),this},DataField.prototype.getAllDataFields=function(n){return null==n&&(n=!1),this.getDataFields(!0)},DataField.prototype.getDataFields=function(n,b){return null==n&&(n=!1),null==b&&(b=[]),(this.isDataField()||n)&&b.push(this),this.callOnOthers("getDataFields",n,b),b},DataField.prototype.renderAsBlock=function(){return!!this._render_as_block},DataField.prototype.isDataField=function(){return this.hasData()},DataField.prototype.callOnOthers=function(){var n,b,A,R,B,E;for(A=arguments[0],n=2<=arguments.length?D.call(arguments,1):[],R=0,B=(E=this.getFields?this.getFields(A).slice(0):[]).length;R-1||(D[B]=X):E=X;for(B in A)X=A[B],D.hasOwnProperty(B)||(D[B]=X);return L.util.assert(L.util.isFunction(E),"CUI.DataField.new",'type is unknown: "'+E+'".',{field:n}),R=new E(D),L.util.assert(R instanceof L.DataField,"CUI.DataField.new","field.type needs to be of class DataField, but is "+L.util.getObjectClass(R)+".",{field:n}),R},DataField}(L.DOMElement),L.Events.registerEvent({type:"data-changed",bubble:!0})},580:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataFieldInput=function(n){function DataFieldInput(n){DataFieldInput.__super__.constructor.call(this,n),L.dom.setAttributeMap(this.DOM,this._attr),this.addClass("cui-data-field-input")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataFieldInput,n),DataFieldInput.prototype.initOpts=function(){return DataFieldInput.__super__.initOpts.call(this),this.addOpts({group:{check:String},attr:{default:{},check:"PlainObject"}})},DataFieldInput.prototype.getGroup=function(){return this._group},DataFieldInput.prototype.isResizable=function(){return!0},DataFieldInput}(L.DataField)},5412:(n,b,A)=>{var L=A(7288),R=[].indexOf||function(n){for(var b=0,A=this.length;b=0&&(A.func.apply(this,b),"done"===(B=A.type)||"always"===B||"fail"===B)?this.__callbacks.splice(L,1):L++;return this.__runningCallbacks=!1,this},Deferred.prototype.__register=function(n,b){if(L.util.assert(L.util.isFunction(b),"Deferred."+n+": Callback needs to be Function.",{callback:b}),!("rejected"===this.__state&&"done"===n||"resolved"===this.__state&&"fail"===n)){if(this.__callbacks.push({type:n,func:b}),"pending"!==this.__state&&!this.__runningCallbacks)switch(this.__state){case"resolved":this.__callback(["done","always"],this.__finished_args);break;case"rejected":this.__callback(["fail","always"],this.__finished_args)}return this}},Deferred.prototype.done=function(n){return this.__register("done",n),this},Deferred.prototype.fail=function(n){return this.__register("fail",n),this},Deferred.prototype.always=function(n){return this.__register("always",n),this},Deferred.prototype.progress=function(n){return this.__register("progress",n),this},Deferred.prototype.__notify=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.notify","Cannot notify state "+this.__state+"."),this.__callback(["progress"],arguments),this},Deferred.prototype.__resolve=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.resolve","Cannot resolve state "+this.__state+"."),this.__finished_args=arguments,this.__state="resolved",this.__callback(["done","always"],arguments),this},Deferred.prototype.__reject=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.reject","Cannot reject state "+this.__state+"."),this.__finished_args=arguments,this.__state="rejected",this.__callback(["fail","always"],arguments),this},Deferred.prototype.state=function(){return this.__state},Deferred.prototype.promise=function(){return new L.Promise(this)},Deferred.uniqueId=0,Deferred}()},1852:(n,b,A)=>{var L=A(7288);L.Promise=function(){function Promise(n){this.__deferred=n,L.util.assert(this.__deferred instanceof L.Deferred,"new Promise","parameter needs to be instanceof CUI.Deferred",{parameter:this.__deferred})}return Promise.prototype.done=function(){return this.__deferred.done.apply(this.__deferred,arguments),this},Promise.prototype.fail=function(){return this.__deferred.fail.apply(this.__deferred,arguments),this},Promise.prototype.always=function(){return this.__deferred.always.apply(this.__deferred,arguments),this},Promise.prototype.progress=function(){return this.__deferred.progress.apply(this.__deferred,arguments),this},Promise.prototype.state=function(){return this.__deferred.state.apply(this.__deferred,arguments)},Promise.prototype.getUniqueId=function(){return this.__deferred.getUniqueId()},Promise}()},7199:function(n,b,A){var L=A(7288);L.decide=function(n){var b;return b=new L.Deferred,L.util.isPromise(n)?(n.done(b.resolve),n.fail(b.reject)):!1===n?b.reject(!1):b.resolve(n),b.promise()}},1007:function(n,b,A){var L,R=A(7288);R.whenAllReject=(L=this,function(){var n,b;return b=new R.Deferred,(n=[!1]).push.apply(n,arguments),R.whenAll.apply(L,n).done((function(){var n,A,L;for(n=0,A=arguments.length;nQ.width&&(E.scrollLeft,0<(tt=D=(A=K.clientX())-Q.left)&&ttQ.height&&(E.scrollTop,0<(nt=D=(R=K.clientY())-Q.top)&&nt{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0}},selector:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}}})},Draggable.prototype.readOpts=function(){return Draggable.__super__.readOpts.call(this),this.__autoRepeatTimeout=null,this.supportTouch()?this.__event_types={start:["mousedown","touchstart"],end:["mouseup","touchend"],move:["mousemove","touchmove"]}:this.__event_types={start:["mousedown"],end:["mouseup"],move:["mousemove"]},this},Draggable.prototype.getClass=function(){return this._selector?Draggable.__super__.getClass.call(this):"cui-draggable "+Draggable.__super__.getClass.call(this)},Draggable.prototype.supportTouch=function(){return!!this._support_touch},Draggable.prototype.__killTimeout=function(){return this.__autoRepeatTimeout&&(L.clearTimeout(this.__autoRepeatTimeout),this.__autoRepeatTimeout=null),this},Draggable.prototype.__cleanup=function(){var n;this.__killTimeout(),this.__ref&&(L.Events.ignore({instance:this.__ref}),this.__ref=null),(null!=(n=L.globalDrag)?n.instance:void 0)===this&&(L.globalDrag=null)},Draggable.prototype.destroy=function(){var n;return Draggable.__super__.destroy.call(this),L.dom.remove(null!=(n=L.globalDrag)?n.helperNode:void 0),this.__cleanup(),this},Draggable.prototype.init=function(){return L.util.assert(!this._helper_contain_element||L.dom.closest(this._element,this._helper_contain_element),"new CUI.sDraggable","opts.helper_contain_element needs to be parent of opts.element",{opts:this.opts}),L.Events.listen({type:this.__event_types.start,node:this.element,instance:this,selector:this._selector,call:(n=this,function(b){var A,R,D,B,E;b.getButton()>0&&"mousedown"===b.getType()||L.globalDrag||(D=L.util.elementGetPosition(L.util.getCoordinatesFromEvent(b),b.getTarget()),(R=L.dom.getDimensions(b.getTarget())).clientWidthScaled>0&&D.left-R.scrollLeftScaled>R.clientWidthScaled?console.warn("Mousedown on a vertical scrollbar, not starting drag."):R.clientHeightScaled>0&&D.top-R.scrollTopScaled>R.clientHeightScaled?console.warn("Mousedown on a horizontal scrollbar, not starting drag."):(B=b.getCurrentTarget(),E=L.dom.getDimensions(B),L.dom.isInDOM(B)&&0!==E.clientWidth&&0!==E.clientHeight&&(L.dom.closest(b.getTarget(),"input,textarea,select")||(A=B,n.init_drag(b,A)))))})});var n},Draggable.prototype.init_drag=function(n,b){var A,R,D,B,E,X,$,V,K;if(b&&(L.globalDrag="function"==typeof this._create?this._create(n,b):void 0,!1!==L.globalDrag)){for(E in(L.util.isNull(L.globalDrag)||!0===L.globalDrag)&&(L.globalDrag={}),L.util.assert(L.util.isPlainObject(L.globalDrag),"CUI.Draggable.init_drag","returned data must be a plain object",{data:L.globalDrag}),$=L.util.getCoordinatesFromEvent(n),V=L.util.elementGetPosition($,b),B={$source:b,startEvent:n,startCoordinates:$,instance:this,startScroll:{top:b.scrollTop,left:b.scrollLeft},start:V,threshold:this._threshold})K=B[E],L.globalDrag[E]=K;var Q;n.stopPropagation(),this.before_drag(n,b),this.__ref=new L.Dummy,A=0,X=null,Q=this,R=function(){var n;return n=X.getPointTarget()||X.getTarget(),L.Events.trigger({type:"dragover-scroll",node:n,count:A,originalEvent:X}),A+=1,Q.__killTimeout(),Q.__autoRepeatTimeout=L.setTimeout({ms:100,track:!1,call:R})},L.Events.listen({node:document,type:this.__event_types.move,instance:this.__ref,call:function(n){return function(A){var D,B;if(L.globalDrag&&(A.preventDefault(),(b=A.getTarget())&&!L.globalDrag.ended)){switch(B={x:(D=L.util.getCoordinatesFromEvent(A)).pageX-L.globalDrag.startCoordinates.pageX,y:D.pageY-L.globalDrag.startCoordinates.pageY,eventPoint:D},n.get_axis()){case"x":B.y=0;break;case"y":B.x=0}B.bare_x=B.x,B.bare_y=B.y,B.x+=L.globalDrag.$source.scrollLeft-L.globalDrag.startScroll.left,B.y+=L.globalDrag.$source.scrollTop-L.globalDrag.startScroll.top,(Math.abs(B.x)>=L.globalDrag.threshold||Math.abs(B.y)>=L.globalDrag.threshold||L.globalDrag.dragStarted)&&(L.globalDrag.dragDiff=B,L.globalDrag.dragStarted||(L.globalDrag.startEvent.preventDefault(),n.__startDrag(A,b,B),n._get_cursor?document.body.setAttribute("data-cursor",n._get_cursor(L.globalDrag)):document.body.setAttribute("data-cursor",n.getCursor())),X=A,R(),n.do_drag(A,b,B),"function"==typeof n._dragging&&n._dragging(A,L.globalDrag,B))}}}(this)}),D=function(n){return function(b,A){var R,D,B;null==A&&(A=!1),D=L.globalDrag.$source,B=L.dom.parents(D),L.globalDrag.ended=!0,document.body.removeAttribute("data-cursor"),A?(L.globalDrag.stopped=!0,n.stop_drag(b),"function"==typeof n._dragstop&&n._dragstop(b,L.globalDrag,n)):(n.end_drag(b),"function"==typeof n._dragend&&n._dragend(b,L.globalDrag,n)),n.isDestroyed()||(R=L.globalDrag.noClickKill,n.__cleanup(),R||function(){var n,b,A,R,E;for(E=L.dom.parents(D),b=n=0,A=B.length;n=0||"max"===V&&R<=0||("y"===Q&&D.call(n.fix,"n")>=0?n.h-=R:"x"===Q&&D.call(n.fix,"w")>=0?n.w-=R:(n[Q]-=R,"h"===Q&&D.call(n.fix,"s")>=0&&(n.y+=R),"w"===Q&&D.call(n.fix,"e")>=0&&(n.x+=R),"x"===Q&&D.call(n.fix,"e")>=0&&(n.w+=R),"y"===Q&&D.call(n.fix,"s")>=0&&(n.h+=R))));return n},Draggable}(L.DragDropSelect)},3986:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DragoverScrollEvent=function(n){function DragoverScrollEvent(){return DragoverScrollEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DragoverScrollEvent,n),DragoverScrollEvent.prototype.initOpts=function(){return DragoverScrollEvent.__super__.initOpts.call(this),this.addOpts({count:{mandatory:!0,check:function(n){return L.util.isPosInt(n)}},originalEvent:{mandatory:!0,check:L.Event}})},DragoverScrollEvent.prototype.getCount=function(){return this._count},DragoverScrollEvent.prototype.getOriginalEvent=function(){return this._originalEvent},DragoverScrollEvent}(L.Event)},8952:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Dragscroll=function(n){function Dragscroll(){return Dragscroll.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Dragscroll,n),Dragscroll.prototype.initOpts=function(){return Dragscroll.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({scroll_element:{check:function(n){return L.util.isElement(n)}}})},Dragscroll.prototype.readOpts=function(){return Dragscroll.__super__.readOpts.call(this),this._scroll_element?this.__scroll_element=this._scroll_element:this.__scroll_element=this._element},Dragscroll.prototype.supportTouch=function(){return void 0===this._support_touch||Dragscroll.__super__.supportTouch.call(this)},Dragscroll.prototype.start_drag=function(){return this.__scroll={top:this.__scroll_element.scrollTop,left:this.__scroll_element.scrollLeft}},Dragscroll.prototype.do_drag=function(n,b,A){var L,R;return R=this.__scroll.top-A.bare_y,L=this.__scroll.left-A.bare_x,this.__scroll_element.scrollTop=R,this.__scroll_element.scrollLeft=L},Dragscroll}(L.Draggable)},5462:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Droppable=function(n){function Droppable(){return Droppable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Droppable,n),Droppable.cls="droppable",Droppable.prototype.initOpts=function(){return Droppable.__super__.initOpts.call(this),this.addOpts({accept:{check:Function},drop:{default:function(n,b){var A;return A=b.dropTargetPos||"on",L.alert({markdown:!0,text:"You dropped me **"+A+"**: "+L.dom.getAttribute(b.dropTarget,"class")})},check:Function},hoverClass:{default:"cui-droppable",check:String},dropHelper:{mandatory:!0,default:!1,check:Boolean},targetHelper:{mandatory:!0,default:!1,check:Boolean},selector:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}}})},Droppable.prototype.accept=function(n,b){return"function"==typeof this._accept?this._accept(n,b):void 0},Droppable.prototype.destroy=function(){return this.removeHelper(),Droppable.__super__.destroy.call(this)},Droppable.prototype.readOpts=function(){Droppable.__super__.readOpts.call(this),this._targetHelper&&L.util.assert(this._selector,"new CUI.Droppable","opts.targetHelper needs opts.selector to be set.",{opts:this.opts}),this._dropHelper&&(L.util.assert(!this._selector||this._targetHelper,"new CUI.Droppable","opts.dropHelper does only work without opts.selector or with opts.targetHelper and opts.selector. needs opts.selector to be set.",{opts:this.opts}),this.__dropHelper=L.dom.element("DIV",{class:"cui-droppable-drop-helper"}))},Droppable.prototype.removeHelper=function(){var n,b,A;if(this.resetMargin(),this.__selectedTarget&&(L.dom.removeClass(this.__selectedTarget,this._hoverClass),this.__selectedTarget=null),this.__dropHelper&&L.dom.remove(this.__dropHelper),this._targetHelper)for(n=0,b=(A=L.dom.findElements(this._element,this._selector)).length;nD.viewportCenterLeft||"y"===this.__axis&&R.pageY>D.viewportCenterTop?"after":"before",A(B=this.__selectedTarget,E)?(this.__dropTarget=B,this.__dropTargetPos=E,$="cui-droppable-target-helper-"+this.__axis+"--"+this.__dropTargetPos,this.__resetMargin===this.__selectedTarget&&this.__selectedTarget.__target_helper_class===$||(this.resetMargin(),this.__saveZoneDims=[L.dom.getDimensions(this.__selectedTarget)],this.__selectedTarget.__target_helper_class=$,L.dom.addClass(this.__selectedTarget,this.__selectedTarget.__target_helper_class),this.__saveZoneDims.push(L.dom.getDimensions(this.__selectedTarget)),this.__resetMargin=this.__selectedTarget)):this.removeHelper()},Droppable.prototype.init=function(){var n;return L.Events.listen({node:this.element,type:"cui-dragend",instance:this,call:(n=this,function(b,A){return n.removeHelper()})}),L.Events.listen({node:this.element,type:"cui-drop",instance:this,call:function(n){return function(b,A){n.__dropTarget&&(A.dropTarget=n.__dropTarget,n._targetHelper&&(A.dropTargetPos=n.__dropTargetPos),!1!==n.accept(b,A)&&(b.stopPropagation(),L.setTimeout({call:function(){return n._drop(b,A)}})))}}(this)}),L.Events.listen({node:this.element,type:["cui-dragover","cui-dragenter","cui-dragleave"],instance:this,call:function(n){return function(b,A){n.syncTargetHelper(b,A),b.stopPropagation()}}(this)})},Droppable}(L.DragDropSelect)},1051:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0&&(it-=tt,V=0)):(tt=(V=L.globalDrag.start.left)+(it=A.x)-this.element.scrollWidth)>0&&(it-=tt),A.y<=0?(nt=L.globalDrag.start.top+A.y,B=-A.y,(tt=-nt)>0&&(B-=tt,nt=0)):(tt=(nt=L.globalDrag.start.top)+(B=A.y)-this.element.scrollHeight)>0&&(B-=tt),E=0,K=($=this.get_lassoed_elements()).length;E{var L=A(7288),R={}.hasOwnProperty;L.Movable=function(n){function Movable(){return Movable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Movable,n),Movable.cls="movable",Movable.prototype.initOpts=function(){return Movable.__super__.initOpts.call(this),this.addOpts({limitRect:{default:{},check:function(n){return L.util.isPlainObject(n)||n instanceof Function}},onPositioned:{check:Function},onPosition:{check:Function},start_drag:{check:Function},do_drag:{check:Function}}),this.removeOpt("helper")},Movable.prototype.readOpts=function(){return Movable.__super__.readOpts.call(this),this._helper=null},Movable.prototype.getLimitRect=function(){return L.util.isFunction(this._limitRect)?this._limitRect():this._limitRect},Movable.prototype.setElementCss=function(n){var b;return L.util.assert(L.util.isPlainObject(n),L.util.getObjectClass(this),"opts.position must return a PlainObject containing any of x, y, w, h",{pos:n}),b={},L.util.isEmpty(n.x)||(b.left=n.x),L.util.isEmpty(n.y)||(b.top=n.y),L.util.isEmpty(n.w)||(b.marginBoxWidth=n.w),L.util.isEmpty(n.h)||(b.marginBoxHeight=n.h),L.dom.setDimensions(this.element,b),"function"==typeof this._onPositioned?this._onPositioned(n):void 0},Movable.prototype.init_drag=function(n,b){if(!L.dom.closest(n.getTarget(),".cui-resizable-handle"))return Movable.__super__.init_drag.call(this,n,b)},Movable.prototype.before_drag=function(){var n;return n=L.dom.getDimensions(this.element),this.start={x:n.left||0,y:n.top||0,w:n.marginBoxWidth,h:n.marginBoxHeight},this},Movable.prototype.start_drag=function(n,b,A){return this._start_drag&&this._start_drag(n,b,A,this),this},Movable.prototype.do_drag=function(n,b,A){var L,R;return this._do_drag?(this._do_drag(n,b,A,this),this):(L={x:A.x+this.start.x,y:A.y+this.start.y,w:this.start.w,h:this.start.h},this._onPosition?(R=this._onPosition(L.x,L.y,this.start,A),L.x=R[0],L.y=R[1]):this.limitRect(L,this.start),this.setElementCss(L),this)},Movable.prototype.limitRect=function(n,b,A){return null==b&&(b={}),null==A&&(A=this.getLimitRect()),L.Draggable.limitRect(n,A,b)},Movable}(L.Draggable)},9328:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Resizable=function(n){function Resizable(){var n,b;return this.getResizePos=(n=this.getResizePos,b=this,function(){return n.apply(b,arguments)}),Resizable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Resizable,n),Resizable.cls="resizable",Resizable.prototype.initOpts=function(){return Resizable.__super__.initOpts.call(this),this.removeOpt("selector")},Resizable.prototype.readOpts=function(){return Resizable.__super__.readOpts.call(this),this._selector=".cui-resizable-handle"},Resizable.prototype.init=function(){var n,b,A,R,D;for(Resizable.__super__.init.call(this),D=[],b=0,A=(R=["ne","nw","se","sw","s","n","e","w"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.Sortable=function(n){function Sortable(){return Sortable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Sortable,n),Sortable.cls="sortable",Sortable.prototype.initOpts=function(){return Sortable.__super__.initOpts.call(this),this.addOpts({allowSort:{mandatory:!0,default:function(n,b,A){return!0},check:Function},sorted:{mandatory:!0,default:function(n,b,A){return alert("You sorted item "+b+" to "+A+".")},check:Function}}),this.removeOpt("helper_contain_element")},Sortable.prototype.getSortTarget=function(n,b){var A;return(A=L.dom.elementsUntil(n,null,b)).length>1?A[A.length-2]:null},Sortable.prototype.getClass=function(){return this._selector?"cui-drag-drop-select":Sortable.__super__.getClass.call(this)},Sortable.prototype.readOpts=function(){return Sortable.__super__.readOpts.call(this),this._helper_contain_element=this._element},Sortable.prototype.get_child_number=function(n){var b,A,L,R;for(A=b=0,L=(R=this.element.children).length;bb&&(L.globalDrag.noClickKill=!0,L.dom.insertBefore(A,R)),L.dom.syncAnimatedClone(this.element),this},Sortable.prototype.start_drag=function(n,b,A){return L.globalDrag.sort_source=this.__findClosestSon(L.globalDrag.$source),L.globalDrag.sort_source.classList.add("cui-sortable-placeholder"),L.globalDrag.start_idx=this.get_child_number(L.globalDrag.sort_source),L.dom.addClass(this.element,"cui-sorting"),L.dom.initAnimatedClone(this.element)},Sortable.prototype.getCloneSourceForHelper=function(){return this.__findClosestSon(L.globalDrag.$source)},Sortable.prototype.__findClosestSon=function(n){var b;if((b=L.dom.parentsUntil(n,null,this.element))[b.length-1]===window)return null;switch(b.length){case 0:return null;case 1:return n;default:return b[b.length-2]}},Sortable.prototype.do_drag=function(n,b,A){var R,D,B;if(this.position_helper(n,b,A),B=this.__findClosestSon(b))return D=this.get_child_number(L.globalDrag.sort_source),R=this.get_child_number(B),this._allowSort(n,D,R)&&this.move_element(D,R),this},Sortable.prototype.init_drag=function(n,b){return Sortable.__super__.init_drag.call(this,n,this.getSortTarget(n.getTarget(),this._element))},Sortable.prototype.stop_drag=function(n){return Sortable.__super__.stop_drag.call(this,n),this.__end_drag(n,!0)},Sortable.prototype.end_drag=function(n){return Sortable.__super__.end_drag.call(this,n),this.__end_drag(n,!1)},Sortable.prototype.cleanup_drag=function(n){return Sortable.__super__.cleanup_drag.call(this,n),L.dom.removeClass(this.element,"cui-sorting"),L.globalDrag.sort_source.classList.remove("cui-sortable-placeholder"),L.dom.removeAnimatedClone(this.element)},Sortable.prototype.__end_drag=function(n,b){var A;A=this.get_child_number(L.globalDrag.sort_source),L.globalDrag.start_idx!==A&&(b?this.move_element(A,L.globalDrag.start_idx):this._sorted(n,L.globalDrag.start_idx,A))},Sortable}(L.Draggable)},3599:(n,b,A)=>{var L=A(7288);L.Dummy=function(){function Dummy(n){null==n&&(n={}),this.opts=n,this.__uniqueId=L.Dummy.uniqueId++,this.__cls=L.util.getObjectClass(this)}return Dummy.prototype.getUniqueId=function(){return this.__uniqueId},Dummy.uniqueId=0,Dummy}(),L.Dummy},7343:(n,b,A)=>{var L=A(7288);L.Element=function(){function Element(n){this.opts=null!=n?n:{},this.__uniqueId=L.Element.uniqueId++,this.__cls=L.util.getObjectClass(this),this.__destroyed=!1,this.__check_map={},this.__mapped_keys=[],this.initOpts(),L.Element.__dont_read_opts||(this.readOpts(),this.__initOptsCalled||console.warn("new "+this.__cls+": CUI.Element::initOpts not called.",{opts:this.opts}),"function"==typeof this._onConstruct&&this._onConstruct(this))}return Element.prototype.getElementClass=function(){return this.__cls},Element.prototype.getUniqueId=function(){return this.__uniqueId},Element.prototype.getOpts=function(){return this.opts},Element.prototype.getOpt=function(n){return this.opts[n]},Element.prototype.hasOpt=function(n){return this.opts.hasOwnProperty(n)},Element.prototype.getSetOpt=function(n){return this["_"+n]},Element.prototype.hasSetOpt=function(n){return this.hasOwnProperty("_"+n)},Element.prototype.initOpts=function(){return this.__initOptsCalled=!0,this.addOpts({debug:{},onConstruct:{check:Function},onDestroy:{check:Function}})},Element.prototype.copy=function(){return new this.constructor(this.opts)},Element.prototype.mergeOpt=function(n,b){var A,L,R;for(A in null==b&&(b={}),L=this.__check_map[n]||{},b)R=b[A],L[A]=R;return this.addOpt(n,L,"mergeOpt")},Element.prototype.removeOpt=function(n){return delete this.__check_map[n]},Element.prototype.addOpt=function(n,b,A){if(null==A&&(A="addOpt"),L.util.assert(L.util.isString(n),this.__cls+"."+A,"key needs to be String",{key:n,check_map:b}),!L.util.isNull(b))return L.util.assert(L.util.isPlainObject(b),this.__cls+"."+A,"check_map needs to be Map",{key:n,check_map:b}),this.__check_map[n]=b,this},Element.prototype.addOpts=function(n){var b,A;for(b in L.util.assert(L.util.isPlainObject(n),this.__cls+".addOpts","Parameter needs to be Map",{map:n}),n)A=n[b],this.addOpt(b,A);return this},Element.prototype.mergeOpts=function(n){var b,A;for(b in L.util.assert(L.util.isPlainObject(n),this.__cls+".mergeOpts","Parameter needs to be Map",{map:n}),n)A=n[b],this.mergeOpt(b,A);return this},Element.prototype.__getCheckMap=function(){return this.__check_map},Element.prototype.readOpts=function(n,b,A){return null==n&&(n=this.opts),null==b&&(b=this.__cls),null==A&&(A=this.__check_map),L.Element.readOpts.call(this,n,b,A,!0)},Element.prototype.readOptsFromAttr=function(n){var b,A,R,D,B,E,X,$;if(B={},!(null!=n?n.split:void 0))return B;for(b=0,D=(E=n.split(";")).length;b0?Q.deprecated:"",console.warn(b+": opts."+$+" is deprecated.",tt));else{if(!V)continue;L.util.assert(!1,b,"opts."+$+" needs to be set.",{opts:n,check_map:A})}!Q.check||L.util.isNull(tt)&&!V||(L.util.isArray(Q.check)?L.util.assert(Q.check.indexOf(tt)>-1,b,"opts."+$+' needs to be one of ["'+Q.check.join('","')+'"].',{opts:n}):Q.check===Boolean||Q.check===String||Q.check===Function||Q.check===Array?L.util.assertInstanceOf.call(this,$,Q.check,tt):L.util.isFunction(Q.check)&&!Q.check.__super__?(L.util.assert(L.util.isEmpty(Q.check.name)||"check"===Q.check.name,b,$+'.check is "'+Q.check.name+'" but has no "__super__" method. Use "extends CUI.Element" or "extends CUI.Dummy" to fix that.',{opts:n,key:$,value:Q}),B=Q.check.call(this,tt),L.util.isNull(B)||L.util.isBoolean(B)||L.util.isString(B)||(D=B,console.error("CUI.Element.readOpts: check needs to return Boolean, null, undefined or String.","opts:",n,"opt:",Q,"return:",D),B=!!D),!0!==B&&(E=L.util.isString(B)?B:"needs to match\n\n"+Q.check.toString(),L.util.assert(!1,b,"opts."+$+": "+E+".",{opts:n}))):L.util.isPlainObject(Q.check)?tt=L.Element.readOpts(tt,b+" [opts."+$+"]",Q.check):L.util.isNull(tt)&&V?L.util.assert(!1,b,"opts."+$+" is mandatory, but is "+tt+".",{opts:n}):L.util.assertInstanceOf.call(this,$,Q.check,tt)),R&&(this["_"+$]=tt,this instanceof L.Element&&this.__mapped_keys.push($)),K[$]=tt}for($ in n)void 0===(Q=n[$])||K.hasOwnProperty($)||$.startsWith("_")||console.warn(b+": opts."+$+", not supported. check_map: ",A,"opts:",n);return K},Element}()},3740:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.CUIEvent=function(n){function CUIEvent(){return CUIEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CUIEvent,n),CUIEvent}(L.Event)},4339:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Event=function(n){function Event(n){Event.__super__.constructor.call(this,n),this._require_node_in_dom&&(console.debug("require node in dom",this.isInDOM(),this.__node),L.util.assert(this.isInDOM(),"new Event","node is not in DOM, unable to create event.",{opts:this.opts})),this.__propagationStopped=!1,this.__propagationImmediateStopped=!1,this.__preventDefault=!1,this.__dragPrevented=!1}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Event,n),Event.prototype.initOpts=function(){return Event.__super__.initOpts.call(this),this.addOpts({type:{mandatory:!0,check:function(n){return L.util.isString(n)&&!L.util.isEmpty(n)&&1===n.split(/\s+/).length}},node:{default:document.documentElement,mandatory:!0,check:function(n){return L.dom.isNode(n)}},require_node_in_dom:{default:!1,mandatory:!0,check:Boolean},bubble:{default:!1,check:Boolean},sink:{default:!1,check:Boolean},exclude_self:{default:!1,check:Boolean},info:{default:{},check:"PlainObject"},prevent_default:{default:!1,check:Boolean}})},Event.prototype.readOpts=function(){return Event.__super__.readOpts.call(this),this.__node=L.dom.getNode(this._node),this._preventDefault&&this.preventDefault(),this.__listenerClass=null,this.__isInDOM=null},Event.prototype.__setListener=function(n){return this.__listenerClass?L.util.assert(this.__listenerClass===n.getElementClass(),"Event.setListener","listener class cannot change during an events life cycle.",{listener:n,listenerClass:this.__listenerClass}):this.__listenerClass=n.getElementClass(),this},Event.prototype.__setPhase=function(n){this.__phase=n},Event.prototype.isExcludeSelf=function(){return this._exclude_self},Event.prototype.getPhase=function(){return this.__phase},Event.prototype.getType=function(){return this._type},Event.prototype.getDebug=function(){return this._type+"["+this.getUniqueId()+"]"},Event.prototype.getInfo=function(){return this._info},Event.prototype.getNode=function(){return this.__node},Event.prototype.getElement=function(){return L.dom.data(this.getNode(),"element")},Event.prototype.isBubble=function(){return this._bubble},Event.prototype.isSink=function(){return this._sink},Event.prototype.isInDOM=function(){return null!==this.__isInDOM?this.__isInDOM:this.__node===document||this.__node===window?this.__isInDOM=!0:this.__isInDOM=L.dom.isInDOM(this.__node)},Event.prototype.setNativeEvent=function(n){return L.util.assert("object"==typeof n,"CUI.Event.setNativeEvent","Event needs to be instanceof Event",{Event:n}),this.__NativeEvent=n,this},Event.prototype.getNativeEvent=function(){return this.__NativeEvent},Event.prototype.getPointTarget=function(){return document.elementFromPoint(this.clientX(),this.clientY())},Event.prototype.getTarget=function(){var n;return this.__target||(null!=(n=this.getNativeEvent())?n.target:void 0)},Event.prototype.setTarget=function(n){return this.__target=n},Event.prototype.getCurrentTarget=function(){return this.__currentTarget||this.getTarget()},Event.prototype.setCurrentTarget=function(n){return this.__currentTarget=n},Event.prototype.getModifiers=function(){var n,b,A,L;for(n in b=[],A={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"})L=A[n],this[n+"Key"]()&&b.push(L);return b},Event.prototype.hasModifierKey=function(n){return null==n&&(n=!1),this.metaKey()||this.ctrlKey()||this.altKey()||n&&this.shiftKey()},Event.prototype.getButton=function(){var n;return null!=(n=this.getNativeEvent())?n.button:void 0},Event.prototype.keyCode=function(){var n;return null!=(n=this.getNativeEvent())?n.which:void 0},Event.prototype.metaKey=function(){var n;return null!=(n=this.getNativeEvent())?n.metaKey:void 0},Event.prototype.ctrlKey=function(){var n;return null!=(n=this.getNativeEvent())?n.ctrlKey:void 0},Event.prototype.altKey=function(){var n;return null!=(n=this.getNativeEvent())?n.altKey:void 0},Event.prototype.shiftKey=function(){var n;return null!=(n=this.getNativeEvent())?n.shiftKey:void 0},Event.prototype.clientX=function(){var n;return null!=(n=this.getNativeEvent())?n.clientX:void 0},Event.prototype.clientY=function(){var n;return null!=(n=this.getNativeEvent())?n.clientY:void 0},Event.prototype.pageX=function(){var n;return null!=(n=this.getNativeEvent())?n.pageX:void 0},Event.prototype.pageY=function(){var n;return null!=(n=this.getNativeEvent())?n.pageY:void 0},Event.prototype.stopImmediatePropagation=function(){var n;return this.__propagationImmediateStopped=!0,null!=(n=this.getNativeEvent())&&n.stopImmediatePropagation(),this},Event.prototype.stopPropagation=function(){var n;return this.__propagationStopped=!0,null!=(n=this.getNativeEvent())&&n.stopPropagation(),this},Event.prototype.preventDefault=function(){var n;return this.__defaultPrevented=!0,null!=(n=this.getNativeEvent())&&n.preventDefault(),this},Event.prototype.isImmediatePropagationStopped=function(){return this.__propagationImmediateStopped},Event.prototype.isPropagationStopped=function(){return this.__propagationStopped},Event.prototype.isDefaultPrevented=function(){return this.__defaultPrevented},Event.prototype.dispatch=function(){var n,b;return L.util.assert(!this.getNativeEvent(),"CUI.Event.dispatch","Can only dispatch once.",{event:this}),(n=document.createEvent("Event")).initEvent(this.getType(),this.isBubble(),!0),n.__cui_event=this,b=this.isExcludeSelf()?L.dom.parent(this.getNode()):this.getNode(),this.isDefaultPrevented()&&n.preventDefault(),this.setNativeEvent(n),b.dispatchEvent(n),n},Event.prototype.dump=function(){var n,b;return b=this.__cls+": **"+this.getType()+"**",(n=this.getModifiers()).length>0&&(b+=" Modifiers: **"+n.join("+")+"**"),b},Event.prototype.stop=function(){return this.preventDefault(),this.stopPropagation(),this.stopImmediatePropagation(),!1},Event.require=function(n,b){var A,R,D;return L.util.isPlainObject(n)?(D=(R=L.Events.getEventType(n.type)).eventClass?R.eventClass:L.Event,L.util.mergeMap(n,R),delete n.eventClass,delete n.listenerClass,A=new D(n)):A=n,L.util.assert(A instanceof L.Event,""+b,"event needs to be PlainObject or instance of CUI.Event."),A},Event.createFromDOMEvent=function(n,b){var A,R;return R=L.Events.getEventType(n.type),b||(b=R.eventClass?R.eventClass:L.Event),(A=new b({type:n.type,bubble:n.bubbles,node:n.target})).setNativeEvent(n),A},Event}(L.Element)},9652:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0)}}}),R=[],D=[],b=L.dom.getNode(E.node),A=new L.Deferred,D.push(L.Events.listen({type:E.type,node:b,call:function(){A.resolve()}})),R.push(A),(B=new L.Deferred).always((function(){var n,b;for(n=0,b=D.length;n=0&&L.setTimeout({ms:E.maxWait,call:function(){var n,b;for(n=0,b=R.length;n0){for(it=L.dom.parents(nt),bt=!1,$=0,Q=zt.length;$0,"CUI.Events.registerEvent","event.type must be String.",{event:n}),K=this,$=function(b){var A;return(A=L.util.copyObject(n,!0)).type=b,K.registerEvent(A,!1)},L.util.isArray(n.type))for(A=0,D=(E=n.type).length;A=0&&(b="Num"+String.fromCharCode(n-48)),D.call([112,113,114,115,116,117,118,119,120,121,122,123],n)>=0)b="F"+String.fromCharCode(n-111);else switch(n){case 8:b="Backspace";break;case 9:b="Tab";break;case 13:b="Return";break;case 16:b="Shift";break;case 17:b="Ctrl";break;case 18:b="Alt";break;case 20:b="CapsLock";break;case 27:b="Esc";break;case 32:b="Space";break;case 33:b="PageUp";break;case 34:b="PageDown";break;case 37:b="Left";break;case 38:b="Up";break;case 39:b="Right";break;case 40:b="Down";break;case 46:b="Insert";break;case 46:b="Delete";break;case 110:b="Num.";break;case 144:b="Numlock";break;case 111:b="Num/";break;case 106:b="Num*";break;case 107:b="Num+";break;default:b=String.fromCharCode(n)}return b}},KeyboardEvent.prototype.key=function(){return this.getNativeEvent().key},KeyboardEvent.prototype.code=function(){return this.getNativeEvent().code},KeyboardEvent.prototype.hasDefaultActionModifier=function(){return/Mac|iPod|iPhone|iPad/.test(navigator.platform)?this.metaKey():this.ctrlKey()},KeyboardEvent.prototype.dump=function(){var n,b;return b=this.__cls+": **"+this.getType()+"**",b+=" Key: **"+this.key()+"** KeyCode: **"+this.keyCode()+"**",(n=this.getKeyboard()).length>0&&(b=b+" Keyboard: **"+n+"**"),b},KeyboardEvent.__initKeyboardListener=function(){var n;return n=function(n){switch(n){case 16:case 17:case 18:case 91:case 93:return!0;default:return!1}},L.KeyboardEvent.__keys=[],L.Events.listen({type:["keydown"],node:window,capture:!0,call:function(b){n(b.keyCode())||L.util.pushOntoArray(b.getKeyboardKey(),L.KeyboardEvent.__keys)}}),L.Events.listen({type:["keyup"],node:window,capture:!0,call:function(b){n(b.keyCode())||L.util.removeFromArray(b.getKeyboardKey(),L.KeyboardEvent.__keys)}}),L.Events.listen({type:["blur"],node:window,capture:!0,call:function(n){return L.KeyboardEvent.__keys=[]}})},KeyboardEvent}(L.Event),L.ready((function(){return L.KeyboardEvent.__initKeyboardListener()}))},2305:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0));B++);else V=n.type,X=D.call(this.__types,V)>=0;return X&&n.call&&(R=!0,X=n.call===this._call),X&&n.instance&&(R=!0,X=n.instance===this.getInstance()),L.util.assert(R,"Listener.matchesFilter","Filter did not filter anything, make sure you have 'node', 'type', 'call', or 'instance' set.",{filter:n}),X},Listener.require=function(n,b){var A,R,D,B,E,X,$;if(L.util.isPlainObject(n)){for(E=null,R=0,D=($=n.type instanceof Array?n.type:[n.type]).length;R{var L=A(7288),R={}.hasOwnProperty;L.MouseEvent=function(n){function MouseEvent(){return MouseEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MouseEvent,n),MouseEvent.prototype.initOpts=function(){return MouseEvent.__super__.initOpts.call(this),this.addOpts({button:{check:function(n){return n>=0}},pageX:{check:function(n){return n>0}},pageY:{check:function(n){return n>0}},clientX:{check:function(n){return n>0}},clientY:{check:function(n){return n>0}}})},MouseEvent.prototype.setNativeEvent=function(n){var b,A,L,R,D;for(b=0,L=(D=["button","pageX","pageY","clientX","clientY"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.Events.MouseIsStill=function(n){function MouseIsStill(n){var b;MouseIsStill.__super__.constructor.call(this,n),this.__timeout=null,L.Events.listen({type:"mouseenter",instance:this,node:this._node,call:(b=this,function(){return b.start()})}),L.Events.listen({type:"mouseleave",instance:this,node:this._node,call:function(n){return function(){return n.stop()}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MouseIsStill,n),MouseIsStill.prototype.initOpts=function(){MouseIsStill.__super__.initOpts.call(this),this.addOpts({ms:{check:function(n){return n>=1},mandatory:!0},call:{check:Function,mandatory:!0},node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}}})},MouseIsStill.prototype.start=function(){var n;this.__clickEvent=L.Events.listen({type:["click","dblclick"],capture:!0,node:this._element,only_once:!0,call:(n=this,function(b){return n.stop()})}),this.__event=L.Events.listen({type:["mousemove"],node:this._node,instance:this,call:function(n){return function(b){return L.clearTimeout(n.__timeout),n.__timeout=L.setTimeout({ms:n._ms,call:function(){return n.stop(),n._call(b)}})}}(this)})},MouseIsStill.prototype.stop=function(){this.__timeout&&(L.clearTimeout(this.__timeout),this.__timeout=null),this.__event&&(L.Events.ignore(this.__event),L.Events.ignore(this.__clickEvent),this.__clickEvent=null,this.__event=null)},MouseIsStill.prototype.destroy=function(){this.stop(),L.Events.ignore({instance:this}),MouseIsStill.__super__.destroy.call(this)},MouseIsStill}(L.Element)},3876:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.TouchEvent=function(n){function TouchEvent(){return TouchEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(TouchEvent,n),TouchEvent.prototype.initOpts=function(){return TouchEvent.__super__.initOpts.call(this),this.addOpts({button:{check:function(n){return n>=0}},pageX:{check:function(n){return n>0}},pageY:{check:function(n){return n>0}},clientX:{check:function(n){return n>0}},clientY:{check:function(n){return n>0}}})},TouchEvent.prototype.setNativeEvent=function(n){var b,A,L,R,D;for(b=0,L=(D=["button","pageX","pageY","clientX","clientY"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.WheelEvent=function(n){function WheelEvent(){return WheelEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(WheelEvent,n),WheelEvent.prototype.dump=function(){return WheelEvent.__super__.dump.call(this)+" wheelY: **"+this.wheelDeltaY()+"**"},WheelEvent.prototype.wheelDeltaY=function(){var n;return(n=this.getNativeEvent())&&n.deltaY||0},WheelEvent}(L.MouseEvent)},1412:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FlexHandle=function(n){function FlexHandle(n){var b,A,R,D,B;for(FlexHandle.__super__.constructor.call(this,n),this.__pane=null,D=R=0,B=(A=this._element.parentNode.children).length;Rthis.__pane_idx?this.__element_idx0&&(this.__adjacent_pane=A[this.__element_idx-1]),this.__closed=this._closed,this.__hidden=this._hidden,this.__stretched=null,this.__size=null,L.util.assert(this.__pane,"new "+this.__cls,'pane "'+this._pane+'" not found in parent element of cui-flex-handle element.',{opts:this.opts,children:A}),L.dom.data(this.__pane,"flexHandle",this),L.dom.setAttribute(this.__pane,"flex-handled-pane",this._name)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FlexHandle,n),FlexHandle.prototype.readOpts=function(){var n,b,A;FlexHandle.__super__.readOpts.call(this),"horizontal"===(n=this._direction)||"row"===n?this.__direction="row":"vertical"!==(b=this._direction)&&"column"!==b||(this.__direction="column"),L.util.assert("row"===(A=this.__direction)||"column"===A,"new "+this.__cls,"opts.direction needs to be set",{opts:this.opts,element:this._element}),this._label&&this.addLabel(this._label)},FlexHandle.prototype.initOpts=function(){return FlexHandle.__super__.initOpts.call(this),this.addOpts({element:{mandatory:!0,check:function(n){return L.util.isElement(n)}},pane:{mandatory:!0,check:String},name:{mandatory:!0,check:String},closed:{check:Boolean},closable:{mandatory:!0,default:!1,check:Boolean},open_button_icon:{mandatory:!1,check:function(n){return L.util.isString(n)||n instanceof L.Icon}},label:{check:function(n){return n instanceof L.Label||L.util.isPlainObject(n)}},hidden:{check:Boolean},direction:{check:["horizontal","vertical","row","column"]},manage_state:{default:!0,check:Boolean},state_name:{check:String},class:{check:String},onResize:{check:Function},maxValue:{check:function(n){return n>0}},unit:{default:"px",check:function(n){return"px"===n||"%"===n}}})},FlexHandle.prototype.init=function(){var n,b,A,R;if(!this.isDestroyed())return L.dom.addClass(this._element,"cui-flex-handle cui-flex-handle-"+this.__direction+" cui-flex-handle-"+this._name),this.__closed&&this.close(),this.__hidden&&this.hide(),this._class&&L.dom.addClass(this._element,this._class),"row"===this.__direction?(n="x",this.__css_value="Width"):(n="y",this.__css_value="Height"),this._open_button_icon?this._element.classList.add("cui-flex-handle-with-button-icon"):(L.Events.listen({type:"dblclick",node:this._element,call:(R=this,function(n){null===R.__size?R.isClosed()?R.open():R._closable&&R.close():R.resetSize(),R.storeState()})}),L.Events.listen({type:["click"],node:this._element,call:function(n){return function(b){n.__label&&n.isClosed()&&(n.open(),n.storeState())}}(this)}),L.Events.listen({type:"keydown",node:this._element,call:function(n){return function(b){var A;n.__label&&n.isClosed()&&("Return"!==(A=b.getKeyboardKey())&&"Space"!==A||(n.open(),n.storeState()))}}(this)})),b=null,new L.Draggable({element:this._element,axis:n,support_touch:!0,create:function(n){return function(){if(n.isClosed())return!1}}(this),dragstart:function(A){return function(R,D){var B,E,X,$,V;return X=A.__pane_idx0?n/b*100:n,R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"):"string"==typeof n&&-1!==n.indexOf("%")?(A=parseFloat(n),R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"):(A=(b=L.dom.getDimension(this.__pane.parentNode,"contentBox"+this.__css_value))>0?parseFloat(n)/b*100:n,R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"),this.__pane.classList.add("cui-is-manually-sized"),this._element.classList.add("cui-is-manually-sized"),L.dom.setStyleOne(this.__pane,this.__css_value.toLowerCase(),R),this.__size=R):(this.__pane.classList.add("cui-is-manually-sized"),this._element.classList.add("cui-is-manually-sized"),L.dom.setDimension(this.__pane,"contentBox"+this.__css_value,n),this.__size=n),this.__resize()},FlexHandle.prototype.resetSize=function(){return this.__setSize(null),this},FlexHandle.prototype.getSize=function(){return this.__size},FlexHandle.prototype.__isAlive=function(){return!(this.isDestroyed()||!L.dom.isInDOM(this._element))},FlexHandle.prototype.__resize=function(){if(this.__isAlive())return"function"==typeof this._onResize&&this._onResize(this,this.getSize()),L.Events.trigger({type:"viewport-resize",info:{FlexHandle:!0}})},FlexHandle.prototype.__getState=function(){var n;return n=L.getLocalStorage(this.__state_name),L.util.isNull(n)?{}:JSON.parse(n)},FlexHandle.prototype.__setState=function(){var n;if(this.__state_name)return n=this.__getState(),!L.util.isUndef(n.closed)&&this._closable&&(n.closed?this.close():this.open()),L.util.isUndef(n.size)||this.__setSize(n.size),this},FlexHandle.prototype.storeState=function(){var n,b;if(this.__state_name)return n={closed:this.isClosed(),size:this.getSize()},b=JSON.stringify(n),L.setLocalStorage(this.__state_name,b),console.info("FlexHandle.storeState: ",this.__state_name,b),this},FlexHandle.prototype.isStretched=function(){return this.__stretched},FlexHandle.prototype.stretch=function(n,b){var A,R,D,B,E,X,$,V;if(null==b&&(b=!0),b){if(this.isStretched()===n)return;this.unstretch()}switch($=this.getPane(),n){case"west":case"north":R=L.dom.findPreviousSiblings($);break;case"east":case"south":R=L.dom.findNextSiblings($)}switch(n){case"west":case"east":V="width";break;case"north":case"south":V="height"}if(b){for(D=0,E=R.length;D{var L=A(7288),R={}.hasOwnProperty;L.Icon=function(n){function Icon(n){var b,A,R;Icon.__super__.constructor.call(this,n),R="",b="",this._icon&&(b||(b=L.Icon.icon_map[this._icon]),b||(b=this._icon),b.startsWith("svg-")&&(R=b,b="")),L.util.isEmpty(this._class)||(b+=" "+this._class),R?this.DOM=L.dom.htmlToNodes('')[0]:(this.DOM=L.dom.element("I",{class:"fa "+b}),!this._icon||L.Icon.icon_map[this._icon]||this._icon.startsWith("fa-")||this._icon.startsWith("css-swatch")||((A=L.dom.span("cui-no-icon")).textContent=this._icon[0],L.dom.removeClass(this.DOM,this._icon),L.dom.removeClass(this.DOM,"fa"),L.dom.append(this.DOM,A))),this._ui&&L.dom.setAttribute(this.DOM,"ui",this._ui),this._tooltip&&(this._tooltip.element=this.DOM,new L.Tooltip(this._tooltip))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Icon,n),Icon.prototype.initOpts=function(){return Icon.__super__.initOpts.call(this),this.addOpts({class:{check:String},icon:{check:String},ui:{check:String},fixed_width:{check:Boolean},tooltip:{check:"PlainObject"}})},Icon.prototype.copy=function(){var n,b;return n=Icon.__super__.copy.call(this),b=L.dom.getStyle(this),L.dom.setStyle(n,b),n},Icon.prototype.hide=function(){return L.dom.hideElement(this.DOM)},Icon.prototype.show=function(){return L.dom.showElement(this.DOM)},Icon.icon_map={audio:"fa-music",bolt:"fa-bolt",calendar:"fa-calendar-plus-o",camera:"fa-camera",check:"fa-check",clock:"fa-clock-o",close:"svg-close",cloud:"fa-cloud",copy:"fa-files-o",crop:"fa-crop",dive:"fa-angle-right",down:"fa-angle-down",download:"fa-download",east:"fa-angle-right",edit:"fa-pencil",ellipsis_h:"fa-ellipsis-h",ellipsis_v:"fa-ellipsis-v",email:"fa-envelope-o",envelope_active:"fa-envelope",envelope:"fa-envelope-o",expert_search:"fa-list-ul",export:"fa-download",external_link:"svg-external-link",failed:"fa-warning",file_text:"fa-file-text-o",file_text_active:"fa-file-text",file:"fa-file",filter:"fa-filter",folder_shared_upload:"svg-folder-shared-upload",folder_shared:"svg-folder-shared",folder_upload:"svg-folder-upload",folder:"svg-folder",fullscreen_expand:"svg-fullscreen-expand",fullscreen_compress:"svg-fullscreen-compress",heart:"fa-heart",help:"fa-question",image:"fa-picture-o",info_circle:"svg-info-circle",info_circle_ng:"svg-info-circle-ng",info:"fa-info-circle",left:"fa-angle-left",legal:"fa-legal",list:"fa-question",menu:"fa-bars",minus:"fa-minus",no_right:"fa-slack",north:"fa-angle-up",play:"fa-play",plus:"fa-plus",print:"fa-print",question:"fa-question",refresh:"fa-refresh",remove:"svg-close",required:"fa-bullhorn",reset:"svg-reset",resize_full:"fa-expand",resize_small:"fa-compress",right:"fa-angle-right",rotate_horizontal:"fa-arrows-h",rotate_left:"fa-rotate-left",rotate_right:"fa-rotate-right",rotate_vertical:"fa-arrows-v",ruler:"svg-ruler",save:"fa-floppy-o",search:"fa-search",settings:"fa-cog",share:"fa-share",show:"fa-question",sliders:"fa-sliders",south:"fa-angle-down",spinner:"svg-spinner cui-spin-stepped",start:"fa-play",stop:"fa-stop",trash:"svg-trash",up:"fa-angle-up",upload:"fa-upload",user:"fa-user",warning:"fa-warning",west:"fa-angle-left",zip:"fa-file-archive-o",zoom_in:"fa-search-plus",zoom_out:"fa-search-minus"},Icon}(L.Element),L.proxyMethods(L.Icon,L.Button,["hide","show","isShown","isHidden"])},2536:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0&&n.left>=0}},fill_space:{default:"auto",mandatory:!0,check:L.Layer.FILL_SPACE_CHECK_ARRAY},check_for_element:{default:!1,check:Boolean},show_ms:{default:700,check:function(n){return n>0}},visible:{check:Boolean},hide_ms:{default:100,check:function(n){return n>0}}}),this},Layer.prototype.readOpts=function(){return Layer.__super__.readOpts.call(this),this.__fill_space=this._fill_space,this},Layer.prototype.setVisible=function(n){return null==n&&(n=!0),n?L.dom.setStyleOne(this.__layer_root.DOM,"visibility",""):L.dom.setStyleOne(this.__layer_root.DOM,"visibility","hidden")},Layer.prototype.__allPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw","c"],Layer.prototype.knownPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw","c"],Layer.prototype.__setElement=function(n){return n instanceof L.DOMElement?this.__element=n.getElementForLayer():n.DOM?this.__element=n.DOM:this.__element=n,L.util.assert(!L.dom.closest(this.__element,".cui-tmpl"),"Layer.__setElement","element cannot be inside a Template.",{element:n}),L.util.assert(this.__element instanceof HTMLElement,"Layer.__setElement","element needs to be HTMLElement.",{element:n}),this.__element},Layer.prototype.__getOriginalElement=function(){var n;return(null!=(n=this._element)?n.DOM:void 0)||this._element||null},Layer.prototype.autoSize=function(){return this.position()},Layer.prototype.position=function(n){var b,A,R,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot,ft,mt,_t,gt,At,yt,qt,vt,Wt,wt,Lt,Rt,xt,kt,Tt,Ct,Dt,St,Bt,Nt,Et,It,Yt,Pt,Ht,Ft,Xt,Vt,Ut,jt,Zt,Gt,Kt,oe,ie,re,se,ae,ce,le,ue;if(!this.isShown())return this;if("content-resize"!==(null!=n?n.getType():void 0)&&(this.__currentPlacement=null),(X=L.dom.getDimensions(document.body)).isPositioned="relative"===(It=X.computedStyle.position)||"fixed"===It||"absolute"===It,Q={width:window.innerWidth-L.dom.getLayerSidebarWidth(),height:window.innerHeight},it=function(n){return{n:"s",s:"n",e:"w",w:"e"}[n]},nt=function(n){return"cui-layer-pointer--"+n},this.__pointer)for(L.dom.setStyle(this.__pointer,{top:0,left:0,display:"",margin:""}),rt=0,zt=(Yt=["w","s","e","n"]).length;rtse.top&&(se.top=se.window_top),se.window_left>se.left&&(se.left=se.window_left),se.window_bottomse.width&&(ut.width=se.width,se.cuts++),ut.height>se.height&&(ut.height=se.height,se.cuts++),se.align_horizontal){case"left":ut.left=se.left;break;case"right":ut.left=se.right-ut.width;break;case"center":ut.left=$.viewportCenterLeft-ut.width/2}switch(se.align_vertical){case"top":ut.top=se.top;break;case"bottom":ut.top=se.bottom-ut.height;break;case"center":ut.top=$.viewportCenterTop-ut.height/2}if(se.dim_pointer){switch(se.pointer_align_horizontal){case"left":St.left=$.viewportRight+se.dim_pointer.marginLeft;break;case"right":St.left=$.viewportLeft-se.dim_pointer.borderBoxWidth-se.dim_pointer.marginLeft;break;case"center":St.left=$.viewportCenterLeft-se.dim_pointer.borderBoxWidth/2}switch(se.pointer_align_vertical){case"top":St.top=$.viewportBottom+se.dim_pointer.marginTop;break;case"bottom":St.top=$.viewportTop-se.dim_pointer.marginBoxHeight+se.dim_pointer.marginTop;break;case"center":St.top=$.viewportCenterTop-se.dim_pointer.borderBoxHeight/2}St.width=se.dim_pointer.borderBoxWidth,St.height=se.dim_pointer.borderBoxHeight,St.direction=se.dim_pointer.direction}if(ut.top0&&(ut.top=ut.top-Lt),(xt=ut.left+ut.width-se.right)>0&&(ut.left=ut.left-xt),se.overlap_height=0,se.overlap_width=0,this.__pointer||this._show_at_position){if((Rt=V.borderBoxHeight-ut.height)>0)switch(se.overlap_align){case"bottom":se.overlap_height=Math.min(ut.top-se.window_top,Rt),ut.top=ut.top-se.overlap_height,ut.height=ut.height+se.overlap_height;break;case"top":se.overlap_height=Math.min(se.window_bottom-ut.top-ut.height,Rt),ut.height=ut.height+se.overlap_height}if((kt=V.borderBoxWidth-ut.width)>0)switch(se.overlap_align){case"right":se.overlap_width=Math.min(ut.left-se.window_left,kt),ut.left=ut.left-se.overlap_width,ut.width=ut.width+se.overlap_width;break;case"left":se.overlap_height=Math.min(se.window_right-ut.right,kt),ut.width=ut.width+se.overlap_width}}if(this.__pointer&&se.dim_pointer)switch(Mt=se.layer_pos.left+se.layer_pos.width,bt=se.layer_pos.top+se.layer_pos.height,Nt=se.pointer_pos.left+se.pointer_pos.width,Bt=se.pointer_pos.top+se.pointer_pos.height,se.pointer_pos.direction){case"n":case"s":(Et=se.pointer_pos.left-se.layer_pos.left-se.dim_pointer.marginLeft)<0&&(re=se.layer_pos.left-se.window_left,se.push_left=Math.min(re,-Et),se.layer_pos.left=se.layer_pos.left-se.push_left),(Et=Mt-Nt-se.dim_pointer.marginRight)<0&&(re=se.window_right-Mt,se.push_right=Math.min(re,-Et),se.layer_pos.left=se.layer_pos.left+se.push_right);break;case"e":case"w":(Et=se.pointer_pos.top-se.layer_pos.top-se.dim_pointer.marginTop)<0&&(re=se.layer_pos.top-se.window_top,se.push_top=Math.min(re,-Et),se.layer_pos.top=se.layer_pos.top-se.push_top),(Et=bt-Bt-se.dim_pointer.marginBottom)<0&&(re=se.window_bottom-bt,se.push_bottom=Math.min(re,-Et),se.layer_pos.top=se.layer_pos.top+se.push_bottom)}this._onPosition&&"function"==typeof this._onPosition&&this._onPosition(this,se),se.layer_pos.estate=se.layer_pos.width*se.layer_pos.height,se.layer_pos.aspect_ratio=(se.layer_pos.width||1)/(se.layer_pos.height||1),se.dim_layer.aspect_ratio=(se.dim_layer.borderBoxWidth||1)/(se.dim_layer.borderBoxHeight||1),le=b.length-L.util.idxInArray(Tt,b),ce===Tt&&(le=b.length+1),se.ranking=10*le+1-Math.abs(se.layer_pos.aspect_ratio-se.dim_layer.aspect_ratio)+se.layer_pos.estate}for(Tt in A=[],ae)se=ae[Tt],A.push(Tt);if(0===A.length)return this.hide(),void console.warn("Layer.position","No available placements found.");for(A.sort((function(n,b){var A;return A=function(n){return ae[n].ranking},L.util.compareIndex(A(n),A(b))})),A.reverse(),Ut=this.__currentPlacement,D.call(A,Ut)<0&&(this.__currentPlacement=A[0]),(null!=n?n.hasModifierKey():void 0)&&(console.debug("Layer.position",this,this.opts),console.debug("layer",V),console.debug("element",$),console.debug("pointer",K),console.debug("window",Q),console.debug("placements",this.__currentPlacement,ae),ue=this,oe=function(n){var b,A,R,D,B;if(ue.__removeDebugDivs(),b=ae[n],console.info("Layer: Placement",n,b),ue.__dbg_div1=L.dom.element("DIV"),ue.__dbg_div2=L.dom.element("DIV"),ue.__dbg_div3=L.dom.element("DIV"),R={position:"absolute",zIndex:2,border:"2px solid #ff0032",backgroundColor:"rgba(255, 0, 0, 0.4)",top:b.top,left:b.left,width:b.width,height:b.height},L.dom.setStyle(ue.__dbg_div1,R),D={position:"absolute",zIndex:2,border:"2px solid #00ff32",backgroundColor:"rgba(0, 255, 0, 0.4)",top:b.layer_pos.top,left:b.layer_pos.left,width:b.layer_pos.width,height:b.layer_pos.height,alignItems:"center",justifyContent:"center",fontSize:40,color:"rgb(0,255,50)"},(A=L.dom.element("SPAN")).textContent=n,ue.__dbg_div2.appendChild(A),L.dom.setStyle(ue.__dbg_div2,D),B={position:"absolute",zIndex:2,border:"2px solid #0032ff",backgroundColor:"rgba(0, 0, 255, 0.4)",top:b.pointer_pos.top,left:b.pointer_pos.left,width:b.pointer_pos.width,height:b.pointer_pos.height},L.dom.setStyle(ue.__dbg_div3,B),ue.__layer_root.DOM.appendChild(ue.__dbg_div1),ue.__layer_root.DOM.appendChild(ue.__dbg_div2),ue.__pointer)return ue.__layer_root.DOM.appendChild(ue.__dbg_div3)},E=0,yt=L.Events.listen({node:document,type:"keyup",call:function(n){return function(b,A){var L;if(32===b.keyCode())for(;;){if((E+=1)===n.knownPlacements.length)return n.__removeDebugDivs(),void yt.destroy();if(L=n.knownPlacements[E],ae[L])return void oe(L);console.warn("Placement",L,"is unavailable.")}}}(this)})),(se=ae[this.__currentPlacement]).layer_pos.width<10||se.layer_pos.height,vt=this._element&&this._use_element_width_as_min_width?$.borderBoxWidth:void 0,L.dom.setAttribute(this.__layer_root.DOM,"cui-placement",Tt),L.dom.setAttribute(this.__layer_root.DOM,"cui-fill-space",this.__fill_space),Gt={top:se.layer_pos.top,left:se.layer_pos.left,minWidth:vt,margin:0},V.computedStyle.maxWidth&&"none"!==V.computedStyle.maxWidth||(Gt.maxWidth=se.width+se.overlap_width),V.computedStyle.maxHeight&&"none"!==V.computedStyle.maxHeight||(Gt.maxHeight=se.height+se.overlap_height),"c"===Tt||((null!=(jt=this.__layer_root.DOM.previousElementSibling)?jt.hasAttribute("cui-layer-fixed"):void 0)||!1)?(this.__layer_root.DOM.setAttribute("cui-layer-fixed",""),Gt.top=se.layer_pos.top,Gt.left=se.layer_pos.left):(this.__layer_root.DOM.removeAttribute("cui-layer-fixed"),Kt={top:B,left:R,bottom:0,right:0},X.isPositioned&&(Kt.top-=X.marginTop+X.borderTopWidth,Kt.left-=X.marginLeft+X.borderLeftWidth,Kt.bottom-=X.marginBottom+X.borderBottomWidth,Kt.right-=X.marginRight+X.borderRightWidth),L.dom.setStyle(this.__layer_root.DOM,Kt)),Gt.width=Math.ceil(se.layer_pos.width),Gt.height=Math.ceil(se.layer_pos.height),L.browser.ie&&(ie=this.__layer_root.DOM.previousElementSibling,L.dom.remove(this.__layer_root)),L.dom.setStyle(this.__layer.DOM,Gt),this.__pointer&&(se.dim_pointer?(L.dom.setStyle(this.__pointer,{top:se.pointer_pos.top,left:se.pointer_pos.left,margin:0}),L.dom.addClass(this.__pointer,nt(se.pointer_pos.direction)),L.dom.addClass(this.__layer,"has-"+nt(se.pointer_pos.direction))):L.dom.setStyle(this.__pointer,{display:"none"})),this.__backdrop_crop&&(L.dom.setStyle(this.__backdrop_crop,{top:se.layer_pos.top,left:se.layer_pos.left,width:se.layer_pos.width,height:se.layer_pos.height}),L.dom.setStyle(this.__backdrop_crop.firstChild,{width:Q.width,height:Q.height,top:-se.layer_pos.top,left:-se.layer_pos.left})),L.browser.ie&&L.dom.insertAfter(ie,this.__layer_root.DOM),wt=0,At=(Zt=L.dom.matchSelector(this.__layer.DOM,"*")).length;wt .cui-layer-root")).length,A=b=0,D=R.length;b0||(this.__focused_on_show=!1),(this.__focused_on_show||this.forceFocusOnShow())&&this.DOM.focus(),this},Layer.prototype.forceFocusOnShow=function(){return!1},Layer.prototype.focusOnHide=function(n){var b;return this.__element?((n===L.KeyboardEvent||this.__focused_on_show)&&null!=(b=L.dom.findElement(this.__element,"[tabindex]"))&&b.focus(),this):this},Layer.prototype.getElement=function(){return this.__element},Layer.prototype.isShown=function(){return this.__shown},Layer.prototype.destroy=function(){var n,b,A;return this.__shown&&this.hide(),Layer.__super__.destroy.call(this),null!=(n=this.__layer)&&n.destroy(),null!=(b=this.__layer_root)&&b.destroy(),this.__layer=null,this.__layer_root=null,L.dom.remove(this.__pointer),this.__pointer=null,null!=(A=this.__backdrop)&&A.destroy(),this.__backdrop=null},Layer.prototype.setFillSpace=function(n){return L.util.assert(D.call(Layer.FILL_SPACE_CHECK_ARRAY,n)>=0,"Layer.setFillSpace","Parameter fillSpace should be: "+Layer.FILL_SPACE_CHECK_ARRAY.join(""),{fillSpace:n}),this.__fill_space=n,this.position(),this},Layer}(L.DOMElement),L.ready((function(){return L.Events.listen({type:["mousedown","touchend"],capture:!0,node:document.body,call:function(n,b){var A,R,D,B,E,X;for(E=L.dom.find("body > .cui-layer-root, body > .cui-pane-fill-screen-is-on, body > .cui-layer-prevent-click-thru"),X=n.getTarget(),R=E.length-1;R>=0;R+=-1){if(B=E[R],!L.dom.hasClass(B,"cui-layer-backdrop-policy-click-thru")){if(L.dom.hasClass(B,"cui-layer-root-tooltip"))continue;return}if(L.dom.hasClass(B,"cui-layer-sidebar"))return;if(L.dom.closest(X,B))return;(A=(D=L.dom.data(L.dom.children(B,".cui-layer")[0],"element")).getElement())&&L.dom.closest(n.getTarget(),A)&&L.Events.listen({node:document.documentElement,type:["dblclick","click"],capture:!0,only_once:!0,call:function(n){return n.stop()}}),n.cui_layer_closed=!0,D.hide(n)}}}),L.Events.listen({type:["keyup"],node:document.body,call:function(n){var b,A,R,D;if(27===n.keyCode()&&!L.globalDrag&&(A=(R=L.dom.find("body > .cui-layer-root > .cui-layer:not(.cui-tooltip)"))[R.length-1])&&((D=n.getTarget())===A||D===document.body))return b=L.dom.data(A,"element"),n.stopImmediatePropagation(),n.preventDefault(),b.isKeyboardCancellable(n)?(b.doCancel(n),!1):void 0}})}))},2734:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Layout=function(n){function Layout(n){Layout.__super__.constructor.call(this,n),this.__isInit=!1,this.init()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Layout,n),Layout.prototype.initOpts=function(){var n,b,A,R,D;for(Layout.__super__.initOpts.call(this),this.addOpts({absolute:{check:Boolean},maximize:{check:Boolean},maximize_horizontal:{check:Boolean},maximize_vertical:{check:Boolean},auto_buttonbar:{default:!0,mandatory:!0,check:Boolean},center:{default:{},check:"PlainObject"}}),D=[],n=0,b=(R=this.getSupportedPanes()).length;n0?ut.slice(0,$).reduce((function(n,b){return n+b})):0;break;case"right":case"bottom":lt=$+10&&L.Events.trigger({type:"viewport-resize"}),this},Layout.all=function(){return L.scheduleCallback({call:L.Layout.__all})},Layout}(L.DOMElement),L.ready((function(){return L.Events.listen({type:["viewport-resize","content-resize"],call:function(n,b){return b.FlexHandle?L.Layout.__all():L.Layout.all()}})}))},7524:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Socket=function(n){function Socket(){return Socket.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Socket,n),Socket.prototype.getGroup=function(){return"Core"},Socket.prototype.initOpts=function(){return Socket.__super__.initOpts.call(this),this.addOpts({url:{mandatory:!0,check:String,check:function(n){return n.trim().length>0}},onmessage:{check:Function},onclose:{check:Function},onopen:{check:Function},onerror:{check:Function}}),this},Socket.states={0:"OPENING",1:"OPEN",2:"CLOSING",3:"CLOSED"},Socket.prototype.readOpts=function(){var n;switch(Socket.__super__.readOpts.call(this),(n=L.parseLocation(this._url)).protocol){case"http":case"ws":this.__protocol="ws";break;case"https":case"wss":this.__protocol="wss"}return this._url=this._url.replace(n.protocol,this.__protocol),this},Socket.prototype.open=function(){var n,b,A;n=new L.Deferred,b=function(){"pending"===n.state()&&n.reject()};try{this.__webSocket=new WebSocket(this._url),this.__webSocket.onerror=function(n){return b()},this.__webSocket.onopen=(A=this,function(b){return A.__onOpen(b),n.resolve()}),this.__webSocket.onclose=function(n){return function(b){return n.__onClose(b)}}(this)}catch(n){b()}return n.promise()},Socket.prototype.__onOpen=function(n){return this._onopen&&this._onopen(n),this.__webSocket.onmessage=(b=this,function(n){var A;return A={},L.util.isEmpty(n.data)||(A=JSON.parse(n.data)),b._onmessage(n,A)});var b},Socket.prototype.__onClose=function(n){if(this._onclose)return this._onclose()},Socket.prototype.close=function(){return this.__webSocket.close()},Socket.prototype.send=function(n){if("OPEN"===this.getStatus())return this.__websocket.send(n)},Socket.prototype.getStatus=function(n){var b;return null==n&&(n=!0),b=this.__websocket.readyState,n?this.states[b]:b},Socket}(L.Element)},5982:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template=function(n){function Template(n){var b;Template.__super__.constructor.call(this,n),b=L.Template.nodeByName[this._name],L.util.assert(b,"CUI.Template",this._name+" not found. Make sure to call Template.loadFile(...)."),this.DOM=b.cloneNode(!0),this._class&&L.dom.addClass(this.DOM,this._class),this._attr&&L.dom.setAttributeMap(this.DOM,this._attr),this.map=this.getElMap(this._map),this.__updateTemplateEmpty(),this._init_flex_handles&&this.initFlexHandles()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Template,n),Template.prototype.initOpts=function(){return Template.__super__.initOpts.call(this),this.addOpts({name:{mandatory:!0,check:String},map_prefix:{check:String},init_flex_handles:{mandatory:!0,default:!1,check:Boolean},map:{type:"PlainObject",default:{}},class:{check:String},attr:{check:"PlainObject"}}),this},Template.prototype.initFlexHandles=function(n){var b,A,R,D,B,E,X,$,V,K;for(null==n&&(n={}),this.__flexHandles={},D=0,E=($=L.dom.matchSelector(this.DOM,"[data-cui-flex-handle]")).length;D1?(console.debug(R,V,"found more than once",D,this.DOM),X.push("* "+R+": found more than once ("+$+")"),B++):(X.push("+ "+R+": found"),A[R]=D[0],D[0].removeAttribute("data-slot"),function(n){return function(b){return A[b].empty=function(){return n.empty(b),A[b]},A[b].append=function(L){return n.append(L,b),A[b]},A[b].prepend=function(L){return n.prepend(L,b),A[b]}}}(this)(R)));return B&&L.util.assert(!1,'Not all required elements were found for Template:\n\n"'+this._name+'"\n\n'+X.join("\n")),A},Template.prototype.destroy=function(){return L.dom.remove(this.DOM),delete this.map,Template.__super__.destroy.call(this)},Template.prototype.addClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".addClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.addClass(this.map[b],n)):L.dom.addClass(this.DOM,n)},Template.prototype.removeClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".removeClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.removeClass(this.map[b],n)):L.dom.removeClass(this.DOM,n)},Template.prototype.hasClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".hasClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.hasClass(this.map[b],n)):L.dom.hasClass(this.DOM,n)},Template.prototype.has=function(n){return!!this.map[n]},Template.prototype.hide=function(n){return n?L.dom.hideElement(this.map[n]):L.dom.hideElement(this.DOM)},Template.prototype.show=function(n){return n?L.dom.showElement(this.map[n]):L.dom.showElement(this.DOM)},Template.prototype.__updateTemplateEmpty=function(){var n,b;if(L.util.isEmptyObject(this.map))n=this.isEmpty();else for(b in n=!0,this.map)if(!this.isEmpty(b)){n=!1;break}n?L.dom.addClass(this.DOM,"cui-template-empty"):L.dom.removeClass(this.DOM,"cui-template-empty")},Template.prototype.replace=function(n,b,A){var R;return L.util.assert(this.map,"Template["+this._name+"].replace ["+this.getUniqueId()+"]","Already destroyed"),b&&L.util.assert(this.map[b],this.__cls+".replace",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),this.__empty(b),R=this.__append(n,b,A),this.__updateTemplateEmpty(),R},Template.prototype.text=function(n,b,A){L.util.assert(L.util.isString(n),this.__cls+".text","Value must be String",{value:n,key:b,element:A}),b?this.map[b].textContent=n:this.DOM.textContent=n,this.__updateTemplateEmpty()},Template.prototype.prepend=function(n,b,A){var L;return L=this.__append(n,b,A,!0),this.__updateTemplateEmpty(),L},Template.prototype.append=function(n,b,A){var L;return L=this.__append(n,b,A,!1),this.__updateTemplateEmpty(),L},Template.prototype.empty=function(n){var b;return b=this.__empty(n),this.__updateTemplateEmpty(),b},Template.prototype.__empty=function(n){if(L.util.assert(this.map,"Template["+this._name+"].empty ["+this.getUniqueId()+"]","Already destroyed",{template:this,name:this._name}),this.isEmpty(n))return n?this.map[n]:this.DOM;if(n)return L.util.assert(this.map[n],this.__cls+".empty",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map}),L.dom.empty(this.map[n]),this.map[n];if(L.util.isEmptyObject(this.map))L.dom.empty(this.DOM);else for(n in this.map)L.dom.empty(this.map[n]);return this.DOM},Template.prototype.__append=function(n,b,A,R){var D,B,E,X,$,V;for(E=R?"prepend":"append",L.util.assert(this.map,"Template["+this._name+"]."+E+" ["+this.getUniqueId()+"]","Already destroyed"),b&&L.util.assert(this.map[b],this.__cls+"."+E,'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map}),L.util.isFunction(n)&&(n=n(A)),L.util.isArray(n)||(n=[n]),B=[],X=0,$=n.length;X<$;X++)(null!=(D=n[X])?D.DOM:void 0)?B.push(D.DOM):(L.util.assert(!L.util.isPromise(D),"Template.append","value cannot be Promise",{value:n}),D&&B.push(D));return V=b?this.map[b]:this.DOM,B.length>0&&L.dom[E](V,B),V},Template.prototype.get=function(n){return L.util.assert(this.map[n],this.__cls+".get",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),this.map[n]},Template.prototype.isEmpty=function(n){return n?(L.util.assert(this.map[n],this.__cls+".isEmpty",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map}),!this.map[n].firstChild):!this.DOM.firstChild},Template.prototype.removeEmptySlots=function(){var n,b,A;for(n in A=this.map)(b=A[n]).firstChild||L.dom.remove(b);return this},Template.nodeByName={},Template.loadTemplateFile=function(n){return this.loadFile(n,!0)},Template.loadTemplateText=function(n){return this.__appendContent(n,!0)},Template.loadText=function(n){return this.__appendContent(n,!1)},Template.loadFile=function(n,b){var A,R;return null==b&&(b=!1),A=n.match("^(https://|http://|/)")?n:L.getPathToScript()+n,new L.XHR({url:A,responseType:"text"}).start().done((R=this,function(n){R.__appendContent(n,b)})).fail((function(b){return console.error('Template.loadFile: Unable to load filename: "'+n+'", see Console for more details. You can however, output easydbui.html manually before loading easydbui.js.',b)}))},Template.load=function(n){var b,A,R,D,B,E,X,$,V,K;for(null==n&&(n=document.documentElement),A=0,D=0,E=(V=L.dom.matchSelector(n,".cui-tmpl,[data-template]")).length;D0&&(document.body.appendChild(R),console.warn("Template.appendContent: contains extra content",R)),0===A?console.warn("Template.appendContent: contains no Templates"):void 0):document.body.appendChild(R)},Template}(L.Element)},320:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.XHR=function(n){function XHR(){return XHR.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(XHR,n),XHR.prototype.getGroup=function(){return"Core"},XHR.prototype.initOpts=function(){return XHR.__super__.initOpts.call(this),this.addOpts({method:{mandatory:!0,default:"GET",check:["GET","POST","PUT","DELETE","OPTIONS","HEAD","PATCH"]},url:{mandatory:!0,check:String,check:function(n){return n.trim().length>0}},user:{check:String},password:{check:String},responseType:{mandatory:!0,default:"json",check:["","text","json","blob","arraybuffer"]},timeout:{check:function(n){return n>=0}},form:{check:"PlainObject"},url_data:{check:"PlainObject"},body:{},json_data:{},json_pretty:{default:!1,check:function(n){return!1===n||!0===n||L.util.isString(n)}},headers:{mandatory:!0,default:{},check:"PlainObject"},withCredentials:{mandatory:!0,default:!1,check:Boolean}}),this},XHR.readyStates={0:"UNSENT",1:"OPENED",2:"HEADERS_RECEIVED",3:"LOADING",4:"DONE"},XHR.statusText={"-1":"abort","-2":"timeout","-3":"network_failure"},XHR.prototype.readOpts=function(){var n,b,A,R;for(n in XHR.__super__.readOpts.call(this),this.__xhr=new XMLHttpRequest,this.__xhr.withCredentials=this._withCredentials,this.__readyStatesSeen=[this.readyState()],this.__registerEvents("download"),this.__registerEvents("upload"),this.__headers={},b=this._headers)R=b[n],this.__headers[n.toLowerCase()]=R;return this._form&&(this.opts.method||(this._method="POST")),this._url_data?this.__url=L.appendToUrl(this._url,this._url_data):this.__url=this._url,A=0,this._form&&(A+=1),this._json_data&&(A+=1,void 0===this.__headers["content-type"]&&(this.__headers["content-type"]="application/json; charset=utf-8")),this._body&&(A+=1),L.util.assert(A<=1,"new CUI.XHR","opts.form, opts.json_data, opts.body are mutually exclusive."),this},XHR.prototype.__registerEvents=function(n){var b,A,L,R,D,B,E,X;for(D=["loadStart","progress","abort","error","load","loadend","timeout"],"upload"===n?E=this.__xhr.upload:(D.push("readyStateChange"),E=this.__xhr),X=this,A=function(n,b){return E.addEventListener(b.toLowerCase(),(function(b){return X[n](b)}))},L=0,B=D.length;L=200&&this.__xhr.status<300||304===this.__xhr.status)},XHR.prototype.status=function(){return this.__status<0?this.__status:this.__xhr.status},XHR.prototype.statusText=function(){return this.__status<0?L.XHR.statusText[this.__status+""]:this.__xhr.statusText},XHR.prototype.response=function(){var n;if("json"===this._responseType&&""===this.__xhr.responseType)try{n=JSON.parse(this.__xhr.response)}catch(b){n=this.__xhr.response}else n=this.__xhr.response;return"json"===this._responseType&&(this.__xhr.responseJSON=n),n},XHR.prototype.start=function(){var n,b,A,R,D,B;for(b in this.__xhr.open(this._method,this.__url,!0,this._user,this._password),A=this.__headers)B=A[b],this.__xhr.setRequestHeader(b,B);if(this.__xhr.responseType=this._responseType,this.__xhr.timeout=this._timeout,this._form){for(b in n=new FormData,R=this._form)B=R[b],n.append(b,B);D=n}else D=this._json_data?this._json_pretty?!0===this._json_pretty?JSON.stringify(this._json_data,null,"\t"):JSON.stringify(this._json_data,null,this._json_pretty):JSON.stringify(this._json_data):this._body?this._body:void 0;return this.__dfr=new L.Deferred,this.__xhr.send(D),this.__dfr.promise()},XHR.prototype.getXHR=function(){return this.__xhr},XHR.prototype.getAllResponseHeaders=function(){var n,b,A,L,R;for(b=[],A=0,L=(R=this.__xhr.getAllResponseHeaders().split("\r\n")).length;A{var L=A(7288);L.dom=function(){function dom(){}return dom.data=function(n,b,A){var R,D,B;if(n){if(n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"dom.data","node needs to be instance of HTMLElement",{node:n}),void 0===b)return n.__dom_data||{};if(L.util.isPlainObject(b)){for(R in b)B=b[R],L.dom.data(n,R,B);return n}return void 0===A?null!=(D=n.__dom_data)?D[b]:void 0:(n.__dom_data||(n.__dom_data={}),n.__dom_data[b]=A,n)}},dom.removeData=function(n,b){if(n)return n.__dom_data&&(delete n.__dom_data[b],L.util.isEmptyObject(n.__dom_data)&&delete n.__dom_data),n},dom.findElement=function(n,b,A,L,R){var D;return null==L&&(L=!0),null==R&&(R=!1),0===(D=this.findElements(n,b,A,1,L,R)).length?null:D[0]},dom.findNextElement=function(n,b,A,L,R){var D,B;if(null==A&&(A=!1),null==L&&(L=!0),null==R&&(R=!0),D=this.findElement(n,b,A,L,R))return D;for(;;){if(!(n=n.parentNode))return null;if(B=L?n.nextElementSibling:n.previousElementSibling)break}return this.findNextElement(B,b,A,L,!1)},dom.findPreviousElement=function(n,b,A){return null==A&&(A=!1),this.findNextElement(n,b,A,!1)},dom.findNextVisibleElement=function(n,b,A){return null==A&&(A=!0),this.findNextElement(n,b,(function(n){return L.dom.isVisible(n)}),A)},dom.findPreviousVisibleElement=function(n,b){return this.findNextVisibleElement(n,b,!1)},dom.findNextSiblings=function(n,b,A){return null==A&&(A=!1),this.findElements(n,b,A,null,!0,!0)},dom.findPreviousSiblings=function(n,b,A){return null==A&&(A=!1),this.findElements(n,b,A,null,!1,!0)},dom.findElements=function(n,b,A,R,D,B,E){var X,$,V,K;return null==n&&(n=document.documentElement),null==b&&(b=null),null==A&&(A=!1),null==R&&(R=null),null==D&&(D=!0),null==B&&(B=!1),E?$=!0:(L.util.assert(n instanceof HTMLElement,"DOM.findElement","node needs to be instanceof HTMLElement.",{node:n,selector:b}),E=[],$=!B),X=!A||A(n),$&&X&&(null===b||L.dom.matches(n,b))&&(E.push(n),E.length===R)||(D?(V=n.firstElementChild,K=n.nextElementSibling):(V=n.lastElementChild,K=n.previousElementSibling),V&&!B&&X&&(this.findElements(V,b,A,R,D,B,E),E.length===R)||K&&(this.findElements(K,b,A,R,D,B,E),E.length)),E},dom.children=function(n,b){var A,L,R,D,B,E;for(L=[],D=R=0,B=(E=n.children).length;Rb.length||D++,B=b.length;return n}switch(typeof b){case"number":case"boolean":R=document.createTextNode(b+"");break;case"string":R=document.createTextNode(b);break;default:if(b.hasOwnProperty("DOM")){if(R=b.DOM,L.util.isNull(R))return}else R=b}return n.hasOwnProperty("DOM")&&n.DOM instanceof Node&&(n=n.DOM),A?(L.util.assert(R instanceof Node,"CUI.dom.append","Content needs to be instanceof Node, string, boolean, or number.",{node:R}),n.appendChild(R)):(L.util.assert(R instanceof Node,"CUI.dom.prepend","Content needs to be instanceof Node, string, boolean, or number.",{node:R}),n.insertBefore(R,n.firstChild)),n},dom.replace=function(n,b){return n.hasOwnProperty("DOM")&&(n=n.DOM),this.empty(n),this.append(n,b)},dom.prepend=function(n,b){return this.__append(n,b,!1)},dom.append=function(n,b){return this.__append(n,b)},dom.getAttribute=function(n,b){return n.hasOwnProperty("DOM")&&(n=n.DOM),n.getAttribute(b)},dom.remove=function(n){var b,A;return(b=(null!=n?n.DOM:void 0)||n)?(null!=(A=b.parentNode)&&A.removeChild(b),b):null},dom.empty=function(n){var b;if(!n)return null;for(n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(L.util.isElement(n),"CUI.dom.empty","top needs to be Element",{node:n});b=n.lastChild;)n.removeChild(b);return n},dom.hasClass=function(n,b){var A,L,R,D;if(!n||!b)return null;for(n.DOM&&(n=n.DOM),L=0,R=(D=b.trim().split(/\s+/)).length;L= 0",{element:n,offset:b}),(B=n.offsetParent)===document.documentElement?(D={top:0,left:0},A={top:document.body.scrollTop,left:document.body.scrollLeft}):((D={top:(R=L.dom.getDimensions(B)).top,left:R.left}).top+=R.borderTopWidth,D.left+=R.borderLeftWidth,A={top:R.scrollTop,left:R.scrollLeft}),L.dom.setStyle(n,{top:b.top-D.top+A.top,left:b.left-D.left+A.left})},dom.__failedDOMInserts=0,dom.waitForDOMRemove=function(n){var b,A,R,D;return D=L.Element.readOpts(n,"CUI.dom.waitForDOMRemove",{node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}},ms:{default:200,check:function(n){return n>0}}}),R=L.dom.getNode(D.node),A=new L.Deferred,(b=function(){if(L.dom.isInDOM(R))return L.setTimeout({call:b,ms:D.ms,track:!1});A.resolve()})(),A.promise()},dom.waitForDOMInsert=function(n){var b,A,R,D,B,E,X,$;if(B=L.Element.readOpts(n,"CUI.dom.waitForDOMInsert",{node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}}}),D=L.dom.getNode(B.node),L.dom.isInDOM(D))return L.resolvedPromise(!0);for(b=new L.Deferred,A=0,R=(X=["-webkit-","-moz-","-ms-","-o-",""]).length;A=0&&A<=n.children.length,"CUI.dom.insertAtPosition","Unable to insert node at position #"+A+".",{node:n,node_insert:b,pos:A}),A===n.children.length?n.appendChild(b):n.children[A]!==b?this.insertBefore(n.children[A],b):void 0},dom.insertBefore=function(n,b){var A;return(A=(null!=n?n.DOM:void 0)||n)?(b&&A.parentNode.insertBefore(b,A),A):null},dom.insertAfter=function(n,b){var A;return(A=(null!=n?n.DOM:void 0)||n)?(b&&A.parentNode.insertBefore(b,A.nextSibling),A):null},dom.is=function(n,b){return n?b instanceof HTMLElement?n===b:L.util.isFunction(b)?!!b(n):n instanceof HTMLElement?this.matches(n,b):null:null},dom.matches=function(n,b){return n?n[L.dom.matchFunc](b):null},dom.matchFunc=function(){var n,b,A,R,D;for(n=document.createElement("div"),b=0,R=(D=["matches","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector"]).length;b0;)this.insertAfter(A,b[b.length-1]);return A}return n.parentNode.replaceChild(b,n)},dom.getRect=function(n){return n.hasOwnProperty("DOM")&&(n=n.DOM),n.getBoundingClientRect()},dom.getComputedStyle=function(n){return n.hasOwnProperty("DOM")&&(n=n.DOM),window.getComputedStyle(n)},dom.setStyle=function(n,b,A){var R,D,B;for(R in null==A&&(A="px"),n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"CUI.dom.setStyle","docElem needs to be instanceof HTMLElement.",{docElem:n}),b)if(void 0!==(B=b[R])){switch(B){case"":case null:D="";break;default:D=isNaN(Number(B))?B:0===B||"0"===B?0:B+A}R.startsWith("--")?n.style.setProperty(R,D):n.style[R]=D}return n},dom.getStyle=function(n){var b,A,R,D;for(A in n.hasOwnProperty("DOM")&&(n=n.DOM),D={},b=n.style)R=b[A],L.util.isNull(R)||(D[A]=R);return D},dom.setStyleOne=function(n,b,A){var L;return(L={})[b]=A,this.setStyle(n,L)},dom.setStylePx=function(n,b){return console.error("CUI.dom.setStylePx is deprectaed, use CUI.dom.setStyle."),this.setStyle(n,b)},dom.getRelativePosition=function(n){var b;return L.util.assert(n instanceof HTMLElement,"CUI.dom.getRelativePosition","docElem needs to be instanceof HTMLElement.",{docElem:n}),{top:(b=L.dom.getDimensions(n)).offsetTopScrolled,left:b.offsetLeftScrolled}},dom.getDimensions=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot,ft,mt,_t;if(L.util.isNull(n))return null;if(n===window||n===document)return{width:window.innerWidth,height:window.innerHeight};for(n.hasOwnProperty("DOM")&&(n=n.DOM),A={computedStyle:b=this.getComputedStyle(n),clientBoundingRect:lt=this.getRect(n)},D=0,K=(ut=["margin","padding","border"]).length;D0&&("function"==typeof b&&b(L,V),A.push(V));break;case 1:R.push(L)}this.findTextInNodes(R,b,A)}return A},dom.getCSSFloatValue=function(n){return-1===n.indexOf("px")?0:parseFloat(n.substr(0,n.length-2))},dom.isPositioned=function(n){var b;return L.util.assert(n instanceof HTMLElement,"CUI.dom.isPositioned","docElem needs to be instance of HTMLElement.",{docElem:n}),"relative"===(b=this.getComputedStyle(n).position)||"absolute"===b||"fixed"===b},dom.isVisible=function(n){var b;return!n.hidden&&("hidden"!==(b=this.getComputedStyle(n)).visibility&&"none"!==b.display)},dom.getBoxSizing=function(n){return this.getComputedStyle(n).boxSizing},dom.isBorderBox=function(n){return"border-box"===this.getBoxSizing(n)},dom.isContentBox=function(n){return"content-box"===this.getBoxSizing(n)},dom.hideElement=function(n){if(n)return n.hasOwnProperty("DOM")&&(n=n.DOM),"none"!==n.style.display&&(n.__saved_display=n.style.display),n.hidden=!0,n},dom.focus=function(n){if(n)return n.DOM&&(n=n.DOM),n.focus()},dom.blur=function(n){if(n)return n.DOM&&(n=n.DOM),n.blur()},dom.removeChildren=function(n,b){var A,R,D,B;for(L.util.assert(n instanceof HTMLElement,"CUI.dom.removeChildren","element needs to be instance of HTMLElement",{element:n}),R=0,D=(B=this.children(n,b)).length;R0&&(Q.scrollTop=Q.scrollTop+X,E()),(K=b.viewportTopMargin-A.viewportTopContent)<0&&(Q.scrollTop=Q.scrollTop+K,E())),"visible"!==A.computedStyle.overflowX&&((V=b.viewportRightMargin-A.viewportRightContent)>0&&(Q.scrollLeft=Q.scrollLeft+V,E()),($=b.viewportLeftMargin-A.viewportLeftContent)<0&&(Q.scrollLeft=Q.scrollLeft+$,E()));return n},dom.setClassOnMousemove=function(n){var b,A,R,D;return null==n&&(n={}),A=L.Element.readOpts(n,"CUI.dom.setClassOnMousemove",{delayRemove:{check:Function},class:{mandatory:!0,check:String},ms:{default:3e3,mandatory:!0,check:function(n){return n>0}},element:{mandatory:!0,check:function(n){return n instanceof HTMLElement}},instance:{}}),b=function(){return L.dom.addClass(A.element,A.class),D()},R=function(){if(!("function"==typeof A.delayRemove?A.delayRemove():void 0)&&!L.globalDrag)return L.dom.removeClass(A.element,A.class);D()},D=function(){return L.scheduleCallback({ms:A.ms,call:R})},L.Events.listen({node:A.element,type:["mousemove","wheel"],instance:A.instance,call:function(n){b()}}),L.Events.listen({node:A.element,type:"mouseleave",instance:A.instance,call:function(){return R()}})},dom.requestFullscreen=function(n){var b,A;return n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"startFullscreen","element needs to be instance of HTMLElement",{element:n}),n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen(),b=new L.Deferred,A=L.Events.listen({type:"fullscreenchange",node:window,call:function(n){L.dom.isFullscreen()?b.notify():(L.Events.ignore(A),b.resolve())}}),b.promise()},dom.getLayerSidebarWidth=function(){var n;return(n=L.dom.matchSelector(document.documentElement,".cui-layer-sidebar--active"))[0]?L.dom.getDimensions(n[0]).marginBoxWidth:0},dom.exitFullscreen=function(){var n;return L.dom.isFullscreen()?(n=new L.Deferred,document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),L.Events.listen({type:"fullscreenchange",node:window,only_once:!0,call:function(){n.resolve()}}),n.promise()):L.resolvedPromise()},dom.fullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||void 0},dom.fullscreenEnabled=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||!1},dom.isFullscreen=function(){return document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!!document.msFullscreenElement||!1},dom.$element=function(n,b,A,R){return null==A&&(A={}),null==R&&(R=!1),L.util.isEmpty(b)||(A.class=b),R&&(L.util.isEmpty(b)?A.class="cui-"+n:A.class="cui-"+n+" "+b,n="div"),L.dom.element(n,A)},dom.div=function(n,b){return L.dom.$element("div",n,b)},dom.video=function(n,b){return L.dom.$element("video",n,b)},dom.audio=function(n,b){return L.dom.$element("audio",n,b)},dom.source=function(n,b){return L.dom.$element("source",n,b)},dom.span=function(n,b){return L.dom.$element("span",n,b)},dom.table=function(n,b){return L.dom.$element("table",n,b,!0)},dom.img=function(n,b){return L.dom.$element("img",n,b)},dom.tr=function(n,b){return L.dom.$element("tr",n,b,!0)},dom.th=function(n,b){return L.dom.$element("th",n,b,!0)},dom.td=function(n,b){return L.dom.$element("td",n,b,!0)},dom.i=function(n,b){return L.dom.$element("i",n,b)},dom.p=function(n,b){return L.dom.$element("p",n,b)},dom.pre=function(n,b){return L.dom.$element("pre",n,b)},dom.ul=function(n,b){return L.dom.$element("ul",n,b)},dom.a=function(n,b){return L.dom.$element("a",n,b)},dom.b=function(n,b){return L.dom.$element("b",n,b)},dom.li=function(n,b){return L.dom.$element("li",n,b)},dom.label=function(n,b){return L.dom.$element("label",n,b)},dom.h1=function(n,b){return L.dom.$element("h1",n,b)},dom.h2=function(n,b){return L.dom.$element("h2",n,b)},dom.h3=function(n,b){return L.dom.$element("h3",n,b)},dom.h4=function(n,b){return L.dom.$element("h4",n,b)},dom.h5=function(n,b){return L.dom.$element("h5",n,b)},dom.h6=function(n,b){return L.dom.$element("h6",n,b)},dom.text=function(n,b,A){var R;return(R=L.dom.span(b,A)).textContent=n,R},dom.textEmpty=function(n){var b;return(b=L.dom.span("italic")).textContent=n,b},dom.table_one_row=function(){return L.dom.append(L.dom.table(),L.dom.tr_one_row.apply(this,arguments))},dom.tr_one_row=function(){var n,b,A,R,D,B,E;for(E=L.dom.tr(),b=function(n){var b,A;A=L.dom.td(),L.dom.append(E,A),b=function(n){var R,D,B;if(L.util.isArray(n))for(D=0,B=n.length;D{var L,R,D,B,E=A(7288);R=A(8214),L=A(2400),D=A(3185),B=A(2689),E.util=function(){function util(){}return util.assert=function(n,b,A,L){var R,D,B,X,$;if(E.defaults.asserts&&!n){try{new Error("dummy").stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@").replace().split("\n")}catch(n){"Can't get callstack in this browser. Try using Stacktrace.js"}if(X=[],L){for(D in R=[b+":"],L)$=L[D],R.push(D+":"),X.push(D),R.push($);console.debug.apply(console,R)}switch(B=X.length?b+"("+X.join(",")+")":b,A&&(B+=": "+A),E.defaults.asserts_alert){case"debugger":break;case"js":alert(B);break;case"cui":E.problem({text:B})}if(!E.__in_error)throw E.__in_error=!0,E.setTimeout((function(){return E.__in_error=!1})),new Error(B);console.error("Another assert occurred, cannot throw Error to avoid loop: ",B)}},util.assertImplements=function(n,b){var A,L,R,D;if(E.defaults.asserts){for(D=[],A=0,L=b.length;A=0},util.isContent=function(n){return E.util.isElement(n)||n instanceof HTMLCollection||n instanceof NodeList||E.util.isArray(n)||E.util.isFunction(n)||E.util.isElement(null!=n?n.DOM:void 0)},util.isNumber=function(n){return E.util.isInteger(n)||E.util.isFloat(n)},util.isFloat=function(n){return n===+n&&n!==(0|n)},util.isInteger=function(n){return Number.isInteger(n)},util.isPromise=function(n){return n instanceof E.Promise||n instanceof E.Deferred},util.isDeferred=function(n){return n instanceof E.Deferred},util.escapeRegExp=function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},util.getIntOrString=function(n){return E.util.getInt(n,!0)},util.getInt=function(n,b){var A;return null==b&&(b=!1),E.util.isNull(n)?null:(A=parseInt(n),isNaN(A)||(A+"").length!==(n+"").trim().length?b?n:null:A)},util.getFloat=function(n){var b;return E.util.isNull(n)?null:(b=parseFloat(n),isNaN(b)?null:b)},util.xor=function(n,b){return!!(n&&!b||!n&&b)},util.toHtml=function(n,b){return E.util.isNull(n)||!E.util.isString(n)?"":(n=n.replace(/&/g,"&").replace(/\'/g,"'").replace(//g,">").replace(/\"/g,"""),b?n.replace(/\s/g," "):n)},util.copyObject=function(n,b,A){var L,R,D,B,X,$,V,K,Q;if(null==b&&(b=!1),null==A&&(A=0),!(A>100)){if("string"==(K=typeof n)||"number"===K||"boolean"===K||"function"===K)return n;if(E.util.isNull(n))return n;if(n instanceof E.Element)return 0===A||b?n.copy():n;if(n instanceof HTMLElement)return n.cloneNode?n.cloneNode(!0):n;if(n instanceof E.Dummy)return n;if(E.util.isPlainObject(n)){for(D in $={},n)if(Q=n[D],b)try{$[D]=E.util.copyObject(Q,!0,A+1)}catch(b){throw L=b,console.error("Error during Object copy:",L.toString(),"Key:",D,"Object:",n),L}else $[D]=Q;return $}if(E.util.isArray(n)){if(!b)return n.slice(0);for(X=[],R=0,B=n.length;R":E.util.isNull(n)?"":E.util.getObjectClass(n)};try{return JSON.stringify(A(n),null,b)}catch(n){return L=n,console.error(L),"Unable to dump object"}},util.alert_dump=function(n){return alert(E.util.dump(n," "))},util.toDash=function(n){var b;return(b=(b=(b=(n+="U").substring(0,1)+n.substring(1).replace(/([A-Z](?![A-Z0-9]))/g,(function(n){return"-"+n.toLowerCase()}))).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()).substring(0,b.length-2)).replace(/\./g,"-")},util.toClass=function(n){return E.util.toDash(n).replace(/_/g,"-").replace(/\s+/g,"-")},util.toDot=function(n){return E.util.toDash(n).replace(/-/g,".")},util.toCamel=function(n,b){return null==b&&(b=!1),b?n.replace(/((\-|^)[a-z])/g,(function(n){return n.toUpperCase().replace("-","")})):n.replace(/(\-[a-z])/g,(function(n){return n.toUpperCase().replace("-","")}))},util.removeFromArray=function(n,b,A){var L,R;for(E.util.assert(E.util.isArray(b),"removeFromArray","Second parameter needs to be an Array",{value:n,array:b,compFunc:A}),R=0;(L=E.util.idxInArray(n,b,A))>-1;)b.splice(L,1),R++;return R},util.moveInArray=function(n,b,A,L){var R;return null==L&&(L=!1),n===b||(n>b?L&&b++:L||b--,R=A.splice(n,1)[0],A.splice(b,0,R)),b},util.compareIndex=function(n,b){return nb?1:0},util.pushOntoArray=function(n,b,A){var L;return-1===(L=E.util.idxInArray(n,b,A))?(b.push(n),b.length-1):L},util.idxInArray=function(n,b,A){var L,R,D,B,X;if(!A)return b.indexOf(n);for(D=-1,R=B=0,X=b.length;B0?n.replace(new RegExp(L.join("|"),"g"),(function(n){return b[n]})):n},util.mergeMap=function(n,b){var A,L;for(A in b)L=b[A],n.hasOwnProperty(A)?E.util.isPlainObject(n[A])&&E.util.isPlainObject(L)&&E.util.mergeMap(n[A],L):n[A]=L;return n},util.copyToClipboard=function(n){var b;n&&((b=E.dom.element("textarea",{style:{position:"absolute",left:"-9999px"}})).value=n,E.dom.append(document.body,b),b.select(),document.execCommand("copy"),E.dom.remove(b))},util.removePropertyRecursively=function(n,b,A){var L,R,D,B,X,$,V;if(null==A&&(A=new Set),!A.has(n)){if(A.add(n),Array.isArray(n)){for(X=[],R=0,B=n.length;R{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(6680)),L.Block=function(n){function Block(n){var b;Block.__super__.constructor.call(this,n),this.__block=new L.Template({name:this.getTemplateName(),map:{header:!0,content:!0}}),this.registerTemplate(this.__block),this._header?this.setHeader(this._header):(b=[],(this._text||this._icon)&&(this.__label=new L.Label({class:"cui-block-title",text:this._text,icon:this._icon,multiline:!0}),b.push(this.__label)),this._description&&b.push(new L.Label({class:"cui-block-description",text:this._description,markdown:!0,multiline:!0})),b.length>0&&this.setHeader(b)),this._content&&this.setContent(this._content),this.addClass("appearance-"+this._appearance),this.addClass("cui-block-level-"+this._level),this.maximizeAddClasses(),this._padded&&this.addClass("cui-block--padded")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Block,n),Block.prototype.initOpts=function(){return Block.__super__.initOpts.call(this),this.addOpts({text:{check:String},description:{check:String},header:{check:function(n){return!!(L.util.isContent(n)||L.util.isString(n)||(null!=n?n.DOM:void 0))}},icon:{check:L.Icon},content:{check:function(n){return!!(L.util.isContent(n)||L.util.isString(n)||(null!=n?n.DOM:void 0))}},level:{mandatory:!0,default:1,check:[1,2,3]},appearance:{default:"normal",mandatory:!0,check:["normal","wide","muted"]},padded:{check:Boolean,default:!0},maximize:{check:Boolean},maximize_horizontal:{check:Boolean,default:!1},maximize_vertical:{check:Boolean,default:!1}})},Block.prototype.readOpts=function(){return Block.__super__.readOpts.call(this),L.util.assert(!((this._text||this._icon)&&this._header),"new CUI.Block","opts.text and opts.header are mutually exclusive.",{opts:this.opts}),L.Layout.prototype.maximizeReadOpts.call(this),this},Block.prototype.maximizeAddClasses=function(){return L.Layout.prototype.maximizeAddClasses.call(this)},Block.prototype.getTemplateName=function(){return"block"},Block.prototype.setText=function(n){return L.util.assert(this.__label,"Block.setText","Block must not be called with opts.header and with opts.text or opts.icon.",{opts:this.opts}),this.__label.setText(n)},Block.prototype.setIcon=function(n){return L.util.assert(this.__label,"Block.setText","Block must not be called with opts.header and with opts.text or opts.icon.",{opts:this.opts}),this.__label.setIcon(n)},Block.prototype.setHeader=function(n){return this.__block.replace(n,"header")},Block.prototype.setContent=function(n){return this.__block.replace(n,"content")},Block.prototype.getContent=function(){return this.__block.map.content},Block.prototype.getHeader=function(){return this.__block.map.header},Block.prototype.appendContent=function(n){return this.__block.append(n,"content")},Block}(L.DOMElement)},1934:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1138)),L.BorderLayout=function(n){function BorderLayout(){return BorderLayout.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(BorderLayout,n),BorderLayout.prototype.getName=function(){return"border-layout"},BorderLayout.prototype.getPanes=function(){return["north","west","east","south"]},BorderLayout.prototype.getSupportedPanes=function(){return this.getPanes()},BorderLayout.prototype.getTemplateMap=function(){var n;return(n=BorderLayout.__super__.getTemplateMap.call(this)).row=!0,n},BorderLayout.prototype.__init=function(){var n;return BorderLayout.__super__.__init.call(this),this._absolute&&(L.dom.addClass(this.getLayout().map.row,"cui-absolute"),L.Events.listen({type:"viewport-resize",node:this.getLayout().map.row,call:(n=this,function(b){return b.stopPropagation(),L.Layout.setAbsolute(n.getLayout().map.row)})})),this},BorderLayout}(L.Layout)},6286:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5938)),L.Template.loadTemplateText(A(3786)),L.Button=function(n){function Button(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt;if(Button.__super__.constructor.call(this,n),this._tooltip&&(this._tooltip.text||this._tooltip.content)&&(this.__tooltipOpts=this._tooltip),this.__has_left=!0,this.__has_right=!0,this.__has_center=!0,nt=this.getTemplateName(),this.__box=new L.Template({name:nt,map:{left:this.__has_left?".cui-button-left":void 0,center:this.__has_center?".cui-button-center":void 0,visual:L.__ng__?".cui-button-visual":void 0,right:this.__has_right?".cui-button-right":void 0}}),this.registerTemplate(this.__box),this.__active=null,this.__disabled=!1,this.__loading=!1,this.__hidden=!1,this.__txt=null,this.addClass("cui-button-button"),L.util.isString(null!=(E=this.__tooltipOpts)?E.text:void 0)?(this.setAria("label",null!=(X=this.__tooltipOpts)?X.text:void 0),this.__hasAriaLabel=!0):this.__hasAriaLabel=!1,L.dom.setAttribute(this.DOM,"tabindex",this._tabindex),"flat"!==this._appearance||(null!=($=this._attr)?$.title:void 0)||L.dom.setAttribute(this.DOM,"title",this._text),(null!=(V=this._attr)?V.role:void 0)||L.dom.setAttribute(this.DOM,"role",this._role),this._left&&!0!==this._left?this.append(this._left,"left"):(this._icon?(L.util.assert(L.util.isUndef(this._icon_left),"new "+this.__cls,"opts.icon conflicts with opts.icon_left",{opts:this.opts}),b=this._icon):b=this._icon_left,b&&(L.util.assert(!this._icon_active&&!this._icon_inactive,"new CUI.Button","opts.icon_active or opts.icon_inactive cannot be set together with opts.icon or opts.icon_left",{opts:this.opts}),this.setIcon(b))),this._right?!0!==this._right&&this.append(this._right,"right"):this._icon_right?this.setIconRight(this._icon_right):this._menu&&!1!==this._icon_right&&(this.addClass("cui-button--has-caret"),this._menu_parent?this.setIconRight(L.defaults.class.Button.defaults.arrow_right):this.setIconRight(L.defaults.class.Button.defaults.arrow_down)),this.setSize(this._size),this._appearance&&this.addClass("cui-button-appearance-"+this._appearance),this._primary&&this.addClass("cui-button--primary"),this._secondary&&!this._primary&&this.addClass("cui-button--secondary"),this._danger&&this.addClass("cui-button--danger"),this._class&&this.addClass(this._class),this._center?this.append(this._center,"center"):this._text&&this.setText(this._text),this._disabled&&(!0===this._disabled||this._disabled.call(this,this))&&this.disable(),this._loading&&(!0===this._loading||this._loading.call(this,this))&&this.setLoading(!0),this._hidden&&(!0===this._hidden||this._hidden.call(this,this))&&this.hide(),!0===this._active?this.activate({initial_activate:!0}):!1===this._active||this._switch?this.deactivate({initial_activate:!0}):this.__setState(),this.__radio_allow_null=this._radio_allow_null,this._radio?(L.util.assert(L.util.isUndef(this._switch),"new CUI.Button","opts.switch conflicts with opts.radio.",{opts:this.opts}),!0===this._radio?this.__radio="radio--"+this.getUniqueId():this.__radio=this._radio):L.util.isNull(this._switch)||(this.__radio="switch--"+this.getUniqueId(),this.__radio_allow_null=!0),this.__radio&&(L.util.assert(!(null!=(K=this._attr)?K.radio:void 0),"new CUI.Button","opts.radio conflicts with opts.attr.radio",{opts:this.opts}),L.dom.setAttribute(this.DOM,"radio",this.__radio)),this.setGroup(this._group),this._menu){for(R in this.__menu_opts={},A={},Q=this._menu)switch(it=Q[R],R){case"onShow":case"onHide":continue;case"class":case"backdrop":case"onPosition":case"placement":case"placements":case"pointer":this.__menu_opts[R]=it;break;default:A[R]=it}L.util.isEmpty(this._class)||(this.__menu_opts.class?this.__menu_opts.class+=" "+this._class:this.__menu_opts.class=this._class),this._menu.itemList?this.__menu_opts.itemList=this._menu.itemList:this.__menu_opts.itemList=A,this.__menu_opts.element=this,this.__menu_opts.hasOwnProperty("use_element_width_as_min_width")||this._menu_parent||(this.__menu_opts.use_element_width_as_min_width=!0),this.__menu_opts.onHide=(rt=this,function(){var n;return"function"==typeof(n=rt._menu).onHide?n.onHide():void 0}),this.__menu_opts.onShow=function(n){return function(){var b;return"function"==typeof(b=n._menu).onShow?b.onShow():void 0}}(this),this.__menu_opts.hasOwnProperty("backdrop")||(this.__menu_opts.backdrop={policy:"click-thru"}),!this.__menu_opts.backdrop.hasOwnProperty("blur")&&(null!=(tt=this._menu_parent)&&null!=(ot=tt.getOpt("backdrop"))?ot.blur:void 0)&&(this._menu_on_hover?this.__menu_opts.backdrop={policy:"click-thru",blur:!0}:this.__menu_opts.backdrop.blur=!0),this._menu_parent&&(this.__menu_opts.parent_menu=this._menu_parent)}L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(n){return function(b){var A,R,D,B;if(!b.hasModifierKey()){if(13===(D=b.keyCode())||32===D)return n.onClickAction(b),void b.stop();if(27===b.keyCode())return n.DOM.blur(),void b.stop();switch(A=null,B=function(){return A=L.dom.findNextVisibleElement(n.DOM,"[tabindex]")},R=function(){return A=L.dom.findPreviousVisibleElement(n.DOM,"[tabindex]")},b.keyCode()){case 39:case 40:B();break;case 37:case 38:R()}A&&(A.focus(),b.stop())}}}(this)}),L.Events.listen({type:L.Button.clickTypesPrevent[this._click_type],node:this.DOM,call:function(n){n.preventDefault()}}),L.Events.listen({type:L.Button.clickTypes[this._click_type],node:this.DOM,call:function(n){return function(b){L.globalDrag||(0===b.getButton()||b.getType().startsWith("touch"))&&(b.stopPropagation(),n.onClickAction(b))}}(this)}),this._menu_on_hover&&(L.Button.menu_timeout=null,B=function(){if(L.Button.menu_timeout)return L.clearTimeout(L.Button.menu_timeout),L.Button.menu_timeout=null},D=function(n){return function(b,A){return null==A&&(A=700),B(),L.Button.menu_timeout=L.setTimeout({ms:A,call:function(){return n.getMenu().hide(b)}})}}(this)),(this._menu_on_hover||this.__tooltipOpts||this._onMouseenter)&&L.Events.listen({type:"mouseenter",node:this.DOM,call:function(n){return function(b){var A,R;L.globalDrag||("function"==typeof n._onMouseenter&&n._onMouseenter(b),b.isImmediatePropagationStopped()||(n.__tooltipOpts&&(n.__initTooltip(),n.getTooltip().showTimeout().start()),n._menu_on_hover&&(A=n.getMenu(),B(),!n.__disabled&&A.hasItems(b)&&((R=L.dom.data(L.dom.find(".cui-button--hover-menu")[0],"element"))&&R!==A&&R.hide(b),L.dom.addClass(A.DOM,"cui-button--hover-menu"),L.Events.ignore({instance:n,node:A}),L.Events.listen({type:"mouseenter",node:A,instance:n,only_once:!0,call:function(){return B()}}),L.Events.listen({type:"mouseleave",node:A,instance:n,only_once:!0,call:function(){return D(b)}}),A.show(b)))))}}(this)}),L.Events.listen({type:"mouseleave",node:this.DOM,call:function(n){return function(b){L.globalDrag||("function"==typeof n._onMouseleave&&n._onMouseleave(b),n._menu_on_hover&&D(b,100))}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Button,n),Button.defaults={confirm_ok:"Ok",confirm_icon:"question",confirm_cancel:"Cancel",confirm_title:"Confirmation",disabled_css_class:"cui-disabled",loading_css_class:"cui-loading",active_css_class:"cui-active",arrow_down:"fa-angle-down",arrow_right:"fa-angle-right"},Button.prototype.setSize=function(n){var b,A,L,R,D,B,E;for(E=[],A=0,R=(B=this.DOM.classList).length;A0))return[];for(R=E[E.length-1],$=[],D=0,B=(X=L.dom.matchSelector(R,".cui-button["+n+'="'+b+'"]')).length;D{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(7467)),L.Template.loadTemplateText(A(7761)),L.ButtonHref=function(n){function ButtonHref(n){var b;ButtonHref.__super__.constructor.call(this,n),b={href:this._href,tabindex:"0",target:this._target},this._download&&(b.download="download"),L.dom.setAttributeMap(this.DOM,b)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ButtonHref,n),ButtonHref.prototype.initOpts=function(){return ButtonHref.__super__.initOpts.call(this),this.addOpts({href:{check:String},download:{check:Boolean},target:{check:String}})},ButtonHref.prototype.readOpts=function(){return ButtonHref.__super__.readOpts.call(this),void 0===this._icon_right&&"link"===this._appearance&&(this._icon_right="external_link"),this},ButtonHref.prototype.setHref=function(n){return L.dom.setAttribute(this.DOM,"href",n)},ButtonHref.prototype.getTemplateName=function(){return ButtonHref.__super__.getTemplateName.call(this),L.__ng__?"buttonHref-ng":"buttonHref"},ButtonHref}(L.Button)},6499:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.Template.loadTemplateText(A(7005)),L.Buttonbar=function(n){function Buttonbar(n){var b,A,R,D,B,E,X,$;for(this.__setVisibilityClasses=(b=this.__setVisibilityClasses,A=this,function(){return b.apply(A,arguments)}),Buttonbar.__super__.constructor.call(this,n),this.__box=new L.Template({name:"buttonbar"}),this.registerTemplate(this.__box),this.__buttons=this.__box.DOM,this.__groupDivs={},this._tooltip&&(($=L.util.copyObject(this._tooltip)).element=this.__buttons,this.__tooltip=new L.Tooltip($)),B=D=0,E=(X=this._buttons).length;D0?(n=!0,L.dom.showElement(b)):L.dom.hideElement(b);return this.__setVisibilityClasses(this.__buttons)>0?(n=!0,(null!=(R=this.__tooltip)?R.isShown():void 0)&&this.__tooltip.position()):L.dom.showElement(this.__buttons),n?L.dom.showElement(this):L.dom.hideElement(this),this},Buttonbar.prototype.removeButtons=function(){return L.dom.empty(this.__buttons)},Buttonbar.prototype.prependButton=function(n,b){return null==b&&(b=!0),this.addButton(n,b,!0)},Buttonbar.prototype.addButton=function(n,b,A){var R,D,B,E,X,$;if(null==b&&(b=!0),null==A&&(A=!1),!L.util.isNull(n))return L.util.isPlainObject(n)&&(n=new L.defaults.class.Button(n)),n instanceof L.Button||n instanceof L.DataFieldInput||n instanceof L.Label?(R=n.DOM,E=n.getGroup()):(null!=n&&null!=(X=n.classList)?X.contains("cui-button"):void 0)?(R=n,E=n.group||null):L.util.assert(!1,"new "+this.__cls,'button must be instance of Button or have class ".cui-button" but is '+L.util.getObjectClass(n)+".",{button:n,opts:this.opts}),L.Events.listen({type:["show","hide"],node:n,call:($=this,function(n){return $.__checkVisibility()})}),B=A?"prepend":"append",E?(this.__groupDivs[E]||(D=L.dom.div("cui-buttonbar-group cui-buttonbar-group-"+E),L.dom.append(this.__buttons,D),this.__groupDivs[E]=D),L.dom[B](this.__groupDivs[E],R)):L.dom[B](this.__buttons,R),b&&this.__checkVisibility(),n},Buttonbar}(L.DOMElement)},4016:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Checkbox=function(n){function Checkbox(n){Checkbox.__super__.constructor.call(this,n),this._multiline&&this.addClass("cui-checkbox--multiline")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Checkbox,n),Checkbox.prototype.initOpts=function(){return Checkbox.__super__.initOpts.call(this),this.addOpts({onClick:{check:Function},value:{default:!0},value_unchecked:{default:!1},text:{check:String},text_active:{check:String},text_inactive:{check:String},multiline:{default:!1,check:Boolean},content:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},active:{default:!1,check:Boolean},indeterminate:{default:!1,check:Boolean},onActivate:{check:Function},onDeactivate:{check:Function},radio:{check:String},group:{check:String},radio_allow_null:{check:Boolean},tooltip:{check:"PlainObject"},icon_active:{default:"check",mandatory:!0,check:function(n){return n instanceof L.Icon||L.util.isString(n)}},icon_inactive:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}}})},Checkbox.prototype.enable=function(){var n;return Checkbox.__super__.enable.call(this),null!=(n=this.__checkbox)?n.enable():void 0},Checkbox.prototype.disable=function(){var n;return Checkbox.__super__.disable.call(this),null!=(n=this.__checkbox)?n.disable():void 0},Checkbox.prototype.setIndeterminate=function(){if(!this._indeterminate)return L.dom.addClass(this.getButton(),"cui-indeterminate"),this.getButton().setIcon(""),this._indeterminate=!0},Checkbox.prototype.removeIndeterminate=function(){if(this._indeterminate)return L.dom.removeClass(this.getButton(),"cui-indeterminate"),this._indeterminate=!1},Checkbox.prototype.isIndeterminate=function(){return this._indeterminate},Checkbox.prototype.registerLabel=function(n){var b;return n.setAttribute("data-label-clickable","1"),L.Events.listen({type:"click",node:n,call:(b=this,function(n){return b.getButton().onClickAction(n)})}),this},Checkbox.prototype.getButton=function(){return this.__checkbox},Checkbox.prototype.getOptValue=function(){return this._value},Checkbox.prototype.getOptValueUnchecked=function(){return this._value_unchecked},Checkbox.prototype.getCheckboxClass=function(){return"cui-button-checkbox"},Checkbox.prototype.destroy=function(){var n;return null!=(n=this.__checkbox)&&n.destroy(),Checkbox.__super__.destroy.call(this)},Checkbox.prototype.render=function(){var n,b,A,R,D,B;for(Checkbox.__super__.render.call(this),(n=this.getButtonOpts()).onActivate=(B=this,function(n,b,A){var R;if(!b.initial_activate)return B.storeValue(B._value,b),R="function"==typeof B._onActivate?B._onActivate(B,b,A):void 0,L.util.isPromise(R)&&R.fail((function(){return B.storeValue(B._value_unchecked,b)})),B.removeIndeterminate(),R}),n.onDeactivate=function(n){return function(b,A,R){var D;if(!A.initial_activate)return n.storeValue(n._value_unchecked,A),D="function"==typeof n._onDeactivate?n._onDeactivate(n,A,R):void 0,L.util.isPromise(D)&&D.fail((function(){return n.storeValue(n._value,A)})),n.removeIndeterminate(),D}}(this),this._onClick&&(n.onClick=function(n){return function(b){n._onClick(b,n)}}(this)),b=0,R=(D=["text","text_active","text_inactive","radio_allow_null","active"]).length;b{var L=A(7288),extend=function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}return ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype,n},R={}.hasOwnProperty;L.Alert=function(n){function Alert(){return Alert.__super__.constructor.apply(this,arguments)}return extend(Alert,n),Alert.prototype.initOpts=function(){return Alert.__super__.initOpts.call(this),this.mergeOpt("choices",{mandatory:!1,default:void 0}),this.addOpts({button_text_ok:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.ok,check:String}})},Alert.prototype.isKeyboardCancellable=function(n){return this._allow_cancel},Alert.prototype.readOpts=function(){if(Alert.__super__.readOpts.call(this),!this._choices)return this._choices=[{text:this._button_text_ok,primary:!0}]},Alert}(L.ConfirmationChoice),L.alert=function(n){return null==n&&(n={text:"CUI.alert"}),new L.Alert(n).open()},L.AlertProblem=function(n){function AlertProblem(){return AlertProblem.__super__.constructor.apply(this,arguments)}return extend(AlertProblem,n),AlertProblem}(L.Alert),L.problem=function(n){return null==n&&(n={text:"CUI.problem"}),new L.AlertProblem(n).open()}},8528:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Confirm=function(n){function Confirm(){return Confirm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Confirm,n),Confirm.prototype.initOpts=function(){return Confirm.__super__.initOpts.call(this),this.removeOpt("choices"),this.mergeOpt("text",{mandatory:!0}),this.addOpts({button_text_ok:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.ok,check:String},button_text_cancel:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.cancel,check:String},button_primary:{mandatory:!0,default:"ok",check:["ok","cancel"]},button_danger:{check:["ok","cancel"]},button_icon_ok:{check:L.Icon},button_icon_cancel:{check:L.Icon}})},Confirm.prototype.readOpts=function(){return Confirm.__super__.readOpts.call(this),this._choices=[{text:this._button_text_cancel,icon:this._button_icon_cancel,cancel:!0,choice:"cancel",primary:"cancel"===this._button_primary,danger:"cancel"===this._button_danger},{text:this._button_text_ok,icon:this._button_icon_ok,choice:"ok",primary:"ok"===this._button_primary,danger:"ok"===this._button_danger}]},Confirm}(L.ConfirmationChoice),L.confirm=function(n){return new L.Confirm(n).open()}},1946:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ConfirmationChoice=function(n){function ConfirmationChoice(n){var b,A;this.__getResolveValue=(b=this.__getResolveValue,A=this,function(){return b.apply(A,arguments)}),ConfirmationChoice.__super__.constructor.call(this,n),this.__layer_root.addClass("cui-confirmation-choice")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ConfirmationChoice,n),ConfirmationChoice.defaults={ok:"Ok",cancel:"Cancel"},ConfirmationChoice.prototype.initOpts=function(){return ConfirmationChoice.__super__.initOpts.call(this),this.removeOpt("buttons"),this.removeOpt("header_right"),this.removeOpt("cancel_action"),this.addOpts({onChoice:{check:Function},choices:{mandatory:!0,default:[],check:function(n){var b,A,R,D;if(!L.util.isArray(n))return!1;for(R=A=0,D=n.length;A{var L=A(7288),R={}.hasOwnProperty;L.Prompt=function(n){function Prompt(){var n,b;return this.__checkOkBtn=(n=this.__checkOkBtn,b=this,function(){return n.apply(b,arguments)}),Prompt.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Prompt,n),Prompt.prototype.initOpts=function(){return Prompt.__super__.initOpts.call(this),this.removeOpt("choices"),this.addOpts({default:{default:"",check:String},placeholder:{check:String},min_length:{mandatory:!0,default:1,check:function(n){return n>=0}}})},Prompt.prototype.readOpts=function(){var n,b,A;return Prompt.__super__.readOpts.call(this),n=this._text,delete this._text,(b=this._ui)&&(b+=":input"),this.__input=null,this.__data={input:this._default+""},this._content=new L.Form({fields:[{type:L.Output,multiline:!0,markdown:this._markdown,text:n},{type:L.Input,name:"input",placeholder:this._placeholder,data:this.__data,ui:b,onConstruct:(A=this,function(n){A.__input=n}),onKeyup:function(n){return function(b,A){if(13===A.keyCode())return n.getButtons()[1].onClickAction(A)}}(this),onDataChanged:function(n){return function(){return n.__checkOkBtn()}}(this)}]}).start()},Prompt.prototype.getValue=function(){return this.__input.getValue()},Prompt.prototype.open=function(){var n,b;return this.__checkOkBtn(),n=new L.Deferred,Prompt.__super__.open.call(this).done((b=this,function(A){return n.resolve(b.__data.input)})).fail(n.reject),L.setTimeout({call:function(n){return function(){return n.__input.focus().selectAll()}}(this)}),n.promise()},Prompt.prototype.__checkOkBtn=function(){var n;return n=this.getButtons(),this.__data.input.trim().length>=this._min_length?n[1].enable():n[1].disable()},Prompt}(L.Confirm),L.prompt=function(n){return new L.Prompt(n).open()}},4553:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Spinner=function(n){function Spinner(){return Spinner.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Spinner,n),Spinner.prototype.initOpts=function(){return Spinner.__super__.initOpts.call(this),this.mergeOpt("text_icon",{default:"spinner"}),this.mergeOpt("show_ms",{default:0}),this.mergeOpt("backdrop",{default:{policy:"modal"}})},Spinner.prototype.open=function(){var n;return Spinner.__super__.open.call(this),this._show_ms>0&&L.setTimeout({ms:this._show_ms,call:(n=this,function(){return n.hide(),n.__deferred.resolve()})}),this.__deferred.promise()},Spinner}(L.Toaster),L.spinner=function(n){var b;return null==n&&(n={text:"CUI.spinner"}),(b=new L.Spinner(n)).open(),b}},5148:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Toaster=function(n){function Toaster(){return Toaster.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Toaster,n),Toaster.prototype.initOpts=function(){return Toaster.__super__.initOpts.call(this),this.removeOpt("choices"),this.mergeOpt("backdrop",{default:!1}),this.mergeOpt("show_ms",{check:function(n){return n>=0}})},Toaster.prototype.readOpts=function(){return 0===this.opts.show_ms&&void 0===this.opts.backdrop&&(this.opts.backdrop={policy:"modal"}),Toaster.__super__.readOpts.call(this),this._choices=[]},Toaster.prototype.open=function(){return this.__deferred||(Toaster.__super__.open.call(this),this._show_ms>0&&L.setTimeout({ms:this._show_ms,call:(n=this,function(){return n.hide(),n.__deferred.resolve()})})),this.__deferred.promise();var n},Toaster}(L.ConfirmationChoice),L.toaster=function(n){var b;return null==n&&(n={text:"CUI.toaster"}),(b=new L.Toaster(n)).open(),b}},2136:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ConfirmationDialog=function(n){function ConfirmationDialog(n){ConfirmationDialog.__super__.constructor.call(this,n),this.__layer_root.addClass("cui-confirmation-dialog"),this.init()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ConfirmationDialog,n),ConfirmationDialog.prototype.initOpts=function(){return ConfirmationDialog.__super__.initOpts.call(this),this.addOpts({title:{check:String},text:{check:String},text_icon:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}},markdown:{mandatory:!0,default:!1,check:Boolean},padded:{check:Boolean,default:!0},markdown_opts:{check:"PlainObject"},html:{check:String},content:{check:function(n){return L.util.isContent(n)||(null!=n?n.DOM:void 0)}},icon:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}},buttons:{check:function(n){return L.util.isArray(n)&&n.length>0||L.util.isFunction(n)}},footer_left:{},header_right:{},show_inline:{check:function(n){return L.dom.isNode(n)}}}),this.removeOpt("pane")},ConfirmationDialog.prototype.setPane=function(){return ConfirmationDialog.__super__.setPane.call(this,{padded:this._padded,force_header:!0,force_footer:!0})},ConfirmationDialog.prototype.readOpts=function(){return ConfirmationDialog.__super__.readOpts.call(this),this._pane={}},ConfirmationDialog.prototype.show=function(n){return this._show_inline?(L.dom.addClass(this.__layer,"cui-confirmation-dialog--show-inline"),L.dom.addClass(this.__show_inline,"cui-confirmation-dialog--has-show-inline"),L.dom.prepend(this._show_inline,this.__layer),L.Events.trigger({type:"viewport-resize"})):ConfirmationDialog.__super__.show.call(this,n)},ConfirmationDialog.prototype.hide=function(n){return this._show_inline?(L.dom.removeClass(this.__layer,"cui-confirmation-dialog--show-inline"),L.dom.removeClass(this.__show_inline,"cui-confirmation-dialog--has-show-inline"),L.dom.remove(this.__layer),L.Events.trigger({type:"viewport-resize"})):ConfirmationDialog.__super__.hide.call(this,n)},ConfirmationDialog.prototype.init=function(){var n,b,A,R,D,B;for(A in L.util.xor(this._html,L.util.xor(this._content,this._text))||(console.warn(this.__cls+".readOpts","Exactly on opts.content, opts.text, or opts.html needs to be set",{opts:this.opts}),this._text=""),this._title||this.addClass("cui-confirmation-dialog--no-title"),L.util.isEmpty(this._text)?L.util.isEmpty(this._html)?n=this._content:this.__label=n=new L.MultilineLabel({content:this._html}):this.__label=n=new L.MultilineLabel({markdown:this._markdown,markdown_opts:this._markdown_opts,text:this._text,icon:this._text_icon}),L.util.isEmpty(this._title)&&L.util.isNull(this._icon)||(R=new L.Label({text:this._title,icon:this._icon})),D=this.getPane(),B={header_left:R,header_right:this._header_right,content:n,footer_right:this._buttons,footer_left:this._footer_left})(b=B[A])&&D.append(b,A)},ConfirmationDialog.prototype.updateText=function(n){var b;return null!=(b=this.__label)&&b.setText(n),this},ConfirmationDialog.prototype.setText=function(n,b,A){return null==b&&(b=this._markdown),null==A&&(A=this._markdown_opts),this.__label=new L.MultilineLabel({markdown:b,markdown_opts:A,text:n,icon:this._text_icon}),this.setContent(this.__label)},ConfirmationDialog.prototype.getButtons=function(){var n,b,A,R,D,B,E,X;for(E=(X=this.getPane().getPaneAndKey("footer_right"))[0],D=X[1],n=[],R=0,B=(A=L.dom.findElements(E[D](),".cui-button")).length;R{var L=A(7288),R={}.hasOwnProperty;L.Console=function(n){function Console(n){Console.__super__.constructor.call(this,n),this.__console=L.dom.element("DIV",{class:"cui-console"}),this.registerDOMElement(this.__console)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Console,n),Console.prototype.initOpts=function(){return Console.__super__.initOpts.call(this),this.addOpts({markdown:{mandatory:!0,default:!0,check:Boolean}})},Console.prototype.clear=function(){return this.__console.innerHTML=""},Console.prototype.log=function(n,b){var A;return null==b&&(b=this._markdown),A=new L.defaults.class.Label({text:n,multiline:!0,markdown:b}),this.__console.appendChild(A.DOM),this.__console.scrollTop=this.__console.scrollHeight},Console}(L.DOMElement)},4682:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataForm=function(n){function DataForm(){return DataForm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataForm,n),DataForm.prototype.render=function(){var n;return L.DataFieldInput.prototype.render.call(this),this._has_add_button&&(this.__addButton=new L.Button({icon:"plus",text:$$("dataform.add_button.label"),disabled:!0,onClick:(n=this,function(){n.__appendRow({_new:!0}),n.__updateView(),n.__storeValue(),n.__addButton.disable()})})),this.__verticalLayout=new L.VerticalLayout({maximize_horizontal:this.__maximize_horizontal,center:{content:void 0},bottom:{content:this.__addButton}}),this.append(this.__verticalLayout),L.Events.listen({type:"data-changed",node:this.DOM,call:function(n){return function(){return n.__updateView()}}(this)}),this._rowMove&&new L.Sortable({element:this.__verticalLayout.center(),selector:".cui-drag-handle-row",create:function(n,b){var A;return!!(A=L.dom.data(b,"data"))&&(!A._new||(n.stopPropagation(),!1))},allowSort:function(n){return function(b,A,L){return!!n.rows[L]}}(this),sorted:function(n){return function(b,A,R){return L.util.moveInArray(A,R,n.rows,A1?this.addClass("cui-data-form--multiple-fields"):this.removeClass("cui-data-form--multiple-fields"),this._rowMove&&this.addClass("cui-data-form--movable-rows"),this._has_add_button)return this.addClass("cui-data-form--add-button")},DataForm.prototype.readOpts=function(){return DataForm.__super__.readOpts.call(this),this.__rowRegistry=[],this},DataForm.prototype.getFieldOpts=function(){var n,b,A,R;for(A=0,R=(n=DataForm.__super__.getFieldOpts.call(this)).length;A1&&(n=this.rows[this.rows.length-1])._empty;)this.__removeRow(n);return this},DataForm.prototype.__storeValue=function(){return this.storeValue(L.util.copyObject(this.rows,!0))},DataForm.prototype.__updateEmptyInRows=function(){var n,b,A,L;for(n=0,b=(A=this.rows).length;n1},DataForm.prototype.displayValue=function(){var n,b,A,L;for(this.rows=this.getValue(),this.__verticalLayout.empty("center"),n=0,b=(A=this.rows).length;n0||this._no_default_empty_row)&&this.__updateAddButton(),this._no_default_empty_row||this.__appendNewRow(),this.__updateButtons()},DataForm.prototype.__appendNewRow=function(){var n;if(!("edit"!==(n=this._new_rows)&&"append"!==n||this._has_add_button&&this.rows.length>0))return this.__appendRow({_new:!0})},DataForm.prototype.__updateButtons=function(){var n,b,A,R,D,B;for(n=0,A=(R=this.rows).length;n=2?L.dom.removeClass(b.move,"is-hidden"):L.dom.addClass(b.move,"is-hidden")},DataForm.prototype.__findRowInfo=function(n){var b,A;return b=L.util.idxInArray(null,this.__rowRegistry,(function(b){return b.data===n})),L.util.assert(b>-1,"DataForm.__removeRow","row not found",{row:n,registry:this.__rowRegistry}),(A=this.__rowRegistry[b]).idx=b,A},DataForm.prototype.__removeRow=function(n){var b;return b=this.__findRowInfo(n),L.dom.remove(b.dom),this.__rowRegistry.splice(b.idx,1),L.util.removeFromArray(n,this.rows),this.__storeValue(),this},DataForm.prototype.__appendRow=function(n){var b,A,R,D;this._rowMove&&(A=L.dom.element("DIV",{class:"cui-drag-handle-row"})),"none"!==this._new_rows&&(R=new L.defaults.class.Button({icon:"fa-trash-o",appearance:"flat",onMouseenter:function(){return L.dom.addClass(b,"cui-data-form-row--trash")},onMouseleave:function(){return L.dom.removeClass(b,"cui-data-form-row--trash")},onClick:(D=this,function(){var b;L.decide(null!=(b=D._onBeforeRowRemove)?b.call(D,n):void 0).done((function(){var b;return D.__removeRow(n),null!=(b=D._onRowRemove)&&b.call(D,n),D.__updateView()}))})})),b=new L.HorizontalLayout({maximize_vertical:!1,class:"cui-data-form-row",maximize_horizontal:this.__maximize_horizontal,left:{content:A},right:{content:R},center:{content:this.getForm(n).start()}}),L.dom.data(b.DOM,"data",n),n._new&&!this._has_add_button&&(L.dom.addClass(A,"is-hidden"),R.hide()),this.__rowRegistry.push({data:n,dom:b.DOM,trash:R,move:A}),this.__verticalLayout.append(b,"center")},DataForm}(L.DataTable)},5860:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataTable=function(n){function DataTable(){return DataTable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataTable,n),DataTable.defaults={plus_button_tooltip:null,minus_button_tooltip:null},DataTable.prototype.initOpts=function(){return DataTable.__super__.initOpts.call(this),this.addOpts({fields:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},new_rows:{default:"edit",check:["edit","append","remove_only","none"]},no_header:{check:Boolean},rowMove:{default:!1,check:Boolean},onBeforeRowRemove:{check:Function},onRowRemove:{check:Function},onRowSelect:{check:Function},onRowDeselect:{check:Function},onNodeAdd:{check:Function},onNewNodeAdd:{check:Function},footer_right:{check:function(n){return L.util.isContent(n)}},buttons:{mandatory:!0,default:[],check:function(n){return L.util.isArray(n)}},append_buttons:{check:Boolean,default:!1},chunk_size:{default:0,mandatory:!0,check:function(n){return n>=0}},padded:{check:Boolean,default:!1},onLoadPage:{check:Function}})},DataTable.prototype.readOpts=function(){return DataTable.__super__.readOpts.call(this),this.__navi_prev=null,this.__navi_next=null,this.__offset=0,L.util.assert(!(this._chunk_size&&this._rowMove),"new CUI.DataTable","opts.chunk_size and opts.rowMove are mutually exclusive.",{opts:this.opts}),this},DataTable.prototype.getFieldList=function(){return this.__fieldList},DataTable.prototype.getFieldsByName=function(n,b){var A,L,R,D;for(null==b&&(b=[]),L=0,R=(D=this.getFieldList()).length;L0?(this.__offset=Math.floor((this.rows.length-1)/this._chunk_size)*this._chunk_size,this.displayValue()):this.listView.appendRow(A),"function"==typeof this._onNewNodeAdd&&this._onNewNodeAdd(A),A},DataTable.prototype.updateButtons=function(){return 0===this.listView.getSelectedRows().length?this.minusButton.disable():this.minusButton.enable()},DataTable.prototype.getFooter=function(){var n,b,A,R,D,B,E;for(A=0,R=(b=this._buttons.slice(0)).length;A0)return n.displayValue()},B=[],R=0,D=(E=n.listView.getSelectedRows()).length;R0?L.whenAll(B).done((function(){return A()})):A()}}(this)}),n.push(this.minusButton)),this._chunk_size>0&&(n.push({onConstruct:function(n){return function(b){return n.__navi_prev=b}}(this),icon:"left",disabled:!0,group:"navi",ui:this._ui?this._ui+".navigation.left.button":void 0,onClick:function(n){return function(){return n.__offset=n.__offset-n._chunk_size,n.loadPage(n.__offset/n._chunk_size)}}(this)}),B={},D=function(n){return function(){return n.loadPage(B.page-1)}}(this),this.__navi_input=new L.NumberInput({group:"navi",placeholder:"page",data:B,name:"page",ui:this._ui?this._ui+".navigation.input.button":void 0,onBlur:function(n){return n.setValue(null)},onDataChanged:function(){L.scheduleCallback({ms:1e3,call:D})}}).start(),n.push(this.__navi_input),n.push({onConstruct:function(n){return function(b){return n.__navi_next=b}}(this),icon:"right",disabled:!0,group:"navi",ui:this._ui?this._ui+".navigation.right.button":void 0,onClick:function(n){return function(){return n.__offset=n.__offset+n._chunk_size,n.loadPage(n.__offset/n._chunk_size)}}(this)})),b.length&&(n=this._append_buttons?n.concat(b):b.concat(n)),n.length?new L.Buttonbar({buttons:n}):null},DataTable.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt;for(DataTable.__super__.render.call(this,{callOnRender:!1}),A=[],b=[],K=[],this.headerRow=new L.ListViewHeaderRow,B=D=0,$=(tt=this.__fieldList).length;D<$;B=++D)("maximize"===(null!=(ot=(R=tt[B]).getOpt("form"))?ot.column:void 0)||R instanceof L.DataTable)&&K.push(B);for(0===K.length&&K.push(this.__fieldList.length-1),B=E=0,V=(nt=this.__fieldList).length;E-1?A.push("maximize"):(null!=(it=R.getOpt("form"))?it.column:void 0)?A.push(R._form.column):R.isResizable()?A.push("auto"):A.push("fixed"),Q=R.getName(),X=R._form.label,n=[],Q&&n.push("cui-data-table-column-field-name-"+Q),n.push("cui-data-table-column-field-type-"+L.util.toDash(R.getElementClass())),(null!=(rt=R._form)?rt.rotate_90:void 0)&&n.push("cui-lv-td-rotate-90"),b.push(n),this.headerRow.addColumn(new L.ListViewHeaderColumn({rotate_90:null!=(st=R._form)?st.rotate_90:void 0,label:{text:X,multiline:!0}}));return this.listView=new L.ListView({class:"cui-lv--has-datafields",selectableRows:"none"!==this._new_rows,padded:this._padded,ui:this._ui?this._ui+".list.view":void 0,onSelect:(pt=this,function(n,b){return"function"==typeof pt._onRowSelect&&pt._onRowSelect(n,b),pt.updateButtons()}),onDeselect:function(n){return function(){return"function"==typeof n._onRowDeselect&&n._onRowDeselect(),n.updateButtons()}}(this),onRowMove:function(n){return function(b,A,R){var D;return D=n.listView.fixedRowsCount,b=n.__offset+b,A=n.__offset+A,L.util.moveInArray(b-D,A-D,n.rows,R),L.Events.trigger({type:"data-changed",node:n.listView})}}(this),cols:A,fixedRows:this._no_header?0:1,footer_left:this.getFooter(),footer_right:this._footer_right,fixedCols:0,colResize:!this._no_header,colClasses:b,rowMove:this._rowMove,maximize:this._maximize,maximize_horizontal:this._maximize_horizontal,maximize_vertical:this._maximize_vertical}),this.isDisabled()&&this.listView.setInactive(!0,null),this.replace(this.listView.render()),"function"==typeof this._onRender&&this._onRender(this),L.Events.listen({type:"data-changed",node:this.listView,call:function(n){return function(b,A){b.stopPropagation(),n.storeValue(L.util.copyObject(n.rows,!0))}}(this)}),this},DataTable.prototype.loadPage=function(n){var b,A;b=Math.floor((null!=(A=this.rows)?A.length:void 0)/this._chunk_size),(!L.util.isNumber(n)||b<0||n>b)&&(n=0),this.__offset=n*this._chunk_size,this.displayValue(),"function"==typeof this._onLoadPage&&this._onLoadPage(n)},DataTable.prototype.displayValue=function(){var n,b,A,R,D,B,E,X,$,V,K;if(this.listView.removeAllRows(),this._no_header||this.listView.appendRow(this.headerRow),this.rows=L.util.copyObject(this.getValue(),!0),this._chunk_size>0&&(R=this.rows.length,this.__offset>=R&&(this.__offset=Math.max(this.__offset-this._chunk_size)),X=(E=Math.floor(this.__offset/this._chunk_size))+1+" / "+((A=Math.ceil(R/this._chunk_size)-1)+1),this.__navi_input.setMin(1),this.__navi_input.setMax(A+1),this.__navi_input.setValue(null),this.__navi_input.setPlaceholder(X),L.dom.setAttribute(this.__navi_input.getElement(),"data-max-chars",2*(""+(A+1)).length+3),E>0?this.__navi_prev.enable():this.__navi_prev.disable(),E0?this.rows.slice(this.__offset,this.__offset+this._chunk_size):this.rows).length;n{var L=A(7288),R={}.hasOwnProperty;L.DataTableNode=function(n){function DataTableNode(){return DataTableNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataTableNode,n),DataTableNode.prototype.initOpts=function(){return DataTableNode.__super__.initOpts.call(this),this.addOpts({dataTable:{mandatory:!0,check:L.DataTable},data:{mandatory:!0,check:"PlainObject"},check_changed_data:{check:"PlainObject"},rows:{mandatory:!0,check:"Array"},dataRowIdx:{mandatory:!0,check:function(n){return n>=0}}})},DataTableNode.prototype.readOpts=function(){var n,b,A,R,D,B;for(DataTableNode.__super__.readOpts.call(this),this.__dataTable=this._dataTable,this.__data=this._data,this.__check_changed_data=this._check_changed_data,this.__rows=this._rows,L.util.assert(this.__rows.indexOf(this.__data)>-1,"new "+L.util.getObjectClass(this),"opts.data needs to be item in opts.rows Array",{opts:this.opts}),this.__fields=[],R=0,D=(B=this.__dataTable.getFieldList()).length;R{var L,R=A(7288),D={}.hasOwnProperty,B=[].indexOf||function(n){for(var b=0,A=this.length;b=0,"CUI.DateTime.format",'output_format must be on of "'+R.DateTime.formatTypes.join(",")+'".',{parm1:n,output_format:st}),L.isMoment(n))rt=n;else{if(bt=null!=n?n.trim():void 0,R.util.isEmpty(bt))return null;rt=this.parse(bt,this.__input_formats_known)}if(rt.isValid()&&R.util.isNull(A)&&(A=this.getCurrentFormat().type),!rt.isValid()){for($=[],V=0,ot=(pt=this.__input_formats_known).length;V0?"invalid":null,DateTime.__super__.storeValue.call(this,n,b),this},DateTime.prototype.getDigiDisplay=function(n){var b,A,L,D,B,E,X;for(L=[],D=0,E=(X=n.split("")).length;D-1?(b=["hour","hour","minute","second","am_pm","am_pm"][B],"A"===A||"a"===A?(L.push({mask:"[aApP]",attr:{cursor:b,title:b}}),L.push({mask:"[mM]",attr:{cursor:b,title:b}})):L.push({mask:"[0-9]",attr:{cursor:b}})):"*"===A?L.push({mask:"[0-9A-Z+-:. ]"}):L.push({static:":"});return this.__digiDisplay=new R.DigiDisplay({digits:L})},DateTime.prototype.openPopover=function(n){var b;return this.initDateTimePicker(),this.__popover=new R.Popover({element:n,handle_focus:!1,onHide:(b=this,function(){return b.displayValue(),b.closePopover()}),placement:"se",class:"cui-date-time-popover",pane:{content:this.__dateTimeTmpl}}),this.updateDateTimePicker(),this.setCursor("day"),this.__popover.show(),this},DateTime.prototype.closePopover=function(){return this.__popover&&(this.__popover.destroy(),delete this.__popover),this},DateTime.prototype.updateDateTimePicker=function(){return this.setMomentFromInput(),console.debug("updating popover...",this.__input_format),this.drawDate(),this.setClock(),this.setDigiClock(),this.setPrintClock(),this},DateTime.prototype.destroy=function(){return this.closePopover(),DateTime.__super__.destroy.call(this)},DateTime.prototype.setClock=function(n){var b,A,L;return null==n&&(n=this.__current_moment),b=n.hour()%12+(A=n.minute()+(L=n.second()+0)/60)/60,R.dom.setStyleOne(this.__hour,"transform","rotate("+30*b+"deg)"),R.dom.setStyleOne(this.__minute,"transform","rotate("+6*A+"deg)"),R.dom.setStyleOne(this.__second,"transform","rotate("+6*L+"deg)")},DateTime.prototype.setDigiClock=function(n){var b;return null==n&&(n=this.__current_moment),b=this.__input_format.digi_clock,console.debug("setDigiClock",b,n,n.format(b)),b&&this.__digiDisplay.display(n.format(b)),this},DateTime.prototype.setPrintClock=function(n){var b;return null==n&&(n=this.__current_moment),this.__input_format.timezone_display?((b=n.clone()).tz(R.tz_data.tz),R.dom.empty(this.__timezone_display),R.dom.append(this.__timezone_display,b.format(this.__input_format.timezone_display))):this},DateTime.prototype.setTimezone=function(){},DateTime.prototype.UNUSEDgetTimezoneData=function(){return this.__tz_data?R.resolvedPromise():$.get(R.getPathToScript()+"/moment-timezone-meta.json").done((n=this,function(b){var A,L,R,D,B,E,X,$,V;for(X=[],A={},L=0,D=b.length;L0))return L.invalid();for($=0,K=b.length;$=0?this.__input_format=this.initFormat(E):this.__input_format=this.initFormat(this.__default_format),ot.locale(L.locale()),ot.year()>this._max_year?L.invalid():ot;if(!b.some((function(n){return n.support_bc})))return L.invalid();if(D=!1,X=!1,n.startsWith("-"))D=!0,n=n.substring(1);else for(st=n.toLocaleUpperCase(),V=0,Q=(nt=R.DateTime.defaults.bc_appendix).length;V0&&(this.__current_moment=this.parse(n)),""!==n&&this.__current_moment.isValid()||(this.__current_moment=L(),this.__current_moment.__now=!0,this.__input_format=this.initFormat(this.__default_format))},DateTime.prototype.setInputFromMoment=function(){return this.__clearOverwriteMonthAndYear(),this.setValue(this.__current_moment.format(this.__input_format.input),{no_trigger:!1}),this},DateTime.prototype.__clearOverwriteMonthAndYear=function(){return this.__overwrite_month=null,this.__overwrite_year=null},DateTime.prototype.drawDate=function(n){var b;return n?b=n:(b=this.__current_moment.clone()).bc=this.__current_moment.bc,this.updateCalendar(b,!1)},DateTime.prototype.updateCalendar=function(n,b){return null==b&&(b=!0),R.dom.empty(this.__calendar),R.dom.append(this.__calendar,this.getDateTimeDrawer(n)),R.dom.append(this.__calendar,this.drawMonthTable(n)),R.dom.append(this.__calendar,this.drawYearMonthsSelect(n)),b&&(this.__current_moment=n.clone(),this.__current_moment.bc=n.bc,this.setInputFromMoment()),console.info("CUI.DateTime.updateCalendar:",this.__current_moment.format(this.__input_format.input)),this.markDay(),this},DateTime.prototype.getDateTimeDrawer=function(n){var b,A,L,D,B,E,X,$,V,K,Q,tt,ot;return b=this.__input_formats[0].clock_am_pm,L={month:n.month(),year:n.year(),date:n.date(),hour:null,minute:null,second:null,am_pm:null},this.__input_format.clock&&(L.hour=n.hour(),L.minute=n.minute(),L.second=n.second(),b&&(L.am_pm=12*Math.floor(L.hour/12),L.hour=L.hour%12)),K=function(n){return n<10?"0"+n:""+n},B=new R.Label({text:this.__calendar_locale_format.tab_date,class:"cui-select-date-title"}),D=new R.Select({name:"date",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:(ot=this,function(){return ot.updateCalendar(n.date(L.date))}),options:function(){var b,A,L,R;for(L=[],b=A=1,R=n.daysInMonth();1<=R?A<=R:A>=R;b=1<=R?++A:--A)L.push({text:K(b),value:b});return L}}).start(),V=new R.Select({name:"month",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:function(b){return function(){return b.updateCalendar(n.month(L.month))}}(this),options:function(){var n,b,A;for(A=[],b=n=0;n<=11;b=++n)A.push({text:K(b+1),value:b});return A}}).start(),tt=new R.Select({name:"year",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:function(b){return function(){return b.updateCalendar(n.year(L.year))}}(this),options:function(n){return function(){var b,A,R,D,B,E;for(R=[],(A=L.year-20)=B;E=D<=B?++b:--b)R.push({text:""+E,value:E});return R}}(this)}).start(),this.__input_formats[0].clock&&(E=this.__input_format_no_time?[{text:"",value:null}]:[],Q=new R.Label({text:this.__calendar_locale_format.tab_time,class:"cui-select-time-title"}),X=new R.Select({name:"hour",menu_class:"cui-date-time--select-menu",data:L,group:"time",onDataChanged:function(A){return function(R){return null===R.hour?(A.setInputFormat(!1),A.updateCalendar(n)):(A.setInputFormat(!0),b?A.updateCalendar(n.hour(L.hour+L.am_pm)):A.updateCalendar(n.hour(L.hour))),A.__popover.position()}}(this),options:function(){var n,A,L,R;if(R=E.slice(0),b)for(n=A=1;A<=12;n=++A)R.push({text:K(n),value:n%12});else for(n=L=0;L<=23;n=++L)R.push({text:K(n),value:n});return R}}).start(),$=new R.Select({class:"cui-date-time-60-select",name:"minute",menu_class:"cui-date-time--select-menu",group:"time",data:L,onDataChanged:function(b){return function(A){return null===A.minute?(b.setInputFormat(!1),b.updateCalendar(n)):(b.setInputFormat(!0),b.updateCalendar(n.minute(L.minute))),b.__popover.position()}}(this),options:function(){var n,b,A;for(A=E.slice(0),b=n=0;n<=59;b=++n)A.push({text:K(b),value:b});return A}}).start(),b&&(A=new R.Select({class:"cui-date-time-am-pm-select",name:"am_pm",group:"time",data:L,onDataChanged:function(b){return function(A){return null===A.am_pm?(b.setInputFormat(!1),b.updateCalendar(n)):(b.setInputFormat(!0),b.updateCalendar(n.hour(L.hour+L.am_pm))),b.__popover.position()}}(this),options:function(){var n,A,L,R;for(L=E.slice(0),n=0,A=(R=["AM","PM"]).length;nQ&&(Q=null!=(st=nt.text)?st.length:void 0);return(K=new R.Label({text:tt[b.month].text})).setTextMaxChars(Q),A=new R.HorizontalLayout({maximize_vertical:!1,maximize_horizontal:!0,class:"cui-date-time-footer",left:{content:new R.Buttonbar({class:"cui-date-time-header-month",buttons:[{icon:"left",onClick:function(b){return function(A){if(!(n.clone().subtract(1,"months").year()b._max_year))return n.add(1,"months"),b.drawDate(n)}}(this)}]})},right:{content:new R.Buttonbar({class:"cui-date-time-header-year",buttons:[{icon:"left",group:"year",onClick:function(A){return function(){if(!(b.year-1A._max_year))return n.add(1,"years"),A.drawDate(n)}}(this)}]})}}),A.DOM},DateTime.prototype.drawMonthTable=function(n){var b,A,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot;for(Q=n.month(),zt=n.year(),K=L([zt,Q,1,n.hour(),n.minute(),n.second(),0]),tt=R.dom.table("cui-date-time-date"),R.Events.listen({node:tt,type:"click",call:(Ot=this,function(n){var b,A;n.stopPropagation(),A=n.getTarget(),R.dom.closest(A,".cui-date-time-day")&&(b=R.dom.data(R.dom.closest(A,"td,.cui-td")),Ot.__input_format=Ot.initFormat(Ot.__default_format),Ot.__current_moment.year(b.year),Ot.__current_moment.month(b.month),Ot.__current_moment.date(b.date),Ot.updateCalendar(Ot.__current_moment),Ot.__input_formats[0].clock?Ot.__popover.position():Ot.closePopover())})}),lt=R.dom.tr("cui-date-time-month-header"),R.dom.append(tt,lt),pt=R.dom.th,(rt=R.dom.div("cui-date-time-dow")).textContent=this.__calendar_locale_format.tab_week,R.dom.append(lt,R.dom.append(pt("cui-date-time-week-title"),rt)),$=V=nt=this.start_day,it=this.start_day+6;nt<=it?V<=it:V>=it;$=nt<=it?++V:--V)L.locale(this.__calendar_locale_format.moment_locale||this._locale),bt=L.weekdaysMin($%7),L.locale(this.__locale_format.moment_locale||this._locale),(D=R.dom.div("cui-date-time-dow")).textContent=bt,R.dom.addClass(D,"cui-date-time-day-"+bt.toLowerCase()),R.dom.append(lt,R.dom.append(pt(),D));for(K.subtract((K.day()-this.start_day+7)%7,"days"),$=this.start_day,Mt=0,ot=L();;){if(A=K.year(),b=K.month(),B=K.date(),($-this.start_day)%7==0){if(6===Mt)break;lt=R.dom.tr(),R.dom.append(tt,lt),ut=K.week(),R.dom.append(lt,R.dom.append(R.dom.td("cui-date-time-week"),R.dom.text(ut))),Mt++}X=R.dom.td,(E=R.dom.span()).textContent=B,D=X("cui-date-time-day",{cursor:"day",datestr:[A,b,B].join("-")}),R.dom.append(D,E),bQ?R.dom.addClass(D,"cui-date-time-next-month"):(R.dom.addClass(D,"cui-date-time-same-month"),zt===ot.year()&&Q===ot.month()&&B===ot.date()&&R.dom.addClass(D,"cui-date-time-now")),R.dom.addClass(D,"cui-date-time-day-"+K.format("dd").toLowerCase()),st=D,R.dom.append(lt,st),R.dom.data(st,{date:B,month:b,year:A}),K.add(1,"days"),$++}return tt},DateTime.prototype.markDay=function(){var n,b,A,L,D,B,E,X;for(A=0,D=(E=R.dom.matchSelector(this.__dateTimeTmpl.DOM,".cui-date-time-calendar .cui-date-time-selected")).length;A0&&n.parseZone(),n.format(b))},DateTime.formatMomentWithBc=function(n,b,A,L){var D,B,E,X,$,V;return null==A&&(A=!1),null==L&&(L=!1),L?(V=n.year(),D=Math.abs(V),X=DateTime.formatMoment(n,b,!1),B=new RegExp("(-?)0+"+D+"\\b"),X=X.replace(B,"$1"+D)):0===n.year()?"1 "+R.DateTime.defaults.bc_appendix_output:n.bc?parseInt(n.bc)+1+" "+R.DateTime.defaults.bc_appendix_output:n.year()>0?($=n.format(b),n.year()<1e3&&A?(E="0+"+n.year()+"\\b",B=new RegExp(E,"g"),R.DateTime.defaults.ad_prefix_output.replace("%(date)s",$.replace(B,""+n.year()))):(E="^\\+?0*"+n.year(),B=new RegExp(E),$.replace(B,""+n.year()))):(n.subtract(1,"year"),$=n.format(b)+" "+R.DateTime.defaults.bc_appendix_output,E="\\-0*"+-1*n.year(),B=new RegExp(E),$.replace(B,""+-1*n.year()))},DateTime.toMoment=function(n){return R.util.isEmpty(n)?null:new R.DateTime({input_types:null}).parse(n)},DateTime.stringToDateRange=function(n,b){return R.DateTimeRangeGrammar.stringToDateRange(n,b)},DateTime.dateRangeToString=function(n,b,A,L){return null==L&&(L=!1),R.DateTimeRangeGrammar.dateRangeToString(n,b,A,L)},DateTime.convertTimeFormatFromGoToMoment=function(n){var b,A,L,R,D;for(D=n,b=0,A=(R=[["2006","YYYY"],["06","YY"],["January","MMMM"],["Jan","MMM"],["01","MM"],["15","HH"],["1","M"],["Monday","dddd"],["Mon","ddd"],["__2","DDD"],["002","DDDD"],["_2"," D"],["02","DD"],["2","D"],["03","hh"],["3","h"],["04","mm"],["4","m"],["05","ss"],["5","s"],["PM","A"],["-07:00:00","Z"],["-0700","ZZ"],["-07:00","Z"],["-070000","ZZ"],["Z0700","[Z]ZZ"],["Z07:00","[Z]Z"],["-07","Z"],["Z070000","[Z]ZZ"],["Z07:00:00","[Z]Z"],["Z07","[Z]Z"]]).length;b{"use strict";A.r(b);A(5059),A(2231),A(2453),A(7390);var L=A(7288);L.DateTimeFormats={},L.DateTimeFormats["de-DE"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Datum",tab_time:"Zeit",tab_week:"Wo",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!0,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY","Y-M-D","D.M.Y","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["it-IT"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Data",tab_time:"Ora",tab_week:"Set",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["es-ES"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Fecha",tab_time:"Hora",tab_week:"Sem",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["en-US"]={timezone:"Europe/Berlin",moment_locale:"en-US",tab_date:"Date",tab_time:"Time",tab_week:"Wk",formats:[{text:"Date+Time",support_bc:!1,invalid:"Invalid Date",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_am_pm:!0,clock_seconds:!1,input:"YYYY-MM-DD hh:mm A",display:"dd, YYYY-MM-DD hh:mm A",display_short:"YYYY-MM-DD hh:mm A",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","MM/DD/YYYY HH:mm:ss","MM/DD/YYYYTHH:mm:ss.SSSZ","MM/DD/YYYYTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Date+Time+Seconds",support_bc:!1,invalid:"Invalid Date",type:"date_time_seconds",store:"YYYY-MM-DDTHH:mm:ssZ",input:"YYYY-MM-DD HH:mm:ss",display:"dd, YYYY-MM-DD HH:mm:ss",display_short:"YYYY-MM-DD HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_am_pm:!0,clock_seconds:!0,parse:["MM/DD/YYYY HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Date",support_bc:!1,input:"YYYY-MM-DD",invalid:"Invalid date",display:"dd, YYYY-MM-DD",display_short:"YYYY-MM-DD",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["MM/DD/YYYY","D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"YYYY-MM",invalid:"Invalid date",store:"YYYY-MM",display:"MMMM YYYY",display_short:"YYYY-MM",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM","MM-YYYY","M-YYYY","YYYY-M","YYYY.M","YYYY/M"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Invalid date",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["ru-RU"]={timezone:"Europe/Berlin",moment_locale:"ru-RU",tab_date:"Дата",tab_time:"Время",tab_week:"Нед",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["pl-PL"]={timezone:"Europe/Berlin",moment_locale:"pl-PL",tab_date:"Data",tab_time:"Czas",tab_week:"Tydz",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["cs-CZ"]={timezone:"Europe/Berlin",moment_locale:"cs-CZ",tab_date:"Datum",tab_time:"Čas",tab_week:"Týd",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["fi-FI"]={timezone:"Europe/Berlin",moment_locale:"fi",tab_date:"Päivämäärä",tab_time:"Aika",tab_week:"Vi",formats:[{text:"Päivämäärä + Aika",support_bc:!1,invalid:"Virheellinen päivämäärä",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Päivämäärä+Aika+Sekunnit",support_bc:!1,invalid:"Virheellinen päivämäärä",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Päivämäärä",support_bc:!1,input:"DD.MM.YYYY",invalid:"Virheellinen päivämäärä",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Vuosi-Kuu",support_bc:!1,input:"MM.YYYY",invalid:"Virheellinen päivämäärä",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Vuosi",support_bc:!0,input:"Y",invalid:"Virheellinen päivämäärä",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["sv-SE"]={timezone:"Europe/Berlin",moment_locale:"sv",tab_date:"Datum",tab_time:"Tid",tab_week:"Ve",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["da-DK"]={timezone:"Europe/Berlin",moment_locale:"da",tab_date:"Dato",tab_time:"Tid",tab_week:"Uge",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Dato ugyldig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Dato ugyldig",type:"date_time_seconds",input:"DD/MM/YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD/MM/YYYY HH:mm:ss",display_short:"DD/MM/YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD/MM/YYYY",invalid:"Dato ugyldig",display:"dd, DD/MM/YYYY",display_short:"DD/MM/YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM/YYYY",invalid:"Dato ugyldig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM/YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Dato ugyldig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["fr-FR"]={timezone:"Europe/Berlin",moment_locale:"fr",tab_date:"Date",tab_time:"Heure",tab_week:"Sem",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Dato ugyldig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Dato ugyldig",type:"date_time_seconds",input:"DD/MM/YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD/MM/YYYY HH:mm:ss",display_short:"DD/MM/YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD/MM/YYYY",invalid:"Dato ugyldig",display:"dd, DD/MM/YYYY",display_short:"DD/MM/YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM/YYYY",invalid:"Dato ugyldig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM/YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Dato ugyldig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["tvl-TV"]={timezone:"Europe/Berlin",moment_locale:"en-US",tab_date:"Date",tab_time:"Time",tab_week:"Wk",formats:[{text:"Date+Time",support_bc:!1,invalid:"Invalid Date",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_am_pm:!0,clock_seconds:!1,input:"YYYY-MM-DD hh:mm A",display:"dd, YYYY-MM-DD hh:mm A",display_short:"YYYY-MM-DD hh:mm A",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","MM/DD/YYYY HH:mm:ss","MM/DD/YYYYTHH:mm:ss.SSSZ","MM/DD/YYYYTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Date+Time+Seconds",support_bc:!1,invalid:"Invalid Date",type:"date_time_seconds",store:"YYYY-MM-DDTHH:mm:ssZ",input:"YYYY-MM-DD HH:mm:ss",display:"dd, YYYY-MM-DD HH:mm:ss",display_short:"YYYY-MM-DD HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_am_pm:!0,clock_seconds:!0,parse:["MM/DD/YYYY HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Date",support_bc:!1,input:"YYYY-MM-DD",invalid:"Invalid date",display:"dd, YYYY-MM-DD",display_short:"YYYY-MM-DD",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["MM/DD/YYYY","D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"YYYY-MM",invalid:"Invalid date",store:"YYYY-MM",display:"MMMM YYYY",display_short:"YYYY-MM",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM","MM-YYYY","M-YYYY","YYYY-M","YYYY.M","YYYY/M"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Invalid date",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]}},7569:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(2689),R.DateTimeInputBlock=function(n){function DateTimeInputBlock(){return DateTimeInputBlock.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DateTimeInputBlock,n),DateTimeInputBlock.prototype.initOpts=function(){return DateTimeInputBlock.__super__.initOpts.call(this),this.addOpts({matcher:{mandatory:!0,check:"PlainObject"},datetime:{mandatory:!0,check:String},input_format:{mandatory:!0,check:function(n){return!!n.input}}})},DateTimeInputBlock.prototype.incrementBlock=function(n,b){return this.__changeBlock(n,b,1)},DateTimeInputBlock.prototype.decrementBlock=function(n,b){return this.__changeBlock(n,b,-1)},DateTimeInputBlock.prototype.__changeBlock=function(n,b,A){var D,B,E,X;for(console.debug("change block",n,b,A,this._datetime,this._input_format.format),X=L(this._datetime,this._input_format.input),R.util.isFunction(this._matcher.inc_func)?this._matcher.inc_func(X,A):A<0?X.subtract(this._matcher.inc_func_amount||1,this._matcher.inc_func):X.add(this._matcher.inc_func_amount||1,this._matcher.inc_func),B=0,E=b.length;B{var L=A(7288),R=[].indexOf||function(n){for(var b=0,A=this.length;b=0?(Ot=L.DateTimeRangeGrammar.TYPE_MONTH,ft=nt):Ot=lt,zt.push({type:Ot,value:ft});for(A in ut=zt.map((function(n){return n.type})).join(" ").toUpperCase(),st=L.DateTimeRangeGrammar.PARSE_GRAMMARS)for(V=0,Q=(X=st[A]).length;V2&&b.splice(Math.round(b.length/2)),(Q=this.timezones).push.apply(Q,b);this.timezones.sort((function(n,b){return n.displayName.localeCompare(b.displayName)})),this.timezones.sort((function(n,b){return parseInt(n.offset)-parseInt(b.offset)}))},Timezone.getTimezone=function(){return L.util.moment.tz.guess()},Timezone.getTimezoneName=function(n){return this.timezonesAbbrs[n]},Timezone.timezonesAbbrs={GMT:"Greenwich Mean Time",CET:"Central European Time",CEST:"Central European Summer Time",EEST:"Eastern European Summer Time",IDT:"Israel Daylight Time",MSK:"Moscow Time Zone",EAT:"East Africa Time",SAST:"South African Standard Time",EET:"Eastern European Time",CAT:"Central Africa Time",WAT:"West Africa Time",WEST:"Western European Summer Time",BST:"British Summer Time",EST:"Eastern Standard Time",EDT:"Eastern Daylight Time",CST:"Central Standard Time",CDT:"Central Daylight Time",MST:"Mountain Standard Time",MDT:"Mountain Daylight Time",PST:"Pacific Standard Time",PDT:"Pacific Daylight Time",IST:"Indian Standard Time",JST:"Japan Standard Time",HDT:"Hawaii-Aleutian Daylight Time",HST:"Hawaii–Aleutian Time",SST:"Samoa Standard Time",AKDT:"Alaska Daylight Time",ACDT:"Australian Central Daylight Savings Time",ACST:"Australian Central Standard Time",ADT:"Atlantic Daylight Time",AEDT:"Australian Eastern Daylight Savings Time",AEST:"Australian Eastern Standard Time",AST:"Atlantic Standard Time",AWST:"Australian Western Standard Time",ChST:"Chamorro Standard Time",HKT:"Hong Kong Time",KST:"Korea Standard Time",NDT:"Newfoundland Daylight Time",NZDT:"New Zealand Daylight Time",PKT:"Pakistan Standard Time",WIB:"Western Indonesia Time",WIT:"Eastern Indonesia Time",WITA:"Indonesia Central Time Zone"},Timezone}(),L.ready((function(){return L.Timezone.init()}))},1144:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DigiDisplay=function(n){function DigiDisplay(n){DigiDisplay.__super__.constructor.call(this,n),this.__digitsMap=[],this.createMarkup(),this.registerDOMElement(this.__displayDiv)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DigiDisplay,n),DigiDisplay.prototype.initOpts=function(){return DigiDisplay.__super__.initOpts.call(this),this.addOpts({digits:{mandatory:!0,check:Array}})},DigiDisplay.prototype.display=function(n){var b,A,R,D,B,E,X,$;for(D=E=0,X=($=n.split("")).length;E{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.DocumentBrowser=function(n){function DocumentBrowser(){return DocumentBrowser.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DocumentBrowser,n),DocumentBrowser.prototype.initOpts=function(){return DocumentBrowser.__super__.initOpts.call(this),this.addOpts({gotoLocation:{check:Function,default:(n=this,function(b,A,L){return n.loadLocation(b,A,L)})},marked_opts:{default:{},mandatory:!0,check:function(n){var b;if(!R.util.isPlainObject(n))return!1;for(b in n)if(n[b],"image"===b||"link"===b)return!1;return!0}},getMarkdown:{default:function(n){return n},check:Function},renderHref:{check:Function,default:function(n,b){return n}},url:{check:function(n){return!!R.parseLocation(n)}}});var n},DocumentBrowser.prototype.readOpts=function(){var n,b;return DocumentBrowser.__super__.readOpts.call(this),this.__marked_opts=R.util.copyObject(this._marked_opts),this.__marked_opts.renderer||(this.__marked_opts.renderer=new L.Renderer),(n=this.__marked_opts.renderer).image=(b=this,function(n,A,L){return b.__node.rendererImage(n,A,L)}),n.link=function(n){return function(b,A,L){return n.__node.rendererLink(b,A,L)}}(this),this.__words={}},DocumentBrowser.prototype.renderHref=function(n,b){return this._renderHref(n,b)},DocumentBrowser.prototype.marked=function(n,b){var A,D,B,E;return this.__node=n,A=new R.Deferred,E=this,D=function(n){return A.resolve(L(n,E.__marked_opts))},B=this._getMarkdown(b),R.util.isPromise(B)?B.done((function(n){return D(n)})).fail(A.reject):D(B),A.promise()},DocumentBrowser.prototype.loadLocation=function(n,b,A){if(!n){if(!this.__tree.root.children.length)return;return this.loadLocation(this.__tree.root.children[0].getNodePath())}return this.__tree.root.selectLocation(n).done((L=this,function(n){var R;return R=parseInt(A),n.isSelected()||n.select({search:b,nodeIdx:R}),L.loadContent(n,b,R)})).fail(function(n){return function(){return n.loadEmpty()}}(this));var L},DocumentBrowser.prototype.loadEmpty=function(){return this.__layout.replace(new R.EmptyLabel({text:"No article available."}),"center")},DocumentBrowser.prototype.loadContent=function(n,b,A){return n.loadContent().done((L=this,function(D,B,E){var X,$,V,K,Q,tt,ot,nt,it,rt;if(b){for(tt=null,ot=new R.DocumentBrowser.SearchQuery({search:b}),Q=R.dom.htmlToNodes(L.marked(n,D)),nt=[],it=0,R.dom.findTextInNodes(Q,(function(n,b){var L;if(it+=1,L=ot.match(b))return console.debug("matches",ot,b),L.__mark_all=A===it-1,L.__node=n,nt.push(L)})),console.debug("text matches",nt),V=0,K=nt.length;V"+$+""),X=R.dom.replaceWith(rt.__node,R.dom.htmlToNodes($)),rt.__mark_all&&(tt=X);return L.__layout.replace(Q,"center"),L.__layout.prepend(n.getMainArticleUrl(),"center"),tt?R.dom.scrollIntoView(tt):L.__layout.center().scrollTop=0}L.__layout.replace(B,"center")})).fail(function(n){return function(){return n.loadEmpty()}}(this));var L},DocumentBrowser.prototype.getRootNode=function(){return this.__tree.root},DocumentBrowser.prototype.__doSearch=function(n){var b,A,L,D;if(this.__searchResult.empty("center"),n.trim().length>2){for(b=0,A=(D=this.__tree.root.findContent(new R.DocumentBrowser.SearchQuery({search:n}))).length;b{var L=A(7288),extend=function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}return ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype,n},R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?V("**(Recursion: "+$[1]+")**"):(E.push(K),new L.XHR({url:X.__url+K,responseType:"text"}).start().done((function(n){var b;return(b=K.split("/")).pop(),X.loadIncludes(n,b.join("/"),E).done((function(n){return V(n)}))})).fail((function(){return V("**(Error: "+$[1]+")**")})))):R.resolve(n)})(),R.promise()},Node.prototype.loadContent=function(){var n,b;return this.__content&&new L.resolvedPromise(this.__content,this.__htmlNodes,this.__texts),n=new L.Deferred,new L.XHR({url:this.getMainArticleUrl(),responseType:"text"}).start().done((b=this,function(A){if(b.__content=A,!b.__content.startsWith("<"))return b.loadIncludes(b.__content,b.getNodePath()).fail(n.reject).done((function(A){return b._browser.marked(b,A).done((function(A){return b.__htmlNodes=L.dom.htmlToNodes(A),b.__texts=L.dom.findTextInNodes(b.__htmlNodes),b._browser.addWords(b.__texts),n.resolve(b.__content,b.__htmlNodes,b.__texts)}))})).fail(n.reject);n.reject()})).fail(n.reject),n.promise()},Node.prototype.findContent=function(n,b){var A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt;if(null==b&&(b=[]),L.util.assert(n instanceof L.DocumentBrowser.SearchQuery,"DocumentBrowserNode.findContent","searchQuery needs to be instance of CUI.DocumentBrowser.SearchQuery.",{searchQuery:n}),K=n.getRegExps(),R=function(){tt=[];for(var n=0,b=K.length-1;0<=b?n<=b:n>=b;0<=b?n++:n--)tt.push(n);return tt}.apply(this),Q=function(n){var b,A,D,B;if(0!==R.length)for(A=0,D=(B=n.getMatches()).length;A"+A+""},Node.prototype.rendererImage=function(n,b,A){var R;return""+L.escapeAttribute(A)+""},Node.prototype.renderContent=function(){return new L.Label({text:this._title,multiline:!0})},Node}(L.ListViewTreeNode),L.DocumentBrowser.RootNode=function(n){function RootNode(){return RootNode.__super__.constructor.apply(this,arguments)}return extend(RootNode,n),RootNode}(L.DocumentBrowser.Node)},4126:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.NodeMatch=function(n){function NodeMatch(){return NodeMatch.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NodeMatch,n),NodeMatch.prototype.initOpts=function(){return NodeMatch.__super__.initOpts.call(this),this.addOpts({title_match:{check:L.DocumentBrowser.SearchMatch},text_matches:{check:function(n){var b,A;for(b=0,A=n.length;b"+new L.Icon({icon:"right"}).DOM.outerHTML+""))}),L.dom.setAttribute(B.DOM,"tabindex",0),L.Events.listen({type:"focus",node:B,call:(it=this,function(n){it._node.select({search:it._searchQuery.getSearch()})})}),n=[B],this._text_matches)for(nt=L.dom.element("UL"),n.push(nt),Q=this._text_matches,b=function(n){return function(b){return L.Events.listen({type:"focus",node:$,call:function(A){n._node.select({search:n._searchQuery.getSearch(),nodeIdx:b.nodeIdx})}})}}(this),D=0,X=Q.length;D{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.SearchMatch=function(n){function SearchMatch(){return SearchMatch.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SearchMatch,n),SearchMatch.prototype.initOpts=function(){return SearchMatch.__super__.initOpts.call(this),this.addOpts({searchQuery:{mandatory:!0,check:L.DocumentBrowser.SearchQuery},string:{mandator:!0,check:String}})},SearchMatch.prototype.readOpts=function(){return SearchMatch.__super__.readOpts.call(this),this.__matches=[]},SearchMatch.prototype.addMatch=function(n){return this.__matches.push(n)},SearchMatch.prototype.getMatches=function(){return this.__matches},SearchMatch.prototype.getString=function(){return this._string},SearchMatch.prototype.getHighlighted=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st;for(null==n&&(n=!1),rt=this._string,b=function(n){return void 0===n?null:n.join(".")},nt=function(n){var b;return(b=n.split(/\s+/)).length>6&&b.splice(3,b.length-6,"..."),b.join(" ")},(D=[]).length=rt.length,K=B=0,$=(Q=this.__matches).length;B<$;K=++B)for(E=X=tt=(V=Q[K]).index,ot=V.index+V[0].length;tt<=ot?Xot;E=tt<=ot?++X:--X)D[E]||(D[E]=[]),D[E].push(V.regExp_idx);for(it=[],E=0;E"),A&&A!==R&&it.push(''),st=[];st.push(rt[E]),(E+=1)!==D.length&&!D[E]&&!A;);it.push(L.util.toHtml(nt(st.join(""))))}return A&&it.push(""),it.join("")},SearchMatch}(L.Element)},2827:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.SearchQuery=function(n){function SearchQuery(){return SearchQuery.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SearchQuery,n),SearchQuery.prototype.initOpts=function(){return SearchQuery.__super__.initOpts.call(this),this.addOpts({search:{mandatory:!0,check:String}})},SearchQuery.prototype.readOpts=function(){var n,b,A,L;for(SearchQuery.__super__.readOpts.call(this),this.__regExpe=[],n=0,b=(A=this._search.trim().split(/\s+/)).length;n0)for(Q||(Q=new L.DocumentBrowser.SearchMatch({searchQuery:this,string:n})),D=0,E=$.length;D{var L=A(7288),R={}.hasOwnProperty;L.FileReader=function(n){function FileReader(){return FileReader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileReader,n),FileReader.prototype.initOpts=function(){return FileReader.__super__.initOpts.call(this),this.removeOpt("url")},FileReader.prototype.readOpts=function(){return L.Element.prototype.readOpts.call(this)},FileReader.prototype.getUploadFileClass=function(){return L.FileReaderFile},FileReader.prototype.uploadFile=function(n){return n.upload(n)},FileReader.save=function(n,b,A){var L,R;return null==A&&(A="text/csv"),L=new Blob([b],{type:A}),window.navigator.msSaveOrOpenBlob?window.navigator.msSaveBlob(L,n):((R=window.document.createElement("a")).href=window.URL.createObjectURL(L),R.download=n,document.body.appendChild(R),R.click(),document.body.removeChild(R),window.URL.revokeObjectURL(L))},FileReader}(L.FileUpload)},6760:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FileReaderFile=function(n){function FileReaderFile(){return FileReaderFile.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileReaderFile,n),FileReaderFile.prototype.initOpts=function(){return FileReaderFile.__super__.initOpts.call(this),this.addOpts({format:{mandatory:!0,default:"Text",check:["ArrayBuffer","Text"]}})},FileReaderFile.prototype.upload=function(n){var b,A,L,R,D;for(this.__reader=new FileReader,D=this,b=function(n){return D.__reader.addEventListener(n.toLowerCase(),(function(b){return D["__event_"+n](b)}))},A=0,L=(R=["loadStart","progress","abort","error","load","loadend"]).length;A{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=1}},onAdd:{check:Function},onBatchStart:{check:Function},onBatchQueued:{check:Function},onBatchDone:{check:Function},onProgress:{check:Function},onDone:{check:Function},onUpdate:{check:Function},onDequeue:{check:Function},onRemove:{check:Function},onFail:{check:Function},onAlways:{check:Function},shouldQueue:{check:Function},onBeforeDone:{check:Function}})},FileUpload.prototype.readOpts=function(){return FileUpload.__super__.readOpts.call(this),this.setUrl(this._url)},FileUpload.prototype.setUrl=function(n){return this.__url=n,this.__url},FileUpload.prototype.getUrl=function(){return this.__url},FileUpload.prototype.getFiles=function(n){var b,A,R,B,E,X;for(L.util.isString(n)&&(n=[n]),A=[],R=0,B=(E=this.__files).length;R=0))&&A.push(b);return A},FileUpload.prototype.getInfo=function(){var n,b,A,L,R,D,B,E,X,$,V,K;for(V={},K=0,E=0,L=0,R=0,A=!0,D=0,B=(X=this.getFiles()).length;D0){for(Q=[],R=[],E=0,X=(K=b.files).length;E0&&console.warn("Files empty or directories, not uploaded...",Q),R.length>0&&$.queueFiles(R)}return n.stopPropagation(),n.preventDefault(),!1})}),A=0,R=(E=this.__dropZones).length;A\x3c!-- /CUI.FileUploadButton --\x3e'))}))},5370:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FileUploadFile=function(n){function FileUploadFile(n){FileUploadFile.__super__.constructor.call(this,n),this.__progress={status:"CREATED",total:this._file.size,loaded:0,percent:null},this.__dfr=new L.Deferred,this.__promise=this.__dfr.promise()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileUploadFile,n),FileUploadFile.prototype.initOpts=function(){return FileUploadFile.__super__.initOpts.call(this),this.addOpts({file:{mandatory:!0,check:function(n){return"object"==typeof n}},fileUpload:{mandatory:!0,check:L.FileUpload},batch:{check:function(n){return n>=0}},onRemove:{check:Function},onDequeue:{check:Function},onBeforeDone:{check:Function}})},FileUploadFile.prototype.queue=function(){return this.__progress.status="QUEUED",this.__dfr.notify(this),this},FileUploadFile.prototype.getImage=function(){var n,b,A;return this.__imgDiv?this.__imgDiv:((b=L.dom.img()[0]).src=window.URL.createObjectURL(this._file),b.onload=(A=this,function(n){return b.width0?(this.__upload=new L.XHR({url:n,form:A}),this.__upload.start().progress((D=this,function(n,b,A,L){if("download"!==n&&"ABORT"!==D.__progress.status)return D.__progress.status=b===A?"COMPLETED":"PROGRESS",D.__progress.loaded=b,D.__progress.total=A,D.__progress.percent=L,D.__dfr.notify(D)})).done(function(n){return function(b){return n.__progress.data=b,R=function(){return n.__progress.status="DONE",n.__upload=null,n.__dfr.resolve(n)},n._onBeforeDone?L.decide(n._onBeforeDone(n)).done(R).fail((function(){return n.__progress.status="ABORT",n.__upload=null,n.__dfr.reject(n)})):R()}}(this)).fail(function(n){return function(b,A,L){return"abort"===L&&(n.__progress.status="ABORT"),"ABORT"!==n.__progress.status&&(n.__progress.status="FAILED"),n.__progress.fail=n.__upload.response(),n.__progress.fail_xhr=n.__upload.getXHR(),n.__upload=null,n.__dfr.reject(n)}}(this))):L.setTimeout({call:function(n){return function(){return n.__progress.status="FAILED",n.__upload=null,n.__dfr.reject(n)}}(this)}),this.__progress.status="STARTED",this.__progress.percent=0,this.__dfr.notify(this),this.__promise},FileUploadFile}(L.Element)},7250:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Form=function(n){function Form(n){Form.__super__.constructor.call(this,n),this._padded&&this.addClass("cui-form--padded"),this._condensed&&this.addClass("cui-form--condensed")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Form,n),Form.prototype.initOpts=function(){return Form.__super__.initOpts.call(this),this.addOpts({top:{},bottom:{},padded:{check:Boolean,default:!1},condensed:{check:Boolean,default:!1}})},Form.prototype.initTemplate=function(){return this.registerTemplate(this.__verticalLayout.getLayout())},Form.prototype.initLayout=function(){var n,b,A,R,D;for(D={class:"cui-form cui-form-appearance-"+this._appearance},n=0,A=(R=["maximize","maximize_horizontal","maximize_vertical"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.SimpleForm=function(n){function SimpleForm(){return SimpleForm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SimpleForm,n),SimpleForm.prototype.initOpts=function(){return SimpleForm.__super__.initOpts.call(this),this.addOpts({fields:{mandatory:!0,check:function(n){return L.util.isFunction(n)||L.util.isArray(n)}},header:{check:Array},horizontal:{default:!1,check:function(n){return L.util.isBoolean(n)||L.util.isInteger(n)&&n>0}},appearance:{default:"normal",mandatory:!0,check:["normal","separators"]},render_as_grid:{default:!1,mandatory:!0,check:Boolean},blockLevelOffset:{check:"Integer",default:0}})},SimpleForm.prototype.readOpts=function(){var n,b,A,R;return SimpleForm.__super__.readOpts.call(this),1===this._horizontal?this.__horizontal=null:this.__horizontal=this._horizontal,(null!=(A=this._form)?A.checkbox:void 0)?(L.util.assert(L.util.isPlainObject(this._form.checkbox,"new CUI.Form","opts.form.checkbox needs to be PlainObject.",{opts:this.opts})),L.util.assert(this._name,"new CUI.Form","opts.form.checkbox requires opts.name to be set.",{opts:this.opts}),L.util.assert(!this._form.checkbox.data,"new CUI.Form","opts.form.checkbox cannot have 'data' set.",{opts:this.opts}),L.util.assert(!this._form.checkbox.name,"new CUI.Form","opts.form.checkbox cannot have 'name' set.",{opts:this.opts}),(n=L.util.copyObject(this._form.checkbox,!0)).data=this.__checkbox_data={checkbox:!1},n.name="checkbox",b=n.onActivate,n.onActivate=(R=this,function(n,A,D){var B,E,X,$;if("function"==typeof b&&b(n,A,D),D.ctrlKey())for(E=0,X=($=L.dom.matchSelector(R.DOM,".cui-checkbox")).length;E3&&(Ot=3),(ot=rt instanceof L.Form?rt.getCheckbox():null)?(!function(n,b){L.Events.listen({type:"data-changed",node:n,call:function(){return n.getValue()?(L.dom.addClass(tt.DOM,"cui-form-block--checkbox-checked"),L.dom.showElement(b.DOM)):(L.dom.removeClass(tt.DOM,"cui-form-block--checkbox-checked"),L.dom.hideElement(b.DOM))}})}(ot,rt),zt=ot):"LABEL"===(null!=(zt=E(rt))?zt.nodeName:void 0)&&zt.classList.add("cui-block-title"),tt=new L.Block({padded:!1,maximize:n.__maximize,maximize_horizontal:n.__maximize_horizontal,maximize_vertical:n.__maximize_vertical,class:"cui-form-block",level:Ot,header:zt,content:[lt,B(rt)]}),ot&&(L.dom.addClass(tt.DOM,"cui-form-block--has-checkbox"),ot.getValue()?L.dom.addClass(tt.DOM,"cui-form-block--checkbox-checked"):L.dom.removeClass(tt.DOM,"cui-form-block--checkbox-checked")),b(tt),L.dom.data(tt.DOM,"data-field",rt),n.__setRowVisibility(tt.DOM),V=null,K=null,void $();if(!V){for(pt=!1,bt=ut=R,_t=X;ut<_t;bt=ut+=1)if(A(D[bt])){pt=!0;break}pt?(V=L.dom.element("DIV",{class:"cui-form-table"}),K=!0):(V=L.dom.element("DIV",{class:"cui-form-container"}),K=!1),n.__horizontal&&L.dom.addClass(V,"cui-form--horizontal"),b(V)}return nt=[],(ft=rt.getName())&&nt.push("cui-form-field-name--"+ft),rt instanceof L.Select?nt.push("cui-form-field-type--select"):rt instanceof L.Checkbox?nt.push("cui-form-field-type--checkbox"):rt instanceof L.Input&&nt.push("cui-form-field-type--input"),K?((Mt=E(rt,!0))?nt.push("cui-form-tr--has-key"):nt.push("cui-form-tr--has-no-key"),yt=L.dom.element("DIV",{class:"cui-form-tr "+nt.join(" "),"data-for-field":rt.getUniqueId()}),At=L.dom.element("DIV",{class:"cui-form-td cui-form-key"}),b(Mt,At),yt.appendChild(At),At=L.dom.element("DIV",{class:"cui-form-td cui-form-value"}),b(lt,At),b(B(rt),At),yt.appendChild(At),L.dom.data(yt,"data-field",rt),n.__setRowVisibility(yt),st&&yt.setAttribute("data-cui-grid",st),V.appendChild(yt)):((it=rt._form)&&(it.maximize&&nt.push("cui-maximize"),(it.maximize&&!1!==it.maximize_horizontal||!0===it.maximize_horizontal)&&nt.push("cui-maximize-horizontal"),(it.maximize&&!1!==it.maximize_vertical||!0===it.maximize_vertical)&&nt.push("cui-maximize-vertical")),gt=L.dom.element("DIV",{class:"cui-form-row "+nt.join(" "),"data-for-field":rt.getUniqueId()}),b(lt,gt),gt.appendChild(B(rt)),b(B(rt),gt),L.dom.data(gt,"data-field",rt),n.__setRowVisibility(gt),st&>.setAttribute("data-cui-grid",st),V.appendChild(gt)),$()}}}(this),$()},SimpleForm.prototype.renderAsBlock=function(){var n,b,A,R,D;if(this.getCheckbox())return!0;if(!1===this._render_as_block)return!1;if(!0===this._render_as_block)return!0;for(A=0,R=(b=this.getFields()).length;A0},SimpleForm.prototype.appendToContainer=function(n){return this.append(n)},SimpleForm.prototype.onDataChanged=function(n,b){var A;SimpleForm.__super__.onDataChanged.call(this,n,b),b.element&&"goto"!==(A=b.action)&&"reset"!==A&&(this.__undo.log[++this.__undo.idx]={name:b.element.getName(),undo_idx:b.undo_idx,action:b.action},this.__undo.log.splice(this.__undo.idx+1))},SimpleForm.prototype.hasUserData=function(n){var b,A,L;for(b=0,A=(L=this.getFields("hasUserData")).length;b=0,this.__cls+".getFieldByIdx","idx must be Integer.",{idx:n}),this.getFields("getFieldByIdx")[n]},SimpleForm.prototype.updateHint=function(n,b,A){var R,D;if(null==A&&(A=!0),D=this.getFieldsByName(n)[0]){if(1===(R=L.dom.matchSelector(this.getLayout().DOM,".cui-form-hint[data-for-field='"+D.getUniqueId()+"'] > .cui-form-hint-label")).length)return L.dom.data(R[0]).element.setText(b),A&&L.Events.trigger({type:"content-resize",node:R[0]}),this;console.error("Form.updateHint:",n,"not found in DOM.")}else console.error("Form.updateHint:",n,"not found.")},SimpleForm.prototype.__setClassOnField=function(n,b,A){var R,D,B,E,X;for(D=0,B=(E=this.getFieldsByName(n)).length;D{var L=A(7288),R={}.hasOwnProperty;L.FormButton=function(n){function FormButton(n){FormButton.__super__.constructor.call(this,n)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormButton,n),FormButton.prototype.getButtonOpts=function(){var n,b,A,L,R;for(L={icon:this._icon},n=0,A=(R=["appearance"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.FormModal=function(n){function FormModal(n){FormModal.__super__.constructor.call(this,n),this.__old_text=null,this.__old_display=null}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormModal,n),FormModal.prototype.initOpts=function(){return FormModal.__super__.initOpts.call(this),this.removeOpt("popover"),this.addOpts({modal:{default:{},check:"PlainObject",apply_button:{mandatory:!0,default:{text:"Ok"},check:function(n){return L.util.isPlainObject(n)}}},hasChanges:{check:Function},revertData:{check:Function}})},FormModal.prototype.initPopover=function(n){var b,A,R,D,B;return A=L.util.copyObject(this._modal.apply_button,!0),D=A.onClick,A.onClick=(B=this,function(n,b){return L.decide("function"==typeof D?D(n,b,B):void 0).done((function(){return B.__popover.hide()}))}),b=new L.defaults.class.Button(A),this.hasChanges()?b.enable():b.disable(),n.pane.footer_right=b,R=new L.Modal(n),(this.__orig_set_data||this._hasChanges)&&L.Events.listen({type:"data-changed",node:R,call:function(n){return function(){return n.hasChanges()?b.enable():b.disable()}}(this)}),R},FormModal.prototype.revertData=function(){return this._revertData?(this._revertData(this),this):(L.util.assert(this.__orig_set_data,"Form.revertData","Only supported with opts.name set and opts.data PlainObject.",{opts:this.opts}),delete this.__data,this.__orig_data?this.__orig_set_data[this._name]=this.__orig_data:delete this.__orig_set_data[this._name],this.setData(this.__orig_set_data),this.removeFields(),L.Events.trigger({type:"data-changed",node:this.getPopover()}),this)},FormModal.prototype.setData=function(n){return this._name&&!L.util.isFunction(n)&&(n[this._name]?this.__orig_data=L.util.copyObject(n[this._name],!0):this.__orig_data=void 0,this.__orig_set_data=n),FormModal.__super__.setData.call(this,n)},FormModal.prototype.__closePopover=function(){return this.__orig_set_data&&(this.__orig_data=L.util.copyObject(this.__orig_set_data[this._name],!0)),FormModal.__super__.__closePopover.call(this)},FormModal.prototype.hasChanges=function(){return this._hasChanges?this._hasChanges(this,this.getData()):this.__orig_set_data?JSON.stringify(this.__orig_data)!==JSON.stringify(this.__orig_set_data[this._name]):null},FormModal.prototype.getPopoverOpts=function(){var n,b,A;return(b=L.util.copyObject(this._modal,!0)).cancel&&(this.__orig_set_data||this._hasChanges)&&(n=b.onCancel,b.onCancel=(A=this,function(b,R){var D;return D=new L.Deferred,L.decide("function"==typeof n?n(b,R,A.hasChanges()):void 0).done(D.resolve).fail(D.reject),D.done((function(){return A.revertData()})),D.promise()})),delete b.apply_button,L.util.isEmpty(b.class)&&(b.class=""),b.element=null,b.pane||(b.pane={}),L.util.assert(L.util.isPlainObject(b.pane),"new CUI.FormModal","opts.pane must be PlainObject",{opts:b}),b.class+=" cui-form-modal-modal",b},FormModal.prototype.disable=function(){var n;return FormModal.__super__.disable.call(this),null!=(n=this.__button)?n.disable():void 0},FormModal.prototype.enable=function(){var n;return FormModal.__super__.enable.call(this),null!=(n=this.__button)?n.enable():void 0},FormModal.prototype.destroy=function(){var n;return FormModal.__super__.destroy.call(this),null!=(n=this.__popover)?n.destroy():void 0},FormModal}(L.FormPopover)},9064:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.FormPopover=function(n){function FormPopover(n){FormPopover.__super__.constructor.call(this,n),this.__old_display=null,this.__old_render=null}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormPopover,n),FormPopover.prototype.initOpts=function(){return FormPopover.__super__.initOpts.call(this),this.addOpts({popover:{default:{},check:"PlainObject"},button:{default:{},check:function(n){return L.util.isPlainObject(n)&&!n.onClick}},trigger_data_changed_while_open:{default:!1,check:Boolean},renderDisplayButton:{check:Function},renderDisplayContent:{check:Function},onClose:{check:Function}})},FormPopover.prototype.readOpts=function(){if(FormPopover.__super__.readOpts.call(this),this._class&&(this.__class=this._class,delete this._class),this.__fields_is_func=L.util.isFunction(this._fields),this.__fields_is_func)return L.util.assert(!0!==this._data_not_for_others,"new CUI.FormPopover","opts.data_not_for_others cannot be set to true if fields are created on open by a Function.",{opts:this.opts})},FormPopover.prototype.init=function(){return this.__fields_is_func?this.__initUndo():FormPopover.__super__.init.call(this)},FormPopover.prototype.setDataOnOthers=function(){return!this.__fields_is_func&&FormPopover.__super__.setDataOnOthers.call(this)},FormPopover.prototype.isChanged=function(){return!!this.__fields&&FormPopover.__super__.isChanged.call(this)},FormPopover.prototype.getFields=function(n){return null==n&&(n=""),"render"===n||"displayValue"===n?[]:"show"===n||"hide"===n||"remove"===n||"enable"===n||"disable"===n||"getFieldsByName"===n||"hasUserData"===n||"getFieldByIdx"===n||"setFormDepth"===n||"getDataFields"===n?this.__fields||[]:(L.util.assert(this.__fields,"FormPopover.getFields("+n+")","Fields not rendered yet. This is a programming error in CUI."),FormPopover.__super__.getFields.call(this))},FormPopover.prototype.initTemplate=function(){return this.__horLayout=new L.VerticalLayout({maximize:!1,bottom:{}}),this.registerTemplate(this.__horLayout.getLayout())},FormPopover.prototype.hasContentForAppend=function(){return!0},FormPopover.prototype.render=function(){var n,b;return(n=L.util.copyObject(this._button,!0)).onClick=(b=this,function(){return b.__openPopover()}),L.mergeMap(n,{left:!0,text:""}),this.__button=new L.defaults.class.Button(n),this.addClass("cui-data-field-input"),this._renderDisplayButton&&this.addClass("cui-form-popover-has-button-text"),this.append(this.__button,"center"),L.DataField.prototype.render.call(this),this},FormPopover.prototype.getButton=function(){return this.__button},FormPopover.prototype.displayValue=function(){return L.DataField.prototype.displayValue.call(this),this.__renderDisplay()},FormPopover.prototype.callOnFields=function(){var n,b,A,L,R,B;for(A=arguments[0],n=2<=arguments.length?D.call(arguments,1):[],L=0,R=(B=this.getFields()).length;L{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?"horizontal-layout-left-center":D.call(n,"right")>=0?"horizontal-layout-center-right":"horizontal-layout-center"},HorizontalLayout.prototype.getMapPrefix=function(){return"cui-horizontal-layout"},HorizontalLayout.prototype.hasFlexHandles=function(){var n,b;return!(!(null!=(n=this._left)?n.flexHandle:void 0)&&!(null!=(b=this._right)?b.flexHandle:void 0))},HorizontalLayout.prototype.getPanes=function(){var n;return this.hasFlexHandles()?["left","right"]:(n=[],this._left&&n.push("left"),this._right&&n.push("right"),n)},HorizontalLayout.prototype.getSupportedPanes=function(){return["left","right"]},HorizontalLayout}(L.Layout)},8986:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.HorizontalList=function(n){function HorizontalList(){return HorizontalList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(HorizontalList,n),HorizontalList.prototype.initOpts=function(){return HorizontalList.__super__.initOpts.call(this),this.mergeOpt("maximize",{default:!1}),this.removeOpt("center"),this.addOpts({content:{}})},HorizontalList.prototype.readOpts=function(){return HorizontalList.__super__.readOpts.call(this),this._center={content:this._content}},HorizontalList.prototype.getSupportedPanes=function(){return[]},HorizontalList}(L.HorizontalLayout)},9691:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(7516),A(6144),A(4239),A(5813),A(127),R.CodeInput=function(n){function CodeInput(){return CodeInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CodeInput,n),CodeInput.availableModes=["html","javascript","json","css"],CodeInput.prototype.readOpts=function(){return CodeInput.__super__.readOpts.call(this),this._textarea=!0,this},CodeInput.prototype.initOpts=function(){return CodeInput.__super__.initOpts.call(this),this.addOpts({mode:{check:R.CodeInput.availableModes,default:"javascript"}})},CodeInput.prototype.render=function(){var n,b,A;if(CodeInput.__super__.render.call(this),this.__aceEditor=L.edit(this.__input,{useWorker:!1,selectionStyle:"text"}),this.__aceEditor.getSession().setMode("ace/mode/"+this._mode),b=null!=(n=this.__data)?n[this._name]:void 0){if(R.util.isString(b))try{b=JSON.parse(b)}catch(n){}"json"===this._mode&&(b=JSON.stringify(b,null,"\t")),this.__aceEditor.setValue(b,-1),this.__aceEditor.clearSelection()}return this.__aceEditor.on("change",(A=this,function(){return A.storeValue(A.__aceEditor.getValue())}))},CodeInput.prototype.destroy=function(){var n;return null!=(n=this.__aceEditor)&&n.destroy(),CodeInput.__super__.destroy.call(this)},CodeInput}(R.Input)},8533:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ColorInput=function(n){function ColorInput(){return ColorInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ColorInput,n),ColorInput.prototype.initOpts=function(){return ColorInput.__super__.initOpts.call(this)},ColorInput.prototype.readOpts=function(){var n;return this.opts.leftControlElement=new L.Button({tabindex:-1,onClick:(n=this,function(b,A){return n.__input.focus()})}),ColorInput.__super__.readOpts.call(this)},ColorInput.prototype.onDataChanged=function(n,b){return ColorInput.__super__.onDataChanged.call(this,n,b),this.__toggleColor()},ColorInput.prototype.initValue=function(){return ColorInput.__super__.initValue.call(this),this.__data[this._name]&&0!==this.__data[this._name].length?(this._leftControlElement.DOM.style.setProperty("--btn-background",this.__data[this._name]),this._leftControlElement.removeClass("is-empty")):this._leftControlElement.addClass("is-empty")},ColorInput.prototype.__toggleColor=function(){return this.__input.value.length>0&&this.__checkInputInternal()?(this._leftControlElement.DOM.style.setProperty("--btn-background",this.__input.value),this._leftControlElement.removeClass("is-empty")):(this._leftControlElement.DOM.style.removeProperty("--btn-background"),this._leftControlElement.addClass("is-empty"))},ColorInput}(L.Input)},9172:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(5023),R.EmailInput=function(n){function EmailInput(){return EmailInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(EmailInput,n),EmailInput.prototype.initOpts=function(){return EmailInput.__super__.initOpts.call(this),this.addOpts({simpleValidation:{default:!1,check:Boolean}}),this.removeOpt("checkInput")},EmailInput.prototype.readOpts=function(){return EmailInput.__super__.readOpts.call(this),this._checkInput=this.__checkInput},EmailInput.prototype.__checkInput=function(n){return this._simpleValidation?R.util.isEmpty(n)||R.EmailInput.regexp.exec(n):R.util.isEmpty(n)||!!L.parseOneAddress(n)},EmailInput.unicode_ranges="ㄱ-힝A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԣԱ-Ֆՙա-ևא-תװ-ײء-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺऄ-हऽॐक़-ॡॱ-ॲॻ-ॿঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘ-ౙౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹഽൠ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱽᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-Ɐⱱ-ⱽⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀䶵一鿃ꀀ-ꒌꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙟꙢ-ꙮꙿ-ꚗꜗ-ꜟꜢ-ꞈꞋ-ꞌꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",EmailInput.regexp=RegExp("^(?:["+EmailInput.unicode_ranges+"\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.["+EmailInput.unicode_ranges+"\\w!#$%&'*+/=?^_`{|}~-]+)*|\"(?:["+EmailInput.unicode_ranges+" \\w| \\"+EmailInput.unicode_ranges+'w.])*")@(?:['+EmailInput.unicode_ranges+"\\w.-]+\\.["+EmailInput.unicode_ranges+"\\w]{2,}|localhost)$","i"),EmailInput}(R.Input)},9619:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.IconInput=function(n){function IconInput(){return IconInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(IconInput,n),IconInput.prototype.initOpts=function(){return IconInput.__super__.initOpts.call(this)},IconInput.prototype.readOpts=function(){var n;return this.opts.leftControlElement=new L.Button({icon:"fa-font-awesome",tabindex:-1,onClick:(n=this,function(b,A){return n.__input.focus()})}),IconInput.__super__.readOpts.call(this)},IconInput.prototype.onDataChanged=function(n,b){return IconInput.__super__.onDataChanged.call(this,n,b),this.__toggleIcon()},IconInput.prototype.initValue=function(){return IconInput.__super__.initValue.call(this),this.__data[this._name]&&0!==this.__data[this._name].length?(this._leftControlElement.setIcon(this.__data[this._name]),this._leftControlElement.removeClass("is-empty")):this._leftControlElement.addClass("is-empty")},IconInput.prototype.__toggleIcon=function(){return this.__input.value.length>0?(this._leftControlElement.setIcon(this.__input.value),this._leftControlElement.removeClass("is-empty")):(this._leftControlElement.setIcon(""),this._leftControlElement.addClass("is-empty"))},IconInput}(L.Input)},7752:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Input=function(n){function Input(n){var b,A,R,D,B,E;for(Input.__super__.constructor.call(this,n),this.addClass("cui-input"),this._textarea&&this.addClass("cui-data-field--textarea"),this._overwrite?this.__getCursorBlocks=this.__overwriteBlocks:this.__getCursorBlocks=this._getCursorBlocks,this._content_size&&this.addClass("cui-input-content-size"),this.isRequired()&&this.addClass("cui-input-required"),this._checkInput&&(this.__checkInput=this._checkInput),this._prevent_invalid_input&&this.addClass("cui-input-has-prevent-invalid-input"),this.__checkInput&&this.addClass("cui-input-has-check-input"),this._appearance&&this.addClass("cui-input-appearance-"+this._appearance),this.__inputHints={},this.__inputHintTexts={},A=0,D=(B=["empty","invalid","valid"]).length;A=0}},onFocus:{check:Function},onClick:{check:Function},onKeyup:{check:Function},onSelectionchange:{check:Function},incNumbers:{default:!0,check:Boolean},onBlur:{check:Function},regexp:{check:String},regexp_flags:{default:"",check:String},getInputBlocks:{check:Function},getCursorBlocks:{check:function(n){return L.util.isFunction(n)&&!this._overwrite}},placeholder:{check:function(n){return L.util.isFunction(n)||L.util.isString(n)}},readonly:{check:Boolean},readonly_select_all:{default:!0,check:Boolean},textarea:{check:Boolean},textarea_cols:{check:function(n){return n>=1}},min_rows:{check:function(n){return n>=2},default:2},rows:{check:function(n){return n>=1}},content_size:{default:!1,check:Boolean},prevent_invalid_input:{default:!1,check:Boolean},required:{default:!1,check:Boolean},appearance:{check:["code"]},controlElement:{check:function(n){return n instanceof L.DOMElement||L.util.isFunction(n)}},leftControlElement:{check:function(n){return n instanceof L.DOMElement}}})},Input.prototype.readOpts=function(){var n;return this.opts.readonly&&L.util.assert(!(this.opts.getCursorBlocks||this.opts.getInputBlocks||this.opts.checkInput),"new CUI.Input","opts.readonly conflicts with opts.getCursorBlocks, opts.getInputBlocks, opts.checkInput."),this.opts.textarea&&(L.util.assert("off"!==this.opts.autocomplete,"new CUI.Input","opts.textarea does not work with opts.autocomplete",{opts:this.opts}),L.util.assert(!this.opts.incNumbers,"new CUI.Input","opts.textarea does not work with opts.incNumbers",{opts:this.opts})),Input.__super__.readOpts.call(this),this._readonly&&this._readonly_select_all&&(this._getCursorBlocks=function(n){return[new L.InputBlock({start:0,string:n})]}),this._regexp?(this.__regexp=new RegExp(this._regexp,this._regexp_flags),this.__checkInput=(n=this,function(b){return!n._required&&0===b.trim().length||!!n.__checkInputRegexp(b)&&(!n._checkInput||n._checkInput(b))})):this._required&&(this.__checkInput=function(n){return function(b){return 0!==b.trim().length&&(!n._checkInput||n._checkInput(b))}}(this)),!1===this._spellcheck?this.__spellcheck="false":this.__spellcheck="default",this.__autocomplete=this._autocomplete,this},Input.prototype.__checkInputRegexp=function(n){return!!this.__regexp.exec(n)},Input.prototype.setSpellcheck=function(n){return n?L.dom.setAttribute(this.__input,"spellcheck","default"):L.dom.setAttribute(this.__input,"spellcheck","false")},Input.prototype.setPlaceholder=function(n){return L.dom.setAttribute(this.__input,"placeholder",n)},Input.prototype.getPlaceholder=function(){if(this._placeholder)return L.util.isFunction(this._placeholder)?this._placeholder(this,this.getData()):this._placeholder},Input.prototype.__createElement=function(n){var b,A,R,D,B;return null==n&&(n="text"),!0===this._textarea?(D={placeholder:this.getPlaceholder(),tabindex:"0",maxLength:this._maxLength,id:this._id||"cui-input-"+this.getUniqueId(),spellcheck:this.__spellcheck,rows:this._min_rows,dir:"auto"},this._textarea_cols&&(D.cols=this._textarea_cols),this.__input=L.dom.$element("textarea","cui-textarea",D),this.__input.style.setProperty("--textarea-min-rows",this._min_rows),B=this,R=function(){var n;return B.__input.rows=B._min_rows,n=Math.ceil((B.__input.scrollHeight-B.__baseScrollHeight)/B.__lineHeight),B.__input.rows=B._min_rows+n},b=function(n){return function(){var b;return b=n.__input.value,n.__input.value="",n.__baseScrollHeight=n.__input.scrollHeight,n.__input.value=b,n.__lineHeight=parseInt(L.dom.getComputedStyle(n.__input).lineHeight,10)}}(this),L.Events.listen({node:this.__input,type:"input",call:R}),L.dom.waitForDOMInsert({node:this.__input}).done(function(n){return function(){if(!n.isDestroyed())return b(),R()}}(this))):this.__input=L.dom.$element("input","cui-input",{type:n,size:1,placeholder:this.getPlaceholder(),tabindex:"0",maxLength:this._maxLength,id:this._id||"cui-input-"+this.getUniqueId(),spellcheck:this.__spellcheck,autocomplete:this.__autocomplete,dir:"auto"}),L.Events.listen({node:this.__input,type:"dragstart",call:function(n){return n.preventDefault()}}),L.Events.listen({node:this.__input,type:"keydown",call:function(n){return function(b){var A,L,R,D;if(!(b.ctrlKey()&&90===!b.keyCode()||b.metaKey())){if(n.lastKeyDownEvent=b,!n._incNumbers||n._textarea||n._readonly||n.incNumberBounds(b),37===(A=b.keyCode())||39===A||36===A||35===A)return n.moveCursor(b),void n.showCursor(b);9!==(L=b.keyCode())&&16!==L&&17!==L&&18!==L&&27!==L&&33!==L&&34!==L&&35!==L&&36!==L&&38!==L&&40!==L&&(!b.ctrlKey()&&!b.metaKey()||65!==(R=b.keyCode())&&67!==R&&86!==R&&88!==R)&&(n._textarea||13!==b.keyCode())&&(8===b.keyCode()&&0===(D=n.__input.selectionStart)&&D===n.__input.selectionEnd||n.__focusShadowInput())}}}(this)}),L.Events.listen({type:"keyup",node:this.__input,call:function(n){return function(b){var A;if(37===(A=b.keyCode())||39===A||36===A||35===A)return b.preventDefault(),void(n.cursor||n.showCursor(b));n.initCursor(b),n.showCursor(b),n._onKeyup&&n._onKeyup(n,b)}}(this)}),L.Events.listen({type:"focus",node:this.__input,call:function(n){return function(b){var A;n.hasShadowFocus()||(n.enterInput(),n.addClass("cui-has-focus"),n.__initShadowInput(),"function"==typeof n._onFocus&&n._onFocus(n,b),null!=(A=n.__invalidTooltip)&&A.show(),n.__setCursor(b))}}(this)}),A=null,L.Events.listen({type:"mousedown",node:this.__input,call:function(n){return function(b){var R,D;return A=[n.__input.offsetWidth,n.__input.offsetHeight],D=function(){if(A[0]!==n.__input.offsetWidth||A[1]!==n.__input.offsetHeight)return L.Events.trigger({type:"content-resize",node:n.__input})},R=L.Events.listen({type:"mousemove",call:function(){D()}}),L.Events.listen({type:"mouseup",only_once:!0,capture:!0,call:function(n){L.Events.ignore(R)}})}}(this)}),L.Events.listen({type:"mouseup",node:this.__input,call:function(n){return function(b){n.__setCursor(b)}}(this)}),L.Events.listen({type:"blur",node:this.__input,call:function(n){return function(b){n.hasShadowFocus()||(n.removeClass("cui-has-focus"),n.leaveInput(),n.__removeShadowInput(),"function"==typeof n._onBlur&&n._onBlur(n,b))}}(this)}),L.Events.listen({type:"input",node:this.__input,call:function(n){return function(b,A){b.isDefaultPrevented()||(n.checkInput(),n.moveCursor(b),n.showCursor(b),n.getValueForStore(n.__input.value)!==n.getValue()&&n.storeValue(n.__input.value))}}(this)}),L.Events.listen({type:"paste",node:this.__input,call:function(n){return function(b){return n.__focusShadowInput()}}(this)}),L.Events.listen({type:"click",node:this.__input,call:function(n){return function(b){b.stopPropagation(),"function"==typeof n._onClick&&n._onClick(n,b)}}(this)}),this._content_size&&L.dom.waitForDOMInsert({node:this.__input}).done(function(n){return function(){if(!n.isDestroyed())return n.setContentSize()}}(this)),this.__input},Input.prototype.__setCursor=function(n){return L.setTimeout((b=this,function(){var A,L,R,D,B;if(b.initCursor(n),null===b.cursor&&(B=b.__input.selectionStart)===b.__input.selectionEnd&&b.__input.selectionEnd!==b.__input.value.length&&(L=b.getInputBlocks()).length>0)for(R=0,D=L.length;R0?n.substr(B-1,1):null,R=B>1?n.substr(B-2,1):null,"-"!==A||(null!=R?R.match(/[0-9]/):void 0)||(E="-"+E,B-=1),b.push(new L.NumberInputBlock({start:B,string:E}));return b},Input.prototype.__overwriteBlocks=function(n){var b,A,R,D;for(b=[],A=R=0,D=n.length;0<=D?RD;A=0<=D?++R:--R)b.push(new L.InputBlock({start:A,string:n.substr(A,1)}));return b.push(new L.InputBlock({start:n.length,string:""})),b},Input.prototype.getMarkedBlock=function(){var n,b,A,L,R,D,B;if(!1===(b=this.getInputBlocks())||0===b.length)return null;for(B=this.__input.selectionStart,A=this.__input.selectionEnd,L=R=0,D=b.length;R1&&(L=-1===R?D.length-1:0),b=D[L]){for(nt=[rt[0]],E=ot=0,tt=D.length;otthis._rows||this.preventInvalidInput()&&b.length>0&&!1===this.checkInput(this.correctValueForInput(b))||(this._readonly||(this.__input.value=this.correctValueForInput(b),this.__input.setSelectionRange(this.__shadow.selectionStart,this.__shadow.selectionEnd)),this.initCursor(n))},Input.prototype.checkValue=function(n){if(!L.util.isString(n))throw new Error(this.__cls+".checkValue(value): Value needs to be String or null.");return this},Input.prototype.render=function(){var n,b,A,R,D;for(Input.__super__.render.call(this),this.replace(this.__createElement(),this.getTemplateKeyForRender()),this._controlElement&&(n=L.util.isFunction(this._controlElement)?this._controlElement(this):this._controlElement,L.dom.addClass(n,"cui-input-control-element"),this.append(n,this.getTemplateKeyForRender())),this._leftControlElement&&(L.dom.addClass(this._leftControlElement,"cui-input-control-element"),this.prepend(this._leftControlElement,this.getTemplateKeyForRender())),b=0,R=(D=["empty","invalid","valid"]).length;b0},Input.prototype.checkInput=function(n){var b;return b=this.__checkInputInternal(n),this.hasShadowFocus()||this.updateInputState(b),b},Input.prototype.__checkInputInternal=function(n){return null==n&&(n=this.__input.value),!this.__checkInput||this.__checkInput(n)},Input.prototype.setInputHint=function(n){var b;return null!=(b=this.__inputHints.input)?b.setText(n):void 0},Input.prototype.setInvalidHint=function(n){var b;return null!=(b=this.__inputHints.invalid)?b.setText(n):void 0},Input.prototype.setValidHint=function(n){var b;return null!=(b=this.__inputHints.valid)?b.setText(n):void 0},Input.prototype.displayValue=function(){var n;return Input.__super__.displayValue.call(this),(n=this.getValueForDisplay()||"")!==this.__input.value&&(this.__input.value=n),this.checkInput(),this},Input.prototype.getValueForDisplay=function(){return this._getValueForDisplay?this._getValueForDisplay(this,this.getValue()):this.getValue()},Input.prototype.getValueForInput=function(){return this._getValueForInput?this._getValueForInput(this,this.getValue()):this.getValue()},Input.prototype.correctValueForInput=function(n){return this._correctValueForInput?this._correctValueForInput(this,n):n},Input.prototype.getDefaultValue=function(){return""},Input.prototype.getValue=function(){var n;return this.hasData()?Input.__super__.getValue.call(this):null!=(n=this.__input)?n.value:void 0},Input.prototype.enable=function(){var n;return Input.__super__.enable.call(this),null!=(n=this.__input)?n.removeAttribute("disabled"):void 0},Input.prototype.disable=function(){var n;return Input.__super__.disable.call(this),null!=(n=this.__input)?n.setAttribute("disabled",!0):void 0},Input.prototype.focus=function(){var n;return null!=(n=this.__input)&&n.focus(),this},Input.prototype.getCursorBlocks=function(){var n;return n="function"==typeof this.__getCursorBlocks?this.__getCursorBlocks(this.__input.value):void 0,this.checkBlocks(n)},Input.prototype.findBlock=function(n,b,A){var L,R,D,B;for(R=0,D=n.length;R=L.start&&b<=L.end)return L;if("left"===A&&b>=L.start&&bL.start&&b<=L.end)return L;if("touch"===A&&b>=L.start&&b<=L.end)return L}return null},Input.prototype.initCursor=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st;if(!1!==(R=this.getCursorBlocks())){if(0===R.length)return console.warn("initCursor: 0 cursor blocks"),void(this.cursor=null);if(st=this.__input.selectionStart,E=this.__input.selectionEnd,K=this.__input.value.length,this.cursor={shift:null!=(tt=this.cursor)?tt.shift:void 0,start:null,end:null},"keyup"===n.getType()&&16===n.keyCode()&&(this.cursor.shift=null),"keydown"!==n.getType()||46!==(ot=n.keyCode())&&8!==ot||(this.cursor.shift=null),L.util.isUndef(this.cursor.shift)&&(this.cursor.shift=null),this.cursor.start=this.findBlock(R,st,"left"),this.cursor.end=this.findBlock(R,E,"right"),(null!=(nt=this.cursor.end)?nt.idx:void 0)<(null!=(it=this.cursor.start)?it.idx:void 0)&&(this.cursor.end=this.cursor.start),st===E&&!this.cursor.start&&!this.cursor.end){for(D=null,B=null,X=$=st;$>=0;X=$+=-1)if(b=this.findBlock(R,X,"left")){D=st-X;break}for(X=V=st,rt=K;VB?A:b)}Q=this.getRangeFromCursor(),this.cursor.start||this.cursor.end?this.cursor.start?this.cursor.end||(this.cursor.end=this.cursor.start):this.cursor.start=this.cursor.end:this.cursor.start=this.cursor.end=R[R.length-1],Q[0]===st&&Q[1]}else this.cursor=null},Input.prototype.showCursor=function(n){var b;return this.cursor&&(b=this.getRangeFromCursor(),this.__input.setSelectionRange(b[0],b[1])),this},Input.prototype.checkSelectionChange=function(){var n;return n=this.getSelection(),!this.__currentSelection||this.__currentSelection.start===n.start&&this.__currentSelection.end===n.end||this.handleSelectionChange(),this.__currentSelection=n,this},Input.prototype.getRangeFromCursor=function(){var n,b;return[null!=(n=this.cursor.start)?n.start:void 0,null!=(b=this.cursor.end)?b.end:void 0]},Input.prototype.moveCursor=function(n){var b,A,L,R,D,B,E,X;if(this.cursor)if(n.preventDefault(),!1!==(b=this.getCursorBlocks())&&0!==b.length){if(36===n.keyCode())return this.cursor.start=b[0],void(this.cursor.end=b[0]);if(35===n.keyCode())return this.cursor.start=b[b.length-1],void(this.cursor.end=b[b.length-1]);if(46!==(null!=(D=this.lastKeyDownEvent)?D.keyCode():void 0))if(8!==(null!=(B=this.lastKeyDownEvent)?B.keyCode():void 0)){if(R=37===n.keyCode(),E=39===n.keyCode()||"input"===n.getType(),X=this.cursor.start.idx,L=this.cursor.end.idx,!b[X]||!b[L])return console.warn("repositioning cursor, not executing cursor move"),void this.initCursor(n);if(46!==n.keyCode())return n.shiftKey()&&null===this.cursor.shift&&(this.cursor.shift=this.cursor.end.idx),null===this.cursor.shift?X===L?(R?X>0&&(this.cursor.start=b[X-1]):E&&X=L?X>0&&(this.cursor.start=b[X-1]):this.cursor.end=b[L-1]:E&&(A>X?this.cursor.start=b[X+1]:L{var L=A(7288),R={}.hasOwnProperty;L.InputBlock=function(n){function InputBlock(n){InputBlock.__super__.constructor.call(this,n),this.__start=this._start,this.setString(this._string)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(InputBlock,n),InputBlock.prototype.initOpts=function(){return InputBlock.__super__.initOpts.call(this),this.addOpts({start:{mandatory:!0,check:function(n){return L.util.isInteger(n)&&n>=0}},string:{mandatory:!0,check:function(n){return L.util.isString(n)}}})},InputBlock.prototype.setString=function(n){return L.util.assert(L.util.isString(n),L.util.getObjectClass(this)+".setString","Parameter needs to be String with a minimum length of 1.",{string:n}),this.__string=n,this.calcSizes(),this},InputBlock.prototype.getString=function(){return this._string},InputBlock.prototype.calcSizes=function(){var n,b,A,L;for(this.__len=this.__string.length,this.__end=this.__start+this.__len,n=0,A=(L=["len","end","start","string"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.NumberInput=function(n){function NumberInput(){return NumberInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NumberInput,n),NumberInput.prototype.initOpts=function(){return NumberInput.__super__.initOpts.call(this),this.addOpts({decimals:{default:0,check:"Integer"},symbol:{check:function(n){return L.util.isString(n)&&n.length>0}},symbol_before:{default:!1,check:Boolean},store_as_integer:{default:!1,check:Boolean},json_number:{default:!1,check:Boolean},decimalpoint:{mandatory:!0,default:".",check:function(n){return L.util.isString(n)&&n.length>0}},separator:{check:function(n){return L.util.isString(n)&&n.length>0}},min:{default:null,check:function(n){return L.util.isNumber(n)}},max:{default:null,check:function(n){return L.util.isNumber(n)}}}),this.removeOpt("checkInput"),this.removeOpt("getValueForDisplay"),this.removeOpt("getValueForInput"),this.removeOpt("correctValueForInput"),this.removeOpt("prevent_invalid_input")},NumberInput.prototype.readOpts=function(){return NumberInput.__super__.readOpts.call(this),this._json_number&&(this._decimals=13),this._prevent_invalid_input=!0,this._checkInput=this.__checkInput,this.setMin(this._min),this.setMax(this._max)},NumberInput.prototype.setMin=function(n){this.__min=n},NumberInput.prototype.setMax=function(n){this.__max=n},NumberInput.prototype.formatValueForDisplay=function(n,b){var A,R,D,B;if(null==n&&(n=this.getValue()),null==b&&(b=!1),L.util.assert("number"==typeof n||null===n,"NumberInput.formatValueForDisplay","value needs to be Number or null",{value:n,type:typeof n}),L.util.isEmpty(n))return"";if((D=(this._store_as_integer?(n/Math.pow(10,this._decimals)).toFixed(this._decimals):n+"").split(".")).length>1?(R=D[0],A=D[1]):(R=D[0],A=""),this._decimals>0&&!this._json_number)for(;A.length0&&A.length>0?R+this._decimalpoint+A:R:(B=this._decimals>0&&A.length>0?this.__addSeparator(R)+this._decimalpoint+A:this.__addSeparator(R),this.__addSymbol(B))},NumberInput.prototype.getValue=function(){var n;return n=NumberInput.__super__.getValue.call(this),this.hasData()?n:this.getValueForStore(n)},NumberInput.prototype.getValueForDisplay=function(){return this.formatValueForDisplay(this.getValue())},NumberInput.prototype.getValueForStore=function(n){var b;return L.util.isString(n)||(n+=""),b=parseFloat(n.replace(/,/,".")),this._json_number&&Infinity===b&&(b=Number.MAX_VALUE),this._json_number&&-Infinity===b&&(b=-Number.MAX_VALUE),isNaN(b)?null:this._store_as_integer?parseInt((b*Math.pow(10,this._decimals)).toFixed(0)):b},NumberInput.prototype.getDefaultValue=function(){return null},NumberInput.prototype.setValue=function(n,b){return null==b&&(b={}),this.checkValue(n),NumberInput.__super__.setValue.call(this,n,b)},NumberInput.prototype.checkValue=function(n){if(null===n)return!0;if((this._decimals>0||this._json_number)&&L.util.isFloat(n))return!0;if(L.util.isInteger(n))return!0;throw new Error(this.__cls+".setValue(value): Value needs to be Number or null.")},NumberInput.prototype.__addSymbol=function(n){return L.util.isEmpty(this._symbol)?n:this._symbol_before?this._symbol+" "+n:n+" "+this._symbol},NumberInput.prototype.__addSeparator=function(n){var b,A,R,D,B,E,X;if(L.util.isEmpty(this._separator))return n;for((R=n.startsWith("-"))&&(n=n.substr(1)),E=[],A=b=0,D=(X=n.split("").reverse()).length;b0&&E.push(this._separator),E.push(B);return R&&E.push("-"),E.reverse(),E.join("")},NumberInput.prototype.correctValueForInput=function(n){return n.replace(/[,\.]/g,this._decimalpoint)},NumberInput.prototype.getValueForInput=function(){return this.formatValueForDisplay(null,!0)},NumberInput.prototype.checkInput=function(n){return null===n||NumberInput.__super__.checkInput.call(this,n)},NumberInput.prototype.__checkInput=function(n){var b,A,R,D,B;if(""===(B=(B=this.hasShadowFocus()?n:n.replace(this._symbol,"")).trim()))return!0;if(this._separator&&(D=new RegExp(RegExp.escape(this._separator),"g"),B=B.replace(D,"")),-1===(A=B.lastIndexOf(this._decimalpoint)))b=B,R="";else{if(0===this._decimals)return!1;b=B.substring(0,A),R=B.substring(A+1)}if(R.length>this._decimals&&!this._json_number)return!1;if(b.length>0&&!b.match(/^((0|[1-9]+[0-9]*)|(-|-[1-9]|-[1-9][0-9]*))$/)&&!this._json_number)return!1;if(!L.util.isNull(this.__min)){if(this.__min>=0&&"-"===b)return!1;if(bthis.__max)&&(!(!R.match(/^([0-9]*)$/)&&!this._json_number)&&(!(R.length>this._decimals&&!this._json_number)&&(!this._json_number||!(B=B.replace(",",".")).match(/([eE][+\-]?|\.)$/)&&/^-?(0|[1-9]\d*)(\.\d+)?([eE][-+]?\d+)?$/.test(B))))},NumberInput.prototype.preventInvalidInput=function(){var n,b,A,L,R,D,B;if(this._json_number){if("-"===(B=null!=(n=this.__shadow)&&null!=(b=n.value)&&null!=(A=b.trim())?A.replace(/,/g,"."):void 0))return!1;if((null!=B&&null!=(L=B.split("."))?L.length:void 0)>2)return!0;if("."===B||"e"===(null!=B?B.toLowerCase():void 0))return!0;if(null!=B?B.match(/([eE][+\-]?|\.)$/):void 0)return!!/\.e|\.E/.test(B)||(null!=B&&null!=(R=B.match(/[eE]/gi))?R.length:void 0)>1}return!(this.__min&&this.__min>9&&(null!=(D=this.__shadow)?D.value:void 0)0&&A>0&&(B=R>A?/,/g:/\./g),!B&&b>0&&(","===(L=n[n.length-1-b])?B=/\./g:"."===L&&(B=/,/g)),B||0!==b||(null!=(D=n.match(/^\d{1,3}([\.,]\d{3})+/))?D[0]:void 0)===n&&(B=R>0?/\./g:/,/g),B&&(n=n.replace(B,"")),0===b?parseInt(n):(n=n.replace(/,/,"."),parseFloat(n))))},NumberInput}(L.Input)},8644:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.NumberInputBlock=function(n){function NumberInputBlock(){return NumberInputBlock.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NumberInputBlock,n),NumberInputBlock.prototype.incrementBlock=function(n,b){return this.__changeBlock(n,b,1)},NumberInputBlock.prototype.decrementBlock=function(n,b){return this.__changeBlock(n,b,-1)},NumberInputBlock.prototype.__changeBlock=function(n,b,A){var L;return L=(""+(parseInt(this.__string)+A)).split(""),n.setString(L.join(""))},NumberInputBlock}(L.InputBlock)},4744:function(n,b,A){var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1864)),L.ItemList=function(n){function ItemList(){return ItemList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ItemList,n),ItemList.prototype.init=function(){if(ItemList.__super__.init.call(this),this.addClass("cui-item-list"),this.__body=new L.Template({name:"item-list-body"}),this.append(this.__body,"center"),this._keyboardControl)return this.__initListeners()},ItemList.prototype.initOpts=function(){return ItemList.__super__.initOpts.call(this),this.addOpts({items:{mandatory:!0,check:function(n){return L.util.isFunction(n)||L.util.isArray(n)}},active_item_idx:{check:"Integer"},has_items:{default:!1,check:Boolean},allow_null:{check:Boolean},onClick:{check:Function},onActivate:{check:Function},onDeactivate:{check:Function},orientation:{default:"vertical",check:["horizontal","vertical"]},keyboardControl:{check:Boolean,default:!1}}),this},ItemList.prototype.readOpts=function(){return ItemList.__super__.readOpts.call(this),"horizontal"===this._orientation&&console.error("new CUI.ItemList, orientation == horizontal needs implementation!"),this},ItemList.prototype.setActiveIdx=function(n){this.__active_idx=n},ItemList.prototype.getActiveIdx=function(){return this.__active_idx},ItemList.prototype.getBody=function(){return this.__body},ItemList.prototype.getItemByValue=function(n){var b,A,R,D,B;for(R=0,D=(B=this.__body.DOM.children).length;R0)},ItemList.prototype.__getItems=function(n){return L.util.isFunction(this._items)?this._items(n,this)||[]:this._items},ItemList.prototype.getItems=function(n){var b;return b=this.__getItems(n),L.util.isPromise(b)?b:(new L.Deferred).resolve(b)},ItemList.prototype.__initActiveIdx=function(){var n,b,A,R,D,B;if(void 0===(n=this._active_item_idx))if(D=this.__getItems(),L.util.isPromise(D))n=-1;else{for(A=b=0,B=D.length;b{var L=A(7288),R={}.hasOwnProperty;L.EmptyLabel=function(n){function EmptyLabel(n){EmptyLabel.__super__.constructor.call(this,n),this.addClass("cui-empty-label")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(EmptyLabel,n),EmptyLabel.prototype.readOpts=function(){return EmptyLabel.__super__.readOpts.call(this)},EmptyLabel}(L.MultilineLabel)},4276:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.Template.loadTemplateText(A(3372)),R.Label=function(n){function Label(n){var b,A,L,D,B,E,X,$;if(Label.__super__.constructor.call(this,n),B=this._rotate_90?"label-rotate-90":this._icon||!R.__ng__?"label":"label-no-icon",this.__label=new R.Template({name:B,map_prefix:"cui-label",map:{icon:"label-no-icon"!==B||void 0,content:!0}}),this.registerTemplate(this.__label),this._icon&&!0!==this._icon&&this.setIcon(this._icon),R.util.isEmpty(this._text)?this.setContent(this._content):this.setText(this._text),this._tooltip&&(null==(E=R.util.copyObject(this._tooltip)).element&&(E.element=this.DOM),this.__tooltip=new R.Tooltip(E)),this._multiline&&this.addClass("cui-label-multiline"),this._centered&&this.addClass("cui-label-centered"),this._markdown&&this.addClass("cui-label-markdown"),this._manage_overflow&&this.addClass("cui-label-manage-overflow"),this._padded&&this.addClass("cui-label--padded"),this._size?this.addClass("cui-label-size-"+this._size):R.__ng__||this.addClass("cui-label-size-normal"),this._appearance&&this.addClass("cui-label-appearance-"+this._appearance),this._manage_overflow){for(L in b=!0===this._manage_overflow?R.util.copyObject(R.defaults.class.Label.defaults.manage_overflow,!0):this._manage_overflow,D={class:"cui-label-manage-overflow-button",appearance:"flat",switch:!0,hidden:!0,onActivate:($=this,function(){return $.__label.addClass("cui-label--show-overflow")}),onDeactivate:function(n){return function(){return n.__label.removeClass("cui-label--show-overflow")}}(this)})X=D[L],b.hasOwnProperty(L)&&"class"===L?b[L]+=" "+X:b[L]=X;this.__overflow_button=new R.defaults.class.Button(b),this.append(this.__overflow_button),A=function(n){return function(){return n.checkOverflowSize()}}(this),R.Events.listen({node:this.DOM,type:"viewport-resize",call:function(){return R.scheduleCallback({ms:500,call:A})}})}}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Label,n),Label.defaults={manage_overflow:{icon_inactive:"down",icon_active:"up",active_css_class:""}},Label.prototype.initOpts=function(){return Label.__super__.initOpts.call(this),this.addOpts({text:{check:function(n){return R.util.isString(n)||R.util.isNumber(n)}},text_node_func:{check:Function},content:{check:function(n){return R.util.isContent(n)||R.util.isString(n)}},icon:{check:function(n){return n instanceof R.Icon||R.util.isString(n)||!0===n}},size:{check:["mini","normal","big","bigger"]},appearance:{check:["title","secondary","muted","transparent-border"]},markdown:{mandatory:!0,default:!1,check:Boolean},markdown_opts:{check:"PlainObject"},tooltip:{check:"PlainObject"},group:{check:String},rotate_90:{default:!1,check:Boolean},centered:{default:!1,check:Boolean},multiline:{default:!1,check:Boolean},padded:{default:!1,check:Boolean},manage_overflow:{check:function(n){return R.util.isPlainObject(n)||!0===n||!1===n}}})},Label.prototype.readOpts=function(){var n,b,A;if(Label.__super__.readOpts.call(this),R.util.isNull(this._text)&&R.util.isNull(this._content)&&(this._text=""),this._markdown&&(R.util.assert(!this._content,"new "+this.__cls,"opts.markdown cannot be combined with opts.content, use opts.text instead.",{opts:this.opts}),L?this.__markdown=!0:(console.error("new CUI.Label: Could not find markdown renderer 'marked'. Disabling markedown option.",{opts:this.opts}),this.__markdown=!1)),this.__currentText=null,R.util.assert(R.util.xor(R.util.isNull(this._text),R.util.isNull(this._content)),"new CUI.Label","opts.text and opts.content cannot both be set.",{opts:this.opts}),this._markdown_opts)for(n in this.__markdown_opts=R.util.copyObject(R.defaults.marked_opts,!1),b=this._markdown_opts)A=b[n],this.__markdown_opts[n]=A;else this.__markdown_opts=R.defaults.marked_opts;return this._manage_overflow&&R.util.assert(this._multiline,"new CUI.Label","opts.multiline needs to be set for opts.manage_overflow",{opts:this.opts}),this},Label.prototype.setText=function(n,b){return this.__currentText=n,null==b&&(b=this.__markdown),R.util.isEmpty(this.__currentText)?this.empty("content"):b?(this.setContent(R.dom.htmlToNodes(L(this.__currentText,this.__markdown_opts))),this.addClass("cui-label-markdown")):this._text_node_func?(this.setContent(this._text_node_func(this.__currentText)),this.removeClass("cui-label-markdown")):(this.setContent(R.dom.text(this.__currentText)),this.removeClass("cui-label-markdown")),this},Label.prototype.setTextMaxChars=function(n){return R.dom.setAttribute(this.__label.map.content,"data-max-chars",n)},Label.prototype.getText=function(){return this.__currentText},Label.prototype.setContent=function(n){var b,A,L;(R.util.isString(n)?this.replace(R.dom.htmlToNodes(n),"content"):this.replace(n,"content"),"status"===(null!=(b=this._attr)?b.role:void 0)&&(A=R.dom.findElement(this.DOM,"span"))&&(R.dom.removeAttribute(this.DOM,"role"),R.dom.setAttribute(A,"role","status")),this._manage_overflow)&&(this.append(this.__overflow_button),R.dom.waitForDOMInsert({node:this.DOM}).done((L=this,function(){return L.checkOverflowSize()})))},Label.prototype.checkOverflowSize=function(){var n,b;if(this.__overflow_button)return this.__label.removeClass("cui-label--show-overflow"),this.__label.addClass("cui-label--measure-overflow"),this.__overflow_button.hide(),n=R.dom.getDimensions(this.__label.map.content),(b=R.dom.getCSSFloatValue(n.computedStyle.maxHeight))>0||(b=n.clientHeight),n.scrollHeight>b?(this.__overflow_button.show(),this.__label.addClass("cui-label--has-overflow-button"),this.__overflow_button.isActive()&&this.__label.addClass("cui-label--show-overflow")):(this.__label.addClass("cui-label--show-overflow"),this.__label.removeClass("cui-label--has-overflow-button")),this.__label.removeClass("cui-label--measure-overflow"),this},Label.prototype.getGroup=function(){return this._group},Label.prototype.setIcon=function(n){var b;return b=n instanceof R.Icon?n:R.util.isEmpty(n)?null:new R.Icon({icon:n}),this.replace(b,"icon"),this},Label.prototype.destroy=function(){var n;return null!=(n=this.__tooltip)&&n.destroy(),Label.__super__.destroy.call(this)},Label.parseLinks=function(n){var b,A,L,D,B,E,X,$,V,K,Q;for($=[],Q=[],A=function(){0!==Q.length&&($.push(R.dom.text(Q.join(""))),Q=[])},K=n.split(/(\n| )/).flatMap((function(n){return n.split(/(\[|\]|\(|\))/)})),B=D=0,E=K.length;DL&&(V=n.substring(L,B),$.push(R.dom.text(V))),null!=(X=A(E,B,n))?$.push(X):$.push(R.dom.text(E)),L=b.lastIndex;return L{var L=A(7288),R={}.hasOwnProperty;L.MultilineLabel=function(n){function MultilineLabel(n){MultilineLabel.__super__.constructor.call(this,n),this.addClass("cui-label")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultilineLabel,n),MultilineLabel.prototype.initOpts=function(){return MultilineLabel.__super__.initOpts.call(this),this.mergeOpt("multiline",{default:!0})},MultilineLabel}(L.Label)},7224:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0&&void 0===this._colResize)&&(this.__colResize=!0),this.__colResize&&L.util.assert(this.fixedRowsCount>0,"new CUI.ListView","Cannot enable col resize with no fixed rows.",{opts:this.opts}),this.__maxCols=[],b=A=0,B=(E=this.__cols).length;A=this.fixedColsCount,"new CUI.ListView","maximized columns can only be in the non-fixed side of the ListView.",{opts:this.opts}),this.__maxCols.push(b));for(this.__maximize_horizontal&&0===this.__maxCols.length&&(D=this.__cols.length-1)>=this.fixedColsCount&&(this.__maxCols.push(D),this.__cols[D]="maximize"),this.rowsCount=0,this.colsCount=this.__cols.length,this.listViewCounter=L.ListView.counter++,this.__manualColWidths=[],this.__colspanRows={},this.colsOrder=[],b=R=0,X=this.colsCount;0<=X?RX;b=0<=X?++R:--R)this.colsOrder.push(b);return this.rowsOrder=[],this.__maxRowIdx=-1,this.__resetCellDims(),this.__cells=[],this.__rows=[],this.__lvClass="cui-lv-"+this.listViewCounter,this.__deferredRows=[],this.__isInDOM=!1,this.__doLayoutBound=($=this,function(){return $.__doLayout()}),this._useCSSGridLayout&&(this.__useCSSGridLayout=!0,this.addClass("use-css-grid-layout"),L.dom.setStyle(this,{"--grid-column-count":this.__cols.length},"")),this.addClass("cui-list-view")},ListView.prototype.initOpts=function(){return ListView.__super__.initOpts.call(this),this.addOpts({colClasses:{check:"Array"},cols:{mandatory:!0,check:"Array"},fixedCols:{default:0,check:"Integer"},fixedRows:{default:0,check:"Integer"},rowMove:{default:!1,check:Boolean},rowMoveFixedRows:{default:0,check:"Integer"},rowMovePlaceholder:{default:!1,check:Boolean},colResize:{check:Boolean},useCSSGridLayout:{check:Boolean},selectableRows:{check:function(n){return!1===n||!0===n||"multiple"===n}},focusable:{check:Boolean,default:!1},onRowMove:{check:Function},onScroll:{check:Function},onColumnResize:{check:Function},header:{deprecated:!0},footer:{deprecated:!0},onSelect:{check:Function},onDeselect:{check:Function},ignoreKeyEvents:{check:Boolean,default:!1}})},ListView.prototype.readOpts=function(){return this.opts.header&&(this.opts.header_center=this.opts.header),this.opts.footer&&(this.opts.footer_left=this.opts.footer),ListView.__super__.readOpts.call(this),this.__selectableRows=this._selectableRows,this},ListView.prototype.destroy=function(){var n;return delete this.colsOrder,delete this.rowsOrder,delete this.__fillRowQ3,this.__isInDOM=null,L.scheduleCallbackCancel({call:this.__doLayoutBound}),null!=(n=this.listViewTemplate)&&n.destroy(),this.__layoutIsStopped=!1,ListView.__super__.destroy.call(this),this},ListView.prototype.getListViewClass=function(){return this.__lvClass},ListView.prototype.isKeyEventsEnabled=function(){return!this._ignoreKeyEvents},ListView.prototype.getGrid=function(){return this.grid},ListView.prototype.hasResizableColumns=function(){return this.__colResize},ListView.prototype.hasCSSGridLayout=function(){return this.__useCSSGridLayout},ListView.prototype.hasMovableRows=function(){return this._rowMove},ListView.prototype.isInactive=function(){return!!this.__inactive},ListView.prototype.setInactive=function(n,b){var A;return null==b&&(b="inactive"),this.__inactive=!!n,this.grid&&(this.__inactive?(L.dom.addClass(this.grid,b),this.__inactiveWaitBlock=new L.WaitBlock({element:this.grid,inactive:!0}).show()):(null!=(A=this.__inactiveWaitBlock)&&A.destroy(),this.__inactiveWaitBlock=null,L.dom.removeClass(this.grid,b))),this},ListView.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V,K;for(L.util.assert(!this.grid,"ListView.render","ListView already rendered",{opts:this.opts}),R=[],b=["cui-list-view-grid",this.__lvClass],1===this._fixedCols&&(this._rowMove||this._rowMovePlaceholder)&&b.push("cui-list-view-grid-fixed-col-has-only-row-move-handle"),this._rowMovePlaceholder&&b.push("cui-list-view-has-row-move-placeholder"),this._rowMove&&b.push("cui-list-view-has-row-move"),this.__maxCols.length>0&&b.push("cui-list-view-grid-has-maximized-columns"),this.fixedColsCount>0&&b.push("cui-list-view-grid-has-fixed-cols"),this.fixedRowsCount>0&&b.push("cui-list-view-grid-has-fixed-rows"),R.push('
'),R.push(""),K=this,n=function(n){var A,L,D,B;if(K.__isFocusable(),R.push('
'),2===n||3===n){for(R.push('
'),A=D=(L=K.__getColsFromAndTo(n)).from,B=L.to;D<=B;A=D+=1)b=K.__getColClass(A),R.push('
');R.push("
")}R.push("
")},this.fixedColsCount>0&&this.fixedRowsCount>0?(R.push('
'),n(0),n(1),R.push("
"),R.push('
'),n(2),n(3),R.push("
")):this.fixedColsCount>0?(R.push('
'),n(2),n(3),R.push("
")):this.fixedRowsCount>0?(R.push('
'),n(1),R.push("
"),R.push('
'),n(3),R.push("
")):n(3),R.push("
"),(E=this.center()).innerHTML=R.join(""),this.grid=E.firstChild,this.quadrant=[L.dom.matchSelector(E,".cui-list-view-grid-quadrant-0")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-1")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-2")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-3")[0]],this.styleElement=L.dom.matchSelector(E,"style")[0],this.__fillRowQ3=L.dom.matchSelector(this.grid,".cui-list-view-grid-fills-3")[0],this.__topQuadrants=L.dom.matchSelector(E,".cui-list-view-grid-inner-top")[0],0===this.fixedColsCount&&0===this.fixedRowsCount?this.__bottomQuadrants=this.quadrant[3]:this.__bottomQuadrants=L.dom.matchSelector(E,".cui-list-view-grid-inner-bottom")[0],this.__fillCells=[],A=D=0,X=this.colsCount-1;D<=X;A=D+=1)this.__fillCells.push(L.dom.matchSelector(E,".cui-list-view-grid-fill-col-"+A)[0]);return B=function(n){return function(){return n.__syncScrolling(),"function"==typeof n._onScroll&&n._onScroll(),n.quadrant[3].scrollTop>0?L.dom.addClass(n.grid,"is-scrolling-vertically"):L.dom.removeClass(n.grid,"is-scrolling-vertically"),n.quadrant[3].scrollLeft>0?L.dom.addClass(n.grid,"is-scrolling-horizontally"):L.dom.removeClass(n.grid,"is-scrolling-horizontally")}}(this),this.__useCSSGridLayout?L.Events.listen({node:this.grid,type:"scroll",call:function(n){return function(b){return n.grid.scrollTop>0?L.dom.addClass(n.grid,"is-scrolling-vertically"):L.dom.removeClass(n.grid,"is-scrolling-vertically"),n.grid.scrollLeft>0?L.dom.addClass(n.grid,"is-scrolling-horizontally"):L.dom.removeClass(n.grid,"is-scrolling-horizontally")}}(this)}):L.Events.listen({node:this.quadrant[3],type:"scroll",call:B}),this.__currentScroll={top:0,left:0},this.hasSelectableRows()&&($="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer",L.Events.listen({type:["click"],node:this.DOM,selector:$,call:function(n){return function(b){var A;(A=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(b.stopImmediatePropagation(),n.selectRow(b,A))}}(this)})),this.__isFocusable()&&(V="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer:focus",L.Events.listen({type:["keydown"],node:this.DOM,selector:V,call:function(n){return function(b){var A,R;"Return"!==(A=b.getKeyboard())&&"Space"!==A||(R=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(b.stopImmediatePropagation(),n.selectRow(b,R))}}(this)})),this.quadrant[2]&&L.Events.listen({type:"wheel",node:this.quadrant[2],call:function(n){return function(b){if(b.wheelDeltaY()>0){if(n.quadrant[3].scrollTop===n.quadrant[3].scrollHeight-n.quadrant[3].offsetHeight)return;n.quadrant[3].scrollTop+=100}else{if(!(b.wheelDeltaY()<0))return;if(0===n.quadrant[3].scrollTop)return;n.quadrant[3].scrollTop-=100}b.preventDefault(),B()}}(this)}),L.Events.listen({type:"viewport-resize",node:this.grid,call:function(n){return function(b,A){n.__hasLayout&&n.__doLayout({resetRows:!(!A.css_load&&!A.tab)})}}(this)}),L.Events.listen({type:"content-resize",node:this.DOM,call:function(n){return function(b,R){var D,B;n.__isInDOM&&(D=L.dom.closest(b.getNode(),".cui-lv-td"))&&(b.stopPropagation(),B=parseInt(D.getAttribute("row")),A=parseInt(D.getAttribute("col")),n.fixedColsCount>0&&L.dom.getAttribute(D.parentNode,"cui-lv-tr-unmeasured")||(n.__resetRowDim(B),n.__scheduleLayout()))}}(this)}),this.isInactive()&&this.setInactive(!0),this.appendDeferredRows(),L.dom.waitForDOMInsert({node:this.DOM}).done(function(n){return function(){return n.__isInDOM=!0,n.__doLayout()}}(this)),this.DOM},ListView.prototype.__getScrolling=function(){return{top:this.quadrant[3].scrollTop,left:this.quadrant[3].scrollLeft,height:this.quadrant[3].scrollHeight}},ListView.prototype.getScrollingContainer=function(){return this.quadrant[3]},ListView.prototype.__setScrolling=function(n){return this.quadrant[3].scrollTop=n.top,this.quadrant[3].scrollLeft=n.left},ListView.prototype.__syncScrolling=function(){return this.__currentScroll=this.__getScrolling(),this.fixedColsCount>0&&(this.quadrant[2].scrollTop=this.__currentScroll.top),this.fixedRowsCount>0&&(this.quadrant[1].scrollLeft=this.__currentScroll.left),this.__fillRowQ3&&(this.__fillRowQ3.style.width="",this.__fillRowQ3.style.width=this.__getValue(this.__fillRowQ3.scrollWidth)),this},ListView.prototype.__setMargins=function(){var n,b,A,L;return L=this.quadrant[3].offsetWidth-this.quadrant[3].clientWidth,n=this.quadrant[3].offsetHeight-this.quadrant[3].clientHeight,null!=(b=this.quadrant[1])&&(b.style.marginRight=this.__getValue(L)),null!=(A=this.quadrant[2])&&(A.style.marginBottom=this.__getValue(n)),this},ListView.prototype.getSelectedRows=function(){var n,b,A,L,R,D;for(D=[],n=0,b=(L=this.rowsOrder).length;n0)for(E=this.getSelectedRows().pop().getRowIdx(),B=b.getRowIdx();B!==E;)this.getListViewRow(B).select(n),B>E?B--:B++;else R(!1);else X();return D.promise()},ListView.prototype.getCellByTarget=function(n){var b,A;return(A=L.dom.closest(n,".cui-lv-td"))?((b={col_i:parseInt(A.getAttribute("col")),row_i:parseInt(A.getAttribute("row"))}).display_col_i=this.getDisplayColIdx(b.col_i),b.display_row_i=this.getDisplayRowIdx(b.row_i),b):null},ListView.prototype.getRowMoveTool=function(n){return null==n&&(n={}),new L.ListViewRowMove(n)},ListView.prototype.getListViewRow=function(n){return L.dom.data(this.getRow(n)[0],"listViewRow")},ListView.prototype.getDisplayColIdx=function(n){return this.colsOrder.indexOf(parseInt(n))},ListView.prototype.getDisplayRowIdx=function(n){return this.rowsOrder.indexOf(parseInt(n))},ListView.prototype.getColIdx=function(n){return L.util.assert(L.util.isArray(this.colsOrder),"ListView["+this.listViewCounter+"].getColIdx","colsOrder Array is missing",{this:this,display_col_i:n}),this.colsOrder[n]},ListView.prototype.getRowIdx=function(n){return this.rowsOrder[n]},ListView.prototype.moveInOrderArray=function(n,b,A,R){var D,B;return D=A.indexOf(n),B=A.indexOf(b),L.util.moveInArray(D,B,A,R),null},ListView.prototype.moveRow=function(n,b,A,R){var D,B,E,X,$,V,K,Q;for(null==A&&(A=!1),null==R&&(R=!0),L.util.assert(n>=this.fixedRowsCount&&b>=this.fixedRowsCount,"ListView.moveRow","from_i and to_i must not be in flexible area of the list view",{from_i:n,to_i:b,fixed_i:this.fixedRowsCount}),E=A?L.dom.insertAfter:L.dom.insertBefore,X=$=0,V=(K=this.getRow(n)).length;$-1,"ListView.insertRowAfter","ListView #"+this.listViewCounter+": Row "+n+" not found.",{row_i:n,row:b,rowsCount:this.rowsCount}),A=++this.__maxRowIdx,this.rowsCount++,this.rowsOrder.splice(R+1,0,A),this.__addRow(A,b,"after",n)},ListView.prototype.insertRowBefore=function(n,b){var A,R,D;return L.util.assert(!this.isDestroyed(),"ListView.insertRowBefore","ListView #"+this.listViewCounter+" is already destroyed."),0===(D=this.getDisplayRowIdx(n))?this.prependRow(b):(A=this.getRowIdx(D-1),R=++this.__maxRowIdx,this.rowsCount++,this.rowsOrder.splice(D,0,R),this.__addRow(R,b,"after",A))},ListView.prototype.removeAllRows=function(){var n,b,A,L;for(n=0,b=(A=this.rowsOrder.slice(0)).length;n=0,"ListView.removeRow","row_i must be >= 0",{row_i:n}),b=this.getDisplayRowIdx(n),L.util.assert(b>-1,"ListView.removeRow","display_row_id not found for row_i",{row_i:n}),this.rowsOrder.splice(b,1),this.rowsCount--,delete this.__colspanRows[n],A=0,R=(D=this.getRow(n)).length;A0?(K=!0,b(R,Ot),V.style.setProperty("width",Ot+"px"),V.style.setProperty("flex","0 0 auto")):(D.call(this.__maxCols,R)>=0&&(Q=!0),V.style.removeProperty("width"),V.style.removeProperty("flex"));for($=it=0,pt=(yt=this.__fillCells).length;it0)for(zt=0,lt=(Wt=[0,2]).length;zt "+St)).length;ft "+St)).length;mt "+St)).length;_t=1,"ListView.__addRows","anchor row "+xt+" for mode "+A+" not found.",{rows:this.__rows,row_i:xt,mode:D,mode_used:A})}for(qt=(xt=st=n)+b.length-1;st<=qt;xt=st+=1)for(this.__cells[xt]=[],this.__rows[xt]=[],pt=0,ut=(vt=this.__getQuadrants(xt)).length;pt0?'cui-lv-tr-unmeasured="'+this.listViewCounter+'"':"",it[yt].push('
'),Q=lt=nt.from,Wt=nt.to;lt<=Wt;Q=lt+=1)K=this.getColIdx(Q),(wt=this.__getColWidth(xt,K))[0],wt[1],V=this.__getColClass(K),it[yt].push('
');it[yt].push("
")}for(Ct=this,tt=function(n){var b,A,R,D,B,E,X,$,V,K;for($=0,E=(b=L.dom.matchSelector(n,".cui-lv-td")).length;$0&&(ot=this.quadrant[1].childNodes,this.fixedRowsCount0?[0,1]:[1],ft=0,Lt=ot.length-this.fixedRowsCount;ft=this.fixedRowsCount+this._rowMoveFixedRows?n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandle||n.prependColumn(new L.ListViewColumnRowMoveHandle):n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandlePlaceholder||n.prependColumn(new L.ListViewColumnRowMoveHandlePlaceholder):this._rowMovePlaceholder&&(n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandlePlaceholder||n.prependColumn(new L.ListViewColumnRowMoveHandlePlaceholder)),X=0,B=V=0,tt=(A=n.getColumns()).length;V1)for(R.setAttribute("colspan",E),this.__colspanRows[b]||(this.__colspanRows[b]={}),this.__colspanRows[b][B+X]=E,K=1,it=E;1<=it?Kit;1<=it?++K:--K)L.dom.remove(this.__cells[b][B+X+1]),delete this.__cells[b][B+X+1],X++;L.util.assert(A.length+X<=this.colsCount,"ListView.addRow","ListViewRow provided more columns ("+(A.length+X)+") than colsCount ("+this.colsCount+") is set to",{colsCount:this.colsCount,cols:A}),n.addedToListView(this.__rows[b])},ListView.prototype.__getColClass=function(n){var b,A,R;return A=null!=(R=this.__colClasses)?R[n]:void 0,b=[],L.util.isArray(A)?b.push.apply(b,A):L.util.isEmpty(A)||b.push(A),D.call(this.__maxCols,n)>=0&&b.push("cui-lv-td-max"),b.join(" ")},ListView.prototype.__resetRowDim=function(n){var b,A,R,D,B,E,X,$;if(delete this.__cellDims[n],this.fixedColsCount>0&&this.__rows[n])for(R=0,B=(E=this.__rows[n]).length;R=X;A=0<=X?++D:--D)b=this.getColIdx(A),this.__resetCellStyle(n,b);return this},ListView.prototype.__resetCellStyle=function(n,b){var A,R;return(A=null!=(R=this.__cells[n])?R[b]:void 0)&&L.dom.setStyleOne(A,"cssText",""),A},ListView.prototype.__resetColWidth=function(n){var b,A,L,R,D,B,E,X;for(L=0,D=(B=this.__cellDims).length;L=E;A=0<=E?++R:--R)X=this.getRowIdx(A),this.__resetCellStyle(X,n);return this.__fillCells[n].style.cssText="",this},ListView.prototype.__resetCellDims=function(n){return this.__cellDims=[],this.__colWidths=[]},ListView.prototype.__isMaximizedCol=function(n){return D.call(this.__maxCols,n)>=0&&!this.__manualColWidths.hasOwnProperty(n)},ListView.counter=0,ListView.prototype.__getColWidth=function(n,b){var A,L,R,D,B,E,X;if((R=null!=(E=this.__colspanRows[n])?E[b]:void 0)>1){for(L=0,B=!1,A=D=b,X=b+R-1;D<=X;A=D+=1)this.__isMaximizedCol(A)&&(B=!0),L+=this.__colWidths[A];return[L,B]}return[this.__colWidths[b],this.__isMaximizedCol(b)]},ListView}(L.SimplePane)},7474:(n,b,A)=>{var L=A(7288),bind=function(n,b){return function(){return n.apply(b,arguments)}},R={}.hasOwnProperty;L.ListViewColumn=function(n){function ListViewColumn(){return this.getColspan=bind(this.getColspan,this),this.setColspan=bind(this.setColspan,this),ListViewColumn.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumn,n),ListViewColumn.prototype.readOpts=function(){return ListViewColumn.__super__.readOpts.call(this),this.__cl=this._class||"",this.__attrs=this._attrs||null},ListViewColumn.prototype.initOpts=function(){return ListViewColumn.__super__.initOpts.call(this),this.addOpts({class:{default:"",check:String},attrs:{default:null,check:"PlainObject"},text:{check:String},colspan:{check:"Integer"},element:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},onSetElement:{check:Function}})},ListViewColumn.prototype.setRow=function(n){this.listViewRow=n},ListViewColumn.prototype.getRow=function(){return this.listViewRow},ListViewColumn.prototype.setColumnIdx=function(n){return this.col_i=n,this},ListViewColumn.prototype.getColumnIdx=function(){return this.col_i},ListViewColumn.prototype.render=function(){return L.util.isUndef(this._element)?L.util.isEmpty(this._text)?null:new L.Label({text:this._text}).DOM:this._element.DOM?this._element.DOM:this._element},ListViewColumn.prototype.getAttrs=function(){return this.__attrs||{}},ListViewColumn.prototype.setElement=function(n){return this.__element=n,this.addClass(this.getClass()),this.__attrs&&L.dom.setAttributeMap(this.__element,this.__attrs),"function"==typeof this._onSetElement&&this._onSetElement(this),this.__element},ListViewColumn.prototype.getElement=function(){return this.__element},ListViewColumn.prototype.getClass=function(){return this.__cl},ListViewColumn.prototype.addClass=function(n){return this.__element?this.__element instanceof HTMLElement&&L.dom.addClass(this.__element,n):this.__cl+=" "+n,this},ListViewColumn.prototype.removeClass=function(n){return this.__element instanceof HTMLElement&&L.dom.removeClass(this.__element,n),this},ListViewColumn.prototype.setColspan=function(n){return this._colspan=n},ListViewColumn.prototype.getColspan=function(){var n;return(n=L.util.isFunction(this._colspan)?parseInt(this._colspan()):parseInt(this._colspan))>1?n:1},ListViewColumn}(L.Element)},7227:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnEmpty=function(n){function ListViewColumnEmpty(){return ListViewColumnEmpty.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnEmpty,n),ListViewColumnEmpty.prototype.render=function(){},ListViewColumnEmpty}(L.ListViewColumn)},5339:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewHeaderColumn=function(n){function ListViewHeaderColumn(){return ListViewHeaderColumn.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewHeaderColumn,n),ListViewHeaderColumn.prototype.initOpts=function(){ListViewHeaderColumn.__super__.initOpts.call(this),this.removeOpt("text"),this.addOpts({spacer:{check:Boolean},rotate_90:{check:Boolean},resizable:{default:!0,check:Boolean},label:{check:function(n){return!!(L.util.isPlainObject(n)||n instanceof L.Label)}}})},ListViewHeaderColumn.prototype.readOpts=function(){return ListViewHeaderColumn.__super__.readOpts.call(this),this._label instanceof L.Label?this.__label=this._label:this._label?(this._label.rotate_90=this._rotate_90,this.__label=new L.defaults.class.Label(this._label)):void 0},ListViewHeaderColumn.prototype.setElement=function(n){var b,A;return this.__element=n,ListViewHeaderColumn.__super__.setElement.call(this,this.__element),this._rotate_90&&this.addClass("cui-lv-td-rotate-90"),this._resizable||this.addClass("cui-not-user-resizable"),this.addClass("cui-lv-th"),(b=this.getRow().getListView()).hasCSSGridLayout()&&this._colspan&&L.dom.setStyle(this.__element,{"--colspan":this._colspan},""),b.hasResizableColumns()?("fixed"===b.getColdef(this.getColumnIdx())||(A=L.dom.element("DIV",{class:"cui-lv-col-resize-handle"}),new L.ListViewColResize({element:A,row:this.getRow(),column:this}),L.dom.append(this.__element,A)),this.__element):this.__element},ListViewHeaderColumn.prototype.render=function(){var n;return n=this._spacer?[L.dom.div("cui-tree-node-spacer")]:[],this._element?n.push(this._element):this.__label&&n.push(this.__label),n},ListViewHeaderColumn}(L.ListViewColumn)},3307:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewHeaderRow=function(n){function ListViewHeaderRow(){return ListViewHeaderRow.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewHeaderRow,n),ListViewHeaderRow.prototype.isSelectable=function(){return!1},ListViewHeaderRow}(L.ListViewRow)},8452:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewRow=function(n){function ListViewRow(){return ListViewRow.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewRow,n),ListViewRow.prototype.initOpts=function(){return ListViewRow.__super__.initOpts.call(this),this.addOpts({columns:{check:Array},selectable:{check:Boolean},class:{check:String},ui:{check:String}})},ListViewRow.prototype.readOpts=function(){var n,b,A,L,R;if(ListViewRow.__super__.readOpts.call(this),this._columns)for(this.columns=this._columns,A=b=0,L=(R=this.columns).length;b{var L=A(7288),R={}.hasOwnProperty;L.ListViewTree=function(n){function ListViewTree(n){var b,A;this.__actionOnNode=(b=this.__actionOnNode,A=this,function(){return b.apply(A,arguments)}),ListViewTree.__super__.constructor.call(this,n),L.util.assert(this.root instanceof L.ListViewTreeNode,"new CUI.ListViewTree","opts.root must be instance of ListViewTreeNode",{opts:this.opts}),this.root.setTree(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewTree,n),ListViewTree.defaults={arrow_down:"fa-angle-down",arrow_right:"fa-angle-right"},ListViewTree.prototype.initOpts=function(){return ListViewTree.__super__.initOpts.call(this),this.addOpts({rowMoveWithinNodesOnly:{check:Boolean},children:{check:Array},selectable:{deprecated:!0,check:Boolean},no_hierarchy:{default:!1,check:Boolean},root:{check:function(n){return n instanceof L.ListViewRow}},onOpen:{check:Function},onClose:{check:Function},onBeforeSelect:{check:Function}})},ListViewTree.prototype.readOpts=function(){return ListViewTree.__super__.readOpts.call(this),void 0!==this._selectable&&(L.util.assert(void 0===this._selectableRows,"new CUI.ListViewTree","opts.selectable cannot be used with opts.selectableRows, use selectableRows only.",{opts:this.opts}),this.__selectableRows=this._selectable),this},ListViewTree.prototype.getRowMoveTool=function(n){return null==n&&(n={}),n.rowMoveWithinNodesOnly=this._rowMoveWithinNodesOnly,new L.ListViewTreeRowMove(n)},ListViewTree.prototype.initListView=function(){var n;return ListViewTree.__super__.initListView.call(this),this._root?this.root=this._root:(n={},this._children?n.children=this._children:this._getChildren?n.getChildren=this._getChildren:n.children=[],this.root=new L.ListViewTreeNode(n)),this},ListViewTree.prototype.isSelectable=function(){return!!this.__selectableRows},ListViewTree.prototype.isNoHierarchy=function(){return this._no_hierarchy},ListViewTree.prototype.triggerNodeDeselect=function(n,b){var A;return A={ev:n,node:b,listView:this},"function"==typeof this._onDeselect&&this._onDeselect(n,A),L.Events.trigger({node:this,type:"row_deselected"})},ListViewTree.prototype.triggerNodeSelect=function(n,b){var A;return A={ev:n,node:b,listView:this},"function"==typeof this._onSelect&&this._onSelect(n,A),L.Events.trigger({node:this,type:"row_selected"})},ListViewTree.prototype.render=function(){var n,b,A;return A=this,n=function(n){var b;(b=L.dom.data(L.dom.closest(n.getCurrentTarget(),".cui-lv-tree-node"),"listViewRow"))instanceof L.ListViewTreeNode&&!b.isLoading()&&!b.isLeaf()&&(n.stopImmediatePropagation(),n instanceof L.DragoverScrollEvent?n.getCount()%50==0&&A.toggleNode(n,b):A.toggleNode(n,b))},ListViewTree.__super__.render.call(this),L.Events.listen({node:this.DOM,selector:".cui-tree-node-handle",capture:!0,type:["click","dragover-scroll"],call:function(b){return n(b)}}),L.Events.listen({node:this.DOM,selector:".cui-lv-tree-node",type:["click"],call:function(b){return n(b)}}),this._no_hierarchy?L.dom.addClass(this.grid,"cui-list-view-tree-no-hierarchy"):L.dom.addClass(this.grid,"cui-list-view-tree-hierarchy"),this.__isFocusable()&&(b="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer:focus",L.Events.listen({type:["keydown"],node:this.DOM,selector:b,call:function(n){return function(b){var A,R;(R=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(A=function(b){var A;A=b.getRowIdx(),n.getRow(A)[0].focus()},"Right"!==b.getKeyboard()||R.isOpen()?"Left"===b.getKeyboard()&&R.isOpen()&&(b.preventDefault(),n.__runTrigger(b,"close",R).done((function(){return A(R)}))):(b.preventDefault(),n.__runTrigger(b,"open",R).done((function(){return A(R)}))))}}(this)})),this.DOM},ListViewTree.prototype.toggleNode=function(n,b){return b.isOpen()?this.__runTrigger(n,"close",b):this.__runTrigger(n,"open",b)},ListViewTree.prototype.__runTrigger=function(n,b,A){return n.ctrlKey()||n.metaKey()?this.__actionOnNode(n,b+"Recursively",A):this.__actionOnNode(n,b,A)},ListViewTree.prototype.__actionOnNode=function(n,b,A){var R,D,B,E;return R=null,B=L.setTimeout({ms:500,call:function(){return A.showSpinner(),B=null,R=!0}}),this.stopLayout(),(D=A[b]()).done((E=this,function(){switch(b){case"open":return"function"==typeof E._onOpen?E._onOpen(n,{node:A}):void 0;case"close":return"function"==typeof E._onClose?E._onClose(n,{node:A}):void 0}})),D.always(function(n){return function(){return B&&L.clearTimeout(B),R&&A.hideSpinner(),n.startLayout(),L.Events.trigger({type:"content-resize",node:n.DOM})}}(this)),D},ListViewTree.prototype.deselectRow=function(n,b,A){return"multiple"===this.__selectableRows||b===A?ListViewTree.__super__.deselectRow.call(this,n,b,A):L.resolvedPromise()},ListViewTree.prototype.getNodesForMove=function(n,b,A){var R,D,B;return R=this.getListViewRow(n),B=this.getListViewRow(b),L.util.assert(R,"ListViewTree.moveRow","from_i node not found",{from_i:n}),L.util.assert(B,"ListViewTree.moveRow","to_i node not found",{to_i:b}),(D=R.father!==B.father||B.is_open&&A?B.is_open&&A?B:B.father:null)===R.father&&(D=null),[R,B,D]},ListViewTree.prototype.moveRow=function(n,b,A){var R,D,B,E,X,$,V;return X=this.getNodesForMove(n,b,A),D=X[0],$=X[1],E=X[2],B=D.moveNodeBefore($,E,A),L.util.assert(L.util.isPromise(B),"ListViewTree.moveRow","moveNodeBefore needs to return a Promise",{promise:B}),R=new L.Deferred,B.done((V=this,function(){var B,X,K;return B=V.getDisplayRowIdx(n),X=V.getDisplayRowIdx(b),ListViewTree.__super__.moveRow.call(V,n,b,A,!1),D.father!==$.father||$.is_open&&A?(D.father.removeChild(D),$.is_open&&A?($.children.splice(0,0,D),D.setFather($)):(A?$.father.children.splice($.getChildIdx()+1,0,D):$.father.children.splice($.getChildIdx(),0,D),D.setFather($.father))):L.util.moveInArray(D.getChildIdx(),$.getChildIdx(),D.father.children,A),K=[D.reload()],E&&K.push(E.reload()),L.whenAll(K).done((function(){return"function"==typeof V._onRowMove&&V._onRowMove(B,X,A),L.Events.trigger({node:V.grid,type:"row_moved",info:{from_i:n,to_i:b,after:A}}),R.resolve()})).fail(R.reject)})).fail(R.reject),R.promise()},ListViewTree.prototype.getRootChildren=function(){return this.root.children},ListViewTree.prototype.getSelectedNode=function(n){return null==n&&(n="selectedNode"),this.root[n]},ListViewTree.prototype.prependNode=function(n){return this.addNode(n,!1)},ListViewTree.prototype.addNode=function(n,b){var A;return null==b&&(b=!0),L.util.assert(n instanceof L.ListViewTreeNode,L.util.getObjectClass(this)+".addNode","Node must be instance of ListViewTreeNode",{node:n}),A=this.root.addNode(n,b),L.Events.trigger({node:this,type:"row_added",info:{node:n}}),A},ListViewTree.prototype.openTreeNodeByRowDisplayIndex=function(n){var b,A;return A=this.getRowIdx(n),b=this.getRow(A),L.dom.data(b[0],"listViewRow").open()},ListViewTree}(L.ListView),L.Events.registerEvent({bubble:!0,type:["row_removed","row_added","row_moved","row_selected","row_deselected"]}),L.defaults.class.ListViewTree=L.ListViewTree},4669:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewTreeHeaderNode=function(n){function ListViewTreeHeaderNode(){return ListViewTreeHeaderNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewTreeHeaderNode,n),ListViewTreeHeaderNode.prototype.initOpts=function(){return ListViewTreeHeaderNode.__super__.initOpts.call(this),this.addOpts({headers:{check:function(n){return n.length>0}}})},ListViewTreeHeaderNode.prototype.render=function(){var n,b,A,R,D;for(this.__is_rendered=!0,A=b=0,R=(D=this._headers).length;b{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0}},getChildren:{check:Function}})},ListViewTreeNode.prototype.readOpts=function(){return ListViewTreeNode.__super__.readOpts.call(this),this.setColspan(this._colspan),this._children&&(this.children=this.opts.children,this.initChildren()),this._open?this.do_open=!0:this.do_open=!1,this.is_open=!1,this.html=this._html,this.__loadingDeferred=null},ListViewTreeNode.prototype.setColspan=function(n){this.colspan=n},ListViewTreeNode.prototype.getColspan=function(){return this.colspan},ListViewTreeNode.prototype.getChildren=null,ListViewTreeNode.prototype.hasChildren=null,ListViewTreeNode.prototype.isLeaf=function(){return!this.children&&(!this.opts.getChildren&&(!this.getChildren||!!(this.opts.leaf||this.hasChildren&&!this.hasChildren())))},ListViewTreeNode.prototype.getClass=function(){var n;return n=ListViewTreeNode.__super__.getClass.call(this),n+=" cui-lv-tree-node",this.isLeaf()||(n+=" cui-lv-tree-node--is-branch"),n},ListViewTreeNode.prototype.isSelectable=function(){return("function"==typeof this.getTree?this.getTree().isSelectable():void 0)&&this.__selectable&&!this.isRoot()},ListViewTreeNode.prototype.getFather=function(){return this.father},ListViewTreeNode.prototype.setFather=function(n){var b;return L.util.assert(null===n||n instanceof L.ListViewTreeNode,L.util.getObjectClass(this)+".setFather","father can only be null or instanceof CUI.ListViewTreeNode",{father:n}),L.util.assert(n!==this,L.util.getObjectClass(this)+".setFather","father cannot be self",{node:this,father:n}),n&&L.util.assert(D.call(n.getPath(!0),this)<0,L.util.getObjectClass(this)+".setFather","father cannot any of the node's children",{node:this,father:n}),!n&&this.selected&&(this.setSelectedNode(null),this.selected=!1),this.father&&!n?(b=this.getTree(),this.father=n,b&&this.setTree(b)):this.father=n,this},ListViewTreeNode.prototype.isRoot=function(){return!this.father},ListViewTreeNode.prototype.setTree=function(n){return this.tree=n,L.util.assert(this.isRoot(),L.util.getObjectClass(this)+".setTree","node must be root node to set tree",{tree:this.tree,opts:this.opts}),L.util.assert(this.tree instanceof L.ListViewTree,L.util.getObjectClass(this)+".setTree","tree must be instance of ListViewTree",{tree:this.tree,opts:this.opts})},ListViewTreeNode.prototype.getRoot=function(n){return null==n&&(n=0),L.util.assert(n<100,"ListViewTreeNode.getRoot","Recursion detected."),this.father?this.father.getRoot(n+1):this},ListViewTreeNode.prototype.dump=function(n,b){var A,L,R,D,B,E;for(null==n&&(n=[]),null==b&&(b=0),D=[],A=0,B=b;0<=B?AB;0<=B?++A:--A)D.push(" ");if(n.push(D.join("")+this.dumpString()),this.children)for(L=0,R=(E=this.children).length;L-1,L.util.getObjectClass(this)+".getChildIdx()","Node not found in fathers children Array",{node:this,father:this.father,"father.children":this.father.children}),n)},ListViewTreeNode.prototype.getNodeId=function(n){var b,A;return null==n&&(n=!0),A=this.getPath(n),function(){var n,L,R;for(R=[],n=0,L=A.length;n0&&R.removeDeferredRow(this):R.removeRow(this.getRowIdx())),this.__is_rendered=!1),this.is_open=!1,this},ListViewTreeNode.prototype.replaceSelf=function(){var n;return this.father?((n=this.getTree())&&(n.replaceRow(this.getRowIdx(),this.render()),this.selected&&n.rowAddClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)),L.resolvedPromise()):this.is_open?(this.removeFromDOM(!1),this.open()):L.resolvedPromise()},ListViewTreeNode.prototype.openRecursively=function(){return this.__actionRecursively("open")},ListViewTreeNode.prototype.closeRecursively=function(){return this.__actionRecursively("close")},ListViewTreeNode.prototype.__actionRecursively=function(n){var b,A,R;return b=new L.Deferred,this.isLeaf()?b.resolve().promise():("open"===n?(A=this.getLoading())||(A=this.open()):A=this.close(),A.done((R=this,function(){var A,D,B,E,X;for(E=[],D=0,B=(X=R.children||[]).length;Dthis.father.children.length-1?this.father.addNode(n):this.father.addNode(n,b)},ListViewTreeNode.prototype.setChildren=function(n){this.children=n,this.initChildren()},ListViewTreeNode.prototype.initChildren=function(){var n,b,A,R,D,B,E,X,$,V;for(A=R=0,B=($=this.children).length;R1&&(b=0===(A=this.getChildIdx())?1:Math.min(R.length-2,A-1)),null!==b&&(E=R[b])),this.isSelected()?this.deselect().fail(D.reject).done(B):B(),D.promise()},ListViewTreeNode.prototype.removeChild=function(n,b){return null==b&&(b=!1),L.util.removeFromArray(n,this.children),0!==this.children.length||this.isRoot()||(this.is_open=!1,b||(this.children=null)),this.update(),n.setFather(null)},ListViewTreeNode.prototype.deselect=function(n,b){return this.getTree().isSelectable()?this.check_deselect(n,b).done((A=this,function(){return A.setSelectedNode(),A.removeSelectedClass(),A.selected=!1,A.getTree().triggerNodeDeselect(n,A)})):L.resolvedPromise();var A},ListViewTreeNode.prototype.allowRowMove=function(){return!0},ListViewTreeNode.prototype.check_deselect=function(n,b){return L.resolvedPromise()},ListViewTreeNode.prototype.isSelected=function(){return!!this.selected},ListViewTreeNode.prototype.addSelectedClass=function(){return this.getTree().rowAddClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)},ListViewTreeNode.prototype.removeSelectedClass=function(){return this.getTree().rowRemoveClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)},ListViewTreeNode.prototype.setSelectedNode=function(n,b){return null==n&&(n=null),null==b&&(b=this.getSelectedNodeKey()),this.getRoot()[this.getSelectedNodeKey()]=n},ListViewTreeNode.prototype.getSelectedNode=function(n){var b;return null==n&&(n=this.getSelectedNodeKey()),(null!=(b=this.getRoot())?b[n]:void 0)||null},ListViewTreeNode.prototype.getSelectedNodeKey=function(){return"selectedNode"},ListViewTreeNode.prototype.select=function(n){var b,A,R,D,B;return b=new L.Deferred,n&&("function"==typeof this.getTree?this.getTree().isSelectable():void 0)&&"function"==typeof n.stopPropagation&&n.stopPropagation(),b.done((B=this,function(){return B.getTree().triggerNodeSelect(n,B)})),this.isSelectable()?this.isSelected()?b.resolve().promise():(A=function(n){return function(){var A;return"function"==typeof(A=n.getTree())._onBeforeSelect&&A._onBeforeSelect(n),n.setSelectedNode(n),n.openUpwards().done((function(){return n.addSelectedClass(),n.selected=!0,b.resolve()})).fail(b.reject)}}(this),(D=this.getSelectedNode())&&!0===(null!=(R=this.getTree())?R.__selectableRows:void 0)?D.check_deselect(n,this).done(function(n){return function(){return D.deselect(null,n).done((function(){return A()})).fail(b.reject)}}(this)).fail(b.reject):A(),b.promise()):b.reject().promise()},ListViewTreeNode.prototype.openUpwards=function(n){var b,A,R;return null==n&&(n=0),b=new L.Deferred,this.isRoot()?this.isLoading()?this.getLoading().done((R=this,function(){return b.resolve(R)})).fail(function(n){return function(){return b.reject(n)}}(this)):this.is_open?b.resolve(this):b.reject(this):((A=this.father.openUpwards(n+1)).done(function(A){return function(){return!A.is_open&&n>0?(A.isLoading()?A.getLoading():A.open()).done((function(){return b.resolve(A)})).fail((function(){return b.reject(A)})):b.resolve(A)}}(this)),A.fail(function(A){return function(){return A.do_open=!0,0===n?b.resolve(A):b.reject(A)}}(this))),b.promise()},ListViewTreeNode.prototype.level=function(){return this.isRoot()?0:this.father.level()+1},ListViewTreeNode.prototype.renderContent=function(){return L.util.isFunction(this.html)?this.html.call(this.opts,this):this.html?this.html:new L.EmptyLabel({text:""}).DOM},ListViewTreeNode.prototype.update=function(n){var b,A;return null==n&&(n=!1),n||this.__is_rendered&&!this.isRoot()?(A=this.getTree(),b=null!=A?A.stopLayout():void 0,this.replaceSelf().done((function(){if(b)return A.startLayout()}))):L.resolvedPromise()},ListViewTreeNode.prototype.reload=function(){return L.util.assert(!this.isLoading(),"ListViewTreeNode.reload","Cannot reload node, during opening...",{node:this,tree:this.getTree()}),this.isRoot()?this.replaceSelf():this.is_open?(this.close(),this.do_open=!0,this.open()):(this.opts.children&&(this.children=null),this.update())},ListViewTreeNode.prototype.showSpinner=function(){return this.__is_rendered&&(L.dom.empty(this.__handleDiv),L.dom.append(this.__handleDiv,new L.Icon({icon:"spinner"}).DOM)),this},ListViewTreeNode.prototype.hideSpinner=function(){return this.__is_rendered&&(L.dom.empty(this.__handleDiv),this.__handleIcon&&L.dom.append(this.__handleDiv,new L.Icon({icon:this.__handleIcon}).DOM)),this},ListViewTreeNode.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V;for(L.util.assert(!this.isRoot(),"ListViewTreeNode.render","Unable to render root node."),this.removeColumns(),D=L.dom.div("cui-tree-node level-"+this.level()),this.__is_rendered=!0,B=1,$=this.level();B<$;B+=1)L.dom.append(D,L.dom.div("cui-tree-node-spacer"));if(n=["cui-tree-node-handle"],this.is_open?(this.__handleIcon=L.defaults.class.ListViewTree.defaults.arrow_down,n.push("cui-tree-node-is-open")):this.isLeaf()?(this.__handleIcon=null,n.push("cui-tree-node-is-leaf")):(this.__handleIcon=L.defaults.class.ListViewTree.defaults.arrow_right,n.push("cui-tree-node-is-closed")),0===(null!=(V=this.children)?V.length:void 0)&&n.push("cui-tree-node-no-children"),this.__handleDiv=L.dom.div(n.join(" ")),this.__handleIcon&&L.dom.append(this.__handleDiv,new L.Icon({icon:this.__handleIcon}).DOM),L.dom.append(D,this.__handleDiv),this.prependColumn(new L.ListViewColumn({element:D,class:"cui-tree-node-column cui-tree-node-level-"+this.level(),colspan:this.getColspan()})),R=L.dom.div("cui-tree-node-content"),A=this.renderContent(),L.util.isArray(A))for(E=0,X=A.length;E{var L=A(7288),R={}.hasOwnProperty;L.ListViewColResize=function(n){function ListViewColResize(){return ListViewColResize.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColResize,n),ListViewColResize.prototype.initOpts=function(){return ListViewColResize.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow},column:{mandatory:!0,check:L.ListViewColumn}})},ListViewColResize.prototype.readOpts=function(){var n;ListViewColResize.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx(),this.__display_row_i=this._row.getDisplayRowIdx(),this.__listView=this._row.getListView(),this.__col_i=this._column.getColumnIdx(),L.Events.listen({type:"dblclick",node:this._element,instance:this,call:(n=this,function(b){return console.debug("list view",n.__listView,n.__col_i,n.__row_i),n.__listView.resetColWidth(n.__col_i)})})},ListViewColResize.prototype.get_axis=function(){return"x"},ListViewColResize.prototype.get_cursor=function(n){return"ew-resize"},ListViewColResize.prototype.get_helper=function(n,b,A){return this.get_marker("cui-lv-col-resize")},ListViewColResize.prototype.get_init_helper_pos=function(){var n;return n=this.__listView.getCellGridRect(this.__row_i,this.__col_i),this.__contentWidthAdjust=n.contentWidthAdjust,{left:n.left_abs,top:n.top_abs,width:n.width,height:this.__listView.getGrid().offsetHeight}},ListViewColResize.prototype.get_helper_pos=function(n,b,A){var R;return(R=ListViewColResize.__super__.get_helper_pos.call(this,n,b,A)).left=L.globalDrag.helperNodeStart.left,this.__new_width=L.globalDrag.helperNodeStart.width+A.x,R.width=this.__new_width,R},ListViewColResize.prototype.start_drag=function(n,b,A){return ListViewColResize.__super__.start_drag.call(this,n,b,A),this.__inital_width=this.__listView.getManualColWidth(this.__col_i),this},ListViewColResize.prototype.do_drag=function(n,b,A){if(ListViewColResize.__super__.do_drag.call(this,n,b,A),!L.browser.ie)return this.__setColWidth(this.__new_width)},ListViewColResize.prototype.stop_drag=function(n){return ListViewColResize.__super__.stop_drag.call(this,n),this.__inital_width?this.__listView.setColWidth(this.__col_i,this.__initial_width):this.__listView.resetColWidth(this.__col_i)},ListViewColResize.prototype.__setColWidth=function(n){return this.__listView.setColWidth(this.__col_i,n-this.__contentWidthAdjust)},ListViewColResize.prototype.end_drag=function(n){var b;return ListViewColResize.__super__.end_drag.call(this,n),"function"==typeof(b=this.__listView)._onColumnResize&&b._onColumnResize(this._column,this.__new_width),this.__setColWidth(this.__new_width)},ListViewColResize.prototype.destroy=function(){return L.Events.ignore({instance:this}),ListViewColResize.__super__.destroy.call(this)},ListViewColResize}(L.ListViewDraggable)},1993:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnRowMoveHandle=function(n){function ListViewColumnRowMoveHandle(){return ListViewColumnRowMoveHandle.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnRowMoveHandle,n),ListViewColumnRowMoveHandle.prototype.setElement=function(n){var b,A,R,D;ListViewColumnRowMoveHandle.__super__.setElement.call(this,n),(D=this.getRow()).isMovable()&&((A=D.getListView().getRowMoveTool({row:D,element:n}))&&(b=null!=(R=L.dom.children(A.element))?R[0]:void 0),L.ListView.defaults.row_move_handle_tooltip&&b&&new L.Tooltip({text:L.ListView.defaults.row_move_handle_tooltip,element:b}))},ListViewColumnRowMoveHandle.prototype.render=function(){var n,b,A;return A=null!=(n=this.getRow())&&null!=(b=n.getListView())?b._ui:void 0,L.dom.element("DIV",{class:"cui-drag-handle-row",ui:A?A+".drag.handle":void 0})},ListViewColumnRowMoveHandle}(L.ListViewColumn)},9914:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnRowMoveHandlePlaceholder=function(n){function ListViewColumnRowMoveHandlePlaceholder(){return ListViewColumnRowMoveHandlePlaceholder.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnRowMoveHandlePlaceholder,n),ListViewColumnRowMoveHandlePlaceholder}(L.ListViewColumnEmpty)},23:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewDraggable=function(n){function ListViewDraggable(){return ListViewDraggable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewDraggable,n),ListViewDraggable.prototype.initOpts=function(){return ListViewDraggable.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow}})},ListViewDraggable.prototype.readOpts=function(){return ListViewDraggable.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx()},ListViewDraggable.prototype.get_marker=function(n){return null==n&&(n=""),L.dom.element("DIV",{class:"cui-lv-draggable "+n})},ListViewDraggable}(L.Draggable)},3325:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewRowMove=function(n){function ListViewRowMove(){return ListViewRowMove.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewRowMove,n),ListViewRowMove.prototype.initOpts=function(){return ListViewRowMove.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow}})},ListViewRowMove.prototype.readOpts=function(){return ListViewRowMove.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx(),this.__display_row_i=this._row.getDisplayRowIdx(),this.__listView=this._row.getListView()},ListViewRowMove.prototype.get_helper=function(n,b,A){return this.get_marker("cui-lv-row-move")},ListViewRowMove.prototype.get_helper_contain_element=function(){return this.__listView.getBottom()},ListViewRowMove.prototype.get_axis=function(){return"y"},ListViewRowMove.prototype.get_init_helper_pos=function(n,b){var A;return{top:(A=this.__listView.getRowGridRect(this.__row_i)).top_abs,left:A.left_abs,width:A.width,height:A.height}},ListViewRowMove.prototype.init_helper=function(){return this.movableTargetDiv=this.get_marker("cui-lv-row-move-target"),L.dom.append(this.__listView.getGrid(),this.movableTargetDiv),ListViewRowMove.__super__.init_helper.call(this)},ListViewRowMove.prototype.do_drag=function(n,b,A){var L;ListViewRowMove.__super__.do_drag.call(this,n,b,A),(L=this.__listView.getCellByTarget(b))&&(L.clientX=n.clientX(),L.clientY=n.clientY(),L.display_row_i>=this.__listView.fixedRowsCount&&this.showHorizontalTargetMarker(L))},ListViewRowMove.prototype.cleanup_drag=function(n){return ListViewRowMove.__super__.cleanup_drag.call(this,n),L.dom.remove(this.movableTargetDiv),this.movableTargetDiv=null},ListViewRowMove.prototype.end_drag=function(n){var b,A;if(ListViewRowMove.__super__.end_drag.call(this,n),this.target)return b=this._row,A=this.__listView.getListViewRow(this.target.row_i),L.globalDrag.noClickKill=!0,b.moveRow?b.moveRow(this.__listView,A,this.target.after):this.__listView.moveRow(this.__row_i,this.target.row_i,this.target.after)},ListViewRowMove.prototype.showHorizontalTargetMarker=function(n){return this.showHorizontalTargetMarkerSetTarget(n),this.target.row_i===this.__row_i||this.target.before_row_i===this.__row_i&&!1===this.target.after||this.target.after_row_i===this.__row_i&&!1===this.target.before?(this.target=null,L.dom.hideElement(this.movableTargetDiv)):(L.dom.showElement(this.movableTargetDiv),L.dom.setStyle(this.movableTargetDiv,{left:this.target.left,top:this.target.top,width:this.target.width}))},ListViewRowMove.prototype.showHorizontalTargetMarkerSetTarget=function(n){var b;this.target={row_i:n.row_i},b=this.__listView.getRowGridRect(n.row_i),this.__display_row_i>0&&(this.target.before_row_i=this.__listView.getRowIdx(this.__display_row_i-1)),this.__display_row_i{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0||(L=this.target.row_i,D.call(this.blockedAfterRows,L)>=0&&this.target.after)||(R=this.target.row_i,D.call(this.blockedBeforeRows,R)>=0&&!this.target.after))&&(n=(B=this.__listView.getNodesForMove(this.__row_i,this.target.row_i,this.target.after))[0],E=B[1],b=B[2],(!this._rowMoveWithinNodesOnly||!b)&&!!n.allowRowMove(E,b,this.target.after))},ListViewTreeRowMove}(L.ListViewRowMove)},309:function(n,b,A){var L,R=A(7288),D={}.hasOwnProperty;L=A(748),R.GoogleMap=function(n){function GoogleMap(n){R.util.assert(R.GoogleMap.defaults.google_api.key,"It's necessary to add a google maps api key in order to use CUI.GoogleMap"),GoogleMap.__super__.constructor.call(this,n),this.__listeners=[]}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(GoogleMap,n),GoogleMap.defaults={google_api:{key:null,language:"en"}},GoogleMap.prototype.__getMapClassName=function(){return"cui-google-map"},GoogleMap.prototype.__buildMap=function(){var n,b;return n=new google.maps.Map(this.get("center"),{zoomControl:!1}),R.dom.waitForDOMInsert({node:this}).done((b=this,function(){return google.maps.event.trigger(n,"resize"),b._zoomToFitAllMarkersOnInit?b.zoomToFitAllMarkers():(n.setCenter(b._centerPosition),n.setZoom(b._zoom)),b.__onReady()})),n},GoogleMap.prototype.__bindOnClickMapEvent=function(){return this.__listeners.push(this.__map.addListener("click",(n=this,function(b){return n.__map.setCenter(b.latLng),n.setSelectedMarkerPosition(b.latLng)})));var n},GoogleMap.prototype.__buildMarker=function(n){return new google.maps.Marker(n)},GoogleMap.prototype.__addMarkerToMap=function(n){if(n.setMap(this.__map),n.infoWindow)return this.__listeners.push(n.addListener("click",(b=this,function(){return n.infoWindow.open(b.__map,n)})));var b},GoogleMap.prototype.__removeMarker=function(n){return n.setMap(null)},GoogleMap.prototype.getSelectedMarkerPosition=function(){var n,b;if(n=null!=(b=this.__selectedMarker)?b.getPosition():void 0)return{lat:n.lat(),lng:n.lng()}},GoogleMap.prototype.setSelectedMarkerPosition=function(n){var b,A;return this.__selectedMarker?this.__selectedMarker.setPosition(n):((b=this._selectedMarkerOptions||{}).position=n,b.draggable=this._clickable,this.__selectedMarker=this.addMarker(b),this.__listeners.push(this.__selectedMarker.addListener("dragend",(A=this,function(n){return A.__map.setCenter(n.latLng),"function"==typeof A._onMarkerSelected?A._onMarkerSelected(A.getSelectedMarkerPosition()):void 0})))),"function"==typeof this._onMarkerSelected?this._onMarkerSelected(this.getSelectedMarkerPosition()):void 0},GoogleMap.prototype.removeSelectedMarker=function(){if(this.__selectedMarker)return this.__removeMarker(this.__selectedMarker),delete this.__selectedMarker},GoogleMap.prototype.hideMarkers=function(){var n,b,A;for(n=0,b=(A=this.__markers).length;n0){for(n.__bounds=new google.maps.LatLngBounds,b=0,A=(R=n.__markers).length;b{var L=A(7288),R={}.hasOwnProperty;L.IconMarker=function(n){function IconMarker(n){var b;IconMarker.__super__.constructor.call(this,n),b=new L.Template({name:"map-div-marker",map:{icon:!0,arrow:!0}}),this.registerTemplate(b),this.render()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(IconMarker,n),IconMarker.prototype.initOpts=function(){return IconMarker.__super__.initOpts.call(this),this.addOpts({icon:{check:String},color:{check:String},size:{check:"Integer",default:28},arrowSize:{check:"Integer",default:5},onClick:{check:Function},tooltip:{check:"PlainObject"}})},IconMarker.prototype.render=function(){var n,b,A;return b={width:this._size,height:this._size,background:this._color},n=this._onClick?new L.Button({icon:this._icon,tooltip:this._tooltip,onClick:this._onClick,appearance:"flat"}):new L.Icon({icon:this._icon}),this.append(n,"icon"),L.dom.setStyle(this.DOM,b),A={width:2*this._arrowSize,height:2*this._arrowSize,"margin-left":-this._arrowSize},L.dom.setStyle(this.get("arrow"),A)},IconMarker.prototype.toHtml=function(){return this.DOM.outerHTML},IconMarker.prototype.getAnchor=function(){return{top:this._size+this._arrowSize,left:this._size/2}},IconMarker.prototype.getSize=function(){return this._size},IconMarker}(L.DOMElement)},8595:(n,b,A)=>{var R,D=A(7288),B={}.hasOwnProperty;R=A(4484),A(4906),A(2989),D.LeafletMap=function(n){function LeafletMap(n){LeafletMap.__super__.constructor.call(this,n),D.LeafletMap.loadCSSPromise||(D.LeafletMap.loadCSSPromise=this.__loadCSS()),D.LeafletMap.defaults.tileLayerOptions.maxZoom=D.Map.defaults.maxZoom,this.__groups={}}return function(n,b){for(var A in b)B.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(LeafletMap,n),LeafletMap.defaults={tileLayerUrl:"https://{s}.tile.osm.org/{z}/{x}/{y}.png",tileLayerOptions:{attribution:R}},LeafletMap.prototype.__getMapClassName=function(){return"cui-leaflet-map"},LeafletMap.prototype.__buildMap=function(){var n,b,A;return n=L.map(this.get("center"),{zoomControl:!1}),b=L.tileLayer(D.LeafletMap.defaults.tileLayerUrl,D.LeafletMap.defaults.tileLayerOptions),D.dom.waitForDOMInsert({node:this}).done((A=this,function(){return D.LeafletMap.loadCSSPromise.done((function(){return A._zoomToFitAllMarkersOnInit?A.zoomToFitAllMarkers():n.setView(A._centerPosition,A._zoom),b.addTo(n),A.__onReady()}))})),this._onClick&&n.on("click",this._onClick),this._onZoomEnd&&n.on("zoomend",this._onZoomEnd),n.on("moveend",function(n){return function(){return n.__onMoveEnd(arguments)}}(this)),n},LeafletMap.prototype.__buildMarker=function(n){var b,A,R,B,E;return n.iconName&&n.iconColor&&(R=(A=new D.IconMarker({icon:n.iconName,color:n.iconColor})).getSize(),b=A.getAnchor(),n.icon=L.divIcon({html:A.toHtml(),iconAnchor:[b.left,b.top],iconSize:[R,R]}),delete n.iconName,delete n.iconColor),B=L.marker(n.position,n),(null!=(E=n.group)?E.type:void 0)&&this._showPolylines&&(this.__groups[n.group.type]=this.__groups[n.group.type]||[],this.__groups[n.group.type].push({marker:B,options:n.group.options}),delete n.group),B},LeafletMap.prototype.__addMarkerToMap=function(n){return n.addTo(this.__map),this.__updateGroupsPolylines()},LeafletMap.prototype.__bindOnClickMapEvent=function(){return this.__map.on("click",(n=this,function(b){if(n.setSelectedMarkerPosition(b.latlng),n.__selectedMarker)return n.__map.setView(n.getSelectedMarkerPosition())}));var n},LeafletMap.prototype.__afterMarkerCreated=function(n,b){var A,L,R;L=b.cui_onClick,R=b.cui_onDoubleClick,L&&R&&(A=!1,L=function(n){return D.setTimeout((function(){if(!A)return b.cui_onClick(n)}),200)},R=function(n){return A=!0,b.cui_onDoubleClick(n),D.setTimeout((function(){return A=!1}),250)}),L&&n.on("click",L),R&&(this.__map.doubleClickZoom.disable(),n.on("dblclick",R))},LeafletMap.prototype.__removeMarker=function(n){var b,A,L,R,D;for(b in D=this.__groups)if(A=(A=(L=D[b]).filter((function(b){return b.marker===n})))[0]){R=L.indexOf(A),L.splice(R,1);break}A&&A.polyline&&this.__map.removeLayer(A.polyline),n.off(),this.__map.removeLayer(n),n=null},LeafletMap.prototype.__updateGroupsPolylines=function(){var n,b;for(n in b=this.__groups)b[n].reduce(function(n){return function(b,A){if(A)return b.polyline||(b.polyline=L.polyline([b.marker.getLatLng(),A.marker.getLatLng()],{weight:1.5,color:b.options.color,dashArray:b.options.polyline}),b.polyline.addTo(n.__map)),A}}(this))},LeafletMap.prototype.getSelectedMarkerPosition=function(){var n;return null!=(n=this.__selectedMarker)?n.getLatLng():void 0},LeafletMap.prototype.setSelectedMarkerPosition=function(n){var b,A;if(D.Map.isValidPosition(n))return this.__selectedMarker?this.__selectedMarker.setLatLng(n):((b=this._selectedMarkerOptions||{}).position=n,b.draggable=this._clickable,this.__selectedMarker=this.addMarker(b),this.__selectedMarker.on("dragstart",(A=this,function(){return A.__selectedMarkerPositionOnDragStart=A.getSelectedMarkerPosition()})),this.__selectedMarker.on("dragend",function(n){return function(){var b;return b=n.getSelectedMarkerPosition(),D.Map.isValidPosition(b)?"function"==typeof n._onMarkerSelected&&n._onMarkerSelected(n.getSelectedMarkerPosition()):n.setSelectedMarkerPosition(n.__selectedMarkerPositionOnDragStart),n.__map.setView(n.getSelectedMarkerPosition())}}(this))),"function"==typeof this._onMarkerSelected?this._onMarkerSelected(this.getSelectedMarkerPosition()):void 0},LeafletMap.prototype.removeSelectedMarker=function(){if(this.__selectedMarker)return this.__removeMarker(this.__selectedMarker),delete this.__selectedMarker},LeafletMap.prototype.hideMarkers=function(){var n,b,A;for(n=0,b=(A=this.__markers).length;n0?(b=new L.featureGroup(n.__markers),n.__map.fitBounds(b.getBounds().pad(.05))):n.__map.setView(n._centerPosition,n._zoom)}));var n},LeafletMap.prototype.zoomIn=function(){return this.__map.setZoom(this.__map.getZoom()+1)},LeafletMap.prototype.zoomOut=function(){return this.__map.setZoom(this.__map.getZoom()-1)},LeafletMap.prototype.resize=function(){return this.__map.invalidateSize()},LeafletMap.prototype.getZoom=function(){return this.__map.getZoom()},LeafletMap.prototype.setZoom=function(n){return this.__map.setZoom(n)},LeafletMap.prototype.setCenter=function(n,b){return null==b&&(b=this.getZoom()),this.__map.setView(n,b)},LeafletMap.prototype.getCenter=function(){return this.__map.getCenter()},LeafletMap.prototype.destroy=function(){var n,b,A,L,R;for(n=0,b=(L=this.__markers).length;n{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(7540)),L.Map=function(n){function Map(n){var b,A,R,D,B;Map.__super__.constructor.call(this,n),this.__mapTemplate=new L.Template({name:"map",map:{center:!0,"buttons-upper-left":!0,"buttons-upper-right":!0,"buttons-upper-center":!0,"buttons-bottom-left":!0,"buttons-bottom-right":!0,"buttons-bottom-center":!0}}),this.append(this.__mapTemplate,"center"),L.dom.addClass(this.__mapTemplate.get("center"),this.__getMapClassName()),this.__zoomButtons=this.__getZoomButtons(),A=this.__zoomButtons,this._buttonsUpperLeft&&(A=A.concat(this._buttonsUpperLeft)),b=new L.Buttonbar({buttons:A,class:"map-zoom-buttons"}),L.dom.append(this.__mapTemplate.get("buttons-upper-left"),b),this._buttonsUpperCenter&&L.dom.append(this.__mapTemplate.get("buttons-upper-center"),this._buttonsUpperCenter),R=[],this._addFullscreenButton&&(D=this.__getFullscreenButtonOpts(),R.push(L.Pane.getToggleFillScreenButton(D))),this._buttonsUpperRight&&(R=this._buttonsUpperRight.concat(R)),R.length&&(b=new L.Buttonbar({buttons:R}),L.dom.append(this.__mapTemplate.get("buttons-upper-right"),b)),this._buttonsBottomRight&&(b=new L.Buttonbar({buttons:this._buttonsBottomRight}),L.dom.append(this.__mapTemplate.get("buttons-bottom-right"),b)),this._buttonsBottomLeft&&(b=new L.Buttonbar({buttons:this._buttonsBottomLeft}),L.dom.append(this.__mapTemplate.get("buttons-bottom-left"),b)),this.__markers=[],this.__map=this.__buildMap(),this._clickable&&this.__bindOnClickMapEvent(),this.addMarkers(this._markersOptions),this._selectedMarkerPosition&&this.setSelectedMarkerPosition(this._selectedMarkerPosition),this.__viewportResizeListener=L.Events.listen({type:"viewport-resize",node:this,call:(B=this,function(){return B.resize()})})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Map,n),Map.defaults={maxZoom:18,minZoom:0,buttons:{fullscreen:{open:{icon:"fa-expand"},close:{icon:"fa-compress"}},zoom:{plus:{icon:"zoom_in",tooltip:"Zoom in"},reset:{icon:"fa-dot-circle-o",tooltip:"Reset"},minus:{icon:"zoom_out",tooltip:"Zoom out"}}}},Map.prototype.initOpts=function(){return Map.__super__.initOpts.call(this),this.addOpts({centerPosition:{check:L.Map.isValidPosition,default:{lat:0,lng:0}},zoom:{check:"Integer",default:1},markersOptions:{check:Array,default:[]},clickable:{check:Boolean,default:!0},selectedMarkerPosition:{check:L.Map.isValidPosition},selectedMarkerOptions:{check:"PlainObject"},onMarkerSelected:{check:Function},zoomToFitAllMarkersOnInit:{check:Boolean,default:!1},onClick:{check:Function},onZoomEnd:{check:Function},onMoveEnd:{check:Function},onReady:{check:Function},buttonsUpperLeft:{check:Array},buttonsUpperCenter:{check:Array},buttonsUpperRight:{check:Array},buttonsBottomRight:{check:Array},buttonsBottomLeft:{check:Array},showPolylines:{check:Boolean,default:!0},addFullscreenButton:{check:Boolean,default:!0}})},Map.prototype.addMarkers=function(n){var b,A,L,R;for(R=[],b=0,A=n.length;b=-90},Map.isValidLongitude=function(n){return L.util.isNumber(n)&&n<=180&&n>=-180},Map.isValidPosition=function(n){return n&&L.Map.isValidLatitude(n.lat)&&L.Map.isValidLongitude(n.lng)},Map}(L.Pane)},7816:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5737)),L.MapInput=function(n){function MapInput(){return MapInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MapInput,n),MapInput.defaults={labels:{mapButtonTooltip:"Show map",iconButtonTooltip:"Show icon",placeholder:"Insert or paste coordinates",iconLabel:"Icon",colorLabel:"Color"},displayFormat:"ll",mapClass:L.LeafletMap,iconColors:["#b8bfc4","#80d76a","#f95b53","#ffaf0f","#57a8ff"],icons:["fa-map-marker","fa-envelope","fa-automobile","fa-home","fa-bicycle","fa-graduation-cap"]},MapInput.displayFormats={dms:"FFf",ddm:"Ff",dd:"f",ll:function(n){return n.lat.toFixed(5)+", "+n.lng.toFixed(5)}},MapInput.prototype.getTemplateKeyForRender=function(){return"center"},MapInput.prototype.initOpts=function(){return MapInput.__super__.initOpts.call(this),this.addOpts({mapOptions:{check:"PlainObject",default:{}},displayFormat:{check:function(n){return!L.util.isNull(L.MapInput.displayFormats[n])},default:L.MapInput.defaults.displayFormat}}),this.removeOpt("getValueForDisplay"),this.removeOpt("getValueForInput"),this.removeOpt("getValueForStore"),this.removeOpt("checkInput")},MapInput.prototype.readOpts=function(){return MapInput.__super__.readOpts.call(this),this._checkInput=this.__checkInput,this.__selectedMarkerOptions={}},MapInput.prototype.initValue=function(){var n,b,A;return MapInput.__super__.initValue.call(this),n=this.getValue(),this.__selectedMarkerOptions.iconName=n.iconName||L.MapInput.defaults.icons[0],this.__selectedMarkerOptions.iconColor=n.iconColor||L.MapInput.defaults.iconColors[0],(A=this.__getPosition())&&L.Map.isValidPosition(A)?(b=this.__getFormattedPosition(A),this.setValue(b)):this.setValue("")},MapInput.prototype.getTemplate=function(){return new L.Template({name:"map-input",map:{left:!0,center:!0,right:!0}})},MapInput.prototype.getValueForDisplay=function(){return this.__getPositionForDisplay()},MapInput.prototype.getValueForInput=function(){return this.__getPositionForDisplay()},MapInput.prototype.__getPositionForDisplay=function(){var n;return(n=this.__getPosition())?this.__getFormattedPosition(n):""},MapInput.prototype.getValueForStore=function(n){var b,A;return b={iconName:this.__selectedMarkerOptions.iconName,iconColor:this.__selectedMarkerOptions.iconColor},A=L.util.parseCoordinates(n),b.position=A||"",b},MapInput.prototype.checkValue=function(n){if(L.util.isEmpty(n))return!0;if(this.__checkInput(n))return!0;throw new Error(this.__cls+".setValue(value): Value needs to be valid coordinates.")},MapInput.prototype.render=function(){var n,b;return MapInput.__super__.render.call(this),this.addClass("cui-data-field--with-button"),this.__initMap(),L.util.isEmpty(this._placeholder)&&this.__input.setAttribute("placeholder",L.MapInput.defaults.labels.placeholder),n=new L.defaults.class.Button({icon:"fa-map-o",tooltip:{text:L.MapInput.defaults.labels.mapButtonTooltip},onClick:(b=this,function(){return b.__openMapPopover(n)})}),this.__openIconPopoverButton=new L.defaults.class.Button({class:"cui-map-icon-popover-button",icon:this.__selectedMarkerOptions.iconName,tooltip:{text:L.MapInput.defaults.labels.iconButtonTooltip},onClick:function(n){return function(){return n.__openIconPopover(n.__openIconPopoverButton)}}(this)}),this.replace(n,"right"),this.replace(this.__openIconPopoverButton,"left"),this.__updateIconOptions()},MapInput.prototype.__openMapPopover=function(n){var b;(b=new L.Popover({element:n,handle_focus:!1,placement:"se",class:"cui-map-popover",pane:this.__buildMap(),onHide:function(){return b.destroy()}})).show()},MapInput.prototype.__updateIconOptions=function(){return this.__openIconPopoverButton.setIcon(this.__selectedMarkerOptions.iconName),L.dom.setStyleOne(this.__openIconPopoverButton.getIcon(),"color",this.__selectedMarkerOptions.iconColor)},MapInput.prototype.__openIconPopover=function(n){var b;(b=new L.Popover({element:n,handle_focus:!1,placement:"se",pane:{padded:!0,content:this.__buildIconPopoverContent()},onHide:function(){return b.destroy()}})).show()},MapInput.prototype.__buildIconPopoverContent=function(){var n,b,A,R;return b=new L.Select({data:this.__selectedMarkerOptions,name:"iconColor",form:{label:L.MapInput.defaults.labels.colorLabel},onDataChanged:(R=this,function(){return R.storeValue(),R.__updateIconOptions()}),options:function(){var n,b,A,R,D,B;for(D=[],b=0,R=(B=L.MapInput.defaults.iconColors).length;b{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.MarkdownInput=function(n){function MarkdownInput(){return MarkdownInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MarkdownInput,n),MarkdownInput.prototype.initOpts=function(){return MarkdownInput.__super__.initOpts.call(this),this.removeOpt("textarea"),this.addOpts({preview:{check:Boolean},preview_ms:{default:500,check:function(n){return n>=0}},renderFunction:{mandatory:!0,default:function(n){return L(n,R.defaults.marked_opts)},check:Function}})},MarkdownInput.prototype.readOpts=function(){var n,b,A,L,D,B;for(MarkdownInput.__super__.readOpts.call(this),this._textarea=!0,this.__preview=null,this.__updatePreview=(B=this,function(){return B.updatePreview()}),D={top:{}},n=0,A=(L=["maximize","maximize_horizontal","maximize_vertical"]).length;n1))return A.selected.startsWith(n)&&A.selected.endsWith(n)?(this.setValue(A.before+A.selected.substr(b,A.selected.length-2*b)+A.after),this.setSelection({start:A.start,end:A.end-2*b})):(this.setValue(A.before+n+A.selected+n+A.after),this.setSelection({start:A.start,end:A.end+2*b}))},MarkdownInput.prototype.makeOrderedList=function(){return this.__makeList(!1)},MarkdownInput.prototype.makeUnorderedList=function(){return this.__makeList(!0)},MarkdownInput.prototype.checkList=function(){var n;return n=this.__makeList(null,!0),console.debug("selection is type",n)},MarkdownInput.prototype.__makeList=function(n,b){var A,L,D,B,E,X,$,V,K,Q,tt;if(null==n&&(n=!0),null==b&&(b=!1),K=(Q=this.getSelection()).selected.split("\n"),""!==Q.before&&!Q.before.endsWith("\n"))return null;for(tt=null,b?L=void 0:$=n?"- ":"1. ",X=[],A=0,B=K.length;A{var L=A(7288),R={}.hasOwnProperty;L.Menu=function(n){function Menu(n){Menu.__super__.constructor.call(this,n),this._itemList&&this.setItemList(this._itemList)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Menu,n),Menu.prototype.initOpts=function(){return Menu.__super__.initOpts.call(this),this.addOpts({itemList:{check:function(n){return n instanceof L.ItemList||L.util.isPlainObject(n)}},auto_close_after_click:{default:!0,check:Boolean},parent_menu:{check:L.Menu},onBeforeItemListInit:{check:Function}}),this},Menu.prototype.readOpts=function(){Menu.__super__.readOpts.call(this),this.opts.placements||(this._parent_menu||this._show_at_position?this._placements=["es","en","ws","wn"]:this._placements=["se","sw","ne","nw"]),this.opts.placement||(this._placement=this._placements[0])},Menu.prototype.show=function(n){var b,A,R;return this.__event=n,L.util.assert(!this.isDestroyed(),L.util.getObjectClass(this)+".show","Element is already destroyed."),this.__openedByKeyboard=(null!=(A=this.__event)?A.getNativeEvent():void 0)instanceof KeyboardEvent,this.isShown()?(this.position(),this):(this.__loading||(R=this,b=function(){R.getButton()&&R.DOM.focus()},this.__itemList?(this.__loading=!0,this.__itemList.render(this,this.__event).done(function(n){return function(){return Menu.__super__.show.call(n,n.__event),b(),n.__loading=!1}}(this))):(Menu.__super__.show.call(this,this.__event),b()),this.__keyUpListener=L.Events.listen({type:"keyup",node:this.DOM,capture:!0,call:function(n){return function(b){var A;b.hasModifierKey()||"Esc"!==(A=b.getKeyboardKey())&&"Tab"!==A||(n.hide(),b.stop())}}(this)}),this.__keydownListener=L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(n){return function(b){n.__itemList&&L.Events.trigger({node:n.__itemList.DOM,type:"item-list-keydown",info:{event:b}})}}(this)})),this)},Menu.prototype.hide=function(){var n,b,A;return this.__openedByKeyboard&&null!=(n=this.getButton())&&n.DOM.focus(),null!=(b=this.__keyUpListener)&&b.destroy(),null!=(A=this.__keydownListener)&&A.destroy(),Menu.__super__.hide.call(this)},Menu.prototype.hasItems=function(n){var b;return null!=(b=this.__itemList)?b.hasItems(n):void 0},Menu.prototype.getItemList=function(){return this.__itemList},Menu.prototype.setItemList=function(n){var b;return n instanceof L.ItemList?this.__itemList=n:(delete n.maximize,n.maximize_vertical=!1,n.maximize_horizontal=!0,n.keyboardControl=!0,n.hasOwnProperty("active_item_idx")||(n.active_item_idx=null),this.__itemList=new L.ItemList(n)),this.replace(this.__itemList),this.proxy(this.__itemList,["setActiveIdx"]),this.isShown()&&this.__itemList.render(this,this.__event).done((b=this,function(){if(b.position(),b.__updateScroll&&(b.__itemList.DOM.scrollTop=b.__updateScroll),b.__waitBlock)return b.__waitBlock.hide(),b.__waitBlock=null,delete b.__updateScroll})),this},Menu.prototype.isAutoCloseAfterClick=function(){return this._auto_close_after_click},Menu.prototype.destroy=function(){var n;return null!=(n=this.__itemList)&&n.destroy(),Menu.__super__.destroy.call(this)},Menu.prototype.reload=function(n){return this.__waitBlock=new L.WaitBlock({element:this.DOM}),n&&(this.__updateScroll=this.getItemList().DOM.scrollTop),this.setItemList(this._itemList),this.__waitBlock.show()},Menu.prototype.hideAll=function(n){var b;return this.hide(n),null!=(b=this._parent_menu)&&b.hideAll(n),this},Menu.prototype.getButton=function(){var n,b;return!(b=this.getOpt("element"))||b instanceof L.Button?b:(n=L.dom.data(b.DOM||b,"element"))instanceof L.Button?n:null},Menu}(L.Layer)},6828:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Modal=function(n){function Modal(n){var b,A,R,D,B,E,X,$,V;if(Modal.__super__.constructor.call(this,n),this._header_buttons)for(B=0,E=(X=this._header_buttons).length;B{var L=A(7288),R={}.hasOwnProperty;L.MultiInput=function(n){function MultiInput(n){MultiInput.__super__.constructor.call(this,n),this.addClass("cui-multi-input"),this._textarea&&this.addClass("cui-multi-input--textarea")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInput,n),MultiInput.prototype.initOpts=function(){return MultiInput.__super__.initOpts.call(this),this.addOpts({textarea:{default:!1,check:Boolean},spellcheck:{default:!1,check:Boolean},placeholder:{check:"PlainObject"},onFocus:{check:Function},onClick:{check:Function},onKeyup:{check:Function},onBlur:{check:Function},control:{mandatory:!0,check:function(n){return n instanceof L.MultiInputControl}},content_size:{default:!1,check:Boolean},user_selectable:{default:!1,check:Boolean}})},MultiInput.prototype.readOpts=function(){return MultiInput.__super__.readOpts.call(this),this.__inputs=null,this.__userSelectedData={},this._control&&this._control.getUserSelectable&&(this._user_selectable=this._control.getUserSelectable()),this.__user_selectable=this._user_selectable},MultiInput.prototype.disable=function(){var n,b,A;if(MultiInput.__super__.disable.call(this),this.__inputs)for(n=0,b=(A=this.__inputs).length;n{var L=A(7288),R={}.hasOwnProperty;L.MultiInputControl=function(n){function MultiInputControl(n){MultiInputControl.__super__.constructor.call(this,n),this.__body=document.body,this.setKeys(this._keys),this.setPreferredKey(this._preferred_key)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInputControl,n),MultiInputControl.prototype.initOpts=function(){return MultiInputControl.__super__.initOpts.call(this),this.addOpts({preferred_key:{check:String},keys:{check:function(n){return L.util.isArray(n)&&n.length>0}},user_control:{default:!0,check:Boolean}})},MultiInputControl.prototype.setKeys=function(n){var b,A,R,D,B;if(this.__keys=[],n){for(D={},A=b=0,B=n.length;b{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(66)),L.MultiInputInput=function(n){function MultiInputInput(){return MultiInputInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInputInput,n),MultiInputInput.prototype.getTemplate=function(){return new L.Template({name:"data-field-multi-input",map:{center:!0,right:!0}})},MultiInputInput.prototype.getTemplateKeyForRender=function(){return"center"},MultiInputInput}(L.Input)},1240:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(792)),L.MultiOutput=function(n){function MultiOutput(){return MultiOutput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiOutput,n),MultiOutput.prototype.initOpts=function(){return MultiOutput.__super__.initOpts.call(this),this.addOpts({control:{mandatory:!0,check:L.MultiInputControl},showOnlyPreferredKey:{check:Boolean,default:!0},markdown:{mandatory:!0,default:!1,check:Boolean},markdown_opts:{check:"PlainObject"},text_node_func:{check:Function}})},MultiOutput.prototype.readOpts=function(){return MultiOutput.__super__.readOpts.call(this),this.__keyTemplates={}},MultiOutput.prototype.render=function(){var n,b,A,R,D,B,E,X,$;if(MultiOutput.__super__.render.call(this),this._showOnlyPreferredKey)A=this._control.getPreferredKey(),L.util.assert(A,"Output.displayValue","MultiInputControl: no preferred key set.",{control:this._control}),R=this.__getLabel(A.name),this.replace(R);else{for(b=n=0,D=(B=this._control.getKeys()).length;n{var L=A(7288),R={}.hasOwnProperty;L.ObjectDumper=function(n){function ObjectDumper(n){var b,A;ObjectDumper.__super__.constructor.call(this,n),this._headers&&(b=new L.ListViewTreeHeaderNode({headers:this._headers}),this.root.children.splice(0,0,b)),this.render(),this.root.open().always((A=this,function(){return"function"==typeof A._onAfterRender?A._onAfterRender(A):void 0}))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ObjectDumper,n),ObjectDumper.prototype.initOpts=function(){return ObjectDumper.__super__.initOpts.call(this),this.addOpts({object:{mandatory:!0,check:function(n){return!(!L.util.isArray(n)&&!L.util.isPlainObject(n))}},headers:{default:[{label:{text:"key"}},{label:{text:"value"}}],check:function(n){return 2===n.length||L.util.isFalse(n)}},do_open:{mandatory:!0,default:!1,check:Boolean},parse_json:{mandatory:!0,default:!1,check:Boolean},onAfterRender:{check:Function}}),this.removeOpt("root"),this.removeOpt("cols"),this.removeOpt("colResize"),this.removeOpt("fixedRows")},ObjectDumper.prototype.readOpts=function(){return ObjectDumper.__super__.readOpts.call(this),this._cols=["auto","auto"],this._colClasses=["cui-object-dumper-key","cui-object-dumper-value"],this._headers&&(this._colResize=!0,this._fixedRows=1),this._no_hierarchy=this.__hasOnlyPlainValues(this._object)},ObjectDumper.prototype.initListView=function(){return ObjectDumper.__super__.initListView.call(this),this.root=new L.ObjectDumperNode({data:this._object,do_open:this._do_open,parse_json:this._parse_json})},ObjectDumper.prototype.__hasOnlyPlainValues=function(n){var b,A;for(b in n){if(A=n[b],L.util.isPlainObject(A)||L.util.isArray(A))return!1;if(this._parse_json&&L.util.isJSON(A))return!1}return!0},ObjectDumper}(L.ListViewTree)},3378:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ObjectDumperNode=function(n){function ObjectDumperNode(){return ObjectDumperNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ObjectDumperNode,n),ObjectDumperNode.prototype.initOpts=function(){return ObjectDumperNode.__super__.initOpts.call(this),this.addOpts({key:{default:"root",mandatory:!0},data:{},do_open:{mandatory:!0,default:!1,check:Boolean},parse_json:{mandatory:!0,default:!1,check:Boolean}}),this.removeOpt("colspan"),this.removeOpt("children"),this.removeOpt("getChildren")},ObjectDumperNode.prototype.readOpts=function(){if(ObjectDumperNode.__super__.readOpts.call(this),this.setData(this._data),this.__info=this.getInfoFromData(this.getData()),"root"===this._key&&(this.children=this.getNodesFromData(this.getData())),!this.isLeaf()&&this._do_open)return this.do_open=!0},ObjectDumperNode.prototype.setData=function(n){if(this._parse_json&&L.util.isString(n))try{this.__data=JSON.parse(n),L.util.isString(this.__data)&&(this.__data=n)}catch(b){this.__data=n}else this.__data=n;return this},ObjectDumperNode.prototype.getData=function(){return this.__data},ObjectDumperNode.prototype.getChildren=function(){return this.getNodesFromData(this.getData())},ObjectDumperNode.prototype.isLeaf=function(){return!this.__info.has_children},ObjectDumperNode.prototype.renderContent=function(){var n,b;return!this.isLeaf()&&this.isOpen()||(n=new L.Label({text:this.__info.text,text_node_func:(b=this,function(){return"String"===!b.__info.cls?b.__info.text:L.Label.parseLinks(b.__info.text)}),multiline:!0}),L.dom.setAttribute(n,"data-type",this.__info.cls),this.addColumn(new L.ListViewColumn({class:"cui-object-dumper-node-value",element:n}))),new L.Label({class:"cui-object-dumper-node-key",text:this._key,multiline:!0})},ObjectDumperNode.prototype.getClass=function(){return ObjectDumperNode.__super__.getClass.call(this)+" cui-object-dumper-node-"+this.__info.cls.toLowerCase()},ObjectDumperNode.prototype.getInfoFromData=function(n){var b;return b={},void 0===n?(b.cls="undefined",b.text="undefined"):null===n?(b.cls="null",b.text="null"):!0===n?(b.cls="boolean",b.text="true"):!1===n?(b.cls="boolean",b.text="false"):"number"==typeof n&&isNaN(n)?(b.cls="NaN",b.text="NaN"):L.util.isNumber(n)?(b.cls="number",b.text=""+n):L.util.isString(n)?(b.cls="string",b.text=n):(b.cls=L.util.getObjectClass(n),L.util.isArray(n)||L.util.isPlainObject(n)?(b.has_children=!L.util.isEmptyObject(n),L.util.isArray(n)&&(b.text=b.cls+" ["+n.length+"]"),L.util.isPlainObject(n)&&(b.text=b.cls+" {"+Object.keys(n).length+"}")):(b.has_children=!0,b.text=b.cls)),b},ObjectDumperNode.prototype.getNodesFromData=function(n){var b,A,R,D,B,E,X,$,V;if(X=[],"Array"===this.getInfoFromData(n).cls)for(A=b=0,$=n.length;0<=$?b<$:b>$;A=0<=$?++b:--b)X.push(new L.ObjectDumperNode({key:A,data:n[A],do_open:this._do_open,parse_json:this._parse_json}));else{for(D in B=[],n)B.push(D);for(B.sort((function(n,b){return n.localeCompare(b)})),R=0,E=B.length;R{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1648)),L.Options=function(n){function Options(n){Options.__super__.constructor.call(this,n),this._sortable&&L.dom.addClass(this.DOM,"cui-options--sortable")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Options,n),Options.prototype.initOpts=function(){return Options.__super__.initOpts.call(this),this.addOpts({radio:{check:function(n){return L.util.isString(n)||L.util.isBoolean(n)}},radio_unchecked_value:{default:!1},min_checked:{check:function(n){return this._radio?0===n||1===n:L.util.isInteger(n)&&n>=0}},options:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},horizontal:{check:function(n){if(L.util.isBoolean(n)||L.util.isInteger(n)&&n>0)return!0}},title:{check:String},hint:{check:String},activatable:{check:Boolean},sortable:{check:Boolean},sortable_hint:{check:String},placeholder:{default:"No options available.",check:String},columns:{check:function(n){if(L.util.isInteger(n)&&n<=12)return!0},default:1}})},Options.prototype.readOpts=function(){return Options.__super__.readOpts.call(this),L.util.assert(!this._sortable||!this._left,"new CUI.Options","opts.sortable and opts.left cannot be used together.",{opts:this.opts}),L.util.assert(!this._sortable||!this._radio,"new CUI.Options","opts.sortable and opts.radio cannot be used together.",{opts:this.opts}),L.util.assert(!this._sortable||!this.opts.horizontal,"new CUI.Options","opts.sortable and opts.horizontal cannot be used together.",{opts:this.opts}),void 0===this.opts.horizontal&&(this._horizontal=!this._sortable),this._sortable&&void 0===this._activatable&&(this._activatable=!0),L.util.assert(!(this._sortable&&!this._activatable),"new CUI.Options","opts.sortable needs opts.activatable to be set.",{opts:this.opts})},Options.prototype.getTemplate=function(){return this._activatable?this.__tmpl=new L.Template({name:"options-activatable",map_prefix:"cui-options",map:{top:!0,bottom:!0,active:!0,inactive:!0}}):this.__tmpl=new L.Template({name:"options",map:{top:!0,bottom:!0,center:!0}})},Options.prototype.init=function(){switch(this._radio){case!1:this.__radio=void 0;break;case!0:this.__radio="options--"+this.getUniqueId();break;default:this.__radio=this._radio}return this.__options_data={}},Options.prototype.setData=function(n){return Options.__super__.setData.call(this,n),this._radio&&(L.util.isArray(this.getValue())?this.__radio_use_array=!0:this.__radio_use_array=!1),this.__setDataOnOptions(),this},Options.prototype.__setDataOnOptions=function(n){var b,A,L,R,D,B,E,X,$,V,K,Q,tt;if(null==n&&(n=!0),this.__checkboxes){if(n)for(A=0,D=(V=this.__checkboxes).length;A-1?this.__options_data[b.getName()]=X:this.__options_data[b.getName()]=$,n&&(this._check_changed&&JSON.parse(this.getCheckChangedValue()).indexOf(X)>-1?b.setCheckChangedValue(X):b.setCheckChangedValue($));return this}},Options.prototype.disableOption=function(n){return this.__getOptionByValue(n).indeterminate&&this.removeIndeterminate(n),this.__getCheckboxByValue(n).disable(),this},Options.prototype.enableOption=function(n){return this.__getOptionByValue(n).indeterminate&&this.removeIndeterminate(n),this.__getCheckboxByValue(n).enable(),this},Options.prototype.setIndeterminate=function(n){var b;return b=this.__getCheckboxByValue(n),this.__getOptionByValue(n).indeterminate=!0,b.setIndeterminate(),this},Options.prototype.removeIndeterminate=function(n){return this.__getOptionByValue(n).indeterminate=!1,this.__getCheckboxByValue(n).removeIndeterminate(),this},Options.prototype.isOptionIndeterminateByValue=function(n){return this.__getCheckboxByValue(n).isIndeterminate()},Options.prototype.__getCheckboxByValue=function(n){var b,A,R,D,B;for(b=null,R=A=0,D=(B=this.__options).length;AL?1:0})),ot=[],E=0,V=K.length;E1&&this.addClass("cui-options--columns-"+this._columns),this._activatable?(this.empty("active"),this.empty("inactive")):this.empty("center"),K=0,tt=(rt=this.__checkboxes).length;K0&&b.setTextMaxChars(this.__maxChars),this._sortable&&b.isActive()?(D=L.dom.element("DIV",{class:"cui-options-sortable-option"}),A=L.dom.element("DIV",{class:"cui-options-sortable-drag-handle"}),R=L.dom.element("DIV",{class:"cui-drag-handle-row"}),A.appendChild(R),D.appendChild(A),D.appendChild(b.DOM)):D=b.DOM,this._activatable?b.isActive()?this.append(D,"active"):this.append(D,"inactive"):this.append(D,"center");pt=this.__tmpl.map.active,this._sortable&&new L.Sortable({axis:"y",element:pt,selector:".cui-options-sortable-drag-handle",sorted:function(n){return function(b,A,R){var D;return L.util.moveInArray(A,R,n.__options_order,A{var L=A(7288),R={}.hasOwnProperty;L.Output=function(n){function Output(){return Output.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Output,n),Output.prototype.initOpts=function(){return Output.__super__.initOpts.call(this),this.addOpts({placeholder:{default:"",check:String},text:{check:String},markdown:{mandatory:!0,default:!1,check:Boolean},getValue:{check:Function},multiline:{check:Boolean,default:!0,mandatory:!0},allow_delete:{mandatory:!0,default:!1,check:Boolean}})},Output.prototype.readOpts=function(){var n,b,A,L;for(Output.__super__.readOpts.call(this),n=0,A=(L=["undo_support","check_changed","mark_changed"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.OutputContent=function(n){function OutputContent(){return OutputContent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(OutputContent,n),OutputContent.prototype.initOpts=function(){return OutputContent.__super__.initOpts.call(this),this.addOpts({placeholder:{default:"",check:String},content:{check:function(n){return L.util.isElement(n)||L.util.isElement(n.DOM)}},getValue:{check:Function}})},OutputContent.prototype.setContent=function(n){return null==n&&(n=null),n?(L.dom.removeClass(this.DOM,"cui-output-empty"),this.replace(n)):(L.dom.addClass(this.DOM,"cui-output-empty"),this.empty())},OutputContent.prototype.displayValue=function(){return OutputContent.__super__.displayValue.call(this),this.getName()&&this.setContent(this.getValue()),this},OutputContent.prototype.getValue=function(){var n;return n=OutputContent.__super__.getValue.call(this),this._getValue?this._getValue.call(this,n,this):n},OutputContent.prototype.render=function(){return OutputContent.__super__.render.call(this),this.setContent(this._content)},OutputContent}(L.DataFieldInput)},2459:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.LayerPane=function(n){function LayerPane(n){LayerPane.__super__.constructor.call(this,n),this.setPane(this._pane)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(LayerPane,n),LayerPane.prototype.initOpts=function(){return LayerPane.__super__.initOpts.call(this),this.addOpts({pane:{mandatory:!0,default:new L.SimplePane,check:function(n){return n instanceof L.Pane||L.util.isPlainObject(n)}}})},LayerPane.prototype.getPane=function(){return this.__pane},LayerPane.prototype.setPane=function(n){return L.util.isPlainObject(n)?this.__pane=new L.SimplePane(n):this.__pane=n,this.__pane.hasHeader()&&this.__layer_root.DOM.classList.add("cui-pane--has-header"),this.__pane.hasFooter()&&this.__layer_root.DOM.classList.add("cui-pane--has-footer"),this.__pane.addClass("cui-layer-pane"),L.Layer.prototype.replace.call(this,this.__pane)},LayerPane.prototype.destroy=function(){return this.__pane.destroy(),LayerPane.__super__.destroy.call(this)},LayerPane}(L.Layer)},6110:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1682)),L.Pane=function(n){function Pane(){return Pane.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Pane,n),Pane.defaults={button_tooltip:{text:"Turn fullscreen on / off"}},Pane.prototype.__init=function(){if(Pane.__super__.__init.call(this),this.addClass("cui-pane"),this.__fill_screen_is_on=!1,this._padded)return this.addClass("cui-pane--padded")},Pane.prototype.initOpts=function(){return Pane.__super__.initOpts.call(this),this.addOpts({padded:{check:Boolean,default:!1}})},Pane.prototype.readOpts=function(){return this.initDefaultPanes(),Pane.__super__.readOpts.call(this)},Pane.prototype.hasHeader=function(){return!!this._top},Pane.prototype.hasFooter=function(){return!!this._bottom},Pane.prototype.getFillScreenState=function(){return this.__fill_screen_is_on},Pane.prototype.endFillScreen=function(n){var b,A;if(null==n&&(n=!0),this.getFillScreenState())return this.__fill_screen_is_on=!1,L.util.$elementIsInDOM(this.__placeholder)?(A=this,b=function(){var n;return L.dom.insertBefore(A.__placeholder,A.DOM),(n=L.dom.data(L.dom.parent(A.__placeholder),"element"))instanceof L.Popover&&n.setVisible(!0),L.dom.remove(A.__placeholder),A.__fillscreenTmpl.destroy(),delete A.__fillscreenTmpl,L.Events.trigger({type:"end-fill-screen",node:A.DOM}),L.Events.trigger({type:"viewport-resize",node:A.DOM})},n?(L.Events.wait({type:"transitionend",node:this.__fillscreenTmpl}).always((function(){return b()})),this.__fillscreenTmpl.removeClass("cui-pane-fill-screen-is-on")):b()):(this.__fillscreenTmpl.destroy(),this.__placeholder=null),this},Pane.prototype.startFillScreen=function(){var n,b,A,R,D,B,E,X,$,V,K,Q,tt;if(!this.getFillScreenState()){for(document.body.style.setProperty("--layer-sidebar-width",L.dom.getLayerSidebarWidth()+"px"),this.__fillscreenTmpl=new L.Template({name:"pane-fill-screen",map:{inner:!0}}),V=L.dom.getRect(this.DOM),tt=L.dom.getDimensions(window),this.__placeholderTmpl=new L.Template({name:"pane-fill-screen-placeholder"}),this.__placeholder=this.__placeholderTmpl.DOM,B=this.__fillscreenTmpl.map.inner,L.dom.append(document.body,this.__fillscreenTmpl.DOM),A=L.dom.getDimensions(this.__fillscreenTmpl.DOM),n={left:(R=L.dom.getDimensions(B)).clientBoundingRect.left-A.clientBoundingRect.left+R.borderLeft+R.paddingLeft,top:R.clientBoundingRect.top-A.clientBoundingRect.top+R.borderTop+R.paddingTop,right:A.clientBoundingRect.right-R.clientBoundingRect.right+R.borderRight+R.paddingRight,bottom:A.clientBoundingRect.bottom-R.clientBoundingRect.bottom+R.borderBottom+R.paddingBottom},Q={top:V.top-n.top,left:V.left-n.left,bottom:tt.height-V.bottom-n.bottom,right:tt.width-V.right-n.right},L.dom.remove(this.__fillscreenTmpl.DOM),L.dom.setStyle(this.__fillscreenTmpl.DOM,Q),L.dom.append(document.body,this.__fillscreenTmpl.DOM),L.dom.setStyle(this.__placeholder,{width:L.dom.getDimensions(this.DOM).marginBoxWidth,height:L.dom.getDimensions(this.DOM).marginBoxHeight}),D=0,X=(K=["position","top","left","right","bottom"]).length;D{var L=A(7288),R={}.hasOwnProperty;L.PaneFooter=function(n){function PaneFooter(){return PaneFooter.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneFooter,n),PaneFooter.prototype.init=function(){return PaneFooter.__super__.init.call(this),this.addClass("cui-pane-footer")},PaneFooter}(L.Toolbar)},9523:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.PaneHeader=function(n){function PaneHeader(){return PaneHeader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneHeader,n),PaneHeader.prototype.init=function(){return PaneHeader.__super__.init.call(this),this.addClass("cui-pane-header")},PaneHeader}(L.Toolbar)},5101:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.PaneToolbar=function(n){function PaneToolbar(){return PaneToolbar.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneToolbar,n),PaneToolbar.prototype.init=function(){return PaneToolbar.__super__.init.call(this),this.addClass("cui-pane-toolbar")},PaneToolbar}(L.Toolbar)},844:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.SimplePane=function(n){function SimplePane(){return SimplePane.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SimplePane,n),SimplePane.prototype.__init=function(){var n,b,A,R,D;for(SimplePane.__super__.__init.call(this),n=0,A=(R=["header_left","header_center","header_right","footer_left","footer_center","footer_right"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(604)),L.Panel=function(n){function Panel(n){var b,A;Panel.__super__.constructor.call(this,n),this.panel=new L.Template({name:"panel",map:{header:!0,content:!0}}),this.registerTemplate(this.panel),this._ui&&(L.dom.setAttribute(this.panel.get("header"),"ui",this._ui+":header"),L.dom.setAttribute(this.panel.get("content"),"ui",this._ui+":content")),this._content_placeholder&&(this.append(this._content_placeholder,"content"),this.__has_placeholder=!0),L.util.isFunction(this._content)?this._load_on_open||this.loadContent():this._content&&this.append(this._content,"content"),this.__activations=0,this.button=new L.Button({text:this._text,class:"cui-panel-header-button",radio:this._radio,radio_allow_null:this._radio_allow_null,icon_active:this._icon_opened,icon_inactive:this._icon_closed,onActivate:(A=this,function(n,b,L){return A.__activations++,1===A.__activations&&"function"==typeof A._onFirstActivate&&A._onFirstActivate(A,b,L),A.__open(!b.initial_activate),!b.initial_activate&&A._save_state&&A.__save_state(!0),"function"==typeof A._onActivate?A._onActivate(n,b,L):void 0}),onDeactivate:function(n){return function(b,A,L){return n.__close(!A.initial_activate),!A.initial_activate&&n._save_state&&n.__save_state(!1),"function"==typeof n._onDeactivate?n._onDeactivate(b,A,L):void 0}}(this)}),this.append(this.button,"header"),this._save_state&&void 0!==(b=this.__get_saved_state())&&(this._closed=!b),this._closed?this.button.deactivate():this.button.activate()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Panel,n),Panel.defaults={arrow_down:"fa-chevron-down",arrow_right:"fa-chevron-right"},Panel.prototype.initOpts=function(){return Panel.__super__.initOpts.call(this),this.addOpts({text:{mandatory:!0,check:String},content:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},content_placeholder:{check:function(n){return L.util.isContent(n)}},load_on_open:{check:Boolean},radio:{default:"panel-switcher",check:function(n){return L.util.isString(n)||!0===n}},radio_allow_null:{default:!0,mandatory:!0,check:Boolean},closed:{default:!0,check:Boolean},icon_opened:{default:L.defaults.class.Panel.defaults.arrow_down,check:String},icon_closed:{default:L.defaults.class.Panel.defaults.arrow_right,check:String},footer_right:{},footer_left:{},onFirstActivate:{check:Function},onActivate:{check:Function},onDeactivate:{check:Function},save_state:{check:String}})},Panel.prototype.readOpts=function(){return Panel.__super__.readOpts.call(this),this},Panel.prototype.isClosed=function(){return L.dom.hasClass(this.DOM,"cui-panel-closed")},Panel.prototype.isOpen=function(){return!this.isClosed()},Panel.prototype.__get_saved_state=function(){return(L.getLocalStorage("panels_state")||{})[this._save_state]},Panel.prototype.__save_state=function(n){var b;if(this._save_state)return(b=L.getLocalStorage("panels_state")||{})[this._save_state]=n,L.setLocalStorage("panels_state",b)},Panel.prototype.open=function(){return this.button.activate(),this},Panel.prototype.close=function(){return this.button.deactivate(),this},Panel.prototype.__close=function(n){return null==n&&(n=!0),L.dom.addClass(this.DOM,"cui-panel-closed"),n&&L.Events.trigger({type:"content-resize",node:this.DOM}),this},Panel.prototype.__open=function(n){var b,A;return null==n&&(n=!0),A=this,b=function(){L.dom.removeClass(A.DOM,"cui-panel-closed"),n&&L.Events.trigger({type:"content-resize",node:A.DOM})},this._load_on_open&&!this.__content_loaded?this.loadContent().done(b):b(),this},Panel.prototype.loadContent=function(){var n,b,A;return b=L.util.isFunction(this._content)?this._content(this):this._content,n=new L.Deferred,L.util.isPromise(b)?b.always((A=this,function(b){return A.setContent(b),n.resolve()})):(this.setContent(b),n.resolve()),this.__content_loaded=!0,n.promise()},Panel.prototype.setContent=function(n,b){return null==b&&(b="content"),!1===n&&this._content_placeholder||(this.__has_placeholder=!1,this.replace(n,b)),this},Panel.prototype.appendContent=function(n,b){return null==b&&(b="content"),this.__has_placeholder?this.setContent(n,b):this.append(n,b),this},Panel}(L.DOMElement),L.defaults.class.Panel=L.Panel},3736:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Password=function(n){function Password(){return Password.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Password,n),Password.prototype.initOpts=function(){return Password.__super__.initOpts.call(this),this.addOpts({toggleButton:{default:!1,check:Boolean}})},Password.prototype.readOpts=function(){if(Password.__super__.readOpts.call(this),this._toggleButton)return this._controlElement=new L.Button({icon:"fa-eye",onClick:(n=this,function(b,A){return"password"===L.dom.getAttribute(n.__input,"type")?(A.setIcon("fa-eye-slash"),n.showPassword()):(A.setIcon("fa-eye"),n.hidePassword())})});var n},Password.prototype.__createElement=function(){return Password.__super__.__createElement.call(this,"password")},Password.prototype.showPassword=function(){return L.dom.setAttribute(this.__input,"type","text")},Password.prototype.hidePassword=function(){return L.dom.setAttribute(this.__input,"type","password")},Password}(L.Input)},1104:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Popover=function(n){function Popover(){return Popover.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Popover,n),Popover.prototype.initOpts=function(){return Popover.__super__.initOpts.call(this),this.mergeOpt("placement",{default:null}),this.mergeOpt("pointer",{default:"arrow"})},Popover.prototype.readOpts=function(){var n;if(Popover.__super__.readOpts.call(this),!(null!=(n=this.opts.backdrop)?n.policy:void 0))return this._backdrop.policy="click-thru"},Popover.prototype.knownPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw"],Popover.prototype.forceFocusOnShow=function(){return!1},Popover}(L.Modal)},9840:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0||"number"==typeof n&&n>=0&&n<=100},ProgressMeter.prototype.initOpts=function(){var n,b,A,R,D,B;for(ProgressMeter.__super__.initOpts.call(this),this.opts.states||(this.opts.states=Object.keys(L.defaults.ProgressMeter.states)),this.addOpts({states:{check:Array},state:{check:(B=this,function(n){return B.__checkState(n)})},css_property_percent:{default:"width",check:String},size:{default:"auto",mandatory:!0,check:["auto","mini","normal","big"]},appearance:{default:"auto",mandatory:!0,check:["auto","normal","important"]},onUpdate:{check:Function}}),R=[],n=0,b=(A=this.opts.states).length;n=0?("spinning2"===this.__state?this.__meter.replace(this.getAnimatedHourglassIcon(),"icon"):(A=this["_icon_"+this.__state])instanceof L.Icon?this.__meter.replace(A,"icon"):L.util.isEmpty(A)?this.__meter.empty("icon"):this.__meter.replace(new L.Icon({icon:A}),"icon"),this.__meter.DOM.setAttribute("state",this.__state),this.__meter.empty("text"),(b={})[this._css_property_percent]=""):(this.__meter.DOM.setAttribute("state","percent"),this.__meter.empty("icon"),this.__meter.replace(Math.round(this.__state)+"%","text"),(b={})[this._css_property_percent]=this.__state+"%"),L.dom.setStyle(this.__meter.map.fill,b),null!=(B=this._onUpdate)&&B.call(this,this),this},ProgressMeter.prototype.getAnimatedHourglassIcon=function(){var n,b,A,R,D,B;for(b=["fa-hourglass-start","fa-hourglass-half","fa-hourglass-end","fa-hourglass-end","fa-hourglass-o"],n=L.dom.div("cui-hourglass-animation fa-stack"),D=0,B=b.length;D{var L=A(7288),R={}.hasOwnProperty;L.Select=function(n){function Select(){return Select.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Select,n),Select.defaults={not_found:"- not found -"},Select.prototype.initOpts=function(){return Select.__super__.initOpts.call(this),this.addOpts({empty_text:{check:String},not_found_text:{default:L.Select.defaults.not_found,check:String},options:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},group:{check:String},onShow:{check:Function},onHide:{check:Function},menu_class:{check:String},onScrollToBottom:{check:Function}})},Select.prototype.init=function(){if(this.__value=null,!L.util.isFunction(this._options))return this.__loadOptions()},Select.prototype.disable=function(n){return this.__wasAutomaticDisabled=null!=n&&n,Select.__super__.disable.call(this)},Select.prototype.isDisabled=function(){return!this.__wasAutomaticDisabled&&Select.__super__.isDisabled.call(this)},Select.prototype.enableOption=function(n){var b;if(b=this.__getOptionByValue(n))return b.disabled=!1,this.displayValue()},Select.prototype.disableOption=function(n){var b;if(b=this.__getOptionByValue(n))return b.disabled=!0,this.displayValue()},Select.prototype.__getOptionByValue=function(n){var b,A,L,R;for(b=0,A=(R=this.getOptions()).length;b-20)return null!=(L=b._onScrollToBottom)?L.apply(b,arguments):void 0})})},Select.prototype.getDefaultValue=function(){return this.default_opt?this.default_opt.value:void 0},Select.prototype.getValue=function(){return this.hasData()?Select.__super__.getValue.call(this):this.__value},Select.prototype.checkValue=function(n,b){return!0},Select.prototype.reload=function(){return L.util.isFunction(this._options)&&this.__loadOptions(),Select.__super__.reload.call(this)},Select.prototype.storeValue=function(n,b){return this.hasData()?Select.__super__.storeValue.call(this,n,b):this.__value=n,this},Select.prototype.displayValue=function(){var n;return L.DataFieldInput.prototype.displayValue.call(this),L.util.isFunction(this._options)&&!this.__optionsPromise&&this.__loadOptions(),this.__optionsPromise.done((n=this,function(){return n.__displayValue()})),this},Select.prototype.__displayValue=function(){var n,b,A,R,D,B,E,X,$,V;for(n=null,D=null,A=b=0,R=(E=this.__options).length;bD&&(D=null!=($=B.text)?$.length:void 0);return n?(n.icon?n.icon instanceof L.Icon?this.__checkbox.setIcon(n.icon.copy()):this.__checkbox.setIcon(n.icon):this.__checkbox.setIcon(null),V=n.text_selected||n.text,this.__checkbox.menuSetActiveIdx(n._idx)):(V=null!==this.getValue()||L.util.isEmpty(this._empty_text)?this._not_found_text.trim()+" "+this.getValue():this._empty_text,this.__checkbox.menuSetActiveIdx(-1)),this.__checkbox.setText(V),(null!=V?V.length:void 0)>D&&(D=V.length),this.__checkbox.setTextMaxChars(D)},Select.prototype.render=function(){var n;if(Select.__super__.render.call(this),n=this.getButton())return L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(b){var A;"Up"!==(A=b.getKeyboardKey())&&"Down"!==A||(n.onClickAction(b),b.stopPropagation())}})},Select.prototype.getOptions=function(){return this.__options},Select.prototype.reloadMenu=function(n){return null==n&&(n=!1),this.getButton().getMenu().reload(n)},Select.newSelectOrOutput=function(n){var b;return 1===n.options.length?(b={form:n.form,text:n.options[0].text,ui:n.ui},new L.Output(b)):new L.Select(n)},Select}(L.Checkbox),L.defaults.class.Select=L.Select},3848:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1588)),L.Slider=function(n){function Slider(){return Slider.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Slider,n),Slider.prototype.initOpts=function(){return Slider.__super__.initOpts.call(this),this.addOpts({value:{check:function(n){return L.util.isInteger(n)}},min:{mandatory:!0,default:0,check:function(n){return L.util.isInteger(n)}},max:{mandatory:!0,default:100,check:function(n){return L.util.isInteger(n)}},onDragstart:{check:Function},onDragging:{check:Function},onDrop:{check:Function},onUpdate:{check:Function}})},Slider.prototype.readOpts=function(){return Slider.__super__.readOpts.call(this),this.__distance=this._max-this._min,L.util.assert(this.__distance>1,"new CUI.Slider","opts.min and opts.max need to be at least 2 apart."),this.__value=this.getDefaultValue()},Slider.prototype.getTemplate=function(){return this.__slider=new L.Template({name:"slider",map:{track:!0,track_visual:!0,handle:!0}})},Slider.prototype.initDimensions=function(){return this.__track_dim=L.dom.getDimensions(this.__track),this.__handle_dim=L.dom.getDimensions(this.__handle),this.__track_available={width:this.__track_dim.contentBoxWidth-this.__handle_dim.borderBoxWidth/2,height:this.__track_dim.contentBoxHeight-this.__handle_dim.borderBoxHeight/2}},Slider.prototype.render=function(){var n;return Slider.__super__.render.call(this),this.__handle=this.__slider.map.handle,this.__track=this.__slider.map.track,new L.Draggable({element:this.__handle,helper:null,dragstart:(n=this,function(b,A){return n.initDimensions(),n.addClass("cui-slider--dragging"),n.__last_diff_x=0,n.__start_value=n.__value,"function"==typeof n._onDragstart?n._onDragstart(n,n.__start_value):void 0}),dragstop:function(n){return function(){return n.setValue(n.__start_value),n.removeClass("cui-slider--dragging"),"function"==typeof n._onDrop?n._onDrop(n):void 0}}(this),dragend:function(n){return function(){return n.removeClass("cui-slider--dragging"),"function"==typeof n._onDrop?n._onDrop(n):void 0}}(this),dragging:function(n){return function(b,A){var L,R,D,B;return L=A.dragDiff.bare_x-n.__last_diff_x,n.__last_diff_x=A.dragDiff.bare_x,R=n.__track_available.width/n.__distance,B=(D=A.dragDiff.bare_y/5)>1?Math.min(1,R*D):R,n.setValue(n.__value+L/B),"function"==typeof n._onDragging?n._onDragging(n,n.getValue()):void 0}}(this)}),L.Events.listen({type:"click",node:this.__slider.map.track_visual,call:function(n){return function(b){var A,L;n.initDimensions(),L=n.__track_dim.clientBoundingRect.left,A=b.getNativeEvent().clientX,n.setValue((A-L)/n.__track_available.width*n.__distance)}}(this)})},Slider.prototype.getValue=function(){return this.hasData()?Slider.__super__.getValue.call(this):this.__value},Slider.prototype.getHandle=function(){return this.__slider.map.handle},Slider.prototype.setValue=function(n,b){var A;return null==b&&(b={}),A=Math.round(Math.min(Math.max(this._min,n),this._max)),this.__value=A,void 0===b.no_trigger&&(b.no_trigger=!1),Slider.__super__.setValue.call(this,this.__value,b),this},Slider.prototype.getDefaultValue=function(){return void 0===this._value?this._min:this._value},Slider.prototype.displayValue=function(){var n;return n=this.getValue()/this._max*100,L.dom.setStyle(this.__handle,{left:n+"%"}),L.dom.setStyle(this.__slider,{"--slider-distance":n+"%"}),"function"==typeof this._onUpdate?this._onUpdate(this,this.getValue()):void 0},Slider.prototype.checkValue=function(n,b){if(nthis._max)throw new L.CheckValueError("value needs to be between "+this._min+" and "+this._max);return this},Slider}(L.DataField)},3218:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5130)),L.StickyHeader=function(n){function StickyHeader(n){StickyHeader.__super__.constructor.call(this,n),this.header=new L.Template({name:"sticky-header",map:{center:!0}}),this.registerTemplate(this.header),this.addClass("cui-sticky-header-level-"+this._level),L.util.isEmpty(this._text)?this.replace(this._content,"center"):this.replace(L.dom.text(this._text),"center"),this._control.addStickyHeader(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(StickyHeader,n),StickyHeader.prototype.initOpts=function(){return StickyHeader.__super__.initOpts.call(this),this.addOpts({control:{mandatory:!0,check:L.StickyHeaderControl},text:{check:String},content:{},level:{default:0,check:function(n){return 0===n||1===n||2===n}}})},StickyHeader.prototype.getLevel=function(){return this._level},StickyHeader}(L.DOMElement)},8159:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.StickyHeaderControl=function(n){function StickyHeaderControl(n){var b,A;StickyHeaderControl.__super__.constructor.call(this,n),null!=(b=L.dom.data(this._element,"stickyHeaderControl"))&&b.destroy(),L.dom.data(this._element,"stickyHeaderControl",this),this.__control=L.dom.div("cui-sticky-header-control"),L.Events.listen({instance:this,type:"viewport-resize",node:this._element,call:(A=this,function(){return A.__positionControl()})}),this.__positionControl(),L.dom.append(this._element,this.__control),this.headers=[],this.newStickyHeaders=[],this.__hiddenHeaders=[],this.__positioned=!1,L.Events.listen({node:this._element,type:"scroll",instance:this,call:function(n){return function(b){n.position()}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(StickyHeaderControl,n),StickyHeaderControl.prototype.initOpts=function(){return StickyHeaderControl.__super__.initOpts.call(this),this.addOpts({element:{mandatory:!0,check:function(n){return L.util.isElement(n)}}})},StickyHeaderControl.prototype.__positionControl=function(){var n;n=L.dom.getDimensions(this._element),L.dom.setStyle(this.__control,{left:n.clientBoundingRect.left,top:n.clientBoundingRect.top}),L.dom.setDimension(this.__control,"marginBoxWidth",n.clientWidth)},StickyHeaderControl.prototype.isInDOM=function(){return this.__control&&L.dom.isInDOM(this.__control)},StickyHeaderControl.prototype.addStickyHeader=function(n){return L.util.assert(!this.__positioned||L.dom.isInDOM(this.__control),this.__cls+".addStickyHeader","StickyHeaderControl is not in DOM tree anymore. Cannot add a new CUI.StickyHeader."),L.util.assert(n instanceof L.StickyHeader,this.__cls+".addStickyHeader","Needs to be instance of StickyHeader but is "+L.util.getObjectClass(n),{stickyHeader:n}),this.newStickyHeaders.push(n)},StickyHeaderControl.prototype.initNewStickyHeaders=function(){var n,b,A,R,D,B,E,X,$;for(E=[],A=0,D=($=this.newStickyHeaders).length;A{var L=A(7288),R={}.hasOwnProperty;L.Table=function(n){function Table(n){var b,A,R,D,B,E,X,$,V,K,Q,tt;if(Table.__super__.constructor.call(this,n),b=[],"mini"===this._size&&b.push("cui-table--mini"),this._class&&b.push(this._class),this._flex&&b.push("cui-table--flex"),this._bordered&&b.push("cui-table--bordered"),this.__table=L.dom.table(b.join(" ")),this.registerDOMElement(this.__table,!1),L.Layout.prototype.maximizeAddClasses.call(this),this._header){for(R=L.dom.tr("cui-table-header"),D=0,E=($=this.__columns).length;D{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(3081)),L.Tabs=function(n){function Tabs(){return Tabs.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Tabs,n),Tabs.defaults={overflow_button_tooltip:null},Tabs.prototype.initOpts=function(){return Tabs.__super__.initOpts.call(this),this.removeOpt("header_center"),this.removeOpt("content"),this.removeOpt("force_footer"),this.removeOpt("force_header"),this.addOpts({tabs:{mandatory:!0,check:function(n){return L.util.isArray(n)&&n.length>0}},active_idx:{check:"Integer"},appearance:{check:["normal","mini"]},orientation:{check:["vertical","horizontal"],mandatory:!0,default:"horizontal"},onActivate:{check:Function},onDeactivate:{check:Function}})},Tabs.prototype.forceHeader=function(){return!0},Tabs.prototype.forceFooter=function(){return!0},Tabs.prototype.__checkOverflowButton=function(){var n,b;if(this.__maximize_horizontal)return(n=L.dom.getDimensions(this.__header)).scrollWidth>n.clientWidth?(this.__overflowBtn.show(),L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header--overflow"),this.__dragscroll=new L.Dragscroll({element:this.__buttonbar.DOM,scroll_element:this.__header})):(null!=(b=this.__dragscroll)&&b.destroy(),this.__dragscroll=null,this.__overflowBtn.hide(),L.dom.removeClass(this.__pane_header.DOM,"cui-tabs-pane-header--overflow")),this},Tabs.prototype.init=function(){var n,b,A,R,D,B,E,X;for(Tabs.__super__.init.call(this),this.__tabs_bodies=new L.Template({name:"tabs-bodies"}),L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header"),"mini"===this._appearance&&L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header--mini"),this.removeClass("cui-pane--padded"),this._padded&&this.addClass("cui-tabs--padded"),this.addClass("cui-tabs--"+this._orientation),this.__buttonbar=new L.Buttonbar,D="center",this.__pane_header.append(this.__buttonbar,D),this.__header=this.__pane_header[D](),L.Events.listen({type:"scroll",node:this.__header,call:(X=this,function(n){var b;return b=L.dom.getDimensions(X.__header),L.dom.setClass(X.__pane_header.DOM,"cui-tabs-pane-header--scroll-at-end",b.horizontalScrollbarAtEnd),L.dom.setClass(X.__pane_header.DOM,"cui-tabs-pane-header--scroll-at-start",b.horizontalScrollbarAtStart)})}),this.__overflowBtn=new L.Button({icon:"ellipsis_h",class:"cui-tab-header-button-overflow",icon_right:!1,size:"mini"===this._appearance?"mini":void 0,tooltip:{text:L.Tabs.defaults.overflow_button_tooltip},menu:{items:function(n){return function(){var b,A,L,R,D;for(b=[],A=function(A){return b.push({text:A.getText(),active:A===n.getActiveTab(),onClick:function(){return A.activate()}})},L=0,R=(D=n.__tabs).length;L-1&&(b=n):b=this.__tabs[n];return b},Tabs.prototype.getActiveTabIdx=function(){return this.__tabs.indexOf(this.getActiveTab())},Tabs.prototype.getActiveTab=function(){return this.__active_tab},Tabs.prototype.activate=function(n){return this.getTab(n).activate(),this},Tabs.prototype.destroy=function(){for(;this.__tabs.length>0;)this.__tabs[0].destroy();return Tabs.__super__.destroy.call(this)},Tabs}(L.SimplePane)},7256:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Toolbar=function(n){function Toolbar(){return Toolbar.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Toolbar,n),Toolbar.prototype.init=function(){return Toolbar.__super__.init.call(this),this.addClass("cui-toolbar")},Toolbar.prototype.initOpts=function(){return Toolbar.__super__.initOpts.call(this),this.removeOpt("maximize"),this.removeOpt("maximize_horizontal"),this.removeOpt("maximize_vertical"),this.addOpts({maximize_horizontal:{default:!0,mandatory:!0,check:Boolean}})},Toolbar.prototype.hasFlexHandles=function(){return!1},Toolbar.prototype.getPanes=function(){return["left","right"]},Toolbar}(L.HorizontalLayout)},5328:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Tooltip=function(n){function Tooltip(n){var b;(Tooltip.__super__.constructor.call(this,n),L.util.assert(L.util.xor(this._text,this._content),"new "+this.__cls,"One of opts.text or opts.content must be set.",{opts:this.opts}),this.__dummyInst=function(){},this._on_hover)?(!0===this._on_hover||this._on_hover(this))&&(L.dom.addClass(this.__element,"cui-dom-element-has-tooltip-on-hover"),this.showTimeout()):this._on_click&&(L.dom.addClass(this.__element,"cui-dom-element-has-tooltip-on-click"),L.Events.listen({type:"click",instance:this.__dummyInst,node:this.__element,call:(b=this,function(n){n.hasModifierKey()||b.show()})}))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Tooltip,n),Tooltip.prototype.initOpts=function(){Tooltip.__super__.initOpts.call(this),this.mergeOpts({element:{mandatory:!0}}),this.addOpts({text:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}},markdown:{mandatory:!0,default:!1,check:Boolean},content:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)||L.util.isElement(n)||L.util.isArray(n)||L.util.isElement(null!=n?n.DOM:void 0)}},on_click:{mandatory:!0,default:!1,check:Boolean},on_hover:{check:function(n){return L.util.isBoolean(n)||L.util.isFunction(n)}}})},Tooltip.prototype.readOpts=function(){return this.opts.hasOwnProperty("on_hover")||(this.opts.on_hover=!this.opts.on_click),this.opts.on_click&&(this.opts.backdrop||(this.opts.backdrop={}),this.opts.backdrop.policy||(this.opts.backdrop.policy="click")),L.util.isUndef(this.opts.backdrop)&&(this.opts.backdrop=!1),this.opts.pointer="arrow",this.opts.check_for_element=!0,this.opts.placement=this.opts.placement||"n",Tooltip.__super__.readOpts.call(this),L.util.assert(!(this._on_click&&this._on_hover),"new CUI.Tooltip","opts.on_click and opts.on_hover cannot be used together.",{opts:this.opts}),this},Tooltip.current=null,Tooltip.prototype.setElement=function(){},Tooltip.prototype.focusOnHide=function(n){},Tooltip.prototype.focusOnShow=function(n){},Tooltip.prototype.showTimeout=function(){var n,b;return null!=(n=this.__mouseStillEvent)&&n.destroy(),this.__mouseStillEvent=new L.Events.MouseIsStill({ms:this._show_ms,node:this._element,call:(b=this,function(n){var A,R,D,B;return b.show(n),B=!1,D=!0,A=null,R=function(n){return L.clearTimeout(A),A=L.setTimeout({ms:b._hide_ms+100,call:function(){B||D||b.hide(n)}})},L.Events.listen({type:["mouseout","mouseenter"],capture:!0,node:b.DOM,call:function(n){(B="mouseenter"===n.getType())||R(n)}}),L.Events.listen({type:["mouseout","mouseenter"],capture:!0,node:b._element,call:function(n){(D="mouseenter"===n.getType())||R(n)}}),L.Events.listen({type:["click","dblclick"],capture:!0,node:b._element,only_once:!0,call:function(n){return L.setTimeout({ms:b._hide_ms,call:function(){return b.hide(n)}})}})})}),this.__mouseStillEvent},Tooltip.prototype.hide=function(){var n;return null!=(n=this.__keyUpListener)&&n.destroy(),Tooltip.__super__.hide.call(this)},Tooltip.prototype.show=function(n){var b;return this.__keyUpListener=L.Events.listen({type:"keyup",node:window,capture:!0,call:(b=this,function(n){"Esc"===n.getKeyboardKey()&&b.hide()})}),this.__static?Tooltip.__super__.show.call(this,n):this.fillContent().done(function(b){return function(){return Tooltip.__super__.show.call(b,n)}}(this)),this},Tooltip.prototype.getElementOpenClass=function(){return null},Tooltip.prototype.fillContent=function(){var n,b,A,R,D;return(n=new L.Deferred).fail((D=this,function(){if(!D.__pane.isDestroyed())return D.__pane.empty("center")})),A=function(A){return function(R){return L.util.isEmpty(R)?n.reject():b(new L.Label({markdown:A._markdown,text:R,multiline:!0}))}}(this),b=function(b){return function(A){return!A||b.__pane.isDestroyed()?n.reject():(L.dom.setAttribute(A,"role","tooltip"),b.__pane.replace(A,"center"),n.resolve())}}(this),L.util.isFunction(this._text)?(R=this._text.call(this,this),L.util.isPromise(R)?(R.done((function(n){return A(n)})),R.fail((function(){return n.reject()}))):A(R)):L.util.isFunction(this._content)?(R=this._content.call(this,this),L.util.isPromise(R)?(R.done((function(n){return b(n)})),R.fail((function(b){return n.reject(b)}))):b(R)):L.util.isEmpty(this._text)?b(this._content):A(this._text),L.util.isFunction(this._text)||L.util.isFunction(this._content)?this.__static=!1:this.__static=!0,n.promise()},Tooltip.prototype.preventOverflow=function(){return Tooltip.__super__.preventOverflow.call(this),L.dom.width(this.DOM,this.__layer_dim._css_width)},Tooltip.prototype.resetLayer=function(){return Tooltip.__super__.resetLayer.call(this),L.dom.setStyleOne(this.DOM,"max-width",this.__viewport.width/2)},Tooltip.prototype.destroy=function(){var n,b;return null!=(n=this.__keyUpListener)&&n.destroy(),null!=(b=this.__mouseStillEvent)&&b.destroy(),L.Events.ignore({instance:this.__dummyInst}),Tooltip.__super__.destroy.call(this),L.dom.removeClass(this.__element,"cui-dom-element-has-tooltip-on-hover cui-dom-element-has-tooltip-on-click")},Tooltip}(L.LayerPane)},3066:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?"vertical-layout-top-center":D.call(n,"bottom")>=0?"vertical-layout-center-bottom":"vertical-layout-center"},VerticalLayout.prototype.getMapPrefix=function(){return"cui-vertical-layout"},VerticalLayout.prototype.hasFlexHandles=function(){var n,b;return!(!(null!=(n=this._top)?n.flexHandle:void 0)&&!(null!=(b=this._bottom)?b.flexHandle:void 0))},VerticalLayout.prototype.getPanes=function(){var n;return this.hasFlexHandles()?["top","bottom"]:(n=[],this._top&&n.push("top"),this._bottom&&n.push("bottom"),n)},VerticalLayout.prototype.getSupportedPanes=function(){return["top","bottom"]},VerticalLayout}(L.Layout)},9598:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.VerticalList=function(n){function VerticalList(){return VerticalList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(VerticalList,n),VerticalList.prototype.initOpts=function(){return VerticalList.__super__.initOpts.call(this),this.mergeOpt("maximize",{default:!1}),this.removeOpt("center"),this.addOpts({content:{}})},VerticalList.prototype.readOpts=function(){return VerticalList.__super__.readOpts.call(this),this._center={content:this._content}},VerticalList.prototype.getSupportedPanes=function(){return[]},VerticalList}(L.VerticalLayout)},1824:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(560)),L.WaitBlock=function(n){function WaitBlock(n){WaitBlock.__super__.constructor.call(this,n),this._inactive&&L.dom.addClass(this.DOM,"cui-wait-block-inactive"),this._fullscreen&&L.dom.addClass(this.DOM,"cui-wait-block-fullscreen")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(WaitBlock,n),WaitBlock.prototype.initOpts=function(){return WaitBlock.__super__.initOpts.call(this),this.mergeOpt("icon",{check:function(n){return n instanceof L.Icon||L.util.isString(n)}}),this.removeOpt("header"),this.removeOpt("content"),this.addOpts({inactive:{check:Boolean},element:{check:function(n){return L.util.isElement(n)||L.util.isElement(n.DOM)}},fullscreen:{check:Boolean}})},WaitBlock.prototype.readOpts=function(){return WaitBlock.__super__.readOpts.call(this),L.util.assert(L.util.xor(this._element,this._fullscreen),"new CUI.WaitBlock","opts.element or opt.fullscreen needs to be set.",{opts:this.opts}),this._fullscreen?this.__element=document.body:this._element.DOM?this.__element=this._element.DOM:this.__element=this._element,this._inactive||this.opts.hasOwnProperty("icon")||(this._icon="spinner"),this.__shown=!1,this.__savedPosition=null,this},WaitBlock.prototype.getTemplateName=function(){return"wait-block"},WaitBlock.prototype.show=function(){return L.dom.isPositioned(this.__element)?this.__savedPosition=null:(this.__savedPosition=L.dom.getComputedStyle(this.__element).position,L.dom.setStyleOne(this.__element,"position","relative")),L.dom.addClass(this.__element.DOM,"cui-wait-block-active"),this._fullscreen,L.dom.append(this.__element,this.DOM),this.__shown=!0,this},WaitBlock.prototype.isShown=function(){return!!this.__shown},WaitBlock.prototype.hide=function(){return this.isShown()?(L.dom.remove(this.DOM),null!==this.__savedPosition&&L.dom.setStyleOne(this.__element,"position",this.__savedPosition),L.dom.removeClass(this.__element,"cui-wait-block-active"),this.__shown=!1,this.__savedPosition=null,this):this},WaitBlock.prototype.destroy=function(){return this.hide(),WaitBlock.__super__.destroy.call(this)},WaitBlock}(L.Block)},1395:(n,b,A)=>{var L;L=A(7288),A(5797),A(2707),A(5412),A(1852),A(1007),A(7199),A(3599),A(7343),A(320),A(8784),A(6814),A(5462),A(1051),A(1123),A(283),A(9328),A(8952),A(4339),A(3328),A(9892),A(3876),A(3740),A(2305),A(9628),A(9652),A(14),A(3986),A(674),A(4204),A(5982),A(1412),A(2734),A(2536),A(9248),A(5533),A(580),A(6286),A(1884),A(5563),A(6499),A(4276),A(3245),A(8147),A(9840),A(840),A(1824),A(1934),A(6820),A(5734),A(3066),A(9598),A(8986),A(7256),A(6110),A(2459),A(844),A(5101),A(9523),A(2389),A(4949),A(8126),A(6828),A(2136),A(1946),A(4802),A(5148),A(4553),A(8528),A(5698),A(1104),A(5328),A(7224),A(3764),A(8452),A(3307),A(6576),A(4669),A(7474),A(7227),A(5339),A(1993),A(9914),A(23),A(3325),A(4342),A(4473),A(4744),A(3696),A(1396),A(7752),A(3960),A(5370),A(5460),A(4708),A(7318),A(6760),A(6437),A(8644),A(6083),A(9172),A(9619),A(8533),A(9691),A(152),A(5682),A(8044),A(3890),A(7569),A(3736),A(8285),A(2864),A(2116),A(4016),A(8179),A(5558),A(3378),A(4168),A(4169),A(1240),A(3266),A(6800),A(7250),A(9064),A(9616),A(5860),A(2896),A(4682),A(4338),A(3218),A(8159),A(1144),A(6172),A(8200),A(9081),A(4126),A(4486),A(2827),A(3848),A(9316),A(309),A(8595),A(7816),A(8745),A(2295),A(7524),n.exports=L},6853:n=>{var b;b=class CoordinateNumber{constructor(n){n=this.normalizeCoordinateNumbers(n),this.sign=this.normalizedSignOf(n[0]),[this.degrees,this.minutes,this.seconds,this.milliseconds]=n.map(Math.abs)}normalizeCoordinateNumbers(n){var b,A,L,R,D;for(D=[0,0,0,0],A=L=0,R=n.length;L=0?1:-1}detectSpecialFormats(){if(this.degreesCanBeSpecial()){if(this.degreesCanBeMilliseconds())return this.degreesAsMilliseconds();if(this.degreesCanBeDegreesMinutesAndSeconds())return this.degreesAsDegreesMinutesAndSeconds();if(this.degreesCanBeDegreesAndMinutes())return this.degreesAsDegreesAndMinutes()}}degreesCanBeSpecial(){var n;return n=!1,this.minutes||this.seconds||(n=!0),n}degreesCanBeMilliseconds(){return this.degrees>909090}degreesAsMilliseconds(){return this.milliseconds=this.degrees,this.degrees=0}degreesCanBeDegreesMinutesAndSeconds(){return this.degrees>9090}degreesAsDegreesMinutesAndSeconds(){var n;return n=Math.floor(this.degrees/1e4),this.minutes=Math.floor((this.degrees-1e4*n)/100),this.seconds=Math.floor(this.degrees-1e4*n-100*this.minutes),this.degrees=n}degreesCanBeDegreesAndMinutes(){return this.degrees>360}degreesAsDegreesAndMinutes(){var n;return n=Math.floor(this.degrees/100),this.minutes=this.degrees-100*n,this.degrees=n}toDecimal(){return this.sign*(this.degrees+this.minutes/60+this.seconds/3600+this.milliseconds/36e5)}},n.exports=b},8214:(n,b,A)=>{var L,R,D;D=A(5775),L=A(6853),R=class Coordinates{constructor(n){this.coordinates=n,this.latitudeNumbers=null,this.longitudeNumbers=null,this.validate(),this.parse()}validate(){return(new D).validate(this.coordinates)}parse(){return this.groupCoordinateNumbers(),this.latitude=this.extractLatitude(),this.longitude=this.extractLongitude()}groupCoordinateNumbers(){var n,b;return b=(n=this.extractCoordinateNumbers(this.coordinates)).length/2,this.latitudeNumbers=n.slice(0,b),this.longitudeNumbers=n.slice(0-b)}extractCoordinateNumbers(n){return n.match(/-?\d+(\.\d+)?/g)}extractLatitude(){var n;return n=this.coordinateNumbersToDecimal(this.latitudeNumbers),this.latitudeIsNegative()&&(n*=-1),n}extractLongitude(){var n;return n=this.coordinateNumbersToDecimal(this.longitudeNumbers),this.longitudeIsNegative()&&(n*=-1),n}coordinateNumbersToDecimal(n){var b;return(b=new L(n)).detectSpecialFormats(),b.toDecimal()}latitudeIsNegative(){return this.coordinates.match(/s/i)}longitudeIsNegative(){return this.coordinates.match(/w/i)}getLatitude(){return this.latitude}getLongitude(){return this.longitude}},n.exports=R},5775:n=>{var b;b=class Validator{isValid(n){var b;b=!0;try{return this.validate(n),b}catch(n){return b=!1}}validate(n){return this.checkContainsNoLetters(n),this.checkValidOrientation(n),this.checkNumbers(n)}checkContainsNoLetters(n){if(/(?![neswd])[a-z]/i.test(n))throw new Error("Coordinate contains invalid alphanumeric characters.")}checkValidOrientation(n){if(!/^[^nsew]*[ns]?[^nsew]*[ew]?[^nsew]*$/i.test(n))throw new Error("Invalid cardinal direction.")}checkNumbers(n){var b;return b=n.match(/-?\d+(\.\d+)?/g),this.checkAnyCoordinateNumbers(b),this.checkEvenCoordinateNumbers(b),this.checkMaximumCoordinateNumbers(b)}checkAnyCoordinateNumbers(n){if(0===n.length)throw new Error("Could not find any coordinate number")}checkEvenCoordinateNumbers(n){if(n.length%2)throw new Error("Uneven count of latitude/longitude numbers")}checkMaximumCoordinateNumbers(n){if(n.length>6)throw new Error("Too many coordinate numbers")}},n.exports=b},5023:function(n){!function(b){"use strict";function parse5322(n){function inStr(){return A0&&(b.semantic=" "),b}}function star(n,b){return function starFunc(){var A,L,R,D,B;for(D=getPos(),A=o("star"),R=0,B=void 0===b?0:b;null!==(L=n());)R+=1,add(A,L);return R>=B?A:(setPos(D),null)}}function isUTF8NonAscii(n){return n.charCodeAt(0)>=128}function cr(){return wrap("cr",literal("\r")())}function crlf(){return wrap("crlf",and(cr,lf)())}function dquote(){return wrap("dquote",literal('"')())}function htab(){return wrap("htab",literal("\t")())}function lf(){return wrap("lf",literal("\n")())}function sp(){return wrap("sp",literal(" ")())}function vchar(){return wrap("vchar",compareToken((function vcharFunc(b){var A=b.charCodeAt(0),L=33<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L})))}function wsp(){return wrap("wsp",or(sp,htab)())}function quotedPair(){var n=wrap("quoted-pair",or(and(literal("\\"),or(vchar,wsp)),obsQP)());return null===n?null:(n.semantic=n.semantic[1],n)}function fws(){return wrap("fws",or(obsFws,and(opt(and(star(wsp),invis(crlf))),star(wsp,1)))())}function ctext(){return wrap("ctext",or((function ctextFunc1(){return compareToken((function ctextFunc2(b){var A=b.charCodeAt(0),L=33<=A&&A<=39||42<=A&&A<=91||93<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsCtext)())}function ccontent(){return wrap("ccontent",or(ctext,quotedPair,comment)())}function comment(){return wrap("comment",and(literal("("),star(and(opt(fws),ccontent)),opt(fws),literal(")"))())}function cfws(){return wrap("cfws",or(and(star(and(opt(fws),comment),1),opt(fws)),fws)())}function atext(){return wrap("atext",compareToken((function atextFunc(b){var A="a"<=b&&b<="z"||"A"<=b&&b<="Z"||"0"<=b&&b<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(b)>=0;return n.rfc6532&&(A=A||isUTF8NonAscii(b)),A})))}function atom(){return wrap("atom",and(colwsp(opt(cfws)),star(atext,1),colwsp(opt(cfws)))())}function dotAtomText(){var n,b;return null===(n=wrap("dot-atom-text",star(atext,1)()))||null!==(b=star(and(literal("."),star(atext,1)))())&&add(n,b),n}function dotAtom(){return wrap("dot-atom",and(invis(opt(cfws)),dotAtomText,invis(opt(cfws)))())}function qtext(){return wrap("qtext",or((function qtextFunc1(){return compareToken((function qtextFunc2(b){var A=b.charCodeAt(0),L=33===A||35<=A&&A<=91||93<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsQtext)())}function qcontent(){return wrap("qcontent",or(qtext,quotedPair)())}function quotedString(){return wrap("quoted-string",and(invis(opt(cfws)),invis(dquote),star(and(opt(colwsp(fws)),qcontent)),opt(invis(fws)),invis(dquote),invis(opt(cfws)))())}function word(){return wrap("word",or(atom,quotedString)())}function address(){return wrap("address",or(mailbox,group)())}function mailbox(){return wrap("mailbox",or(nameAddr,addrSpec)())}function nameAddr(){return wrap("name-addr",and(opt(displayName),angleAddr)())}function angleAddr(){return wrap("angle-addr",or(and(invis(opt(cfws)),literal("<"),addrSpec,literal(">"),invis(opt(cfws))),obsAngleAddr)())}function group(){return wrap("group",and(displayName,literal(":"),opt(groupList),literal(";"),invis(opt(cfws)))())}function displayName(){return wrap("display-name",function phraseFixedSemantic(){var n=function phrase(){return wrap("phrase",or(obsPhrase,star(word,1))())}();return null!==n&&(n.semantic=function collapseWhitespace(n){return n.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(n.semantic)),n}())}function mailboxList(){return wrap("mailbox-list",or(and(mailbox,star(and(literal(","),mailbox))),obsMboxList)())}function addressList(){return wrap("address-list",or(and(address,star(and(literal(n.addressListSeparator),address))),obsAddrList)())}function groupList(){return wrap("group-list",or(mailboxList,invis(cfws),obsGroupList)())}function localPart(){return wrap("local-part",or(obsLocalPart,dotAtom,quotedString)())}function dtext(){return wrap("dtext",or((function dtextFunc1(){return compareToken((function dtextFunc2(b){var A=b.charCodeAt(0),L=33<=A&&A<=90||94<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsDtext)())}function domainLiteral(){return wrap("domain-literal",and(invis(opt(cfws)),literal("["),star(and(opt(fws),dtext)),opt(fws),literal("]"),invis(opt(cfws)))())}function domain(){return wrap("domain",function domainCheckTLD(){var b=or(obsDomain,dotAtom,domainLiteral)();return n.rejectTLD&&b&&b.semantic&&b.semantic.indexOf(".")<0?null:(b&&(b.semantic=b.semantic.replace(/\s+/g,"")),b)}())}function addrSpec(){return wrap("addr-spec",and(localPart,literal("@"),domain)())}function obsNoWsCtl(){return n.strict?null:wrap("obs-NO-WS-CTL",compareToken((function(n){var b=n.charCodeAt(0);return 1<=b&&b<=8||11===b||12===b||14<=b&&b<=31||127===b})))}function obsCtext(){return n.strict?null:wrap("obs-ctext",obsNoWsCtl())}function obsQtext(){return n.strict?null:wrap("obs-qtext",obsNoWsCtl())}function obsQP(){return n.strict?null:wrap("obs-qp",and(literal("\\"),or(literal("\0"),obsNoWsCtl,lf,cr))())}function obsPhrase(){return n.strict?null:wrap("obs-phrase",and(word,star(or(word,literal("."),n.atInDisplayName?literal("@"):noop,n.commaInDisplayName?literal(","):noop,colwsp(cfws))))())}function obsFws(){return n.strict?null:wrap("obs-FWS",star(and(invis(opt(crlf)),wsp),1)())}function obsAngleAddr(){return n.strict?null:wrap("obs-angle-addr",and(invis(opt(cfws)),literal("<"),obsRoute,addrSpec,literal(">"),invis(opt(cfws)))())}function obsRoute(){return n.strict?null:wrap("obs-route",and(obsDomainList,literal(":"))())}function obsDomainList(){return n.strict?null:wrap("obs-domain-list",and(star(or(invis(cfws),literal(","))),literal("@"),domain,star(and(literal(","),invis(opt(cfws)),opt(and(literal("@"),domain)))))())}function obsMboxList(){return n.strict?null:wrap("obs-mbox-list",and(star(and(invis(opt(cfws)),literal(","))),mailbox,star(and(literal(","),opt(and(mailbox,invis(cfws))))))())}function obsAddrList(){return n.strict?null:wrap("obs-addr-list",and(star(and(invis(opt(cfws)),literal(","))),address,star(and(literal(","),opt(and(address,invis(cfws))))))())}function obsGroupList(){return n.strict?null:wrap("obs-group-list",and(star(and(invis(opt(cfws)),literal(",")),1),invis(opt(cfws)))())}function obsLocalPart(){return n.strict?null:wrap("obs-local-part",and(word,star(and(literal("."),word)))())}function obsDomain(){return n.strict?null:wrap("obs-domain",and(atom,star(and(literal("."),atom)))())}function obsDtext(){return n.strict?null:wrap("obs-dtext",or(obsNoWsCtl,quotedPair)())}function findNode(n,b){var A,L,R;if(null==b)return null;for(L=[b];L.length>0;){if((R=L.pop()).name===n)return R;for(A=R.children.length-1;A>=0;A-=1)L.push(R.children[A])}return null}function findAllNodesNoChildren(n,b){var A,L,R,D,B;if(null==b)return null;for(L=[b],D=[],B={},A=0;A0;)if((R=L.pop()).name in B)D.push(R);else for(A=R.children.length-1;A>=0;A-=1)L.push(R.children[A]);return D}function giveResult(b){var A,L,R,D,B;if(null===b)return null;for(A=[],L=findAllNodesNoChildren(["group","mailbox"],b),R=0;R1)return null;return b.addresses&&b.addresses[0]}(B):n.simple?B&&B.addresses:B}function giveResultGroup(n){var b,A=findNode("display-name",n),L=[],R=findAllNodesNoChildren(["mailbox"],n);for(b=0;b0;)for((R=L.pop()).name===n&&D.push(R),A=R.children.length-1;A>=0;A-=1)L.push(R.children[A]);return D}("cfws",n),R=findAllNodesNoChildren(["comment"],n),D=findNode("local-part",A),B=findNode("domain",A);return{node:n,parts:{name:b,address:A,local:D,domain:B,comments:L},type:n.name,name:grabSemantic(b),address:grabSemantic(A),local:grabSemantic(D),domain:grabSemantic(B),comments:concatComments(R),groupName:grabSemantic(n.groupName)}}function grabSemantic(n){return null!=n?n.semantic:null}function concatComments(n){var b="";if(n)for(var A=0;A{function Coords(){}Coords.prototype.init=function(){if(!arguments.length)throw new Error("no arguments");if(arguments[0].lat&&arguments[0].lng)this.lat=arguments[0].lat,this.lon=arguments[0].lng;else if("string"==typeof arguments[0]){var n=arguments[0].split(",");this.lat=parseFloat(n[0].trim()),this.lon=parseFloat(n[1].trim())}else if("[object Array]"===Object.prototype.toString.call(arguments[0])){var b=arguments[0];!0===arguments[1]?(this.lat=b[1],this.lon=b[0]):(this.lat=b[0],this.lon=b[1])}else!0===arguments[2]?(this.lat=arguments[1],this.lon=arguments[0]):(this.lat=arguments[0],this.lon=arguments[1]);this.compute()},Coords.prototype.compute=function(){function computeFor(n){var b={};return b.initValue=n,b.degrees=Math.abs(n),b.degreesInt=Math.floor(b.degrees),b.degreesFrac=b.degrees-b.degreesInt,b.secondsTotal=3600*b.degreesFrac,b.minutes=b.secondsTotal/60,b.minutesInt=Math.floor(b.minutes),b.seconds=b.secondsTotal-60*b.minutesInt,b}this.north=this.lat>0,this.east=this.lon>0,this.latValues=computeFor(this.lat),this.lonValues=computeFor(this.lon)};var b={FFf:"DD MM ss X",Ff:"DD mm X",f:"dd X"},A="°",L="′",R="″";Coords.prototype.format=function(n,D){if("object"==typeof n){D=n,n="FFf"}(void 0===n&&(n="FFf"),void 0===D&&(D={}),"string"==typeof D)&&(D={latLonSeparator:D});void 0===D.latLonSeparator&&(D.latLonSeparator=" "),void 0===D.decimalPlaces?D.decimalPlaces=5:D.decimalPlaces=parseInt(D.decimalPlaces),Object.keys(b).indexOf(n)>-1&&(n=b[n]);var B=formatFor(this.latValues,this.north?"N":"S"),E=formatFor(this.lonValues,this.east?"E":"W");function formatFor(b,B){var E=n;return E=(E=(E=(E=(E=(E=(E=(E=(E=(E=(E=(E=E.replace(/DD/g,b.degreesInt+A)).replace(/dd/g,b.degrees.toFixed(D.decimalPlaces)+A)).replace(/D/g,b.degreesInt)).replace(/d/g,b.degrees.toFixed(D.decimalPlaces))).replace(/MM/g,b.minutesInt+L)).replace(/mm/g,b.minutes.toFixed(D.decimalPlaces)+L)).replace(/M/g,b.minutesInt)).replace(/m/g,b.minutes.toFixed(D.decimalPlaces))).replace(/ss/g,b.seconds.toFixed(D.decimalPlaces)+R)).replace(/s/g,b.seconds.toFixed(D.decimalPlaces))).replace(/-/g,b.initValue<0?"-":"")).replace(/X/g,B)}return B+D.latLonSeparator+E},n.exports=function formatcoords(){var n=new Coords;return n.init.apply(n,arguments),n}},5936:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},6120:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n
\n
\n\n'},6680:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
'},1138:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t
\n
\n'},5938:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'},7467:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n
\n
\n
\n
\n'},7761:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n
\n'},3786:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n'},7005:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n'},6932:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\t\x3c!--\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t
--\x3e\n
\n
\n\t
\n\t
\n
\n'},4444:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n\n'},9158:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n
\n\n\n'},1864:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},3372:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n
\n\t
\n
\n
\n\t
\n\t\t
\n\t\t
\n\t
\n
'},4484:n=>{n.exports='© OpenStreetMap contributors'},5737:n=>{n.exports='
\n
\n
\n
\n
\n\n
\n
\n
\n
'},7540:n=>{n.exports='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'},66:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n'},792:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n'},1648:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n'},1682:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t
\n
\n
Placeholder
\n'},604:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t\t
\n\t
\n
'},7939:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n
'},1588:n=>{n.exports="
\n\t
\n\t
\n\t\t
\n\t
\n
\n\n"},5130:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n
'},7963:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},3081:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
'},6498:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n
\n'},560:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n
'},2989:function(n,b,A){!function(n){"use strict";function _detectIconOptions(b,A){var L=n.DomUtil.create("div",b,document.body),R=_extractUrls(_getBkgImageOrCursor(L),A),D=_getStyleInt(L,"width"),B=_getStyleInt(L,"height"),E=_getStyleInt(L,"margin-left"),X=_getStyleInt(L,"margin-top");return L.parentNode.removeChild(L),{Url:R[0],RetinaUrl:R[1],Size:[D,B],Anchor:[-E,-X]}}function _detectDivOverlayOptions(b){var A=n.DomUtil.create("div",b,document.body),L=_getStyleInt(A,"margin-left"),R=_getStyleInt(A,"margin-top");return A.parentNode.removeChild(A),{Anchor:[L,R]}}function _extractUrls(n,b){for(var A=/url\(['"]?([^"']*?)['"]?\)/gi,L=[],R=A.exec(n);R;)L.push(b?_stripPath(R[1]):R[1]),R=A.exec(n);return L}function _stripPath(n){return n.substr(n.lastIndexOf("/")+1)}function _getStyleInt(n,b){return parseInt(_getStyle(n,b),10)}function _getStyle(b,A){return n.DomUtil.getStyle(b,A)||n.DomUtil.getStyle(b,_kebabToCamelCase(A))}function _getBkgImageOrCursor(n){var b=_getStyle(n,"background-image");return b&&"none"!==b?b:_getStyle(n,"cursor")}function _kebabToCamelCase(n){return n.replace(/-(\w)/g,(function(n,b){return b.toUpperCase()}))}n.Icon.Default.mergeOptions({iconUrl:null,iconRetinaUrl:null,shadowUrl:null,iconSize:null,iconAnchor:null,popupAnchor:null,tooltipAnchor:null,shadowSize:null,classNamePrefix:"leaflet-default-icon-"}),n.Icon.Default.include({_needsInit:!0,_getIconUrl:function(b){var A=this.options.imagePath||n.Icon.Default.imagePath||"";return this._needsInit&&this._initializeOptions(A),A+n.Icon.prototype._getIconUrl.call(this,b)},_initializeOptions:function(n){this._setOptions("icon",_detectIconOptions,n),this._setOptions("shadow",_detectIconOptions,n),this._setOptions("popup",_detectDivOverlayOptions),this._setOptions("tooltip",_detectDivOverlayOptions),this._needsInit=!1},_setOptions:function(n,b,A){var L=this.options,R=b(L.classNamePrefix+n,A);for(var D in R)L[n+D]=L[n+D]||R[D]}})}(A(6541))},6541:function(n,b){ +"use strict";var L=n("./dom");b.get=function(n,b){var A=new XMLHttpRequest;A.open("GET",n,!0),A.onreadystatechange=function(){4===A.readyState&&b(A.responseText)},A.send(null)},b.loadScript=function(n,b){var A=L.getDocumentHead(),R=document.createElement("script");R.src=n,A.appendChild(R),R.onload=R.onreadystatechange=function(n,A){!A&&R.readyState&&"loaded"!=R.readyState&&"complete"!=R.readyState||(R=R.onload=R.onreadystatechange=null,A||b())}},b.qualifyURL=function(n){var b=document.createElement("a");return b.href=n,b.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(n,b,A){"use strict";b.inherits=function(n,b){n.super_=b,n.prototype=Object.create(b.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})},b.mixin=function(n,b){for(var A in b)n[A]=b[A];return n},b.implement=function(n,A){b.mixin(n,A)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(n,b,A){"use strict";var L={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};L._emit=L._dispatchEvent=function(n,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var A=this._eventRegistry[n]||[],L=this._defaultHandlers[n];if(A.length||L){"object"==typeof b&&b||(b={}),b.type||(b.type=n),b.stopPropagation||(b.stopPropagation=stopPropagation),b.preventDefault||(b.preventDefault=preventDefault),A=A.slice();for(var R=0;R1&&(R=A[A.length-2]);var B=E[b+"Path"];return null==B?B=E.basePath:"/"==L&&(b=L=""),B&&"/"!=B.slice(-1)&&(B+="/"),B+b+L+R+this.get("suffix")},b.setModuleUrl=function(n,b){return E.$moduleUrls[n]=b};var X;b.setLoader=function(n){X=n},b.dynamicModules=Object.create(null),b.$loading={},b.$loaded={},b.loadModule=function(A,L){var D;if(Array.isArray(A))var B=A[0],E=A[1];else if("string"==typeof A)E=A;var load=function(A){if(A&&!b.$loading[E])return L&&L(A);if(b.$loading[E]||(b.$loading[E]=[]),b.$loading[E].push(L),!(b.$loading[E].length>1)){var afterLoad=function(){!function(b,A){"ace/theme/textmate"===b||"./theme/textmate"===b?A(null,n("./theme/textmate")):X?X(b,A):console.error("loader is not configured")}(E,(function(n,A){A&&(b.$loaded[E]=A),b._emit("load.module",{name:E,module:A});var L=b.$loading[E];b.$loading[E]=null,L.forEach((function(n){n&&n(A)}))}))};if(!b.get("packaged"))return afterLoad();R.loadScript(b.moduleUrl(E,B),afterLoad),reportErrorIfPathIsNotConfigured()}};if(b.dynamicModules[E])b.dynamicModules[E]().then((function(n){n.default?load(n.default):load(n)}));else{try{D=this.$require(E)}catch(n){}load(D||b.$loaded[E])}},b.$require=function(n){if("function"==typeof A.require){return A.require(n)}},b.setModuleLoader=function(n,A){b.dynamicModules[n]=A};var reportErrorIfPathIsNotConfigured=function(){E.basePath||E.workerPath||E.modePath||E.themePath||Object.keys(E.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),reportErrorIfPathIsNotConfigured=function(){})};b.version="1.36.2"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(n,b,L){"use strict";n("./lib/fixoldbrowsers");var R=n("./config");R.setLoader((function(b,A){n([b],(function(n){A(null,n)}))}));var D=function(){return this||"undefined"!=typeof window&&window}();function init(b){if(D&&D.document){R.set("packaged",b||n.packaged||L.packaged||D.define&&A.amdD.packaged);var B={},E="",X=document.currentScript||document._currentScript,$=X&&X.ownerDocument||document;X&&X.src&&(E=X.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var V,K=$.getElementsByTagName("script"),Q=0;Q ["+this.end.row+"/"+this.end.column+"]"},Range.prototype.contains=function(n,b){return 0==this.compare(n,b)},Range.prototype.compareRange=function(n){var b,A=n.end,L=n.start;return 1==(b=this.compare(A.row,A.column))?1==(b=this.compare(L.row,L.column))?2:0==b?1:0:-1==b?-2:-1==(b=this.compare(L.row,L.column))?-1:1==b?42:0},Range.prototype.comparePoint=function(n){return this.compare(n.row,n.column)},Range.prototype.containsRange=function(n){return 0==this.comparePoint(n.start)&&0==this.comparePoint(n.end)},Range.prototype.intersects=function(n){var b=this.compareRange(n);return-1==b||0==b||1==b},Range.prototype.isEnd=function(n,b){return this.end.row==n&&this.end.column==b},Range.prototype.isStart=function(n,b){return this.start.row==n&&this.start.column==b},Range.prototype.setStart=function(n,b){"object"==typeof n?(this.start.column=n.column,this.start.row=n.row):(this.start.row=n,this.start.column=b)},Range.prototype.setEnd=function(n,b){"object"==typeof n?(this.end.column=n.column,this.end.row=n.row):(this.end.row=n,this.end.column=b)},Range.prototype.inside=function(n,b){return 0==this.compare(n,b)&&(!this.isEnd(n,b)&&!this.isStart(n,b))},Range.prototype.insideStart=function(n,b){return 0==this.compare(n,b)&&!this.isEnd(n,b)},Range.prototype.insideEnd=function(n,b){return 0==this.compare(n,b)&&!this.isStart(n,b)},Range.prototype.compare=function(n,b){return this.isMultiLine()||n!==this.start.row?nthis.end.row?1:this.start.row===n?b>=this.start.column?0:-1:this.end.row===n?b<=this.end.column?0:1:0:bthis.end.column?1:0},Range.prototype.compareStart=function(n,b){return this.start.row==n&&this.start.column==b?-1:this.compare(n,b)},Range.prototype.compareEnd=function(n,b){return this.end.row==n&&this.end.column==b?1:this.compare(n,b)},Range.prototype.compareInside=function(n,b){return this.end.row==n&&this.end.column==b?1:this.start.row==n&&this.start.column==b?-1:this.compare(n,b)},Range.prototype.clipRows=function(n,b){if(this.end.row>b)var A={row:b+1,column:0};else if(this.end.rowb)var L={row:b+1,column:0};else if(this.start.row1?++K>4&&(K=1):K=1,D.isIE){var B=Math.abs(n.clientX-E)>5||Math.abs(n.clientY-$)>5;V&&!B||(K=1),V&&clearTimeout(V),V=setTimeout((function(){V=null}),A[K-1]||600),1==K&&(E=n.clientX,$=n.clientY)}if(n._clicks=K,L[R]("mousedown",n),K>4)K=0;else if(K>1)return L[R](Q[K],n)}Array.isArray(n)||(n=[n]),n.forEach((function(n){X(n,"mousedown",onMousedown,B)}))},b.getModifierString=function(n){return R.KEY_MODS[getModifierHash(n)]},b.addCommandKeyListener=function(n,A,L){var $=null;X(n,"keydown",(function(n){B[n.keyCode]=(B[n.keyCode]||0)+1;var b=function normalizeCommandKeys(n,b,A){var L=getModifierHash(b);if(!A&&b.code&&(A=R.$codeToKeyCode[b.code]||A),!D.isMac&&B){if(b.getModifierState&&(b.getModifierState("OS")||b.getModifierState("Win"))&&(L|=8),B.altGr){if(!(3&~L))return;B.altGr=0}if(18===A||17===A){var X=b.location;17===A&&1===X?1==B[A]&&(E=b.timeStamp):18===A&&3===L&&2===X&&b.timeStamp-E<50&&(B.altGr=!0)}}if(A in R.MODIFIER_KEYS&&(A=-1),L||13!==A||3!==b.location||(n(b,L,-A),!b.defaultPrevented)){if(D.isChromeOS&&8&L){if(n(b,L,A),b.defaultPrevented)return;L&=-9}return!!(L||A in R.FUNCTION_KEYS||A in R.PRINTABLE_KEYS)&&n(b,L,A)}}(A,n,n.keyCode);return $=n.defaultPrevented,b}),L),X(n,"keypress",(function(n){$&&(n.ctrlKey||n.altKey||n.shiftKey||n.metaKey)&&(b.stopEvent(n),$=null)}),L),X(n,"keyup",(function(n){B[n.keyCode]=null}),L),B||(resetPressedKeys(),X(window,"focus",resetPressedKeys))},"object"==typeof window&&window.postMessage&&!D.isOldIE){var V=1;b.nextTick=function(n,A){A=A||window;var L="zero-timeout-message-"+V++,listener=function(R){R.data==L&&(b.stopPropagation(R),$(A,"message",listener),n())};X(A,"message",listener),A.postMessage(L,"*")}}b.$idleBlocked=!1,b.onIdle=function(n,A){return setTimeout((function handler(){b.$idleBlocked?setTimeout(handler,100):n()}),A)},b.$idleBlockId=null,b.blockIdle=function(n){b.$idleBlockId&&clearTimeout(b.$idleBlockId),b.$idleBlocked=!0,b.$idleBlockId=setTimeout((function(){b.$idleBlocked=!1}),n||100)},b.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(n){setTimeout(n,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(n,b,A){"use strict";var L;A.exports={lineMode:!1,pasteCancelled:function(){return!!(L&&L>Date.now()-50)||(L=!1)},cancel:function(){L=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(n,b,A){"use strict";var L,R=n("../lib/event"),D=n("../config").nls,B=n("../lib/useragent"),E=n("../lib/dom"),X=n("../lib/lang"),$=n("../clipboard"),V=B.isChrome<18,K=B.isIE,Q=B.isChrome>63,tt=400,ot=n("../lib/keys"),nt=ot.KEY_MODS,it=B.isIOS,rt=it?/\s/:/\n/,st=B.isMobile;L=function(n,b){var A=E.createElement("textarea");A.className="ace_text-input",A.setAttribute("wrap","off"),A.setAttribute("autocorrect","off"),A.setAttribute("autocapitalize","off"),A.setAttribute("spellcheck","false"),A.style.opacity="0",n.insertBefore(A,n.firstChild);var L=!1,pt=!1,lt=!1,ut=!1,bt="";st||(A.style.fontSize="1px");var Mt=!1,zt=!1,Ot="",ft=0,mt=0,_t=0,gt=Number.MAX_SAFE_INTEGER,At=Number.MIN_SAFE_INTEGER,yt=0;try{var qt=document.activeElement===A}catch(n){}this.setNumberOfExtraLines=function(n){gt=Number.MAX_SAFE_INTEGER,At=Number.MIN_SAFE_INTEGER,yt=n<0?0:n},this.setAriaOptions=function(n){if(n.activeDescendant?(A.setAttribute("aria-haspopup","true"),A.setAttribute("aria-autocomplete",n.inline?"both":"list"),A.setAttribute("aria-activedescendant",n.activeDescendant)):(A.setAttribute("aria-haspopup","false"),A.setAttribute("aria-autocomplete","both"),A.removeAttribute("aria-activedescendant")),n.role&&A.setAttribute("role",n.role),n.setLabel){A.setAttribute("aria-roledescription",D("text-input.aria-roledescription","editor"));var L="";if(b.$textInputAriaLabel&&(L+="".concat(b.$textInputAriaLabel,", ")),b.session){var R=b.session.selection.cursor.row;L+=D("text-input.aria-label","Cursor at row $0",[R+1])}A.setAttribute("aria-label",L)}},this.setAriaOptions({role:"textbox"}),R.addListener(A,"blur",(function(n){zt||(b.onBlur(n),qt=!1)}),b),R.addListener(A,"focus",(function(n){if(!zt){if(qt=!0,B.isEdge)try{if(!document.hasFocus())return}catch(n){}b.onFocus(n),B.isEdge?setTimeout(vt):vt()}}),b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),bt||Q||"browser"==this.$focusScroll)return A.focus({preventScroll:!0});var n=A.style.top;A.style.position="fixed",A.style.top="0px";try{var L=0!=A.getBoundingClientRect().top}catch(n){return}var R=[];if(L)for(var D=A.parentElement;D&&1==D.nodeType;)R.push(D),D.setAttribute("ace_nocontext","true"),D=!D.parentElement&&D.getRootNode?D.getRootNode().host:D.parentElement;A.focus({preventScroll:!0}),L&&R.forEach((function(n){n.removeAttribute("ace_nocontext")})),setTimeout((function(){A.style.position="","0px"==A.style.top&&(A.style.top=n)}),0)},this.blur=function(){A.blur()},this.isFocused=function(){return qt},b.on("beforeEndOperation",(function(){var n=b.curOp,L=n&&n.command&&n.command.name;if("insertstring"!=L){var R=L&&(n.docChanged||n.selectionChanged);lt&&R&&(Ot=A.value="",onCompositionEnd()),vt()}}));var positionToSelection=function(n,A){for(var L=A,R=1;R<=n-gt&&R<2*yt+1;R++)L+=b.session.getLine(n-R).length+1;return L},vt=it?function(n){if(qt&&(!L||n)&&!ut){n||(n="");var R="\n ab"+n+"cde fg\n";R!=A.value&&(A.value=Ot=R);var D=4+(n.length||(b.selection.isEmpty()?0:1));4==ft&&mt==D||A.setSelectionRange(4,D),ft=4,mt=D}}:function(){if(!lt&&!ut&&(qt||wt)){lt=!0;var n=0,L=0,R="";if(b.session){var D=b.selection,B=D.getRange(),E=D.cursor.row;E===At+1?At=(gt=At+1)+2*yt:E===gt-1?gt=(At=gt-1)-2*yt:(EAt+1)&&(gt=E>yt?E-yt:0,At=E>yt?E+yt:2*yt);for(var X=[],$=gt;$<=At;$++)X.push(b.session.getLine($));if(R=X.join("\n"),n=positionToSelection(B.start.row,B.start.column),L=positionToSelection(B.end.row,B.end.column),B.start.rowAt){var K=b.session.getLine(At+1);L=B.end.row>At+1?K.length:B.end.column,L+=R.length+1,R=R+"\n"+K}else st&&E>0&&(R="\n"+R,L+=1,n+=1);R.length>tt&&(n0&&Ot[Q]==n[Q];)Q++,E--;for($=$.slice(Q),Q=1;X>0&&Ot.length-Q>ft-1&&Ot[Ot.length-Q]==n[n.length-Q];)Q++,X--;V-=Q-1,K-=Q-1;var tt=$.length-Q+1;if(tt<0&&(E=-tt,tt=0),$=$.slice(0,tt),!(L||$||V||E||X||K))return"";ut=!0;var ot=!1;return B.isAndroid&&". "==$&&($=" ",ot=!0),$&&!E&&!X&&!V&&!K||Mt?b.onTextInput($):b.onTextInput($,{extendLeft:E,extendRight:X,restoreStart:V,restoreEnd:K}),ut=!1,Ot=n,ft=R,mt=D,_t=K,ot?"\n":$},onInput=function(n){if(lt)return onCompositionUpdate();if(n&&n.inputType){if("historyUndo"==n.inputType)return b.execCommand("undo");if("historyRedo"==n.inputType)return b.execCommand("redo")}var L=A.value,R=sendText(L,!0);(L.length>500||rt.test(R)||st&&ft<1&&ft==mt)&&vt()},handleClipboardData=function(n,b,A){var L=n.clipboardData||window.clipboardData;if(L&&!V){var R=K||A?"Text":"text/plain";try{return b?!1!==L.setData(R,b):L.getData(R)}catch(n){if(!A)return handleClipboardData(n,b,!0)}}},doCopy=function(n,D){var B=b.getCopyText();if(!B)return R.preventDefault(n);handleClipboardData(n,B)?(it&&(vt(B),L=B,setTimeout((function(){L=!1}),10)),D?b.onCut():b.onCopy(),R.preventDefault(n)):(L=!0,A.value=B,A.select(),setTimeout((function(){L=!1,vt(),D?b.onCut():b.onCopy()})))},onCut=function(n){doCopy(n,!0)},onCopy=function(n){doCopy(n,!1)},onPaste=function(n){var L=handleClipboardData(n);$.pasteCancelled()||("string"==typeof L?(L&&b.onPaste(L,n),B.isIE&&setTimeout(vt),R.preventDefault(n)):(A.value="",pt=!0))};R.addCommandKeyListener(A,(function(n,A,L){if(!lt)return b.onCommandKey(n,A,L)}),b),R.addListener(A,"select",(function(n){lt||(L?L=!1:!function(n){return 0===n.selectionStart&&n.selectionEnd>=Ot.length&&n.value===Ot&&Ot&&n.selectionEnd!==mt}(A)?st&&A.selectionStart!=ft&&vt():(b.selectAll(),vt()))}),b),R.addListener(A,"input",onInput,b),R.addListener(A,"cut",onCut,b),R.addListener(A,"copy",onCopy,b),R.addListener(A,"paste",onPaste,b),"oncut"in A&&"oncopy"in A&&"onpaste"in A||R.addListener(n,"keydown",(function(n){if((!B.isMac||n.metaKey)&&n.ctrlKey)switch(n.keyCode){case 67:onCopy(n);break;case 86:onPaste(n);break;case 88:onCut(n)}}),b);var onCompositionUpdate=function(){if(lt&&b.onCompositionUpdate&&!b.$readOnly){if(Mt)return cancelComposition();if(lt.useTextareaForIME)b.onCompositionUpdate(A.value);else{var n=A.value;sendText(n),lt.markerRange&&(lt.context&&(lt.markerRange.start.column=lt.selectionStart=lt.context.compositionStartOffset),lt.markerRange.end.column=lt.markerRange.start.column+mt-lt.selectionStart+_t)}}},onCompositionEnd=function(n){b.onCompositionEnd&&!b.$readOnly&&(lt=!1,b.onCompositionEnd(),b.off("mousedown",cancelComposition),n&&onInput())};function cancelComposition(){zt=!0,A.blur(),A.focus(),zt=!1}var Lt,Rt=X.delayedCall(onCompositionUpdate,50).schedule.bind(null,null);function onContextMenuClose(){clearTimeout(Lt),Lt=setTimeout((function(){bt&&(A.style.cssText=bt,bt=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()}),0)}R.addListener(A,"compositionstart",(function(n){if(!lt&&b.onCompositionStart&&!b.$readOnly&&(lt={},!Mt)){n.data&&(lt.useTextareaForIME=!1),setTimeout(onCompositionUpdate,0),b._signal("compositionStart"),b.on("mousedown",cancelComposition);var L=b.getSelectionRange();L.end.row=L.start.row,L.end.column=L.start.column,lt.markerRange=L,lt.selectionStart=ft,b.onCompositionStart(lt),lt.useTextareaForIME?(Ot=A.value="",ft=0,mt=0):(A.msGetInputContext&&(lt.context=A.msGetInputContext()),A.getInputContext&&(lt.context=A.getInputContext()))}}),b),R.addListener(A,"compositionupdate",onCompositionUpdate,b),R.addListener(A,"keyup",(function onKeyup(n){27==n.keyCode&&A.value.lengthmt&&"\n"==Ot[B]?E=ot.end:Rmt&&Ot.slice(0,B).split("\n").length>2?E=ot.down:B>mt&&" "==Ot[B-1]?(E=ot.right,X=nt.option):(B>mt||B==mt&&mt!=ft&&R==B)&&(E=ot.right),R!==B&&(X|=nt.shift),E){if(!b.onCommandKey({},X,E)&&b.commands){E=ot.keyCodeToString(E);var $=b.commands.findKeyCommand(X,E);$&&b.execCommand($)}ft=R,mt=B,vt("")}}};document.addEventListener("selectionchange",detectArrowKeys),b.on("destroy",(function(){document.removeEventListener("selectionchange",detectArrowKeys)}))}(0,b,A),this.destroy=function(){A.parentElement&&A.parentElement.removeChild(A)}},b.TextInput=L,b.$setUserAgentForTests=function(n,b){st=n,it=b}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(n,b,A){"use strict";var L=n("../lib/useragent"),R=function(){function DefaultHandlers(n){n.$clickSelection=null;var b=n.editor;b.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),b.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),b.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),b.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),b.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(b){n[b]=this[b]}),this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return DefaultHandlers.prototype.onMouseDown=function(n){var b=n.inSelection(),A=n.getDocumentPosition();this.mousedownEvent=n;var R=this.editor,D=n.getButton();return 0!==D?((R.getSelectionRange().isEmpty()||1==D)&&R.selection.moveToPosition(A),void(2==D&&(R.textInput.onContextMenu(n.domEvent),L.isMozilla||n.preventDefault()))):(this.mousedownEvent.time=Date.now(),!b||R.isFocused()||(R.focus(),!this.$focusTimeout||this.$clickSelection||R.inMultiSelectMode)?(this.captureMouse(n),this.startSelect(A,n.domEvent._clicks>1),n.preventDefault()):(this.setState("focusWait"),void this.captureMouse(n)))},DefaultHandlers.prototype.startSelect=function(n,b){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var A=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?A.selection.selectToPosition(n):b||A.selection.moveToPosition(n),b||this.select(),A.setStyle("ace_selecting"),this.setState("select"))},DefaultHandlers.prototype.select=function(){var n,b=this.editor,A=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var L=this.$clickSelection.comparePoint(A);if(-1==L)n=this.$clickSelection.end;else if(1==L)n=this.$clickSelection.start;else{var R=calcRangeOrientation(this.$clickSelection,A);A=R.cursor,n=R.anchor}b.selection.setSelectionAnchor(n.row,n.column)}b.selection.selectToPosition(A),b.renderer.scrollCursorIntoView()},DefaultHandlers.prototype.extendSelectionBy=function(n){var b,A=this.editor,L=A.renderer.screenToTextCoordinates(this.x,this.y),R=A.selection[n](L.row,L.column);if(this.$clickSelection){var D=this.$clickSelection.comparePoint(R.start),B=this.$clickSelection.comparePoint(R.end);if(-1==D&&B<=0)b=this.$clickSelection.end,R.end.row==L.row&&R.end.column==L.column||(L=R.start);else if(1==B&&D>=0)b=this.$clickSelection.start,R.start.row==L.row&&R.start.column==L.column||(L=R.end);else if(-1==D&&1==B)L=R.end,b=R.start;else{var E=calcRangeOrientation(this.$clickSelection,L);L=E.cursor,b=E.anchor}A.selection.setSelectionAnchor(b.row,b.column)}A.selection.selectToPosition(L),A.renderer.scrollCursorIntoView()},DefaultHandlers.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},DefaultHandlers.prototype.focusWait=function(){var n=function calcDistance(n,b,A,L){return Math.sqrt(Math.pow(A-n,2)+Math.pow(L-b,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(n>0||b-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},DefaultHandlers.prototype.onDoubleClick=function(n){var b=n.getDocumentPosition(),A=this.editor,L=A.session.getBracketRange(b);L?(L.isEmpty()&&(L.start.column--,L.end.column++),this.setState("select")):(L=A.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=L,this.select()},DefaultHandlers.prototype.onTripleClick=function(n){var b=n.getDocumentPosition(),A=this.editor;this.setState("selectByLines");var L=A.getSelectionRange();L.isMultiLine()&&L.contains(b.row,b.column)?(this.$clickSelection=A.selection.getLineRange(L.start.row),this.$clickSelection.end=A.selection.getLineRange(L.end.row).end):this.$clickSelection=A.selection.getLineRange(b.row),this.select()},DefaultHandlers.prototype.onQuadClick=function(n){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},DefaultHandlers.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var b=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var A=this.$lastScroll,L=n.domEvent.timeStamp,R=L-A.t,D=R?n.wheelX/R:A.vx,B=R?n.wheelY/R:A.vy;R<550&&(D=(D+A.vx)/2,B=(B+A.vy)/2);var E=Math.abs(D/B),X=!1;if(E>=1&&b.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(X=!0),E<=1&&b.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(X=!0),X)A.allowed=L;else if(L-A.allowed<550){Math.abs(D)<=1.5*Math.abs(A.vx)&&Math.abs(B)<=1.5*Math.abs(A.vy)?(X=!0,A.allowed=L):A.allowed=0}return A.t=L,A.vx=D,A.vy=B,X?(b.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()):void 0}},DefaultHandlers}();function calcRangeOrientation(n,b){if(n.start.row==n.end.row)var A=2*b.column-n.start.column-n.end.column;else if(n.start.row!=n.end.row-1||n.start.column||n.end.column)A=2*b.row-n.start.row-n.end.row;else var A=b.column-4;return A<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}R.prototype.selectEnd=R.prototype.selectByLinesEnd,R.prototype.selectAllEnd=R.prototype.selectByLinesEnd,R.prototype.selectByWordsEnd=R.prototype.selectByLinesEnd,b.DefaultHandlers=R})),ace.define("ace/lib/scroll",["require","exports","module"],(function(n,b,A){b.preventParentScroll=function preventParentScroll(n){n.stopPropagation();var b=n.currentTarget;b.scrollHeight>b.clientHeight||n.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=this&&this.__values||function(n){var b="function"==typeof Symbol&&Symbol.iterator,A=b&&n[b],L=0;if(A)return A.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&L>=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},B=n("./lib/dom"),E=(n("./lib/event"),n("./range").Range),X=n("./lib/scroll").preventParentScroll,$="ace_tooltip",V=function(){function Tooltip(n){this.isOpen=!1,this.$element=null,this.$parentNode=n}return Tooltip.prototype.$init=function(){return this.$element=B.createElement("div"),this.$element.className=$,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},Tooltip.prototype.getElement=function(){return this.$element||this.$init()},Tooltip.prototype.setText=function(n){this.getElement().textContent=n},Tooltip.prototype.setHtml=function(n){this.getElement().innerHTML=n},Tooltip.prototype.setPosition=function(n,b){this.getElement().style.left=n+"px",this.getElement().style.top=b+"px"},Tooltip.prototype.setClassName=function(n){B.addCssClass(this.getElement(),n)},Tooltip.prototype.setTheme=function(n){this.$element.className=$+" "+(n.isDark?"ace_dark ":"")+(n.cssClass||"")},Tooltip.prototype.show=function(n,b,A){null!=n&&this.setText(n),null!=b&&null!=A&&this.setPosition(b,A),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},Tooltip.prototype.hide=function(n){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=$,this.isOpen=!1)},Tooltip.prototype.getHeight=function(){return this.getElement().offsetHeight},Tooltip.prototype.getWidth=function(){return this.getElement().offsetWidth},Tooltip.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},Tooltip}(),K=new(function(){function PopupManager(){this.popups=[]}return PopupManager.prototype.addPopup=function(n){this.popups.push(n),this.updatePopups()},PopupManager.prototype.removePopup=function(n){var b=this.popups.indexOf(n);-1!==b&&(this.popups.splice(b,1),this.updatePopups())},PopupManager.prototype.updatePopups=function(){var n,b,A,L;this.popups.sort((function(n,b){return b.priority-n.priority}));var R=[];try{for(var B=D(this.popups),E=B.next();!E.done;E=B.next()){var X=E.value,$=!0;try{for(var V=(A=void 0,D(R)),K=V.next();!K.done;K=V.next()){var Q=K.value;if(this.doPopupsOverlap(Q,X)){$=!1;break}}}catch(n){A={error:n}}finally{try{K&&!K.done&&(L=V.return)&&L.call(V)}finally{if(A)throw A.error}}$?R.push(X):X.hide()}}catch(b){n={error:b}}finally{try{E&&!E.done&&(b=B.return)&&b.call(B)}finally{if(n)throw n.error}}},PopupManager.prototype.doPopupsOverlap=function(n,b){var A=n.getElement().getBoundingClientRect(),L=b.getElement().getBoundingClientRect();return A.leftL.left&&A.topL.top},PopupManager}());b.popupManager=K,b.Tooltip=V;var Q=function(n){function HoverTooltip(b){void 0===b&&(b=document.body);var A=n.call(this,b)||this;A.timeout=void 0,A.lastT=0,A.idleTime=350,A.lastEvent=void 0,A.onMouseOut=A.onMouseOut.bind(A),A.onMouseMove=A.onMouseMove.bind(A),A.waitForHover=A.waitForHover.bind(A),A.hide=A.hide.bind(A);var L=A.getElement();return L.style.whiteSpace="pre-wrap",L.style.pointerEvents="auto",L.addEventListener("mouseout",A.onMouseOut),L.tabIndex=-1,L.addEventListener("blur",function(){L.contains(document.activeElement)||this.hide()}.bind(A)),L.addEventListener("wheel",X),A}return R(HoverTooltip,n),HoverTooltip.prototype.addToEditor=function(n){n.on("mousemove",this.onMouseMove),n.on("mousedown",this.hide),n.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},HoverTooltip.prototype.removeFromEditor=function(n){n.off("mousemove",this.onMouseMove),n.off("mousedown",this.hide),n.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},HoverTooltip.prototype.onMouseMove=function(n,b){this.lastEvent=n,this.lastT=Date.now();var A=b.$mouseHandler.isMousePressed;if(this.isOpen){var L=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(L.row,L.column)&&!A&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||A||(this.lastEvent=n,this.timeout=setTimeout(this.waitForHover,this.idleTime))},HoverTooltip.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var n=Date.now()-this.lastT;this.idleTime-n>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-n):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},HoverTooltip.prototype.isOutsideOfText=function(n){var b=n.editor,A=n.getDocumentPosition(),L=b.session.getLine(A.row);if(A.column==L.length){var R=b.renderer.pixelToScreenCoordinates(n.clientX,n.clientY),D=b.session.documentToScreenPosition(A.row,A.column);if(D.column!=R.column||D.row!=R.row)return!0}return!1},HoverTooltip.prototype.setDataProvider=function(n){this.$gatherData=n},HoverTooltip.prototype.showForRange=function(n,b,A,L){if(!(L&&L!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var R=n.renderer;this.isOpen||(K.addPopup(this),this.$registerCloseEvents(),this.setTheme(R.theme)),this.isOpen=!0,this.addMarker(b,n.session),this.range=E.fromPoints(b.start,b.end);var D=R.textToScreenCoordinates(b.start.row,b.start.column),B=R.scroller.getBoundingClientRect();D.pageX=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},B=n("../lib/dom"),E=n("../lib/event"),X=n("../tooltip").Tooltip,$=n("../config").nls;n("../lib/lang");b.GutterHandler=function GutterHandler(n){var b,A,L=n.editor,R=L.renderer.$gutterLayer,D=new V(L);function hideTooltip(){b&&(b=clearTimeout(b)),D.isOpen&&(D.hideTooltip(),L.off("mousewheel",hideTooltip))}function moveTooltip(n){D.setPosition(n.x,n.y)}n.editor.setDefaultHandler("guttermousedown",(function(b){if(L.isFocused()&&0==b.getButton()&&"foldWidgets"!=R.getRegion(b)){var A=b.getDocumentPosition().row,D=L.session.selection;if(b.getShiftKey())D.selectTo(A,0);else{if(2==b.domEvent.detail)return L.selectAll(),b.preventDefault();n.$clickSelection=L.selection.getLineRange(A)}return n.setState("selectByLines"),n.captureMouse(b),b.preventDefault()}})),n.editor.setDefaultHandler("guttermousemove",(function(E){var X=E.domEvent.target||E.domEvent.srcElement;if(B.hasCssClass(X,"ace_fold-widget"))return hideTooltip();D.isOpen&&n.$tooltipFollowsMouse&&moveTooltip(E),A=E,b||(b=setTimeout((function(){b=null,A&&!n.isMousePressed?function showTooltip(){var b=A.getDocumentPosition().row;if(b==L.session.getLength()){var B=L.renderer.pixelToScreenCoordinates(0,A.y).row,E=A.$pos;if(B>L.session.documentToScreenRow(E.row,E.column))return hideTooltip()}if(D.showTooltip(b),D.isOpen)if(L.on("mousewheel",hideTooltip),n.$tooltipFollowsMouse)moveTooltip(A);else{var X=A.getGutterRow(),$=R.$lines.get(X);if($){var V=$.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),K=D.getElement().style;K.left=V.right+"px",K.top=V.bottom+"px"}else moveTooltip(A)}}():hideTooltip()}),50))})),E.addListener(L.renderer.$gutter,"mouseout",(function(n){A=null,D.isOpen&&!b&&(b=setTimeout((function(){b=null,hideTooltip()}),50))}),L),L.on("changeSession",hideTooltip),L.on("input",hideTooltip)};var V=function(n){function GutterTooltip(b){var A=n.call(this,b.container)||this;return A.editor=b,A}return R(GutterTooltip,n),GutterTooltip.prototype.setPosition=function(n,b){var A=window.innerWidth||document.documentElement.clientWidth,L=window.innerHeight||document.documentElement.clientHeight,R=this.getWidth(),D=this.getHeight();(n+=15)+R>A&&(n-=n+R-A),(b+=15)+D>L&&(b-=20+D),X.prototype.setPosition.call(this,n,b)},Object.defineProperty(GutterTooltip,"annotationLabels",{get:function(){return{error:{singular:$("gutter-tooltip.aria-label.error.singular","error"),plural:$("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:$("gutter-tooltip.aria-label.security.singular","security finding"),plural:$("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:$("gutter-tooltip.aria-label.warning.singular","warning"),plural:$("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:$("gutter-tooltip.aria-label.info.singular","information message"),plural:$("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:$("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:$("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),GutterTooltip.prototype.showTooltip=function(n){var b,A,L=this.editor.renderer.$gutterLayer,R=L.$annotations[n];A=R?{displayText:Array.from(R.displayText),type:Array.from(R.type)}:{displayText:[],type:[]};var D=L.session.getFoldLine(n);if(D&&L.$showFoldedAnnotations){for(var E,X={error:[],security:[],warning:[],info:[],hint:[]},$={error:1,security:2,warning:3,info:4,hint:5},V=n+1;V<=D.end.row;V++)if(L.$annotations[V])for(var K=0;K5?nt=null:L-nt>=200&&(b.renderer.scrollCursorIntoView(),nt=null)})(K=b.renderer.screenToTextCoordinates(E,X),n),function autoScroll(n,A){var L=Date.now(),R=b.renderer.layerConfig.lineHeight,D=b.renderer.layerConfig.characterWidth,B=b.renderer.scroller.getBoundingClientRect(),$={x:{left:E-B.left,right:B.right-E},y:{top:X-B.top,bottom:B.bottom-X}},V=Math.min($.x.left,$.x.right),K=Math.min($.y.top,$.y.bottom),Q={row:n.row,column:n.column};V/D<=2&&(Q.column+=$.x.left<$.x.right?-3:2),K/R<=1&&(Q.row+=$.y.top<$.y.bottom?-1:1);var tt=n.row!=Q.row,nt=n.column!=Q.column,it=!A||n.row!=A.row;tt||nt&&!it?ot?L-ot>=200&&b.renderer.scrollCursorIntoView(Q):ot=L:ot=null}(K,n)}function addDragMarker(){V=b.selection.toOrientedRange(),B=b.session.addMarker(V,"ace_selection",b.getSelectionStyle()),b.clearSelection(),b.isFocused()&&b.renderer.$cursorLayer.setBlinking(!1),clearInterval($),onDragInterval(),$=setInterval(onDragInterval,20),st=0,R.addListener(document,"mousemove",onMouseMove)}function clearDragMarker(){clearInterval($),b.session.removeMarker(B),B=null,b.selection.fromOrientedRange(V),b.isFocused()&&!tt&&b.$resetCursorStyle(),V=null,K=null,st=0,ot=null,nt=null,R.removeListener(document,"mousemove",onMouseMove)}this.onDragStart=function(n){if(this.cancelDrag||!rt.draggable){var L=this;return setTimeout((function(){L.startSelect(),L.captureMouse(n)}),0),n.preventDefault()}V=b.getSelectionRange();var R=n.dataTransfer;R.effectAllowed=b.getReadOnly()?"copy":"copyMove",b.container.appendChild(A),R.setDragImage&&R.setDragImage(A,0,0),setTimeout((function(){b.container.removeChild(A)})),R.clearData(),R.setData("Text",b.session.getTextRange()),tt=!0,this.setState("drag")},this.onDragEnd=function(n){if(rt.draggable=!1,tt=!1,this.setState(null),!b.getReadOnly()){var A=n.dataTransfer.dropEffect;Q||"move"!=A||b.session.remove(b.getSelectionRange()),b.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(n){if(!b.getReadOnly()&&canAccept(n.dataTransfer))return E=n.clientX,X=n.clientY,B||addDragMarker(),st++,n.dataTransfer.dropEffect=Q=getDropEffect(n),R.preventDefault(n)},this.onDragOver=function(n){if(!b.getReadOnly()&&canAccept(n.dataTransfer))return E=n.clientX,X=n.clientY,B||(addDragMarker(),st++),null!==pt&&(pt=null),n.dataTransfer.dropEffect=Q=getDropEffect(n),R.preventDefault(n)},this.onDragLeave=function(n){if(--st<=0&&B)return clearDragMarker(),Q=null,R.preventDefault(n)},this.onDrop=function(n){if(K){var A=n.dataTransfer;if(tt)switch(Q){case"move":V=V.contains(K.row,K.column)?{start:K,end:K}:b.moveText(V,K);break;case"copy":V=b.moveText(V,K,!0)}else{var L=A.getData("Text");V={start:K,end:b.session.insert(K,L)},b.focus(),Q=null}return clearDragMarker(),R.preventDefault(n)}},R.addListener(rt,"dragstart",this.onDragStart.bind(n),b),R.addListener(rt,"dragend",this.onDragEnd.bind(n),b),R.addListener(rt,"dragenter",this.onDragEnter.bind(n),b),R.addListener(rt,"dragover",this.onDragOver.bind(n),b),R.addListener(rt,"dragleave",this.onDragLeave.bind(n),b),R.addListener(rt,"drop",this.onDrop.bind(n),b);var pt=null;function onMouseMove(){null==pt&&(pt=setTimeout((function(){null!=pt&&B&&clearDragMarker()}),20))}function canAccept(n){var b=n.types;return!b||Array.prototype.some.call(b,(function(n){return"text/plain"==n||"Text"==n}))}function getDropEffect(n){var b=["copy","copymove","all","uninitialized"],A=D.isMac?n.altKey:n.ctrlKey,L="uninitialized";try{L=n.dataTransfer.effectAllowed.toLowerCase()}catch(n){}var R="none";return A&&b.indexOf(L)>=0?R="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(L)>=0?R="move":b.indexOf(L)>=0&&(R="copy"),R}}function calcDistance(n,b,A,L){return Math.sqrt(Math.pow(A-n,2)+Math.pow(L-b,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor;n.container.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging");var b=D.isWin?"default":"move";n.renderer.setCursorStyle(b),this.setState("dragReady")},this.onMouseDrag=function(n){var b=this.editor.container;D.isIE&&"dragReady"==this.state&&(calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&b.dragDrop());"dragWait"===this.state&&(calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(b.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(n){if(this.$dragEnabled){this.mousedownEvent=n;var b=this.editor,A=n.inSelection(),L=n.getButton();if(1===(n.domEvent.detail||1)&&0===L&&A){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();var R=n.domEvent.target||n.domEvent.srcElement;if("unselectable"in R&&(R.unselectable="on"),b.getDragDelay()){if(D.isWebKit)this.cancelDrag=!0,b.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0}}}}).call(DragdropHandler.prototype),b.DragdropHandler=DragdropHandler})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("./mouse_event").MouseEvent,R=n("../lib/event"),D=n("../lib/dom");b.addTouchListeners=function(n,b){var A,B,E,X,$,V,K,Q,tt,ot="scroll",nt=0,it=0,rt=0,st=0;function createContextMenu(){var n=window.navigator&&window.navigator.clipboard,A=!1,canExecuteCommand=function(n){return b.commands.canExecute(n,b)},handleClick=function(L){var R,B,E=L.target.getAttribute("action");if("more"==E||!A)return A=!A,R=b.getCopyText(),B=b.session.getUndoManager().hasUndo(),void tt.replaceChild(D.buildDom(A?["span",!R&&canExecuteCommand("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&canExecuteCommand("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&canExecuteCommand("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],n&&canExecuteCommand("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&canExecuteCommand("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],canExecuteCommand("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],canExecuteCommand("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),tt.firstChild);"paste"==E?n.readText().then((function(n){b.execCommand(E,n)})):E&&("cut"!=E&&"copy"!=E||(n?n.writeText(b.getCopyText()):document.execCommand("copy")),b.execCommand(E)),tt.firstChild.style.display="none",A=!1,"openCommandPalette"!=E&&b.focus()};tt=D.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(n){ot="menu",n.stopPropagation(),n.preventDefault(),b.textInput.focus()},ontouchend:function(n){n.stopPropagation(),n.preventDefault(),handleClick(n)},onclick:handleClick},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],b.container)}function showContextMenu(){if(b.getOption("enableMobileMenu")){tt||createContextMenu();var n=b.selection.cursor,A=b.renderer.textToScreenCoordinates(n.row,n.column),L=b.renderer.textToScreenCoordinates(0,0).pageX,R=b.renderer.scrollLeft,D=b.container.getBoundingClientRect();tt.style.top=A.pageY-D.top-3+"px",A.pageX-D.left1)return clearTimeout($),$=null,E=-1,void(ot="zoom");Q=b.$mouseHandler.isMousePressed=!0;var D=b.renderer.layerConfig.lineHeight,V=b.renderer.layerConfig.lineHeight,tt=n.timeStamp;X=tt;var pt=R[0],lt=pt.clientX,ut=pt.clientY;Math.abs(A-lt)+Math.abs(B-ut)>D&&(E=-1),A=n.clientX=lt,B=n.clientY=ut,rt=st=0;var bt=new L(n,b);if(K=bt.getDocumentPosition(),tt-E<500&&1==R.length&&!nt)it++,n.preventDefault(),n.button=0,function switchToSelectionMode(){$=null,clearTimeout($),b.selection.moveToPosition(K);var n=it>=2?b.selection.getLineRange(K.row):b.session.getBracketRange(K);n&&!n.isEmpty()?b.selection.setRange(n):b.selection.selectWord(),ot="wait"}();else{it=0;var Mt=b.selection.cursor,zt=b.selection.isEmpty()?Mt:b.selection.anchor,Ot=b.renderer.$cursorLayer.getPixelPosition(Mt,!0),ft=b.renderer.$cursorLayer.getPixelPosition(zt,!0),mt=b.renderer.scroller.getBoundingClientRect(),_t=b.renderer.layerConfig.offset,gt=b.renderer.scrollLeft,weightedDistance=function(n,b){return(n/=V)*n+(b=b/D-.75)*b};if(n.clientXyt?"cursor":"anchor"),ot=yt<3.5?"anchor":At<3.5?"cursor":"scroll",$=setTimeout(handleLongTap,450)}E=tt}),b),R.addListener(n,"touchend",(function(n){Q=b.$mouseHandler.isMousePressed=!1,V&&clearInterval(V),"zoom"==ot?(ot="",nt=0):$?(b.selection.moveToPosition(K),nt=0,showContextMenu()):"scroll"==ot?(!function animate(){nt+=60,V=setInterval((function(){nt--<=0&&(clearInterval(V),V=null),Math.abs(rt)<.01&&(rt=0),Math.abs(st)<.01&&(st=0),nt<20&&(rt*=.9),nt<20&&(st*=.9);var n=b.session.getScrollTop();b.renderer.scrollBy(10*rt,10*st),n==b.session.getScrollTop()&&(nt=0)}),10)}(),hideContextMenu()):showContextMenu(),clearTimeout($),$=null}),b),R.addListener(n,"touchmove",(function(n){$&&(clearTimeout($),$=null);var R=n.touches;if(!(R.length>1||"zoom"==ot)){var D=R[0],E=A-D.clientX,V=B-D.clientY;if("wait"==ot){if(!(E*E+V*V>4))return n.preventDefault();ot="cursor"}A=D.clientX,B=D.clientY,n.clientX=D.clientX,n.clientY=D.clientY;var K=n.timeStamp,Q=K-X;if(X=K,"scroll"==ot){var tt=new L(n,b);tt.speed=1,tt.wheelX=E,tt.wheelY=V,10*Math.abs(E)=n){for(D=K+1;D=n;)D++;for(E=K,X=D-1;E=b.length||(X=A[R-1])!=Q&&X!=tt||($=b[R+1])!=Q&&$!=tt?ot:(D&&($=tt),$==X?$:ot);case lt:return(X=R>0?A[R-1]:nt)==Q&&R+10&&A[R-1]==Q)return Q;if(D)return ot;for(At=R+1,gt=b.length;At=1425&&qt<=2303||64286==qt;if(X=b[At],vt&&(X==K||X==rt))return K}return R<1||(X=b[R-1])==nt?ot:A[R-1];case nt:return D=!1,B=!0,L;case it:return E=!0,ot;case Mt:case zt:case ft:case mt:case Ot:D=!1;case _t:return ot}}function _getCharacterType(n){var b=n.charCodeAt(0),A=b>>8;return 0==A?b>191?V:gt[b]:5==A?/[\u0591-\u05f4]/.test(n)?K:V:6==A?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(n)?bt:/[\u0660-\u0669\u066b-\u066c]/.test(n)?tt:1642==b?ut:/[\u06f0-\u06f9]/.test(n)?Q:rt:32==A&&b<=8287?At[255&b]:254==A&&b>=65136?rt:ot}b.L=V,b.R=K,b.EN=Q,b.ON_R=3,b.AN=4,b.R_H=5,b.B=6,b.RLE=7,b.DOT="·",b.doBidiReorder=function(n,A,V){if(n.length<2)return{};var Q=n.split(""),pt=new Array(Q.length),lt=new Array(Q.length),ut=[];L=V?1:0,function _computeLevels(n,b,A,V){var K=L?$:X,Q=null,tt=null,ot=null,rt=0,pt=null,lt=-1,ut=null,bt=null,Mt=[];if(!V)for(ut=0,V=[];ut0)if(16==pt){for(ut=lt;ut-1){for(ut=lt;ut=0&&V[zt]==st;zt--)b[zt]=L}}(Q,ut,Q.length,A);for(var bt=0;btrt&&A[bt]0&&"ل"===Q[bt-1]&&/\u0622|\u0623|\u0625|\u0627/.test(Q[bt])&&(ut[bt-1]=ut[bt]=b.R_H,bt++);Q[Q.length-1]===b.DOT&&(ut[Q.length-1]=b.B),"‫"===Q[0]&&(ut[0]=b.RLE);for(bt=0;bt=0&&(n=this.session.$docRowCache[A])}return n},BidiHandler.prototype.getSplitIndex=function(){var n=0,b=this.session.$screenRowCache;if(b.length)for(var A,L=this.session.$getRowCacheIndex(b,this.currentRow);this.currentRow-n>0&&(A=this.session.$getRowCacheIndex(b,this.currentRow-n-1))===L;)L=A,n++;else n=this.currentRow;return n},BidiHandler.prototype.updateRowLine=function(n,b){void 0===n&&(n=this.getDocumentRow());var A=n===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var D=this.session.$wrapData[n];D&&(void 0===b&&(b=this.getSplitIndex()),b>0&&D.length?(this.wrapIndent=D.indent,this.wrapOffset=this.wrapIndent*this.charWidths[L.L],this.line=bb?this.session.getOverwrite()?n:n-1:b,R=L.getVisualFromLogicalIdx(A,this.bidiMap),D=this.bidiMap.bidiLevels,B=0;!this.session.getOverwrite()&&n<=b&&D[R]%2!=0&&R++;for(var E=0;Eb&&D[R]%2==0&&(B+=this.charWidths[D[R]]),this.wrapIndent&&(B+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(B+=this.rtlLineOffset),B},BidiHandler.prototype.getSelections=function(n,b){var A,L=this.bidiMap,R=L.bidiLevels,D=[],B=0,E=Math.min(n,b)-this.wrapIndent,X=Math.max(n,b)-this.wrapIndent,$=!1,V=!1,K=0;this.wrapIndent&&(B+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var Q,tt=0;tt=E&&QA+D/2;){if(A+=D,L===R.length-1){D=0;break}D=this.charWidths[R[++L]]}return L>0&&R[L-1]%2!=0&&R[L]%2==0?(n0&&R[L-1]%2==0&&R[L]%2!=0?b=1+(n>A?this.bidiMap.logicalFromVisual[L]:this.bidiMap.logicalFromVisual[L-1]):this.isRtlDir&&L===R.length-1&&0===D&&R[L-1]%2==0||!this.isRtlDir&&0===L&&R[L]%2!=0?b=1+this.bidiMap.logicalFromVisual[L]:(L>0&&R[L-1]%2!=0&&0!==D&&L--,b=this.bidiMap.logicalFromVisual[L]),0===b&&this.isRtlDir&&b++,b+this.wrapIndent},BidiHandler}();b.BidiHandler=B})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/oop"),R=n("./lib/lang"),D=n("./lib/event_emitter").EventEmitter,B=n("./range").Range,E=function(){function Selection(n){this.session=n,this.doc=n.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var b=this;this.cursor.on("change",(function(n){b.$cursorChanged=!0,b.$silent||b._emit("changeCursor"),b.$isEmpty||b.$silent||b._emit("changeSelection"),b.$keepDesiredColumnOnChange||n.old.column==n.value.column||(b.$desiredColumn=null)})),this.anchor.on("change",(function(){b.$anchorChanged=!0,b.$isEmpty||b.$silent||b._emit("changeSelection")}))}return Selection.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},Selection.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},Selection.prototype.getCursor=function(){return this.lead.getPosition()},Selection.prototype.setAnchor=function(n,b){this.$isEmpty=!1,this.anchor.setPosition(n,b)},Selection.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},Selection.prototype.getSelectionLead=function(){return this.lead.getPosition()},Selection.prototype.isBackwards=function(){var n=this.anchor,b=this.lead;return n.row>b.row||n.row==b.row&&n.column>b.column},Selection.prototype.getRange=function(){var n=this.anchor,b=this.lead;return this.$isEmpty?B.fromPoints(b,b):this.isBackwards()?B.fromPoints(b,n):B.fromPoints(n,b)},Selection.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},Selection.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},Selection.prototype.setRange=function(n,b){var A=b?n.end:n.start,L=b?n.start:n.end;this.$setSelection(A.row,A.column,L.row,L.column)},Selection.prototype.$setSelection=function(n,b,A,L){if(!this.$silent){var R=this.$isEmpty,D=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(n,b),this.cursor.setPosition(A,L),this.$isEmpty=!B.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||R!=this.$isEmpty||D)&&this._emit("changeSelection")}},Selection.prototype.$moveSelection=function(n){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),n.call(this)},Selection.prototype.selectTo=function(n,b){this.$moveSelection((function(){this.moveCursorTo(n,b)}))},Selection.prototype.selectToPosition=function(n){this.$moveSelection((function(){this.moveCursorToPosition(n)}))},Selection.prototype.moveTo=function(n,b){this.clearSelection(),this.moveCursorTo(n,b)},Selection.prototype.moveToPosition=function(n){this.clearSelection(),this.moveCursorToPosition(n)},Selection.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},Selection.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},Selection.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},Selection.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},Selection.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},Selection.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},Selection.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},Selection.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},Selection.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},Selection.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},Selection.prototype.getWordRange=function(n,b){if(void 0===b){var A=n||this.lead;n=A.row,b=A.column}return this.session.getWordRange(n,b)},Selection.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},Selection.prototype.selectAWord=function(){var n=this.getCursor(),b=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(b)},Selection.prototype.getLineRange=function(n,b){var A,L="number"==typeof n?n:this.lead.row,R=this.session.getFoldLine(L);return R?(L=R.start.row,A=R.end.row):A=L,!0===b?new B(L,0,A,this.session.getLine(A).length):new B(L,0,A+1,0)},Selection.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},Selection.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},Selection.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},Selection.prototype.wouldMoveIntoSoftTab=function(n,b,A){var L=n.column,R=n.column+b;return A<0&&(L=n.column-b,R=n.column),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(L,R).split(" ").length-1==b},Selection.prototype.moveCursorLeft=function(){var n,b=this.lead.getPosition();if(n=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(0===b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var A=this.session.getTabSize();this.wouldMoveIntoSoftTab(b,A,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-A):this.moveCursorBy(0,-1)}},Selection.prototype.moveCursorRight=function(){var n,b=this.lead.getPosition();if(n=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(b.column=L)}}this.moveCursorTo(b.row,b.column)},Selection.prototype.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,b=this.doc.getLine(n).length;this.moveCursorTo(n,b)},Selection.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},Selection.prototype.moveCursorLongWordRight=function(){var n=this.lead.row,b=this.lead.column,A=this.doc.getLine(n),L=A.substring(b);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var R=this.session.getFoldAt(n,b,1);if(R)this.moveCursorTo(R.end.row,R.end.column);else{if(this.session.nonTokenRe.exec(L)&&(b+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,L=A.substring(b)),b>=A.length)return this.moveCursorTo(n,A.length),this.moveCursorRight(),void(n0&&this.moveCursorWordLeft());this.session.tokenRe.exec(D)&&(A-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,A)}},Selection.prototype.$shortWordEndIndex=function(n){var b,A=0,L=/\s/,R=this.session.tokenRe;if(R.lastIndex=0,this.session.tokenRe.exec(n))A=this.session.tokenRe.lastIndex;else{for(;(b=n[A])&&L.test(b);)A++;if(A<1)for(R.lastIndex=0;(b=n[A])&&!R.test(b);)if(R.lastIndex=0,A++,L.test(b)){if(A>2){A--;break}for(;(b=n[A])&&L.test(b);)A++;if(A>2)break}}return R.lastIndex=0,A},Selection.prototype.moveCursorShortWordRight=function(){var n=this.lead.row,b=this.lead.column,A=this.doc.getLine(n),L=A.substring(b),R=this.session.getFoldAt(n,b,1);if(R)return this.moveCursorTo(R.end.row,R.end.column);if(b==A.length){var D=this.doc.getLength();do{n++,L=this.doc.getLine(n)}while(n0&&/^\s*$/.test(L));A=L.length,/\s+$/.test(L)||(L="")}var D=R.stringReverse(L),B=this.$shortWordEndIndex(D);return this.moveCursorTo(b,A-B)},Selection.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},Selection.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},Selection.prototype.moveCursorBy=function(n,b){var A,L=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===b&&(0!==n&&(this.session.$bidiHandler.isBidiRow(L.row,this.lead.row)?(A=this.session.$bidiHandler.getPosLeft(L.column),L.column=Math.round(A/this.session.$bidiHandler.charWidths[0])):A=L.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?L.column=this.$desiredColumn:this.$desiredColumn=L.column),0!=n&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var R=this.session.lineWidgets[this.lead.row];n<0?n-=R.rowsAbove||0:n>0&&(n+=R.rowCount-(R.rowsAbove||0))}var D=this.session.screenToDocumentPosition(L.row+n,L.column,A);0!==n&&0===b&&D.row===this.lead.row&&(D.column,this.lead.column),this.moveCursorTo(D.row,D.column+b,0===b)},Selection.prototype.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)},Selection.prototype.moveCursorTo=function(n,b,A){var L=this.session.getFoldAt(n,b,1);L&&(n=L.start.row,b=L.start.column),this.$keepDesiredColumnOnChange=!0;var R=this.session.getLine(n);/[\uDC00-\uDFFF]/.test(R.charAt(b))&&R.charAt(b-1)&&(this.lead.row==n&&this.lead.column==b+1?b-=1:b+=1),this.lead.setPosition(n,b),this.$keepDesiredColumnOnChange=!1,A||(this.$desiredColumn=null)},Selection.prototype.moveCursorToScreen=function(n,b,A){var L=this.session.screenToDocumentPosition(n,b);this.moveCursorTo(L.row,L.column,A)},Selection.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},Selection.prototype.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start),this.$desiredColumn=n.desiredColumn||this.$desiredColumn},Selection.prototype.toOrientedRange=function(n){var b=this.getRange();return n?(n.start.column=b.start.column,n.start.row=b.start.row,n.end.column=b.end.column,n.end.row=b.end.row):n=b,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n},Selection.prototype.getRangeOfMovements=function(n){var b=this.getCursor();try{n(this);var A=this.getCursor();return B.fromPoints(b,A)}catch(n){return B.fromPoints(b,b)}finally{this.moveCursorToPosition(b)}},Selection.prototype.toJSON=function(){if(this.rangeCount)var n=this.ranges.map((function(n){var b=n.clone();return b.isBackwards=n.cursor==n.start,b}));else(n=this.getRange()).isBackwards=this.isBackwards();return n},Selection.prototype.fromJSON=function(n){if(null==n.start){if(this.rangeList&&n.length>1){this.toSingleRange(n[0]);for(var b=n.length;b--;){var A=B.fromPoints(n[b].start,n[b].end);n[b].isBackwards&&(A.cursor=A.start),this.addRange(A,!0)}return}n=n[0]}this.rangeList&&this.toSingleRange(n),this.setSelectionRange(n,n.isBackwards)},Selection.prototype.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(n[b]))return!1;return!0},Selection}();E.prototype.setSelectionAnchor=E.prototype.setAnchor,E.prototype.getSelectionAnchor=E.prototype.getAnchor,E.prototype.setSelectionRange=E.prototype.setRange,L.implement(E.prototype,D),b.Selection=E})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(n,b,A){"use strict";var L=n("./lib/report_error").reportError,R=2e3,D=function(){function Tokenizer(n){for(var b in this.splitRegex,this.states=n,this.regExps={},this.matchMappings={},this.states){for(var A=this.states[b],L=[],R=0,D=this.matchMappings[b]={defaultToken:"text"},B="g",E=[],X=0;X1?this.$applyToken:$.token),K>1&&(/\\\d/.test($.regex)?V=$.regex.replace(/\\([0-9]+)/g,(function(n,b){return"\\"+(parseInt(b,10)+R+1)})):(K=1,V=this.removeCapturingGroups($.regex)),$.splitRegex||"string"==typeof $.token||E.push($)),D[R]=X,R+=K,L.push(V),$.onMatch||($.onMatch=null)}}L.length||(D[0]=0,L.push("$")),E.forEach((function(n){n.splitRegex=this.createSplitterRegexp(n.regex,B)}),this),this.regExps[b]=new RegExp("("+L.join(")|(")+")|($)",B)}}return Tokenizer.prototype.$setMaxTokenCount=function(n){R=0|n},Tokenizer.prototype.$applyToken=function(n){var b=this.splitRegex.exec(n).slice(1),A=this.token.apply(this,b);if("string"==typeof A)return[{type:A,value:n}];for(var L=[],R=0,D=A.length;RV){var rt=n.substring(V,it-nt.length);Q.type==tt?Q.value+=rt:(Q.type&&$.push(Q),Q={type:tt,value:rt})}for(var st=0;stR){for(K>2*n.length&&this.reportError("infinite loop with in ace tokenizer",{startState:b,line:n});V1&&A[0]!==L&&A.unshift("#tmp",L),{tokens:$,state:A.length?A:L}},Tokenizer}();D.prototype.reportError=L,b.Tokenizer=D})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(n,b,A){"use strict";var L,R=n("../lib/deep_copy").deepCopy;(function(){this.addRules=function(n,b){if(b)for(var A in n){for(var L=n[A],R=0;R=this.$rowTokens.length;){if(this.$row+=1,n||(n=this.$session.getLength()),this.$row>=n)return this.$row=n-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},TokenIterator.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},TokenIterator.prototype.getCurrentTokenRow=function(){return this.$row},TokenIterator.prototype.getCurrentTokenColumn=function(){var n=this.$rowTokens,b=this.$tokenIndex,A=n[b].start;if(void 0!==A)return A;for(A=0;b>0;)A+=n[b-=1].value.length;return A},TokenIterator.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},TokenIterator.prototype.getCurrentTokenRange=function(){var n=this.$rowTokens[this.$tokenIndex],b=this.getCurrentTokenColumn();return new L(this.$row,b,this.$row,b+n.value.length)},TokenIterator}();b.TokenIterator=R})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(n,b,A){"use strict";var L,R,D=n("../../lib/oop"),B=n("../behaviour").Behaviour,E=n("../../token_iterator").TokenIterator,X=n("../../lib/lang"),$=["text","paren.rparen","rparen","paren","punctuation.operator"],V=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],K={},Q={'"':'"',"'":"'"},initContext=function(n){var b=-1;if(n.multiSelect&&(b=n.selection.index,K.rangeCount!=n.multiSelect.rangeCount&&(K={rangeCount:n.multiSelect.rangeCount})),K[b])return L=K[b];L=K[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},getWrapped=function(n,b,A,L){var R=n.end.row-n.start.row;return{text:A+b+L,selection:[0,n.start.column+1,R,n.end.column+(R?0:1)]}};(R=function(n){n=n||{},this.add("braces","insertion",(function(b,A,D,B,E){var $=D.getCursorPosition(),V=B.doc.getLine($.row);if("{"==E){initContext(D);var K=D.getSelectionRange(),Q=B.doc.getTextRange(K),tt=B.getTokenAt($.row,$.column);if(""!==Q&&"{"!==Q&&D.getWrapBehavioursEnabled())return getWrapped(K,Q,"{","}");if(tt&&/(?:string)\.quasi|\.xml/.test(tt.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(n){return n.test(tt.type)}))||/(string)\.quasi/.test(tt.type)&&"$"!==tt.value[$.column-tt.start-1])return;return R.recordAutoInsert(D,B,"}"),{text:"{}",selection:[1,1]}}if(R.isSaneInsertion(D,B))return/[\]\}\)]/.test(V[$.column])||D.inMultiSelectMode||n.braces?(R.recordAutoInsert(D,B,"}"),{text:"{}",selection:[1,1]}):(R.recordMaybeInsert(D,B,"{"),{text:"{",selection:[1,1]})}else if("}"==E){if(initContext(D),"}"==V.substring($.column,$.column+1))if(null!==B.$findOpeningBracket("}",{column:$.column+1,row:$.row})&&R.isAutoInsertedClosing($,V,E))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==E||"\r\n"==E){initContext(D);var ot="";if(R.isMaybeInsertedClosing($,V)&&(ot=X.stringRepeat("}",L.maybeInsertedBrackets),R.clearMaybeInsertedClosing()),"}"===V.substring($.column,$.column+1)){var nt=B.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!nt)return null;var it=this.$getIndent(B.getLine(nt.row))}else{if(!ot)return void R.clearMaybeInsertedClosing();it=this.$getIndent(V)}var rt=it+B.getTabString();return{text:"\n"+rt+"\n"+it+ot,selection:[1,rt.length,1,rt.length]}}R.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(n,b,A,R,D){var B=R.doc.getTextRange(D);if(!D.isMultiLine()&&"{"==B){if(initContext(A),"}"==R.doc.getLine(D.start.row).substring(D.end.column,D.end.column+1))return D.end.column++,D;L.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(n,b,A,L,D){if("("==D){initContext(A);var B=A.getSelectionRange(),E=L.doc.getTextRange(B);if(""!==E&&A.getWrapBehavioursEnabled())return getWrapped(B,E,"(",")");if(R.isSaneInsertion(A,L))return R.recordAutoInsert(A,L,")"),{text:"()",selection:[1,1]}}else if(")"==D){initContext(A);var X=A.getCursorPosition(),$=L.doc.getLine(X.row);if(")"==$.substring(X.column,X.column+1))if(null!==L.$findOpeningBracket(")",{column:X.column+1,row:X.row})&&R.isAutoInsertedClosing(X,$,D))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(n,b,A,L,R){var D=L.doc.getTextRange(R);if(!R.isMultiLine()&&"("==D&&(initContext(A),")"==L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)))return R.end.column++,R})),this.add("brackets","insertion",(function(n,b,A,L,D){if("["==D){initContext(A);var B=A.getSelectionRange(),E=L.doc.getTextRange(B);if(""!==E&&A.getWrapBehavioursEnabled())return getWrapped(B,E,"[","]");if(R.isSaneInsertion(A,L))return R.recordAutoInsert(A,L,"]"),{text:"[]",selection:[1,1]}}else if("]"==D){initContext(A);var X=A.getCursorPosition(),$=L.doc.getLine(X.row);if("]"==$.substring(X.column,X.column+1))if(null!==L.$findOpeningBracket("]",{column:X.column+1,row:X.row})&&R.isAutoInsertedClosing(X,$,D))return R.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(n,b,A,L,R){var D=L.doc.getTextRange(R);if(!R.isMultiLine()&&"["==D&&(initContext(A),"]"==L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)))return R.end.column++,R})),this.add("string_dquotes","insertion",(function(n,b,A,L,R){var D=L.$mode.$quotes||Q;if(1==R.length&&D[R]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(R))return;initContext(A);var B=R,E=A.getSelectionRange(),X=L.doc.getTextRange(E);if(!(""===X||1==X.length&&D[X])&&A.getWrapBehavioursEnabled())return getWrapped(E,X,B,B);if(!X){var $=A.getCursorPosition(),V=L.doc.getLine($.row),K=V.substring($.column-1,$.column),tt=V.substring($.column,$.column+1),ot=L.getTokenAt($.row,$.column),nt=L.getTokenAt($.row,$.column+1);if("\\"==K&&ot&&/escape/.test(ot.type))return null;var it,rt=ot&&/string|escape/.test(ot.type),st=!nt||/string|escape/.test(nt.type);if(tt==B)(it=rt!==st)&&/string\.end/.test(nt.type)&&(it=!1);else{if(rt&&!st)return null;if(rt&&st)return null;var pt=L.$mode.tokenRe;pt.lastIndex=0;var lt=pt.test(K);pt.lastIndex=0;var ut=pt.test(tt),bt=L.$mode.$pairQuotesAfter;if(!(bt&&bt[B]&&bt[B].test(K))&<||ut)return null;if(tt&&!/[\s;,.})\]\\]/.test(tt))return null;var Mt=V[$.column-2];if(K==B&&(Mt==B||pt.test(Mt)))return null;it=!0}return{text:it?B+B:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(n,b,A,L,R){var D=L.$mode.$quotes||Q,B=L.doc.getTextRange(R);if(!R.isMultiLine()&&D.hasOwnProperty(B)&&(initContext(A),L.doc.getLine(R.start.row).substring(R.start.column+1,R.start.column+2)==B))return R.end.column++,R})),!1!==n.closeDocComment&&this.add("doc comment end","insertion",(function(n,b,A,L,R){if("doc-start"===n&&("\n"===R||"\r\n"===R)&&A.selection.isEmpty()){var D=A.getCursorPosition();if(0===D.column)return;for(var B=L.doc.getLine(D.row),E=L.doc.getLine(D.row+1),X=L.getTokens(D.row),$=0,V=0;V=D.column){if($===D.column){if(!/\.doc/.test(K.type))return;if(/\*\//.test(K.value)){var Q=X[V+1];if(!Q||!/\.doc/.test(Q.type))return}}var tt=D.column-($-K.value.length),ot=K.value.indexOf("*/"),nt=K.value.indexOf("/**",ot>-1?ot+2:0);if(-1!==nt&&tt>nt&&tt=ot&&tt<=nt||!/\.doc/.test(K.type))return;break}}var it=this.$getIndent(B);if(/\s*\*/.test(E))return/^\s*\*/.test(B)?{text:R+it+"* ",selection:[1,2+it.length,1,2+it.length]}:{text:R+it+" * ",selection:[1,3+it.length,1,3+it.length]};if(/\/\*\*/.test(B.substring(0,D.column)))return{text:R+it+" * "+R+" "+it+"*/",selection:[1,4+it.length,1,4+it.length]}}}))}).isSaneInsertion=function(n,b){var A=n.getCursorPosition(),L=new E(b,A.row,A.column);if(!this.$matchTokenType(L.getCurrentToken()||"text",$)){if(/[)}\]]/.test(n.session.getLine(A.row)[A.column]))return!0;var R=new E(b,A.row,A.column+1);if(!this.$matchTokenType(R.getCurrentToken()||"text",$))return!1}return L.stepForward(),L.getCurrentTokenRow()!==A.row||this.$matchTokenType(L.getCurrentToken()||"text",V)},R.$matchTokenType=function(n,b){return b.indexOf(n.type||n)>-1},R.recordAutoInsert=function(n,b,A){var R=n.getCursorPosition(),D=b.doc.getLine(R.row);this.isAutoInsertedClosing(R,D,L.autoInsertedLineEnd[0])||(L.autoInsertedBrackets=0),L.autoInsertedRow=R.row,L.autoInsertedLineEnd=A+D.substr(R.column),L.autoInsertedBrackets++},R.recordMaybeInsert=function(n,b,A){var R=n.getCursorPosition(),D=b.doc.getLine(R.row);this.isMaybeInsertedClosing(R,D)||(L.maybeInsertedBrackets=0),L.maybeInsertedRow=R.row,L.maybeInsertedLineStart=D.substr(0,R.column)+A,L.maybeInsertedLineEnd=D.substr(R.column),L.maybeInsertedBrackets++},R.isAutoInsertedClosing=function(n,b,A){return L.autoInsertedBrackets>0&&n.row===L.autoInsertedRow&&A===L.autoInsertedLineEnd[0]&&b.substr(n.column)===L.autoInsertedLineEnd},R.isMaybeInsertedClosing=function(n,b){return L.maybeInsertedBrackets>0&&n.row===L.maybeInsertedRow&&b.substr(n.column)===L.maybeInsertedLineEnd&&b.substr(0,n.column)==L.maybeInsertedLineStart},R.popAutoInsertedClosing=function(){L.autoInsertedLineEnd=L.autoInsertedLineEnd.substr(1),L.autoInsertedBrackets--},R.clearMaybeInsertedClosing=function(){L&&(L.maybeInsertedBrackets=0,L.maybeInsertedRow=-1)},D.inherits(R,B),b.CstyleBehaviour=R})),ace.define("ace/unicode",["require","exports","module"],(function(n,b,A){"use strict";for(var L=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],R=0,D=[],B=0;B2?L%X!=X-1:L%X==0})}else{if(!this.blockComment)return!1;var tt=this.blockComment.start,ot=this.blockComment.end,nt=new RegExp("^(\\s*)(?:"+$.escapeRegExp(tt)+")"),it=new RegExp("(?:"+$.escapeRegExp(ot)+")\\s*$"),comment=function(n,b){testRemove(n,b)||D&&!/\S/.test(n)||(R.insertInLine({row:b,column:n.length},ot),R.insertInLine({row:b,column:E},tt))},uncomment=function(n,b){var A;(A=n.match(it))&&R.removeInLine(b,n.length-A[0].length,n.length),(A=n.match(nt))&&R.removeInLine(b,A[1].length,A[0].length)},testRemove=function(n,A){if(nt.test(n))return!0;for(var L=b.getTokens(A),R=0;Rn.length&&(rt=n.length)})),E==1/0&&(E=rt,D=!1,B=!1),V&&E%X!=0&&(E=Math.floor(E/X)*X),iter(B?uncomment:comment)},this.toggleBlockComment=function(n,b,A,L){var R=this.blockComment;if(R){!R.start&&R[0]&&(R=R[0]);var D,B,E=(nt=new V(b,L.row,L.column)).getCurrentToken(),X=(b.selection,b.selection.toOrientedRange());if(E&&/comment/.test(E.type)){for(var $,Q;E&&/comment/.test(E.type);){if(-1!=(it=E.value.indexOf(R.start))){var tt=nt.getCurrentTokenRow(),ot=nt.getCurrentTokenColumn()+it;$=new K(tt,ot,tt,ot+R.start.length);break}E=nt.stepBackward()}var nt;for(E=(nt=new V(b,L.row,L.column)).getCurrentToken();E&&/comment/.test(E.type);){var it;if(-1!=(it=E.value.indexOf(R.end))){tt=nt.getCurrentTokenRow(),ot=nt.getCurrentTokenColumn()+it;Q=new K(tt,ot,tt,ot+R.end.length);break}E=nt.stepForward()}Q&&b.remove(Q),$&&(b.remove($),D=$.start.row,B=-R.start.length)}else B=R.start.length,D=A.start.row,b.insert(A.end,R.end),b.insert(A.start,R.start);X.start.row==D&&(X.start.column+=B),X.end.row==D&&(X.end.column+=B),b.selection.fromOrientedRange(X)}},this.getNextLineIndent=function(n,b,A){return this.$getIndent(b)},this.checkOutdent=function(n,b,A){return!1},this.autoOutdent=function(n,b,A){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){for(var b in this.$embeds=[],this.$modes={},n)if(n[b]){var A=n[b],L=A.prototype.$id,D=R.$modes[L];D||(R.$modes[L]=D=new A),R.$modes[b]||(R.$modes[b]=D),this.$embeds.push(b),this.$modes[b]=D}var B=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],_loop_1=function(n){var b,A,L;L=(b=E)[A=B[n]],b[B[n]]=function(){return this.$delegator(A,arguments,L)}},E=this;for(b=0;bthis.row)){var b=function $getTransformedPoint(n,b,A){var L="insert"==n.action,R=(L?1:-1)*(n.end.row-n.start.row),D=(L?1:-1)*(n.end.column-n.start.column),B=n.start,E=L?B:n.end;if($pointsInOrder(b,B,A))return{row:b.row,column:b.column};if($pointsInOrder(E,b,!A))return{row:b.row+R,column:b.column+(b.row==E.row?D:0)};return{row:B.row,column:B.column}}(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(b.row,b.column,!0)}},Anchor.prototype.setPosition=function(n,b,A){var L;if(L=A?{row:n,column:b}:this.$clipPositionToDocument(n,b),this.row!=L.row||this.column!=L.column){var R={row:this.row,column:this.column};this.row=L.row,this.column=L.column,this._signal("change",{old:R,value:L})}},Anchor.prototype.detach=function(){this.document.off("change",this.$onChange)},Anchor.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},Anchor.prototype.$clipPositionToDocument=function(n,b){var A={};return n>=this.document.getLength()?(A.row=Math.max(0,this.document.getLength()-1),A.column=this.document.getLine(A.row).length):n<0?(A.row=0,A.column=0):(A.row=n,A.column=Math.min(this.document.getLine(A.row).length,Math.max(0,b))),b<0&&(A.column=0),A},Anchor}();function $pointsInOrder(n,b,A){var L=A?n.column<=b.column:n.column=A&&(n=A-1,b=void 0);var L=this.getLine(n);return null==b&&(b=L.length),{row:n,column:b=Math.min(Math.max(b,0),L.length)}},Document.prototype.clonePos=function(n){return{row:n.row,column:n.column}},Document.prototype.pos=function(n,b){return{row:n,column:b}},Document.prototype.$clipPosition=function(n){var b=this.getLength();return n.row>=b?(n.row=Math.max(0,b-1),n.column=this.getLine(b-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},Document.prototype.insertFullLines=function(n,b){var A=0;(n=Math.min(Math.max(n,0),this.getLength()))0,L=b=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},Document.prototype.replace=function(n,b){return n instanceof B||(n=B.fromPoints(n.start,n.end)),0===b.length&&n.isEmpty()?n.start:b==this.getTextRange(n)?n.end:(this.remove(n),b?this.insert(n.start,b):n.start)},Document.prototype.applyDeltas=function(n){for(var b=0;b=0;b--)this.revertDelta(n[b])},Document.prototype.applyDelta=function(n,b){var A="insert"==n.action;(A?n.lines.length<=1&&!n.lines[0]:!B.comparePoints(n.start,n.end))||(A&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(R(this.$lines,n,b),this._signal("change",n)))},Document.prototype.$safeApplyDelta=function(n){var b=this.$lines.length;("remove"==n.action&&n.start.row20){A.running=setTimeout(A.$worker,20);break}}A.currentLine=b,-1==L&&(L=b),D<=L&&A.fireUpdateEvent(D,L)}}}return BackgroundTokenizer.prototype.setTokenizer=function(n){this.tokenizer=n,this.lines=[],this.states=[],this.start(0)},BackgroundTokenizer.prototype.setDocument=function(n){this.doc=n,this.lines=[],this.states=[],this.stop()},BackgroundTokenizer.prototype.fireUpdateEvent=function(n,b){var A={first:n,last:b};this._signal("update",{data:A})},BackgroundTokenizer.prototype.start=function(n){this.currentLine=Math.min(n||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},BackgroundTokenizer.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},BackgroundTokenizer.prototype.$updateOnChange=function(n){var b=n.start.row,A=n.end.row-b;if(0===A)this.lines[b]=null;else if("remove"==n.action)this.lines.splice(b,A+1,null),this.states.splice(b,A+1,null);else{var L=Array(A+1);L.unshift(b,1),this.lines.splice.apply(this.lines,L),this.states.splice.apply(this.states,L)}this.currentLine=Math.min(b,this.currentLine,this.doc.getLength()),this.stop()},BackgroundTokenizer.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},BackgroundTokenizer.prototype.getTokens=function(n){return this.lines[n]||this.$tokenizeRow(n)},BackgroundTokenizer.prototype.getState=function(n){return this.currentLine==n&&this.$tokenizeRow(n),this.states[n]||"start"},BackgroundTokenizer.prototype.$tokenizeRow=function(n){var b=this.doc.getLine(n),A=this.states[n-1],L=this.tokenizer.getLineTokens(b,A,n);return this.states[n]+""!=L.state+""?(this.states[n]=L.state,this.lines[n+1]=null,this.currentLine>n+1&&(this.currentLine=n+1)):this.currentLine==n&&(this.currentLine=n+1),this.lines[n]=L.tokens},BackgroundTokenizer.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},BackgroundTokenizer}();L.implement(D.prototype,R),b.BackgroundTokenizer=D})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/lang"),R=n("./range").Range,D=function(){function SearchHighlight(n,b,A){void 0===A&&(A="text"),this.setRegexp(n),this.clazz=b,this.type=A}return SearchHighlight.prototype.setRegexp=function(n){this.regExp+""!=n+""&&(this.regExp=n,this.cache=[])},SearchHighlight.prototype.update=function(n,b,A,D){if(this.regExp)for(var B=D.firstRow,E=D.lastRow,X={},$=B;$<=E;$++){var V=this.cache[$];null==V&&((V=L.getMatchOffsets(A.getLine($),this.regExp)).length>this.MAX_RANGES&&(V=V.slice(0,this.MAX_RANGES)),V=V.map((function(n){return new R($,n.offset,$,n.offset+n.length)})),this.cache[$]=V.length?V:"");for(var K=V.length;K--;){var Q=V[K].toScreenRange(A),tt=Q.toString();X[tt]||(X[tt]=!0,b.drawSingleLineMarker(n,Q,this.clazz,D))}}},SearchHighlight}();D.prototype.MAX_RANGES=500,b.SearchHighlight=D})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(n,b,A){"use strict";var L=function(){function UndoManager(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return UndoManager.prototype.addSession=function(n){this.$session=n},UndoManager.prototype.add=function(n,b,A){if(!this.$fromUndo&&n!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===b||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),n.id=this.$rev=++this.$maxRev}"remove"!=n.action&&"insert"!=n.action||(this.$lastDelta=n),this.lastDeltas.push(n)}},UndoManager.prototype.addSelection=function(n,b){this.selections.push({value:n,rev:b||this.$rev})},UndoManager.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},UndoManager.prototype.markIgnored=function(n,b){null==b&&(b=this.$rev+1);for(var A=this.$undoStack,L=A.length;L--;){var R=A[L][0];if(R.id<=n)break;R.id0},UndoManager.prototype.canRedo=function(){return this.$redoStack.length>0},UndoManager.prototype.bookmark=function(n){null==n&&(n=this.$rev),this.mark=n},UndoManager.prototype.isAtBookmark=function(){return this.$rev===this.mark},UndoManager.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},UndoManager.prototype.fromJSON=function(n){this.reset(),this.$undoStack=n.$undoStack,this.$redoStack=n.$redoStack},UndoManager.prototype.$prettyPrint=function(n){return n?stringifyDelta(n):stringifyDelta(this.$undoStack)+"\n---\n"+stringifyDelta(this.$redoStack)},UndoManager}();L.prototype.hasUndo=L.prototype.canUndo,L.prototype.hasRedo=L.prototype.canRedo,L.prototype.isClean=L.prototype.isAtBookmark,L.prototype.markClean=L.prototype.bookmark;var R=n("./range").Range,D=R.comparePoints;R.comparePoints;function clonePos(n){return{row:n.row,column:n.column}}function stringifyDelta(n){if(n=n||this,Array.isArray(n))return n.map(stringifyDelta).join("\n");var b="";return n.action?(b="insert"==n.action?"+":"-",b+="["+n.lines+"]"):n.value&&(b=Array.isArray(n.value)?n.value.map(stringifyRange).join("\n"):stringifyRange(n.value)),n.start&&(b+=stringifyRange(n)),(n.id||n.rev)&&(b+="\t("+(n.id||n.rev)+")"),b}function stringifyRange(n){return n.start.row+":"+n.start.column+"=>"+n.end.row+":"+n.end.column}function swap(n,b){var A="insert"==n.action,L="insert"==b.action;if(A&&L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{if(!(D(b.start,n.start)<=0))return null;shift(n,b,1)}else if(A&&!L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{if(!(D(b.end,n.start)<=0))return null;shift(n,b,-1)}else if(!A&&L)if(D(b.start,n.start)>=0)shift(b,n,1);else{if(!(D(b.start,n.start)<=0))return null;shift(n,b,1)}else if(!A&&!L)if(D(b.start,n.start)>=0)shift(b,n,1);else{if(!(D(b.end,n.start)<=0))return null;shift(n,b,-1)}return[b,n]}function swapGroups(n,b){for(var A=n.length;A--;)for(var L=0;L=0?shift(n,b,-1):(D(n.start,b.start)<=0||shift(n,R.fromPoints(b.start,n.start),-1),shift(b,n,1));else if(!A&&L)D(b.start,n.end)>=0?shift(b,n,-1):(D(b.start,n.start)<=0||shift(b,R.fromPoints(n.start,b.start),-1),shift(n,b,1));else if(!A&&!L)if(D(b.start,n.end)>=0)shift(b,n,-1);else{var B,E;if(!(D(b.end,n.start)<=0))return D(n.start,b.start)<0&&(B=n,n=splitDelta(n,b.start)),D(n.end,b.end)>0&&(E=splitDelta(n,b.end)),shiftPos(b.end,n.start,n.end,-1),E&&!B&&(n.lines=E.lines,n.start=E.start,n.end=E.end,E=n),[b,B,E].filter(Boolean);shift(n,b,-1)}return[b,n]}function shift(n,b,A){shiftPos(n.start,b.start,b.end,A),shiftPos(n.end,b.start,b.end,A)}function shiftPos(n,b,A,L){n.row==(1==L?b:A).row&&(n.column+=L*(A.column-b.column)),n.row+=L*(A.row-b.row)}function splitDelta(n,b){var A=n.lines,L=n.end;n.end=clonePos(b);var R=n.end.row-n.start.row,D=A.splice(R,A.length),B=R?b.column:b.column-n.start.column;return A.push(D[0].substring(0,B)),D[0]=D[0].substr(B),{start:clonePos(b),end:L,lines:D,action:n.action}}function moveDeltasByOne(n,b){b=function cloneDelta(n){return{start:clonePos(n.start),end:clonePos(n.end),action:n.action,lines:n.lines.slice()}}(b);for(var A=n.length;A--;){for(var L=n[A],R=0;Rthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(n),this.folds.sort((function(n,b){return-n.range.compareEnd(b.start.row,b.start.column)})),this.range.compareEnd(n.start.row,n.start.column)>0?(this.end.row=n.end.row,this.end.column=n.end.column):this.range.compareStart(n.end.row,n.end.column)<0&&(this.start.row=n.start.row,this.start.column=n.start.column)}else if(n.start.row==this.end.row)this.folds.push(n),this.end.row=n.end.row,this.end.column=n.end.column;else{if(n.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(n),this.start.row=n.start.row,this.start.column=n.start.column}n.foldLine=this},FoldLine.prototype.containsRow=function(n){return n>=this.start.row&&n<=this.end.row},FoldLine.prototype.walk=function(n,b,A){var L,R,D=0,B=this.folds,E=!0;null==b&&(b=this.end.row,A=this.end.column);for(var X=0;X0)){var X=L(n,B.start);return 0===E?b&&0!==X?-D-2:D:X>0||0===X&&!b?D:-D-1}}return-D-1},RangeList.prototype.add=function(n){var b=!n.isEmpty(),A=this.pointIndex(n.start,b);A<0&&(A=-A-1);var L=this.pointIndex(n.end,b,A);return L<0?L=-L-1:L++,this.ranges.splice(A,L-A,n)},RangeList.prototype.addList=function(n){for(var b=[],A=n.length;A--;)b.push.apply(b,this.add(n[A]));return b},RangeList.prototype.substractPoint=function(n){var b=this.pointIndex(n);if(b>=0)return this.ranges.splice(b,1)},RangeList.prototype.merge=function(){for(var n,b=[],A=this.ranges,R=(A=A.sort((function(n,b){return L(n.start,b.start)})))[0],D=1;D=0},RangeList.prototype.containsPoint=function(n){return this.pointIndex(n)>=0},RangeList.prototype.rangeAtPoint=function(n){var b=this.pointIndex(n);if(b>=0)return this.ranges[b]},RangeList.prototype.clipRows=function(n,b){var A=this.ranges;if(A[0].start.row>b||A[A.length-1].start.row=L)break}if("insert"==n.action)for(var X=R-L,$=-b.column+A.column;BL)break;if(V.start.row==L&&V.start.column>=b.column&&(V.start.column==b.column&&this.$bias<=0||(V.start.column+=$,V.start.row+=X)),V.end.row==L&&V.end.column>=b.column){if(V.end.column==b.column&&this.$bias<0)continue;V.end.column==b.column&&$>0&&BV.start.column&&V.end.column==D[B+1].start.column&&(V.end.column-=$),V.end.column+=$,V.end.row+=X}}else for(X=L-R,$=b.column-A.column;BR)break;V.end.rowb.column)&&(V.end.column=b.column,V.end.row=b.row):(V.end.column+=$,V.end.row+=X):V.end.row>R&&(V.end.row+=X),V.start.rowb.column)&&(V.start.column=b.column,V.start.row=b.row):(V.start.column+=$,V.start.row+=X):V.start.row>R&&(V.start.row+=X)}if(0!=X&&B=n)return R;if(R.end.row>n)return null}return null},this.getNextFoldLine=function(n,b){var A=this.$foldData,L=0;for(b&&(L=A.indexOf(b)),-1==L&&(L=0);L=n)return R}return null},this.getFoldedRowCount=function(n,b){for(var A=this.$foldData,L=b-n+1,R=0;R=b){E=n?L-=b-E:L=0);break}B>=n&&(L-=E>=n?B-E:B-n+1)}return L},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort((function(n,b){return n.start.row-b.start.row})),n},this.addFold=function(n,b){var A,L=this.$foldData,B=!1;n instanceof D?A=n:(A=new D(b,n)).collapseChildren=b.collapseChildren,this.$clipRangeToDocument(A.range);var E=A.start.row,X=A.start.column,$=A.end.row,V=A.end.column,K=this.getFoldAt(E,X,1),Q=this.getFoldAt($,V,-1);if(K&&Q==K)return K.addSubFold(A);K&&!K.range.isStart(E,X)&&this.removeFold(K),Q&&!Q.range.isEnd($,V)&&this.removeFold(Q);var tt=this.getFoldsInRange(A.range);tt.length>0&&(this.removeFolds(tt),A.collapseChildren||tt.forEach((function(n){A.addSubFold(n)})));for(var ot=0;ot0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach((function(n){this.expandFold(n)}),this)},this.unfold=function(n,b){var A,R;if(null==n)A=new L(0,0,this.getLength(),0),null==b&&(b=!0);else if("number"==typeof n)A=new L(n,0,n,this.getLine(n).length);else if("row"in n)A=L.fromPoints(n,n);else{if(Array.isArray(n))return R=[],n.forEach((function(n){R=R.concat(this.unfold(n))}),this),R;A=n}for(var D=R=this.getFoldsInRangeList(A);1==R.length&&L.comparePoints(R[0].start,A.start)<0&&L.comparePoints(R[0].end,A.end)>0;)this.expandFolds(R),R=this.getFoldsInRangeList(A);if(0!=b?this.removeFolds(R):this.expandFolds(R),D.length)return D},this.isRowFolded=function(n,b){return!!this.getFoldLine(n,b)},this.getRowFoldEnd=function(n,b){var A=this.getFoldLine(n,b);return A?A.end.row:n},this.getRowFoldStart=function(n,b){var A=this.getFoldLine(n,b);return A?A.start.row:n},this.getFoldDisplayLine=function(n,b,A,L,R){null==L&&(L=n.start.row),null==R&&(R=0),null==b&&(b=n.end.row),null==A&&(A=this.getLine(b).length);var D=this.doc,B="";return n.walk((function(n,b,A,E){if(!(bK)break}while(D&&X.test(D.type));D=R.stepBackward()}else D=R.getCurrentToken();return $.end.row=R.getCurrentTokenRow(),$.end.column=R.getCurrentTokenColumn(),$}},this.foldAll=function(n,b,A,L){null==A&&(A=1e5);var R=this.foldWidgets;if(R){b=b||this.getLength();for(var D=n=n||0;D=n&&(D=B.end.row,B.collapseChildren=A,this.addFold("...",B))}}},this.foldToLevel=function(n){for(this.foldAll();n-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,(function(b){for(var A=n.getTokens(b),L=0;L=0;){var D=A[R];if(null==D&&(D=A[R]=this.getFoldWidget(R)),"start"==D){var B=this.getFoldWidgetRange(R);if(L||(L=B),B&&B.end.row>=n)break}R--}return{range:-1!==R&&B,firstRange:L}},this.onFoldWidgetClick=function(n,b){b instanceof E&&(b=b.domEvent);var A={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey};if(!this.$toggleFoldWidget(n,A)){var L=b.target||b.srcElement;L&&/ace_fold-widget/.test(L.className)&&(L.className+=" ace_invalid")}},this.$toggleFoldWidget=function(n,b){if(this.getFoldWidget){var A=this.getFoldWidget(n),L=this.getLine(n),R="end"===A?-1:1,D=this.getFoldAt(n,-1===R?0:L.length,R);if(D)return b.children||b.all?this.removeFold(D):this.expandFold(D),D;var B=this.getFoldWidgetRange(n,!0);if(B&&!B.isMultiLine()&&(D=this.getFoldAt(B.start.row,B.start.column,1))&&B.isEqual(D.range))return this.removeFold(D),D;if(b.siblings){var E=this.getParentFoldRangeData(n);if(E.range)var X=E.range.start.row+1,$=E.range.end.row;this.foldAll(X,$,b.all?1e4:0)}else b.children?($=B?B.end.row:this.getLength(),this.foldAll(n+1,$,b.all?1e4:0)):B&&(b.all&&(B.collapseChildren=1e4),this.addFold("...",B));return B}},this.toggleFoldWidget=function(n){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var A=this.$toggleFoldWidget(b,{});if(!A){var L=this.getParentFoldRangeData(b,!0);if(A=L.range||L.firstRange){b=A.start.row;var R=this.getFoldAt(b,this.getLine(b).length,1);R?this.removeFold(R):this.addFold("...",A)}}},this.updateFoldWidgets=function(n){var b=n.start.row,A=n.end.row-b;if(0===A)this.foldWidgets[b]=null;else if("remove"==n.action)this.foldWidgets.splice(b,A+1,null);else{var L=Array(A+1);L.unshift(b,1),this.foldWidgets.splice.apply(this.foldWidgets,L)}},this.tokenizerUpdateFoldWidgets=function(n){var b=n.data;b.first!=b.last&&this.foldWidgets.length>b.first&&this.foldWidgets.splice(b.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(n,b,A){"use strict";var L=n("../token_iterator").TokenIterator,R=n("../range").Range;b.BracketMatch=function BracketMatch(){this.findMatchingBracket=function(n,b){if(0==n.column)return null;var A=b||this.getLine(n.row).charAt(n.column-1);if(""==A)return null;var L=A.match(/([\(\[\{])|([\)\]\}])/);return L?L[1]?this.$findClosingBracket(L[1],n):this.$findOpeningBracket(L[2],n):null},this.getBracketRange=function(n){var b,A=this.getLine(n.row),L=!0,D=A.charAt(n.column-1),B=D&&D.match(/([\(\[\{])|([\)\]\}])/);if(B||(D=A.charAt(n.column),n={row:n.row,column:n.column+1},B=D&&D.match(/([\(\[\{])|([\)\]\}])/),L=!1),!B)return null;if(B[1]){if(!(E=this.$findClosingBracket(B[1],n)))return null;b=R.fromPoints(n,E),L||(b.end.column++,b.start.column--),b.cursor=b.end}else{var E;if(!(E=this.$findOpeningBracket(B[2],n)))return null;b=R.fromPoints(E,n),L||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.getMatchingBracketRanges=function(n,b){var A=this.getLine(n.row),L=/([\(\[\{])|([\)\]\}])/,D=!b&&A.charAt(n.column-1),B=D&&D.match(L);if(B||(D=(void 0===b||b)&&A.charAt(n.column),n={row:n.row,column:n.column+1},B=D&&D.match(L)),!B)return null;var E=new R(n.row,n.column-1,n.row,n.column),X=B[1]?this.$findClosingBracket(B[1],n):this.$findOpeningBracket(B[2],n);return X?[E,new R(X.row,X.column,X.row,X.column+1)]:[E]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(n,b,A){var R=this.$brackets[n],D=1,B=new L(this,b.row,b.column),E=B.getCurrentToken();if(E||(E=B.stepForward()),E){A||(A=new RegExp("(\\.?"+E.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var X=b.column-B.getCurrentTokenColumn()-2,$=E.value;;){for(;X>=0;){var V=$.charAt(X);if(V==R){if(0==(D-=1))return{row:B.getCurrentTokenRow(),column:X+B.getCurrentTokenColumn()}}else V==n&&(D+=1);X-=1}do{E=B.stepBackward()}while(E&&!A.test(E.type));if(null==E)break;X=($=E.value).length-1}return null}},this.$findClosingBracket=function(n,b,A){var R=this.$brackets[n],D=1,B=new L(this,b.row,b.column),E=B.getCurrentToken();if(E||(E=B.stepForward()),E){A||(A=new RegExp("(\\.?"+E.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var X=b.column-B.getCurrentTokenColumn();;){for(var $=E.value,V=$.length;X"===b.value?L=!0:-1!==b.type.indexOf("tag-name")&&(A=!0))}while(b&&!A);return b},this.$findClosingTag=function(n,b){var A,L=b.value,D=b.value,B=0,E=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);b=n.stepForward();var X=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+b.value.length),$=!1;do{if(-1!==(A=b).type.indexOf("tag-close")&&!$){var V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);$=!0}if(b=n.stepForward()){if(">"===b.value&&!$){V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);$=!0}if(-1!==b.type.indexOf("tag-name")){if(D===(L=b.value))if("<"===A.value)B++;else if(""!==b.value)return;var tt=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1)}}else if(D===L&&"/>"===b.value&&--B<0)tt=Q=K=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+2),V=new R(X.end.row,X.end.column,X.end.row,X.end.column+1)}}while(b&&B>=0);if(E&&V&&K&&tt&&X&&Q)return{openTag:new R(E.start.row,E.start.column,V.end.row,V.end.column),closeTag:new R(K.start.row,K.start.column,tt.end.row,tt.end.column),openTagName:X,closeTagName:Q}},this.$findOpeningTag=function(n,b){var A=n.getCurrentToken(),L=b.value,D=0,B=n.getCurrentTokenRow(),E=n.getCurrentTokenColumn(),X=E+2,$=new R(B,E,B,X);n.stepForward();var V=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+b.value.length);if(-1===b.type.indexOf("tag-close")&&(b=n.stepForward()),b&&">"===b.value){var K=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);n.stepBackward(),n.stepBackward();do{if(b=A,B=n.getCurrentTokenRow(),X=(E=n.getCurrentTokenColumn())+b.value.length,A=n.stepBackward(),b)if(-1!==b.type.indexOf("tag-name")){if(L===b.value)if("<"===A.value){if(++D>0){var Q=new R(B,E,B,X),tt=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1);do{b=n.stepForward()}while(b&&">"!==b.value);var ot=new R(n.getCurrentTokenRow(),n.getCurrentTokenColumn(),n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1)}}else""===b.value){for(var nt=0,it=A;it;){if(-1!==it.type.indexOf("tag-name")&&it.value===L){D--;break}if("<"===it.value)break;it=n.stepBackward(),nt++}for(var rt=0;rtA&&(this.$docRowCache.splice(A,b),this.$screenRowCache.splice(A,b))},EditSession.prototype.$getRowCacheIndex=function(n,b){for(var A=0,L=n.length-1;A<=L;){var R=A+L>>1,D=n[R];if(b>D)A=R+1;else{if(!(b=b);D++);return(A=L[D])?(A.index=D,A.start=R-A.value.length,A):null},EditSession.prototype.setUndoManager=function(n){if(this.$undoManager=n,this.$informUndoManager&&this.$informUndoManager.cancel(),n){var b=this;n.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1},this.$informUndoManager=R.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},EditSession.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},EditSession.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},EditSession.prototype.getTabString=function(){return this.getUseSoftTabs()?R.stringRepeat(" ",this.getTabSize()):"\t"},EditSession.prototype.setUseSoftTabs=function(n){this.setOption("useSoftTabs",n)},EditSession.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},EditSession.prototype.setTabSize=function(n){this.setOption("tabSize",n)},EditSession.prototype.getTabSize=function(){return this.$tabSize},EditSession.prototype.isTabStop=function(n){return this.$useSoftTabs&&n.column%this.$tabSize==0},EditSession.prototype.setNavigateWithinSoftTabs=function(n){this.setOption("navigateWithinSoftTabs",n)},EditSession.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},EditSession.prototype.setOverwrite=function(n){this.setOption("overwrite",n)},EditSession.prototype.getOverwrite=function(){return this.$overwrite},EditSession.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},EditSession.prototype.addGutterDecoration=function(n,b){this.$decorations[n]||(this.$decorations[n]=""),this.$decorations[n]+=" "+b,this._signal("changeBreakpoint",{})},EditSession.prototype.removeGutterDecoration=function(n,b){this.$decorations[n]=(this.$decorations[n]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},EditSession.prototype.getBreakpoints=function(){return this.$breakpoints},EditSession.prototype.setBreakpoints=function(n){this.$breakpoints=[];for(var b=0;b0&&(L=!!A.charAt(b-1).match(this.tokenRe)),L||(L=!!A.charAt(b).match(this.tokenRe)),L)var R=this.tokenRe;else if(/^\s+$/.test(A.slice(b-1,b+1)))R=/\s/;else R=this.nonTokenRe;var D=b;if(D>0){do{D--}while(D>=0&&A.charAt(D).match(R));D++}for(var B=b;Bn&&(n=b.screenWidth)})),this.lineWidgetWidth=n},EditSession.prototype.$computeWidth=function(n){if(this.$modified||n){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),A=this.$rowLengthCache,L=0,R=0,D=this.$foldData[R],B=D?D.start.row:1/0,E=b.length,X=0;XB){if((X=D.end.row+1)>=E)break;B=(D=this.$foldData[R++])?D.start.row:1/0}null==A[X]&&(A[X]=this.$getStringScreenWidth(b[X])[0]),A[X]>L&&(L=A[X])}this.screenWidth=L}},EditSession.prototype.getLine=function(n){return this.doc.getLine(n)},EditSession.prototype.getLines=function(n,b){return this.doc.getLines(n,b)},EditSession.prototype.getLength=function(){return this.doc.getLength()},EditSession.prototype.getTextRange=function(n){return this.doc.getTextRange(n||this.selection.getRange())},EditSession.prototype.insert=function(n,b){return this.doc.insert(n,b)},EditSession.prototype.remove=function(n){return this.doc.remove(n)},EditSession.prototype.removeFullLines=function(n,b){return this.doc.removeFullLines(n,b)},EditSession.prototype.undoChanges=function(n,b){if(n.length){this.$fromUndo=!0;for(var A=n.length-1;-1!=A;A--){var L=n[A];"insert"==L.action||"remove"==L.action?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!b&&this.$undoSelect&&(n.selectionBefore?this.selection.fromJSON(n.selectionBefore):this.selection.setRange(this.$getUndoSelection(n,!0))),this.$fromUndo=!1}},EditSession.prototype.redoChanges=function(n,b){if(n.length){this.$fromUndo=!0;for(var A=0;An.end.column&&(D.start.column+=$),D.end.row==n.end.row&&D.end.column>n.end.column&&(D.end.column+=$)),B&&D.start.row>=n.end.row&&(D.start.row+=B,D.end.row+=B)}if(D.end=this.insert(D.start,L),R.length){var E=n.start,X=D.start,$=(B=X.row-E.row,X.column-E.column);this.addFolds(R.map((function(n){return(n=n.clone()).start.row==E.row&&(n.start.column+=$),n.end.row==E.row&&(n.end.column+=$),n.start.row+=B,n.end.row+=B,n})))}return D},EditSession.prototype.indentRows=function(n,b,A){A=A.replace(/\t/g,this.getTabString());for(var L=n;L<=b;L++)this.doc.insertInLine({row:L,column:0},A)},EditSession.prototype.outdentRows=function(n){for(var b=n.collapseRows(),A=new V(0,0,0,0),L=this.getTabSize(),R=b.start.row;R<=b.end.row;++R){var D=this.getLine(R);A.start.row=R,A.end.row=R;for(var B=0;B0){var R;if((R=this.getRowFoldEnd(b+A))>this.doc.getLength()-1)return 0;L=R-b}else{n=this.$clipRowToDocument(n);L=(b=this.$clipRowToDocument(b))-n+1}var D=new V(n,0,b,Number.MAX_VALUE),B=this.getFoldsInRange(D).map((function(n){return(n=n.clone()).start.row+=L,n.end.row+=L,n})),E=0==A?this.doc.getLines(n,b):this.doc.removeFullLines(n,b);return this.doc.insertFullLines(n+L,E),B.length&&this.addFolds(B),L},EditSession.prototype.moveLinesUp=function(n,b){return this.$moveLines(n,b,-1)},EditSession.prototype.moveLinesDown=function(n,b){return this.$moveLines(n,b,1)},EditSession.prototype.duplicateLines=function(n,b){return this.$moveLines(n,b,0)},EditSession.prototype.$clipRowToDocument=function(n){return Math.max(0,Math.min(n,this.doc.getLength()-1))},EditSession.prototype.$clipColumnToRow=function(n,b){return b<0?0:Math.min(this.doc.getLine(n).length,b)},EditSession.prototype.$clipPositionToDocument=function(n,b){if(b=Math.max(0,b),n<0)n=0,b=0;else{var A=this.doc.getLength();n>=A?(n=A-1,b=this.doc.getLine(A-1).length):b=Math.min(this.doc.getLine(n).length,b)}return{row:n,column:b}},EditSession.prototype.$clipRangeToDocument=function(n){n.start.row<0?(n.start.row=0,n.start.column=0):n.start.column=this.$clipColumnToRow(n.start.row,n.start.column);var b=this.doc.getLength()-1;return n.end.row>b?(n.end.row=b,n.end.column=this.doc.getLine(b).length):n.end.column=this.$clipColumnToRow(n.end.row,n.end.column),n},EditSession.prototype.setUseWrapMode=function(n){if(n!=this.$useWrapMode){if(this.$useWrapMode=n,this.$modified=!0,this.$resetRowCache(0),n){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},EditSession.prototype.getUseWrapMode=function(){return this.$useWrapMode},EditSession.prototype.setWrapLimitRange=function(n,b){this.$wrapLimitRange.min===n&&this.$wrapLimitRange.max===b||(this.$wrapLimitRange={min:n,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},EditSession.prototype.adjustWrapLimit=function(n,b){var A=this.$wrapLimitRange;A.max<0&&(A={min:b,max:b});var L=this.$constrainWrapLimit(n,A.min,A.max);return L!=this.$wrapLimit&&L>1&&(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},EditSession.prototype.$constrainWrapLimit=function(n,b,A){return b&&(n=Math.max(b,n)),A&&(n=Math.min(A,n)),n},EditSession.prototype.getWrapLimit=function(){return this.$wrapLimit},EditSession.prototype.setWrapLimit=function(n){this.setWrapLimitRange(n,n)},EditSession.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},EditSession.prototype.$updateInternalDataOnChange=function(n){var b=this.$useWrapMode,A=n.action,L=n.start,R=n.end,D=L.row,B=R.row,E=B-D,X=null;if(this.$updating=!0,0!=E)if("remove"===A){this[b?"$wrapData":"$rowLengthCache"].splice(D,E);var $=this.$foldData;X=this.getFoldsInRange(n),this.removeFolds(X);var V=0;if(nt=this.getFoldLine(R.row)){nt.addRemoveChars(R.row,R.column,L.column-R.column),nt.shiftRow(-E);var K=this.getFoldLine(D);K&&K!==nt&&(K.merge(nt),nt=K),V=$.indexOf(nt)+1}for(;V<$.length;V++){(nt=$[V]).start.row>=R.row&&nt.shiftRow(-E)}B=D}else{var Q=Array(E);Q.unshift(D,0);var tt=b?this.$wrapData:this.$rowLengthCache;tt.splice.apply(tt,Q);$=this.$foldData,V=0;if(nt=this.getFoldLine(D)){var ot=nt.range.compareInside(L.row,L.column);0==ot?(nt=nt.split(L.row,L.column))&&(nt.shiftRow(E),nt.addRemoveChars(B,0,R.column-L.column)):-1==ot&&(nt.addRemoveChars(D,0,R.column-L.column),nt.shiftRow(E)),V=$.indexOf(nt)+1}for(;V<$.length;V++){var nt;(nt=$[V]).start.row>=D&&nt.shiftRow(E)}}else E=Math.abs(n.start.column-n.end.column),"remove"===A&&(X=this.getFoldsInRange(n),this.removeFolds(X),E=-E),(nt=this.getFoldLine(D))&&nt.addRemoveChars(D,L.column,E);return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(D,B):this.$updateRowLengthCache(D,B),X},EditSession.prototype.$updateRowLengthCache=function(n,b){this.$rowLengthCache[n]=null,this.$rowLengthCache[b]=null},EditSession.prototype.$updateWrapData=function(n,b){var A,L,R=this.doc.getAllLines(),D=this.getTabSize(),B=this.$wrapData,E=this.$wrapLimit,X=n;for(b=Math.min(b,R.length-1);X<=b;)(L=this.getFoldLine(X,L))?(A=[],L.walk(function(n,b,L,D){var B;if(null!=n){(B=this.$getDisplayTokens(n,A.length))[0]=st;for(var E=1;Eb-V;){var K=D+b-V;if(n[K-1]>=ut&&n[K]>=ut)addSplit(K);else if(n[K]!=st&&n[K]!=pt){for(var Q=Math.max(K-(b-(b>>2)),D-1);K>Q&&n[K]Q&&n[K]Q&&n[K]==lt;)K--}else for(;K>Q&&n[K]Q?addSplit(++K):(n[K=D+b]==rt&&K--,addSplit(K-V))}else{for(;K!=D-1&&n[K]!=st;K--);if(K>D){addSplit(K);continue}for(K=D+b;K39&&D<48||D>57&&D<64?L.push(lt):D>=4352&&isFullWidth(D)?L.push(it,rt):L.push(it)}return L},EditSession.prototype.$getStringScreenWidth=function(n,b,A){if(0==b)return[0,0];var L,R;for(null==b&&(b=1/0),A=A||0,R=0;R=4352&&isFullWidth(L)?A+=2:A+=1,!(A>b));R++);return[A,R]},EditSession.prototype.getRowLength=function(n){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[n]&&this.lineWidgets[n].rowCount||0),this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+b:b},EditSession.prototype.getRowLineCount=function(n){return this.$useWrapMode&&this.$wrapData[n]?this.$wrapData[n].length+1:1},EditSession.prototype.getRowWrapIndent=function(n){if(this.$useWrapMode){var b=this.screenToDocumentPosition(n,Number.MAX_VALUE),A=this.$wrapData[b.row];return A.length&&A[0]=0){E=$[V],D=this.$docRowCache[V];var Q=n>$[K-1]}else Q=!K;for(var tt=this.getLength()-1,ot=this.getNextFoldLine(D),nt=ot?ot.start.row:1/0;E<=n&&!(E+(X=this.getRowLength(D))>n||D>=tt);)E+=X,++D>nt&&(D=ot.end.row+1,nt=(ot=this.getNextFoldLine(D,ot))?ot.start.row:1/0),Q&&(this.$docRowCache.push(D),this.$screenRowCache.push(E));if(ot&&ot.start.row<=D)L=this.getFoldDisplayLine(ot),D=ot.start.row;else{if(E+X<=n||D>tt)return{row:tt,column:this.getLine(tt).length};L=this.getLine(D),ot=null}var it=0,rt=Math.floor(n-E);if(this.$useWrapMode){var st=this.$wrapData[D];st&&(R=st[rt],rt>0&&st.length&&(it=st.indent,B=st[rt-1]||st[st.length-1],L=L.substring(B)))}return void 0!==A&&this.$bidiHandler.isBidiRow(E+rt,D,rt)&&(b=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(L,b-it)[1],this.$useWrapMode&&B>=R&&(B=R-1),ot?ot.idxToPosition(B):{row:D,column:B}},EditSession.prototype.documentToScreenPosition=function(n,b){if(void 0===b)var A=this.$clipPositionToDocument(n.row,n.column);else A=this.$clipPositionToDocument(n,b);n=A.row,b=A.column;var L,R=0,D=null;(L=this.getFoldAt(n,b,1))&&(n=L.start.row,b=L.start.column);var B,E=0,X=this.$docRowCache,$=this.$getRowCacheIndex(X,n),V=X.length;if(V&&$>=0){E=X[$],R=this.$screenRowCache[$];var K=n>X[V-1]}else K=!V;for(var Q=this.getNextFoldLine(E),tt=Q?Q.start.row:1/0;E=tt){if((B=Q.end.row+1)>n)break;tt=(Q=this.getNextFoldLine(B,Q))?Q.start.row:1/0}else B=E+1;R+=this.getRowLength(E),E=B,K&&(this.$docRowCache.push(E),this.$screenRowCache.push(R))}var ot="";Q&&E>=tt?(ot=this.getFoldDisplayLine(Q,n,b),D=Q.start.row):(ot=this.getLine(n).substring(0,b),D=n);var nt=0;if(this.$useWrapMode){var it=this.$wrapData[D];if(it){for(var rt=0;ot.length>=it[rt];)R++,rt++;ot=ot.substring(it[rt-1]||0,ot.length),nt=rt>0?it.indent:0}}return this.lineWidgets&&this.lineWidgets[E]&&this.lineWidgets[E].rowsAbove&&(R+=this.lineWidgets[E].rowsAbove),{row:R,column:nt+this.$getStringScreenWidth(ot)[0]}},EditSession.prototype.documentToScreenColumn=function(n,b){return this.documentToScreenPosition(n,b).column},EditSession.prototype.documentToScreenRow=function(n,b){return this.documentToScreenPosition(n,b).row},EditSession.prototype.getScreenLength=function(){var n=0,b=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,L=0,R=(E=0,(b=this.$foldData[E++])?b.start.row:1/0);LR&&(L=b.end.row+1,R=(b=this.$foldData[E++])?b.start.row:1/0)}else{n=this.getLength();for(var B=this.$foldData,E=0;EA);D++);return[L,D]})},EditSession.prototype.getPrecedingCharacter=function(){var n=this.selection.getCursor();return 0===n.column?0===n.row?"":this.doc.getNewLineCharacter():this.getLine(n.row)[n.column-1]},EditSession.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},EditSession}();nt.$uid=0,nt.prototype.$modes=B.$modes,nt.prototype.getValue=nt.prototype.toString,nt.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},nt.prototype.$overwrite=!1,nt.prototype.$mode=null,nt.prototype.$modeId=null,nt.prototype.$scrollTop=0,nt.prototype.$scrollLeft=0,nt.prototype.$wrapLimit=80,nt.prototype.$useWrapMode=!1,nt.prototype.$wrapLimitRange={min:null,max:null},nt.prototype.lineWidgets=null,nt.prototype.isFullWidth=isFullWidth,L.implement(nt.prototype,E);var it=1,rt=2,st=3,pt=4,lt=9,ut=10,bt=11,Mt=12;function isFullWidth(n){return!(n<4352)&&(n>=4352&&n<=4447||n>=4515&&n<=4519||n>=4602&&n<=4607||n>=9001&&n<=9002||n>=11904&&n<=11929||n>=11931&&n<=12019||n>=12032&&n<=12245||n>=12272&&n<=12283||n>=12288&&n<=12350||n>=12353&&n<=12438||n>=12441&&n<=12543||n>=12549&&n<=12589||n>=12593&&n<=12686||n>=12688&&n<=12730||n>=12736&&n<=12771||n>=12784&&n<=12830||n>=12832&&n<=12871||n>=12880&&n<=13054||n>=13056&&n<=19903||n>=19968&&n<=42124||n>=42128&&n<=42182||n>=43360&&n<=43388||n>=44032&&n<=55203||n>=55216&&n<=55238||n>=55243&&n<=55291||n>=63744&&n<=64255||n>=65040&&n<=65049||n>=65072&&n<=65106||n>=65108&&n<=65126||n>=65128&&n<=65131||n>=65281&&n<=65376||n>=65504&&n<=65510)}n("./edit_session/folding").Folding.call(nt.prototype),n("./edit_session/bracket_match").BracketMatch.call(nt.prototype),B.defineOptions(nt.prototype,"session",{wrap:{set:function(n){if(n&&"off"!=n?"free"==n?n=!0:"printMargin"==n?n=-1:"string"==typeof n&&(n=parseInt(n,10)||!1):n=!1,this.$wrap!=n)if(this.$wrap=n,n){var b="number"==typeof n?n:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(n){(n="auto"==n?"text"!=this.$mode.type:"text"!=n)!=this.$wrapAsCode&&(this.$wrapAsCode=n,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(n){this.$useWorker=n,this.$stopWorker(),n&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(n){(n=parseInt(n))>0&&this.$tabSize!==n&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=n,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(n){this.setFoldStyle(n)},handlesSet:!0},overwrite:{set:function(n){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(n){this.doc.setNewLineMode(n)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(n){this.setMode(n)},get:function(){return this.$modeId},handlesSet:!0}}),b.EditSession=nt})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(n,b,A){"use strict";var L=n("./lib/lang"),R=n("./lib/oop"),D=n("./range").Range,B=function(){function Search(){this.$options={}}return Search.prototype.set=function(n){return R.mixin(this.$options,n),this},Search.prototype.getOptions=function(){return L.copyObject(this.$options)},Search.prototype.setOptions=function(n){this.$options=n},Search.prototype.find=function(n){var b=this.$options,A=this.$matchIterator(n,b);if(!A)return!1;var L=null;return A.forEach((function(n,A,R,B){return L=new D(n,A,R,B),!(A==B&&b.start&&b.start.start&&0!=b.skipCurrent&&L.isEqual(b.start))||(L=null,!1)})),L},Search.prototype.findAll=function(n){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var A=b.range,R=A?n.getLines(A.start.row,A.end.row):n.doc.getAllLines(),B=[],E=b.re;if(b.$isMultiLine){var X,$=E.length,V=R.length-$;t:for(var K=E.offset||0;K<=V;K++){for(var Q=0;Q<$;Q++)if(-1==R[K+Q].search(E[Q]))continue t;var tt=R[K],ot=R[K+$-1],nt=tt.length-tt.match(E[0])[0].length,it=ot.match(E[$-1])[0].length;X&&X.end.row===K&&X.end.column>nt||(B.push(X=new D(K,nt,K+$-1,it)),$>2&&(K=K+$-2))}}else for(var rt=0;rtut&&B[Q].end.row==bt;)Q--;for(B=B.slice(rt,Q+1),rt=0,Q=B.length;rt=$;A--)if(forEachInLine(A,Number.MAX_VALUE,n))return;if(0!=b.wrap)for(A=V,$=X.row;A>=$;A--)if(forEachInLine(A,Number.MAX_VALUE,n))return}};else forEach=function(n){var A=X.row;if(!forEachInLine(A,X.column,n)){for(A+=1;A<=V;A++)if(forEachInLine(A,0,n))return;if(0!=b.wrap)for(A=$,V=X.row;A<=V;A++)if(forEachInLine(A,0,n))return}};if(b.$isMultiLine)var K=A.length,forEachInLine=function(b,L,D){var B=R?b-K+1:b;if(!(B<0||B+K>n.getLength())){var E=n.getLine(B),X=E.search(A[0]);if(!(!R&&XL))return!!D(B,X,B+K-1,V)||void 0}}};else if(R)forEachInLine=function(b,R,D){var E,X=n.getLine(b),$=[],V=0;for(A.lastIndex=0;E=A.exec(X);){var K=E[0].length;if(V=E.index,!K){if(V>=X.length)break;A.lastIndex=V+=L.skipEmptyMatch(X,V,B)}if(E.index+K>R)break;$.push(E.index,K)}for(var Q=$.length-1;Q>=0;Q-=2){var tt=$[Q-1];if(D(b,tt,b,tt+(K=$[Q])))return!0}};else forEachInLine=function(b,R,D){var E,X,$=n.getLine(b);for(A.lastIndex=R;X=A.exec($);){var V=X[0].length;if(D(b,E=X.index,b,E+V))return!0;if(!V&&(A.lastIndex=E+=L.skipEmptyMatch($,E,B),E>=$.length))return!1}};return{forEach}},Search}();b.Search=B})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("../lib/keys"),B=n("../lib/useragent"),E=D.KEY_MODS,X=function(){function MultiHashHandler(n,b){this.$init(n,b,!1)}return MultiHashHandler.prototype.$init=function(n,b,A){this.platform=b||(B.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(n),this.$singleCommand=A},MultiHashHandler.prototype.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n),this.commands[n.name]=n,n.bindKey&&this._buildKeyHash(n)},MultiHashHandler.prototype.removeCommand=function(n,b){var A=n&&("string"==typeof n?n:n.name);n=this.commands[A],b||delete this.commands[A];var L=this.commandKeyBinding;for(var R in L){var D=L[R];if(D==n)delete L[R];else if(Array.isArray(D)){var B=D.indexOf(n);-1!=B&&(D.splice(B,1),1==D.length&&(L[R]=D[0]))}}},MultiHashHandler.prototype.bindKey=function(n,b,A){if("object"==typeof n&&n&&(null==A&&(A=n.position),n=n[this.platform]),n)return"function"==typeof b?this.addCommand({exec:b,bindKey:n,name:b.name||n}):void n.split("|").forEach((function(n){var L="";if(-1!=n.indexOf(" ")){var R=n.split(/\s+/);n=R.pop(),R.forEach((function(n){var b=this.parseKeys(n),A=E[b.hashId]+b.key;L+=(L?" ":"")+A,this._addCommandToBinding(L,"chainKeys")}),this),L+=" "}var D=this.parseKeys(n),B=E[D.hashId]+D.key;this._addCommandToBinding(L+B,b,A)}),this)},MultiHashHandler.prototype._addCommandToBinding=function(n,b,A){var L,R=this.commandKeyBinding;if(b)if(!R[n]||this.$singleCommand)R[n]=b;else{Array.isArray(R[n])?-1!=(L=R[n].indexOf(b))&&R[n].splice(L,1):R[n]=[R[n]],"number"!=typeof A&&(A=getPosition(b));var D=R[n];for(L=0;LA)break}D.splice(L,0,b)}else delete R[n]},MultiHashHandler.prototype.addCommands=function(n){n&&Object.keys(n).forEach((function(b){var A=n[b];if(A){if("string"==typeof A)return this.bindKey(A,b);"function"==typeof A&&(A={exec:A}),"object"==typeof A&&(A.name||(A.name=b),this.addCommand(A))}}),this)},MultiHashHandler.prototype.removeCommands=function(n){Object.keys(n).forEach((function(b){this.removeCommand(n[b])}),this)},MultiHashHandler.prototype.bindKeys=function(n){Object.keys(n).forEach((function(b){this.bindKey(b,n[b])}),this)},MultiHashHandler.prototype._buildKeyHash=function(n){this.bindKey(n.bindKey,n)},MultiHashHandler.prototype.parseKeys=function(n){var b=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(n){return n})),A=b.pop(),L=D[A];if(D.FUNCTION_KEYS[L])A=D.FUNCTION_KEYS[L].toLowerCase();else{if(!b.length)return{key:A,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:A.toUpperCase(),hashId:-1}}for(var R=0,B=b.length;B--;){var E=D.KEY_MODS[b[B]];if(null==E)return"undefined"!=typeof console&&console.error("invalid modifier "+b[B]+" in "+n),!1;R|=E}return{key:A,hashId:R}},MultiHashHandler.prototype.findKeyCommand=function(n,b){var A=E[n]+b;return this.commandKeyBinding[A]},MultiHashHandler.prototype.handleKeyboard=function(n,b,A,L){if(!(L<0)){var R=E[b]+A,D=this.commandKeyBinding[R];return n.$keyChain&&(n.$keyChain+=" "+R,D=this.commandKeyBinding[n.$keyChain]||D),!D||"chainKeys"!=D&&"chainKeys"!=D[D.length-1]?(n.$keyChain&&(b&&4!=b||1!=A.length?(-1==b||L>0)&&(n.$keyChain=""):n.$keyChain=n.$keyChain.slice(0,-R.length-1)),{command:D}):(n.$keyChain=n.$keyChain||R,{command:"null"})}},MultiHashHandler.prototype.getStatusText=function(n,b){return b.$keyChain||""},MultiHashHandler}();function getPosition(n){return"object"==typeof n&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var $=function(n){function HashHandler(b,A){var L=n.call(this,b,A)||this;return L.$singleCommand=!0,L}return R(HashHandler,n),HashHandler}(X);$.call=function(n,b,A){X.prototype.$init.call(n,b,A,!0)},X.call=function(n,b,A){X.prototype.$init.call(n,b,A,!1)},b.HashHandler=$,b.MultiHashHandler=X})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("../lib/oop"),B=n("../keyboard/hash_handler").MultiHashHandler,E=n("../lib/event_emitter").EventEmitter,X=function(n){function CommandManager(b,A){var L=n.call(this,A,b)||this;return L.byName=L.commands,L.setDefaultHandler("exec",(function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)})),L}return R(CommandManager,n),CommandManager.prototype.exec=function(n,b,A){if(Array.isArray(n)){for(var L=n.length;L--;)if(this.exec(n[L],b,A))return!0;return!1}if("string"==typeof n&&(n=this.commands[n]),!this.canExecute(n,b))return!1;var R={editor:b,command:n,args:A};return R.returnValue=this._emit("exec",R),this._signal("afterExec",R),!1!==R.returnValue},CommandManager.prototype.canExecute=function(n,b){return"string"==typeof n&&(n=this.commands[n]),!!n&&(!(b&&b.$readOnly&&!n.readOnly)&&!(0!=this.$checkCommandState&&n.isAvailable&&!n.isAvailable(b)))},CommandManager.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(n){this.macro.push([n.command,n.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},CommandManager.prototype.replay=function(n){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach((function(b){"string"==typeof b?this.exec(b,n):this.exec(b[0],n,b[1])}),this)}finally{this.$inReplay=!1}}},CommandManager.prototype.trimMacro=function(n){return n.map((function(n){return"string"!=typeof n[0]&&(n[0]=n[0].name),n[1]||(n=n[0]),n}))},CommandManager}(B);D.implement(X.prototype,E),b.CommandManager=X})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(n,b,A){"use strict";var L=n("../lib/lang"),R=n("../config"),D=n("../range").Range;function bindKey(n,b){return{win:n,mac:b}}b.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:bindKey("Ctrl-,","Command-,"),exec:function(n){R.loadModule("ace/ext/settings_menu",(function(b){b.init(n),n.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:bindKey("Alt-E","F4"),exec:function(n){R.loadModule("ace/ext/error_marker",(function(b){b.showErrorMarker(n,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:bindKey("Alt-Shift-E","Shift-F4"),exec:function(n){R.loadModule("ace/ext/error_marker",(function(b){b.showErrorMarker(n,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:bindKey("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:bindKey(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:bindKey("Ctrl-L","Command-L"),exec:function(n,b){"number"!=typeof b||isNaN(b)||n.gotoLine(b),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:bindKey("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:bindKey("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:bindKey("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:bindKey("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:bindKey(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:bindKey(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:bindKey("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:bindKey("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:bindKey("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:bindKey("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:bindKey("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:bindKey("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:bindKey("Ctrl-F","Command-F"),exec:function(n){R.loadModule("ace/ext/searchbox",(function(b){b.Search(n)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:bindKey("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:bindKey("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:bindKey("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:bindKey("Up","Up|Ctrl-P"),exec:function(n,b){n.navigateUp(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:bindKey("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:bindKey("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:bindKey("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:bindKey("Down","Down|Ctrl-N"),exec:function(n,b){n.navigateDown(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:bindKey("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:bindKey("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:bindKey("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:bindKey("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:bindKey("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:bindKey("Left","Left|Ctrl-B"),exec:function(n,b){n.navigateLeft(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:bindKey("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:bindKey("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:bindKey("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:bindKey("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:bindKey("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:bindKey("Right","Right|Ctrl-F"),exec:function(n,b){n.navigateRight(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:bindKey(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:bindKey("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:bindKey(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:bindKey("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:bindKey("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:bindKey("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:bindKey("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:bindKey("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:bindKey("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:bindKey("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:bindKey(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var b=n.$copyWithEmptySelection&&n.selection.isEmpty()?n.selection.getLineRange():n.selection.getRange();n._emit("cut",b),b.isEmpty()||n.session.remove(b),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,b){n.$handlePaste(b)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:bindKey("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:bindKey("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:bindKey("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:bindKey("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:bindKey("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:bindKey("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:bindKey("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:bindKey("Ctrl-H","Command-Option-F"),exec:function(n){R.loadModule("ace/ext/searchbox",(function(b){b.Search(n,!0)}))}},{name:"undo",description:"Undo",bindKey:bindKey("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:bindKey("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:bindKey("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:bindKey("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:bindKey("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:bindKey("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:bindKey("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:bindKey("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:bindKey("Shift-Delete",null),exec:function(n){if(!n.selection.isEmpty())return!1;n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:bindKey("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:bindKey("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:bindKey("Ctrl-Shift-Backspace",null),exec:function(n){var b=n.selection.getRange();b.start.column=0,n.session.remove(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:bindKey("Ctrl-Shift-Delete",null),exec:function(n){var b=n.selection.getRange();b.end.column=Number.MAX_VALUE,n.session.remove(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:bindKey("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:bindKey("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:bindKey("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:bindKey("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:bindKey("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:bindKey("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,b){n.insert(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,b){n.insert(L.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:bindKey(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:bindKey("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:bindKey("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:bindKey("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:bindKey(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:bindKey("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var b=n.selection.getRange();b.start.column=b.end.column=0,b.end.row++,n.selection.setRange(b,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:bindKey("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:bindKey(null,null),exec:function(n){for(var b=n.selection.isBackwards(),A=b?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),R=b?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),B=n.session.doc.getLine(A.row).length,E=n.session.doc.getTextRange(n.selection.getRange()).replace(/\n\s*/," ").length,X=n.session.doc.getLine(A.row),$=A.row+1;$<=R.row+1;$++){var V=L.stringTrimLeft(L.stringTrimRight(n.session.doc.getLine($)));0!==V.length&&(V=" "+V),X+=V}R.row+10?(n.selection.moveCursorTo(A.row,A.column),n.selection.selectTo(A.row,A.column+E)):(B=n.session.doc.getLine(A.row).length>B?B+1:B,n.selection.moveCursorTo(A.row,B))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:bindKey(null,null),exec:function(n){var b=n.session.doc.getLength()-1,A=n.session.doc.getLine(b).length,L=n.selection.rangeList.ranges,R=[];L.length<1&&(L=[n.selection.getRange()]);for(var B=0;Bb[A].column&&A++,D.unshift(A,0),b.splice.apply(b,D),this.$updateRows()}}},LineWidgets.prototype.$updateRows=function(){var n=this.session.lineWidgets;if(n){var b=!0;n.forEach((function(n,A){if(n)for(b=!1,n.row=A;n.$oldWidget;)n.$oldWidget.row=A,n=n.$oldWidget})),b&&(this.session.lineWidgets=null)}},LineWidgets.prototype.$registerLineWidget=function(n){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var b=this.session.lineWidgets[n.row];return b&&(n.$oldWidget=b,b.el&&b.el.parentNode&&(b.el.parentNode.removeChild(b.el),b._inDocument=!1)),this.session.lineWidgets[n.row]=n,n},LineWidgets.prototype.addLineWidget=function(n){if(this.$registerLineWidget(n),n.session=this.session,!this.editor)return n;var b=this.editor.renderer;n.html&&!n.el&&(n.el=L.createElement("div"),n.el.innerHTML=n.html),n.text&&!n.el&&(n.el=L.createElement("div"),n.el.textContent=n.text),n.el&&(L.addCssClass(n.el,"ace_lineWidgetContainer"),n.className&&L.addCssClass(n.el,n.className),n.el.style.position="absolute",n.el.style.zIndex="5",b.container.appendChild(n.el),n._inDocument=!0,n.coverGutter||(n.el.style.zIndex="3"),null==n.pixelHeight&&(n.pixelHeight=n.el.offsetHeight)),null==n.rowCount&&(n.rowCount=n.pixelHeight/b.layerConfig.lineHeight);var A=this.session.getFoldAt(n.row,0);if(n.$fold=A,A){var R=this.session.lineWidgets;n.row!=A.end.row||R[A.start.row]?n.hidden=!0:R[A.start.row]=n}return this.session._emit("changeFold",{data:{start:{row:n.row}}}),this.$updateRows(),this.renderWidgets(null,b),this.onWidgetChanged(n),n},LineWidgets.prototype.removeLineWidget=function(n){if(n._inDocument=!1,n.session=null,n.el&&n.el.parentNode&&n.el.parentNode.removeChild(n.el),n.editor&&n.editor.destroy)try{n.editor.destroy()}catch(n){}if(this.session.lineWidgets){var b=this.session.lineWidgets[n.row];if(b==n)this.session.lineWidgets[n.row]=n.$oldWidget,n.$oldWidget&&this.onWidgetChanged(n.$oldWidget);else for(;b;){if(b.$oldWidget==n){b.$oldWidget=n.$oldWidget;break}b=b.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:n.row}}}),this.$updateRows()},LineWidgets.prototype.getWidgetsAtRow=function(n){for(var b=this.session.lineWidgets,A=b&&b[n],L=[];A;)L.push(A),A=A.$oldWidget;return L},LineWidgets.prototype.onWidgetChanged=function(n){this.session._changedWidgets.push(n),this.editor&&this.editor.renderer.updateFull()},LineWidgets.prototype.measureWidgets=function(n,b){var A=this.session._changedWidgets,L=b.layerConfig;if(A&&A.length){for(var R=1/0,D=0;D0&&!L[R];)R--;this.firstRow=A.firstRow,this.lastRow=A.lastRow,b.$cursorLayer.config=A;for(var B=R;B<=D;B++){var E=L[B];if(E&&E.el)if(E.hidden)E.el.style.top=-100-(E.pixelHeight||0)+"px";else{E._inDocument||(E._inDocument=!0,b.container.appendChild(E.el));var X=b.$cursorLayer.getPixelPosition({row:B,column:0},!0).top;E.coverLine||(X+=A.lineHeight*this.session.getRowLineCount(E.row)),E.el.style.top=X-A.offset+"px";var $=E.coverGutter?0:b.gutterWidth;E.fixedWidth||($-=b.scrollLeft),E.el.style.left=$+"px",E.fullWidth&&E.screenWidth&&(E.el.style.minWidth=A.width+2*A.padding+"px"),E.fixedWidth?E.el.style.right=b.scrollBar.getWidth()+"px":E.el.style.right=""}}}},LineWidgets}();b.LineWidgets=R})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(n,b,A){"use strict";var L=n("../lib/keys"),R=n("../mouse/default_gutter_handler").GutterTooltip,D=function(){function GutterKeyboardHandler(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new R(this.editor)}return GutterKeyboardHandler.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},GutterKeyboardHandler.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},GutterKeyboardHandler.prototype.$onGutterKeyDown=function(n){if(this.annotationTooltip.isOpen)return n.preventDefault(),void(n.keyCode===L.escape&&this.annotationTooltip.hideTooltip());if(n.target===this.element){if(n.keyCode!=L.enter)return;n.preventDefault();var b=this.editor.getCursorPosition().row;return this.editor.isRowVisible(b)||this.editor.scrollToLine(b,!0,!0),void setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),b=this.$findNearestFoldWidget(n),A=this.$findNearestAnnotation(n);if(null!==b||null!==A)return null===b&&null!==A?(this.activeRowIndex=A,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==b&&null===A?(this.activeRowIndex=b,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(A-n)0||n+b=0&&this.$isFoldWidgetVisible(n-b))return n-b;if(n+b<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+b))return n+b}return null},GutterKeyboardHandler.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var b=0;n-b>0||n+b=0&&this.$isAnnotationVisible(n-b))return n-b;if(n+b<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+b))return n+b}return null},GutterKeyboardHandler.prototype.$focusFoldWidget=function(n){if(null!=n){var b=this.$getFoldWidget(n);b.classList.add(this.editor.renderer.keyboardFocusClassName),b.focus()}},GutterKeyboardHandler.prototype.$focusAnnotation=function(n){if(null!=n){var b=this.$getAnnotation(n);b.classList.add(this.editor.renderer.keyboardFocusClassName),b.focus()}},GutterKeyboardHandler.prototype.$blurFoldWidget=function(n){var b=this.$getFoldWidget(n);b.classList.remove(this.editor.renderer.keyboardFocusClassName),b.blur()},GutterKeyboardHandler.prototype.$blurAnnotation=function(n){var b=this.$getAnnotation(n);b.classList.remove(this.editor.renderer.keyboardFocusClassName),b.blur()},GutterKeyboardHandler.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isFoldWidgetVisible(n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},GutterKeyboardHandler.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n0;)if(n--,this.$isAnnotationVisible(n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},GutterKeyboardHandler.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n=n.length&&(n=void 0),{value:n&&n[L++],done:!n}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},R=n("./lib/oop"),D=n("./lib/dom"),B=n("./lib/lang"),E=n("./lib/useragent"),X=n("./keyboard/textinput").TextInput,$=n("./mouse/mouse_handler").MouseHandler,V=n("./mouse/fold_handler").FoldHandler,K=n("./keyboard/keybinding").KeyBinding,Q=n("./edit_session").EditSession,tt=n("./search").Search,ot=n("./range").Range,nt=n("./lib/event_emitter").EventEmitter,it=n("./commands/command_manager").CommandManager,rt=n("./commands/default_commands").commands,st=n("./config"),pt=n("./token_iterator").TokenIterator,lt=n("./line_widgets").LineWidgets,ut=n("./keyboard/gutter_handler").GutterKeyboardHandler,bt=n("./config").nls,Mt=n("./clipboard"),zt=n("./lib/keys"),Ot=function(){function Editor(n,b,A){this.session,this.$toDestroy=[];var L=n.getContainerElement();this.container=L,this.renderer=n,this.id="editor"+ ++Editor.$uid,this.commands=new it(E.isMac?"mac":"win",rt),"object"==typeof document&&(this.textInput=new X(n.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new $(this),new V(this)),this.keyBinding=new K(this),this.$search=(new tt).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=B.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(n,b){b._$emitInputEvent.schedule(31)})),this.setSession(b||A&&A.session||new Q("")),st.resetOptions(this),A&&this.setOptions(A),st._signal("editor",this)}return Editor.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=B.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},Editor.prototype.startOperation=function(n){if(this.curOp){if(!n||this.curOp.command)return;this.prevOp=this.curOp}n||(this.previousCommand=null,n={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:n.command||{},args:n.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},Editor.prototype.endOperation=function(n){if(this.curOp&&this.session){if(n&&!1===n.returnValue||!this.session)return this.curOp=null;if(1==n&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var b=this.curOp.command,A=b&&b.scrollIntoView;if(A){switch(A){case"center-animate":A="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var L=this.selection.getRange(),R=this.renderer.layerConfig;(L.start.row>=R.lastRow||L.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==A&&this.renderer.animateScrolling(this.curOp.scrollTop)}var D=this.selection.toJSON();this.curOp.selectionAfter=D,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(D),this.prevOp=this.curOp,this.curOp=null}},Editor.prototype.$historyTracker=function(n){if(this.$mergeUndoDeltas){var b=this.prevOp,A=this.$mergeableCommands,L=b.command&&n.command.name==b.command.name;if("insertstring"==n.command.name){var R=n.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),L=L&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(b.args)),this.mergeNextCommand=!0}else L=L&&-1!==A.indexOf(n.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(L=!1),L?this.session.mergeUndoDeltas=!0:-1!==A.indexOf(n.command.name)&&(this.sequenceStartTime=Date.now())}},Editor.prototype.setKeyboardHandler=function(n,b){if(n&&"string"==typeof n&&"ace"!=n){this.$keybindingId=n;var A=this;st.loadModule(["keybinding",n],(function(L){A.$keybindingId==n&&A.keyBinding.setKeyboardHandler(L&&L.handler),b&&b()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(n),b&&b()},Editor.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},Editor.prototype.setSession=function(n){if(this.session!=n){this.curOp&&this.endOperation(),this.curOp={};var b=this.session;if(b){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var A=this.session.getSelection();A.off("changeCursor",this.$onCursorChange),A.off("changeSelection",this.$onSelectionChange)}this.session=n,n?(this.$onDocumentChange=this.onDocumentChange.bind(this),n.on("change",this.$onDocumentChange),this.renderer.setSession(n),this.$onChangeMode=this.onChangeMode.bind(this),n.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),n.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),n.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),n.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),n.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),n.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=n.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(n)),this._signal("changeSession",{session:n,oldSession:b}),this.curOp=null,b&&b._signal("changeEditor",{oldEditor:this}),n&&n._signal("changeEditor",{editor:this}),n&&!n.destroyed&&n.bgTokenizer.scheduleStart()}},Editor.prototype.getSession=function(){return this.session},Editor.prototype.setValue=function(n,b){return this.session.doc.setValue(n),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),n},Editor.prototype.getValue=function(){return this.session.getValue()},Editor.prototype.getSelection=function(){return this.selection},Editor.prototype.resize=function(n){this.renderer.onResize(n)},Editor.prototype.setTheme=function(n,b){this.renderer.setTheme(n,b)},Editor.prototype.getTheme=function(){return this.renderer.getTheme()},Editor.prototype.setStyle=function(n){this.renderer.setStyle(n)},Editor.prototype.unsetStyle=function(n){this.renderer.unsetStyle(n)},Editor.prototype.getFontSize=function(){return this.getOption("fontSize")||D.computedStyle(this.container).fontSize},Editor.prototype.setFontSize=function(n){this.setOption("fontSize",n)},Editor.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var n=this;this.$highlightPending=!0,setTimeout((function(){n.$highlightPending=!1;var b=n.session;if(b&&!b.destroyed){b.$bracketHighlight&&(b.$bracketHighlight.markerIds.forEach((function(n){b.removeMarker(n)})),b.$bracketHighlight=null);var A=n.getCursorPosition(),L=n.getKeyboardHandler(),R=L&&L.$getDirectionForHighlight&&L.$getDirectionForHighlight(n),D=b.getMatchingBracketRanges(A,R);if(!D){var B=new pt(b,A.row,A.column).getCurrentToken();if(B&&/\b(?:tag-open|tag-name)/.test(B.type)){var E=b.getMatchingTags(A);E&&(D=[E.openTagName.isEmpty()?E.openTag:E.openTagName,E.closeTagName.isEmpty()?E.closeTag:E.closeTagName])}}if(!D&&b.$mode.getMatching&&(D=b.$mode.getMatching(n.session)),D){var X="ace_bracket";Array.isArray(D)?1==D.length&&(X="ace_error_bracket"):D=[D],2==D.length&&(0==ot.comparePoints(D[0].end,D[1].start)?D=[ot.fromPoints(D[0].start,D[1].end)]:0==ot.comparePoints(D[0].start,D[1].end)&&(D=[ot.fromPoints(D[1].start,D[0].end)])),b.$bracketHighlight={ranges:D,markerIds:D.map((function(n){return b.addMarker(n,X,"text")}))},n.getHighlightIndentGuides()&&n.renderer.$textLayer.$highlightIndentGuide()}else n.getHighlightIndentGuides()&&n.renderer.$textLayer.$highlightIndentGuide()}}),50)}},Editor.prototype.focus=function(){this.textInput.focus()},Editor.prototype.isFocused=function(){return this.textInput.isFocused()},Editor.prototype.blur=function(){this.textInput.blur()},Editor.prototype.onFocus=function(n){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",n))},Editor.prototype.onBlur=function(n){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",n))},Editor.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},Editor.prototype.onDocumentChange=function(n){var b=this.session.$useWrapMode,A=n.start.row==n.end.row?n.end.row:1/0;this.renderer.updateLines(n.start.row,A,b),this._signal("change",n),this.$cursorChange()},Editor.prototype.onTokenizerUpdate=function(n){var b=n.data;this.renderer.updateLines(b.first,b.last)},Editor.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},Editor.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},Editor.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},Editor.prototype.$updateHighlightActiveLine=function(){var n,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(n=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(n=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(n=!1)),b.$highlightLineMarker&&!n)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&n){var A=new ot(n.row,n.column,n.row,1/0);A.id=b.addMarker(A,"ace_active-line","screenLine"),b.$highlightLineMarker=A}else n&&(b.$highlightLineMarker.start.row=n.row,b.$highlightLineMarker.end.row=n.row,b.$highlightLineMarker.start.column=n.column,b._signal("changeBackMarker"))},Editor.prototype.onSelectionChange=function(n){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var A=this.selection.getRange(),L=this.getSelectionStyle();b.$selectionMarker=b.addMarker(A,"ace_selection",L)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},Editor.prototype.$getSelectionHighLightRegexp=function(){var n=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var A=b.start.column,L=b.end.column,R=n.getLine(b.start.row),D=R.substring(A,L);if(!(D.length>5e3)&&/[\w\d]/.test(D)){var B=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),E=R.substring(A-1,L+1);if(B.test(E))return B}}},Editor.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},Editor.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},Editor.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},Editor.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},Editor.prototype.onChangeMode=function(n){this.renderer.updateText(),this._emit("changeMode",n)},Editor.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},Editor.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},Editor.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},Editor.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},Editor.prototype.getCopyText=function(){var n=this.getSelectedText(),b=this.session.doc.getNewLineCharacter(),A=!1;if(!n&&this.$copyWithEmptySelection){A=!0;for(var L=this.selection.getAllRanges(),R=0;RE.search(/\S|$/)){var X=E.substr(R.column).search(/\S|$/);A.doc.removeInLine(R.row,R.column,R.column+X)}}this.clearSelection();var $=R.column,V=A.getState(R.row),K=(E=A.getLine(R.row),L.checkOutdent(V,E,n));if(A.insert(R,n),D&&D.selection&&(2==D.selection.length?this.selection.setSelectionRange(new ot(R.row,$+D.selection[0],R.row,$+D.selection[1])):this.selection.setSelectionRange(new ot(R.row+D.selection[0],D.selection[1],R.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(A.getDocument().isNewLine(n)){var Q=L.getNextLineIndent(V,E.slice(0,R.column),A.getTabString());A.insert({row:R.row+1,column:0},Q)}K&&L.autoOutdent(V,A,R.row)}},Editor.prototype.autoIndent=function(){for(var n=this.session,b=n.getMode(),A=this.selection.isEmpty()?[new ot(0,0,n.doc.getLength()-1,0)]:this.selection.getAllRanges(),L="",R="",D="",B=n.getTabString(),E=0;E0&&(L=n.getState(V-1),R=n.getLine(V-1),D=b.getNextLineIndent(L,R,B));var K=n.getLine(V),Q=b.$getIndent(K);if(D!==Q){if(Q.length>0){var tt=new ot(V,0,V,Q.length);n.remove(tt)}D.length>0&&n.insert({row:V,column:0},D)}b.autoOutdent(L,n,V)}},Editor.prototype.onTextInput=function(n,b){if(!b)return this.keyBinding.onTextInput(n);this.startOperation({command:{name:"insertstring"}});var A=this.applyComposition.bind(this,n,b);this.selection.rangeCount?this.forEachSelection(A):A(),this.endOperation()},Editor.prototype.applyComposition=function(n,b){var A;(b.extendLeft||b.extendRight)&&((A=this.selection.getRange()).start.column-=b.extendLeft,A.end.column+=b.extendRight,A.start.column<0&&(A.start.row--,A.start.column+=this.session.getLine(A.start.row).length+1),this.selection.setRange(A),n||A.isEmpty()||this.remove());(!n&&this.selection.isEmpty()||this.insert(n,!0),b.restoreStart||b.restoreEnd)&&((A=this.selection.getRange()).start.column-=b.restoreStart,A.end.column-=b.restoreEnd,this.selection.setRange(A))},Editor.prototype.onCommandKey=function(n,b,A){return this.keyBinding.onCommandKey(n,b,A)},Editor.prototype.setOverwrite=function(n){this.session.setOverwrite(n)},Editor.prototype.getOverwrite=function(){return this.session.getOverwrite()},Editor.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},Editor.prototype.setScrollSpeed=function(n){this.setOption("scrollSpeed",n)},Editor.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},Editor.prototype.setDragDelay=function(n){this.setOption("dragDelay",n)},Editor.prototype.getDragDelay=function(){return this.getOption("dragDelay")},Editor.prototype.setSelectionStyle=function(n){this.setOption("selectionStyle",n)},Editor.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},Editor.prototype.setHighlightActiveLine=function(n){this.setOption("highlightActiveLine",n)},Editor.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},Editor.prototype.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)},Editor.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},Editor.prototype.setHighlightSelectedWord=function(n){this.setOption("highlightSelectedWord",n)},Editor.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},Editor.prototype.setAnimatedScroll=function(n){this.renderer.setAnimatedScroll(n)},Editor.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},Editor.prototype.setShowInvisibles=function(n){this.renderer.setShowInvisibles(n)},Editor.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},Editor.prototype.setDisplayIndentGuides=function(n){this.renderer.setDisplayIndentGuides(n)},Editor.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},Editor.prototype.setHighlightIndentGuides=function(n){this.renderer.setHighlightIndentGuides(n)},Editor.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},Editor.prototype.setShowPrintMargin=function(n){this.renderer.setShowPrintMargin(n)},Editor.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},Editor.prototype.setPrintMarginColumn=function(n){this.renderer.setPrintMarginColumn(n)},Editor.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},Editor.prototype.setReadOnly=function(n){this.setOption("readOnly",n)},Editor.prototype.getReadOnly=function(){return this.getOption("readOnly")},Editor.prototype.setBehavioursEnabled=function(n){this.setOption("behavioursEnabled",n)},Editor.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},Editor.prototype.setWrapBehavioursEnabled=function(n){this.setOption("wrapBehavioursEnabled",n)},Editor.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},Editor.prototype.setShowFoldWidgets=function(n){this.setOption("showFoldWidgets",n)},Editor.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},Editor.prototype.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)},Editor.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},Editor.prototype.remove=function(n){this.selection.isEmpty()&&("left"==n?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var A=this.session,L=A.getState(b.start.row),R=A.getMode().transformAction(L,"deletion",this,A,b);if(0===b.end.column){var D=A.getTextRange(b);if("\n"==D[D.length-1]){var B=A.getLine(b.end.row);/^\s+$/.test(B)&&(b.end.column=B.length)}}R&&(b=R)}this.session.remove(b),this.clearSelection()},Editor.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},Editor.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var n=this.getSelectionRange();n.start.column==n.end.column&&n.start.row==n.end.row&&(n.end.column=0,n.end.row++),this.session.remove(n),this.clearSelection()},Editor.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var n=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(n)},Editor.prototype.setGhostText=function(n,b){this.session.widgetManager||(this.session.widgetManager=new lt(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(n,b)},Editor.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},Editor.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var n=this.getCursorPosition(),b=n.column;if(0!==b){var A,L,R=this.session.getLine(n.row);bb.toLowerCase()?1:0}));var R=new ot(0,0,0,0);for(L=n.first;L<=n.last;L++){var D=b.getLine(L);R.start.row=L,R.end.row=L,R.end.column=D.length,b.replace(R,A[L-n.first])}},Editor.prototype.toggleCommentLines=function(){var n=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(n,this.session,b.first,b.last)},Editor.prototype.toggleBlockComment=function(){var n=this.getCursorPosition(),b=this.session.getState(n.row),A=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,A,n)},Editor.prototype.getNumberAt=function(n,b){var A=/[\-]?[0-9]+(?:\.[0-9]+)?/g;A.lastIndex=0;for(var L=this.session.getLine(n);A.lastIndex=b)return{value:R[0],start:R.index,end:R.index+R[0].length}}return null},Editor.prototype.modifyNumber=function(n){var b=this.selection.getCursor().row,A=this.selection.getCursor().column,L=new ot(b,A-1,b,A),R=this.session.getTextRange(L);if(!isNaN(parseFloat(R))&&isFinite(R)){var D=this.getNumberAt(b,A);if(D){var B=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,E=D.start+D.value.length-B,X=parseFloat(D.value);X*=Math.pow(10,E),B!==D.end&&A=E&&D<=X&&(A=b,$.selection.clearSelection(),$.moveCursorTo(n,E+L),$.selection.selectTo(n,X+L)),E=X}));for(var V,K=this.$toggleWordPairs,Q=0;Q=X&&B<=$&&Q.match(/((?:https?|ftp):\/\/[\S]+)/)){E=Q.replace(/[\s:.,'";}\]]+$/,"");break}X=$}}catch(n){A={error:n}}finally{try{K&&!K.done&&(R=V.return)&&R.call(V)}finally{if(A)throw A.error}}return E},Editor.prototype.openLink=function(){var n=this.selection.getCursor(),b=this.findLinkAt(n.row,n.column);return b&&window.open(b,"_blank"),null!=b},Editor.prototype.removeLines=function(){var n=this.$getSelectedRows();this.session.removeFullLines(n.first,n.last),this.clearSelection()},Editor.prototype.duplicateSelection=function(){var n=this.selection,b=this.session,A=n.getRange(),L=n.isBackwards();if(A.isEmpty()){var R=A.start.row;b.duplicateLines(R,R)}else{var D=L?A.start:A.end,B=b.insert(D,b.getTextRange(A));A.start=D,A.end=B,n.setSelectionRange(A,L)}},Editor.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},Editor.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},Editor.prototype.moveText=function(n,b,A){return this.session.moveText(n,b,A)},Editor.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},Editor.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},Editor.prototype.$moveLines=function(n,b){var A,L,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var D=R.toOrientedRange();A=this.$getSelectedRows(D),L=this.session.$moveLines(A.first,A.last,b?0:n),b&&-1==n&&(L=0),D.moveBy(L,0),R.fromOrientedRange(D)}else{var B=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var E=0,X=0,$=B.length,V=0;V<$;V++){var K=V;B[V].moveBy(E,0);for(var Q=(A=this.$getSelectedRows(B[V])).first,tt=A.last;++V<$;){X&&B[V].moveBy(X,0);var ot=this.$getSelectedRows(B[V]);if(b&&ot.first!=tt)break;if(!b&&ot.first>tt+1)break;tt=ot.last}for(V--,E=this.session.$moveLines(Q,tt,b?0:n),b&&-1==n&&(K=V+1);K<=V;)B[K].moveBy(E,0),K++;b||(E=0),X+=E}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},Editor.prototype.$getSelectedRows=function(n){return n=(n||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(n.start.row),last:this.session.getRowFoldEnd(n.end.row)}},Editor.prototype.onCompositionStart=function(n){this.renderer.showComposition(n)},Editor.prototype.onCompositionUpdate=function(n){this.renderer.setCompositionText(n)},Editor.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},Editor.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},Editor.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},Editor.prototype.isRowVisible=function(n){return n>=this.getFirstVisibleRow()&&n<=this.getLastVisibleRow()},Editor.prototype.isRowFullyVisible=function(n){return n>=this.renderer.getFirstFullyVisibleRow()&&n<=this.renderer.getLastFullyVisibleRow()},Editor.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},Editor.prototype.$moveByPage=function(n,b){var A=this.renderer,L=this.renderer.layerConfig,R=n*Math.floor(L.height/L.lineHeight);!0===b?this.selection.$moveSelection((function(){this.moveCursorBy(R,0)})):!1===b&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var D=A.scrollTop;A.scrollBy(0,R*L.lineHeight),null!=b&&A.scrollCursorIntoView(null,.5),A.animateScrolling(D)},Editor.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},Editor.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},Editor.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},Editor.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},Editor.prototype.scrollPageDown=function(){this.$moveByPage(1)},Editor.prototype.scrollPageUp=function(){this.$moveByPage(-1)},Editor.prototype.scrollToRow=function(n){this.renderer.scrollToRow(n)},Editor.prototype.scrollToLine=function(n,b,A,L){this.renderer.scrollToLine(n,b,A,L)},Editor.prototype.centerSelection=function(){var n=this.getSelectionRange(),b={row:Math.floor(n.start.row+(n.end.row-n.start.row)/2),column:Math.floor(n.start.column+(n.end.column-n.start.column)/2)};this.renderer.alignCursor(b,.5)},Editor.prototype.getCursorPosition=function(){return this.selection.getCursor()},Editor.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},Editor.prototype.getSelectionRange=function(){return this.selection.getRange()},Editor.prototype.selectAll=function(){this.selection.selectAll()},Editor.prototype.clearSelection=function(){this.selection.clearSelection()},Editor.prototype.moveCursorTo=function(n,b){this.selection.moveCursorTo(n,b)},Editor.prototype.moveCursorToPosition=function(n){this.selection.moveCursorToPosition(n)},Editor.prototype.jumpToMatching=function(n,b){var A=this.getCursorPosition(),L=new pt(this.session,A.row,A.column),R=L.getCurrentToken(),D=0;R&&-1!==R.type.indexOf("tag-name")&&(R=L.stepBackward());var B=R||L.stepForward();if(B){var E,X,$=!1,V={},K=A.column-B.start,Q={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(B.value.match(/[{}()\[\]]/g)){for(;K1?V[B.value]++:"=0;--D)this.$tryReplace(A[D],n)&&L++;return this.selection.setSelectionRange(R),L},Editor.prototype.$tryReplace=function(n,b){var A=this.session.getTextRange(n);return null!==(b=this.$search.replace(A,b))?(n.end=this.session.replace(n,b),n):null},Editor.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},Editor.prototype.find=function(n,b,A){b||(b={}),"string"==typeof n||n instanceof RegExp?b.needle=n:"object"==typeof n&&R.mixin(b,n);var L=this.selection.getRange();null==b.needle&&((n=this.session.getTextRange(L)||this.$search.$options.needle)||(L=this.session.getWordRange(L.start.row,L.start.column),n=this.session.getTextRange(L)),this.$search.set({needle:n})),this.$search.set(b),b.start||this.$search.set({start:L});var D=this.$search.find(this.session);return b.preventScroll?D:D?(this.revealRange(D,A),D):(b.backwards?L.start=L.end:L.end=L.start,void this.selection.setRange(L))},Editor.prototype.findNext=function(n,b){this.find({skipCurrent:!0,backwards:!1},n,b)},Editor.prototype.findPrevious=function(n,b){this.find(n,{skipCurrent:!0,backwards:!0},b)},Editor.prototype.revealRange=function(n,b){this.session.unfold(n),this.selection.setSelectionRange(n);var A=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(n.start,n.end,.5),!1!==b&&this.renderer.animateScrolling(A)},Editor.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},Editor.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},Editor.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(n){n.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},Editor.prototype.setAutoScrollEditorIntoView=function(n){if(n){var b,A=this,L=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var D=this.on("changeSelection",(function(){L=!0})),B=this.renderer.on("beforeRender",(function(){L&&(b=A.renderer.container.getBoundingClientRect())})),E=this.renderer.on("afterRender",(function(){if(L&&b&&(A.isFocused()||A.searchBox&&A.searchBox.isFocused())){var n=A.renderer,D=n.$cursorLayer.$pixelPos,B=n.layerConfig,E=D.top-B.offset;null!=(L=D.top>=0&&E+b.top<0||!(D.topwindow.innerHeight)&&null)&&(R.style.top=E+"px",R.style.left=D.left+"px",R.style.height=B.lineHeight+"px",R.scrollIntoView(L)),L=b=null}}));this.setAutoScrollEditorIntoView=function(n){n||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",E),this.renderer.off("beforeRender",B))}}},Editor.prototype.$resetCursorStyle=function(){var n=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(n)),b.isBlinking=!this.$readOnly&&"wide"!=n,D.setCssClass(b.element,"ace_slim-cursors",/slim/.test(n)))},Editor.prototype.prompt=function(n,b,A){var L=this;st.loadModule("ace/ext/prompt",(function(R){R.prompt(L,n,b,A)}))},Editor}();Ot.$uid=0,Ot.prototype.curOp=null,Ot.prototype.prevOp={},Ot.prototype.$mergeableCommands=["backspace","del","insertstring"],Ot.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],R.implement(Ot.prototype,nt),st.defineOptions(Ot.prototype,"editor",{selectionStyle:{set:function(n){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:n})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(n){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(n){this.textInput.setReadOnly(n),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(n){this.textInput.setCopyWithEmptySelection(n)},initialValue:!1},cursorStyle:{set:function(n){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(n){this.setAutoScrollEditorIntoView(n)}},keyboardHandler:{set:function(n){this.setKeyboardHandler(n)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(n){this.session.setValue(n)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(n){this.setSession(n)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(n){this.renderer.$gutterLayer.setShowLineNumbers(n),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),n&&this.$relativeLineNumbers?ft.attach(this):ft.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(n){this.$showLineNumbers&&n?ft.attach(this):ft.detach(this)}},placeholder:{set:function(n){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var n=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(n&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),D.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(n||this.renderer.placeholderNode)!n&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),D.addCssClass(this.container,"ace_hasPlaceholder");var b=D.createElement("div");b.className="ace_placeholder",b.textContent=this.$placeholder||"",this.renderer.placeholderNode=b,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(n){var b,A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(n){n.blur(),n.renderer.scroller.focus()},readOnly:!0},focusOnEnterKeyup=function(n){if(n.target==this.renderer.scroller&&n.keyCode===zt.enter){n.preventDefault();var b=this.getCursorPosition().row;this.isRowVisible(b)||this.scrollToLine(b,!0,!0),this.focus()}};n?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(E.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",bt("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",bt("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",focusOnEnterKeyup.bind(this)),this.commands.addCommand(A),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",bt("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",bt("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),b||(b=new ut(this)),b.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",focusOnEnterKeyup.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),b&&b.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(n){this.$textInputAriaLabel=n},initialValue:""},enableMobileMenu:{set:function(n){this.$enableMobileMenu=n},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var ft={getText:function(n,b){return(Math.abs(n.selection.lead.row-b)||b+1+(b<9?"·":""))+""},getWidth:function(n,b,A){return Math.max(b.toString().length,(A.lastRow+1).toString().length,2)*A.characterWidth},update:function(n,b){b.renderer.$loop.schedule(b.renderer.CHANGE_GUTTER)},attach:function(n){n.renderer.$gutterLayer.$renderer=this,n.on("changeSelection",this.update),this.update(null,n)},detach:function(n){n.renderer.$gutterLayer.$renderer==this&&(n.renderer.$gutterLayer.$renderer=null),n.off("changeSelection",this.update),this.update(null,n)}};b.Editor=Ot})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=function(){function Lines(n,b){this.element=n,this.canvasHeight=b||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return Lines.prototype.moveContainer=function(n){L.translate(this.element,0,-n.firstRowScreen*n.lineHeight%this.canvasHeight-n.offset*this.$offsetCoefficient)},Lines.prototype.pageChanged=function(n,b){return Math.floor(n.firstRowScreen*n.lineHeight/this.canvasHeight)!==Math.floor(b.firstRowScreen*b.lineHeight/this.canvasHeight)},Lines.prototype.computeLineTop=function(n,b,A){var L=b.firstRowScreen*b.lineHeight,R=Math.floor(L/this.canvasHeight);return A.documentToScreenRow(n,0)*b.lineHeight-R*this.canvasHeight},Lines.prototype.computeLineHeight=function(n,b,A){return b.lineHeight*A.getRowLineCount(n)},Lines.prototype.getLength=function(){return this.cells.length},Lines.prototype.get=function(n){return this.cells[n]},Lines.prototype.shift=function(){this.$cacheCell(this.cells.shift())},Lines.prototype.pop=function(){this.$cacheCell(this.cells.pop())},Lines.prototype.push=function(n){if(Array.isArray(n)){this.cells.push.apply(this.cells,n);for(var b=L.createFragment(this.element),A=0;AD&&(X=R.end.row+1,D=(R=b.getNextFoldLine(X,R))?R.start.row:1/0),X>L){for(;this.$lines.getLength()>E+1;)this.$lines.pop();break}(B=this.$lines.get(++E))?B.row=X:(B=this.$lines.createCell(X,n,this.session,onCreateCell),this.$lines.push(B)),this.$renderCell(B,n,R,X),X++}this._signal("afterRender"),this.$updateGutterWidth(n)},Gutter.prototype.$updateGutterWidth=function(n){var b=this.session,A=b.gutterRenderer||this.$renderer,L=b.$firstLineNumber,R=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||b.$useWrapMode)&&(R=b.getLength()+L-1);var D=A?A.getWidth(b,R,n):R.toString().length*n.characterWidth,B=this.$padding||this.$computePadding();(D+=B.left+B.right)===this.gutterWidth||isNaN(D)||(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},Gutter.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},Gutter.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!this.$cursorCell||this.$cursorCell.row!=n){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var b=this.$lines.cells;this.$cursorCell=null;for(var A=0;A=this.$cursorRow){if(L.row>this.$cursorRow){var R=this.session.getFoldLine(this.$cursorRow);if(!(A>0&&R&&R.start.row==b[A-1].row))break;L=b[A-1]}L.element.className="ace_gutter-active-line "+L.element.className,this.$cursorCell=L;break}}}}},Gutter.prototype.scrollLines=function(n){var b=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(b,n))return this.update(n);this.$lines.moveContainer(n);var A=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),L=this.oldLastRow;if(this.oldLastRow=A,!b||L0;R--)this.$lines.shift();if(L>A)for(R=this.session.getFoldedRowCount(A+1,L);R>0;R--)this.$lines.pop();n.firstRowL&&this.$lines.push(this.$renderLines(n,L+1,A)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},Gutter.prototype.$renderLines=function(n,b,A){for(var L=[],R=b,D=this.session.getNextFoldLine(R),B=D?D.start.row:1/0;R>B&&(R=D.end.row+1,B=(D=this.session.getNextFoldLine(R,D))?D.start.row:1/0),!(R>A);){var E=this.$lines.createCell(R,n,this.session,onCreateCell);this.$renderCell(E,n,D,R),L.push(E),R++}return L},Gutter.prototype.$renderCell=function(n,b,A,R){var D=n.element,B=this.session,E=D.childNodes[0],$=D.childNodes[1],V=D.childNodes[2],K=V.firstChild,Q=B.$firstLineNumber,tt=B.$breakpoints,ot=B.$decorations,nt=B.gutterRenderer||this.$renderer,it=this.$showFoldWidgets&&B.foldWidgets,rt=A?A.start.row:Number.MAX_VALUE,st=b.lineHeight+"px",pt=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",lt=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",ut=(nt?nt.getText(B,R):R+Q).toString();if(this.$highlightGutterLine&&(R==this.$cursorRow||A&&R=rt&&this.$cursorRow<=A.end.row)&&(pt+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),tt[R]&&(pt+=tt[R]),ot[R]&&(pt+=ot[R]),this.$annotations[R]&&R!==rt&&(pt+=this.$annotations[R].className),it){var bt=it[R];null==bt&&(bt=it[R]=B.getFoldWidget(R))}if(bt){var Mt="ace_fold-widget ace_"+bt,zt="start"==bt&&R==rt&&RA.right-b.right?"foldWidgets":void 0},Gutter}();function onCreateCell(n){var b=document.createTextNode("");n.appendChild(b);var A=L.createElement("span");n.appendChild(A);var R=L.createElement("span");n.appendChild(R);var D=L.createElement("span");return R.appendChild(D),n}$.prototype.$fixedWidth=!1,$.prototype.$highlightGutterLine=!0,$.prototype.$renderer="",$.prototype.$showLineNumbers=!0,$.prototype.$showFoldWidgets=!0,R.implement($.prototype,B),b.Gutter=$})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../range").Range,R=n("../lib/dom"),D=function(){function Marker(n){this.element=R.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return Marker.prototype.setPadding=function(n){this.$padding=n},Marker.prototype.setSession=function(n){this.session=n},Marker.prototype.setMarkers=function(n){this.markers=n},Marker.prototype.elt=function(n,b){var A=-1!=this.i&&this.element.childNodes[this.i];A?this.i++:(A=document.createElement("div"),this.element.appendChild(A),this.i=-1),A.style.cssText=b,A.className=n},Marker.prototype.update=function(n){if(n){var b;for(var A in this.config=n,this.i=0,this.markers){var L=this.markers[A];if(L.range){var R=L.range.clipRows(n.firstRow,n.lastRow);if(!R.isEmpty())if(R=R.toScreenRange(this.session),L.renderer){var D=this.$getTop(R.start.row,n),B=this.$padding+R.start.column*n.characterWidth;L.renderer(b,R,B,D,n)}else"fullLine"==L.type?this.drawFullLineMarker(b,R,L.clazz,n):"screenLine"==L.type?this.drawScreenLineMarker(b,R,L.clazz,n):R.isMultiLine()?"text"==L.type?this.drawTextMarker(b,R,L.clazz,n):this.drawMultiLineMarker(b,R,L.clazz,n):this.drawSingleLineMarker(b,R,L.clazz+" ace_start ace_br15",n)}else L.update(b,this,this.session,n)}if(-1!=this.i)for(;this.iQ?4:0)|($==X?8:0)),R,$==X?0:1,D)},Marker.prototype.drawMultiLineMarker=function(n,b,A,L,R){var D=this.$padding,B=L.lineHeight,E=this.$getTop(b.start.row,L),X=D+b.start.column*L.characterWidth;(R=R||"",this.session.$bidiHandler.isBidiRow(b.start.row))?(($=b.clone()).end.row=$.start.row,$.end.column=this.session.getLine($.start.row).length,this.drawBidiSingleLineMarker(n,$,A+" ace_br1 ace_start",L,null,R)):this.elt(A+" ace_br1 ace_start","height:"+B+"px;right:"+D+"px;top:"+E+"px;left:"+X+"px;"+(R||""));if(this.session.$bidiHandler.isBidiRow(b.end.row)){var $;($=b.clone()).start.row=$.end.row,$.start.column=0,this.drawBidiSingleLineMarker(n,$,A+" ace_br12",L,null,R)}else{E=this.$getTop(b.end.row,L);var V=b.end.column*L.characterWidth;this.elt(A+" ace_br12","height:"+B+"px;width:"+V+"px;top:"+E+"px;left:"+D+"px;"+(R||""))}if(!((B=(b.end.row-b.start.row-1)*L.lineHeight)<=0)){E=this.$getTop(b.start.row+1,L);var K=(b.start.column?1:0)|(b.end.column?0:8);this.elt(A+(K?" ace_br"+K:""),"height:"+B+"px;right:"+D+"px;top:"+E+"px;left:"+D+"px;"+(R||""))}},Marker.prototype.drawSingleLineMarker=function(n,b,A,L,R,D){if(this.session.$bidiHandler.isBidiRow(b.start.row))return this.drawBidiSingleLineMarker(n,b,A,L,R,D);var B=L.lineHeight,E=(b.end.column+(R||0)-b.start.column)*L.characterWidth,X=this.$getTop(b.start.row,L),$=this.$padding+b.start.column*L.characterWidth;this.elt(A,"height:"+B+"px;width:"+E+"px;top:"+X+"px;left:"+$+"px;"+(D||""))},Marker.prototype.drawBidiSingleLineMarker=function(n,b,A,L,R,D){var B=L.lineHeight,E=this.$getTop(b.start.row,L),X=this.$padding;this.session.$bidiHandler.getSelections(b.start.column,b.end.column).forEach((function(n){this.elt(A,"height:"+B+"px;width:"+(n.width+(R||0))+"px;top:"+E+"px;left:"+(X+n.left)+"px;"+(D||""))}),this)},Marker.prototype.drawFullLineMarker=function(n,b,A,L,R){var D=this.$getTop(b.start.row,L),B=L.lineHeight;b.start.row!=b.end.row&&(B+=this.$getTop(b.end.row,L)-D),this.elt(A,"height:"+B+"px;top:"+D+"px;left:0;right:0;"+(R||""))},Marker.prototype.drawScreenLineMarker=function(n,b,A,L,R){var D=this.$getTop(b.start.row,L),B=L.lineHeight;this.elt(A,"height:"+B+"px;top:"+D+"px;left:0;right:0;"+(R||""))},Marker}();D.prototype.$padding=0,b.Marker=D})),ace.define("ace/layer/text_util",["require","exports","module"],(function(n,b,A){var L=new Set(["text","rparen","lparen"]);b.isTextToken=function(n){return L.has(n)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(n,b,A){"use strict";var L=n("../lib/oop"),R=n("../lib/dom"),D=n("../lib/lang"),B=n("./lines").Lines,E=n("../lib/event_emitter").EventEmitter,X=n("../config").nls,$=n("./text_util").isTextToken,V=function(){function Text(n){this.dom=R,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new B(this.element)}return Text.prototype.$updateEolChar=function(){var n=this.session.doc,b="\n"==n.getNewLineCharacter()&&"windows"!=n.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=b)return this.EOL_CHAR=b,!0},Text.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},Text.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},Text.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},Text.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",function(n){this._signal("changeCharacterSize",n)}.bind(this)),this.$pollSizeChanges()},Text.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},Text.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},Text.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},Text.prototype.setShowInvisibles=function(n){return this.showInvisibles!=n&&(this.showInvisibles=n,"string"==typeof n?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},Text.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides!=n&&(this.displayIndentGuides=n,this.$computeTabString(),!0)},Text.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides!==n&&(this.$highlightIndentGuides=n,n)},Text.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var b=this.$tabStrings=[0],A=1;AV&&(E=X.end.row+1,V=(X=this.session.getNextFoldLine(E,X))?X.start.row:1/0),!(E>R);){var K=D[B++];if(K){this.dom.removeChildren(K),this.$renderLine(K,E,E==V&&X),$&&(K.style.top=this.$lines.computeLineTop(E,n,this.session)+"px");var Q=n.lineHeight*this.session.getRowLength(E)+"px";K.style.height!=Q&&($=!0,K.style.height=Q)}E++}if($)for(;B0;R--)this.$lines.shift();if(b.lastRow>n.lastRow)for(R=this.session.getFoldedRowCount(n.lastRow+1,b.lastRow);R>0;R--)this.$lines.pop();n.firstRowb.lastRow&&this.$lines.push(this.$renderLinesFragment(n,b.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},Text.prototype.$renderLinesFragment=function(n,b,A){for(var L=[],D=b,B=this.session.getNextFoldLine(D),E=B?B.start.row:1/0;D>E&&(D=B.end.row+1,E=(B=this.session.getNextFoldLine(D,B))?B.start.row:1/0),!(D>A);){var X=this.$lines.createCell(D,n,this.session),$=X.element;this.dom.removeChildren($),R.setStyle($.style,"height",this.$lines.computeLineHeight(D,n,this.session)+"px"),R.setStyle($.style,"top",this.$lines.computeLineTop(D,n,this.session)+"px"),this.$renderLine($,D,D==E&&B),this.$useLineGroups()?$.className="ace_line_group":$.className="ace_line",L.push(X),D++}return L},Text.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var b=n.firstRow,A=n.lastRow,L=this.$lines;L.getLength();)L.pop();L.push(this.$renderLinesFragment(n,b,A))},Text.prototype.$renderToken=function(n,b,A,L){for(var R,B=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,V=this.dom.createFragment(this.element),K=0;R=E.exec(L);){var Q=R[1],tt=R[2],ot=R[3],nt=R[4],it=R[5];if(B.showSpaces||!tt){var rt=K!=R.index?L.slice(K,R.index):"";if(K=R.index+R[0].length,rt&&V.appendChild(this.dom.createTextNode(rt,this.element)),Q){var st=B.session.getScreenTabSize(b+R.index);V.appendChild(B.$tabStrings[st].cloneNode(!0)),b+=st-1}else if(tt){if(B.showSpaces)(lt=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",lt.textContent=D.stringRepeat(B.SPACE_CHAR,tt.length),V.appendChild(lt);else V.appendChild(this.dom.createTextNode(tt,this.element))}else if(ot){(lt=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",lt.textContent=D.stringRepeat(B.SPACE_CHAR,ot.length),V.appendChild(lt)}else if(nt){b+=1,(lt=this.dom.createElement("span")).style.width=2*B.config.characterWidth+"px",lt.className=B.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",lt.textContent=B.showSpaces?B.SPACE_CHAR:nt,V.appendChild(lt)}else if(it){b+=1,(lt=this.dom.createElement("span")).style.width=2*B.config.characterWidth+"px",lt.className="ace_cjk",lt.textContent=it,V.appendChild(lt)}}}if(V.appendChild(this.dom.createTextNode(K?L.slice(K):L,this.element)),$(A.type))n.appendChild(V);else{var pt="ace_"+A.type.replace(/\./g," ace_"),lt=this.dom.createElement("span");"fold"==A.type&&(lt.style.width=A.value.length*this.config.characterWidth+"px",lt.setAttribute("title",X("inline-fold.closed.title","Unfold code"))),lt.className=pt,lt.appendChild(V),n.appendChild(lt)}return b+L.length},Text.prototype.renderIndentGuide=function(n,b,A){var L=b.search(this.$indentGuideRe);if(L<=0||L>=A)return b;if(" "==b[0]){for(var R=(L-=L%this.tabSize)/this.tabSize,D=0;DR[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==n[b.row]&&b.column===n[b.row].length){this.$highlightIndentGuideMarker.dir=1;for(D=b.row+1;D0)for(var L=0;L=this.$highlightIndentGuideMarker.start+1){if(L.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(L,b)}}else for(A=n.length-1;A>=0;A--){L=n[A];if(this.$highlightIndentGuideMarker.end&&L.row=B;)E=this.$renderToken(X,E,V,K.substring(0,B-L)),K=K.substring(B-L),L=B,X=this.$createLineElement(),n.appendChild(X),X.appendChild(this.dom.createTextNode(D.stringRepeat(" ",A.indent),this.element)),E=0,B=A[++R]||Number.MAX_VALUE;0!=K.length&&(L+=K.length,E=this.$renderToken(X,E,V,K))}}A[A.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(X,E,null,"",!0)},Text.prototype.$renderSimpleLine=function(n,b){for(var A=0,L=0;Lthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,A,R,D);A=this.$renderToken(n,A,R,D)}}},Text.prototype.$renderOverflowMessage=function(n,b,A,L,R){A&&this.$renderToken(n,b,A,L.slice(0,this.MAX_LINE_LENGTH-b));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=R?"":"",n.appendChild(D)},Text.prototype.$renderLine=function(n,b,A){if(A||0==A||(A=this.session.getFoldLine(b)),A)var L=this.$getFoldLineTokens(b,A);else L=this.session.getTokens(b);var R=n;if(L.length){var D=this.session.getRowSplitData(b);if(D&&D.length){this.$renderWrappedLine(n,L,D);R=n.lastChild}else{R=n;this.$useLineGroups()&&(R=this.$createLineElement(),n.appendChild(R)),this.$renderSimpleLine(R,L)}}else this.$useLineGroups()&&(R=this.$createLineElement(),n.appendChild(R));if(this.showEOL&&R){A&&(b=A.end.row);var B=this.dom.createElement("span");B.className="ace_invisible ace_invisible_eol",B.textContent=b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,R.appendChild(B)}},Text.prototype.$getFoldLineTokens=function(n,b){var A=this.session,L=[];var R=A.getTokens(n);return b.walk((function(n,b,D,B,E){null!=n?L.push({type:"fold",value:n}):(E&&(R=A.getTokens(b)),R.length&&function addTokens(n,b,A){for(var R=0,D=0;D+n[R].value.lengthA-b&&(B=B.substring(0,A-b)),L.push({type:n[R].type,value:B}),D=b+B.length,R+=1);DA?L.push({type:n[R].type,value:B.substring(0,A-D)}):L.push(n[R]),D+=B.length,R+=1}}(R,B,D))}),b.end.row,this.session.getLine(b.end.row).length),L},Text.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},Text}();V.prototype.EOF_CHAR="¶",V.prototype.EOL_CHAR_LF="¬",V.prototype.EOL_CHAR_CRLF="¤",V.prototype.EOL_CHAR=V.prototype.EOL_CHAR_LF,V.prototype.TAB_CHAR="—",V.prototype.SPACE_CHAR="·",V.prototype.$padding=0,V.prototype.MAX_LINE_LENGTH=1e4,V.prototype.showInvisibles=!1,V.prototype.showSpaces=!1,V.prototype.showTabs=!1,V.prototype.showEOL=!1,V.prototype.displayIndentGuides=!0,V.prototype.$highlightIndentGuides=!0,V.prototype.$tabStrings=[],V.prototype.destroy={},V.prototype.onChangeTabSize=V.prototype.$computeTabString,L.implement(V.prototype,E),b.Text=V})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=function(){function Cursor(n){this.element=L.createElement("div"),this.element.className="ace_layer ace_cursor-layer",n.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),L.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return Cursor.prototype.$updateOpacity=function(n){for(var b=this.cursors,A=b.length;A--;)L.setStyle(b[A].style,"opacity",n?"":"0")},Cursor.prototype.$startCssAnimation=function(){for(var n=this.cursors,b=n.length;b--;)n[b].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&L.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},Cursor.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,L.removeCssClass(this.element,"ace_animate-blinking")},Cursor.prototype.setPadding=function(n){this.$padding=n},Cursor.prototype.setSession=function(n){this.session=n},Cursor.prototype.setBlinking=function(n){n!=this.isBlinking&&(this.isBlinking=n,this.restartTimer())},Cursor.prototype.setBlinkInterval=function(n){n!=this.blinkInterval&&(this.blinkInterval=n,this.restartTimer())},Cursor.prototype.setSmoothBlinking=function(n){n!=this.smoothBlinking&&(this.smoothBlinking=n,L.setCssClass(this.element,"ace_smooth-blinking",n),this.$updateCursors(!0),this.restartTimer())},Cursor.prototype.addCursor=function(){var n=L.createElement("div");return n.className="ace_cursor",this.element.appendChild(n),this.cursors.push(n),n},Cursor.prototype.removeCursor=function(){if(this.cursors.length>1){var n=this.cursors.pop();return n.parentNode.removeChild(n),n}},Cursor.prototype.hideCursor=function(){this.isVisible=!1,L.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},Cursor.prototype.showCursor=function(){this.isVisible=!0,L.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},Cursor.prototype.restartTimer=function(){var n=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,L.removeCssClass(this.element,"ace_smooth-blinking")),n(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&L.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),L.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var b=function(){this.timeoutId=setTimeout((function(){n(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){n(!0),b()}),this.blinkInterval),b()}else this.$stopCssAnimation()},Cursor.prototype.getPixelPosition=function(n,b){if(!this.config||!this.session)return{left:0,top:0};n||(n=this.session.selection.getCursor());var A=this.session.documentToScreenPosition(n);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,n.row)?this.session.$bidiHandler.getPosLeft(A.column):A.column*this.config.characterWidth),top:(A.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight}},Cursor.prototype.isCursorInView=function(n,b){return n.top>=0&&n.topn.height+n.offset||B.top<0)&&A>1)){var E=this.cursors[R++]||this.addCursor(),X=E.style;this.drawCursor?this.drawCursor(E,B,n,b[A],this.session):this.isCursorInView(B,n)?(L.setStyle(X,"display","block"),L.translate(E,B.left,B.top),L.setStyle(X,"width",Math.round(n.characterWidth)+"px"),L.setStyle(X,"height",n.lineHeight+"px")):L.setStyle(X,"display","none")}}for(;this.cursors.length>R;)this.removeCursor();var $=this.session.getOverwrite();this.$setOverwrite($),this.$pixelPos=B,this.restartTimer()},Cursor.prototype.$setOverwrite=function(n){n!=this.overwrite&&(this.overwrite=n,n?L.addCssClass(this.element,"ace_overwrite-cursors"):L.removeCssClass(this.element,"ace_overwrite-cursors"))},Cursor.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},Cursor}();R.prototype.$padding=0,R.prototype.drawCursor=null,b.Cursor=R})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("./lib/oop"),B=n("./lib/dom"),E=n("./lib/event"),X=n("./lib/event_emitter").EventEmitter,$=32768,V=function(){function Scrollbar(n,b){this.element=B.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+b,this.inner=B.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,E.addListener(this.element,"scroll",this.onScroll.bind(this)),E.addListener(this.element,"mousedown",E.preventDefault)}return Scrollbar.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},Scrollbar}();D.implement(V.prototype,X);var K=function(n){function VScrollBar(b,A){var L=n.call(this,b,"-v")||this;return L.scrollTop=0,L.scrollHeight=0,A.$scrollbarWidth=L.width=B.scrollbarWidth(b.ownerDocument),L.inner.style.width=L.element.style.width=(L.width||15)+5+"px",L.$minWidth=0,L}return R(VScrollBar,n),VScrollBar.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var n=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-n)/(this.coeff-n)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},VScrollBar.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},VScrollBar.prototype.setHeight=function(n){this.element.style.height=n+"px"},VScrollBar.prototype.setScrollHeight=function(n){this.scrollHeight=n,n>$?(this.coeff=$/n,n=$):1!=this.coeff&&(this.coeff=1),this.inner.style.height=n+"px"},VScrollBar.prototype.setScrollTop=function(n){this.scrollTop!=n&&(this.skipEvent=!0,this.scrollTop=n,this.element.scrollTop=n*this.coeff)},VScrollBar}(V);K.prototype.setInnerHeight=K.prototype.setScrollHeight;var Q=function(n){function HScrollBar(b,A){var L=n.call(this,b,"-h")||this;return L.scrollLeft=0,L.height=A.$scrollbarWidth,L.inner.style.height=L.element.style.height=(L.height||15)+5+"px",L}return R(HScrollBar,n),HScrollBar.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},HScrollBar.prototype.getHeight=function(){return this.isVisible?this.height:0},HScrollBar.prototype.setWidth=function(n){this.element.style.width=n+"px"},HScrollBar.prototype.setInnerWidth=function(n){this.inner.style.width=n+"px"},HScrollBar.prototype.setScrollWidth=function(n){this.inner.style.width=n+"px"},HScrollBar.prototype.setScrollLeft=function(n){this.scrollLeft!=n&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=n)},HScrollBar}(V);b.ScrollBar=K,b.ScrollBarV=K,b.ScrollBarH=Q,b.VScrollBar=K,b.HScrollBar=Q})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L,R=this&&this.__extends||(L=function(n,b){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,b){n.__proto__=b}||function(n,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(n[A]=b[A])},L(n,b)},function(n,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function __(){this.constructor=n}L(n,b),n.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),D=n("./lib/oop"),B=n("./lib/dom"),E=n("./lib/event"),X=n("./lib/event_emitter").EventEmitter;B.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var $=function(){function ScrollBar(n,b){this.element=B.createElement("div"),this.element.className="ace_sb"+b,this.inner=B.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,E.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return ScrollBar.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},ScrollBar}();D.implement($.prototype,X);var V=function(n){function VScrollBar(b,A){var L=n.call(this,b,"-v")||this;return L.scrollTop=0,L.scrollHeight=0,L.parent=b,L.width=L.VScrollWidth,L.renderer=A,L.inner.style.width=L.element.style.width=(L.width||15)+"px",L.$minWidth=0,L}return R(VScrollBar,n),VScrollBar.prototype.onMouseDown=function(n,b){if("mousedown"===n&&0===E.getButton(b)&&2!==b.detail){if(b.target===this.inner){var A=this,L=b.clientY,R=b.clientY,D=this.thumbTop;E.capture(this.inner,(function(n){L=n.clientY}),(function(){clearInterval(B)}));var B=setInterval((function(){if(void 0!==L){var n=A.scrollTopFromThumbTop(D+L-R);n!==A.scrollTop&&A._emit("scroll",{data:n})}}),20);return E.preventDefault(b)}var X=b.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(X)}),E.preventDefault(b)}},VScrollBar.prototype.getHeight=function(){return this.height},VScrollBar.prototype.scrollTopFromThumbTop=function(n){var b=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(b|=0)<0?b=0:b>this.pageHeight-this.viewHeight&&(b=this.pageHeight-this.viewHeight),b},VScrollBar.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},VScrollBar.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},VScrollBar.prototype.setScrollHeight=function(n,b){(this.pageHeight!==n||b)&&(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},VScrollBar.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},VScrollBar}($);V.prototype.setInnerHeight=V.prototype.setScrollHeight;var K=function(n){function HScrollBar(b,A){var L=n.call(this,b,"-h")||this;return L.scrollLeft=0,L.scrollWidth=0,L.height=L.HScrollHeight,L.inner.style.height=L.element.style.height=(L.height||12)+"px",L.renderer=A,L}return R(HScrollBar,n),HScrollBar.prototype.onMouseDown=function(n,b){if("mousedown"===n&&0===E.getButton(b)&&2!==b.detail){if(b.target===this.inner){var A=this,L=b.clientX,R=b.clientX,D=this.thumbLeft;E.capture(this.inner,(function(n){L=n.clientX}),(function(){clearInterval(B)}));var B=setInterval((function(){if(void 0!==L){var n=A.scrollLeftFromThumbLeft(D+L-R);n!==A.scrollLeft&&A._emit("scroll",{data:n})}}),20);return E.preventDefault(b)}var X=b.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(X)}),E.preventDefault(b)}},HScrollBar.prototype.getHeight=function(){return this.isVisible?this.height:0},HScrollBar.prototype.scrollLeftFromThumbLeft=function(n){var b=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(b|=0)<0?b=0:b>this.pageWidth-this.viewWidth&&(b=this.pageWidth-this.viewWidth),b},HScrollBar.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},HScrollBar.prototype.setScrollWidth=function(n,b){(this.pageWidth!==n||b)&&(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},HScrollBar.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},HScrollBar}($);K.prototype.setInnerWidth=K.prototype.setScrollWidth,b.ScrollBar=V,b.ScrollBarV=V,b.ScrollBarH=K,b.VScrollBar=V,b.HScrollBar=K})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(n,b,A){"use strict";var L=n("./lib/event"),R=function(){function RenderLoop(n,b){this.onRender=n,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=b||window;var A=this;this._flush=function(n){A.pending=!1;var b=A.changes;if(b&&(L.blockIdle(100),A.changes=0,A.onRender(b)),A.changes){if(A.$recursionLimit--<0)return;A.schedule()}else A.$recursionLimit=2}}return RenderLoop.prototype.schedule=function(n){this.changes=this.changes|n,this.changes&&!this.pending&&(L.nextFrame(this._flush),this.pending=!0)},RenderLoop.prototype.clear=function(n){var b=this.changes;return this.changes=0,b},RenderLoop}();b.RenderLoop=R})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(n,b,A){var L=n("../lib/oop"),R=n("../lib/dom"),D=n("../lib/lang"),B=n("../lib/event"),E=n("../lib/useragent"),X=n("../lib/event_emitter").EventEmitter,$=512,V="function"==typeof ResizeObserver,K=200,Q=function(){function FontMetrics(n){this.el=R.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=R.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=R.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),n.appendChild(this.el),this.$measureNode.textContent=D.stringRepeat("X",$),this.$characterSize={width:0,height:0},V?this.$addObserver():this.checkForSizeChanges()}return FontMetrics.prototype.$setMeasureNodeStyles=function(n,b){n.width=n.height="auto",n.left=n.top="0px",n.visibility="hidden",n.position="absolute",n.whiteSpace="pre",E.isIE<8?n["font-family"]="inherit":n.font="inherit",n.overflow=b?"hidden":"visible"},FontMetrics.prototype.checkForSizeChanges=function(n){if(void 0===n&&(n=this.$measureSizes()),n&&(this.$characterSize.width!==n.width||this.$characterSize.height!==n.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=n,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===n.width&&b.height===n.height,this._emit("changeCharacterSize",{data:n})}},FontMetrics.prototype.$addObserver=function(){var n=this;this.$observer=new window.ResizeObserver((function(b){n.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},FontMetrics.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var n=this;return this.$pollSizeChangesTimer=B.onIdle((function cb(){n.checkForSizeChanges(),B.onIdle(cb,500)}),500)},FontMetrics.prototype.setPolling=function(n){n?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},FontMetrics.prototype.$measureSizes=function(n){var b={height:(n||this.$measureNode).clientHeight,width:(n||this.$measureNode).clientWidth/$};return 0===b.width||0===b.height?null:b},FontMetrics.prototype.$measureCharWidth=function(n){return this.$main.textContent=D.stringRepeat(n,$),this.$main.getBoundingClientRect().width/$},FontMetrics.prototype.getCharacterWidth=function(n){var b=this.charSizes[n];return void 0===b&&(b=this.charSizes[n]=this.$measureCharWidth(n)/this.$characterSize.width),b},FontMetrics.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},FontMetrics.prototype.$getZoom=function(n){return n&&n.parentElement?(Number(window.getComputedStyle(n).zoom)||1)*this.$getZoom(n.parentElement):1},FontMetrics.prototype.$initTransformMeasureNodes=function(){var t=function(n,b){return["div",{style:"position: absolute;top:"+n+"px;left:"+b+"px;"}]};this.els=R.buildDom([t(0,0),t(K,0),t(0,K),t(K,K)],this.el)},FontMetrics.prototype.transformCoordinates=function(n,b){n&&(n=mul(1/this.$getZoom(this.el),n));function solve(n,b,A){var L=n[1]*b[0]-n[0]*b[1];return[(-b[1]*A[0]+b[0]*A[1])/L,(+n[1]*A[0]-n[0]*A[1])/L]}function sub(n,b){return[n[0]-b[0],n[1]-b[1]]}function add(n,b){return[n[0]+b[0],n[1]+b[1]]}function mul(n,b){return[n*b[0],n*b[1]]}function p(n){var b=n.getBoundingClientRect();return[b.left,b.top]}this.els||this.$initTransformMeasureNodes();var A=p(this.els[0]),L=p(this.els[1]),R=p(this.els[2]),D=p(this.els[3]),B=solve(sub(D,L),sub(D,R),sub(add(L,R),add(D,A))),E=mul(1+B[0],sub(L,A)),X=mul(1+B[1],sub(R,A));if(b){var $=b,V=B[0]*$[0]/K+B[1]*$[1]/K+1,Q=add(mul($[0],E),mul($[1],X));return add(mul(1/V/K,Q),A)}var tt=sub(n,A),ot=solve(sub(E,mul(B[0],tt)),sub(X,mul(B[1],tt)),tt);return mul(K,ot)},FontMetrics}();Q.prototype.$characterSize={width:0,height:0},L.implement(Q.prototype,X),b.FontMetrics=Q})),ace.define("ace/css/editor-css",["require","exports","module"],(function(n,b,A){A.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(n,b,A){"use strict";var L=n("../lib/dom"),R=n("../lib/oop"),D=n("../lib/event_emitter").EventEmitter,B=function(){function Decorator(n,b){this.canvas=L.createElement("canvas"),this.renderer=b,this.pixelRatio=1,this.maxHeight=b.layerConfig.maxHeight,this.lineHeight=b.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas)}return Decorator.prototype.$updateDecorators=function(n){var b=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;n&&(this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,(n.lastRow+1)*this.lineHeightb.priority?1:0}));for(var D=this.renderer.session.$foldData,B=0;Bthis.canvasHeight&&(Q=this.canvasHeight-this.halfMinDecorationHeight),V=Math.round(Q-this.halfMinDecorationHeight),K=Math.round(Q+this.halfMinDecorationHeight)}A.fillStyle=b[L[B].type]||null,A.fillRect(0,$,this.canvasWidth,K-V)}}var tt=this.renderer.session.selection.getCursor();if(tt){X=this.compensateFoldRows(tt.row,D),$=Math.round((tt.row-X)*this.lineHeight*this.heightRatio);A.fillStyle="rgba(0, 0, 0, 0.5)",A.fillRect(0,$,this.canvasWidth,2)}},Decorator.prototype.compensateFoldRows=function(n,b){var A=0;if(b&&b.length>0)for(var L=0;Lb[L].start.row&&n=b[L].end.row&&(A+=b[L].end.row-b[L].start.row);return A},Decorator}();R.implement(B.prototype,D),b.Decorator=B})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(n,b,A){"use strict";var L=n("./lib/oop"),R=n("./lib/dom"),D=n("./lib/lang"),B=n("./config"),E=n("./layer/gutter").Gutter,X=n("./layer/marker").Marker,$=n("./layer/text").Text,V=n("./layer/cursor").Cursor,K=n("./scrollbar").HScrollBar,Q=n("./scrollbar").VScrollBar,tt=n("./scrollbar_custom").HScrollBar,ot=n("./scrollbar_custom").VScrollBar,nt=n("./renderloop").RenderLoop,it=n("./layer/font_metrics").FontMetrics,rt=n("./lib/event_emitter").EventEmitter,st=n("./css/editor-css"),pt=n("./layer/decorators").Decorator,lt=n("./lib/useragent"),ut=n("./layer/text_util").isTextToken;R.importCssString(st,"ace_editor.css",!1);var bt=function(){function VirtualRenderer(n,b){var A=this;this.container=n||R.createElement("div"),R.addCssClass(this.container,"ace_editor"),R.HI_DPI&&R.addCssClass(this.container,"ace_hidpi"),this.setTheme(b),null==B.get("useStrictCSP")&&B.set("useStrictCSP",!1),this.$gutter=R.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=R.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=R.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new E(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new X(this.content);var L=this.$textLayer=new $(this.content);this.canvas=L.element,this.$markerFront=new X(this.content),this.$cursorLayer=new V(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new Q(this.container,this),this.scrollBarH=new K(this.container,this),this.scrollBarV.on("scroll",(function(n){A.$scrollAnimation||A.session.setScrollTop(n.data-A.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(n){A.$scrollAnimation||A.session.setScrollLeft(n.data-A.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new it(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(n){A.updateCharacterSize(),A.onResize(!0,A.gutterWidth,A.$size.width,A.$size.height),A._signal("changeCharacterSize",n)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!lt.isIOS,this.$loop=new nt(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),B.resetOptions(this),B._signal("renderer",this)}return VirtualRenderer.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),R.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},VirtualRenderer.prototype.setSession=function(n){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=n,n&&this.scrollMargin.top&&n.getScrollTop()<=0&&n.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(n),this.$markerBack.setSession(n),this.$markerFront.setSession(n),this.$gutterLayer.setSession(n),this.$textLayer.setSession(n),n&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},VirtualRenderer.prototype.updateLines=function(n,b,A){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>n&&(this.$changedLines.firstRow=n),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},VirtualRenderer.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},VirtualRenderer.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},VirtualRenderer.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},VirtualRenderer.prototype.updateFull=function(n){n?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},VirtualRenderer.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},VirtualRenderer.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},VirtualRenderer.prototype.onResize=function(n,b,A,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=n?1:0;var R=this.container;L||(L=R.clientHeight||R.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(R.style.height&&"0px"!=R.style.height||(R.style.height="1px",L=R.clientHeight||R.scrollHeight)),A||(A=R.clientWidth||R.scrollWidth);var D=this.$updateCachedSize(n,b,A,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!A&&!L)return this.resizing=0;n&&(this.$gutterLayer.$padding=null),n?this.$renderChanges(D|this.$changes,!0):this.$loop.schedule(D|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},VirtualRenderer.prototype.$updateCachedSize=function(n,b,A,L){L-=this.$extraHeight||0;var D=0,B=this.$size,E={width:B.width,height:B.height,scrollerHeight:B.scrollerHeight,scrollerWidth:B.scrollerWidth};if(L&&(n||B.height!=L)&&(B.height=L,D|=this.CHANGE_SIZE,B.scrollerHeight=B.height,this.$horizScroll&&(B.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(B.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",D|=this.CHANGE_SCROLL),A&&(n||B.width!=A)){D|=this.CHANGE_SIZE,B.width=A,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,R.setStyle(this.scrollBarH.element.style,"left",b+"px"),R.setStyle(this.scroller.style,"left",b+this.margin.left+"px"),B.scrollerWidth=Math.max(0,A-b-this.scrollBarV.getWidth()-this.margin.h),R.setStyle(this.$gutter.style,"left",this.margin.left+"px");var X=this.scrollBarV.getWidth()+"px";R.setStyle(this.scrollBarH.element.style,"right",X),R.setStyle(this.scroller.style,"right",X),R.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(B.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||n)&&(D|=this.CHANGE_FULL)}return B.$dirty=!A||!L,D&&this._signal("resize",E),D},VirtualRenderer.prototype.onGutterResize=function(n){var b=this.$showGutter?n:0;b!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,b,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},VirtualRenderer.prototype.adjustWrapLimit=function(){var n=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(n/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},VirtualRenderer.prototype.setAnimatedScroll=function(n){this.setOption("animatedScroll",n)},VirtualRenderer.prototype.getAnimatedScroll=function(){return this.$animatedScroll},VirtualRenderer.prototype.setShowInvisibles=function(n){this.setOption("showInvisibles",n),this.session.$bidiHandler.setShowInvisibles(n)},VirtualRenderer.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},VirtualRenderer.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},VirtualRenderer.prototype.setDisplayIndentGuides=function(n){this.setOption("displayIndentGuides",n)},VirtualRenderer.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},VirtualRenderer.prototype.setHighlightIndentGuides=function(n){this.setOption("highlightIndentGuides",n)},VirtualRenderer.prototype.setShowPrintMargin=function(n){this.setOption("showPrintMargin",n)},VirtualRenderer.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},VirtualRenderer.prototype.setPrintMarginColumn=function(n){this.setOption("printMarginColumn",n)},VirtualRenderer.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},VirtualRenderer.prototype.getShowGutter=function(){return this.getOption("showGutter")},VirtualRenderer.prototype.setShowGutter=function(n){return this.setOption("showGutter",n)},VirtualRenderer.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},VirtualRenderer.prototype.setFadeFoldWidgets=function(n){this.setOption("fadeFoldWidgets",n)},VirtualRenderer.prototype.setHighlightGutterLine=function(n){this.setOption("highlightGutterLine",n)},VirtualRenderer.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},VirtualRenderer.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var n=R.createElement("div");n.className="ace_layer ace_print-margin-layer",this.$printMarginEl=R.createElement("div"),this.$printMarginEl.className="ace_print-margin",n.appendChild(this.$printMarginEl),this.content.insertBefore(n,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},VirtualRenderer.prototype.getContainerElement=function(){return this.container},VirtualRenderer.prototype.getMouseEventTarget=function(){return this.scroller},VirtualRenderer.prototype.getTextAreaContainer=function(){return this.container},VirtualRenderer.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var n=this.textarea.style,b=this.$composition;if(this.$keepTextAreaAtCursor||b){var A=this.$cursorLayer.$pixelPos;if(A){b&&b.markerRange&&(A=this.$cursorLayer.getPixelPosition(b.markerRange.start,!0));var L=this.layerConfig,D=A.top,B=A.left;D-=L.offset;var E=b&&b.useTextareaForIME||lt.isMobile?this.lineHeight:1;if(D<0||D>L.height-E)R.translate(this.textarea,0,0);else{var X=1,$=this.$size.height-E;if(b)if(b.useTextareaForIME){var V=this.textarea.value;X=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else D+=this.lineHeight+2;else D+=this.lineHeight;(B-=this.scrollLeft)>this.$size.scrollerWidth-X&&(B=this.$size.scrollerWidth-X),B+=this.gutterWidth+this.margin.left,R.setStyle(n,"height",E+"px"),R.setStyle(n,"width",X+"px"),R.translate(this.textarea,Math.min(B,this.$size.scrollerWidth-X),Math.min(D,$))}}}else R.translate(this.textarea,-100,0)}},VirtualRenderer.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},VirtualRenderer.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},VirtualRenderer.prototype.getLastFullyVisibleRow=function(){var n=this.layerConfig,b=n.lastRow;return this.session.documentToScreenRow(b,0)*n.lineHeight-this.session.getScrollTop()>n.height-n.lineHeight?b-1:b},VirtualRenderer.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},VirtualRenderer.prototype.setPadding=function(n){this.$padding=n,this.$textLayer.setPadding(n),this.$cursorLayer.setPadding(n),this.$markerFront.setPadding(n),this.$markerBack.setPadding(n),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},VirtualRenderer.prototype.setScrollMargin=function(n,b,A,L){var R=this.scrollMargin;R.top=0|n,R.bottom=0|b,R.right=0|L,R.left=0|A,R.v=R.top+R.bottom,R.h=R.left+R.right,R.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-R.top),this.updateFull()},VirtualRenderer.prototype.setMargin=function(n,b,A,L){var R=this.margin;R.top=0|n,R.bottom=0|b,R.right=0|L,R.left=0|A,R.v=R.top+R.bottom,R.h=R.left+R.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},VirtualRenderer.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},VirtualRenderer.prototype.setHScrollBarAlwaysVisible=function(n){this.setOption("hScrollBarAlwaysVisible",n)},VirtualRenderer.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},VirtualRenderer.prototype.setVScrollBarAlwaysVisible=function(n){this.setOption("vScrollBarAlwaysVisible",n)},VirtualRenderer.prototype.$updateScrollBarV=function(){var n=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(n-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>n-b&&(n=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(n+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},VirtualRenderer.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},VirtualRenderer.prototype.freeze=function(){this.$frozen=!0},VirtualRenderer.prototype.unfreeze=function(){this.$frozen=!1},VirtualRenderer.prototype.$renderChanges=function(n,b){if(this.$changes&&(n|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(n||b)){if(this.$size.$dirty)return this.$changes|=n,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",n),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var A=this.layerConfig;if(n&this.CHANGE_FULL||n&this.CHANGE_SIZE||n&this.CHANGE_TEXT||n&this.CHANGE_LINES||n&this.CHANGE_SCROLL||n&this.CHANGE_H_SCROLL){if(n|=this.$computeLayerConfig()|this.$loop.clear(),A.firstRow!=this.layerConfig.firstRow&&A.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(A.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,n|=this.CHANGE_SCROLL,n|=this.$computeLayerConfig()|this.$loop.clear())}A=this.layerConfig,this.$updateScrollBarV(),n&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),R.translate(this.content,-this.scrollLeft,-A.offset);var D=A.width+2*this.$padding+"px",B=A.minHeight+"px";R.setStyle(this.content.style,"width",D),R.setStyle(this.content.style,"height",B)}if(n&this.CHANGE_H_SCROLL&&(R.translate(this.content,-this.scrollLeft,-A.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),n&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),void this._signal("afterRender",n);if(n&this.CHANGE_SCROLL)return this.$changedLines=null,n&this.CHANGE_TEXT||n&this.CHANGE_LINES?this.$textLayer.update(A):this.$textLayer.scrollLines(A),this.$showGutter&&(n&this.CHANGE_GUTTER||n&this.CHANGE_LINES?this.$gutterLayer.update(A):this.$gutterLayer.scrollLines(A)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),void this._signal("afterRender",n);n&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_LINES?((this.$updateLines()||n&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_TEXT||n&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):n&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)),n&this.CHANGE_CURSOR&&(this.$cursorLayer.update(A),this.$moveTextAreaToCursor()),n&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(A),n&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(A),this._signal("afterRender",n)}else this.$changes|=n},VirtualRenderer.prototype.$autosize=function(){var n=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,A=Math.min(b,Math.max((this.$minLines||1)*this.lineHeight,n))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(A+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&A>this.$maxPixelHeight&&(A=this.$maxPixelHeight);var L=!(A<=2*this.lineHeight)&&n>b;if(A!=this.desiredHeight||this.$size.height!=this.desiredHeight||L!=this.$vScroll){L!=this.$vScroll&&(this.$vScroll=L,this.scrollBarV.setVisible(L));var R=this.container.clientWidth;this.container.style.height=A+"px",this.$updateCachedSize(!0,this.$gutterWidth,R,A),this.desiredHeight=A,this._signal("autosize")}},VirtualRenderer.prototype.$computeLayerConfig=function(){var n=this.session,b=this.$size,A=b.height<=2*this.lineHeight,L=this.session.getScreenLength()*this.lineHeight,R=this.$getLongestLine(),D=!A&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-R-2*this.$padding<0),B=this.$horizScroll!==D;B&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var E=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var X=b.scrollerHeight+this.lineHeight,$=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;L+=$;var V=this.scrollMargin;this.session.setScrollTop(Math.max(-V.top,Math.min(this.scrollTop,L-b.scrollerHeight+V.bottom))),this.session.setScrollLeft(Math.max(-V.left,Math.min(this.scrollLeft,R+2*this.$padding-b.scrollerWidth+V.right)));var K=!A&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-L+$<0||this.scrollTop>V.top),Q=E!==K;Q&&(this.$vScroll=K,this.scrollBarV.setVisible(K));var tt,ot,nt=this.scrollTop%this.lineHeight,it=Math.ceil(X/this.lineHeight)-1,rt=Math.max(0,Math.round((this.scrollTop-nt)/this.lineHeight)),st=rt+it,pt=this.lineHeight;rt=n.screenToDocumentRow(rt,0);var lt=n.getFoldLine(rt);lt&&(rt=lt.start.row),tt=n.documentToScreenRow(rt,0),ot=n.getRowLength(rt)*pt,st=Math.min(n.screenToDocumentRow(st,0),n.getLength()-1),X=b.scrollerHeight+n.getRowLength(st)*pt+ot,nt=this.scrollTop-tt*pt;var ut=0;return(this.layerConfig.width!=R||B)&&(ut=this.CHANGE_H_SCROLL),(B||Q)&&(ut|=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),Q&&(R=this.$getLongestLine())),this.layerConfig={width:R,padding:this.$padding,firstRow:rt,firstRowScreen:tt,lastRow:st,lineHeight:pt,characterWidth:this.characterWidth,minHeight:X,maxHeight:L,offset:nt,gutterOffset:pt?Math.max(0,Math.ceil((nt+b.height-b.scrollerHeight)/pt)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(R-this.$padding),ut},VirtualRenderer.prototype.$updateLines=function(){if(this.$changedLines){var n=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var A=this.layerConfig;if(!(n>A.lastRow+1||bthis.$textLayer.MAX_LINE_LENGTH&&(n=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(n*this.characterWidth))},VirtualRenderer.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},VirtualRenderer.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},VirtualRenderer.prototype.addGutterDecoration=function(n,b){this.$gutterLayer.addGutterDecoration(n,b)},VirtualRenderer.prototype.removeGutterDecoration=function(n,b){this.$gutterLayer.removeGutterDecoration(n,b)},VirtualRenderer.prototype.updateBreakpoints=function(n){this._rows=n,this.$loop.schedule(this.CHANGE_GUTTER)},VirtualRenderer.prototype.setAnnotations=function(n){this.$gutterLayer.setAnnotations(n),this.$loop.schedule(this.CHANGE_GUTTER)},VirtualRenderer.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},VirtualRenderer.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},VirtualRenderer.prototype.showCursor=function(){this.$cursorLayer.showCursor()},VirtualRenderer.prototype.scrollSelectionIntoView=function(n,b,A){this.scrollCursorIntoView(n,A),this.scrollCursorIntoView(b,A)},VirtualRenderer.prototype.scrollCursorIntoView=function(n,b,A){if(0!==this.$size.scrollerHeight){var L=this.$cursorLayer.getPixelPosition(n),R=L.left,D=L.top,B=A&&A.top||0,E=A&&A.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var X=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;X+B>D?(b&&X+B>D+this.lineHeight&&(D-=b*this.$size.scrollerHeight),0===D&&(D=-this.scrollMargin.top),this.session.setScrollTop(D)):X+this.$size.scrollerHeight-E=1-this.scrollMargin.top||(b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(n<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(n>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},VirtualRenderer.prototype.pixelToScreenCoordinates=function(n,b){var A;if(this.$hasCssTransforms){A={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([n,b]);n=L[1]-this.gutterWidth-this.margin.left,b=L[0]}else A=this.scroller.getBoundingClientRect();var R=n+this.scrollLeft-A.left-this.$padding,D=R/this.characterWidth,B=Math.floor((b+this.scrollTop-A.top)/this.lineHeight),E=this.$blockCursor?Math.floor(D):Math.round(D);return{row:B,column:E,side:D-E>0?1:-1,offsetX:R}},VirtualRenderer.prototype.screenToTextCoordinates=function(n,b){var A;if(this.$hasCssTransforms){A={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([n,b]);n=L[1]-this.gutterWidth-this.margin.left,b=L[0]}else A=this.scroller.getBoundingClientRect();var R=n+this.scrollLeft-A.left-this.$padding,D=R/this.characterWidth,B=this.$blockCursor?Math.floor(D):Math.round(D),E=Math.floor((b+this.scrollTop-A.top)/this.lineHeight);return this.session.screenToDocumentPosition(E,Math.max(B,0),R)},VirtualRenderer.prototype.textToScreenCoordinates=function(n,b){var A=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(n,b),R=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,n)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),D=L.row*this.lineHeight;return{pageX:A.left+R-this.scrollLeft,pageY:A.top+D-this.scrollTop}},VirtualRenderer.prototype.visualizeFocus=function(){R.addCssClass(this.container,"ace_focus")},VirtualRenderer.prototype.visualizeBlur=function(){R.removeCssClass(this.container,"ace_focus")},VirtualRenderer.prototype.showComposition=function(n){this.$composition=n,n.cssText||(n.cssText=this.textarea.style.cssText),null==n.useTextareaForIME&&(n.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(R.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):n.markerId=this.session.addMarker(n.markerRange,"ace_composition_marker","text")},VirtualRenderer.prototype.setCompositionText=function(n){var b=this.session.selection.cursor;this.addToken(n,"composition_placeholder",b.row,b.column),this.$moveTextAreaToCursor()},VirtualRenderer.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),R.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var n=this.session.selection.cursor;this.removeExtraToken(n.row,n.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},VirtualRenderer.prototype.setGhostText=function(n,b){var A=this.session.selection.cursor,L=b||{row:A.row,column:A.column};this.removeGhostText();var D=this.$calculateWrappedTextChunks(n,L);this.addToken(D[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:n,position:{row:L.row,column:L.column}};var B=R.createElement("div");if(D.length>1){var E,X=this.hideTokensAfterPosition(L.row,L.column);D.slice(1).forEach((function(n){var b=R.createElement("div"),A=R.createElement("span");A.className="ace_ghost_text",n.wrapped&&(b.className="ghost_text_line_wrapped"),0===n.text.length&&(n.text=" "),A.appendChild(R.createTextNode(n.text)),b.appendChild(A),B.appendChild(b),E=b})),X.forEach((function(n){var b=R.createElement("span");ut(n.type)||(b.className="ace_"+n.type.replace(/\./g," ace_")),b.appendChild(R.createTextNode(n.value)),E.appendChild(b)})),this.$ghostTextWidget={el:B,row:L.row,column:L.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var $=this.$cursorLayer.getPixelPosition(L,!0),V=this.container.getBoundingClientRect().height,K=D.length*this.lineHeight;if(K0){var $=0;X.push(R[B].length);for(var V=0;V1||Math.abs(n.$size.height-L)>1?n.$resizeTimer.delay():n.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},VirtualRenderer}();bt.prototype.CHANGE_CURSOR=1,bt.prototype.CHANGE_MARKER=2,bt.prototype.CHANGE_GUTTER=4,bt.prototype.CHANGE_SCROLL=8,bt.prototype.CHANGE_LINES=16,bt.prototype.CHANGE_TEXT=32,bt.prototype.CHANGE_SIZE=64,bt.prototype.CHANGE_MARKER_BACK=128,bt.prototype.CHANGE_MARKER_FRONT=256,bt.prototype.CHANGE_FULL=512,bt.prototype.CHANGE_H_SCROLL=1024,bt.prototype.$changes=0,bt.prototype.$padding=null,bt.prototype.$frozen=!1,bt.prototype.STEPS=8,L.implement(bt.prototype,rt),B.defineOptions(bt.prototype,"renderer",{useResizeObserver:{set:function(n){!n&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):n&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(n){this.$textLayer.setShowInvisibles(n)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(n){"number"==typeof n&&(this.$printMarginColumn=n),this.$showPrintMargin=!!n,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(n){this.$gutter.style.display=n?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(n){this.$gutterLayer.$useSvgGutterIcons=n},initialValue:!1},showFoldedAnnotations:{set:function(n){this.$gutterLayer.$showFoldedAnnotations=n},initialValue:!1},fadeFoldWidgets:{set:function(n){R.setCssClass(this.$gutter,"ace_fade-fold-widgets",n)},initialValue:!1},showFoldWidgets:{set:function(n){this.$gutterLayer.setShowFoldWidgets(n),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(n){this.$textLayer.setDisplayIndentGuides(n)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(n){1==this.$textLayer.setHighlightIndentGuides(n)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(n){this.$gutterLayer.setHighlightGutterLine(n),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(n){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(n){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(n){"number"==typeof n&&(n+="px"),this.container.style.fontSize=n,this.updateFontSize()},initialValue:12},fontFamily:{set:function(n){this.container.style.fontFamily=n,this.updateFontSize()}},maxLines:{set:function(n){this.updateFull()}},minLines:{set:function(n){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(n){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(n){n=+n||0,this.$scrollPastEnd!=n&&(this.$scrollPastEnd=n,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(n){this.$gutterLayer.$fixedWidth=!!n,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(n){this.$updateCustomScrollbar(n)},initialValue:!1},theme:{set:function(n){this.setTheme(n)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!lt.isMobile&&!lt.isIE}}),b.VirtualRenderer=bt})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(n,b,A){"use strict";var L=n("../lib/oop"),R=n("../lib/net"),D=n("../lib/event_emitter").EventEmitter,B=n("../config");function createWorker(n){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(B.get("loadWorkerFromBlob")){var b=function $workerBlob(n){var b="importScripts('"+R.qualifyURL(n)+"');";try{return new Blob([b],{type:"application/javascript"})}catch(n){var A=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return A.append(b),A.getBlob("application/javascript")}}(n),A=(window.URL||window.webkitURL).createObjectURL(b);return new Worker(A)}return new Worker(n)}var WorkerClient=function(n){n.postMessage||(n=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=n,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){L.implement(this,D),this.$createWorkerFromOldConfig=function(b,A,L,R,D){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),B.get("packaged")||!n.toUrl)R=R||B.moduleUrl(A,"worker");else{var E=this.$normalizePath;R=R||E(n.toUrl("ace/worker/worker.js",null,"_"));var X={};b.forEach((function(b){X[b]=E(n.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=createWorker(R),D&&this.send("importScripts",D),this.$worker.postMessage({init:!0,tlns:X,module:A,classname:L}),this.$worker},this.onMessage=function(n){var b=n.data;switch(b.type){case"event":this._signal(b.name,{data:b.data});break;case"call":var A=this.callbacks[b.id];A&&(A(b.data),delete this.callbacks[b.id]);break;case"error":this.reportError(b.data);break;case"log":window.console&&console.log&&console.log.apply(console,b.data)}},this.reportError=function(n){window.console&&console.error&&console.error(n)},this.$normalizePath=function(n){return R.qualifyURL(n)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(n){n.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(n,b){this.$worker.postMessage({command:n,args:b})},this.call=function(n,b,A){if(A){var L=this.callbackId++;this.callbacks[L]=A,b.push(L)}this.send(n,b)},this.emit=function(n,b){try{b.data&&b.data.err&&(b.data.err={message:b.data.err.message,stack:b.data.err.stack,code:b.data.err.code}),this.$worker&&this.$worker.postMessage({event:n,data:{data:b.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(n){this.$doc&&this.terminate(),this.$doc=n,this.call("setValue",[n.getValue()]),n.on("change",this.changeListener,!0)},this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==n.action?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end)},this.$sendDeltaQueue=function(){var n=this.deltaQueue;n&&(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}))}}).call(WorkerClient.prototype);b.UIWorkerClient=function(n,b,A){var L=null,R=!1,E=Object.create(D),X=[],$=new WorkerClient({messageBuffer:X,terminate:function(){},postMessage:function(n){X.push(n),L&&(R?setTimeout(processNext):processNext())}});$.setEmitSync=function(n){R=n};var processNext=function(){var n=X.shift();n.command?L[n.command].apply(L,n.args):n.event&&E._signal(n.event,n.data)};return E.postMessage=function(n){$.onMessage({data:n})},E.callback=function(n,b){this.postMessage({type:"call",id:b,data:n})},E.emit=function(n,b){this.postMessage({type:"event",name:n,data:b})},B.loadModule(["worker",b],(function(n){for(L=new n[A](E);X.length;)processNext()})),$},b.WorkerClient=WorkerClient,b.createWorker=createWorker})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(n,b,A){"use strict";var L=n("./range").Range,R=n("./lib/event_emitter").EventEmitter,D=n("./lib/oop"),B=function(){function PlaceHolder(n,b,A,L,R,D){var B=this;this.length=b,this.session=n,this.doc=n.getDocument(),this.mainClass=R,this.othersClass=D,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=L,this.$onCursorChange=function(){setTimeout((function(){B.onCursorChange()}))},this.$pos=A;var E=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=E.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return PlaceHolder.prototype.setup=function(){var n=this,b=this.doc,A=this.session;this.selectionBefore=A.selection.toJSON(),A.selection.inMultiSelectMode&&A.selection.toSingleRange(),this.pos=b.createAnchor(this.$pos.row,this.$pos.column);var R=this.pos;R.$insertRight=!0,R.detach(),R.markerId=A.addMarker(new L(R.row,R.column,R.row,R.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(A){var L=b.createAnchor(A.row,A.column);L.$insertRight=!0,L.detach(),n.others.push(L)})),A.setUndoSelect(!1)},PlaceHolder.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,b=this;this.othersActive=!0,this.others.forEach((function(A){A.markerId=n.addMarker(new L(A.row,A.column,A.row,A.column+b.length),b.othersClass,null,!1)}))}},PlaceHolder.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n=this.pos.column&&b.start.column<=this.pos.column+this.length+1,D=b.start.column-this.pos.column;if(this.updateAnchors(n),R&&(this.length+=A),R&&!this.session.$fromUndo)if("insert"===n.action)for(var B=this.others.length-1;B>=0;B--){var E={row:(X=this.others[B]).row,column:X.column+D};this.doc.insertMergedLines(E,n.lines)}else if("remove"===n.action)for(B=this.others.length-1;B>=0;B--){var X;E={row:(X=this.others[B]).row,column:X.column+D};this.doc.remove(new L(E.row,E.column,E.row,E.column-A))}this.$updating=!1,this.updateMarkers()}},PlaceHolder.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var b=this.others.length;b--;)this.others[b].onChange(n);this.updateMarkers()},PlaceHolder.prototype.updateMarkers=function(){if(!this.$updating){var n=this,b=this.session,updateMarker=function(A,R){b.removeMarker(A.markerId),A.markerId=b.addMarker(new L(A.row,A.column,A.row,A.column+n.length),R,null,!1)};updateMarker(this.pos,this.mainClass);for(var A=this.others.length;A--;)updateMarker(this.others[A],this.othersClass)}},PlaceHolder.prototype.onCursorChange=function(n){if(!this.$updating&&this.session){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},PlaceHolder.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},PlaceHolder.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var n=this.session.getUndoManager(),b=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,A=0;A1?n.multiSelect.joinSelections():n.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(n){n.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(n){n.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(n){n.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],b.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(n){n.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(n){return n&&n.inMultiSelectMode}}];var L=n("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new L(b.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(n,b,A){var L=n("./range_list").RangeList,R=n("./range").Range,D=n("./selection").Selection,B=n("./mouse/multi_select_handler").onMouseDown,E=n("./lib/event"),X=n("./lib/lang"),$=n("./commands/multi_select_commands");b.commands=$.defaultCommands.concat($.multiSelectCommands);var V=new(0,n("./search").Search);var K=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(K.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(n,b){if(n){if(!this.inMultiSelectMode&&0===this.rangeCount){var A=this.toOrientedRange();if(this.rangeList.add(A),this.rangeList.add(n),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(n);this.rangeList.removeAll(),this.rangeList.add(A),this.$onAddRange(A)}n.cursor||(n.cursor=n.end);var L=this.rangeList.add(n);return this.$onAddRange(n),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(n)}},this.toSingleRange=function(n){n=n||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),n&&this.fromOrientedRange(n)},this.substractPoint=function(n){var b=this.rangeList.substractPoint(n);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var n=this.rangeList.merge();n.length&&this.$onRemoveRange(n)},this.$onAddRange=function(n){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(n),this._signal("addRange",{range:n})},this.$onRemoveRange=function(n){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();n.push(b),this.rangeCount=0}for(var A=n.length;A--;){var L=this.ranges.indexOf(n[A]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:n}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(b=b||this.ranges[0])&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new L,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var n=this.ranges.length?this.ranges:[this.getRange()],b=[],A=0;A1){var n=this.rangeList.ranges,b=n[n.length-1],A=R.fromPoints(n[0].start,b.end);this.toSingleRange(),this.setSelectionRange(A,b.cursor==b.start)}else{var L=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(L,D).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(n,b,A){var L=[],D=n.column0;)st--;if(st>0)for(var pt=0;L[pt].isEmpty();)pt++;for(var lt=st;lt>=pt;lt--)L[lt].isEmpty()&&L.splice(lt,1)}return L}}.call(D.prototype);var Q=n("./editor").Editor;function MultiSelect(n){n.$multiselectOnSessionChange||(n.$onAddRange=n.$onAddRange.bind(n),n.$onRemoveRange=n.$onRemoveRange.bind(n),n.$onMultiSelect=n.$onMultiSelect.bind(n),n.$onSingleSelect=n.$onSingleSelect.bind(n),n.$multiselectOnSessionChange=b.onSessionChange.bind(n),n.$checkMultiselectChange=n.$checkMultiselectChange.bind(n),n.$multiselectOnSessionChange(n),n.on("changeSession",n.$multiselectOnSessionChange),n.on("mousedown",B),n.commands.addCommands($.defaultCommands),function addAltCursorListeners(n){if(!n.textInput)return;var b=n.textInput.getElement(),A=!1;function reset(b){A&&(n.renderer.setMouseCursor(""),A=!1)}E.addListener(b,"keydown",(function(b){var L=18==b.keyCode&&!(b.ctrlKey||b.shiftKey||b.metaKey);n.$blockSelectEnabled&&L?A||(n.renderer.setMouseCursor("crosshair"),A=!0):A&&reset()}),n),E.addListener(b,"keyup",reset,n),E.addListener(b,"blur",reset,n)}(n))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(n){n.cursor||(n.cursor=n.end);var b=this.getSelectionStyle();return n.marker=this.session.addMarker(n,"ace_selection",b),this.session.$selectionMarkers.push(n),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,n},this.removeSelectionMarker=function(n){if(n.marker){this.session.removeMarker(n.marker);var b=this.session.$selectionMarkers.indexOf(n);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(n){for(var b=this.session.$selectionMarkers,A=n.length;A--;){var L=n[A];if(L.marker){this.session.removeMarker(L.marker);var R=b.indexOf(L);-1!=R&&b.splice(R,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(n){this.addSelectionMarker(n.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(n){this.removeSelectionMarkers(n.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(n){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler($.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(n){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler($.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(n){var b=n.command,A=n.editor;if(A.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?L=A.forEachSelection(b,n.args):"forEachLine"==b.multiSelectAction?L=A.forEachSelection(b,n.args,!0):"single"==b.multiSelectAction?(A.exitMultiSelectMode(),L=b.exec(A,n.args||{})):L=b.multiSelectAction(A,n.args||{});else{var L=b.exec(A,n.args||{});A.multiSelect.addRange(A.multiSelect.toOrientedRange()),A.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(n,b,A){if(!this.inVirtualSelectionMode){var L,R=A&&A.keepOrder,B=1==A||A&&A.$byLines,E=this.session,X=this.selection,$=X.rangeList,V=(R?X:$).ranges;if(!V.length)return n.exec?n.exec(this,b||{}):n(this,b||{});var K=X._eventRegistry;X._eventRegistry={};var Q=new D(E);this.inVirtualSelectionMode=!0;for(var tt=V.length;tt--;){if(B)for(;tt>0&&V[tt].start.row==V[tt-1].end.row;)tt--;Q.fromOrientedRange(V[tt]),Q.index=tt,this.selection=E.selection=Q;var ot=n.exec?n.exec(this,b||{}):n(this,b||{});L||void 0===ot||(L=ot),Q.toOrientedRange(V[tt])}Q.detach(),this.selection=E.selection=X,this.inVirtualSelectionMode=!1,X._eventRegistry=K,X.mergeOverlappingRanges(),X.ranges[0]&&X.fromOrientedRange(X.ranges[0]);var nt=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),nt&&nt.from==nt.to&&this.renderer.animateScrolling(nt.from),L}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var n="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,A=[],L=0;LB&&(B=A.column),LV?n.insert(L,X.stringRepeat(" ",D-V)):n.remove(new R(L.row,L.column,L.row,L.column-D+V)),b.start.column=b.end.column=B,b.start.row=b.end.row=L.row,b.cursor=b.end})),b.fromOrientedRange(A[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var V=this.selection.getRange(),K=V.start.row,Q=V.end.row,tt=K==Q;if(tt){var ot,nt=this.session.getLength();do{ot=this.session.getLine(Q)}while(/[=:]/.test(ot)&&++Q0);K<0&&(K=0),Q>=nt&&(Q=nt-1)}var it=this.session.removeFullLines(K,Q);it=this.$reAlignText(it,tt),this.session.insert({row:K,column:0},it.join("\n")+"\n"),tt||(V.start.column=0,V.end.column=it[it.length-1].length),this.selection.setRange(V)}},this.$reAlignText=function(n,b){var A,L,R,D=!0,B=!0;return n.map((function(n){var b=n.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==A?(A=b[1].length,L=b[2].length,R=b[3].length,b):(A+L+R!=b[1].length+b[2].length+b[3].length&&(B=!1),A!=b[1].length&&(D=!1),A>b[1].length&&(A=b[1].length),Lb[3].length&&(R=b[3].length),b):[n]})).map(b?alignLeft:D?B?function alignRight(n){return n[2]?spaces(A+L-n[2].length)+n[2]+spaces(R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}:alignLeft:function unAlign(n){return n[2]?spaces(A)+n[2]+spaces(R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]});function spaces(n){return X.stringRepeat(" ",n)}function alignLeft(n){return n[2]?spaces(A)+n[2]+spaces(L-n[2].length+R)+n[4].replace(/^([=:])\s+/,"$1 "):n[0]}}}).call(Q.prototype),b.onSessionChange=function(n){var b=n.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var A=n.oldSession;A&&(A.multiSelect.off("addRange",this.$onAddRange),A.multiSelect.off("removeRange",this.$onRemoveRange),A.multiSelect.off("multiSelect",this.$onMultiSelect),A.multiSelect.off("singleSelect",this.$onSingleSelect),A.multiSelect.lead.off("change",this.$checkMultiselectChange),A.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=MultiSelect,n("./config").defineOptions(Q.prototype,"editor",{enableMultiselect:{set:function(n){MultiSelect(this),n?this.on("mousedown",B):this.off("mousedown",B)},value:!0},enableBlockSelect:{set:function(n){this.$blockSelectEnabled=n},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(n,b,A){"use strict";var L=n("../../range").Range,R=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(n,b,A){var L=n.getLine(A);return this.foldingStartMarker.test(L)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(L)?"end":""},this.getFoldWidgetRange=function(n,b,A){return null},this.indentationBlock=function(n,b,A){var R=/\S/,D=n.getLine(b),B=D.search(R);if(-1!=B){for(var E=A||D.length,X=n.getLength(),$=b,V=b;++b$){var tt=n.getLine(V).length;return new L($,E,V,tt)}}},this.openingBracketBlock=function(n,b,A,R,D){var B={row:A,column:R+1},E=n.$findClosingBracket(b,B,D);if(E){var X=n.foldWidgets[E.row];return null==X&&(X=n.getFoldWidget(E.row)),"start"==X&&E.row>B.row&&(E.row--,E.column=n.getLine(E.row).length),L.fromPoints(B,E)}},this.closingBracketBlock=function(n,b,A,R,D){var B={row:A,column:R},E=n.$findOpeningBracket(b,B);if(E)return E.column++,B.column--,L.fromPoints(E,B)}}).call(R.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(n,b,A){"use strict";var L=n("../line_widgets").LineWidgets,R=n("../lib/dom"),D=n("../range").Range,B=n("../config").nls;b.showErrorMarker=function(n,b){var A=n.session;A.widgetManager||(A.widgetManager=new L(A),A.widgetManager.attach(n));var E=n.getCursorPosition(),X=E.row,$=A.widgetManager.getWidgetsAtRow(X).filter((function(n){return"errorMarker"==n.type}))[0];$?$.destroy():X-=b;var V,K=function findAnnotations(n,b,A){var L=n.getAnnotations().sort(D.comparePoints);if(L.length){var R=function binarySearch(n,b,A){for(var L=0,R=n.length-1;L<=R;){var D=L+R>>1,B=A(b,n[D]);if(B>0)L=D+1;else{if(!(B<0))return D;R=D-1}}return-(L+1)}(L,{row:b,column:-1},D.comparePoints);R<0&&(R=-R-1),R>=L.length?R=A>0?0:L.length-1:0===R&&A<0&&(R=L.length-1);var B=L[R];if(B&&A){if(B.row===b){do{B=L[R+=A]}while(B&&B.row===b);if(!B)return L.slice()}var E=[];b=B.row;do{E[A<0?"unshift":"push"](B),B=L[R+=A]}while(B&&B.row==b);return E.length&&E}}}(A,X,b);if(K){var Q=K[0];E.column=(Q.pos&&"number"!=typeof Q.column?Q.pos.sc:Q.column)||0,E.row=Q.row,V=n.renderer.$gutterLayer.$annotations[E.row]}else{if($)return;V={displayText:[B("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(E.row),n.selection.moveToPosition(E);var tt={row:E.row,fixedWidth:!0,coverGutter:!0,el:R.createElement("div"),type:"errorMarker"},ot=tt.el.appendChild(R.createElement("div")),nt=tt.el.appendChild(R.createElement("div"));nt.className="error_widget_arrow "+V.className;var it=n.renderer.$cursorLayer.getPixelPosition(E).left;nt.style.left=it+n.renderer.gutterWidth-5+"px",tt.el.className="error_widget_wrapper",ot.className="error_widget "+V.className,V.displayText.forEach((function(n,b){ot.appendChild(R.createTextNode(n)),b{var L=A(7288),R={}.hasOwnProperty;L.CSSLoader=function(n){function CSSLoader(){return CSSLoader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CSSLoader,n),CSSLoader.prototype.readOpts=function(){CSSLoader.__super__.readOpts.call(this),this._cssName?this.__cssName=this._cssName:this.__cssName="cui-css-"+this.getUniqueId()},CSSLoader.prototype.initOpts=function(){return CSSLoader.__super__.initOpts.call(this),this.addOpts({cssName:{check:String}})},CSSLoader.prototype.__getCSSNodes=function(){return L.dom.matchSelector(document.documentElement,'link[name="'+this.__cssName+'"]')},CSSLoader.prototype.getActiveCSS=function(){var n,b,A,R;for(b=0,A=(R=this.__getCSSNodes()).length;b0?L.dom.insertAfter(V[V.length-1],R):document.head.appendChild(R),B.promise())},CSSLoader}(L.Element)},2295:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0}}})},CSVData.prototype.readOpts=function(){CSVData.__super__.readOpts.call(this),this.__max_column_count=0,this._rows?this.rows=this._rows:this.rows=[],this.giveAllRowsSameNumberOfColumns()},CSVData.prototype.giveAllRowsSameNumberOfColumns=function(){var n,b,A,L,R,D,B,E,X,$,V,K;for(this.__max_column_count=0,b=0,D=(E=this.rows).length;bthis.__max_column_count&&(this.__max_column_count=n);for(L=0,B=(X=this.rows).length;LV;A=$<=V?++R:--R)K[A]=""},CSVData.prototype.getMaxColumnCount=function(){return this.__max_column_count},CSVData.prototype.getRows=function(){return this.rows},CSVData.prototype.getRow=function(n){return this.rows[n]},CSVData.prototype.getRowsCount=function(){return this.rows.length},CSVData.prototype.debug=function(){return console.debug("rows:",this.rows)},CSVData.prototype.toText=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt;for(null==n&&(n={}),(Q=L.Element.readOpts(n,"CSVData.toText",{delimiter:{mandatory:!0,default:";",check:function(n){return L.util.isString(n)&&n.length>0}},quotechar:{mandatory:!0,default:'"',check:function(n){return L.util.isString(n)&&n.length>0}},always_quote:{mandatory:!0,default:!0,check:Boolean},equal_columns:{mandatory:!0,default:!0,check:Boolean},newline:{mandatory:!0,default:String.fromCharCode(10),check:function(n){return L.util.isString(n)&&n.length>0}}})).equal_columns&&this.giveAllRowsSameNumberOfColumns(),K=String.fromCharCode(10),D=String.fromCharCode(13),A=[],B=0,$=(tt=this.rows).length;B<$;B++){for(b=[],E=X=0,V=(ot=tt[B]).length;X0&&b.push(Q.delimiter),nt=L.util.isEmpty(R)?"":""+R,!!Q.always_quote||(nt.indexOf(Q.delimiter)>-1||(nt.indexOf(Q.quotechar)>-1||(nt.indexOf(K)>-1||nt.indexOf(D)>-1)))?b.push(L.CSVData.quote(nt,Q.quotechar)):b.push(nt);A.push(b.join(""))}return A.join(Q.newline)},CSVData.prototype.parse=function(n){var b,A,R,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt;return null==n&&(n={}),nt=L.Element.readOpts(n,"CSVData.parse",{text:{mandatory:!0,check:String},delimiter:{check:String},quotechar:{check:String},defer:{mandatory:!0,default:!0,check:Boolean}}),this.rows=[],st=nt.text,E=[],B=0,R=[],tt=st.length,K=0,Q=!1,ot=0,rt=[" "],A=['"',"'"],b=[",",";","\t"],X=void 0!==nt.delimiter?nt.delimiter:null,it=void 0!==nt.quotechar?nt.quotechar:null,nt.defer&&($=new L.Deferred),pt=this,V=function(){var n,lt,ut,bt,Mt,zt;for(ut=function(){E[B]=R.join(""),R.splice(0),B+=1},bt=function(){E.length>0&&(ot+=1,pt.rows.push(E),E=[]),B=0};K=0)K+=1;else if(null===it&&D.call(A,n)>=0&&(it=n),null===X&&D.call(b,n)>=0&&(X=n),n!==it||0!==R.length&&!Q)if(n!==X){if(lt=st.charCodeAt(K),zt=st.charCodeAt(K+1),13!==lt&&10!==lt)R.push(n),K+=1;else if(K+=13===lt&&10===zt?2:1,Q)R.push(String.fromCharCode(10));else if(ut(),bt(),ot%1e3==0&&nt.defer)return $.notify({row_count:ot,file_read_idx:K,file_length:tt}),void L.setTimeout({ms:10,call:V})}else{if(Q){R.push(n),K+=1;continue}ut(),K+=1}else{if(Q){if(st[K+1]===it){R.push(n),K+=2;continue}Q=!1,K+=1;continue}Q=!0,K+=1}return R.length>0&&ut(),E.length>0&&bt(),pt.giveAllRowsSameNumberOfColumns(),Mt={row_count:ot,file_length:tt,rows:pt.rows},nt.defer?$.resolve(Mt):Mt},nt.defer?(L.setTimeout({ms:0,call:V}),$.done((function(){})),$.promise()):V()},CSVData.quote=function(n,b){return null==b&&(b='"'),b+n.replace(new RegExp(L.util.escapeRegExp(b),"g"),b+b)+b},CSVData}(L.Element)},7288:function(n,b,A){var L,R;R=A(3185),L=function(){function CUI(){}var n;return CUI.__readyFuncs=[],CUI.__themes=[],CUI.__ng__=!0,CUI.start=function(){var n,b,L;return b=function(){return CUI.Events.trigger({type:"viewport-resize"})},CUI.Events.listen({type:"resize",node:window,call:function(n,A){CUI.browser.ie?CUI.scheduleCallback({ms:500,call:b}):b()}}),CUI.Events.listen({type:"drop",node:document.documentElement,call:function(n){return n.preventDefault()}}),CUI.Events.listen({type:"keyup",node:window,capture:!0,call:(L=this,function(n){"C+U+I"===n.getKeyboard()&&CUI.toaster({text:"CUI!"}),CUI.defaults.debug&&("Alt+Shift+U"===n.getKeyboard()&&L.__toggleUIElements(),"Control+Shift+U"===n.getKeyboard()&&L.__toggleUIElements(!0))})}),CUI.Events.listen({type:"keydown",node:window,call:function(n){var b,A,L,R,D;if("c+"===n.getKeyboard()&&CUI.toaster({text:"CUI!"}),8===n.keyCode()){for(b=0,A=(R=CUI.dom.elementsUntil(n.getTarget(),null,document.documentElement)).length;b=1}},timeout:{mandatory:!0,default:0,check:function(n){return n>=-1}},call:{mandatory:!0,check:function(n){return n instanceof Function}}}),b=B.chunk_size,E=B.timeout,CUI.util.assert(this!==CUI,"CUI.chunkWork","Cannot call CUI.chunkWork with 'this' not set to the caller."),L=0,R=B.items.length,X=this,D=function(){var n,$,V;$=L+1+" - "+Math.min(R,L+b)+" / "+R,A.notify({progress:$,idx:L,len:R,chunk_size:b}),n=function(){L+b>=R?A.resolve():(L+=b,-1===E?D():CUI.setTimeout({ms:E,call:D}))},!1!==(V=B.call.call(X,B.items.slice(L,L+B.chunk_size),L,R))?CUI.util.isPromise(V)?V.fail(A.reject).done(n):n():A.reject()},A=new CUI.Deferred,CUI.setTimeout({ms:Math.min(0,E),call:function(){return R>0?D():A.resolve()}}),A.promise()},CUI.chunkWorkOLD=function(n,b,A){var L,R,D;return null==b&&(b=10),null==A&&(A=0),L=new CUI.Deferred,D=0,R=function(){var B;for(B=0;D0&&this.__callTimeoutChangeCallbacks(),this.__startTimeout(B)},CUI.__scheduledCallbacks=[],CUI.scheduleCallback=function(n){var b,A,L,R,D,B;return R=CUI.Element.readOpts(n,"CUI.scheduleCallback",{call:{mandatory:!0,check:Function},ms:{default:0,check:function(n){return CUI.util.isInteger(n)&&n>=0}},track:{default:!1,check:Boolean}}),(L=CUI.util.idxInArray(R.call,this.__scheduledCallbacks,(function(n){return n.call===R.call})))>-1&&CUI.isTimeoutRunning(this.__scheduledCallbacks[L].timeoutID)&&(L=-1),-1!==L?(CUI.resetTimeout(this.__scheduledCallbacks[L].timeoutID),this.__scheduledCallbacks[L].promise):(L=this.__scheduledCallbacks.length,A=new CUI.Deferred,D=CUI.setTimeout({ms:R.ms,track:R.track,call:function(){return R.call(),A.resolve()}}),b=this.__scheduledCallbacks[L]={call:R.call,timeoutID:D,promise:A.promise()},A.done((B=this,function(){return CUI.util.removeFromArray(R.call,B.__scheduledCallbacks,(function(n){return n.call===R.call}))})),b.promise)},CUI.scheduleCallbackCancel=function(n){var b,A;return A=CUI.Element.readOpts(n,"CUI.scheduleCallbackCancel",{call:{mandatory:!0,check:Function}}),(b=CUI.util.idxInArray(A.call,this.__scheduledCallbacks,(function(n){return n.call===A.call})))>-1&&!CUI.isTimeoutRunning(this.__scheduledCallbacks[b].timeoutID)&&(CUI.clearTimeout(this.__scheduledCallbacks[b].timeoutID),this.__scheduledCallbacks.splice(b,1),!0)},CUI.utf8ArrayBufferToString=function(n){var b,A,L,R,D,B,E;for(E=[],B=(b=new Uint8Array(n)).length,D=0;D>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:E.push(String.fromCharCode(A));break;case 12:case 13:L=b[D++],E.push(String.fromCharCode((31&A)<<6|63&L));break;case 14:L=b[D++],R=b[D++],E.push(String.fromCharCode((15&A)<<12|(63&L)<<6|63&R))}return E.join("")},CUI.__startTimeout=function(n){var b;return b=window.setTimeout(n.call,n.ms),n.id||(n.id=b),n.real_id=b,n.id},CUI.countTimeouts=function(){var n,b,A,L;for(L=0,n=0,b=(A=this.__timeouts).length;n0&&$.push(","),A=R=0,B=(X=V.split(":")).length;R0&&$.push(":"),$.push(encodeURIComponent(K));return $.join("")},CUI.decodeURIComponentNicely=function(n){return decodeURIComponent((n||"").replace(/\+/g," "))},CUI.decodeUrlData=function(n,b,A,L,R){var D,B,E,X,$,V,K,Q,tt;for(null==b&&(b=null),null==A&&(A="&"),null==L&&(L="="),null==R&&(R=!1),V={},D=b?CUI.util.isFunction(b)?b:function(n){return CUI.util.stringMapReplace(n+"",b)}:function(n){return decodeURIComponent(n)},B=0,X=(Q=n.split(A)).length;B-1?(E=D(($=K.split(L))[0]),tt=D($[1])):(E=D(K),tt=""),R?(V[E]||(V[E]=[]),V[E].push(tt)):V[E]=tt);return V},CUI.decodeUrlDataArray=function(n,b,A,L){return null==b&&(b=null),null==A&&(A="&"),null==L&&(L="="),this.decodeUrlData(n,b,A,L,!0)},CUI.mergeMap=function(n,b){var A,L;for(A in b)L=b[A],n.hasOwnProperty(A)?CUI.util.isPlainObject(n[A])&&CUI.util.isPlainObject(L)&&CUI.util.mergeMap(n[A],L):n[A]=L;return n},CUI.revertMap=function(n){var b,A;for(b in A={},n)A[n[b]]=b;return A},CUI.stringMapReplace=function(n,b){var A,L;for(A in L=[],b)CUI.util.isEmpty(A)||L.push(A.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));return L.length>0?n.replace(new RegExp(L.join("|"),"g"),(function(n){return b[n]})):n},CUI.isFunction=function(n){return n&&"function"==typeof n},CUI.isPlainObject=function(n){var b;return n&&"object"==typeof n&&(null!=(b=n.constructor)?b.prototype.hasOwnProperty("isPrototypeOf"):void 0)},CUI.isEmptyObject=function(n){var b;for(b in n)return!1;return!0},CUI.isMap=function(n){return this.isPlainObject(n)},CUI.isArray=function(n){return Array.isArray(n)},CUI.inArray=function(n,b){return b.indexOf(n)},CUI.isString=function(n){return"string"==typeof n},CUI.downloadData=function(n,b){var A,L;return A=new Blob([n],{type:"octet/stream"}),window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(A,b):(L=window.URL.createObjectURL(A),this.__downloadDataElement.href=L,this.__downloadDataElement.download=b,this.__downloadDataElement.click(),window.URL.revokeObjectURL(L))},CUI.urlRegex=new RegExp("^(?:(?:(sftp|ftp|ftps|https|http))://|)(?:(\\S+?)(?::(\\S*))?@)?((?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:[a-z0-9\\u00a1-\\uffff](?:|[a-z\\u00a1-\\uffff0-9-]*[a-z0-9\\u00a1-\\uffff])\\.)*(?:[a-z\\u00a1-\\uffff]{2,})|(?:[a-z0-9\\u00a1-\\uffff][a-z0-9-\\u00a1-\\uffff]*[a-z0-9\\u00a1-\\uffff])))|)(?::(\\d{2,5}))?(?:([/?#]\\S*))?$","i"),CUI.evalCode=function(n){var b;return(b=document.createElement("script")).text=n,document.head.appendChild(b).parentNode.removeChild(b)},CUI.appendToUrl=function(n,b){var A,L;for(A in b)void 0!==(L=b[A])&&(n.match(/\?/)?n+="&":n+="?",n+=encodeURIComponent(A)+"="+encodeURIComponent(L));return n},CUI.parseLocation=function(n){var b,A,L,R,D;if(!CUI.util.isFunction(null!=n?n.match:void 0)||0===n.length)return null;try{L={protocol:(null!=(D=(R=new URL(n)).protocol)?D.replaceAll(":",""):void 0)||"",user:R.username,password:R.password,hostname:R.hostname,port:R.port,path:R.pathname,origin:"",search:R.search,hash:R.hash,href:R.href}}catch(b){if(!(A=n.match(this.urlRegex)))return null;L={protocol:A[1]||"",user:A[2]||"",password:A[3]||"",hostname:A[4]||"",port:A[5]||"",path:A[6]||"",origin:""}}return L.hostname?(L.protocol||(L.protocol="http"),L.origin=L.protocol+"://"+L.hostname,L.port&&(L.origin+=":"+L.port),L.url=L.protocol+"://",L.user&&(L.url=L.url+L.user+":"+L.password+"@"),L.url=L.url+L.hostname,L.port&&(L.url=L.url+":"+L.port)):L.url="",L.path.length>0?(b=L.path.match(/(.*?)(|\?.*?)(|\#.*)$/),L.pathname=b[1],L.search||(L.search=b[2]),"?"===L.search&&(L.search=""),L.fragment=b[3]):(L.search="",L.pathname="",L.fragment=""),L.href||(L.href=L.origin+L.path),L.hash||(L.hash=L.fragment),L.login&&(L.auth=btoa(L.user+":"+L.password)),L.url=L.url+L.path,L},CUI.escapeAttribute=function(n){return CUI.util.isNull(n)||!CUI.util.isString(n)?"":n=n.replace(/"/g,""").replace(/\'/g,"'")},CUI.loadScript=function(n){var b,A;return b=new CUI.Deferred,A=CUI.dom.element("script",{charset:"utf-8",src:n}),CUI.Events.listen({type:"load",node:A,instance:A,call:function(n){b.resolve(n)}}),CUI.Events.listen({type:"error",node:A,instance:A,call:function(n){document.head.removeChild(A),b.reject(n)}}),b.always((function(){return CUI.Events.ignore({instance:A})})),document.head.appendChild(A),b.promise()},CUI.browser=((n={opera:!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,firefox:"undefined"!=typeof InstallTrigger,safari:Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,ie:!!document.documentMode,chrome:!!window.chrome&&!!window.chrome.webstore}).edge=!n.ie&&!!window.StyleMedia,n.blink=(n.chrome||n.opera)&&!!window.CSS,n),CUI.__toggleUIElements=function(n){var b,A,L,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt;if(null==n&&(n=!1),(null!=(V=this.__uiHighlightDivs)?V.length:void 0)>0){for(R=0,B=(K=this.__uiHighlightDivs).length;RL.width?E.x:E.x+E.width),CUI.dom.setStyle(n,{top:B,left:R}),CUI.dom.setStyle(n,{zIndex:5},""),CUI.dom.hideElement(n);CUI.dom.remove(n)},D=0,E=st.length;D div"))?Q[0]:void 0)!==(null!=(tt=CUI.dom.parents(nt,"body > div"))?tt[0]:void 0))||(b=CUI.dom.div(),this.__uiHighlightDivs.push(b),A(b,it));for($=0,X=(ot=this.__uiHighlightDivs).length;$\x3c!-- /CUI.CUI --\x3e"),L.__downloadDataElement=b[1],L.dom.append(document.body,b)})),window.addEventListener?window.addEventListener("load",(function(){return L.start()})):alert("Your browser is not supported. Please update to a current version of Google Chrome, Mozilla Firefox or Internet Explorer."),n.exports=L},674:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DOMElement=function(n){function DOMElement(){return DOMElement.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DOMElement,n),DOMElement.prototype.initOpts=function(){return DOMElement.__super__.initOpts.call(this),this.addOpts({class:{default:"",check:String},id:{check:String},ui:{check:String},attr:{check:"PlainObject"}})},DOMElement.prototype.registerTemplate=function(n,b){return null==b&&(b=!0),L.util.assert(n instanceof L.Template,L.util.getObjectClass(this)+".registerDOMElement","template must be instance of Template but is "+L.util.getObjectClass(n)+".",{template:n}),this.__template&&(console.warn(L.util.getObjectClass(this)+".registerDO MElement","Already called before, destroying existing template",{template:this.__template}),this.__template.destroy()),this.__template=n,this.registerDOMElement(this.__template.DOM,b)},DOMElement.prototype.getDOMElementClasses=function(){return"cui-"+L.util.toDash(this.__cls)},DOMElement.prototype.registerDOMElement=function(n,b){return this.DOM=n,null==b&&(b=!0),b&&L.dom.addClass(this.DOM,this.getDOMElementClasses()),this._attr&&L.dom.setAttributeMap(this.DOM,this._attr),this._id&&L.dom.setAttribute(this.DOM,"id",this._id),this._class&&L.dom.addClass(this.DOM,this._class),this._ui&&L.dom.setAttribute(this.DOM,"ui",this._ui),L.dom.data(this.DOM,"element",this),this},DOMElement.prototype.getElementForLayer=function(){return this.DOM},DOMElement.prototype.unregisterDOMElement=function(){return L.dom.removeClass(this.DOM,this.getDOMElementClasses()),L.dom.removeAttribute(this.DOM,"id"),this._class&&L.dom.removeClass(this.DOM,this._class),L.dom.removeData(this.DOM,"element"),delete this.DOM,this},DOMElement.prototype.__assertDOMElement=function(n){return L.util.assert(this.DOM,this.__cls+"."+n,'registerDOMElement needs to be called before "'+n+'" is supported.')},DOMElement.prototype.__assertTemplateElement=function(n){return L.util.assert(this.__template,this.__cls+"."+n,'registerTemplateElement needs to be called before "'+n+'" is supported.')},DOMElement.prototype.addClass=function(n,b){return L.util.assert(1===arguments.length||2===arguments.length,"addClass","Only 'className' and 'key' parameters are allowed."),b?(this.__assertTemplateElement("addClass"),this.__template.addClass.call(this.__template,n,b,this)):(this.__assertDOMElement("addClass"),L.dom.addClass(this.DOM,n))},DOMElement.prototype.setAria=function(n,b){return this.__assertDOMElement("setAria"),L.dom.setAria(this.DOM,n,b)},DOMElement.prototype.removeClass=function(n,b){return L.util.assert(1===arguments.length||2===arguments.length,"removeClass","Only 'className' and 'key' parameters are allowed."),b?(this.__assertTemplateElement("removeClass"),this.__template.removeClass.call(this.__template,n,b,this)):(this.__assertDOMElement("removeClass"),L.dom.removeClass(this.DOM,n))},DOMElement.prototype.hide=function(n){return L.util.isEmpty(n)?(this.__assertDOMElement("hide"),L.dom.hideElement(this.DOM)):(this.__assertTemplateElement("hide"),this.__template.hide.call(this.__template,n))},DOMElement.prototype.show=function(n){return L.util.isEmpty(n)?(this.__assertDOMElement("show"),L.dom.showElement(this.DOM)):(this.__assertTemplateElement("show"),this.__template.show.call(this.__template,n))},DOMElement.prototype.showWaitBlock=function(){return this.__assertDOMElement("showWaitBlock"),this.__wb=new L.WaitBlock({element:this.DOM}).show(),this},DOMElement.prototype.hideWaitBlock=function(){return this.__wb.destroy(),delete this.__wb,this},DOMElement.prototype.hasClass=function(n){return L.util.assert(1===arguments.length,"CUI.dom.hasClass","Only one parameter allowed."),this.__assertDOMElement("hasClass"),L.dom.hasClass(this.DOM,n)},DOMElement.prototype.isDestroyed=function(n){var b;return null!=(b=this.__template)?b.isDestroyed.call(this.__template,n):void 0},DOMElement.prototype.empty=function(n){return this.__assertTemplateElement("empty"),this.__template.empty.call(this.__template,n)},DOMElement.prototype.replace=function(n,b){return this.__assertTemplateElement("replace"),this.__template.replace.call(this.__template,n,b,this)},DOMElement.prototype.append=function(n,b){return this.__assertTemplateElement("append"),this.__template.append.call(this.__template,n,b,this)},DOMElement.prototype.prepend=function(n,b){return this.__assertTemplateElement("prepend"),this.__template.prepend.call(this.__template,n,b,this)},DOMElement.prototype.text=function(n,b){return this.__assertTemplateElement("text"),this.__template.text.call(this.__template,n,b,this)},DOMElement.prototype.get=function(n){return this.__assertTemplateElement("get"),this.__template.get.call(this.__template,n,this)},DOMElement.prototype.getFlexHandle=function(n,b){return this.__assertTemplateElement("getFlexHandle"),this.__template.getFlexHandle.call(this.__template,n,b)},DOMElement.prototype.destroy=function(){var n;return DOMElement.__super__.destroy.call(this),this.__template?null!=(n=this.__template)&&n.destroy():this.DOM&&L.dom.remove(this.DOM),this},DOMElement}(L.Element)},5533:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.CheckValueError=function(){function CheckValueError(){return CheckValueError.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CheckValueError,window.Error),CheckValueError}()},9248:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.Template.loadTemplateText(A(5936)),L.DataField=function(n){function DataField(n){var b,A;DataField.__super__.constructor.call(this,n),L.util.assertImplements(this,["render"]),this._name&&L.util.assertImplements(this,["getDefaultValue"]),this.__checkChangedValue=void 0,this.initTemplate(),this.addClass("cui-data-field"),this.maximizeAddClasses(),L.Events.listen({type:"data-changed",node:this.DOM,call:(A=this,function(n,b){A.onDataChanged(n,b)})}),this.getName()&&this.DOM.setAttribute("cui-data-field-name",this.getName()),this.init(),this._data&&!L.util.isFunction(this._data)&&this.setData(this._data),this.__initDisabled(),this._hidden&&this.hide(),this._tooltip&&(this._tooltip.text||this._tooltip.content)&&((b=L.util.copyObject(this._tooltip)).element=this.DOM,this.__tooltip=new L.Tooltip(b)),this.__opacity=1,"function"==typeof this._onInit&&this._onInit(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataField,n),DataField.changed_marker_css_class="cui-data-field-changed-marker",DataField.defaults={undo_and_changed_support:!1},DataField.prototype.onDataChanged=function(n,b){if(null!=b?b.element:void 0)return"function"==typeof this._onDataChanged?this._onDataChanged(this.getData(),b.element,n,b):void 0;console.warn(L.util.getObjectClass(this)+"[DataField].listen[data-changed]: received event with element not set.",n,b,this)},DataField.prototype.initOpts=function(){return DataField.__super__.initOpts.call(this),this.addOpts({name:this.getNameOpt(),maximize:{check:Boolean},maximize_horizontal:{check:Boolean,default:!1},maximize_vertical:{check:Boolean,default:!1},padded:{check:Boolean,default:!1},data:{check:function(n){return L.util.isFunction(null!=n?n.hasOwnProperty:void 0)||L.util.isFunction(n)}},data_not_for_others:{default:!1,check:Boolean},disabled:{default:!1,check:function(n){return L.util.isBoolean(n)||L.util.isFunction(n)}},disabled_depends_on_data:{check:Function},tooltip:{check:"PlainObject"},hidden:{check:Boolean},form:{},undo_and_changed_support:{check:Boolean},undo_support:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},mark_changed:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},check_changed:{default:L.DataField.defaults.undo_and_changed_support,check:Boolean},onDataChanged:{check:Function},onDataInit:{check:Function},onInit:{check:Function},onRender:{check:Function},render_as_block:{check:Boolean}})},DataField.prototype.readOpts=function(){var n,b,A,R;if(this.opts.hasOwnProperty("undo_and_changed_support"))for(n=0,A=(R=["undo_support","check_changed","mark_changed"]).length;n")+"]}"},DataField.prototype.reload=function(){return this.remove(),this.render(),this.displayValue(),"function"==typeof this._onRender&&this._onRender(this),this},DataField.prototype.remove=function(){return this.callOnOthers("remove"),this.isDestroyed()||this.empty(),this.__isRendered=!1},DataField.prototype.getNameOpt=function(){return{check:String}},DataField.prototype.registerLabel=function(n){var b;(b=this.getUniqueIdForLabel())&&n.setAttribute("for",b)},DataField.prototype.getLabel=function(){return this._label},DataField.prototype.getMaximizeHorizontal=function(){return this.__maximize_horizontal},DataField.prototype.setForm=function(n){return L.util.assertImplements(n,["getFieldsByName","getFieldByIdx","getData","getFields"]),this.__form=n,this.getForm().getFormPath?(this.__form.getMaximizeHorizontal()&&!1!==this.getOpt("maximize_horizontal")&&this.addClass("cui-maximize-horizontal"),this):this},DataField.prototype.getFormPath=function(n,b,A){var R;return null==n&&(n=!1),null==b&&(b=[]),null==A&&(A=0),L.util.assert(A<100,"CUI.DataField.getPath","Recursion detected."),(null!=(R=this.getForm())?R.getFormPath:void 0)&&this.getForm().getFormPath(!0,b,A+1),n&&b.push(this),b},DataField.prototype.getForm=function(){return this.__form},DataField.prototype.getOtherField=function(n){var b,A;return null!=(b=this.__form)&&null!=(A=b.getFieldsByName(n))?A[0]:void 0},DataField.prototype.getRootForm=function(){return this.__form?this.__form.getRootForm():this instanceof L.Form?this:null},DataField.prototype.__initDisabled=function(){this._disabled&&(!0===this._disabled||this._disabled.call(this,this))&&this.disable()},DataField.prototype.enable=function(){return this.removeClass("cui-data-field-disabled"),this.callOnOthers("enable"),this},DataField.prototype.disable=function(){return this.addClass("cui-data-field-disabled"),this.callOnOthers("disable"),this},DataField.prototype.isDisabled=function(){return this.hasClass("cui-data-field-disabled")},DataField.prototype.isHidden=function(){return this.hasClass("cui-data-field-hidden")},DataField.prototype.isShown=function(){return!this.isHidden()},DataField.prototype.updateData=function(n){return L.util.isFunction(this._data)?this.__data=this._data.call(this,n,this):this.__data=n,this.displayValue()},DataField.prototype.unsetData=function(){delete this.__data,this.setDataOnOthers()&&this.callOnOthers("unsetData")},DataField.prototype.setData=function(n,b){var A;if(null==b&&(b=!0),!this.__data||!this._data||L.util.isFunction(this._data))return L.util.assert(!this.__data,this+".setData","data is already set.",{opts:this.opts,data:this.__data}),L.util.isFunction(this._data)?this.__data=this._data.call(this,n,this):this.__data=n,L.util.assert(L.util.isPlainObject(this.__data)||(null!=(A=this.__data)&&"function"==typeof A.hasOwnProperty?A.hasOwnProperty(this.getName()):void 0),this+".setData",'data needs to be PlainObject or have a property "'+this.getName()+'".',{data:n,opts:this.opts}),this.setDataOnOthers()&&this.callOnOthers("setData",this.__data,b),b&&this.initData(),this},DataField.prototype.setDataOnOthers=function(){return!this._data_not_for_others},DataField.prototype.hide=function(n){return null==n&&(n=!1),this.addClass("cui-data-field-hidden"),this.callOnOthers("hide"),n&&L.Events.trigger({type:"form-check-row-visibility",node:this.DOM,info:{element:this}}),this},DataField.prototype.show=function(n){return null==n&&(n=!1),this.removeClass("cui-data-field-hidden"),this.callOnOthers("show"),n&&L.Events.trigger({type:"form-check-row-visibility",node:this.DOM,info:{element:this}}),this},DataField.prototype.isRendered=function(){return this.__isRendered},DataField.prototype.render=function(n){var b,A;return b=null==(A=(null!=n?n:{}).callOnRender)||A,L.util.assert(!this.__isRendered,this.__cls+".render","Cannot be called when already rendered.",{opts:this.opts,dataField:this}),this.__isRendered=!0,this.callOnOthers("render"),this.isDisabled()&&this.disable(),this.isHidden()&&this.hide(!0),b&&"function"==typeof this._onRender&&this._onRender(this),this},DataField.prototype.displayValue=function(){return L.util.assert(!this.isDestroyed(),this.__cls+".displayValue","DataField already destroyed, cannot display value.",{data_field:this}),L.util.assert(this.__isRendered,this.__cls+".displayValue","not rendered yet, cannot display.",{opts:this.opts,data:this.__data}),this.checkChanged(),this.callOnOthers("displayValue")},DataField.prototype.start=function(){return L.util.assert(!this.__isRendered,this.__cls+".start","Cannot be called when already rendered.",{opts:this.opts,dataField:this}),this.__initDisabled(),this.render(),this.displayValue(),this},DataField.prototype.getAllDataFields=function(n){return null==n&&(n=!1),this.getDataFields(!0)},DataField.prototype.getDataFields=function(n,b){return null==n&&(n=!1),null==b&&(b=[]),(this.isDataField()||n)&&b.push(this),this.callOnOthers("getDataFields",n,b),b},DataField.prototype.renderAsBlock=function(){return!!this._render_as_block},DataField.prototype.isDataField=function(){return this.hasData()},DataField.prototype.callOnOthers=function(){var n,b,A,R,B,E;for(A=arguments[0],n=2<=arguments.length?D.call(arguments,1):[],R=0,B=(E=this.getFields?this.getFields(A).slice(0):[]).length;R-1||(D[B]=X):E=X;for(B in A)X=A[B],D.hasOwnProperty(B)||(D[B]=X);return L.util.assert(L.util.isFunction(E),"CUI.DataField.new",'type is unknown: "'+E+'".',{field:n}),R=new E(D),L.util.assert(R instanceof L.DataField,"CUI.DataField.new","field.type needs to be of class DataField, but is "+L.util.getObjectClass(R)+".",{field:n}),R},DataField}(L.DOMElement),L.Events.registerEvent({type:"data-changed",bubble:!0})},580:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataFieldInput=function(n){function DataFieldInput(n){DataFieldInput.__super__.constructor.call(this,n),L.dom.setAttributeMap(this.DOM,this._attr),this.addClass("cui-data-field-input")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataFieldInput,n),DataFieldInput.prototype.initOpts=function(){return DataFieldInput.__super__.initOpts.call(this),this.addOpts({group:{check:String},attr:{default:{},check:"PlainObject"}})},DataFieldInput.prototype.getGroup=function(){return this._group},DataFieldInput.prototype.isResizable=function(){return!0},DataFieldInput}(L.DataField)},5412:(n,b,A)=>{var L=A(7288),R=[].indexOf||function(n){for(var b=0,A=this.length;b=0&&(A.func.apply(this,b),"done"===(B=A.type)||"always"===B||"fail"===B)?this.__callbacks.splice(L,1):L++;return this.__runningCallbacks=!1,this},Deferred.prototype.__register=function(n,b){if(L.util.assert(L.util.isFunction(b),"Deferred."+n+": Callback needs to be Function.",{callback:b}),!("rejected"===this.__state&&"done"===n||"resolved"===this.__state&&"fail"===n)){if(this.__callbacks.push({type:n,func:b}),"pending"!==this.__state&&!this.__runningCallbacks)switch(this.__state){case"resolved":this.__callback(["done","always"],this.__finished_args);break;case"rejected":this.__callback(["fail","always"],this.__finished_args)}return this}},Deferred.prototype.done=function(n){return this.__register("done",n),this},Deferred.prototype.fail=function(n){return this.__register("fail",n),this},Deferred.prototype.always=function(n){return this.__register("always",n),this},Deferred.prototype.progress=function(n){return this.__register("progress",n),this},Deferred.prototype.__notify=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.notify","Cannot notify state "+this.__state+"."),this.__callback(["progress"],arguments),this},Deferred.prototype.__resolve=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.resolve","Cannot resolve state "+this.__state+"."),this.__finished_args=arguments,this.__state="resolved",this.__callback(["done","always"],arguments),this},Deferred.prototype.__reject=function(){return L.util.assert("pending"===this.__state,"CUI.Deferred.reject","Cannot reject state "+this.__state+"."),this.__finished_args=arguments,this.__state="rejected",this.__callback(["fail","always"],arguments),this},Deferred.prototype.state=function(){return this.__state},Deferred.prototype.promise=function(){return new L.Promise(this)},Deferred.uniqueId=0,Deferred}()},1852:(n,b,A)=>{var L=A(7288);L.Promise=function(){function Promise(n){this.__deferred=n,L.util.assert(this.__deferred instanceof L.Deferred,"new Promise","parameter needs to be instanceof CUI.Deferred",{parameter:this.__deferred})}return Promise.prototype.done=function(){return this.__deferred.done.apply(this.__deferred,arguments),this},Promise.prototype.fail=function(){return this.__deferred.fail.apply(this.__deferred,arguments),this},Promise.prototype.always=function(){return this.__deferred.always.apply(this.__deferred,arguments),this},Promise.prototype.progress=function(){return this.__deferred.progress.apply(this.__deferred,arguments),this},Promise.prototype.state=function(){return this.__deferred.state.apply(this.__deferred,arguments)},Promise.prototype.getUniqueId=function(){return this.__deferred.getUniqueId()},Promise}()},7199:function(n,b,A){var L=A(7288);L.decide=function(n){var b;return b=new L.Deferred,L.util.isPromise(n)?(n.done(b.resolve),n.fail(b.reject)):!1===n?b.reject(!1):b.resolve(n),b.promise()}},1007:function(n,b,A){var L,R=A(7288);R.whenAllReject=(L=this,function(){var n,b;return b=new R.Deferred,(n=[!1]).push.apply(n,arguments),R.whenAll.apply(L,n).done((function(){var n,A,L;for(n=0,A=arguments.length;nQ.width&&(E.scrollLeft,0<(tt=D=(A=K.clientX())-Q.left)&&ttQ.height&&(E.scrollTop,0<(nt=D=(R=K.clientY())-Q.top)&&nt{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0}},selector:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}}})},Draggable.prototype.readOpts=function(){return Draggable.__super__.readOpts.call(this),this.__autoRepeatTimeout=null,this.supportTouch()?this.__event_types={start:["mousedown","touchstart"],end:["mouseup","touchend"],move:["mousemove","touchmove"]}:this.__event_types={start:["mousedown"],end:["mouseup"],move:["mousemove"]},this},Draggable.prototype.getClass=function(){return this._selector?Draggable.__super__.getClass.call(this):"cui-draggable "+Draggable.__super__.getClass.call(this)},Draggable.prototype.supportTouch=function(){return!!this._support_touch},Draggable.prototype.__killTimeout=function(){return this.__autoRepeatTimeout&&(L.clearTimeout(this.__autoRepeatTimeout),this.__autoRepeatTimeout=null),this},Draggable.prototype.__cleanup=function(){var n;this.__killTimeout(),this.__ref&&(L.Events.ignore({instance:this.__ref}),this.__ref=null),(null!=(n=L.globalDrag)?n.instance:void 0)===this&&(L.globalDrag=null)},Draggable.prototype.destroy=function(){var n;return Draggable.__super__.destroy.call(this),L.dom.remove(null!=(n=L.globalDrag)?n.helperNode:void 0),this.__cleanup(),this},Draggable.prototype.init=function(){return L.util.assert(!this._helper_contain_element||L.dom.closest(this._element,this._helper_contain_element),"new CUI.sDraggable","opts.helper_contain_element needs to be parent of opts.element",{opts:this.opts}),L.Events.listen({type:this.__event_types.start,node:this.element,instance:this,selector:this._selector,call:(n=this,function(b){var A,R,D,B,E;b.getButton()>0&&"mousedown"===b.getType()||L.globalDrag||(D=L.util.elementGetPosition(L.util.getCoordinatesFromEvent(b),b.getTarget()),(R=L.dom.getDimensions(b.getTarget())).clientWidthScaled>0&&D.left-R.scrollLeftScaled>R.clientWidthScaled?console.warn("Mousedown on a vertical scrollbar, not starting drag."):R.clientHeightScaled>0&&D.top-R.scrollTopScaled>R.clientHeightScaled?console.warn("Mousedown on a horizontal scrollbar, not starting drag."):(B=b.getCurrentTarget(),E=L.dom.getDimensions(B),L.dom.isInDOM(B)&&0!==E.clientWidth&&0!==E.clientHeight&&(L.dom.closest(b.getTarget(),"input,textarea,select")||(A=B,n.init_drag(b,A)))))})});var n},Draggable.prototype.init_drag=function(n,b){var A,R,D,B,E,X,$,V,K;if(b&&(L.globalDrag="function"==typeof this._create?this._create(n,b):void 0,!1!==L.globalDrag)){for(E in(L.util.isNull(L.globalDrag)||!0===L.globalDrag)&&(L.globalDrag={}),L.util.assert(L.util.isPlainObject(L.globalDrag),"CUI.Draggable.init_drag","returned data must be a plain object",{data:L.globalDrag}),$=L.util.getCoordinatesFromEvent(n),V=L.util.elementGetPosition($,b),B={$source:b,startEvent:n,startCoordinates:$,instance:this,startScroll:{top:b.scrollTop,left:b.scrollLeft},start:V,threshold:this._threshold})K=B[E],L.globalDrag[E]=K;var Q;n.stopPropagation(),this.before_drag(n,b),this.__ref=new L.Dummy,A=0,X=null,Q=this,R=function(){var n;return n=X.getPointTarget()||X.getTarget(),L.Events.trigger({type:"dragover-scroll",node:n,count:A,originalEvent:X}),A+=1,Q.__killTimeout(),Q.__autoRepeatTimeout=L.setTimeout({ms:100,track:!1,call:R})},L.Events.listen({node:document,type:this.__event_types.move,instance:this.__ref,call:function(n){return function(A){var D,B;if(L.globalDrag&&(A.preventDefault(),(b=A.getTarget())&&!L.globalDrag.ended)){switch(B={x:(D=L.util.getCoordinatesFromEvent(A)).pageX-L.globalDrag.startCoordinates.pageX,y:D.pageY-L.globalDrag.startCoordinates.pageY,eventPoint:D},n.get_axis()){case"x":B.y=0;break;case"y":B.x=0}B.bare_x=B.x,B.bare_y=B.y,B.x+=L.globalDrag.$source.scrollLeft-L.globalDrag.startScroll.left,B.y+=L.globalDrag.$source.scrollTop-L.globalDrag.startScroll.top,(Math.abs(B.x)>=L.globalDrag.threshold||Math.abs(B.y)>=L.globalDrag.threshold||L.globalDrag.dragStarted)&&(L.globalDrag.dragDiff=B,L.globalDrag.dragStarted||(L.globalDrag.startEvent.preventDefault(),n.__startDrag(A,b,B),n._get_cursor?document.body.setAttribute("data-cursor",n._get_cursor(L.globalDrag)):document.body.setAttribute("data-cursor",n.getCursor())),X=A,R(),n.do_drag(A,b,B),"function"==typeof n._dragging&&n._dragging(A,L.globalDrag,B))}}}(this)}),D=function(n){return function(b,A){var R,D,B;null==A&&(A=!1),D=L.globalDrag.$source,B=L.dom.parents(D),L.globalDrag.ended=!0,document.body.removeAttribute("data-cursor"),A?(L.globalDrag.stopped=!0,n.stop_drag(b),"function"==typeof n._dragstop&&n._dragstop(b,L.globalDrag,n)):(n.end_drag(b),"function"==typeof n._dragend&&n._dragend(b,L.globalDrag,n)),n.isDestroyed()||(R=L.globalDrag.noClickKill,n.__cleanup(),R||function(){var n,b,A,R,E;for(E=L.dom.parents(D),b=n=0,A=B.length;n=0||"max"===V&&R<=0||("y"===Q&&D.call(n.fix,"n")>=0?n.h-=R:"x"===Q&&D.call(n.fix,"w")>=0?n.w-=R:(n[Q]-=R,"h"===Q&&D.call(n.fix,"s")>=0&&(n.y+=R),"w"===Q&&D.call(n.fix,"e")>=0&&(n.x+=R),"x"===Q&&D.call(n.fix,"e")>=0&&(n.w+=R),"y"===Q&&D.call(n.fix,"s")>=0&&(n.h+=R))));return n},Draggable}(L.DragDropSelect)},3986:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DragoverScrollEvent=function(n){function DragoverScrollEvent(){return DragoverScrollEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DragoverScrollEvent,n),DragoverScrollEvent.prototype.initOpts=function(){return DragoverScrollEvent.__super__.initOpts.call(this),this.addOpts({count:{mandatory:!0,check:function(n){return L.util.isPosInt(n)}},originalEvent:{mandatory:!0,check:L.Event}})},DragoverScrollEvent.prototype.getCount=function(){return this._count},DragoverScrollEvent.prototype.getOriginalEvent=function(){return this._originalEvent},DragoverScrollEvent}(L.Event)},8952:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Dragscroll=function(n){function Dragscroll(){return Dragscroll.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Dragscroll,n),Dragscroll.prototype.initOpts=function(){return Dragscroll.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({scroll_element:{check:function(n){return L.util.isElement(n)}}})},Dragscroll.prototype.readOpts=function(){return Dragscroll.__super__.readOpts.call(this),this._scroll_element?this.__scroll_element=this._scroll_element:this.__scroll_element=this._element},Dragscroll.prototype.supportTouch=function(){return void 0===this._support_touch||Dragscroll.__super__.supportTouch.call(this)},Dragscroll.prototype.start_drag=function(){return this.__scroll={top:this.__scroll_element.scrollTop,left:this.__scroll_element.scrollLeft}},Dragscroll.prototype.do_drag=function(n,b,A){var L,R;return R=this.__scroll.top-A.bare_y,L=this.__scroll.left-A.bare_x,this.__scroll_element.scrollTop=R,this.__scroll_element.scrollLeft=L},Dragscroll}(L.Draggable)},5462:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Droppable=function(n){function Droppable(){return Droppable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Droppable,n),Droppable.cls="droppable",Droppable.prototype.initOpts=function(){return Droppable.__super__.initOpts.call(this),this.addOpts({accept:{check:Function},drop:{default:function(n,b){var A;return A=b.dropTargetPos||"on",L.alert({markdown:!0,text:"You dropped me **"+A+"**: "+L.dom.getAttribute(b.dropTarget,"class")})},check:Function},hoverClass:{default:"cui-droppable",check:String},dropHelper:{mandatory:!0,default:!1,check:Boolean},targetHelper:{mandatory:!0,default:!1,check:Boolean},selector:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}}})},Droppable.prototype.accept=function(n,b){return"function"==typeof this._accept?this._accept(n,b):void 0},Droppable.prototype.destroy=function(){return this.removeHelper(),Droppable.__super__.destroy.call(this)},Droppable.prototype.readOpts=function(){Droppable.__super__.readOpts.call(this),this._targetHelper&&L.util.assert(this._selector,"new CUI.Droppable","opts.targetHelper needs opts.selector to be set.",{opts:this.opts}),this._dropHelper&&(L.util.assert(!this._selector||this._targetHelper,"new CUI.Droppable","opts.dropHelper does only work without opts.selector or with opts.targetHelper and opts.selector. needs opts.selector to be set.",{opts:this.opts}),this.__dropHelper=L.dom.element("DIV",{class:"cui-droppable-drop-helper"}))},Droppable.prototype.removeHelper=function(){var n,b,A;if(this.resetMargin(),this.__selectedTarget&&(L.dom.removeClass(this.__selectedTarget,this._hoverClass),this.__selectedTarget=null),this.__dropHelper&&L.dom.remove(this.__dropHelper),this._targetHelper)for(n=0,b=(A=L.dom.findElements(this._element,this._selector)).length;nD.viewportCenterLeft||"y"===this.__axis&&R.pageY>D.viewportCenterTop?"after":"before",A(B=this.__selectedTarget,E)?(this.__dropTarget=B,this.__dropTargetPos=E,$="cui-droppable-target-helper-"+this.__axis+"--"+this.__dropTargetPos,this.__resetMargin===this.__selectedTarget&&this.__selectedTarget.__target_helper_class===$||(this.resetMargin(),this.__saveZoneDims=[L.dom.getDimensions(this.__selectedTarget)],this.__selectedTarget.__target_helper_class=$,L.dom.addClass(this.__selectedTarget,this.__selectedTarget.__target_helper_class),this.__saveZoneDims.push(L.dom.getDimensions(this.__selectedTarget)),this.__resetMargin=this.__selectedTarget)):this.removeHelper()},Droppable.prototype.init=function(){var n;return L.Events.listen({node:this.element,type:"cui-dragend",instance:this,call:(n=this,function(b,A){return n.removeHelper()})}),L.Events.listen({node:this.element,type:"cui-drop",instance:this,call:function(n){return function(b,A){n.__dropTarget&&(A.dropTarget=n.__dropTarget,n._targetHelper&&(A.dropTargetPos=n.__dropTargetPos),!1!==n.accept(b,A)&&(b.stopPropagation(),L.setTimeout({call:function(){return n._drop(b,A)}})))}}(this)}),L.Events.listen({node:this.element,type:["cui-dragover","cui-dragenter","cui-dragleave"],instance:this,call:function(n){return function(b,A){n.syncTargetHelper(b,A),b.stopPropagation()}}(this)})},Droppable}(L.DragDropSelect)},1051:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0&&(it-=tt,V=0)):(tt=(V=L.globalDrag.start.left)+(it=A.x)-this.element.scrollWidth)>0&&(it-=tt),A.y<=0?(nt=L.globalDrag.start.top+A.y,B=-A.y,(tt=-nt)>0&&(B-=tt,nt=0)):(tt=(nt=L.globalDrag.start.top)+(B=A.y)-this.element.scrollHeight)>0&&(B-=tt),E=0,K=($=this.get_lassoed_elements()).length;E{var L=A(7288),R={}.hasOwnProperty;L.Movable=function(n){function Movable(){return Movable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Movable,n),Movable.cls="movable",Movable.prototype.initOpts=function(){return Movable.__super__.initOpts.call(this),this.addOpts({limitRect:{default:{},check:function(n){return L.util.isPlainObject(n)||n instanceof Function}},onPositioned:{check:Function},onPosition:{check:Function},start_drag:{check:Function},do_drag:{check:Function}}),this.removeOpt("helper")},Movable.prototype.readOpts=function(){return Movable.__super__.readOpts.call(this),this._helper=null},Movable.prototype.getLimitRect=function(){return L.util.isFunction(this._limitRect)?this._limitRect():this._limitRect},Movable.prototype.setElementCss=function(n){var b;return L.util.assert(L.util.isPlainObject(n),L.util.getObjectClass(this),"opts.position must return a PlainObject containing any of x, y, w, h",{pos:n}),b={},L.util.isEmpty(n.x)||(b.left=n.x),L.util.isEmpty(n.y)||(b.top=n.y),L.util.isEmpty(n.w)||(b.marginBoxWidth=n.w),L.util.isEmpty(n.h)||(b.marginBoxHeight=n.h),L.dom.setDimensions(this.element,b),"function"==typeof this._onPositioned?this._onPositioned(n):void 0},Movable.prototype.init_drag=function(n,b){if(!L.dom.closest(n.getTarget(),".cui-resizable-handle"))return Movable.__super__.init_drag.call(this,n,b)},Movable.prototype.before_drag=function(){var n;return n=L.dom.getDimensions(this.element),this.start={x:n.left||0,y:n.top||0,w:n.marginBoxWidth,h:n.marginBoxHeight},this},Movable.prototype.start_drag=function(n,b,A){return this._start_drag&&this._start_drag(n,b,A,this),this},Movable.prototype.do_drag=function(n,b,A){var L,R;return this._do_drag?(this._do_drag(n,b,A,this),this):(L={x:A.x+this.start.x,y:A.y+this.start.y,w:this.start.w,h:this.start.h},this._onPosition?(R=this._onPosition(L.x,L.y,this.start,A),L.x=R[0],L.y=R[1]):this.limitRect(L,this.start),this.setElementCss(L),this)},Movable.prototype.limitRect=function(n,b,A){return null==b&&(b={}),null==A&&(A=this.getLimitRect()),L.Draggable.limitRect(n,A,b)},Movable}(L.Draggable)},9328:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Resizable=function(n){function Resizable(){var n,b;return this.getResizePos=(n=this.getResizePos,b=this,function(){return n.apply(b,arguments)}),Resizable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Resizable,n),Resizable.cls="resizable",Resizable.prototype.initOpts=function(){return Resizable.__super__.initOpts.call(this),this.removeOpt("selector")},Resizable.prototype.readOpts=function(){return Resizable.__super__.readOpts.call(this),this._selector=".cui-resizable-handle"},Resizable.prototype.init=function(){var n,b,A,R,D;for(Resizable.__super__.init.call(this),D=[],b=0,A=(R=["ne","nw","se","sw","s","n","e","w"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.Sortable=function(n){function Sortable(){return Sortable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Sortable,n),Sortable.cls="sortable",Sortable.prototype.initOpts=function(){return Sortable.__super__.initOpts.call(this),this.addOpts({allowSort:{mandatory:!0,default:function(n,b,A){return!0},check:Function},sorted:{mandatory:!0,default:function(n,b,A){return alert("You sorted item "+b+" to "+A+".")},check:Function}}),this.removeOpt("helper_contain_element")},Sortable.prototype.getSortTarget=function(n,b){var A;return(A=L.dom.elementsUntil(n,null,b)).length>1?A[A.length-2]:null},Sortable.prototype.getClass=function(){return this._selector?"cui-drag-drop-select":Sortable.__super__.getClass.call(this)},Sortable.prototype.readOpts=function(){return Sortable.__super__.readOpts.call(this),this._helper_contain_element=this._element},Sortable.prototype.get_child_number=function(n){var b,A,L,R;for(A=b=0,L=(R=this.element.children).length;bb&&(L.globalDrag.noClickKill=!0,L.dom.insertBefore(A,R)),L.dom.syncAnimatedClone(this.element),this},Sortable.prototype.start_drag=function(n,b,A){return L.globalDrag.sort_source=this.__findClosestSon(L.globalDrag.$source),L.globalDrag.sort_source.classList.add("cui-sortable-placeholder"),L.globalDrag.start_idx=this.get_child_number(L.globalDrag.sort_source),L.dom.addClass(this.element,"cui-sorting"),L.dom.initAnimatedClone(this.element)},Sortable.prototype.getCloneSourceForHelper=function(){return this.__findClosestSon(L.globalDrag.$source)},Sortable.prototype.__findClosestSon=function(n){var b;if((b=L.dom.parentsUntil(n,null,this.element))[b.length-1]===window)return null;switch(b.length){case 0:return null;case 1:return n;default:return b[b.length-2]}},Sortable.prototype.do_drag=function(n,b,A){var R,D,B;if(this.position_helper(n,b,A),B=this.__findClosestSon(b))return D=this.get_child_number(L.globalDrag.sort_source),R=this.get_child_number(B),this._allowSort(n,D,R)&&this.move_element(D,R),this},Sortable.prototype.init_drag=function(n,b){return Sortable.__super__.init_drag.call(this,n,this.getSortTarget(n.getTarget(),this._element))},Sortable.prototype.stop_drag=function(n){return Sortable.__super__.stop_drag.call(this,n),this.__end_drag(n,!0)},Sortable.prototype.end_drag=function(n){return Sortable.__super__.end_drag.call(this,n),this.__end_drag(n,!1)},Sortable.prototype.cleanup_drag=function(n){return Sortable.__super__.cleanup_drag.call(this,n),L.dom.removeClass(this.element,"cui-sorting"),L.globalDrag.sort_source.classList.remove("cui-sortable-placeholder"),L.dom.removeAnimatedClone(this.element)},Sortable.prototype.__end_drag=function(n,b){var A;A=this.get_child_number(L.globalDrag.sort_source),L.globalDrag.start_idx!==A&&(b?this.move_element(A,L.globalDrag.start_idx):this._sorted(n,L.globalDrag.start_idx,A))},Sortable}(L.Draggable)},3599:(n,b,A)=>{var L=A(7288);L.Dummy=function(){function Dummy(n){null==n&&(n={}),this.opts=n,this.__uniqueId=L.Dummy.uniqueId++,this.__cls=L.util.getObjectClass(this)}return Dummy.prototype.getUniqueId=function(){return this.__uniqueId},Dummy.uniqueId=0,Dummy}(),L.Dummy},7343:(n,b,A)=>{var L=A(7288);L.Element=function(){function Element(n){this.opts=null!=n?n:{},this.__uniqueId=L.Element.uniqueId++,this.__cls=L.util.getObjectClass(this),this.__destroyed=!1,this.__check_map={},this.__mapped_keys=[],this.initOpts(),L.Element.__dont_read_opts||(this.readOpts(),this.__initOptsCalled||console.warn("new "+this.__cls+": CUI.Element::initOpts not called.",{opts:this.opts}),"function"==typeof this._onConstruct&&this._onConstruct(this))}return Element.prototype.getElementClass=function(){return this.__cls},Element.prototype.getUniqueId=function(){return this.__uniqueId},Element.prototype.getOpts=function(){return this.opts},Element.prototype.getOpt=function(n){return this.opts[n]},Element.prototype.hasOpt=function(n){return this.opts.hasOwnProperty(n)},Element.prototype.getSetOpt=function(n){return this["_"+n]},Element.prototype.hasSetOpt=function(n){return this.hasOwnProperty("_"+n)},Element.prototype.initOpts=function(){return this.__initOptsCalled=!0,this.addOpts({debug:{},onConstruct:{check:Function},onDestroy:{check:Function}})},Element.prototype.copy=function(){return new this.constructor(this.opts)},Element.prototype.mergeOpt=function(n,b){var A,L,R;for(A in null==b&&(b={}),L=this.__check_map[n]||{},b)R=b[A],L[A]=R;return this.addOpt(n,L,"mergeOpt")},Element.prototype.removeOpt=function(n){return delete this.__check_map[n]},Element.prototype.addOpt=function(n,b,A){if(null==A&&(A="addOpt"),L.util.assert(L.util.isString(n),this.__cls+"."+A,"key needs to be String",{key:n,check_map:b}),!L.util.isNull(b))return L.util.assert(L.util.isPlainObject(b),this.__cls+"."+A,"check_map needs to be Map",{key:n,check_map:b}),this.__check_map[n]=b,this},Element.prototype.addOpts=function(n){var b,A;for(b in L.util.assert(L.util.isPlainObject(n),this.__cls+".addOpts","Parameter needs to be Map",{map:n}),n)A=n[b],this.addOpt(b,A);return this},Element.prototype.mergeOpts=function(n){var b,A;for(b in L.util.assert(L.util.isPlainObject(n),this.__cls+".mergeOpts","Parameter needs to be Map",{map:n}),n)A=n[b],this.mergeOpt(b,A);return this},Element.prototype.__getCheckMap=function(){return this.__check_map},Element.prototype.readOpts=function(n,b,A){return null==n&&(n=this.opts),null==b&&(b=this.__cls),null==A&&(A=this.__check_map),L.Element.readOpts.call(this,n,b,A,!0)},Element.prototype.readOptsFromAttr=function(n){var b,A,R,D,B,E,X,$;if(B={},!(null!=n?n.split:void 0))return B;for(b=0,D=(E=n.split(";")).length;b0?Q.deprecated:"",console.warn(b+": opts."+$+" is deprecated.",tt));else{if(!V)continue;L.util.assert(!1,b,"opts."+$+" needs to be set.",{opts:n,check_map:A})}!Q.check||L.util.isNull(tt)&&!V||(L.util.isArray(Q.check)?L.util.assert(Q.check.indexOf(tt)>-1,b,"opts."+$+' needs to be one of ["'+Q.check.join('","')+'"].',{opts:n}):Q.check===Boolean||Q.check===String||Q.check===Function||Q.check===Array?L.util.assertInstanceOf.call(this,$,Q.check,tt):L.util.isFunction(Q.check)&&!Q.check.__super__?(L.util.assert(L.util.isEmpty(Q.check.name)||"check"===Q.check.name,b,$+'.check is "'+Q.check.name+'" but has no "__super__" method. Use "extends CUI.Element" or "extends CUI.Dummy" to fix that.',{opts:n,key:$,value:Q}),B=Q.check.call(this,tt),L.util.isNull(B)||L.util.isBoolean(B)||L.util.isString(B)||(D=B,console.error("CUI.Element.readOpts: check needs to return Boolean, null, undefined or String.","opts:",n,"opt:",Q,"return:",D),B=!!D),!0!==B&&(E=L.util.isString(B)?B:"needs to match\n\n"+Q.check.toString(),L.util.assert(!1,b,"opts."+$+": "+E+".",{opts:n}))):L.util.isPlainObject(Q.check)?tt=L.Element.readOpts(tt,b+" [opts."+$+"]",Q.check):L.util.isNull(tt)&&V?L.util.assert(!1,b,"opts."+$+" is mandatory, but is "+tt+".",{opts:n}):L.util.assertInstanceOf.call(this,$,Q.check,tt)),R&&(this["_"+$]=tt,this instanceof L.Element&&this.__mapped_keys.push($)),K[$]=tt}for($ in n)void 0===(Q=n[$])||K.hasOwnProperty($)||$.startsWith("_")||console.warn(b+": opts."+$+", not supported. check_map: ",A,"opts:",n);return K},Element}()},3740:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.CUIEvent=function(n){function CUIEvent(){return CUIEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CUIEvent,n),CUIEvent}(L.Event)},4339:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Event=function(n){function Event(n){Event.__super__.constructor.call(this,n),this._require_node_in_dom&&(console.debug("require node in dom",this.isInDOM(),this.__node),L.util.assert(this.isInDOM(),"new Event","node is not in DOM, unable to create event.",{opts:this.opts})),this.__propagationStopped=!1,this.__propagationImmediateStopped=!1,this.__preventDefault=!1,this.__dragPrevented=!1}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Event,n),Event.prototype.initOpts=function(){return Event.__super__.initOpts.call(this),this.addOpts({type:{mandatory:!0,check:function(n){return L.util.isString(n)&&!L.util.isEmpty(n)&&1===n.split(/\s+/).length}},node:{default:document.documentElement,mandatory:!0,check:function(n){return L.dom.isNode(n)}},require_node_in_dom:{default:!1,mandatory:!0,check:Boolean},bubble:{default:!1,check:Boolean},sink:{default:!1,check:Boolean},exclude_self:{default:!1,check:Boolean},info:{default:{},check:"PlainObject"},prevent_default:{default:!1,check:Boolean}})},Event.prototype.readOpts=function(){return Event.__super__.readOpts.call(this),this.__node=L.dom.getNode(this._node),this._preventDefault&&this.preventDefault(),this.__listenerClass=null,this.__isInDOM=null},Event.prototype.__setListener=function(n){return this.__listenerClass?L.util.assert(this.__listenerClass===n.getElementClass(),"Event.setListener","listener class cannot change during an events life cycle.",{listener:n,listenerClass:this.__listenerClass}):this.__listenerClass=n.getElementClass(),this},Event.prototype.__setPhase=function(n){this.__phase=n},Event.prototype.isExcludeSelf=function(){return this._exclude_self},Event.prototype.getPhase=function(){return this.__phase},Event.prototype.getType=function(){return this._type},Event.prototype.getDebug=function(){return this._type+"["+this.getUniqueId()+"]"},Event.prototype.getInfo=function(){return this._info},Event.prototype.getNode=function(){return this.__node},Event.prototype.getElement=function(){return L.dom.data(this.getNode(),"element")},Event.prototype.isBubble=function(){return this._bubble},Event.prototype.isSink=function(){return this._sink},Event.prototype.isInDOM=function(){return null!==this.__isInDOM?this.__isInDOM:this.__node===document||this.__node===window?this.__isInDOM=!0:this.__isInDOM=L.dom.isInDOM(this.__node)},Event.prototype.setNativeEvent=function(n){return L.util.assert("object"==typeof n,"CUI.Event.setNativeEvent","Event needs to be instanceof Event",{Event:n}),this.__NativeEvent=n,this},Event.prototype.getNativeEvent=function(){return this.__NativeEvent},Event.prototype.getPointTarget=function(){return document.elementFromPoint(this.clientX(),this.clientY())},Event.prototype.getTarget=function(){var n;return this.__target||(null!=(n=this.getNativeEvent())?n.target:void 0)},Event.prototype.setTarget=function(n){return this.__target=n},Event.prototype.getCurrentTarget=function(){return this.__currentTarget||this.getTarget()},Event.prototype.setCurrentTarget=function(n){return this.__currentTarget=n},Event.prototype.getModifiers=function(){var n,b,A,L;for(n in b=[],A={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"})L=A[n],this[n+"Key"]()&&b.push(L);return b},Event.prototype.hasModifierKey=function(n){return null==n&&(n=!1),this.metaKey()||this.ctrlKey()||this.altKey()||n&&this.shiftKey()},Event.prototype.getButton=function(){var n;return null!=(n=this.getNativeEvent())?n.button:void 0},Event.prototype.keyCode=function(){var n;return null!=(n=this.getNativeEvent())?n.which:void 0},Event.prototype.metaKey=function(){var n;return null!=(n=this.getNativeEvent())?n.metaKey:void 0},Event.prototype.ctrlKey=function(){var n;return null!=(n=this.getNativeEvent())?n.ctrlKey:void 0},Event.prototype.altKey=function(){var n;return null!=(n=this.getNativeEvent())?n.altKey:void 0},Event.prototype.shiftKey=function(){var n;return null!=(n=this.getNativeEvent())?n.shiftKey:void 0},Event.prototype.clientX=function(){var n;return null!=(n=this.getNativeEvent())?n.clientX:void 0},Event.prototype.clientY=function(){var n;return null!=(n=this.getNativeEvent())?n.clientY:void 0},Event.prototype.pageX=function(){var n;return null!=(n=this.getNativeEvent())?n.pageX:void 0},Event.prototype.pageY=function(){var n;return null!=(n=this.getNativeEvent())?n.pageY:void 0},Event.prototype.stopImmediatePropagation=function(){var n;return this.__propagationImmediateStopped=!0,null!=(n=this.getNativeEvent())&&n.stopImmediatePropagation(),this},Event.prototype.stopPropagation=function(){var n;return this.__propagationStopped=!0,null!=(n=this.getNativeEvent())&&n.stopPropagation(),this},Event.prototype.preventDefault=function(){var n;return this.__defaultPrevented=!0,null!=(n=this.getNativeEvent())&&n.preventDefault(),this},Event.prototype.isImmediatePropagationStopped=function(){return this.__propagationImmediateStopped},Event.prototype.isPropagationStopped=function(){return this.__propagationStopped},Event.prototype.isDefaultPrevented=function(){return this.__defaultPrevented},Event.prototype.dispatch=function(){var n,b;return L.util.assert(!this.getNativeEvent(),"CUI.Event.dispatch","Can only dispatch once.",{event:this}),(n=document.createEvent("Event")).initEvent(this.getType(),this.isBubble(),!0),n.__cui_event=this,b=this.isExcludeSelf()?L.dom.parent(this.getNode()):this.getNode(),this.isDefaultPrevented()&&n.preventDefault(),this.setNativeEvent(n),b.dispatchEvent(n),n},Event.prototype.dump=function(){var n,b;return b=this.__cls+": **"+this.getType()+"**",(n=this.getModifiers()).length>0&&(b+=" Modifiers: **"+n.join("+")+"**"),b},Event.prototype.stop=function(){return this.preventDefault(),this.stopPropagation(),this.stopImmediatePropagation(),!1},Event.require=function(n,b){var A,R,D;return L.util.isPlainObject(n)?(D=(R=L.Events.getEventType(n.type)).eventClass?R.eventClass:L.Event,L.util.mergeMap(n,R),delete n.eventClass,delete n.listenerClass,A=new D(n)):A=n,L.util.assert(A instanceof L.Event,""+b,"event needs to be PlainObject or instance of CUI.Event."),A},Event.createFromDOMEvent=function(n,b){var A,R;return R=L.Events.getEventType(n.type),b||(b=R.eventClass?R.eventClass:L.Event),(A=new b({type:n.type,bubble:n.bubbles,node:n.target})).setNativeEvent(n),A},Event}(L.Element)},9652:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0)}}}),R=[],D=[],b=L.dom.getNode(E.node),A=new L.Deferred,D.push(L.Events.listen({type:E.type,node:b,call:function(){A.resolve()}})),R.push(A),(B=new L.Deferred).always((function(){var n,b;for(n=0,b=D.length;n=0&&L.setTimeout({ms:E.maxWait,call:function(){var n,b;for(n=0,b=R.length;n0){for(it=L.dom.parents(nt),bt=!1,$=0,Q=zt.length;$0,"CUI.Events.registerEvent","event.type must be String.",{event:n}),K=this,$=function(b){var A;return(A=L.util.copyObject(n,!0)).type=b,K.registerEvent(A,!1)},L.util.isArray(n.type))for(A=0,D=(E=n.type).length;A=0&&(b="Num"+String.fromCharCode(n-48)),D.call([112,113,114,115,116,117,118,119,120,121,122,123],n)>=0)b="F"+String.fromCharCode(n-111);else switch(n){case 8:b="Backspace";break;case 9:b="Tab";break;case 13:b="Return";break;case 16:b="Shift";break;case 17:b="Ctrl";break;case 18:b="Alt";break;case 20:b="CapsLock";break;case 27:b="Esc";break;case 32:b="Space";break;case 33:b="PageUp";break;case 34:b="PageDown";break;case 37:b="Left";break;case 38:b="Up";break;case 39:b="Right";break;case 40:b="Down";break;case 46:b="Insert";break;case 46:b="Delete";break;case 110:b="Num.";break;case 144:b="Numlock";break;case 111:b="Num/";break;case 106:b="Num*";break;case 107:b="Num+";break;default:b=String.fromCharCode(n)}return b}},KeyboardEvent.prototype.key=function(){return this.getNativeEvent().key},KeyboardEvent.prototype.code=function(){return this.getNativeEvent().code},KeyboardEvent.prototype.hasDefaultActionModifier=function(){return/Mac|iPod|iPhone|iPad/.test(navigator.platform)?this.metaKey():this.ctrlKey()},KeyboardEvent.prototype.dump=function(){var n,b;return b=this.__cls+": **"+this.getType()+"**",b+=" Key: **"+this.key()+"** KeyCode: **"+this.keyCode()+"**",(n=this.getKeyboard()).length>0&&(b=b+" Keyboard: **"+n+"**"),b},KeyboardEvent.__initKeyboardListener=function(){var n;return n=function(n){switch(n){case 16:case 17:case 18:case 91:case 93:return!0;default:return!1}},L.KeyboardEvent.__keys=[],L.Events.listen({type:["keydown"],node:window,capture:!0,call:function(b){n(b.keyCode())||L.util.pushOntoArray(b.getKeyboardKey(),L.KeyboardEvent.__keys)}}),L.Events.listen({type:["keyup"],node:window,capture:!0,call:function(b){n(b.keyCode())||L.util.removeFromArray(b.getKeyboardKey(),L.KeyboardEvent.__keys)}}),L.Events.listen({type:["blur"],node:window,capture:!0,call:function(n){return L.KeyboardEvent.__keys=[]}})},KeyboardEvent}(L.Event),L.ready((function(){return L.KeyboardEvent.__initKeyboardListener()}))},2305:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0));B++);else V=n.type,X=D.call(this.__types,V)>=0;return X&&n.call&&(R=!0,X=n.call===this._call),X&&n.instance&&(R=!0,X=n.instance===this.getInstance()),L.util.assert(R,"Listener.matchesFilter","Filter did not filter anything, make sure you have 'node', 'type', 'call', or 'instance' set.",{filter:n}),X},Listener.require=function(n,b){var A,R,D,B,E,X,$;if(L.util.isPlainObject(n)){for(E=null,R=0,D=($=n.type instanceof Array?n.type:[n.type]).length;R{var L=A(7288),R={}.hasOwnProperty;L.MouseEvent=function(n){function MouseEvent(){return MouseEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MouseEvent,n),MouseEvent.prototype.initOpts=function(){return MouseEvent.__super__.initOpts.call(this),this.addOpts({button:{check:function(n){return n>=0}},pageX:{check:function(n){return n>0}},pageY:{check:function(n){return n>0}},clientX:{check:function(n){return n>0}},clientY:{check:function(n){return n>0}}})},MouseEvent.prototype.setNativeEvent=function(n){var b,A,L,R,D;for(b=0,L=(D=["button","pageX","pageY","clientX","clientY"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.Events.MouseIsStill=function(n){function MouseIsStill(n){var b;MouseIsStill.__super__.constructor.call(this,n),this.__timeout=null,L.Events.listen({type:"mouseenter",instance:this,node:this._node,call:(b=this,function(){return b.start()})}),L.Events.listen({type:"mouseleave",instance:this,node:this._node,call:function(n){return function(){return n.stop()}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MouseIsStill,n),MouseIsStill.prototype.initOpts=function(){MouseIsStill.__super__.initOpts.call(this),this.addOpts({ms:{check:function(n){return n>=1},mandatory:!0},call:{check:Function,mandatory:!0},node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}}})},MouseIsStill.prototype.start=function(){var n;this.__clickEvent=L.Events.listen({type:["click","dblclick"],capture:!0,node:this._element,only_once:!0,call:(n=this,function(b){return n.stop()})}),this.__event=L.Events.listen({type:["mousemove"],node:this._node,instance:this,call:function(n){return function(b){return L.clearTimeout(n.__timeout),n.__timeout=L.setTimeout({ms:n._ms,call:function(){return n.stop(),n._call(b)}})}}(this)})},MouseIsStill.prototype.stop=function(){this.__timeout&&(L.clearTimeout(this.__timeout),this.__timeout=null),this.__event&&(L.Events.ignore(this.__event),L.Events.ignore(this.__clickEvent),this.__clickEvent=null,this.__event=null)},MouseIsStill.prototype.destroy=function(){this.stop(),L.Events.ignore({instance:this}),MouseIsStill.__super__.destroy.call(this)},MouseIsStill}(L.Element)},3876:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.TouchEvent=function(n){function TouchEvent(){return TouchEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(TouchEvent,n),TouchEvent.prototype.initOpts=function(){return TouchEvent.__super__.initOpts.call(this),this.addOpts({button:{check:function(n){return n>=0}},pageX:{check:function(n){return n>0}},pageY:{check:function(n){return n>0}},clientX:{check:function(n){return n>0}},clientY:{check:function(n){return n>0}}})},TouchEvent.prototype.setNativeEvent=function(n){var b,A,L,R,D;for(b=0,L=(D=["button","pageX","pageY","clientX","clientY"]).length;b{var L=A(7288),R={}.hasOwnProperty;L.WheelEvent=function(n){function WheelEvent(){return WheelEvent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(WheelEvent,n),WheelEvent.prototype.dump=function(){return WheelEvent.__super__.dump.call(this)+" wheelY: **"+this.wheelDeltaY()+"**"},WheelEvent.prototype.wheelDeltaY=function(){var n;return(n=this.getNativeEvent())&&n.deltaY||0},WheelEvent}(L.MouseEvent)},1412:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FlexHandle=function(n){function FlexHandle(n){var b,A,R,D,B;for(FlexHandle.__super__.constructor.call(this,n),this.__pane=null,D=R=0,B=(A=this._element.parentNode.children).length;Rthis.__pane_idx?this.__element_idx0&&(this.__adjacent_pane=A[this.__element_idx-1]),this.__closed=this._closed,this.__hidden=this._hidden,this.__stretched=null,this.__size=null,L.util.assert(this.__pane,"new "+this.__cls,'pane "'+this._pane+'" not found in parent element of cui-flex-handle element.',{opts:this.opts,children:A}),L.dom.data(this.__pane,"flexHandle",this),L.dom.setAttribute(this.__pane,"flex-handled-pane",this._name)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FlexHandle,n),FlexHandle.prototype.readOpts=function(){var n,b,A;FlexHandle.__super__.readOpts.call(this),"horizontal"===(n=this._direction)||"row"===n?this.__direction="row":"vertical"!==(b=this._direction)&&"column"!==b||(this.__direction="column"),L.util.assert("row"===(A=this.__direction)||"column"===A,"new "+this.__cls,"opts.direction needs to be set",{opts:this.opts,element:this._element}),this._label&&this.addLabel(this._label)},FlexHandle.prototype.initOpts=function(){return FlexHandle.__super__.initOpts.call(this),this.addOpts({element:{mandatory:!0,check:function(n){return L.util.isElement(n)}},pane:{mandatory:!0,check:String},name:{mandatory:!0,check:String},closed:{check:Boolean},closable:{mandatory:!0,default:!1,check:Boolean},open_button_icon:{mandatory:!1,check:function(n){return L.util.isString(n)||n instanceof L.Icon}},label:{check:function(n){return n instanceof L.Label||L.util.isPlainObject(n)}},hidden:{check:Boolean},direction:{check:["horizontal","vertical","row","column"]},manage_state:{default:!0,check:Boolean},state_name:{check:String},class:{check:String},onResize:{check:Function},maxValue:{check:function(n){return n>0}},unit:{default:"px",check:function(n){return"px"===n||"%"===n}}})},FlexHandle.prototype.init=function(){var n,b,A,R;if(!this.isDestroyed())return L.dom.addClass(this._element,"cui-flex-handle cui-flex-handle-"+this.__direction+" cui-flex-handle-"+this._name),this.__closed&&this.close(),this.__hidden&&this.hide(),this._class&&L.dom.addClass(this._element,this._class),"row"===this.__direction?(n="x",this.__css_value="Width"):(n="y",this.__css_value="Height"),this._open_button_icon?this._element.classList.add("cui-flex-handle-with-button-icon"):(L.Events.listen({type:"dblclick",node:this._element,call:(R=this,function(n){null===R.__size?R.isClosed()?R.open():R._closable&&R.close():R.resetSize(),R.storeState()})}),L.Events.listen({type:["click"],node:this._element,call:function(n){return function(b){n.__label&&n.isClosed()&&(n.open(),n.storeState())}}(this)}),L.Events.listen({type:"keydown",node:this._element,call:function(n){return function(b){var A;n.__label&&n.isClosed()&&("Return"!==(A=b.getKeyboardKey())&&"Space"!==A||(n.open(),n.storeState()))}}(this)})),b=null,new L.Draggable({element:this._element,axis:n,support_touch:!0,create:function(n){return function(){if(n.isClosed())return!1}}(this),dragstart:function(A){return function(R,D){var B,E,X,$,V;return X=A.__pane_idx0?n/b*100:n,R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"):"string"==typeof n&&-1!==n.indexOf("%")?(A=parseFloat(n),R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"):(A=(b=L.dom.getDimension(this.__pane.parentNode,"contentBox"+this.__css_value))>0?parseFloat(n)/b*100:n,R=(A=Math.max(1,Math.min(A,100))).toFixed(2)+"%"),this.__pane.classList.add("cui-is-manually-sized"),this._element.classList.add("cui-is-manually-sized"),L.dom.setStyleOne(this.__pane,this.__css_value.toLowerCase(),R),this.__size=R):(this.__pane.classList.add("cui-is-manually-sized"),this._element.classList.add("cui-is-manually-sized"),L.dom.setDimension(this.__pane,"contentBox"+this.__css_value,n),this.__size=n),this.__resize()},FlexHandle.prototype.resetSize=function(){return this.__setSize(null),this},FlexHandle.prototype.getSize=function(){return this.__size},FlexHandle.prototype.__isAlive=function(){return!(this.isDestroyed()||!L.dom.isInDOM(this._element))},FlexHandle.prototype.__resize=function(){if(this.__isAlive())return"function"==typeof this._onResize&&this._onResize(this,this.getSize()),L.Events.trigger({type:"viewport-resize",info:{FlexHandle:!0}})},FlexHandle.prototype.__getState=function(){var n;return n=L.getLocalStorage(this.__state_name),L.util.isNull(n)?{}:JSON.parse(n)},FlexHandle.prototype.__setState=function(){var n;if(this.__state_name)return n=this.__getState(),!L.util.isUndef(n.closed)&&this._closable&&(n.closed?this.close():this.open()),L.util.isUndef(n.size)||this.__setSize(n.size),this},FlexHandle.prototype.storeState=function(){var n,b;if(this.__state_name)return n={closed:this.isClosed(),size:this.getSize()},b=JSON.stringify(n),L.setLocalStorage(this.__state_name,b),console.info("FlexHandle.storeState: ",this.__state_name,b),this},FlexHandle.prototype.isStretched=function(){return this.__stretched},FlexHandle.prototype.stretch=function(n,b){var A,R,D,B,E,X,$,V;if(null==b&&(b=!0),b){if(this.isStretched()===n)return;this.unstretch()}switch($=this.getPane(),n){case"west":case"north":R=L.dom.findPreviousSiblings($);break;case"east":case"south":R=L.dom.findNextSiblings($)}switch(n){case"west":case"east":V="width";break;case"north":case"south":V="height"}if(b){for(D=0,E=R.length;D{var L=A(7288),R={}.hasOwnProperty;L.Icon=function(n){function Icon(n){var b,A,R;Icon.__super__.constructor.call(this,n),R="",b="",this._icon&&(b||(b=L.Icon.icon_map[this._icon]),b||(b=this._icon),b.startsWith("svg-")&&(R=b,b="")),L.util.isEmpty(this._class)||(b+=" "+this._class),R?this.DOM=L.dom.htmlToNodes('')[0]:(this.DOM=L.dom.element("I",{class:"fa "+b}),!this._icon||L.Icon.icon_map[this._icon]||this._icon.startsWith("fa-")||this._icon.startsWith("css-swatch")||((A=L.dom.span("cui-no-icon")).textContent=this._icon[0],L.dom.removeClass(this.DOM,this._icon),L.dom.removeClass(this.DOM,"fa"),L.dom.append(this.DOM,A))),this._ui&&L.dom.setAttribute(this.DOM,"ui",this._ui),this._tooltip&&(this._tooltip.element=this.DOM,new L.Tooltip(this._tooltip))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Icon,n),Icon.prototype.initOpts=function(){return Icon.__super__.initOpts.call(this),this.addOpts({class:{check:String},icon:{check:String},ui:{check:String},fixed_width:{check:Boolean},tooltip:{check:"PlainObject"}})},Icon.prototype.copy=function(){var n,b;return n=Icon.__super__.copy.call(this),b=L.dom.getStyle(this),L.dom.setStyle(n,b),n},Icon.prototype.hide=function(){return L.dom.hideElement(this.DOM)},Icon.prototype.show=function(){return L.dom.showElement(this.DOM)},Icon.icon_map={audio:"fa-music",bolt:"fa-bolt",calendar:"fa-calendar-plus-o",camera:"fa-camera",check:"fa-check",clock:"fa-clock-o",close:"svg-close",cloud:"fa-cloud",copy:"fa-files-o",crop:"fa-crop",dive:"fa-angle-right",down:"fa-angle-down",download:"fa-download",east:"fa-angle-right",edit:"fa-pencil",ellipsis_h:"fa-ellipsis-h",ellipsis_v:"fa-ellipsis-v",email:"fa-envelope-o",envelope_active:"fa-envelope",envelope:"fa-envelope-o",expert_search:"fa-list-ul",export:"fa-download",external_link:"svg-external-link",failed:"fa-warning",file_text:"fa-file-text-o",file_text_active:"fa-file-text",file:"fa-file",filter:"fa-filter",folder_shared_upload:"svg-folder-shared-upload",folder_shared:"svg-folder-shared",folder_upload:"svg-folder-upload",folder:"svg-folder",fullscreen_expand:"svg-fullscreen-expand",fullscreen_compress:"svg-fullscreen-compress",heart:"fa-heart",help:"fa-question",image:"fa-picture-o",info_circle:"svg-info-circle",info_circle_ng:"svg-info-circle-ng",info:"fa-info-circle",left:"fa-angle-left",legal:"fa-legal",list:"fa-question",menu:"fa-bars",minus:"fa-minus",no_right:"fa-slack",north:"fa-angle-up",play:"fa-play",plus:"fa-plus",print:"fa-print",question:"fa-question",refresh:"fa-refresh",remove:"svg-close",required:"fa-bullhorn",reset:"svg-reset",resize_full:"fa-expand",resize_small:"fa-compress",right:"fa-angle-right",rotate_horizontal:"fa-arrows-h",rotate_left:"fa-rotate-left",rotate_right:"fa-rotate-right",rotate_vertical:"fa-arrows-v",ruler:"svg-ruler",save:"fa-floppy-o",search:"fa-search",settings:"fa-cog",share:"fa-share",show:"fa-question",sliders:"fa-sliders",south:"fa-angle-down",spinner:"svg-spinner cui-spin-stepped",start:"fa-play",stop:"fa-stop",trash:"svg-trash",up:"fa-angle-up",upload:"fa-upload",user:"fa-user",warning:"fa-warning",west:"fa-angle-left",zip:"fa-file-archive-o",zoom_in:"fa-search-plus",zoom_out:"fa-search-minus"},Icon}(L.Element),L.proxyMethods(L.Icon,L.Button,["hide","show","isShown","isHidden"])},2536:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0&&n.left>=0}},fill_space:{default:"auto",mandatory:!0,check:L.Layer.FILL_SPACE_CHECK_ARRAY},check_for_element:{default:!1,check:Boolean},show_ms:{default:700,check:function(n){return n>0}},visible:{check:Boolean},hide_ms:{default:100,check:function(n){return n>0}}}),this},Layer.prototype.readOpts=function(){return Layer.__super__.readOpts.call(this),this.__fill_space=this._fill_space,this},Layer.prototype.setVisible=function(n){return null==n&&(n=!0),n?L.dom.setStyleOne(this.__layer_root.DOM,"visibility",""):L.dom.setStyleOne(this.__layer_root.DOM,"visibility","hidden")},Layer.prototype.__allPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw","c"],Layer.prototype.knownPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw","c"],Layer.prototype.__setElement=function(n){return n instanceof L.DOMElement?this.__element=n.getElementForLayer():n.DOM?this.__element=n.DOM:this.__element=n,L.util.assert(!L.dom.closest(this.__element,".cui-tmpl"),"Layer.__setElement","element cannot be inside a Template.",{element:n}),L.util.assert(this.__element instanceof HTMLElement,"Layer.__setElement","element needs to be HTMLElement.",{element:n}),this.__element},Layer.prototype.__getOriginalElement=function(){var n;return(null!=(n=this._element)?n.DOM:void 0)||this._element||null},Layer.prototype.autoSize=function(){return this.position()},Layer.prototype.position=function(n){var b,A,R,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot,ft,mt,_t,gt,At,yt,qt,vt,Wt,wt,Lt,Rt,xt,kt,Tt,Ct,Dt,St,Bt,Nt,Et,It,Yt,Pt,Ht,Ft,Xt,Vt,Ut,jt,Zt,Gt,Kt,oe,ie,re,se,ae,ce,le,ue;if(!this.isShown())return this;if("content-resize"!==(null!=n?n.getType():void 0)&&(this.__currentPlacement=null),(X=L.dom.getDimensions(document.body)).isPositioned="relative"===(It=X.computedStyle.position)||"fixed"===It||"absolute"===It,Q={width:window.innerWidth-L.dom.getLayerSidebarWidth(),height:window.innerHeight},it=function(n){return{n:"s",s:"n",e:"w",w:"e"}[n]},nt=function(n){return"cui-layer-pointer--"+n},this.__pointer)for(L.dom.setStyle(this.__pointer,{top:0,left:0,display:"",margin:""}),rt=0,zt=(Yt=["w","s","e","n"]).length;rtse.top&&(se.top=se.window_top),se.window_left>se.left&&(se.left=se.window_left),se.window_bottomse.width&&(ut.width=se.width,se.cuts++),ut.height>se.height&&(ut.height=se.height,se.cuts++),se.align_horizontal){case"left":ut.left=se.left;break;case"right":ut.left=se.right-ut.width;break;case"center":ut.left=$.viewportCenterLeft-ut.width/2}switch(se.align_vertical){case"top":ut.top=se.top;break;case"bottom":ut.top=se.bottom-ut.height;break;case"center":ut.top=$.viewportCenterTop-ut.height/2}if(se.dim_pointer){switch(se.pointer_align_horizontal){case"left":St.left=$.viewportRight+se.dim_pointer.marginLeft;break;case"right":St.left=$.viewportLeft-se.dim_pointer.borderBoxWidth-se.dim_pointer.marginLeft;break;case"center":St.left=$.viewportCenterLeft-se.dim_pointer.borderBoxWidth/2}switch(se.pointer_align_vertical){case"top":St.top=$.viewportBottom+se.dim_pointer.marginTop;break;case"bottom":St.top=$.viewportTop-se.dim_pointer.marginBoxHeight+se.dim_pointer.marginTop;break;case"center":St.top=$.viewportCenterTop-se.dim_pointer.borderBoxHeight/2}St.width=se.dim_pointer.borderBoxWidth,St.height=se.dim_pointer.borderBoxHeight,St.direction=se.dim_pointer.direction}if(ut.top0&&(ut.top=ut.top-Lt),(xt=ut.left+ut.width-se.right)>0&&(ut.left=ut.left-xt),se.overlap_height=0,se.overlap_width=0,this.__pointer||this._show_at_position){if((Rt=V.borderBoxHeight-ut.height)>0)switch(se.overlap_align){case"bottom":se.overlap_height=Math.min(ut.top-se.window_top,Rt),ut.top=ut.top-se.overlap_height,ut.height=ut.height+se.overlap_height;break;case"top":se.overlap_height=Math.min(se.window_bottom-ut.top-ut.height,Rt),ut.height=ut.height+se.overlap_height}if((kt=V.borderBoxWidth-ut.width)>0)switch(se.overlap_align){case"right":se.overlap_width=Math.min(ut.left-se.window_left,kt),ut.left=ut.left-se.overlap_width,ut.width=ut.width+se.overlap_width;break;case"left":se.overlap_height=Math.min(se.window_right-ut.right,kt),ut.width=ut.width+se.overlap_width}}if(this.__pointer&&se.dim_pointer)switch(Mt=se.layer_pos.left+se.layer_pos.width,bt=se.layer_pos.top+se.layer_pos.height,Nt=se.pointer_pos.left+se.pointer_pos.width,Bt=se.pointer_pos.top+se.pointer_pos.height,se.pointer_pos.direction){case"n":case"s":(Et=se.pointer_pos.left-se.layer_pos.left-se.dim_pointer.marginLeft)<0&&(re=se.layer_pos.left-se.window_left,se.push_left=Math.min(re,-Et),se.layer_pos.left=se.layer_pos.left-se.push_left),(Et=Mt-Nt-se.dim_pointer.marginRight)<0&&(re=se.window_right-Mt,se.push_right=Math.min(re,-Et),se.layer_pos.left=se.layer_pos.left+se.push_right);break;case"e":case"w":(Et=se.pointer_pos.top-se.layer_pos.top-se.dim_pointer.marginTop)<0&&(re=se.layer_pos.top-se.window_top,se.push_top=Math.min(re,-Et),se.layer_pos.top=se.layer_pos.top-se.push_top),(Et=bt-Bt-se.dim_pointer.marginBottom)<0&&(re=se.window_bottom-bt,se.push_bottom=Math.min(re,-Et),se.layer_pos.top=se.layer_pos.top+se.push_bottom)}this._onPosition&&"function"==typeof this._onPosition&&this._onPosition(this,se),se.layer_pos.estate=se.layer_pos.width*se.layer_pos.height,se.layer_pos.aspect_ratio=(se.layer_pos.width||1)/(se.layer_pos.height||1),se.dim_layer.aspect_ratio=(se.dim_layer.borderBoxWidth||1)/(se.dim_layer.borderBoxHeight||1),le=b.length-L.util.idxInArray(Tt,b),ce===Tt&&(le=b.length+1),se.ranking=10*le+1-Math.abs(se.layer_pos.aspect_ratio-se.dim_layer.aspect_ratio)+se.layer_pos.estate}for(Tt in A=[],ae)se=ae[Tt],A.push(Tt);if(0===A.length)return this.hide(),void console.warn("Layer.position","No available placements found.");for(A.sort((function(n,b){var A;return A=function(n){return ae[n].ranking},L.util.compareIndex(A(n),A(b))})),A.reverse(),Ut=this.__currentPlacement,D.call(A,Ut)<0&&(this.__currentPlacement=A[0]),(null!=n?n.hasModifierKey():void 0)&&(console.debug("Layer.position",this,this.opts),console.debug("layer",V),console.debug("element",$),console.debug("pointer",K),console.debug("window",Q),console.debug("placements",this.__currentPlacement,ae),ue=this,oe=function(n){var b,A,R,D,B;if(ue.__removeDebugDivs(),b=ae[n],console.info("Layer: Placement",n,b),ue.__dbg_div1=L.dom.element("DIV"),ue.__dbg_div2=L.dom.element("DIV"),ue.__dbg_div3=L.dom.element("DIV"),R={position:"absolute",zIndex:2,border:"2px solid #ff0032",backgroundColor:"rgba(255, 0, 0, 0.4)",top:b.top,left:b.left,width:b.width,height:b.height},L.dom.setStyle(ue.__dbg_div1,R),D={position:"absolute",zIndex:2,border:"2px solid #00ff32",backgroundColor:"rgba(0, 255, 0, 0.4)",top:b.layer_pos.top,left:b.layer_pos.left,width:b.layer_pos.width,height:b.layer_pos.height,alignItems:"center",justifyContent:"center",fontSize:40,color:"rgb(0,255,50)"},(A=L.dom.element("SPAN")).textContent=n,ue.__dbg_div2.appendChild(A),L.dom.setStyle(ue.__dbg_div2,D),B={position:"absolute",zIndex:2,border:"2px solid #0032ff",backgroundColor:"rgba(0, 0, 255, 0.4)",top:b.pointer_pos.top,left:b.pointer_pos.left,width:b.pointer_pos.width,height:b.pointer_pos.height},L.dom.setStyle(ue.__dbg_div3,B),ue.__layer_root.DOM.appendChild(ue.__dbg_div1),ue.__layer_root.DOM.appendChild(ue.__dbg_div2),ue.__pointer)return ue.__layer_root.DOM.appendChild(ue.__dbg_div3)},E=0,yt=L.Events.listen({node:document,type:"keyup",call:function(n){return function(b,A){var L;if(32===b.keyCode())for(;;){if((E+=1)===n.knownPlacements.length)return n.__removeDebugDivs(),void yt.destroy();if(L=n.knownPlacements[E],ae[L])return void oe(L);console.warn("Placement",L,"is unavailable.")}}}(this)})),(se=ae[this.__currentPlacement]).layer_pos.width<10||se.layer_pos.height,vt=this._element&&this._use_element_width_as_min_width?$.borderBoxWidth:void 0,L.dom.setAttribute(this.__layer_root.DOM,"cui-placement",Tt),L.dom.setAttribute(this.__layer_root.DOM,"cui-fill-space",this.__fill_space),Gt={top:se.layer_pos.top,left:se.layer_pos.left,minWidth:vt,margin:0},V.computedStyle.maxWidth&&"none"!==V.computedStyle.maxWidth||(Gt.maxWidth=se.width+se.overlap_width),V.computedStyle.maxHeight&&"none"!==V.computedStyle.maxHeight||(Gt.maxHeight=se.height+se.overlap_height),"c"===Tt||((null!=(jt=this.__layer_root.DOM.previousElementSibling)?jt.hasAttribute("cui-layer-fixed"):void 0)||!1)?(this.__layer_root.DOM.setAttribute("cui-layer-fixed",""),Gt.top=se.layer_pos.top,Gt.left=se.layer_pos.left):(this.__layer_root.DOM.removeAttribute("cui-layer-fixed"),Kt={top:B,left:R,bottom:0,right:0},X.isPositioned&&(Kt.top-=X.marginTop+X.borderTopWidth,Kt.left-=X.marginLeft+X.borderLeftWidth,Kt.bottom-=X.marginBottom+X.borderBottomWidth,Kt.right-=X.marginRight+X.borderRightWidth),L.dom.setStyle(this.__layer_root.DOM,Kt)),Gt.width=Math.ceil(se.layer_pos.width),Gt.height=Math.ceil(se.layer_pos.height),L.browser.ie&&(ie=this.__layer_root.DOM.previousElementSibling,L.dom.remove(this.__layer_root)),L.dom.setStyle(this.__layer.DOM,Gt),this.__pointer&&(se.dim_pointer?(L.dom.setStyle(this.__pointer,{top:se.pointer_pos.top,left:se.pointer_pos.left,margin:0}),L.dom.addClass(this.__pointer,nt(se.pointer_pos.direction)),L.dom.addClass(this.__layer,"has-"+nt(se.pointer_pos.direction))):L.dom.setStyle(this.__pointer,{display:"none"})),this.__backdrop_crop&&(L.dom.setStyle(this.__backdrop_crop,{top:se.layer_pos.top,left:se.layer_pos.left,width:se.layer_pos.width,height:se.layer_pos.height}),L.dom.setStyle(this.__backdrop_crop.firstChild,{width:Q.width,height:Q.height,top:-se.layer_pos.top,left:-se.layer_pos.left})),L.browser.ie&&L.dom.insertAfter(ie,this.__layer_root.DOM),wt=0,At=(Zt=L.dom.matchSelector(this.__layer.DOM,"*")).length;wt .cui-layer-root")).length,A=b=0,D=R.length;b0||(this.__focused_on_show=!1),(this.__focused_on_show||this.forceFocusOnShow())&&this.DOM.focus(),this},Layer.prototype.forceFocusOnShow=function(){return!1},Layer.prototype.focusOnHide=function(n){var b;return this.__element?((n===L.KeyboardEvent||this.__focused_on_show)&&null!=(b=L.dom.findElement(this.__element,"[tabindex]"))&&b.focus(),this):this},Layer.prototype.getElement=function(){return this.__element},Layer.prototype.isShown=function(){return this.__shown},Layer.prototype.destroy=function(){var n,b,A;return this.__shown&&this.hide(),Layer.__super__.destroy.call(this),null!=(n=this.__layer)&&n.destroy(),null!=(b=this.__layer_root)&&b.destroy(),this.__layer=null,this.__layer_root=null,L.dom.remove(this.__pointer),this.__pointer=null,null!=(A=this.__backdrop)&&A.destroy(),this.__backdrop=null},Layer.prototype.setFillSpace=function(n){return L.util.assert(D.call(Layer.FILL_SPACE_CHECK_ARRAY,n)>=0,"Layer.setFillSpace","Parameter fillSpace should be: "+Layer.FILL_SPACE_CHECK_ARRAY.join(""),{fillSpace:n}),this.__fill_space=n,this.position(),this},Layer}(L.DOMElement),L.ready((function(){return L.Events.listen({type:["mousedown","touchend"],capture:!0,node:document.body,call:function(n,b){var A,R,D,B,E,X;for(E=L.dom.find("body > .cui-layer-root, body > .cui-pane-fill-screen-is-on, body > .cui-layer-prevent-click-thru"),X=n.getTarget(),R=E.length-1;R>=0;R+=-1){if(B=E[R],!L.dom.hasClass(B,"cui-layer-backdrop-policy-click-thru")){if(L.dom.hasClass(B,"cui-layer-root-tooltip"))continue;return}if(L.dom.hasClass(B,"cui-layer-sidebar"))return;if(L.dom.closest(X,B))return;(A=(D=L.dom.data(L.dom.children(B,".cui-layer")[0],"element")).getElement())&&L.dom.closest(n.getTarget(),A)&&L.Events.listen({node:document.documentElement,type:["dblclick","click"],capture:!0,only_once:!0,call:function(n){return n.stop()}}),n.cui_layer_closed=!0,D.hide(n)}}}),L.Events.listen({type:["keyup"],node:document.body,call:function(n){var b,A,R,D;if(27===n.keyCode()&&!L.globalDrag&&(A=(R=L.dom.find("body > .cui-layer-root > .cui-layer:not(.cui-tooltip)"))[R.length-1])&&((D=n.getTarget())===A||D===document.body))return b=L.dom.data(A,"element"),n.stopImmediatePropagation(),n.preventDefault(),b.isKeyboardCancellable(n)?(b.doCancel(n),!1):void 0}})}))},2734:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Layout=function(n){function Layout(n){Layout.__super__.constructor.call(this,n),this.__isInit=!1,this.init()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Layout,n),Layout.prototype.initOpts=function(){var n,b,A,R,D;for(Layout.__super__.initOpts.call(this),this.addOpts({absolute:{check:Boolean},maximize:{check:Boolean},maximize_horizontal:{check:Boolean},maximize_vertical:{check:Boolean},auto_buttonbar:{default:!0,mandatory:!0,check:Boolean},center:{default:{},check:"PlainObject"}}),D=[],n=0,b=(R=this.getSupportedPanes()).length;n0?ut.slice(0,$).reduce((function(n,b){return n+b})):0;break;case"right":case"bottom":lt=$+10&&L.Events.trigger({type:"viewport-resize"}),this},Layout.all=function(){return L.scheduleCallback({call:L.Layout.__all})},Layout}(L.DOMElement),L.ready((function(){return L.Events.listen({type:["viewport-resize","content-resize"],call:function(n,b){return b.FlexHandle?L.Layout.__all():L.Layout.all()}})}))},7524:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Socket=function(n){function Socket(){return Socket.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Socket,n),Socket.prototype.getGroup=function(){return"Core"},Socket.prototype.initOpts=function(){return Socket.__super__.initOpts.call(this),this.addOpts({url:{mandatory:!0,check:String,check:function(n){return n.trim().length>0}},onmessage:{check:Function},onclose:{check:Function},onopen:{check:Function},onerror:{check:Function}}),this},Socket.states={0:"OPENING",1:"OPEN",2:"CLOSING",3:"CLOSED"},Socket.prototype.readOpts=function(){var n;switch(Socket.__super__.readOpts.call(this),(n=L.parseLocation(this._url)).protocol){case"http":case"ws":this.__protocol="ws";break;case"https":case"wss":this.__protocol="wss"}return this._url=this._url.replace(n.protocol,this.__protocol),this},Socket.prototype.open=function(){var n,b,A;n=new L.Deferred,b=function(){"pending"===n.state()&&n.reject()};try{this.__webSocket=new WebSocket(this._url),this.__webSocket.onerror=function(n){return b()},this.__webSocket.onopen=(A=this,function(b){return A.__onOpen(b),n.resolve()}),this.__webSocket.onclose=function(n){return function(b){return n.__onClose(b)}}(this)}catch(n){b()}return n.promise()},Socket.prototype.__onOpen=function(n){return this._onopen&&this._onopen(n),this.__webSocket.onmessage=(b=this,function(n){var A;return A={},L.util.isEmpty(n.data)||(A=JSON.parse(n.data)),b._onmessage(n,A)});var b},Socket.prototype.__onClose=function(n){if(this._onclose)return this._onclose()},Socket.prototype.close=function(){return this.__webSocket.close()},Socket.prototype.send=function(n){if("OPEN"===this.getStatus())return this.__websocket.send(n)},Socket.prototype.getStatus=function(n){var b;return null==n&&(n=!0),b=this.__websocket.readyState,n?this.states[b]:b},Socket}(L.Element)},5982:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template=function(n){function Template(n){var b;Template.__super__.constructor.call(this,n),b=L.Template.nodeByName[this._name],L.util.assert(b,"CUI.Template",this._name+" not found. Make sure to call Template.loadFile(...)."),this.DOM=b.cloneNode(!0),this._class&&L.dom.addClass(this.DOM,this._class),this._attr&&L.dom.setAttributeMap(this.DOM,this._attr),this.map=this.getElMap(this._map),this.__updateTemplateEmpty(),this._init_flex_handles&&this.initFlexHandles()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Template,n),Template.prototype.initOpts=function(){return Template.__super__.initOpts.call(this),this.addOpts({name:{mandatory:!0,check:String},map_prefix:{check:String},init_flex_handles:{mandatory:!0,default:!1,check:Boolean},map:{type:"PlainObject",default:{}},class:{check:String},attr:{check:"PlainObject"}}),this},Template.prototype.initFlexHandles=function(n){var b,A,R,D,B,E,X,$,V,K;for(null==n&&(n={}),this.__flexHandles={},D=0,E=($=L.dom.matchSelector(this.DOM,"[data-cui-flex-handle]")).length;D1?(console.debug(R,V,"found more than once",D,this.DOM),X.push("* "+R+": found more than once ("+$+")"),B++):(X.push("+ "+R+": found"),A[R]=D[0],D[0].removeAttribute("data-slot"),function(n){return function(b){return A[b].empty=function(){return n.empty(b),A[b]},A[b].append=function(L){return n.append(L,b),A[b]},A[b].prepend=function(L){return n.prepend(L,b),A[b]}}}(this)(R)));return B&&L.util.assert(!1,'Not all required elements were found for Template:\n\n"'+this._name+'"\n\n'+X.join("\n")),A},Template.prototype.destroy=function(){return L.dom.remove(this.DOM),delete this.map,Template.__super__.destroy.call(this)},Template.prototype.addClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".addClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.addClass(this.map[b],n)):L.dom.addClass(this.DOM,n)},Template.prototype.removeClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".removeClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.removeClass(this.map[b],n)):L.dom.removeClass(this.DOM,n)},Template.prototype.hasClass=function(n,b){return b?(L.util.assert(this.map[b],this.__cls+".hasClass",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),L.dom.hasClass(this.map[b],n)):L.dom.hasClass(this.DOM,n)},Template.prototype.has=function(n){return!!this.map[n]},Template.prototype.hide=function(n){return n?L.dom.hideElement(this.map[n]):L.dom.hideElement(this.DOM)},Template.prototype.show=function(n){return n?L.dom.showElement(this.map[n]):L.dom.showElement(this.DOM)},Template.prototype.__updateTemplateEmpty=function(){var n,b;if(L.util.isEmptyObject(this.map))n=this.isEmpty();else for(b in n=!0,this.map)if(!this.isEmpty(b)){n=!1;break}n?L.dom.addClass(this.DOM,"cui-template-empty"):L.dom.removeClass(this.DOM,"cui-template-empty")},Template.prototype.replace=function(n,b,A){var R;return L.util.assert(this.map,"Template["+this._name+"].replace ["+this.getUniqueId()+"]","Already destroyed"),b&&L.util.assert(this.map[b],this.__cls+".replace",'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),this.__empty(b),R=this.__append(n,b,A),this.__updateTemplateEmpty(),R},Template.prototype.text=function(n,b,A){L.util.assert(L.util.isString(n),this.__cls+".text","Value must be String",{value:n,key:b,element:A}),b?this.map[b].textContent=n:this.DOM.textContent=n,this.__updateTemplateEmpty()},Template.prototype.prepend=function(n,b,A){var L;return L=this.__append(n,b,A,!0),this.__updateTemplateEmpty(),L},Template.prototype.append=function(n,b,A){var L;return L=this.__append(n,b,A,!1),this.__updateTemplateEmpty(),L},Template.prototype.empty=function(n){var b;return b=this.__empty(n),this.__updateTemplateEmpty(),b},Template.prototype.__empty=function(n){if(L.util.assert(this.map,"Template["+this._name+"].empty ["+this.getUniqueId()+"]","Already destroyed",{template:this,name:this._name}),this.isEmpty(n))return n?this.map[n]:this.DOM;if(n)return L.util.assert(this.map[n],this.__cls+".empty",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map}),L.dom.empty(this.map[n]),this.map[n];if(L.util.isEmptyObject(this.map))L.dom.empty(this.DOM);else for(n in this.map)L.dom.empty(this.map[n]);return this.DOM},Template.prototype.__append=function(n,b,A,R){var D,B,E,X,$,V;for(E=R?"prepend":"append",L.util.assert(this.map,"Template["+this._name+"]."+E+" ["+this.getUniqueId()+"]","Already destroyed"),b&&L.util.assert(this.map[b],this.__cls+"."+E,'Key "'+b+'" not found in map. Template: "'+this._name+'".',{map:this.map}),L.util.isFunction(n)&&(n=n(A)),L.util.isArray(n)||(n=[n]),B=[],X=0,$=n.length;X<$;X++)(null!=(D=n[X])?D.DOM:void 0)?B.push(D.DOM):(L.util.assert(!L.util.isPromise(D),"Template.append","value cannot be Promise",{value:n}),D&&B.push(D));return V=b?this.map[b]:this.DOM,B.length>0&&L.dom[E](V,B),V},Template.prototype.get=function(n){return L.util.assert(this.map[n],this.__cls+".get",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map,DOM:this.DOM}),this.map[n]},Template.prototype.isEmpty=function(n){return n?(L.util.assert(this.map[n],this.__cls+".isEmpty",'Key "'+n+'" not found in map. Template: "'+this._name+'".',{map:this.map}),!this.map[n].firstChild):!this.DOM.firstChild},Template.prototype.removeEmptySlots=function(){var n,b,A;for(n in A=this.map)(b=A[n]).firstChild||L.dom.remove(b);return this},Template.nodeByName={},Template.loadTemplateFile=function(n){return this.loadFile(n,!0)},Template.loadTemplateText=function(n){return this.__appendContent(n,!0)},Template.loadText=function(n){return this.__appendContent(n,!1)},Template.loadFile=function(n,b){var A,R;return null==b&&(b=!1),A=n.match("^(https://|http://|/)")?n:L.getPathToScript()+n,new L.XHR({url:A,responseType:"text"}).start().done((R=this,function(n){R.__appendContent(n,b)})).fail((function(b){return console.error('Template.loadFile: Unable to load filename: "'+n+'", see Console for more details. You can however, output easydbui.html manually before loading easydbui.js.',b)}))},Template.load=function(n){var b,A,R,D,B,E,X,$,V,K;for(null==n&&(n=document.documentElement),A=0,D=0,E=(V=L.dom.matchSelector(n,".cui-tmpl,[data-template]")).length;D0&&(document.body.appendChild(R),console.warn("Template.appendContent: contains extra content",R)),0===A?console.warn("Template.appendContent: contains no Templates"):void 0):document.body.appendChild(R)},Template}(L.Element)},320:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.XHR=function(n){function XHR(){return XHR.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(XHR,n),XHR.prototype.getGroup=function(){return"Core"},XHR.prototype.initOpts=function(){return XHR.__super__.initOpts.call(this),this.addOpts({method:{mandatory:!0,default:"GET",check:["GET","POST","PUT","DELETE","OPTIONS","HEAD","PATCH"]},url:{mandatory:!0,check:String,check:function(n){return n.trim().length>0}},user:{check:String},password:{check:String},responseType:{mandatory:!0,default:"json",check:["","text","json","blob","arraybuffer"]},timeout:{check:function(n){return n>=0}},form:{check:"PlainObject"},url_data:{check:"PlainObject"},body:{},json_data:{},json_pretty:{default:!1,check:function(n){return!1===n||!0===n||L.util.isString(n)}},headers:{mandatory:!0,default:{},check:"PlainObject"},withCredentials:{mandatory:!0,default:!1,check:Boolean}}),this},XHR.readyStates={0:"UNSENT",1:"OPENED",2:"HEADERS_RECEIVED",3:"LOADING",4:"DONE"},XHR.statusText={"-1":"abort","-2":"timeout","-3":"network_failure"},XHR.prototype.readOpts=function(){var n,b,A,R;for(n in XHR.__super__.readOpts.call(this),this.__xhr=new XMLHttpRequest,this.__xhr.withCredentials=this._withCredentials,this.__readyStatesSeen=[this.readyState()],this.__registerEvents("download"),this.__registerEvents("upload"),this.__headers={},b=this._headers)R=b[n],this.__headers[n.toLowerCase()]=R;return this._form&&(this.opts.method||(this._method="POST")),this._url_data?this.__url=L.appendToUrl(this._url,this._url_data):this.__url=this._url,A=0,this._form&&(A+=1),this._json_data&&(A+=1,void 0===this.__headers["content-type"]&&(this.__headers["content-type"]="application/json; charset=utf-8")),this._body&&(A+=1),L.util.assert(A<=1,"new CUI.XHR","opts.form, opts.json_data, opts.body are mutually exclusive."),this},XHR.prototype.__registerEvents=function(n){var b,A,L,R,D,B,E,X;for(D=["loadStart","progress","abort","error","load","loadend","timeout"],"upload"===n?E=this.__xhr.upload:(D.push("readyStateChange"),E=this.__xhr),X=this,A=function(n,b){return E.addEventListener(b.toLowerCase(),(function(b){return X[n](b)}))},L=0,B=D.length;L=200&&this.__xhr.status<300||304===this.__xhr.status)},XHR.prototype.status=function(){return this.__status<0?this.__status:this.__xhr.status},XHR.prototype.statusText=function(){return this.__status<0?L.XHR.statusText[this.__status+""]:this.__xhr.statusText},XHR.prototype.response=function(){var n;if("json"===this._responseType&&""===this.__xhr.responseType)try{n=JSON.parse(this.__xhr.response)}catch(b){n=this.__xhr.response}else n=this.__xhr.response;return"json"===this._responseType&&(this.__xhr.responseJSON=n),n},XHR.prototype.start=function(){var n,b,A,R,D,B;for(b in this.__xhr.open(this._method,this.__url,!0,this._user,this._password),A=this.__headers)B=A[b],this.__xhr.setRequestHeader(b,B);if(this.__xhr.responseType=this._responseType,this.__xhr.timeout=this._timeout,this._form){for(b in n=new FormData,R=this._form)B=R[b],n.append(b,B);D=n}else D=this._json_data?this._json_pretty?!0===this._json_pretty?JSON.stringify(this._json_data,null,"\t"):JSON.stringify(this._json_data,null,this._json_pretty):JSON.stringify(this._json_data):this._body?this._body:void 0;return this.__dfr=new L.Deferred,this.__xhr.send(D),this.__dfr.promise()},XHR.prototype.getXHR=function(){return this.__xhr},XHR.prototype.getAllResponseHeaders=function(){var n,b,A,L,R;for(b=[],A=0,L=(R=this.__xhr.getAllResponseHeaders().split("\r\n")).length;A{var L=A(7288);L.dom=function(){function dom(){}return dom.data=function(n,b,A){var R,D,B;if(n){if(n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"dom.data","node needs to be instance of HTMLElement",{node:n}),void 0===b)return n.__dom_data||{};if(L.util.isPlainObject(b)){for(R in b)B=b[R],L.dom.data(n,R,B);return n}return void 0===A?null!=(D=n.__dom_data)?D[b]:void 0:(n.__dom_data||(n.__dom_data={}),n.__dom_data[b]=A,n)}},dom.removeData=function(n,b){if(n)return n.__dom_data&&(delete n.__dom_data[b],L.util.isEmptyObject(n.__dom_data)&&delete n.__dom_data),n},dom.findElement=function(n,b,A,L,R){var D;return null==L&&(L=!0),null==R&&(R=!1),0===(D=this.findElements(n,b,A,1,L,R)).length?null:D[0]},dom.findNextElement=function(n,b,A,L,R){var D,B;if(null==A&&(A=!1),null==L&&(L=!0),null==R&&(R=!0),D=this.findElement(n,b,A,L,R))return D;for(;;){if(!(n=n.parentNode))return null;if(B=L?n.nextElementSibling:n.previousElementSibling)break}return this.findNextElement(B,b,A,L,!1)},dom.findPreviousElement=function(n,b,A){return null==A&&(A=!1),this.findNextElement(n,b,A,!1)},dom.findNextVisibleElement=function(n,b,A){return null==A&&(A=!0),this.findNextElement(n,b,(function(n){return L.dom.isVisible(n)}),A)},dom.findPreviousVisibleElement=function(n,b){return this.findNextVisibleElement(n,b,!1)},dom.findNextSiblings=function(n,b,A){return null==A&&(A=!1),this.findElements(n,b,A,null,!0,!0)},dom.findPreviousSiblings=function(n,b,A){return null==A&&(A=!1),this.findElements(n,b,A,null,!1,!0)},dom.findElements=function(n,b,A,R,D,B,E){var X,$,V,K;return null==n&&(n=document.documentElement),null==b&&(b=null),null==A&&(A=!1),null==R&&(R=null),null==D&&(D=!0),null==B&&(B=!1),E?$=!0:(L.util.assert(n instanceof HTMLElement,"DOM.findElement","node needs to be instanceof HTMLElement.",{node:n,selector:b}),E=[],$=!B),X=!A||A(n),$&&X&&(null===b||L.dom.matches(n,b))&&(E.push(n),E.length===R)||(D?(V=n.firstElementChild,K=n.nextElementSibling):(V=n.lastElementChild,K=n.previousElementSibling),V&&!B&&X&&(this.findElements(V,b,A,R,D,B,E),E.length===R)||K&&(this.findElements(K,b,A,R,D,B,E),E.length)),E},dom.children=function(n,b){var A,L,R,D,B,E;for(L=[],D=R=0,B=(E=n.children).length;Rb.length||D++,B=b.length;return n}switch(typeof b){case"number":case"boolean":R=document.createTextNode(b+"");break;case"string":R=document.createTextNode(b);break;default:if(b.hasOwnProperty("DOM")){if(R=b.DOM,L.util.isNull(R))return}else R=b}return n.hasOwnProperty("DOM")&&n.DOM instanceof Node&&(n=n.DOM),A?(L.util.assert(R instanceof Node,"CUI.dom.append","Content needs to be instanceof Node, string, boolean, or number.",{node:R}),n.appendChild(R)):(L.util.assert(R instanceof Node,"CUI.dom.prepend","Content needs to be instanceof Node, string, boolean, or number.",{node:R}),n.insertBefore(R,n.firstChild)),n},dom.replace=function(n,b){return n.hasOwnProperty("DOM")&&(n=n.DOM),this.empty(n),this.append(n,b)},dom.prepend=function(n,b){return this.__append(n,b,!1)},dom.append=function(n,b){return this.__append(n,b)},dom.getAttribute=function(n,b){return n.hasOwnProperty("DOM")&&(n=n.DOM),n.getAttribute(b)},dom.remove=function(n){var b,A;return(b=(null!=n?n.DOM:void 0)||n)?(null!=(A=b.parentNode)&&A.removeChild(b),b):null},dom.empty=function(n){var b;if(!n)return null;for(n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(L.util.isElement(n),"CUI.dom.empty","top needs to be Element",{node:n});b=n.lastChild;)n.removeChild(b);return n},dom.hasClass=function(n,b){var A,L,R,D;if(!n||!b)return null;for(n.DOM&&(n=n.DOM),L=0,R=(D=b.trim().split(/\s+/)).length;L= 0",{element:n,offset:b}),(B=n.offsetParent)===document.documentElement?(D={top:0,left:0},A={top:document.body.scrollTop,left:document.body.scrollLeft}):((D={top:(R=L.dom.getDimensions(B)).top,left:R.left}).top+=R.borderTopWidth,D.left+=R.borderLeftWidth,A={top:R.scrollTop,left:R.scrollLeft}),L.dom.setStyle(n,{top:b.top-D.top+A.top,left:b.left-D.left+A.left})},dom.__failedDOMInserts=0,dom.waitForDOMRemove=function(n){var b,A,R,D;return D=L.Element.readOpts(n,"CUI.dom.waitForDOMRemove",{node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}},ms:{default:200,check:function(n){return n>0}}}),R=L.dom.getNode(D.node),A=new L.Deferred,(b=function(){if(L.dom.isInDOM(R))return L.setTimeout({call:b,ms:D.ms,track:!1});A.resolve()})(),A.promise()},dom.waitForDOMInsert=function(n){var b,A,R,D,B,E,X,$;if(B=L.Element.readOpts(n,"CUI.dom.waitForDOMInsert",{node:{mandatory:!0,check:function(n){return L.dom.isNode(n)}}}),D=L.dom.getNode(B.node),L.dom.isInDOM(D))return L.resolvedPromise(!0);for(b=new L.Deferred,A=0,R=(X=["-webkit-","-moz-","-ms-","-o-",""]).length;A=0&&A<=n.children.length,"CUI.dom.insertAtPosition","Unable to insert node at position #"+A+".",{node:n,node_insert:b,pos:A}),A===n.children.length?n.appendChild(b):n.children[A]!==b?this.insertBefore(n.children[A],b):void 0},dom.insertBefore=function(n,b){var A;return(A=(null!=n?n.DOM:void 0)||n)?(b&&A.parentNode.insertBefore(b,A),A):null},dom.insertAfter=function(n,b){var A;return(A=(null!=n?n.DOM:void 0)||n)?(b&&A.parentNode.insertBefore(b,A.nextSibling),A):null},dom.is=function(n,b){return n?b instanceof HTMLElement?n===b:L.util.isFunction(b)?!!b(n):n instanceof HTMLElement?this.matches(n,b):null:null},dom.matches=function(n,b){return n?n[L.dom.matchFunc](b):null},dom.matchFunc=function(){var n,b,A,R,D;for(n=document.createElement("div"),b=0,R=(D=["matches","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector"]).length;b0;)this.insertAfter(A,b[b.length-1]);return A}return n.parentNode.replaceChild(b,n)},dom.getRect=function(n){return n.hasOwnProperty("DOM")&&(n=n.DOM),n.getBoundingClientRect()},dom.getComputedStyle=function(n){return n.hasOwnProperty("DOM")&&(n=n.DOM),window.getComputedStyle(n)},dom.setStyle=function(n,b,A){var R,D,B;for(R in null==A&&(A="px"),n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"CUI.dom.setStyle","docElem needs to be instanceof HTMLElement.",{docElem:n}),b)if(void 0!==(B=b[R])){switch(B){case"":case null:D="";break;default:D=isNaN(Number(B))?B:0===B||"0"===B?0:B+A}R.startsWith("--")?n.style.setProperty(R,D):n.style[R]=D}return n},dom.getStyle=function(n){var b,A,R,D;for(A in n.hasOwnProperty("DOM")&&(n=n.DOM),D={},b=n.style)R=b[A],L.util.isNull(R)||(D[A]=R);return D},dom.setStyleOne=function(n,b,A){var L;return(L={})[b]=A,this.setStyle(n,L)},dom.setStylePx=function(n,b){return console.error("CUI.dom.setStylePx is deprectaed, use CUI.dom.setStyle."),this.setStyle(n,b)},dom.getRelativePosition=function(n){var b;return L.util.assert(n instanceof HTMLElement,"CUI.dom.getRelativePosition","docElem needs to be instanceof HTMLElement.",{docElem:n}),{top:(b=L.dom.getDimensions(n)).offsetTopScrolled,left:b.offsetLeftScrolled}},dom.getDimensions=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot,ft,mt,_t;if(L.util.isNull(n))return null;if(n===window||n===document)return{width:window.innerWidth,height:window.innerHeight};for(n.hasOwnProperty("DOM")&&(n=n.DOM),A={computedStyle:b=this.getComputedStyle(n),clientBoundingRect:lt=this.getRect(n)},D=0,K=(ut=["margin","padding","border"]).length;D0&&("function"==typeof b&&b(L,V),A.push(V));break;case 1:R.push(L)}this.findTextInNodes(R,b,A)}return A},dom.getCSSFloatValue=function(n){return-1===n.indexOf("px")?0:parseFloat(n.substr(0,n.length-2))},dom.isPositioned=function(n){var b;return L.util.assert(n instanceof HTMLElement,"CUI.dom.isPositioned","docElem needs to be instance of HTMLElement.",{docElem:n}),"relative"===(b=this.getComputedStyle(n).position)||"absolute"===b||"fixed"===b},dom.isVisible=function(n){var b;return!n.hidden&&("hidden"!==(b=this.getComputedStyle(n)).visibility&&"none"!==b.display)},dom.getBoxSizing=function(n){return this.getComputedStyle(n).boxSizing},dom.isBorderBox=function(n){return"border-box"===this.getBoxSizing(n)},dom.isContentBox=function(n){return"content-box"===this.getBoxSizing(n)},dom.hideElement=function(n){if(n)return n.hasOwnProperty("DOM")&&(n=n.DOM),"none"!==n.style.display&&(n.__saved_display=n.style.display),n.hidden=!0,n},dom.focus=function(n){if(n)return n.DOM&&(n=n.DOM),n.focus()},dom.blur=function(n){if(n)return n.DOM&&(n=n.DOM),n.blur()},dom.removeChildren=function(n,b){var A,R,D,B;for(L.util.assert(n instanceof HTMLElement,"CUI.dom.removeChildren","element needs to be instance of HTMLElement",{element:n}),R=0,D=(B=this.children(n,b)).length;R0&&(Q.scrollTop=Q.scrollTop+X,E()),(K=b.viewportTopMargin-A.viewportTopContent)<0&&(Q.scrollTop=Q.scrollTop+K,E())),"visible"!==A.computedStyle.overflowX&&((V=b.viewportRightMargin-A.viewportRightContent)>0&&(Q.scrollLeft=Q.scrollLeft+V,E()),($=b.viewportLeftMargin-A.viewportLeftContent)<0&&(Q.scrollLeft=Q.scrollLeft+$,E()));return n},dom.setClassOnMousemove=function(n){var b,A,R,D;return null==n&&(n={}),A=L.Element.readOpts(n,"CUI.dom.setClassOnMousemove",{delayRemove:{check:Function},class:{mandatory:!0,check:String},ms:{default:3e3,mandatory:!0,check:function(n){return n>0}},element:{mandatory:!0,check:function(n){return n instanceof HTMLElement}},instance:{}}),b=function(){return L.dom.addClass(A.element,A.class),D()},R=function(){if(!("function"==typeof A.delayRemove?A.delayRemove():void 0)&&!L.globalDrag)return L.dom.removeClass(A.element,A.class);D()},D=function(){return L.scheduleCallback({ms:A.ms,call:R})},L.Events.listen({node:A.element,type:["mousemove","wheel"],instance:A.instance,call:function(n){b()}}),L.Events.listen({node:A.element,type:"mouseleave",instance:A.instance,call:function(){return R()}})},dom.requestFullscreen=function(n){var b,A;return n.hasOwnProperty("DOM")&&(n=n.DOM),L.util.assert(n instanceof HTMLElement,"startFullscreen","element needs to be instance of HTMLElement",{element:n}),n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen(),b=new L.Deferred,A=L.Events.listen({type:"fullscreenchange",node:window,call:function(n){L.dom.isFullscreen()?b.notify():(L.Events.ignore(A),b.resolve())}}),b.promise()},dom.getLayerSidebarWidth=function(){var n;return(n=L.dom.matchSelector(document.documentElement,".cui-layer-sidebar--active"))[0]?L.dom.getDimensions(n[0]).marginBoxWidth:0},dom.exitFullscreen=function(){var n;return L.dom.isFullscreen()?(n=new L.Deferred,document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),L.Events.listen({type:"fullscreenchange",node:window,only_once:!0,call:function(){n.resolve()}}),n.promise()):L.resolvedPromise()},dom.fullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||void 0},dom.fullscreenEnabled=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||!1},dom.isFullscreen=function(){return document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!!document.msFullscreenElement||!1},dom.$element=function(n,b,A,R){return null==A&&(A={}),null==R&&(R=!1),L.util.isEmpty(b)||(A.class=b),R&&(L.util.isEmpty(b)?A.class="cui-"+n:A.class="cui-"+n+" "+b,n="div"),L.dom.element(n,A)},dom.div=function(n,b){return L.dom.$element("div",n,b)},dom.video=function(n,b){return L.dom.$element("video",n,b)},dom.audio=function(n,b){return L.dom.$element("audio",n,b)},dom.source=function(n,b){return L.dom.$element("source",n,b)},dom.span=function(n,b){return L.dom.$element("span",n,b)},dom.table=function(n,b){return L.dom.$element("table",n,b,!0)},dom.img=function(n,b){return L.dom.$element("img",n,b)},dom.tr=function(n,b){return L.dom.$element("tr",n,b,!0)},dom.th=function(n,b){return L.dom.$element("th",n,b,!0)},dom.td=function(n,b){return L.dom.$element("td",n,b,!0)},dom.i=function(n,b){return L.dom.$element("i",n,b)},dom.p=function(n,b){return L.dom.$element("p",n,b)},dom.pre=function(n,b){return L.dom.$element("pre",n,b)},dom.ul=function(n,b){return L.dom.$element("ul",n,b)},dom.a=function(n,b){return L.dom.$element("a",n,b)},dom.b=function(n,b){return L.dom.$element("b",n,b)},dom.li=function(n,b){return L.dom.$element("li",n,b)},dom.label=function(n,b){return L.dom.$element("label",n,b)},dom.h1=function(n,b){return L.dom.$element("h1",n,b)},dom.h2=function(n,b){return L.dom.$element("h2",n,b)},dom.h3=function(n,b){return L.dom.$element("h3",n,b)},dom.h4=function(n,b){return L.dom.$element("h4",n,b)},dom.h5=function(n,b){return L.dom.$element("h5",n,b)},dom.h6=function(n,b){return L.dom.$element("h6",n,b)},dom.text=function(n,b,A){var R;return(R=L.dom.span(b,A)).textContent=n,R},dom.textEmpty=function(n){var b;return(b=L.dom.span("italic")).textContent=n,b},dom.table_one_row=function(){return L.dom.append(L.dom.table(),L.dom.tr_one_row.apply(this,arguments))},dom.tr_one_row=function(){var n,b,A,R,D,B,E;for(E=L.dom.tr(),b=function(n){var b,A;A=L.dom.td(),L.dom.append(E,A),b=function(n){var R,D,B;if(L.util.isArray(n))for(D=0,B=n.length;D{var L,R,D,B,E=A(7288);R=A(8214),L=A(2400),D=A(3185),B=A(2689),E.util=function(){function util(){}return util.assert=function(n,b,A,L){var R,D,B,X,$;if(E.defaults.asserts&&!n){try{new Error("dummy").stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@").replace().split("\n")}catch(n){"Can't get callstack in this browser. Try using Stacktrace.js"}if(X=[],L){for(D in R=[b+":"],L)$=L[D],R.push(D+":"),X.push(D),R.push($);console.debug.apply(console,R)}switch(B=X.length?b+"("+X.join(",")+")":b,A&&(B+=": "+A),E.defaults.asserts_alert){case"debugger":break;case"js":alert(B);break;case"cui":E.problem({text:B})}if(!E.__in_error)throw E.__in_error=!0,E.setTimeout((function(){return E.__in_error=!1})),new Error(B);console.error("Another assert occurred, cannot throw Error to avoid loop: ",B)}},util.assertImplements=function(n,b){var A,L,R,D;if(E.defaults.asserts){for(D=[],A=0,L=b.length;A=0},util.isContent=function(n){return E.util.isElement(n)||n instanceof HTMLCollection||n instanceof NodeList||E.util.isArray(n)||E.util.isFunction(n)||E.util.isElement(null!=n?n.DOM:void 0)},util.isNumber=function(n){return E.util.isInteger(n)||E.util.isFloat(n)},util.isFloat=function(n){return n===+n&&n!==(0|n)},util.isInteger=function(n){return Number.isInteger(n)},util.isPromise=function(n){return n instanceof E.Promise||n instanceof E.Deferred},util.isDeferred=function(n){return n instanceof E.Deferred},util.escapeRegExp=function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},util.getIntOrString=function(n){return E.util.getInt(n,!0)},util.getInt=function(n,b){var A;return null==b&&(b=!1),E.util.isNull(n)?null:(A=parseInt(n),isNaN(A)||(A+"").length!==(n+"").trim().length?b?n:null:A)},util.getFloat=function(n){var b;return E.util.isNull(n)?null:(b=parseFloat(n),isNaN(b)?null:b)},util.xor=function(n,b){return!!(n&&!b||!n&&b)},util.toHtml=function(n,b){return E.util.isNull(n)||!E.util.isString(n)?"":(n=n.replace(/&/g,"&").replace(/\'/g,"'").replace(//g,">").replace(/\"/g,"""),b?n.replace(/\s/g," "):n)},util.copyObject=function(n,b,A){var L,R,D,B,X,$,V,K,Q;if(null==b&&(b=!1),null==A&&(A=0),!(A>100)){if("string"==(K=typeof n)||"number"===K||"boolean"===K||"function"===K)return n;if(E.util.isNull(n))return n;if(n instanceof E.Element)return 0===A||b?n.copy():n;if(n instanceof HTMLElement)return n.cloneNode?n.cloneNode(!0):n;if(n instanceof E.Dummy)return n;if(E.util.isPlainObject(n)){for(D in $={},n)if(Q=n[D],b)try{$[D]=E.util.copyObject(Q,!0,A+1)}catch(b){throw L=b,console.error("Error during Object copy:",L.toString(),"Key:",D,"Object:",n),L}else $[D]=Q;return $}if(E.util.isArray(n)){if(!b)return n.slice(0);for(X=[],R=0,B=n.length;R":E.util.isNull(n)?"":E.util.getObjectClass(n)};try{return JSON.stringify(A(n),null,b)}catch(n){return L=n,console.error(L),"Unable to dump object"}},util.alert_dump=function(n){return alert(E.util.dump(n," "))},util.toDash=function(n){var b;return(b=(b=(b=(n+="U").substring(0,1)+n.substring(1).replace(/([A-Z](?![A-Z0-9]))/g,(function(n){return"-"+n.toLowerCase()}))).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()).substring(0,b.length-2)).replace(/\./g,"-")},util.toClass=function(n){return E.util.toDash(n).replace(/_/g,"-").replace(/\s+/g,"-")},util.toDot=function(n){return E.util.toDash(n).replace(/-/g,".")},util.toCamel=function(n,b){return null==b&&(b=!1),b?n.replace(/((\-|^)[a-z])/g,(function(n){return n.toUpperCase().replace("-","")})):n.replace(/(\-[a-z])/g,(function(n){return n.toUpperCase().replace("-","")}))},util.removeFromArray=function(n,b,A){var L,R;for(E.util.assert(E.util.isArray(b),"removeFromArray","Second parameter needs to be an Array",{value:n,array:b,compFunc:A}),R=0;(L=E.util.idxInArray(n,b,A))>-1;)b.splice(L,1),R++;return R},util.moveInArray=function(n,b,A,L){var R;return null==L&&(L=!1),n===b||(n>b?L&&b++:L||b--,R=A.splice(n,1)[0],A.splice(b,0,R)),b},util.compareIndex=function(n,b){return nb?1:0},util.pushOntoArray=function(n,b,A){var L;return-1===(L=E.util.idxInArray(n,b,A))?(b.push(n),b.length-1):L},util.idxInArray=function(n,b,A){var L,R,D,B,X;if(!A)return b.indexOf(n);for(D=-1,R=B=0,X=b.length;B0?n.replace(new RegExp(L.join("|"),"g"),(function(n){return b[n]})):n},util.mergeMap=function(n,b){var A,L;for(A in b)L=b[A],n.hasOwnProperty(A)?E.util.isPlainObject(n[A])&&E.util.isPlainObject(L)&&E.util.mergeMap(n[A],L):n[A]=L;return n},util.copyToClipboard=function(n){var b;n&&((b=E.dom.element("textarea",{style:{position:"absolute",left:"-9999px"}})).value=n,E.dom.append(document.body,b),b.select(),document.execCommand("copy"),E.dom.remove(b))},util.removePropertyRecursively=function(n,b,A){var L,R,D,B,X,$,V;if(null==A&&(A=new Set),!A.has(n)){if(A.add(n),Array.isArray(n)){for(X=[],R=0,B=n.length;R{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(6680)),L.Block=function(n){function Block(n){var b;Block.__super__.constructor.call(this,n),this.__block=new L.Template({name:this.getTemplateName(),map:{header:!0,content:!0}}),this.registerTemplate(this.__block),this._header?this.setHeader(this._header):(b=[],(this._text||this._icon)&&(this.__label=new L.Label({class:"cui-block-title",text:this._text,icon:this._icon,multiline:!0}),b.push(this.__label)),this._description&&b.push(new L.Label({class:"cui-block-description",text:this._description,markdown:!0,multiline:!0})),b.length>0&&this.setHeader(b)),this._content&&this.setContent(this._content),this.addClass("appearance-"+this._appearance),this.addClass("cui-block-level-"+this._level),this.maximizeAddClasses(),this._padded&&this.addClass("cui-block--padded")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Block,n),Block.prototype.initOpts=function(){return Block.__super__.initOpts.call(this),this.addOpts({text:{check:String},description:{check:String},header:{check:function(n){return!!(L.util.isContent(n)||L.util.isString(n)||(null!=n?n.DOM:void 0))}},icon:{check:L.Icon},content:{check:function(n){return!!(L.util.isContent(n)||L.util.isString(n)||(null!=n?n.DOM:void 0))}},level:{mandatory:!0,default:1,check:[1,2,3]},appearance:{default:"normal",mandatory:!0,check:["normal","wide","muted"]},padded:{check:Boolean,default:!0},maximize:{check:Boolean},maximize_horizontal:{check:Boolean,default:!1},maximize_vertical:{check:Boolean,default:!1}})},Block.prototype.readOpts=function(){return Block.__super__.readOpts.call(this),L.util.assert(!((this._text||this._icon)&&this._header),"new CUI.Block","opts.text and opts.header are mutually exclusive.",{opts:this.opts}),L.Layout.prototype.maximizeReadOpts.call(this),this},Block.prototype.maximizeAddClasses=function(){return L.Layout.prototype.maximizeAddClasses.call(this)},Block.prototype.getTemplateName=function(){return"block"},Block.prototype.setText=function(n){return L.util.assert(this.__label,"Block.setText","Block must not be called with opts.header and with opts.text or opts.icon.",{opts:this.opts}),this.__label.setText(n)},Block.prototype.setIcon=function(n){return L.util.assert(this.__label,"Block.setText","Block must not be called with opts.header and with opts.text or opts.icon.",{opts:this.opts}),this.__label.setIcon(n)},Block.prototype.setHeader=function(n){return this.__block.replace(n,"header")},Block.prototype.setContent=function(n){return this.__block.replace(n,"content")},Block.prototype.getContent=function(){return this.__block.map.content},Block.prototype.getHeader=function(){return this.__block.map.header},Block.prototype.appendContent=function(n){return this.__block.append(n,"content")},Block}(L.DOMElement)},1934:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1138)),L.BorderLayout=function(n){function BorderLayout(){return BorderLayout.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(BorderLayout,n),BorderLayout.prototype.getName=function(){return"border-layout"},BorderLayout.prototype.getPanes=function(){return["north","west","east","south"]},BorderLayout.prototype.getSupportedPanes=function(){return this.getPanes()},BorderLayout.prototype.getTemplateMap=function(){var n;return(n=BorderLayout.__super__.getTemplateMap.call(this)).row=!0,n},BorderLayout.prototype.__init=function(){var n;return BorderLayout.__super__.__init.call(this),this._absolute&&(L.dom.addClass(this.getLayout().map.row,"cui-absolute"),L.Events.listen({type:"viewport-resize",node:this.getLayout().map.row,call:(n=this,function(b){return b.stopPropagation(),L.Layout.setAbsolute(n.getLayout().map.row)})})),this},BorderLayout}(L.Layout)},6286:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5938)),L.Template.loadTemplateText(A(3786)),L.Button=function(n){function Button(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt;if(Button.__super__.constructor.call(this,n),this._tooltip&&(this._tooltip.text||this._tooltip.content)&&(this.__tooltipOpts=this._tooltip),this.__has_left=!0,this.__has_right=!0,this.__has_center=!0,nt=this.getTemplateName(),this.__box=new L.Template({name:nt,map:{left:this.__has_left?".cui-button-left":void 0,center:this.__has_center?".cui-button-center":void 0,visual:L.__ng__?".cui-button-visual":void 0,right:this.__has_right?".cui-button-right":void 0}}),this.registerTemplate(this.__box),this.__active=null,this.__disabled=!1,this.__loading=!1,this.__hidden=!1,this.__txt=null,this.addClass("cui-button-button"),L.util.isString(null!=(E=this.__tooltipOpts)?E.text:void 0)?(this.setAria("label",null!=(X=this.__tooltipOpts)?X.text:void 0),this.__hasAriaLabel=!0):this.__hasAriaLabel=!1,L.dom.setAttribute(this.DOM,"tabindex",this._tabindex),"flat"!==this._appearance||(null!=($=this._attr)?$.title:void 0)||L.dom.setAttribute(this.DOM,"title",this._text),(null!=(V=this._attr)?V.role:void 0)||L.dom.setAttribute(this.DOM,"role",this._role),this._left&&!0!==this._left?this.append(this._left,"left"):(this._icon?(L.util.assert(L.util.isUndef(this._icon_left),"new "+this.__cls,"opts.icon conflicts with opts.icon_left",{opts:this.opts}),b=this._icon):b=this._icon_left,b&&(L.util.assert(!this._icon_active&&!this._icon_inactive,"new CUI.Button","opts.icon_active or opts.icon_inactive cannot be set together with opts.icon or opts.icon_left",{opts:this.opts}),this.setIcon(b))),this._right?!0!==this._right&&this.append(this._right,"right"):this._icon_right?this.setIconRight(this._icon_right):this._menu&&!1!==this._icon_right&&(this.addClass("cui-button--has-caret"),this._menu_parent?this.setIconRight(L.defaults.class.Button.defaults.arrow_right):this.setIconRight(L.defaults.class.Button.defaults.arrow_down)),this.setSize(this._size),this._appearance&&this.addClass("cui-button-appearance-"+this._appearance),this._primary&&this.addClass("cui-button--primary"),this._secondary&&!this._primary&&this.addClass("cui-button--secondary"),this._danger&&this.addClass("cui-button--danger"),this._class&&this.addClass(this._class),this._center?this.append(this._center,"center"):this._text&&this.setText(this._text),this._disabled&&(!0===this._disabled||this._disabled.call(this,this))&&this.disable(),this._loading&&(!0===this._loading||this._loading.call(this,this))&&this.setLoading(!0),this._hidden&&(!0===this._hidden||this._hidden.call(this,this))&&this.hide(),!0===this._active?this.activate({initial_activate:!0}):!1===this._active||this._switch?this.deactivate({initial_activate:!0}):this.__setState(),this.__radio_allow_null=this._radio_allow_null,this._radio?(L.util.assert(L.util.isUndef(this._switch),"new CUI.Button","opts.switch conflicts with opts.radio.",{opts:this.opts}),!0===this._radio?this.__radio="radio--"+this.getUniqueId():this.__radio=this._radio):L.util.isNull(this._switch)||(this.__radio="switch--"+this.getUniqueId(),this.__radio_allow_null=!0),this.__radio&&(L.util.assert(!(null!=(K=this._attr)?K.radio:void 0),"new CUI.Button","opts.radio conflicts with opts.attr.radio",{opts:this.opts}),L.dom.setAttribute(this.DOM,"radio",this.__radio)),this.setGroup(this._group),this._menu){for(R in this.__menu_opts={},A={},Q=this._menu)switch(it=Q[R],R){case"onShow":case"onHide":continue;case"class":case"backdrop":case"onPosition":case"placement":case"placements":case"pointer":this.__menu_opts[R]=it;break;default:A[R]=it}L.util.isEmpty(this._class)||(this.__menu_opts.class?this.__menu_opts.class+=" "+this._class:this.__menu_opts.class=this._class),this._menu.itemList?this.__menu_opts.itemList=this._menu.itemList:this.__menu_opts.itemList=A,this.__menu_opts.element=this,this.__menu_opts.hasOwnProperty("use_element_width_as_min_width")||this._menu_parent||(this.__menu_opts.use_element_width_as_min_width=!0),this.__menu_opts.onHide=(rt=this,function(){var n;return"function"==typeof(n=rt._menu).onHide?n.onHide():void 0}),this.__menu_opts.onShow=function(n){return function(){var b;return"function"==typeof(b=n._menu).onShow?b.onShow():void 0}}(this),this.__menu_opts.hasOwnProperty("backdrop")||(this.__menu_opts.backdrop={policy:"click-thru"}),!this.__menu_opts.backdrop.hasOwnProperty("blur")&&(null!=(tt=this._menu_parent)&&null!=(ot=tt.getOpt("backdrop"))?ot.blur:void 0)&&(this._menu_on_hover?this.__menu_opts.backdrop={policy:"click-thru",blur:!0}:this.__menu_opts.backdrop.blur=!0),this._menu_parent&&(this.__menu_opts.parent_menu=this._menu_parent)}L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(n){return function(b){var A,R,D,B;if(!b.hasModifierKey()){if(13===(D=b.keyCode())||32===D)return n.onClickAction(b),void b.stop();if(27===b.keyCode())return n.DOM.blur(),void b.stop();switch(A=null,B=function(){return A=L.dom.findNextVisibleElement(n.DOM,"[tabindex]")},R=function(){return A=L.dom.findPreviousVisibleElement(n.DOM,"[tabindex]")},b.keyCode()){case 39:case 40:B();break;case 37:case 38:R()}A&&(A.focus(),b.stop())}}}(this)}),L.Events.listen({type:L.Button.clickTypesPrevent[this._click_type],node:this.DOM,call:function(n){n.preventDefault()}}),L.Events.listen({type:L.Button.clickTypes[this._click_type],node:this.DOM,call:function(n){return function(b){L.globalDrag||(0===b.getButton()||b.getType().startsWith("touch"))&&(b.stopPropagation(),n.onClickAction(b))}}(this)}),this._menu_on_hover&&(L.Button.menu_timeout=null,B=function(){if(L.Button.menu_timeout)return L.clearTimeout(L.Button.menu_timeout),L.Button.menu_timeout=null},D=function(n){return function(b,A){return null==A&&(A=700),B(),L.Button.menu_timeout=L.setTimeout({ms:A,call:function(){return n.getMenu().hide(b)}})}}(this)),(this._menu_on_hover||this.__tooltipOpts||this._onMouseenter)&&L.Events.listen({type:"mouseenter",node:this.DOM,call:function(n){return function(b){var A,R;L.globalDrag||("function"==typeof n._onMouseenter&&n._onMouseenter(b),b.isImmediatePropagationStopped()||(n.__tooltipOpts&&(n.__initTooltip(),n.getTooltip().showTimeout().start()),n._menu_on_hover&&(A=n.getMenu(),B(),!n.__disabled&&A.hasItems(b)&&((R=L.dom.data(L.dom.find(".cui-button--hover-menu")[0],"element"))&&R!==A&&R.hide(b),L.dom.addClass(A.DOM,"cui-button--hover-menu"),L.Events.ignore({instance:n,node:A}),L.Events.listen({type:"mouseenter",node:A,instance:n,only_once:!0,call:function(){return B()}}),L.Events.listen({type:"mouseleave",node:A,instance:n,only_once:!0,call:function(){return D(b)}}),A.show(b)))))}}(this)}),L.Events.listen({type:"mouseleave",node:this.DOM,call:function(n){return function(b){L.globalDrag||("function"==typeof n._onMouseleave&&n._onMouseleave(b),n._menu_on_hover&&D(b,100))}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Button,n),Button.defaults={confirm_ok:"Ok",confirm_icon:"question",confirm_cancel:"Cancel",confirm_title:"Confirmation",disabled_css_class:"cui-disabled",loading_css_class:"cui-loading",active_css_class:"cui-active",arrow_down:"fa-angle-down",arrow_right:"fa-angle-right"},Button.prototype.setSize=function(n){var b,A,L,R,D,B,E;for(E=[],A=0,R=(B=this.DOM.classList).length;A0))return[];for(R=E[E.length-1],$=[],D=0,B=(X=L.dom.matchSelector(R,".cui-button["+n+'="'+b+'"]')).length;D{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(7467)),L.Template.loadTemplateText(A(7761)),L.ButtonHref=function(n){function ButtonHref(n){var b;ButtonHref.__super__.constructor.call(this,n),b={href:this._href,tabindex:"0",target:this._target},this._download&&(b.download="download"),L.dom.setAttributeMap(this.DOM,b)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ButtonHref,n),ButtonHref.prototype.initOpts=function(){return ButtonHref.__super__.initOpts.call(this),this.addOpts({href:{check:String},download:{check:Boolean},target:{check:String}})},ButtonHref.prototype.readOpts=function(){return ButtonHref.__super__.readOpts.call(this),void 0===this._icon_right&&"link"===this._appearance&&(this._icon_right="external_link"),this},ButtonHref.prototype.setHref=function(n){return L.dom.setAttribute(this.DOM,"href",n)},ButtonHref.prototype.getTemplateName=function(){return ButtonHref.__super__.getTemplateName.call(this),L.__ng__?"buttonHref-ng":"buttonHref"},ButtonHref}(L.Button)},6499:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.Template.loadTemplateText(A(7005)),L.Buttonbar=function(n){function Buttonbar(n){var b,A,R,D,B,E,X,$;for(this.__setVisibilityClasses=(b=this.__setVisibilityClasses,A=this,function(){return b.apply(A,arguments)}),Buttonbar.__super__.constructor.call(this,n),this.__box=new L.Template({name:"buttonbar"}),this.registerTemplate(this.__box),this.__buttons=this.__box.DOM,this.__groupDivs={},this._tooltip&&(($=L.util.copyObject(this._tooltip)).element=this.__buttons,this.__tooltip=new L.Tooltip($)),B=D=0,E=(X=this._buttons).length;D0?(n=!0,L.dom.showElement(b)):L.dom.hideElement(b);return this.__setVisibilityClasses(this.__buttons)>0?(n=!0,(null!=(R=this.__tooltip)?R.isShown():void 0)&&this.__tooltip.position()):L.dom.showElement(this.__buttons),n?L.dom.showElement(this):L.dom.hideElement(this),this},Buttonbar.prototype.removeButtons=function(){return L.dom.empty(this.__buttons)},Buttonbar.prototype.prependButton=function(n,b){return null==b&&(b=!0),this.addButton(n,b,!0)},Buttonbar.prototype.addButton=function(n,b,A){var R,D,B,E,X,$;if(null==b&&(b=!0),null==A&&(A=!1),!L.util.isNull(n))return L.util.isPlainObject(n)&&(n=new L.defaults.class.Button(n)),n instanceof L.Button||n instanceof L.DataFieldInput||n instanceof L.Label?(R=n.DOM,E=n.getGroup()):(null!=n&&null!=(X=n.classList)?X.contains("cui-button"):void 0)?(R=n,E=n.group||null):L.util.assert(!1,"new "+this.__cls,'button must be instance of Button or have class ".cui-button" but is '+L.util.getObjectClass(n)+".",{button:n,opts:this.opts}),L.Events.listen({type:["show","hide"],node:n,call:($=this,function(n){return $.__checkVisibility()})}),B=A?"prepend":"append",E?(this.__groupDivs[E]||(D=L.dom.div("cui-buttonbar-group cui-buttonbar-group-"+E),L.dom.append(this.__buttons,D),this.__groupDivs[E]=D),L.dom[B](this.__groupDivs[E],R)):L.dom[B](this.__buttons,R),b&&this.__checkVisibility(),n},Buttonbar}(L.DOMElement)},4016:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Checkbox=function(n){function Checkbox(n){Checkbox.__super__.constructor.call(this,n),this._multiline&&this.addClass("cui-checkbox--multiline")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Checkbox,n),Checkbox.prototype.initOpts=function(){return Checkbox.__super__.initOpts.call(this),this.addOpts({onClick:{check:Function},value:{default:!0},value_unchecked:{default:!1},text:{check:String},text_active:{check:String},text_inactive:{check:String},multiline:{default:!1,check:Boolean},content:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},active:{default:!1,check:Boolean},indeterminate:{default:!1,check:Boolean},onActivate:{check:Function},onDeactivate:{check:Function},radio:{check:String},group:{check:String},radio_allow_null:{check:Boolean},tooltip:{check:"PlainObject"},icon_active:{default:"check",mandatory:!0,check:function(n){return n instanceof L.Icon||L.util.isString(n)}},icon_inactive:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}}})},Checkbox.prototype.enable=function(){var n;return Checkbox.__super__.enable.call(this),null!=(n=this.__checkbox)?n.enable():void 0},Checkbox.prototype.disable=function(){var n;return Checkbox.__super__.disable.call(this),null!=(n=this.__checkbox)?n.disable():void 0},Checkbox.prototype.setIndeterminate=function(){if(!this._indeterminate)return L.dom.addClass(this.getButton(),"cui-indeterminate"),this.getButton().setIcon(""),this._indeterminate=!0},Checkbox.prototype.removeIndeterminate=function(){if(this._indeterminate)return L.dom.removeClass(this.getButton(),"cui-indeterminate"),this._indeterminate=!1},Checkbox.prototype.isIndeterminate=function(){return this._indeterminate},Checkbox.prototype.registerLabel=function(n){var b;return n.setAttribute("data-label-clickable","1"),L.Events.listen({type:"click",node:n,call:(b=this,function(n){return b.getButton().onClickAction(n)})}),this},Checkbox.prototype.getButton=function(){return this.__checkbox},Checkbox.prototype.getOptValue=function(){return this._value},Checkbox.prototype.getOptValueUnchecked=function(){return this._value_unchecked},Checkbox.prototype.getCheckboxClass=function(){return"cui-button-checkbox"},Checkbox.prototype.destroy=function(){var n;return null!=(n=this.__checkbox)&&n.destroy(),Checkbox.__super__.destroy.call(this)},Checkbox.prototype.render=function(){var n,b,A,R,D,B;for(Checkbox.__super__.render.call(this),(n=this.getButtonOpts()).onActivate=(B=this,function(n,b,A){var R;if(!b.initial_activate)return B.storeValue(B._value,b),R="function"==typeof B._onActivate?B._onActivate(B,b,A):void 0,L.util.isPromise(R)&&R.fail((function(){return B.storeValue(B._value_unchecked,b)})),B.removeIndeterminate(),R}),n.onDeactivate=function(n){return function(b,A,R){var D;if(!A.initial_activate)return n.storeValue(n._value_unchecked,A),D="function"==typeof n._onDeactivate?n._onDeactivate(n,A,R):void 0,L.util.isPromise(D)&&D.fail((function(){return n.storeValue(n._value,A)})),n.removeIndeterminate(),D}}(this),this._onClick&&(n.onClick=function(n){return function(b){n._onClick(b,n)}}(this)),b=0,R=(D=["text","text_active","text_inactive","radio_allow_null","active"]).length;b{var L=A(7288),extend=function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}return ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype,n},R={}.hasOwnProperty;L.Alert=function(n){function Alert(){return Alert.__super__.constructor.apply(this,arguments)}return extend(Alert,n),Alert.prototype.initOpts=function(){return Alert.__super__.initOpts.call(this),this.mergeOpt("choices",{mandatory:!1,default:void 0}),this.addOpts({button_text_ok:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.ok,check:String}})},Alert.prototype.isKeyboardCancellable=function(n){return this._allow_cancel},Alert.prototype.readOpts=function(){if(Alert.__super__.readOpts.call(this),!this._choices)return this._choices=[{text:this._button_text_ok,primary:!0}]},Alert}(L.ConfirmationChoice),L.alert=function(n){return null==n&&(n={text:"CUI.alert"}),new L.Alert(n).open()},L.AlertProblem=function(n){function AlertProblem(){return AlertProblem.__super__.constructor.apply(this,arguments)}return extend(AlertProblem,n),AlertProblem}(L.Alert),L.problem=function(n){return null==n&&(n={text:"CUI.problem"}),new L.AlertProblem(n).open()}},8528:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Confirm=function(n){function Confirm(){return Confirm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Confirm,n),Confirm.prototype.initOpts=function(){return Confirm.__super__.initOpts.call(this),this.removeOpt("choices"),this.mergeOpt("text",{mandatory:!0}),this.addOpts({button_text_ok:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.ok,check:String},button_text_cancel:{mandatory:!0,default:L.defaults.class.ConfirmationChoice.defaults.cancel,check:String},button_primary:{mandatory:!0,default:"ok",check:["ok","cancel"]},button_danger:{check:["ok","cancel"]},button_icon_ok:{check:L.Icon},button_icon_cancel:{check:L.Icon}})},Confirm.prototype.readOpts=function(){return Confirm.__super__.readOpts.call(this),this._choices=[{text:this._button_text_cancel,icon:this._button_icon_cancel,cancel:!0,choice:"cancel",primary:"cancel"===this._button_primary,danger:"cancel"===this._button_danger},{text:this._button_text_ok,icon:this._button_icon_ok,choice:"ok",primary:"ok"===this._button_primary,danger:"ok"===this._button_danger}]},Confirm}(L.ConfirmationChoice),L.confirm=function(n){return new L.Confirm(n).open()}},1946:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ConfirmationChoice=function(n){function ConfirmationChoice(n){var b,A;this.__getResolveValue=(b=this.__getResolveValue,A=this,function(){return b.apply(A,arguments)}),ConfirmationChoice.__super__.constructor.call(this,n),this.__layer_root.addClass("cui-confirmation-choice")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ConfirmationChoice,n),ConfirmationChoice.defaults={ok:"Ok",cancel:"Cancel"},ConfirmationChoice.prototype.initOpts=function(){return ConfirmationChoice.__super__.initOpts.call(this),this.removeOpt("buttons"),this.removeOpt("header_right"),this.removeOpt("cancel_action"),this.addOpts({onChoice:{check:Function},choices:{mandatory:!0,default:[],check:function(n){var b,A,R,D;if(!L.util.isArray(n))return!1;for(R=A=0,D=n.length;A{var L=A(7288),R={}.hasOwnProperty;L.Prompt=function(n){function Prompt(){var n,b;return this.__checkOkBtn=(n=this.__checkOkBtn,b=this,function(){return n.apply(b,arguments)}),Prompt.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Prompt,n),Prompt.prototype.initOpts=function(){return Prompt.__super__.initOpts.call(this),this.removeOpt("choices"),this.addOpts({default:{default:"",check:String},placeholder:{check:String},min_length:{mandatory:!0,default:1,check:function(n){return n>=0}}})},Prompt.prototype.readOpts=function(){var n,b,A;return Prompt.__super__.readOpts.call(this),n=this._text,delete this._text,(b=this._ui)&&(b+=":input"),this.__input=null,this.__data={input:this._default+""},this._content=new L.Form({fields:[{type:L.Output,multiline:!0,markdown:this._markdown,text:n},{type:L.Input,name:"input",placeholder:this._placeholder,data:this.__data,ui:b,onConstruct:(A=this,function(n){A.__input=n}),onKeyup:function(n){return function(b,A){if(13===A.keyCode())return n.getButtons()[1].onClickAction(A)}}(this),onDataChanged:function(n){return function(){return n.__checkOkBtn()}}(this)}]}).start()},Prompt.prototype.getValue=function(){return this.__input.getValue()},Prompt.prototype.open=function(){var n,b;return this.__checkOkBtn(),n=new L.Deferred,Prompt.__super__.open.call(this).done((b=this,function(A){return n.resolve(b.__data.input)})).fail(n.reject),L.setTimeout({call:function(n){return function(){return n.__input.focus().selectAll()}}(this)}),n.promise()},Prompt.prototype.__checkOkBtn=function(){var n;return n=this.getButtons(),this.__data.input.trim().length>=this._min_length?n[1].enable():n[1].disable()},Prompt}(L.Confirm),L.prompt=function(n){return new L.Prompt(n).open()}},4553:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Spinner=function(n){function Spinner(){return Spinner.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Spinner,n),Spinner.prototype.initOpts=function(){return Spinner.__super__.initOpts.call(this),this.mergeOpt("text_icon",{default:"spinner"}),this.mergeOpt("show_ms",{default:0}),this.mergeOpt("backdrop",{default:{policy:"modal"}})},Spinner.prototype.open=function(){var n;return Spinner.__super__.open.call(this),this._show_ms>0&&L.setTimeout({ms:this._show_ms,call:(n=this,function(){return n.hide(),n.__deferred.resolve()})}),this.__deferred.promise()},Spinner}(L.Toaster),L.spinner=function(n){var b;return null==n&&(n={text:"CUI.spinner"}),(b=new L.Spinner(n)).open(),b}},5148:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Toaster=function(n){function Toaster(){return Toaster.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Toaster,n),Toaster.prototype.initOpts=function(){return Toaster.__super__.initOpts.call(this),this.removeOpt("choices"),this.mergeOpt("backdrop",{default:!1}),this.mergeOpt("show_ms",{check:function(n){return n>=0}})},Toaster.prototype.readOpts=function(){return 0===this.opts.show_ms&&void 0===this.opts.backdrop&&(this.opts.backdrop={policy:"modal"}),Toaster.__super__.readOpts.call(this),this._choices=[]},Toaster.prototype.open=function(){return this.__deferred||(Toaster.__super__.open.call(this),this._show_ms>0&&L.setTimeout({ms:this._show_ms,call:(n=this,function(){return n.hide(),n.__deferred.resolve()})})),this.__deferred.promise();var n},Toaster}(L.ConfirmationChoice),L.toaster=function(n){var b;return null==n&&(n={text:"CUI.toaster"}),(b=new L.Toaster(n)).open(),b}},2136:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ConfirmationDialog=function(n){function ConfirmationDialog(n){ConfirmationDialog.__super__.constructor.call(this,n),this.__layer_root.addClass("cui-confirmation-dialog"),this.init()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ConfirmationDialog,n),ConfirmationDialog.prototype.initOpts=function(){return ConfirmationDialog.__super__.initOpts.call(this),this.addOpts({title:{check:String},text:{check:String},text_icon:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}},markdown:{mandatory:!0,default:!1,check:Boolean},padded:{check:Boolean,default:!0},markdown_opts:{check:"PlainObject"},html:{check:String},content:{check:function(n){return L.util.isContent(n)||(null!=n?n.DOM:void 0)}},icon:{check:function(n){return n instanceof L.Icon||L.util.isString(n)}},buttons:{check:function(n){return L.util.isArray(n)&&n.length>0||L.util.isFunction(n)}},footer_left:{},header_right:{},show_inline:{check:function(n){return L.dom.isNode(n)}}}),this.removeOpt("pane")},ConfirmationDialog.prototype.setPane=function(){return ConfirmationDialog.__super__.setPane.call(this,{padded:this._padded,force_header:!0,force_footer:!0})},ConfirmationDialog.prototype.readOpts=function(){return ConfirmationDialog.__super__.readOpts.call(this),this._pane={}},ConfirmationDialog.prototype.show=function(n){return this._show_inline?(L.dom.addClass(this.__layer,"cui-confirmation-dialog--show-inline"),L.dom.addClass(this.__show_inline,"cui-confirmation-dialog--has-show-inline"),L.dom.prepend(this._show_inline,this.__layer),L.Events.trigger({type:"viewport-resize"})):ConfirmationDialog.__super__.show.call(this,n)},ConfirmationDialog.prototype.hide=function(n){return this._show_inline?(L.dom.removeClass(this.__layer,"cui-confirmation-dialog--show-inline"),L.dom.removeClass(this.__show_inline,"cui-confirmation-dialog--has-show-inline"),L.dom.remove(this.__layer),L.Events.trigger({type:"viewport-resize"})):ConfirmationDialog.__super__.hide.call(this,n)},ConfirmationDialog.prototype.init=function(){var n,b,A,R,D,B;for(A in L.util.xor(this._html,L.util.xor(this._content,this._text))||(console.warn(this.__cls+".readOpts","Exactly on opts.content, opts.text, or opts.html needs to be set",{opts:this.opts}),this._text=""),this._title||this.addClass("cui-confirmation-dialog--no-title"),L.util.isEmpty(this._text)?L.util.isEmpty(this._html)?n=this._content:this.__label=n=new L.MultilineLabel({content:this._html}):this.__label=n=new L.MultilineLabel({markdown:this._markdown,markdown_opts:this._markdown_opts,text:this._text,icon:this._text_icon}),L.util.isEmpty(this._title)&&L.util.isNull(this._icon)||(R=new L.Label({text:this._title,icon:this._icon})),D=this.getPane(),B={header_left:R,header_right:this._header_right,content:n,footer_right:this._buttons,footer_left:this._footer_left})(b=B[A])&&D.append(b,A)},ConfirmationDialog.prototype.updateText=function(n){var b;return null!=(b=this.__label)&&b.setText(n),this},ConfirmationDialog.prototype.setText=function(n,b,A){return null==b&&(b=this._markdown),null==A&&(A=this._markdown_opts),this.__label=new L.MultilineLabel({markdown:b,markdown_opts:A,text:n,icon:this._text_icon}),this.setContent(this.__label)},ConfirmationDialog.prototype.getButtons=function(){var n,b,A,R,D,B,E,X;for(E=(X=this.getPane().getPaneAndKey("footer_right"))[0],D=X[1],n=[],R=0,B=(A=L.dom.findElements(E[D](),".cui-button")).length;R{var L=A(7288),R={}.hasOwnProperty;L.Console=function(n){function Console(n){Console.__super__.constructor.call(this,n),this.__console=L.dom.element("DIV",{class:"cui-console"}),this.registerDOMElement(this.__console)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Console,n),Console.prototype.initOpts=function(){return Console.__super__.initOpts.call(this),this.addOpts({markdown:{mandatory:!0,default:!0,check:Boolean}})},Console.prototype.clear=function(){return this.__console.innerHTML=""},Console.prototype.log=function(n,b){var A;return null==b&&(b=this._markdown),A=new L.defaults.class.Label({text:n,multiline:!0,markdown:b}),this.__console.appendChild(A.DOM),this.__console.scrollTop=this.__console.scrollHeight},Console}(L.DOMElement)},4682:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataForm=function(n){function DataForm(){return DataForm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataForm,n),DataForm.prototype.render=function(){var n;return L.DataFieldInput.prototype.render.call(this),this._has_add_button&&(this.__addButton=new L.Button({icon:"plus",text:$$("dataform.add_button.label"),disabled:!0,onClick:(n=this,function(){n.__appendRow({_new:!0}),n.__updateView(),n.__storeValue(),n.__addButton.disable()})})),this.__verticalLayout=new L.VerticalLayout({maximize_horizontal:this.__maximize_horizontal,center:{content:void 0},bottom:{content:this.__addButton}}),this.append(this.__verticalLayout),L.Events.listen({type:"data-changed",node:this.DOM,call:function(n){return function(){return n.__updateView()}}(this)}),this._rowMove&&new L.Sortable({element:this.__verticalLayout.center(),selector:".cui-drag-handle-row",create:function(n,b){var A;return!!(A=L.dom.data(b,"data"))&&(!A._new||(n.stopPropagation(),!1))},allowSort:function(n){return function(b,A,L){return!!n.rows[L]}}(this),sorted:function(n){return function(b,A,R){return L.util.moveInArray(A,R,n.rows,A1?this.addClass("cui-data-form--multiple-fields"):this.removeClass("cui-data-form--multiple-fields"),this._rowMove&&this.addClass("cui-data-form--movable-rows"),this._has_add_button)return this.addClass("cui-data-form--add-button")},DataForm.prototype.readOpts=function(){return DataForm.__super__.readOpts.call(this),this.__rowRegistry=[],this},DataForm.prototype.getFieldOpts=function(){var n,b,A,R;for(A=0,R=(n=DataForm.__super__.getFieldOpts.call(this)).length;A1&&(n=this.rows[this.rows.length-1])._empty;)this.__removeRow(n);return this},DataForm.prototype.__storeValue=function(){return this.storeValue(L.util.copyObject(this.rows,!0))},DataForm.prototype.__updateEmptyInRows=function(){var n,b,A,L;for(n=0,b=(A=this.rows).length;n1},DataForm.prototype.displayValue=function(){var n,b,A,L;for(this.rows=this.getValue(),this.__verticalLayout.empty("center"),n=0,b=(A=this.rows).length;n0||this._no_default_empty_row)&&this.__updateAddButton(),this._no_default_empty_row||this.__appendNewRow(),this.__updateButtons()},DataForm.prototype.__appendNewRow=function(){var n;if(!("edit"!==(n=this._new_rows)&&"append"!==n||this._has_add_button&&this.rows.length>0))return this.__appendRow({_new:!0})},DataForm.prototype.__updateButtons=function(){var n,b,A,R,D,B;for(n=0,A=(R=this.rows).length;n=2?L.dom.removeClass(b.move,"is-hidden"):L.dom.addClass(b.move,"is-hidden")},DataForm.prototype.__findRowInfo=function(n){var b,A;return b=L.util.idxInArray(null,this.__rowRegistry,(function(b){return b.data===n})),L.util.assert(b>-1,"DataForm.__removeRow","row not found",{row:n,registry:this.__rowRegistry}),(A=this.__rowRegistry[b]).idx=b,A},DataForm.prototype.__removeRow=function(n){var b;return b=this.__findRowInfo(n),L.dom.remove(b.dom),this.__rowRegistry.splice(b.idx,1),L.util.removeFromArray(n,this.rows),this.__storeValue(),this},DataForm.prototype.__appendRow=function(n){var b,A,R,D;this._rowMove&&(A=L.dom.element("DIV",{class:"cui-drag-handle-row"})),"none"!==this._new_rows&&(R=new L.defaults.class.Button({icon:"fa-trash-o",appearance:"flat",onMouseenter:function(){return L.dom.addClass(b,"cui-data-form-row--trash")},onMouseleave:function(){return L.dom.removeClass(b,"cui-data-form-row--trash")},onClick:(D=this,function(){var b;L.decide(null!=(b=D._onBeforeRowRemove)?b.call(D,n):void 0).done((function(){var b;return D.__removeRow(n),null!=(b=D._onRowRemove)&&b.call(D,n),D.__updateView()}))})})),b=new L.HorizontalLayout({maximize_vertical:!1,class:"cui-data-form-row",maximize_horizontal:this.__maximize_horizontal,left:{content:A},right:{content:R},center:{content:this.getForm(n).start()}}),L.dom.data(b.DOM,"data",n),n._new&&!this._has_add_button&&(L.dom.addClass(A,"is-hidden"),R.hide()),this.__rowRegistry.push({data:n,dom:b.DOM,trash:R,move:A}),this.__verticalLayout.append(b,"center")},DataForm}(L.DataTable)},5860:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DataTable=function(n){function DataTable(){return DataTable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataTable,n),DataTable.defaults={plus_button_tooltip:null,minus_button_tooltip:null},DataTable.prototype.initOpts=function(){return DataTable.__super__.initOpts.call(this),this.addOpts({fields:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},new_rows:{default:"edit",check:["edit","append","remove_only","none"]},no_header:{check:Boolean},rowMove:{default:!1,check:Boolean},onBeforeRowRemove:{check:Function},onRowRemove:{check:Function},onRowSelect:{check:Function},onRowDeselect:{check:Function},onNodeAdd:{check:Function},onNewNodeAdd:{check:Function},footer_right:{check:function(n){return L.util.isContent(n)}},buttons:{mandatory:!0,default:[],check:function(n){return L.util.isArray(n)}},append_buttons:{check:Boolean,default:!1},chunk_size:{default:0,mandatory:!0,check:function(n){return n>=0}},padded:{check:Boolean,default:!1},onLoadPage:{check:Function}})},DataTable.prototype.readOpts=function(){return DataTable.__super__.readOpts.call(this),this.__navi_prev=null,this.__navi_next=null,this.__offset=0,L.util.assert(!(this._chunk_size&&this._rowMove),"new CUI.DataTable","opts.chunk_size and opts.rowMove are mutually exclusive.",{opts:this.opts}),this},DataTable.prototype.getFieldList=function(){return this.__fieldList},DataTable.prototype.getFieldsByName=function(n,b){var A,L,R,D;for(null==b&&(b=[]),L=0,R=(D=this.getFieldList()).length;L0?(this.__offset=Math.floor((this.rows.length-1)/this._chunk_size)*this._chunk_size,this.displayValue()):this.listView.appendRow(A),"function"==typeof this._onNewNodeAdd&&this._onNewNodeAdd(A),A},DataTable.prototype.updateButtons=function(){return 0===this.listView.getSelectedRows().length?this.minusButton.disable():this.minusButton.enable()},DataTable.prototype.getFooter=function(){var n,b,A,R,D,B,E;for(A=0,R=(b=this._buttons.slice(0)).length;A0)return n.displayValue()},B=[],R=0,D=(E=n.listView.getSelectedRows()).length;R0?L.whenAll(B).done((function(){return A()})):A()}}(this)}),n.push(this.minusButton)),this._chunk_size>0&&(n.push({onConstruct:function(n){return function(b){return n.__navi_prev=b}}(this),icon:"left",disabled:!0,group:"navi",ui:this._ui?this._ui+".navigation.left.button":void 0,onClick:function(n){return function(){return n.__offset=n.__offset-n._chunk_size,n.loadPage(n.__offset/n._chunk_size)}}(this)}),B={},D=function(n){return function(){return n.loadPage(B.page-1)}}(this),this.__navi_input=new L.NumberInput({group:"navi",placeholder:"page",data:B,name:"page",ui:this._ui?this._ui+".navigation.input.button":void 0,onBlur:function(n){return n.setValue(null)},onDataChanged:function(){L.scheduleCallback({ms:1e3,call:D})}}).start(),n.push(this.__navi_input),n.push({onConstruct:function(n){return function(b){return n.__navi_next=b}}(this),icon:"right",disabled:!0,group:"navi",ui:this._ui?this._ui+".navigation.right.button":void 0,onClick:function(n){return function(){return n.__offset=n.__offset+n._chunk_size,n.loadPage(n.__offset/n._chunk_size)}}(this)})),b.length&&(n=this._append_buttons?n.concat(b):b.concat(n)),n.length?new L.Buttonbar({buttons:n}):null},DataTable.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt;for(DataTable.__super__.render.call(this,{callOnRender:!1}),A=[],b=[],K=[],this.headerRow=new L.ListViewHeaderRow,B=D=0,$=(tt=this.__fieldList).length;D<$;B=++D)("maximize"===(null!=(ot=(R=tt[B]).getOpt("form"))?ot.column:void 0)||R instanceof L.DataTable)&&K.push(B);for(0===K.length&&K.push(this.__fieldList.length-1),B=E=0,V=(nt=this.__fieldList).length;E-1?A.push("maximize"):(null!=(it=R.getOpt("form"))?it.column:void 0)?A.push(R._form.column):R.isResizable()?A.push("auto"):A.push("fixed"),Q=R.getName(),X=R._form.label,n=[],Q&&n.push("cui-data-table-column-field-name-"+Q),n.push("cui-data-table-column-field-type-"+L.util.toDash(R.getElementClass())),(null!=(rt=R._form)?rt.rotate_90:void 0)&&n.push("cui-lv-td-rotate-90"),b.push(n),this.headerRow.addColumn(new L.ListViewHeaderColumn({rotate_90:null!=(st=R._form)?st.rotate_90:void 0,label:{text:X,multiline:!0}}));return this.listView=new L.ListView({class:"cui-lv--has-datafields",selectableRows:"none"!==this._new_rows,padded:this._padded,ui:this._ui?this._ui+".list.view":void 0,onSelect:(pt=this,function(n,b){return"function"==typeof pt._onRowSelect&&pt._onRowSelect(n,b),pt.updateButtons()}),onDeselect:function(n){return function(){return"function"==typeof n._onRowDeselect&&n._onRowDeselect(),n.updateButtons()}}(this),onRowMove:function(n){return function(b,A,R){var D;return D=n.listView.fixedRowsCount,b=n.__offset+b,A=n.__offset+A,L.util.moveInArray(b-D,A-D,n.rows,R),L.Events.trigger({type:"data-changed",node:n.listView})}}(this),cols:A,fixedRows:this._no_header?0:1,footer_left:this.getFooter(),footer_right:this._footer_right,fixedCols:0,colResize:!this._no_header,colClasses:b,rowMove:this._rowMove,maximize:this._maximize,maximize_horizontal:this._maximize_horizontal,maximize_vertical:this._maximize_vertical}),this.isDisabled()&&this.listView.setInactive(!0,null),this.replace(this.listView.render()),"function"==typeof this._onRender&&this._onRender(this),L.Events.listen({type:"data-changed",node:this.listView,call:function(n){return function(b,A){b.stopPropagation(),n.storeValue(L.util.copyObject(n.rows,!0))}}(this)}),this},DataTable.prototype.loadPage=function(n){var b,A;b=Math.floor((null!=(A=this.rows)?A.length:void 0)/this._chunk_size),(!L.util.isNumber(n)||b<0||n>b)&&(n=0),this.__offset=n*this._chunk_size,this.displayValue(),"function"==typeof this._onLoadPage&&this._onLoadPage(n)},DataTable.prototype.displayValue=function(){var n,b,A,R,D,B,E,X,$,V,K;if(this.listView.removeAllRows(),this._no_header||this.listView.appendRow(this.headerRow),this.rows=L.util.copyObject(this.getValue(),!0),this._chunk_size>0&&(R=this.rows.length,this.__offset>=R&&(this.__offset=Math.max(this.__offset-this._chunk_size)),X=(E=Math.floor(this.__offset/this._chunk_size))+1+" / "+((A=Math.ceil(R/this._chunk_size)-1)+1),this.__navi_input.setMin(1),this.__navi_input.setMax(A+1),this.__navi_input.setValue(null),this.__navi_input.setPlaceholder(X),L.dom.setAttribute(this.__navi_input.getElement(),"data-max-chars",2*(""+(A+1)).length+3),E>0?this.__navi_prev.enable():this.__navi_prev.disable(),E0?this.rows.slice(this.__offset,this.__offset+this._chunk_size):this.rows).length;n{var L=A(7288),R={}.hasOwnProperty;L.DataTableNode=function(n){function DataTableNode(){return DataTableNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DataTableNode,n),DataTableNode.prototype.initOpts=function(){return DataTableNode.__super__.initOpts.call(this),this.addOpts({dataTable:{mandatory:!0,check:L.DataTable},data:{mandatory:!0,check:"PlainObject"},check_changed_data:{check:"PlainObject"},rows:{mandatory:!0,check:"Array"},dataRowIdx:{mandatory:!0,check:function(n){return n>=0}}})},DataTableNode.prototype.readOpts=function(){var n,b,A,R,D,B;for(DataTableNode.__super__.readOpts.call(this),this.__dataTable=this._dataTable,this.__data=this._data,this.__check_changed_data=this._check_changed_data,this.__rows=this._rows,L.util.assert(this.__rows.indexOf(this.__data)>-1,"new "+L.util.getObjectClass(this),"opts.data needs to be item in opts.rows Array",{opts:this.opts}),this.__fields=[],R=0,D=(B=this.__dataTable.getFieldList()).length;R{var L,R=A(7288),D={}.hasOwnProperty,B=[].indexOf||function(n){for(var b=0,A=this.length;b=0,"CUI.DateTime.format",'output_format must be on of "'+R.DateTime.formatTypes.join(",")+'".',{parm1:n,output_format:st}),L.isMoment(n))rt=n;else{if(bt=null!=n?n.trim():void 0,R.util.isEmpty(bt))return null;rt=this.parse(bt,this.__input_formats_known)}if(rt.isValid()&&R.util.isNull(A)&&(A=this.getCurrentFormat().type),!rt.isValid()){for($=[],V=0,ot=(pt=this.__input_formats_known).length;V0?"invalid":null,DateTime.__super__.storeValue.call(this,n,b),this},DateTime.prototype.getDigiDisplay=function(n){var b,A,L,D,B,E,X;for(L=[],D=0,E=(X=n.split("")).length;D-1?(b=["hour","hour","minute","second","am_pm","am_pm"][B],"A"===A||"a"===A?(L.push({mask:"[aApP]",attr:{cursor:b,title:b}}),L.push({mask:"[mM]",attr:{cursor:b,title:b}})):L.push({mask:"[0-9]",attr:{cursor:b}})):"*"===A?L.push({mask:"[0-9A-Z+-:. ]"}):L.push({static:":"});return this.__digiDisplay=new R.DigiDisplay({digits:L})},DateTime.prototype.openPopover=function(n){var b;return this.initDateTimePicker(),this.__popover=new R.Popover({element:n,handle_focus:!1,onHide:(b=this,function(){return b.displayValue(),b.closePopover()}),placement:"se",class:"cui-date-time-popover",pane:{content:this.__dateTimeTmpl}}),this.updateDateTimePicker(),this.setCursor("day"),this.__popover.show(),this},DateTime.prototype.closePopover=function(){return this.__popover&&(this.__popover.destroy(),delete this.__popover),this},DateTime.prototype.updateDateTimePicker=function(){return this.setMomentFromInput(),console.debug("updating popover...",this.__input_format),this.drawDate(),this.setClock(),this.setDigiClock(),this.setPrintClock(),this},DateTime.prototype.destroy=function(){return this.closePopover(),DateTime.__super__.destroy.call(this)},DateTime.prototype.setClock=function(n){var b,A,L;return null==n&&(n=this.__current_moment),b=n.hour()%12+(A=n.minute()+(L=n.second()+0)/60)/60,R.dom.setStyleOne(this.__hour,"transform","rotate("+30*b+"deg)"),R.dom.setStyleOne(this.__minute,"transform","rotate("+6*A+"deg)"),R.dom.setStyleOne(this.__second,"transform","rotate("+6*L+"deg)")},DateTime.prototype.setDigiClock=function(n){var b;return null==n&&(n=this.__current_moment),b=this.__input_format.digi_clock,console.debug("setDigiClock",b,n,n.format(b)),b&&this.__digiDisplay.display(n.format(b)),this},DateTime.prototype.setPrintClock=function(n){var b;return null==n&&(n=this.__current_moment),this.__input_format.timezone_display?((b=n.clone()).tz(R.tz_data.tz),R.dom.empty(this.__timezone_display),R.dom.append(this.__timezone_display,b.format(this.__input_format.timezone_display))):this},DateTime.prototype.setTimezone=function(){},DateTime.prototype.UNUSEDgetTimezoneData=function(){return this.__tz_data?R.resolvedPromise():$.get(R.getPathToScript()+"/moment-timezone-meta.json").done((n=this,function(b){var A,L,R,D,B,E,X,$,V;for(X=[],A={},L=0,D=b.length;L0))return L.invalid();for($=0,K=b.length;$=0?this.__input_format=this.initFormat(E):this.__input_format=this.initFormat(this.__default_format),ot.locale(L.locale()),ot.year()>this._max_year?L.invalid():ot;if(!b.some((function(n){return n.support_bc})))return L.invalid();if(D=!1,X=!1,n.startsWith("-"))D=!0,n=n.substring(1);else for(st=n.toLocaleUpperCase(),V=0,Q=(nt=R.DateTime.defaults.bc_appendix).length;V0&&(this.__current_moment=this.parse(n)),""!==n&&this.__current_moment.isValid()||(this.__current_moment=L(),this.__current_moment.__now=!0,this.__input_format=this.initFormat(this.__default_format))},DateTime.prototype.setInputFromMoment=function(){return this.__clearOverwriteMonthAndYear(),this.setValue(this.__current_moment.format(this.__input_format.input),{no_trigger:!1}),this},DateTime.prototype.__clearOverwriteMonthAndYear=function(){return this.__overwrite_month=null,this.__overwrite_year=null},DateTime.prototype.drawDate=function(n){var b;return n?b=n:(b=this.__current_moment.clone()).bc=this.__current_moment.bc,this.updateCalendar(b,!1)},DateTime.prototype.updateCalendar=function(n,b){return null==b&&(b=!0),R.dom.empty(this.__calendar),R.dom.append(this.__calendar,this.getDateTimeDrawer(n)),R.dom.append(this.__calendar,this.drawMonthTable(n)),R.dom.append(this.__calendar,this.drawYearMonthsSelect(n)),b&&(this.__current_moment=n.clone(),this.__current_moment.bc=n.bc,this.setInputFromMoment()),console.info("CUI.DateTime.updateCalendar:",this.__current_moment.format(this.__input_format.input)),this.markDay(),this},DateTime.prototype.getDateTimeDrawer=function(n){var b,A,L,D,B,E,X,$,V,K,Q,tt,ot;return b=this.__input_formats[0].clock_am_pm,L={month:n.month(),year:n.year(),date:n.date(),hour:null,minute:null,second:null,am_pm:null},this.__input_format.clock&&(L.hour=n.hour(),L.minute=n.minute(),L.second=n.second(),b&&(L.am_pm=12*Math.floor(L.hour/12),L.hour=L.hour%12)),K=function(n){return n<10?"0"+n:""+n},B=new R.Label({text:this.__calendar_locale_format.tab_date,class:"cui-select-date-title"}),D=new R.Select({name:"date",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:(ot=this,function(){return ot.updateCalendar(n.date(L.date))}),options:function(){var b,A,L,R;for(L=[],b=A=1,R=n.daysInMonth();1<=R?A<=R:A>=R;b=1<=R?++A:--A)L.push({text:K(b),value:b});return L}}).start(),V=new R.Select({name:"month",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:function(b){return function(){return b.updateCalendar(n.month(L.month))}}(this),options:function(){var n,b,A;for(A=[],b=n=0;n<=11;b=++n)A.push({text:K(b+1),value:b});return A}}).start(),tt=new R.Select({name:"year",menu_class:"cui-date-time--select-menu",data:L,group:"date",onDataChanged:function(b){return function(){return b.updateCalendar(n.year(L.year))}}(this),options:function(n){return function(){var b,A,R,D,B,E;for(R=[],(A=L.year-20)=B;E=D<=B?++b:--b)R.push({text:""+E,value:E});return R}}(this)}).start(),this.__input_formats[0].clock&&(E=this.__input_format_no_time?[{text:"",value:null}]:[],Q=new R.Label({text:this.__calendar_locale_format.tab_time,class:"cui-select-time-title"}),X=new R.Select({name:"hour",menu_class:"cui-date-time--select-menu",data:L,group:"time",onDataChanged:function(A){return function(R){return null===R.hour?(A.setInputFormat(!1),A.updateCalendar(n)):(A.setInputFormat(!0),b?A.updateCalendar(n.hour(L.hour+L.am_pm)):A.updateCalendar(n.hour(L.hour))),A.__popover.position()}}(this),options:function(){var n,A,L,R;if(R=E.slice(0),b)for(n=A=1;A<=12;n=++A)R.push({text:K(n),value:n%12});else for(n=L=0;L<=23;n=++L)R.push({text:K(n),value:n});return R}}).start(),$=new R.Select({class:"cui-date-time-60-select",name:"minute",menu_class:"cui-date-time--select-menu",group:"time",data:L,onDataChanged:function(b){return function(A){return null===A.minute?(b.setInputFormat(!1),b.updateCalendar(n)):(b.setInputFormat(!0),b.updateCalendar(n.minute(L.minute))),b.__popover.position()}}(this),options:function(){var n,b,A;for(A=E.slice(0),b=n=0;n<=59;b=++n)A.push({text:K(b),value:b});return A}}).start(),b&&(A=new R.Select({class:"cui-date-time-am-pm-select",name:"am_pm",group:"time",data:L,onDataChanged:function(b){return function(A){return null===A.am_pm?(b.setInputFormat(!1),b.updateCalendar(n)):(b.setInputFormat(!0),b.updateCalendar(n.hour(L.hour+L.am_pm))),b.__popover.position()}}(this),options:function(){var n,A,L,R;for(L=E.slice(0),n=0,A=(R=["AM","PM"]).length;nQ&&(Q=null!=(st=nt.text)?st.length:void 0);return(K=new R.Label({text:tt[b.month].text})).setTextMaxChars(Q),A=new R.HorizontalLayout({maximize_vertical:!1,maximize_horizontal:!0,class:"cui-date-time-footer",left:{content:new R.Buttonbar({class:"cui-date-time-header-month",buttons:[{icon:"left",onClick:function(b){return function(A){if(!(n.clone().subtract(1,"months").year()b._max_year))return n.add(1,"months"),b.drawDate(n)}}(this)}]})},right:{content:new R.Buttonbar({class:"cui-date-time-header-year",buttons:[{icon:"left",group:"year",onClick:function(A){return function(){if(!(b.year-1A._max_year))return n.add(1,"years"),A.drawDate(n)}}(this)}]})}}),A.DOM},DateTime.prototype.drawMonthTable=function(n){var b,A,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st,pt,lt,ut,bt,Mt,zt,Ot;for(Q=n.month(),zt=n.year(),K=L([zt,Q,1,n.hour(),n.minute(),n.second(),0]),tt=R.dom.table("cui-date-time-date"),R.Events.listen({node:tt,type:"click",call:(Ot=this,function(n){var b,A;n.stopPropagation(),A=n.getTarget(),R.dom.closest(A,".cui-date-time-day")&&(b=R.dom.data(R.dom.closest(A,"td,.cui-td")),Ot.__input_format=Ot.initFormat(Ot.__default_format),Ot.__current_moment.year(b.year),Ot.__current_moment.month(b.month),Ot.__current_moment.date(b.date),Ot.updateCalendar(Ot.__current_moment),Ot.__input_formats[0].clock?Ot.__popover.position():Ot.closePopover())})}),lt=R.dom.tr("cui-date-time-month-header"),R.dom.append(tt,lt),pt=R.dom.th,(rt=R.dom.div("cui-date-time-dow")).textContent=this.__calendar_locale_format.tab_week,R.dom.append(lt,R.dom.append(pt("cui-date-time-week-title"),rt)),$=V=nt=this.start_day,it=this.start_day+6;nt<=it?V<=it:V>=it;$=nt<=it?++V:--V)L.locale(this.__calendar_locale_format.moment_locale||this._locale),bt=L.weekdaysMin($%7),L.locale(this.__locale_format.moment_locale||this._locale),(D=R.dom.div("cui-date-time-dow")).textContent=bt,R.dom.addClass(D,"cui-date-time-day-"+bt.toLowerCase()),R.dom.append(lt,R.dom.append(pt(),D));for(K.subtract((K.day()-this.start_day+7)%7,"days"),$=this.start_day,Mt=0,ot=L();;){if(A=K.year(),b=K.month(),B=K.date(),($-this.start_day)%7==0){if(6===Mt)break;lt=R.dom.tr(),R.dom.append(tt,lt),ut=K.week(),R.dom.append(lt,R.dom.append(R.dom.td("cui-date-time-week"),R.dom.text(ut))),Mt++}X=R.dom.td,(E=R.dom.span()).textContent=B,D=X("cui-date-time-day",{cursor:"day",datestr:[A,b,B].join("-")}),R.dom.append(D,E),bQ?R.dom.addClass(D,"cui-date-time-next-month"):(R.dom.addClass(D,"cui-date-time-same-month"),zt===ot.year()&&Q===ot.month()&&B===ot.date()&&R.dom.addClass(D,"cui-date-time-now")),R.dom.addClass(D,"cui-date-time-day-"+K.format("dd").toLowerCase()),st=D,R.dom.append(lt,st),R.dom.data(st,{date:B,month:b,year:A}),K.add(1,"days"),$++}return tt},DateTime.prototype.markDay=function(){var n,b,A,L,D,B,E,X;for(A=0,D=(E=R.dom.matchSelector(this.__dateTimeTmpl.DOM,".cui-date-time-calendar .cui-date-time-selected")).length;A0&&n.parseZone(),n.format(b))},DateTime.formatMomentWithBc=function(n,b,A,L){var D,B,E,X,$,V;return null==A&&(A=!1),null==L&&(L=!1),L?(V=n.year(),D=Math.abs(V),X=DateTime.formatMoment(n,b,!1),B=new RegExp("(-?)0+"+D+"\\b"),X=X.replace(B,"$1"+D)):0===n.year()?"1 "+R.DateTime.defaults.bc_appendix_output:n.bc?parseInt(n.bc)+1+" "+R.DateTime.defaults.bc_appendix_output:n.year()>0?($=n.format(b),n.year()<1e3&&A?(E="0+"+n.year()+"\\b",B=new RegExp(E,"g"),R.DateTime.defaults.ad_prefix_output.replace("%(date)s",$.replace(B,""+n.year()))):(E="^\\+?0*"+n.year(),B=new RegExp(E),$.replace(B,""+n.year()))):(n.subtract(1,"year"),$=n.format(b)+" "+R.DateTime.defaults.bc_appendix_output,E="\\-0*"+-1*n.year(),B=new RegExp(E),$.replace(B,""+-1*n.year()))},DateTime.toMoment=function(n){return R.util.isEmpty(n)?null:new R.DateTime({input_types:null}).parse(n)},DateTime.stringToDateRange=function(n,b){return R.DateTimeRangeGrammar.stringToDateRange(n,b)},DateTime.dateRangeToString=function(n,b,A,L){return null==L&&(L=!1),R.DateTimeRangeGrammar.dateRangeToString(n,b,A,L)},DateTime.convertTimeFormatFromGoToMoment=function(n){var b,A,L,R,D;for(D=n,b=0,A=(R=[["2006","YYYY"],["06","YY"],["January","MMMM"],["Jan","MMM"],["01","MM"],["15","HH"],["1","M"],["Monday","dddd"],["Mon","ddd"],["__2","DDD"],["002","DDDD"],["_2"," D"],["02","DD"],["2","D"],["03","hh"],["3","h"],["04","mm"],["4","m"],["05","ss"],["5","s"],["PM","A"],["-07:00:00","Z"],["-0700","ZZ"],["-07:00","Z"],["-070000","ZZ"],["Z0700","[Z]ZZ"],["Z07:00","[Z]Z"],["-07","Z"],["Z070000","[Z]ZZ"],["Z07:00:00","[Z]Z"],["Z07","[Z]Z"]]).length;b{"use strict";A.r(b);A(5059),A(2231),A(2453),A(7390);var L=A(7288);L.DateTimeFormats={},L.DateTimeFormats["de-DE"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Datum",tab_time:"Zeit",tab_week:"Wo",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!0,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY","Y-M-D","D.M.Y","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["it-IT"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Data",tab_time:"Ora",tab_week:"Set",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["es-ES"]={timezone:"Europe/Berlin",moment_locale:"de-DE",tab_date:"Fecha",tab_time:"Hora",tab_week:"Sem",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["en-US"]={timezone:"Europe/Berlin",moment_locale:"en-US",tab_date:"Date",tab_time:"Time",tab_week:"Wk",formats:[{text:"Date+Time",support_bc:!1,invalid:"Invalid Date",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_am_pm:!0,clock_seconds:!1,input:"YYYY-MM-DD hh:mm A",display:"dd, YYYY-MM-DD hh:mm A",display_short:"YYYY-MM-DD hh:mm A",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","MM/DD/YYYY HH:mm:ss","MM/DD/YYYYTHH:mm:ss.SSSZ","MM/DD/YYYYTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Date+Time+Seconds",support_bc:!1,invalid:"Invalid Date",type:"date_time_seconds",store:"YYYY-MM-DDTHH:mm:ssZ",input:"YYYY-MM-DD HH:mm:ss",display:"dd, YYYY-MM-DD HH:mm:ss",display_short:"YYYY-MM-DD HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_am_pm:!0,clock_seconds:!0,parse:["MM/DD/YYYY HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Date",support_bc:!1,input:"YYYY-MM-DD",invalid:"Invalid date",display:"dd, YYYY-MM-DD",display_short:"YYYY-MM-DD",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["MM/DD/YYYY","D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"YYYY-MM",invalid:"Invalid date",store:"YYYY-MM",display:"MMMM YYYY",display_short:"YYYY-MM",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM","MM-YYYY","M-YYYY","YYYY-M","YYYY.M","YYYY/M"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Invalid date",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["ru-RU"]={timezone:"Europe/Berlin",moment_locale:"ru-RU",tab_date:"Дата",tab_time:"Время",tab_week:"Нед",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["pl-PL"]={timezone:"Europe/Berlin",moment_locale:"pl-PL",tab_date:"Data",tab_time:"Czas",tab_week:"Tydz",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["cs-CZ"]={timezone:"Europe/Berlin",moment_locale:"cs-CZ",tab_date:"Datum",tab_time:"Čas",tab_week:"Týd",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["fi-FI"]={timezone:"Europe/Berlin",moment_locale:"fi",tab_date:"Päivämäärä",tab_time:"Aika",tab_week:"Vi",formats:[{text:"Päivämäärä + Aika",support_bc:!1,invalid:"Virheellinen päivämäärä",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Päivämäärä+Aika+Sekunnit",support_bc:!1,invalid:"Virheellinen päivämäärä",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Päivämäärä",support_bc:!1,input:"DD.MM.YYYY",invalid:"Virheellinen päivämäärä",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Vuosi-Kuu",support_bc:!1,input:"MM.YYYY",invalid:"Virheellinen päivämäärä",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Vuosi",support_bc:!0,input:"Y",invalid:"Virheellinen päivämäärä",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["sv-SE"]={timezone:"Europe/Berlin",moment_locale:"sv",tab_date:"Datum",tab_time:"Tid",tab_week:"Ve",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Datum ungültig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD.MM.YYYY HH:mm",display:"dd, DD.MM.YYYY HH:mm",display_short:"DD.MM.YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Datum ungültig",type:"date_time_seconds",input:"DD.MM.YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD.MM.YYYY HH:mm:ss",display_short:"DD.MM.YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD.MM.YYYY",invalid:"Datum ungültig",display:"dd, DD.MM.YYYY",display_short:"DD.MM.YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM.YYYY",invalid:"Datum ungültig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM.YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Datum ungültig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["da-DK"]={timezone:"Europe/Berlin",moment_locale:"da",tab_date:"Dato",tab_time:"Tid",tab_week:"Uge",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Dato ugyldig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Dato ugyldig",type:"date_time_seconds",input:"DD/MM/YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD/MM/YYYY HH:mm:ss",display_short:"DD/MM/YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD/MM/YYYY",invalid:"Dato ugyldig",display:"dd, DD/MM/YYYY",display_short:"DD/MM/YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM/YYYY",invalid:"Dato ugyldig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM/YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Dato ugyldig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["fr-FR"]={timezone:"Europe/Berlin",moment_locale:"fr",tab_date:"Date",tab_time:"Heure",tab_week:"Sem",formats:[{text:"Datum+Zeit",support_bc:!1,invalid:"Dato ugyldig",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_seconds:!1,input:"DD/MM/YYYY HH:mm",display:"dd, DD/MM/YYYY HH:mm",display_short:"DD/MM/YYYY HH:mm",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss","M/D/YYYY HH:DD","MM/D/YYYY HH:DD","M/DD/YYYY HH:DD","M/DD/YY HH:DD","MM/D/YY HH:DD"]},{text:"Datum+Zeit+Sekunden",support_bc:!1,invalid:"Dato ugyldig",type:"date_time_seconds",input:"DD/MM/YYYY HH:mm:ss",store:"YYYY-MM-DDTHH:mm:ssZ",display:"dd, DD/MM/YYYY HH:mm:ss",display_short:"DD/MM/YYYY HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_seconds:!0,parse:["YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","M/D/YYYY HH:DD:ss","MM/D/YYYY HH:DD:ss","M/DD/YYYY HH:DD:ss","M/DD/YY HH:DD:ss","MM/D/YY HH:DD:ss"]},{text:"Datum",support_bc:!1,input:"DD/MM/YYYY",invalid:"Dato ugyldig",display:"dd, DD/MM/YYYY",display_short:"DD/MM/YYYY",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/YYYY","MM/D/YYYY","M/DD/YYYY"]},{text:"Jahr-Monat",support_bc:!1,input:"MM/YYYY",invalid:"Dato ugyldig",store:"YYYY-MM",display:"MMMM YYYY",display_short:"MM/YYYY",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Dato ugyldig",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]},L.DateTimeFormats["tvl-TV"]={timezone:"Europe/Berlin",moment_locale:"en-US",tab_date:"Date",tab_time:"Time",tab_week:"Wk",formats:[{text:"Date+Time",support_bc:!1,invalid:"Invalid Date",type:"date_time",clock:!0,store:"YYYY-MM-DDTHH:mm:00Z",clock_am_pm:!0,clock_seconds:!1,input:"YYYY-MM-DD hh:mm A",display:"dd, YYYY-MM-DD hh:mm A",display_short:"YYYY-MM-DD hh:mm A",display_attribute:"date-time",display_short_attribute:"date-time-short",parse:["YYYY-MM-DDTHH:mm:ss","MM/DD/YYYY HH:mm:ss","MM/DD/YYYYTHH:mm:ss.SSSZ","MM/DD/YYYYTHH:mm:ssZ","YYYY-MM-DD HH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSSSZ","YYYY-MM-DDTHH:mm:ssZ","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss","D.M.YYYY HH:mm","DD.M.YYYY HH:mm","D.MM.YYYY HH:mm","D.MM.YY HH:mm","DD.M.YY HH:mm"]},{text:"Date+Time+Seconds",support_bc:!1,invalid:"Invalid Date",type:"date_time_seconds",store:"YYYY-MM-DDTHH:mm:ssZ",input:"YYYY-MM-DD HH:mm:ss",display:"dd, YYYY-MM-DD HH:mm:ss",display_short:"YYYY-MM-DD HH:mm:ss",display_attribute:"date-time-seconds",display_short_attribute:"date-time-seconds-short",clock:!0,clock_am_pm:!0,clock_seconds:!0,parse:["MM/DD/YYYY HH:mm:ss","D.M.YYYY HH:mm:ss","DD.M.YYYY HH:mm:ss","D.MM.YYYY HH:mm:ss","D.MM.YY HH:mm:ss","DD.M.YY HH:mm:ss"]},{text:"Date",support_bc:!1,input:"YYYY-MM-DD",invalid:"Invalid date",display:"dd, YYYY-MM-DD",display_short:"YYYY-MM-DD",display_attribute:"date",display_short_attribute:"date-short",store:"YYYY-MM-DD",type:"date",clock:!1,parse:["MM/DD/YYYY","D.M.YYYY","D.MM.YYYY","DD.M.YYYY","YYYYMMDD","YYYY-M-D","Y-M-D","M/D/Y","MM/DD/Y"]},{text:"Jahr-Monat",support_bc:!1,input:"YYYY-MM",invalid:"Invalid date",store:"YYYY-MM",display:"MMMM YYYY",display_short:"YYYY-MM",display_attribute:"year-month",display_short_attribute:"year-month-short",type:"year_month",clock:!1,parse:["MM YYYY","MM/YYYY","MM.YYYY","M.YYYY","YYYY-M","YYYY-MM","MM-YYYY","M-YYYY","YYYY-M","YYYY.M","YYYY/M"]},{text:"Jahr",support_bc:!0,input:"Y",invalid:"Invalid date",display:"Y",display_short:"Y",display_attribute:"year",display_short_attribute:"year",store:"YYYY",type:"year",clock:!1,parse:["Y"]}]}},7569:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(2689),R.DateTimeInputBlock=function(n){function DateTimeInputBlock(){return DateTimeInputBlock.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DateTimeInputBlock,n),DateTimeInputBlock.prototype.initOpts=function(){return DateTimeInputBlock.__super__.initOpts.call(this),this.addOpts({matcher:{mandatory:!0,check:"PlainObject"},datetime:{mandatory:!0,check:String},input_format:{mandatory:!0,check:function(n){return!!n.input}}})},DateTimeInputBlock.prototype.incrementBlock=function(n,b){return this.__changeBlock(n,b,1)},DateTimeInputBlock.prototype.decrementBlock=function(n,b){return this.__changeBlock(n,b,-1)},DateTimeInputBlock.prototype.__changeBlock=function(n,b,A){var D,B,E,X;for(console.debug("change block",n,b,A,this._datetime,this._input_format.format),X=L(this._datetime,this._input_format.input),R.util.isFunction(this._matcher.inc_func)?this._matcher.inc_func(X,A):A<0?X.subtract(this._matcher.inc_func_amount||1,this._matcher.inc_func):X.add(this._matcher.inc_func_amount||1,this._matcher.inc_func),B=0,E=b.length;B{var L=A(7288),R=[].indexOf||function(n){for(var b=0,A=this.length;b=0?(Ot=L.DateTimeRangeGrammar.TYPE_MONTH,ft=nt):Ot=lt,zt.push({type:Ot,value:ft});for(A in ut=zt.map((function(n){return n.type})).join(" ").toUpperCase(),st=L.DateTimeRangeGrammar.PARSE_GRAMMARS)for(V=0,Q=(X=st[A]).length;V2&&b.splice(Math.round(b.length/2)),(Q=this.timezones).push.apply(Q,b);this.timezones.sort((function(n,b){return n.displayName.localeCompare(b.displayName)})),this.timezones.sort((function(n,b){return parseInt(n.offset)-parseInt(b.offset)}))},Timezone.getTimezone=function(){return L.util.moment.tz.guess()},Timezone.getTimezoneName=function(n){return this.timezonesAbbrs[n]},Timezone.timezonesAbbrs={GMT:"Greenwich Mean Time",CET:"Central European Time",CEST:"Central European Summer Time",EEST:"Eastern European Summer Time",IDT:"Israel Daylight Time",MSK:"Moscow Time Zone",EAT:"East Africa Time",SAST:"South African Standard Time",EET:"Eastern European Time",CAT:"Central Africa Time",WAT:"West Africa Time",WEST:"Western European Summer Time",BST:"British Summer Time",EST:"Eastern Standard Time",EDT:"Eastern Daylight Time",CST:"Central Standard Time",CDT:"Central Daylight Time",MST:"Mountain Standard Time",MDT:"Mountain Daylight Time",PST:"Pacific Standard Time",PDT:"Pacific Daylight Time",IST:"Indian Standard Time",JST:"Japan Standard Time",HDT:"Hawaii-Aleutian Daylight Time",HST:"Hawaii–Aleutian Time",SST:"Samoa Standard Time",AKDT:"Alaska Daylight Time",ACDT:"Australian Central Daylight Savings Time",ACST:"Australian Central Standard Time",ADT:"Atlantic Daylight Time",AEDT:"Australian Eastern Daylight Savings Time",AEST:"Australian Eastern Standard Time",AST:"Atlantic Standard Time",AWST:"Australian Western Standard Time",ChST:"Chamorro Standard Time",HKT:"Hong Kong Time",KST:"Korea Standard Time",NDT:"Newfoundland Daylight Time",NZDT:"New Zealand Daylight Time",PKT:"Pakistan Standard Time",WIB:"Western Indonesia Time",WIT:"Eastern Indonesia Time",WITA:"Indonesia Central Time Zone"},Timezone}(),L.ready((function(){return L.Timezone.init()}))},1144:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DigiDisplay=function(n){function DigiDisplay(n){DigiDisplay.__super__.constructor.call(this,n),this.__digitsMap=[],this.createMarkup(),this.registerDOMElement(this.__displayDiv)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DigiDisplay,n),DigiDisplay.prototype.initOpts=function(){return DigiDisplay.__super__.initOpts.call(this),this.addOpts({digits:{mandatory:!0,check:Array}})},DigiDisplay.prototype.display=function(n){var b,A,R,D,B,E,X,$;for(D=E=0,X=($=n.split("")).length;E{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.DocumentBrowser=function(n){function DocumentBrowser(){return DocumentBrowser.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(DocumentBrowser,n),DocumentBrowser.prototype.initOpts=function(){return DocumentBrowser.__super__.initOpts.call(this),this.addOpts({gotoLocation:{check:Function,default:(n=this,function(b,A,L){return n.loadLocation(b,A,L)})},marked_opts:{default:{},mandatory:!0,check:function(n){var b;if(!R.util.isPlainObject(n))return!1;for(b in n)if(n[b],"image"===b||"link"===b)return!1;return!0}},getMarkdown:{default:function(n){return n},check:Function},renderHref:{check:Function,default:function(n,b){return n}},url:{check:function(n){return!!R.parseLocation(n)}}});var n},DocumentBrowser.prototype.readOpts=function(){var n,b;return DocumentBrowser.__super__.readOpts.call(this),this.__marked_opts=R.util.copyObject(this._marked_opts),this.__marked_opts.renderer||(this.__marked_opts.renderer=new L.Renderer),(n=this.__marked_opts.renderer).image=(b=this,function(n,A,L){return b.__node.rendererImage(n,A,L)}),n.link=function(n){return function(b,A,L){return n.__node.rendererLink(b,A,L)}}(this),this.__words={}},DocumentBrowser.prototype.renderHref=function(n,b){return this._renderHref(n,b)},DocumentBrowser.prototype.marked=function(n,b){var A,D,B,E;return this.__node=n,A=new R.Deferred,E=this,D=function(n){return A.resolve(L(n,E.__marked_opts))},B=this._getMarkdown(b),R.util.isPromise(B)?B.done((function(n){return D(n)})).fail(A.reject):D(B),A.promise()},DocumentBrowser.prototype.loadLocation=function(n,b,A){if(!n){if(!this.__tree.root.children.length)return;return this.loadLocation(this.__tree.root.children[0].getNodePath())}return this.__tree.root.selectLocation(n).done((L=this,function(n){var R;return R=parseInt(A),n.isSelected()||n.select({search:b,nodeIdx:R}),L.loadContent(n,b,R)})).fail(function(n){return function(){return n.loadEmpty()}}(this));var L},DocumentBrowser.prototype.loadEmpty=function(){return this.__layout.replace(new R.EmptyLabel({text:"No article available."}),"center")},DocumentBrowser.prototype.loadContent=function(n,b,A){return n.loadContent().done((L=this,function(D,B,E){var X,$,V,K,Q,tt,ot,nt,it,rt;if(b){for(tt=null,ot=new R.DocumentBrowser.SearchQuery({search:b}),Q=R.dom.htmlToNodes(L.marked(n,D)),nt=[],it=0,R.dom.findTextInNodes(Q,(function(n,b){var L;if(it+=1,L=ot.match(b))return console.debug("matches",ot,b),L.__mark_all=A===it-1,L.__node=n,nt.push(L)})),console.debug("text matches",nt),V=0,K=nt.length;V"+$+""),X=R.dom.replaceWith(rt.__node,R.dom.htmlToNodes($)),rt.__mark_all&&(tt=X);return L.__layout.replace(Q,"center"),L.__layout.prepend(n.getMainArticleUrl(),"center"),tt?R.dom.scrollIntoView(tt):L.__layout.center().scrollTop=0}L.__layout.replace(B,"center")})).fail(function(n){return function(){return n.loadEmpty()}}(this));var L},DocumentBrowser.prototype.getRootNode=function(){return this.__tree.root},DocumentBrowser.prototype.__doSearch=function(n){var b,A,L,D;if(this.__searchResult.empty("center"),n.trim().length>2){for(b=0,A=(D=this.__tree.root.findContent(new R.DocumentBrowser.SearchQuery({search:n}))).length;b{var L=A(7288),extend=function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}return ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype,n},R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?V("**(Recursion: "+$[1]+")**"):(E.push(K),new L.XHR({url:X.__url+K,responseType:"text"}).start().done((function(n){var b;return(b=K.split("/")).pop(),X.loadIncludes(n,b.join("/"),E).done((function(n){return V(n)}))})).fail((function(){return V("**(Error: "+$[1]+")**")})))):R.resolve(n)})(),R.promise()},Node.prototype.loadContent=function(){var n,b;return this.__content&&new L.resolvedPromise(this.__content,this.__htmlNodes,this.__texts),n=new L.Deferred,new L.XHR({url:this.getMainArticleUrl(),responseType:"text"}).start().done((b=this,function(A){if(b.__content=A,!b.__content.startsWith("<"))return b.loadIncludes(b.__content,b.getNodePath()).fail(n.reject).done((function(A){return b._browser.marked(b,A).done((function(A){return b.__htmlNodes=L.dom.htmlToNodes(A),b.__texts=L.dom.findTextInNodes(b.__htmlNodes),b._browser.addWords(b.__texts),n.resolve(b.__content,b.__htmlNodes,b.__texts)}))})).fail(n.reject);n.reject()})).fail(n.reject),n.promise()},Node.prototype.findContent=function(n,b){var A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt;if(null==b&&(b=[]),L.util.assert(n instanceof L.DocumentBrowser.SearchQuery,"DocumentBrowserNode.findContent","searchQuery needs to be instance of CUI.DocumentBrowser.SearchQuery.",{searchQuery:n}),K=n.getRegExps(),R=function(){tt=[];for(var n=0,b=K.length-1;0<=b?n<=b:n>=b;0<=b?n++:n--)tt.push(n);return tt}.apply(this),Q=function(n){var b,A,D,B;if(0!==R.length)for(A=0,D=(B=n.getMatches()).length;A"+A+""},Node.prototype.rendererImage=function(n,b,A){var R;return""+L.escapeAttribute(A)+""},Node.prototype.renderContent=function(){return new L.Label({text:this._title,multiline:!0})},Node}(L.ListViewTreeNode),L.DocumentBrowser.RootNode=function(n){function RootNode(){return RootNode.__super__.constructor.apply(this,arguments)}return extend(RootNode,n),RootNode}(L.DocumentBrowser.Node)},4126:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.NodeMatch=function(n){function NodeMatch(){return NodeMatch.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NodeMatch,n),NodeMatch.prototype.initOpts=function(){return NodeMatch.__super__.initOpts.call(this),this.addOpts({title_match:{check:L.DocumentBrowser.SearchMatch},text_matches:{check:function(n){var b,A;for(b=0,A=n.length;b"+new L.Icon({icon:"right"}).DOM.outerHTML+""))}),L.dom.setAttribute(B.DOM,"tabindex",0),L.Events.listen({type:"focus",node:B,call:(it=this,function(n){it._node.select({search:it._searchQuery.getSearch()})})}),n=[B],this._text_matches)for(nt=L.dom.element("UL"),n.push(nt),Q=this._text_matches,b=function(n){return function(b){return L.Events.listen({type:"focus",node:$,call:function(A){n._node.select({search:n._searchQuery.getSearch(),nodeIdx:b.nodeIdx})}})}}(this),D=0,X=Q.length;D{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.SearchMatch=function(n){function SearchMatch(){return SearchMatch.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SearchMatch,n),SearchMatch.prototype.initOpts=function(){return SearchMatch.__super__.initOpts.call(this),this.addOpts({searchQuery:{mandatory:!0,check:L.DocumentBrowser.SearchQuery},string:{mandator:!0,check:String}})},SearchMatch.prototype.readOpts=function(){return SearchMatch.__super__.readOpts.call(this),this.__matches=[]},SearchMatch.prototype.addMatch=function(n){return this.__matches.push(n)},SearchMatch.prototype.getMatches=function(){return this.__matches},SearchMatch.prototype.getString=function(){return this._string},SearchMatch.prototype.getHighlighted=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st;for(null==n&&(n=!1),rt=this._string,b=function(n){return void 0===n?null:n.join(".")},nt=function(n){var b;return(b=n.split(/\s+/)).length>6&&b.splice(3,b.length-6,"..."),b.join(" ")},(D=[]).length=rt.length,K=B=0,$=(Q=this.__matches).length;B<$;K=++B)for(E=X=tt=(V=Q[K]).index,ot=V.index+V[0].length;tt<=ot?Xot;E=tt<=ot?++X:--X)D[E]||(D[E]=[]),D[E].push(V.regExp_idx);for(it=[],E=0;E"),A&&A!==R&&it.push(''),st=[];st.push(rt[E]),(E+=1)!==D.length&&!D[E]&&!A;);it.push(L.util.toHtml(nt(st.join(""))))}return A&&it.push(""),it.join("")},SearchMatch}(L.Element)},2827:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.DocumentBrowser.SearchQuery=function(n){function SearchQuery(){return SearchQuery.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SearchQuery,n),SearchQuery.prototype.initOpts=function(){return SearchQuery.__super__.initOpts.call(this),this.addOpts({search:{mandatory:!0,check:String}})},SearchQuery.prototype.readOpts=function(){var n,b,A,L;for(SearchQuery.__super__.readOpts.call(this),this.__regExpe=[],n=0,b=(A=this._search.trim().split(/\s+/)).length;n0)for(Q||(Q=new L.DocumentBrowser.SearchMatch({searchQuery:this,string:n})),D=0,E=$.length;D{var L=A(7288),R={}.hasOwnProperty;L.FileReader=function(n){function FileReader(){return FileReader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileReader,n),FileReader.prototype.initOpts=function(){return FileReader.__super__.initOpts.call(this),this.removeOpt("url")},FileReader.prototype.readOpts=function(){return L.Element.prototype.readOpts.call(this)},FileReader.prototype.getUploadFileClass=function(){return L.FileReaderFile},FileReader.prototype.uploadFile=function(n){return n.upload(n)},FileReader.save=function(n,b,A){var L,R;return null==A&&(A="text/csv"),L=new Blob([b],{type:A}),window.navigator.msSaveOrOpenBlob?window.navigator.msSaveBlob(L,n):((R=window.document.createElement("a")).href=window.URL.createObjectURL(L),R.download=n,document.body.appendChild(R),R.click(),document.body.removeChild(R),window.URL.revokeObjectURL(L))},FileReader}(L.FileUpload)},6760:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FileReaderFile=function(n){function FileReaderFile(){return FileReaderFile.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileReaderFile,n),FileReaderFile.prototype.initOpts=function(){return FileReaderFile.__super__.initOpts.call(this),this.addOpts({format:{mandatory:!0,default:"Text",check:["ArrayBuffer","Text"]}})},FileReaderFile.prototype.upload=function(n){var b,A,L,R,D;for(this.__reader=new FileReader,D=this,b=function(n){return D.__reader.addEventListener(n.toLowerCase(),(function(b){return D["__event_"+n](b)}))},A=0,L=(R=["loadStart","progress","abort","error","load","loadend"]).length;A{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=1}},onAdd:{check:Function},onBatchStart:{check:Function},onBatchQueued:{check:Function},onBatchDone:{check:Function},onProgress:{check:Function},onDone:{check:Function},onUpdate:{check:Function},onDequeue:{check:Function},onRemove:{check:Function},onFail:{check:Function},onAlways:{check:Function},shouldQueue:{check:Function},onBeforeDone:{check:Function}})},FileUpload.prototype.readOpts=function(){return FileUpload.__super__.readOpts.call(this),this.setUrl(this._url)},FileUpload.prototype.setUrl=function(n){return this.__url=n,this.__url},FileUpload.prototype.getUrl=function(){return this.__url},FileUpload.prototype.getFiles=function(n){var b,A,R,B,E,X;for(L.util.isString(n)&&(n=[n]),A=[],R=0,B=(E=this.__files).length;R=0))&&A.push(b);return A},FileUpload.prototype.getInfo=function(){var n,b,A,L,R,D,B,E,X,$,V,K;for(V={},K=0,E=0,L=0,R=0,A=!0,D=0,B=(X=this.getFiles()).length;D0){for(Q=[],R=[],E=0,X=(K=b.files).length;E0&&console.warn("Files empty or directories, not uploaded...",Q),R.length>0&&$.queueFiles(R)}return n.stopPropagation(),n.preventDefault(),!1})}),A=0,R=(E=this.__dropZones).length;A\x3c!-- /CUI.FileUploadButton --\x3e'))}))},5370:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.FileUploadFile=function(n){function FileUploadFile(n){FileUploadFile.__super__.constructor.call(this,n),this.__progress={status:"CREATED",total:this._file.size,loaded:0,percent:null},this.__dfr=new L.Deferred,this.__promise=this.__dfr.promise()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FileUploadFile,n),FileUploadFile.prototype.initOpts=function(){return FileUploadFile.__super__.initOpts.call(this),this.addOpts({file:{mandatory:!0,check:function(n){return"object"==typeof n}},fileUpload:{mandatory:!0,check:L.FileUpload},batch:{check:function(n){return n>=0}},onRemove:{check:Function},onDequeue:{check:Function},onBeforeDone:{check:Function}})},FileUploadFile.prototype.queue=function(){return this.__progress.status="QUEUED",this.__dfr.notify(this),this},FileUploadFile.prototype.getImage=function(){var n,b,A;return this.__imgDiv?this.__imgDiv:((b=L.dom.img()[0]).src=window.URL.createObjectURL(this._file),b.onload=(A=this,function(n){return b.width0?(this.__upload=new L.XHR({url:n,form:A}),this.__upload.start().progress((D=this,function(n,b,A,L){if("download"!==n&&"ABORT"!==D.__progress.status)return D.__progress.status=b===A?"COMPLETED":"PROGRESS",D.__progress.loaded=b,D.__progress.total=A,D.__progress.percent=L,D.__dfr.notify(D)})).done(function(n){return function(b){return n.__progress.data=b,R=function(){return n.__progress.status="DONE",n.__upload=null,n.__dfr.resolve(n)},n._onBeforeDone?L.decide(n._onBeforeDone(n)).done(R).fail((function(){return n.__progress.status="ABORT",n.__upload=null,n.__dfr.reject(n)})):R()}}(this)).fail(function(n){return function(b,A,L){return"abort"===L&&(n.__progress.status="ABORT"),"ABORT"!==n.__progress.status&&(n.__progress.status="FAILED"),n.__progress.fail=n.__upload.response(),n.__progress.fail_xhr=n.__upload.getXHR(),n.__upload=null,n.__dfr.reject(n)}}(this))):L.setTimeout({call:function(n){return function(){return n.__progress.status="FAILED",n.__upload=null,n.__dfr.reject(n)}}(this)}),this.__progress.status="STARTED",this.__progress.percent=0,this.__dfr.notify(this),this.__promise},FileUploadFile}(L.Element)},7250:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Form=function(n){function Form(n){Form.__super__.constructor.call(this,n),this._padded&&this.addClass("cui-form--padded"),this._condensed&&this.addClass("cui-form--condensed")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Form,n),Form.prototype.initOpts=function(){return Form.__super__.initOpts.call(this),this.addOpts({top:{},bottom:{},padded:{check:Boolean,default:!1},condensed:{check:Boolean,default:!1}})},Form.prototype.initTemplate=function(){return this.registerTemplate(this.__verticalLayout.getLayout())},Form.prototype.initLayout=function(){var n,b,A,R,D;for(D={class:"cui-form cui-form-appearance-"+this._appearance},n=0,A=(R=["maximize","maximize_horizontal","maximize_vertical"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.SimpleForm=function(n){function SimpleForm(){return SimpleForm.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SimpleForm,n),SimpleForm.prototype.initOpts=function(){return SimpleForm.__super__.initOpts.call(this),this.addOpts({fields:{mandatory:!0,check:function(n){return L.util.isFunction(n)||L.util.isArray(n)}},header:{check:Array},horizontal:{default:!1,check:function(n){return L.util.isBoolean(n)||L.util.isInteger(n)&&n>0}},appearance:{default:"normal",mandatory:!0,check:["normal","separators"]},render_as_grid:{default:!1,mandatory:!0,check:Boolean},blockLevelOffset:{check:"Integer",default:0}})},SimpleForm.prototype.readOpts=function(){var n,b,A,R;return SimpleForm.__super__.readOpts.call(this),1===this._horizontal?this.__horizontal=null:this.__horizontal=this._horizontal,(null!=(A=this._form)?A.checkbox:void 0)?(L.util.assert(L.util.isPlainObject(this._form.checkbox,"new CUI.Form","opts.form.checkbox needs to be PlainObject.",{opts:this.opts})),L.util.assert(this._name,"new CUI.Form","opts.form.checkbox requires opts.name to be set.",{opts:this.opts}),L.util.assert(!this._form.checkbox.data,"new CUI.Form","opts.form.checkbox cannot have 'data' set.",{opts:this.opts}),L.util.assert(!this._form.checkbox.name,"new CUI.Form","opts.form.checkbox cannot have 'name' set.",{opts:this.opts}),(n=L.util.copyObject(this._form.checkbox,!0)).data=this.__checkbox_data={checkbox:!1},n.name="checkbox",b=n.onActivate,n.onActivate=(R=this,function(n,A,D){var B,E,X,$;if("function"==typeof b&&b(n,A,D),D.ctrlKey())for(E=0,X=($=L.dom.matchSelector(R.DOM,".cui-checkbox")).length;E3&&(Ot=3),(ot=rt instanceof L.Form?rt.getCheckbox():null)?(!function(n,b){L.Events.listen({type:"data-changed",node:n,call:function(){return n.getValue()?(L.dom.addClass(tt.DOM,"cui-form-block--checkbox-checked"),L.dom.showElement(b.DOM)):(L.dom.removeClass(tt.DOM,"cui-form-block--checkbox-checked"),L.dom.hideElement(b.DOM))}})}(ot,rt),zt=ot):"LABEL"===(null!=(zt=E(rt))?zt.nodeName:void 0)&&zt.classList.add("cui-block-title"),tt=new L.Block({padded:!1,maximize:n.__maximize,maximize_horizontal:n.__maximize_horizontal,maximize_vertical:n.__maximize_vertical,class:"cui-form-block",level:Ot,header:zt,content:[lt,B(rt)]}),ot&&(L.dom.addClass(tt.DOM,"cui-form-block--has-checkbox"),ot.getValue()?L.dom.addClass(tt.DOM,"cui-form-block--checkbox-checked"):L.dom.removeClass(tt.DOM,"cui-form-block--checkbox-checked")),b(tt),L.dom.data(tt.DOM,"data-field",rt),n.__setRowVisibility(tt.DOM),V=null,K=null,void $();if(!V){for(pt=!1,bt=ut=R,_t=X;ut<_t;bt=ut+=1)if(A(D[bt])){pt=!0;break}pt?(V=L.dom.element("DIV",{class:"cui-form-table"}),K=!0):(V=L.dom.element("DIV",{class:"cui-form-container"}),K=!1),n.__horizontal&&L.dom.addClass(V,"cui-form--horizontal"),b(V)}return nt=[],(ft=rt.getName())&&nt.push("cui-form-field-name--"+ft),rt instanceof L.Select?nt.push("cui-form-field-type--select"):rt instanceof L.Checkbox?nt.push("cui-form-field-type--checkbox"):rt instanceof L.Input&&nt.push("cui-form-field-type--input"),K?((Mt=E(rt,!0))?nt.push("cui-form-tr--has-key"):nt.push("cui-form-tr--has-no-key"),yt=L.dom.element("DIV",{class:"cui-form-tr "+nt.join(" "),"data-for-field":rt.getUniqueId()}),At=L.dom.element("DIV",{class:"cui-form-td cui-form-key"}),b(Mt,At),yt.appendChild(At),At=L.dom.element("DIV",{class:"cui-form-td cui-form-value"}),b(lt,At),b(B(rt),At),yt.appendChild(At),L.dom.data(yt,"data-field",rt),n.__setRowVisibility(yt),st&&yt.setAttribute("data-cui-grid",st),V.appendChild(yt)):((it=rt._form)&&(it.maximize&&nt.push("cui-maximize"),(it.maximize&&!1!==it.maximize_horizontal||!0===it.maximize_horizontal)&&nt.push("cui-maximize-horizontal"),(it.maximize&&!1!==it.maximize_vertical||!0===it.maximize_vertical)&&nt.push("cui-maximize-vertical")),gt=L.dom.element("DIV",{class:"cui-form-row "+nt.join(" "),"data-for-field":rt.getUniqueId()}),b(lt,gt),gt.appendChild(B(rt)),b(B(rt),gt),L.dom.data(gt,"data-field",rt),n.__setRowVisibility(gt),st&>.setAttribute("data-cui-grid",st),V.appendChild(gt)),$()}}}(this),$()},SimpleForm.prototype.renderAsBlock=function(){var n,b,A,R,D;if(this.getCheckbox())return!0;if(!1===this._render_as_block)return!1;if(!0===this._render_as_block)return!0;for(A=0,R=(b=this.getFields()).length;A0},SimpleForm.prototype.appendToContainer=function(n){return this.append(n)},SimpleForm.prototype.onDataChanged=function(n,b){var A;SimpleForm.__super__.onDataChanged.call(this,n,b),b.element&&"goto"!==(A=b.action)&&"reset"!==A&&(this.__undo.log[++this.__undo.idx]={name:b.element.getName(),undo_idx:b.undo_idx,action:b.action},this.__undo.log.splice(this.__undo.idx+1))},SimpleForm.prototype.hasUserData=function(n){var b,A,L;for(b=0,A=(L=this.getFields("hasUserData")).length;b=0,this.__cls+".getFieldByIdx","idx must be Integer.",{idx:n}),this.getFields("getFieldByIdx")[n]},SimpleForm.prototype.updateHint=function(n,b,A){var R,D;if(null==A&&(A=!0),D=this.getFieldsByName(n)[0]){if(1===(R=L.dom.matchSelector(this.getLayout().DOM,".cui-form-hint[data-for-field='"+D.getUniqueId()+"'] > .cui-form-hint-label")).length)return L.dom.data(R[0]).element.setText(b),A&&L.Events.trigger({type:"content-resize",node:R[0]}),this;console.error("Form.updateHint:",n,"not found in DOM.")}else console.error("Form.updateHint:",n,"not found.")},SimpleForm.prototype.__setClassOnField=function(n,b,A){var R,D,B,E,X;for(D=0,B=(E=this.getFieldsByName(n)).length;D{var L=A(7288),R={}.hasOwnProperty;L.FormButton=function(n){function FormButton(n){FormButton.__super__.constructor.call(this,n)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormButton,n),FormButton.prototype.getButtonOpts=function(){var n,b,A,L,R;for(L={icon:this._icon},n=0,A=(R=["appearance"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.FormModal=function(n){function FormModal(n){FormModal.__super__.constructor.call(this,n),this.__old_text=null,this.__old_display=null}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormModal,n),FormModal.prototype.initOpts=function(){return FormModal.__super__.initOpts.call(this),this.removeOpt("popover"),this.addOpts({modal:{default:{},check:"PlainObject",apply_button:{mandatory:!0,default:{text:"Ok"},check:function(n){return L.util.isPlainObject(n)}}},hasChanges:{check:Function},revertData:{check:Function}})},FormModal.prototype.initPopover=function(n){var b,A,R,D,B;return A=L.util.copyObject(this._modal.apply_button,!0),D=A.onClick,A.onClick=(B=this,function(n,b){return L.decide("function"==typeof D?D(n,b,B):void 0).done((function(){return B.__popover.hide()}))}),b=new L.defaults.class.Button(A),this.hasChanges()?b.enable():b.disable(),n.pane.footer_right=b,R=new L.Modal(n),(this.__orig_set_data||this._hasChanges)&&L.Events.listen({type:"data-changed",node:R,call:function(n){return function(){return n.hasChanges()?b.enable():b.disable()}}(this)}),R},FormModal.prototype.revertData=function(){return this._revertData?(this._revertData(this),this):(L.util.assert(this.__orig_set_data,"Form.revertData","Only supported with opts.name set and opts.data PlainObject.",{opts:this.opts}),delete this.__data,this.__orig_data?this.__orig_set_data[this._name]=this.__orig_data:delete this.__orig_set_data[this._name],this.setData(this.__orig_set_data),this.removeFields(),L.Events.trigger({type:"data-changed",node:this.getPopover()}),this)},FormModal.prototype.setData=function(n){return this._name&&!L.util.isFunction(n)&&(n[this._name]?this.__orig_data=L.util.copyObject(n[this._name],!0):this.__orig_data=void 0,this.__orig_set_data=n),FormModal.__super__.setData.call(this,n)},FormModal.prototype.__closePopover=function(){return this.__orig_set_data&&(this.__orig_data=L.util.copyObject(this.__orig_set_data[this._name],!0)),FormModal.__super__.__closePopover.call(this)},FormModal.prototype.hasChanges=function(){return this._hasChanges?this._hasChanges(this,this.getData()):this.__orig_set_data?JSON.stringify(this.__orig_data)!==JSON.stringify(this.__orig_set_data[this._name]):null},FormModal.prototype.getPopoverOpts=function(){var n,b,A;return(b=L.util.copyObject(this._modal,!0)).cancel&&(this.__orig_set_data||this._hasChanges)&&(n=b.onCancel,b.onCancel=(A=this,function(b,R){var D;return D=new L.Deferred,L.decide("function"==typeof n?n(b,R,A.hasChanges()):void 0).done(D.resolve).fail(D.reject),D.done((function(){return A.revertData()})),D.promise()})),delete b.apply_button,L.util.isEmpty(b.class)&&(b.class=""),b.element=null,b.pane||(b.pane={}),L.util.assert(L.util.isPlainObject(b.pane),"new CUI.FormModal","opts.pane must be PlainObject",{opts:b}),b.class+=" cui-form-modal-modal",b},FormModal.prototype.disable=function(){var n;return FormModal.__super__.disable.call(this),null!=(n=this.__button)?n.disable():void 0},FormModal.prototype.enable=function(){var n;return FormModal.__super__.enable.call(this),null!=(n=this.__button)?n.enable():void 0},FormModal.prototype.destroy=function(){var n;return FormModal.__super__.destroy.call(this),null!=(n=this.__popover)?n.destroy():void 0},FormModal}(L.FormPopover)},9064:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].slice;L.FormPopover=function(n){function FormPopover(n){FormPopover.__super__.constructor.call(this,n),this.__old_display=null,this.__old_render=null}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(FormPopover,n),FormPopover.prototype.initOpts=function(){return FormPopover.__super__.initOpts.call(this),this.addOpts({popover:{default:{},check:"PlainObject"},button:{default:{},check:function(n){return L.util.isPlainObject(n)&&!n.onClick}},trigger_data_changed_while_open:{default:!1,check:Boolean},renderDisplayButton:{check:Function},renderDisplayContent:{check:Function},onClose:{check:Function}})},FormPopover.prototype.readOpts=function(){if(FormPopover.__super__.readOpts.call(this),this._class&&(this.__class=this._class,delete this._class),this.__fields_is_func=L.util.isFunction(this._fields),this.__fields_is_func)return L.util.assert(!0!==this._data_not_for_others,"new CUI.FormPopover","opts.data_not_for_others cannot be set to true if fields are created on open by a Function.",{opts:this.opts})},FormPopover.prototype.init=function(){return this.__fields_is_func?this.__initUndo():FormPopover.__super__.init.call(this)},FormPopover.prototype.setDataOnOthers=function(){return!this.__fields_is_func&&FormPopover.__super__.setDataOnOthers.call(this)},FormPopover.prototype.isChanged=function(){return!!this.__fields&&FormPopover.__super__.isChanged.call(this)},FormPopover.prototype.getFields=function(n){return null==n&&(n=""),"render"===n||"displayValue"===n?[]:"show"===n||"hide"===n||"remove"===n||"enable"===n||"disable"===n||"getFieldsByName"===n||"hasUserData"===n||"getFieldByIdx"===n||"setFormDepth"===n||"getDataFields"===n?this.__fields||[]:(L.util.assert(this.__fields,"FormPopover.getFields("+n+")","Fields not rendered yet. This is a programming error in CUI."),FormPopover.__super__.getFields.call(this))},FormPopover.prototype.initTemplate=function(){return this.__horLayout=new L.VerticalLayout({maximize:!1,bottom:{}}),this.registerTemplate(this.__horLayout.getLayout())},FormPopover.prototype.hasContentForAppend=function(){return!0},FormPopover.prototype.render=function(){var n,b;return(n=L.util.copyObject(this._button,!0)).onClick=(b=this,function(){return b.__openPopover()}),L.mergeMap(n,{left:!0,text:""}),this.__button=new L.defaults.class.Button(n),this.addClass("cui-data-field-input"),this._renderDisplayButton&&this.addClass("cui-form-popover-has-button-text"),this.append(this.__button,"center"),L.DataField.prototype.render.call(this),this},FormPopover.prototype.getButton=function(){return this.__button},FormPopover.prototype.displayValue=function(){return L.DataField.prototype.displayValue.call(this),this.__renderDisplay()},FormPopover.prototype.callOnFields=function(){var n,b,A,L,R,B;for(A=arguments[0],n=2<=arguments.length?D.call(arguments,1):[],L=0,R=(B=this.getFields()).length;L{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?"horizontal-layout-left-center":D.call(n,"right")>=0?"horizontal-layout-center-right":"horizontal-layout-center"},HorizontalLayout.prototype.getMapPrefix=function(){return"cui-horizontal-layout"},HorizontalLayout.prototype.hasFlexHandles=function(){var n,b;return!(!(null!=(n=this._left)?n.flexHandle:void 0)&&!(null!=(b=this._right)?b.flexHandle:void 0))},HorizontalLayout.prototype.getPanes=function(){var n;return this.hasFlexHandles()?["left","right"]:(n=[],this._left&&n.push("left"),this._right&&n.push("right"),n)},HorizontalLayout.prototype.getSupportedPanes=function(){return["left","right"]},HorizontalLayout}(L.Layout)},8986:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.HorizontalList=function(n){function HorizontalList(){return HorizontalList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(HorizontalList,n),HorizontalList.prototype.initOpts=function(){return HorizontalList.__super__.initOpts.call(this),this.mergeOpt("maximize",{default:!1}),this.removeOpt("center"),this.addOpts({content:{}})},HorizontalList.prototype.readOpts=function(){return HorizontalList.__super__.readOpts.call(this),this._center={content:this._content}},HorizontalList.prototype.getSupportedPanes=function(){return[]},HorizontalList}(L.HorizontalLayout)},9691:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(7516),A(6144),A(4239),A(5813),A(127),R.CodeInput=function(n){function CodeInput(){return CodeInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(CodeInput,n),CodeInput.availableModes=["html","javascript","json","css"],CodeInput.prototype.readOpts=function(){return CodeInput.__super__.readOpts.call(this),this._textarea=!0,this},CodeInput.prototype.initOpts=function(){return CodeInput.__super__.initOpts.call(this),this.addOpts({mode:{check:R.CodeInput.availableModes,default:"javascript"}})},CodeInput.prototype.render=function(){var n,b,A;if(CodeInput.__super__.render.call(this),this.__aceEditor=L.edit(this.__input,{useWorker:!1,selectionStyle:"text"}),this.__aceEditor.getSession().setMode("ace/mode/"+this._mode),b=null!=(n=this.__data)?n[this._name]:void 0){if(R.util.isString(b))try{b=JSON.parse(b)}catch(n){}"json"===this._mode&&(b=JSON.stringify(b,null,"\t")),this.__aceEditor.setValue(b,-1),this.__aceEditor.clearSelection()}return this.__aceEditor.on("change",(A=this,function(){return A.storeValue(A.__aceEditor.getValue())}))},CodeInput.prototype.destroy=function(){var n;return null!=(n=this.__aceEditor)&&n.destroy(),CodeInput.__super__.destroy.call(this)},CodeInput}(R.Input)},8533:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ColorInput=function(n){function ColorInput(){return ColorInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ColorInput,n),ColorInput.prototype.initOpts=function(){return ColorInput.__super__.initOpts.call(this)},ColorInput.prototype.readOpts=function(){var n;return this.opts.leftControlElement=new L.Button({tabindex:-1,onClick:(n=this,function(b,A){return n.__input.focus()})}),ColorInput.__super__.readOpts.call(this)},ColorInput.prototype.onDataChanged=function(n,b){return ColorInput.__super__.onDataChanged.call(this,n,b),this.__toggleColor()},ColorInput.prototype.initValue=function(){return ColorInput.__super__.initValue.call(this),this.__data[this._name]&&0!==this.__data[this._name].length?(this._leftControlElement.DOM.style.setProperty("--btn-background",this.__data[this._name]),this._leftControlElement.removeClass("is-empty")):this._leftControlElement.addClass("is-empty")},ColorInput.prototype.__toggleColor=function(){return this.__input.value.length>0&&this.__checkInputInternal()?(this._leftControlElement.DOM.style.setProperty("--btn-background",this.__input.value),this._leftControlElement.removeClass("is-empty")):(this._leftControlElement.DOM.style.removeProperty("--btn-background"),this._leftControlElement.addClass("is-empty"))},ColorInput}(L.Input)},9172:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(5023),R.EmailInput=function(n){function EmailInput(){return EmailInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(EmailInput,n),EmailInput.prototype.initOpts=function(){return EmailInput.__super__.initOpts.call(this),this.addOpts({simpleValidation:{default:!1,check:Boolean}}),this.removeOpt("checkInput")},EmailInput.prototype.readOpts=function(){return EmailInput.__super__.readOpts.call(this),this._checkInput=this.__checkInput},EmailInput.prototype.__checkInput=function(n){return this._simpleValidation?R.util.isEmpty(n)||R.EmailInput.regexp.exec(n):R.util.isEmpty(n)||!!L.parseOneAddress(n)},EmailInput.unicode_ranges="ㄱ-힝A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԣԱ-Ֆՙա-ևא-תװ-ײء-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺऄ-हऽॐक़-ॡॱ-ॲॻ-ॿঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘ-ౙౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹഽൠ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱽᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-Ɐⱱ-ⱽⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀䶵一鿃ꀀ-ꒌꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙟꙢ-ꙮꙿ-ꚗꜗ-ꜟꜢ-ꞈꞋ-ꞌꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",EmailInput.regexp=RegExp("^(?:["+EmailInput.unicode_ranges+"\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.["+EmailInput.unicode_ranges+"\\w!#$%&'*+/=?^_`{|}~-]+)*|\"(?:["+EmailInput.unicode_ranges+" \\w| \\"+EmailInput.unicode_ranges+'w.])*")@(?:['+EmailInput.unicode_ranges+"\\w.-]+\\.["+EmailInput.unicode_ranges+"\\w]{2,}|localhost)$","i"),EmailInput}(R.Input)},9619:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.IconInput=function(n){function IconInput(){return IconInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(IconInput,n),IconInput.prototype.initOpts=function(){return IconInput.__super__.initOpts.call(this)},IconInput.prototype.readOpts=function(){var n;return this.opts.leftControlElement=new L.Button({icon:"fa-font-awesome",tabindex:-1,onClick:(n=this,function(b,A){return n.__input.focus()})}),IconInput.__super__.readOpts.call(this)},IconInput.prototype.onDataChanged=function(n,b){return IconInput.__super__.onDataChanged.call(this,n,b),this.__toggleIcon()},IconInput.prototype.initValue=function(){return IconInput.__super__.initValue.call(this),this.__data[this._name]&&0!==this.__data[this._name].length?(this._leftControlElement.setIcon(this.__data[this._name]),this._leftControlElement.removeClass("is-empty")):this._leftControlElement.addClass("is-empty")},IconInput.prototype.__toggleIcon=function(){return this.__input.value.length>0?(this._leftControlElement.setIcon(this.__input.value),this._leftControlElement.removeClass("is-empty")):(this._leftControlElement.setIcon(""),this._leftControlElement.addClass("is-empty"))},IconInput}(L.Input)},7752:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Input=function(n){function Input(n){var b,A,R,D,B,E;for(Input.__super__.constructor.call(this,n),this.addClass("cui-input"),this._textarea&&this.addClass("cui-data-field--textarea"),this._overwrite?this.__getCursorBlocks=this.__overwriteBlocks:this.__getCursorBlocks=this._getCursorBlocks,this._content_size&&this.addClass("cui-input-content-size"),this.isRequired()&&this.addClass("cui-input-required"),this._checkInput&&(this.__checkInput=this._checkInput),this._prevent_invalid_input&&this.addClass("cui-input-has-prevent-invalid-input"),this.__checkInput&&this.addClass("cui-input-has-check-input"),this._appearance&&this.addClass("cui-input-appearance-"+this._appearance),this.__inputHints={},this.__inputHintTexts={},A=0,D=(B=["empty","invalid","valid"]).length;A=0}},onFocus:{check:Function},onClick:{check:Function},onKeyup:{check:Function},onSelectionchange:{check:Function},incNumbers:{default:!0,check:Boolean},onBlur:{check:Function},regexp:{check:String},regexp_flags:{default:"",check:String},getInputBlocks:{check:Function},getCursorBlocks:{check:function(n){return L.util.isFunction(n)&&!this._overwrite}},placeholder:{check:function(n){return L.util.isFunction(n)||L.util.isString(n)}},readonly:{check:Boolean},readonly_select_all:{default:!0,check:Boolean},textarea:{check:Boolean},textarea_cols:{check:function(n){return n>=1}},min_rows:{check:function(n){return n>=2},default:2},rows:{check:function(n){return n>=1}},content_size:{default:!1,check:Boolean},prevent_invalid_input:{default:!1,check:Boolean},required:{default:!1,check:Boolean},appearance:{check:["code"]},controlElement:{check:function(n){return n instanceof L.DOMElement||L.util.isFunction(n)}},leftControlElement:{check:function(n){return n instanceof L.DOMElement}}})},Input.prototype.readOpts=function(){var n;return this.opts.readonly&&L.util.assert(!(this.opts.getCursorBlocks||this.opts.getInputBlocks||this.opts.checkInput),"new CUI.Input","opts.readonly conflicts with opts.getCursorBlocks, opts.getInputBlocks, opts.checkInput."),this.opts.textarea&&(L.util.assert("off"!==this.opts.autocomplete,"new CUI.Input","opts.textarea does not work with opts.autocomplete",{opts:this.opts}),L.util.assert(!this.opts.incNumbers,"new CUI.Input","opts.textarea does not work with opts.incNumbers",{opts:this.opts})),Input.__super__.readOpts.call(this),this._readonly&&this._readonly_select_all&&(this._getCursorBlocks=function(n){return[new L.InputBlock({start:0,string:n})]}),this._regexp?(this.__regexp=new RegExp(this._regexp,this._regexp_flags),this.__checkInput=(n=this,function(b){return!n._required&&0===b.trim().length||!!n.__checkInputRegexp(b)&&(!n._checkInput||n._checkInput(b))})):this._required&&(this.__checkInput=function(n){return function(b){return 0!==b.trim().length&&(!n._checkInput||n._checkInput(b))}}(this)),!1===this._spellcheck?this.__spellcheck="false":this.__spellcheck="default",this.__autocomplete=this._autocomplete,this},Input.prototype.__checkInputRegexp=function(n){return!!this.__regexp.exec(n)},Input.prototype.setSpellcheck=function(n){return n?L.dom.setAttribute(this.__input,"spellcheck","default"):L.dom.setAttribute(this.__input,"spellcheck","false")},Input.prototype.setPlaceholder=function(n){return L.dom.setAttribute(this.__input,"placeholder",n)},Input.prototype.getPlaceholder=function(){if(this._placeholder)return L.util.isFunction(this._placeholder)?this._placeholder(this,this.getData()):this._placeholder},Input.prototype.__createElement=function(n){var b,A,R,D,B;return null==n&&(n="text"),!0===this._textarea?(D={placeholder:this.getPlaceholder(),tabindex:"0",maxLength:this._maxLength,id:this._id||"cui-input-"+this.getUniqueId(),spellcheck:this.__spellcheck,rows:this._min_rows,dir:"auto"},this._textarea_cols&&(D.cols=this._textarea_cols),this.__input=L.dom.$element("textarea","cui-textarea",D),this.__input.style.setProperty("--textarea-min-rows",this._min_rows),B=this,R=function(){var n;return B.__input.rows=B._min_rows,n=Math.ceil((B.__input.scrollHeight-B.__baseScrollHeight)/B.__lineHeight),B.__input.rows=B._min_rows+n},b=function(n){return function(){var b;return b=n.__input.value,n.__input.value="",n.__baseScrollHeight=n.__input.scrollHeight,n.__input.value=b,n.__lineHeight=parseInt(L.dom.getComputedStyle(n.__input).lineHeight,10)}}(this),L.Events.listen({node:this.__input,type:"input",call:R}),L.dom.waitForDOMInsert({node:this.__input}).done(function(n){return function(){if(!n.isDestroyed())return b(),R()}}(this))):this.__input=L.dom.$element("input","cui-input",{type:n,size:1,placeholder:this.getPlaceholder(),tabindex:"0",maxLength:this._maxLength,id:this._id||"cui-input-"+this.getUniqueId(),spellcheck:this.__spellcheck,autocomplete:this.__autocomplete,dir:"auto"}),L.Events.listen({node:this.__input,type:"dragstart",call:function(n){return n.preventDefault()}}),L.Events.listen({node:this.__input,type:"keydown",call:function(n){return function(b){var A,L,R,D;if(!(b.ctrlKey()&&90===!b.keyCode()||b.metaKey())){if(n.lastKeyDownEvent=b,!n._incNumbers||n._textarea||n._readonly||n.incNumberBounds(b),37===(A=b.keyCode())||39===A||36===A||35===A)return n.moveCursor(b),void n.showCursor(b);9!==(L=b.keyCode())&&16!==L&&17!==L&&18!==L&&27!==L&&33!==L&&34!==L&&35!==L&&36!==L&&38!==L&&40!==L&&(!b.ctrlKey()&&!b.metaKey()||65!==(R=b.keyCode())&&67!==R&&86!==R&&88!==R)&&(n._textarea||13!==b.keyCode())&&(8===b.keyCode()&&0===(D=n.__input.selectionStart)&&D===n.__input.selectionEnd||n.__focusShadowInput())}}}(this)}),L.Events.listen({type:"keyup",node:this.__input,call:function(n){return function(b){var A;if(37===(A=b.keyCode())||39===A||36===A||35===A)return b.preventDefault(),void(n.cursor||n.showCursor(b));n.initCursor(b),n.showCursor(b),n._onKeyup&&n._onKeyup(n,b)}}(this)}),L.Events.listen({type:"focus",node:this.__input,call:function(n){return function(b){var A;n.hasShadowFocus()||(n.enterInput(),n.addClass("cui-has-focus"),n.__initShadowInput(),"function"==typeof n._onFocus&&n._onFocus(n,b),null!=(A=n.__invalidTooltip)&&A.show(),n.__setCursor(b))}}(this)}),A=null,L.Events.listen({type:"mousedown",node:this.__input,call:function(n){return function(b){var R,D;return A=[n.__input.offsetWidth,n.__input.offsetHeight],D=function(){if(A[0]!==n.__input.offsetWidth||A[1]!==n.__input.offsetHeight)return L.Events.trigger({type:"content-resize",node:n.__input})},R=L.Events.listen({type:"mousemove",call:function(){D()}}),L.Events.listen({type:"mouseup",only_once:!0,capture:!0,call:function(n){L.Events.ignore(R)}})}}(this)}),L.Events.listen({type:"mouseup",node:this.__input,call:function(n){return function(b){n.__setCursor(b)}}(this)}),L.Events.listen({type:"blur",node:this.__input,call:function(n){return function(b){n.hasShadowFocus()||(n.removeClass("cui-has-focus"),n.leaveInput(),n.__removeShadowInput(),"function"==typeof n._onBlur&&n._onBlur(n,b))}}(this)}),L.Events.listen({type:"input",node:this.__input,call:function(n){return function(b,A){b.isDefaultPrevented()||(n.checkInput(),n.moveCursor(b),n.showCursor(b),n.getValueForStore(n.__input.value)!==n.getValue()&&n.storeValue(n.__input.value))}}(this)}),L.Events.listen({type:"paste",node:this.__input,call:function(n){return function(b){return n.__focusShadowInput()}}(this)}),L.Events.listen({type:"click",node:this.__input,call:function(n){return function(b){b.stopPropagation(),"function"==typeof n._onClick&&n._onClick(n,b)}}(this)}),this._content_size&&L.dom.waitForDOMInsert({node:this.__input}).done(function(n){return function(){if(!n.isDestroyed())return n.setContentSize()}}(this)),this.__input},Input.prototype.__setCursor=function(n){return L.setTimeout((b=this,function(){var A,L,R,D,B;if(b.initCursor(n),null===b.cursor&&(B=b.__input.selectionStart)===b.__input.selectionEnd&&b.__input.selectionEnd!==b.__input.value.length&&(L=b.getInputBlocks()).length>0)for(R=0,D=L.length;R0?n.substr(B-1,1):null,R=B>1?n.substr(B-2,1):null,"-"!==A||(null!=R?R.match(/[0-9]/):void 0)||(E="-"+E,B-=1),b.push(new L.NumberInputBlock({start:B,string:E}));return b},Input.prototype.__overwriteBlocks=function(n){var b,A,R,D;for(b=[],A=R=0,D=n.length;0<=D?RD;A=0<=D?++R:--R)b.push(new L.InputBlock({start:A,string:n.substr(A,1)}));return b.push(new L.InputBlock({start:n.length,string:""})),b},Input.prototype.getMarkedBlock=function(){var n,b,A,L,R,D,B;if(!1===(b=this.getInputBlocks())||0===b.length)return null;for(B=this.__input.selectionStart,A=this.__input.selectionEnd,L=R=0,D=b.length;R1&&(L=-1===R?D.length-1:0),b=D[L]){for(nt=[rt[0]],E=ot=0,tt=D.length;otthis._rows||this.preventInvalidInput()&&b.length>0&&!1===this.checkInput(this.correctValueForInput(b))||(this._readonly||(this.__input.value=this.correctValueForInput(b),this.__input.setSelectionRange(this.__shadow.selectionStart,this.__shadow.selectionEnd)),this.initCursor(n))},Input.prototype.checkValue=function(n){if(!L.util.isString(n))throw new Error(this.__cls+".checkValue(value): Value needs to be String or null.");return this},Input.prototype.render=function(){var n,b,A,R,D;for(Input.__super__.render.call(this),this.replace(this.__createElement(),this.getTemplateKeyForRender()),this._controlElement&&(n=L.util.isFunction(this._controlElement)?this._controlElement(this):this._controlElement,L.dom.addClass(n,"cui-input-control-element"),this.append(n,this.getTemplateKeyForRender())),this._leftControlElement&&(L.dom.addClass(this._leftControlElement,"cui-input-control-element"),this.prepend(this._leftControlElement,this.getTemplateKeyForRender())),b=0,R=(D=["empty","invalid","valid"]).length;b0},Input.prototype.checkInput=function(n){var b;return b=this.__checkInputInternal(n),this.hasShadowFocus()||this.updateInputState(b),b},Input.prototype.__checkInputInternal=function(n){return null==n&&(n=this.__input.value),!this.__checkInput||this.__checkInput(n)},Input.prototype.setInputHint=function(n){var b;return null!=(b=this.__inputHints.input)?b.setText(n):void 0},Input.prototype.setInvalidHint=function(n){var b;return null!=(b=this.__inputHints.invalid)?b.setText(n):void 0},Input.prototype.setValidHint=function(n){var b;return null!=(b=this.__inputHints.valid)?b.setText(n):void 0},Input.prototype.displayValue=function(){var n;return Input.__super__.displayValue.call(this),(n=this.getValueForDisplay()||"")!==this.__input.value&&(this.__input.value=n),this.checkInput(),this},Input.prototype.getValueForDisplay=function(){return this._getValueForDisplay?this._getValueForDisplay(this,this.getValue()):this.getValue()},Input.prototype.getValueForInput=function(){return this._getValueForInput?this._getValueForInput(this,this.getValue()):this.getValue()},Input.prototype.correctValueForInput=function(n){return this._correctValueForInput?this._correctValueForInput(this,n):n},Input.prototype.getDefaultValue=function(){return""},Input.prototype.getValue=function(){var n;return this.hasData()?Input.__super__.getValue.call(this):null!=(n=this.__input)?n.value:void 0},Input.prototype.enable=function(){var n;return Input.__super__.enable.call(this),null!=(n=this.__input)?n.removeAttribute("disabled"):void 0},Input.prototype.disable=function(){var n;return Input.__super__.disable.call(this),null!=(n=this.__input)?n.setAttribute("disabled",!0):void 0},Input.prototype.focus=function(){var n;return null!=(n=this.__input)&&n.focus(),this},Input.prototype.getCursorBlocks=function(){var n;return n="function"==typeof this.__getCursorBlocks?this.__getCursorBlocks(this.__input.value):void 0,this.checkBlocks(n)},Input.prototype.findBlock=function(n,b,A){var L,R,D,B;for(R=0,D=n.length;R=L.start&&b<=L.end)return L;if("left"===A&&b>=L.start&&bL.start&&b<=L.end)return L;if("touch"===A&&b>=L.start&&b<=L.end)return L}return null},Input.prototype.initCursor=function(n){var b,A,R,D,B,E,X,$,V,K,Q,tt,ot,nt,it,rt,st;if(!1!==(R=this.getCursorBlocks())){if(0===R.length)return console.warn("initCursor: 0 cursor blocks"),void(this.cursor=null);if(st=this.__input.selectionStart,E=this.__input.selectionEnd,K=this.__input.value.length,this.cursor={shift:null!=(tt=this.cursor)?tt.shift:void 0,start:null,end:null},"keyup"===n.getType()&&16===n.keyCode()&&(this.cursor.shift=null),"keydown"!==n.getType()||46!==(ot=n.keyCode())&&8!==ot||(this.cursor.shift=null),L.util.isUndef(this.cursor.shift)&&(this.cursor.shift=null),this.cursor.start=this.findBlock(R,st,"left"),this.cursor.end=this.findBlock(R,E,"right"),(null!=(nt=this.cursor.end)?nt.idx:void 0)<(null!=(it=this.cursor.start)?it.idx:void 0)&&(this.cursor.end=this.cursor.start),st===E&&!this.cursor.start&&!this.cursor.end){for(D=null,B=null,X=$=st;$>=0;X=$+=-1)if(b=this.findBlock(R,X,"left")){D=st-X;break}for(X=V=st,rt=K;VB?A:b)}Q=this.getRangeFromCursor(),this.cursor.start||this.cursor.end?this.cursor.start?this.cursor.end||(this.cursor.end=this.cursor.start):this.cursor.start=this.cursor.end:this.cursor.start=this.cursor.end=R[R.length-1],Q[0]===st&&Q[1]}else this.cursor=null},Input.prototype.showCursor=function(n){var b;return this.cursor&&(b=this.getRangeFromCursor(),this.__input.setSelectionRange(b[0],b[1])),this},Input.prototype.checkSelectionChange=function(){var n;return n=this.getSelection(),!this.__currentSelection||this.__currentSelection.start===n.start&&this.__currentSelection.end===n.end||this.handleSelectionChange(),this.__currentSelection=n,this},Input.prototype.getRangeFromCursor=function(){var n,b;return[null!=(n=this.cursor.start)?n.start:void 0,null!=(b=this.cursor.end)?b.end:void 0]},Input.prototype.moveCursor=function(n){var b,A,L,R,D,B,E,X;if(this.cursor)if(n.preventDefault(),!1!==(b=this.getCursorBlocks())&&0!==b.length){if(36===n.keyCode())return this.cursor.start=b[0],void(this.cursor.end=b[0]);if(35===n.keyCode())return this.cursor.start=b[b.length-1],void(this.cursor.end=b[b.length-1]);if(46!==(null!=(D=this.lastKeyDownEvent)?D.keyCode():void 0))if(8!==(null!=(B=this.lastKeyDownEvent)?B.keyCode():void 0)){if(R=37===n.keyCode(),E=39===n.keyCode()||"input"===n.getType(),X=this.cursor.start.idx,L=this.cursor.end.idx,!b[X]||!b[L])return console.warn("repositioning cursor, not executing cursor move"),void this.initCursor(n);if(46!==n.keyCode())return n.shiftKey()&&null===this.cursor.shift&&(this.cursor.shift=this.cursor.end.idx),null===this.cursor.shift?X===L?(R?X>0&&(this.cursor.start=b[X-1]):E&&X=L?X>0&&(this.cursor.start=b[X-1]):this.cursor.end=b[L-1]:E&&(A>X?this.cursor.start=b[X+1]:L{var L=A(7288),R={}.hasOwnProperty;L.InputBlock=function(n){function InputBlock(n){InputBlock.__super__.constructor.call(this,n),this.__start=this._start,this.setString(this._string)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(InputBlock,n),InputBlock.prototype.initOpts=function(){return InputBlock.__super__.initOpts.call(this),this.addOpts({start:{mandatory:!0,check:function(n){return L.util.isInteger(n)&&n>=0}},string:{mandatory:!0,check:function(n){return L.util.isString(n)}}})},InputBlock.prototype.setString=function(n){return L.util.assert(L.util.isString(n),L.util.getObjectClass(this)+".setString","Parameter needs to be String with a minimum length of 1.",{string:n}),this.__string=n,this.calcSizes(),this},InputBlock.prototype.getString=function(){return this._string},InputBlock.prototype.calcSizes=function(){var n,b,A,L;for(this.__len=this.__string.length,this.__end=this.__start+this.__len,n=0,A=(L=["len","end","start","string"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.NumberInput=function(n){function NumberInput(){return NumberInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NumberInput,n),NumberInput.prototype.initOpts=function(){return NumberInput.__super__.initOpts.call(this),this.addOpts({decimals:{default:0,check:"Integer"},symbol:{check:function(n){return L.util.isString(n)&&n.length>0}},symbol_before:{default:!1,check:Boolean},store_as_integer:{default:!1,check:Boolean},json_number:{default:!1,check:Boolean},decimalpoint:{mandatory:!0,default:".",check:function(n){return L.util.isString(n)&&n.length>0}},separator:{check:function(n){return L.util.isString(n)&&n.length>0}},min:{default:null,check:function(n){return L.util.isNumber(n)}},max:{default:null,check:function(n){return L.util.isNumber(n)}}}),this.removeOpt("checkInput"),this.removeOpt("getValueForDisplay"),this.removeOpt("getValueForInput"),this.removeOpt("correctValueForInput"),this.removeOpt("prevent_invalid_input")},NumberInput.prototype.readOpts=function(){return NumberInput.__super__.readOpts.call(this),this._json_number&&(this._decimals=13),this._prevent_invalid_input=!0,this._checkInput=this.__checkInput,this.setMin(this._min),this.setMax(this._max)},NumberInput.prototype.setMin=function(n){this.__min=n},NumberInput.prototype.setMax=function(n){this.__max=n},NumberInput.prototype.formatValueForDisplay=function(n,b){var A,R,D,B;if(null==n&&(n=this.getValue()),null==b&&(b=!1),L.util.assert("number"==typeof n||null===n,"NumberInput.formatValueForDisplay","value needs to be Number or null",{value:n,type:typeof n}),L.util.isEmpty(n))return"";if((D=(this._store_as_integer?(n/Math.pow(10,this._decimals)).toFixed(this._decimals):n+"").split(".")).length>1?(R=D[0],A=D[1]):(R=D[0],A=""),this._decimals>0&&!this._json_number)for(;A.length0&&A.length>0?R+this._decimalpoint+A:R:(B=this._decimals>0&&A.length>0?this.__addSeparator(R)+this._decimalpoint+A:this.__addSeparator(R),this.__addSymbol(B))},NumberInput.prototype.getValue=function(){var n;return n=NumberInput.__super__.getValue.call(this),this.hasData()?n:this.getValueForStore(n)},NumberInput.prototype.getValueForDisplay=function(){return this.formatValueForDisplay(this.getValue())},NumberInput.prototype.getValueForStore=function(n){var b;return L.util.isString(n)||(n+=""),b=parseFloat(n.replace(/,/,".")),this._json_number&&Infinity===b&&(b=Number.MAX_VALUE),this._json_number&&-Infinity===b&&(b=-Number.MAX_VALUE),isNaN(b)?null:this._store_as_integer?parseInt((b*Math.pow(10,this._decimals)).toFixed(0)):b},NumberInput.prototype.getDefaultValue=function(){return null},NumberInput.prototype.setValue=function(n,b){return null==b&&(b={}),this.checkValue(n),NumberInput.__super__.setValue.call(this,n,b)},NumberInput.prototype.checkValue=function(n){if(null===n)return!0;if((this._decimals>0||this._json_number)&&L.util.isFloat(n))return!0;if(L.util.isInteger(n))return!0;throw new Error(this.__cls+".setValue(value): Value needs to be Number or null.")},NumberInput.prototype.__addSymbol=function(n){return L.util.isEmpty(this._symbol)?n:this._symbol_before?this._symbol+" "+n:n+" "+this._symbol},NumberInput.prototype.__addSeparator=function(n){var b,A,R,D,B,E,X;if(L.util.isEmpty(this._separator))return n;for((R=n.startsWith("-"))&&(n=n.substr(1)),E=[],A=b=0,D=(X=n.split("").reverse()).length;b0&&E.push(this._separator),E.push(B);return R&&E.push("-"),E.reverse(),E.join("")},NumberInput.prototype.correctValueForInput=function(n){return n.replace(/[,\.]/g,this._decimalpoint)},NumberInput.prototype.getValueForInput=function(){return this.formatValueForDisplay(null,!0)},NumberInput.prototype.checkInput=function(n){return null===n||NumberInput.__super__.checkInput.call(this,n)},NumberInput.prototype.__checkInput=function(n){var b,A,R,D,B;if(""===(B=(B=this.hasShadowFocus()?n:n.replace(this._symbol,"")).trim()))return!0;if(this._separator&&(D=new RegExp(RegExp.escape(this._separator),"g"),B=B.replace(D,"")),-1===(A=B.lastIndexOf(this._decimalpoint)))b=B,R="";else{if(0===this._decimals)return!1;b=B.substring(0,A),R=B.substring(A+1)}if(R.length>this._decimals&&!this._json_number)return!1;if(b.length>0&&!b.match(/^((0|[1-9]+[0-9]*)|(-|-[1-9]|-[1-9][0-9]*))$/)&&!this._json_number)return!1;if(!L.util.isNull(this.__min)){if(this.__min>=0&&"-"===b)return!1;if(bthis.__max)&&(!(!R.match(/^([0-9]*)$/)&&!this._json_number)&&(!(R.length>this._decimals&&!this._json_number)&&(!this._json_number||!(B=B.replace(",",".")).match(/([eE][+\-]?|\.)$/)&&/^-?(0|[1-9]\d*)(\.\d+)?([eE][-+]?\d+)?$/.test(B))))},NumberInput.prototype.preventInvalidInput=function(){var n,b,A,L,R,D,B;if(this._json_number){if("-"===(B=null!=(n=this.__shadow)&&null!=(b=n.value)&&null!=(A=b.trim())?A.replace(/,/g,"."):void 0))return!1;if((null!=B&&null!=(L=B.split("."))?L.length:void 0)>2)return!0;if("."===B||"e"===(null!=B?B.toLowerCase():void 0))return!0;if(null!=B?B.match(/([eE][+\-]?|\.)$/):void 0)return!!/\.e|\.E/.test(B)||(null!=B&&null!=(R=B.match(/[eE]/gi))?R.length:void 0)>1}return!(this.__min&&this.__min>9&&(null!=(D=this.__shadow)?D.value:void 0)0&&A>0&&(B=R>A?/,/g:/\./g),!B&&b>0&&(","===(L=n[n.length-1-b])?B=/\./g:"."===L&&(B=/,/g)),B||0!==b||(null!=(D=n.match(/^\d{1,3}([\.,]\d{3})+/))?D[0]:void 0)===n&&(B=R>0?/\./g:/,/g),B&&(n=n.replace(B,"")),0===b?parseInt(n):(n=n.replace(/,/,"."),parseFloat(n))))},NumberInput}(L.Input)},8644:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.NumberInputBlock=function(n){function NumberInputBlock(){return NumberInputBlock.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(NumberInputBlock,n),NumberInputBlock.prototype.incrementBlock=function(n,b){return this.__changeBlock(n,b,1)},NumberInputBlock.prototype.decrementBlock=function(n,b){return this.__changeBlock(n,b,-1)},NumberInputBlock.prototype.__changeBlock=function(n,b,A){var L;return L=(""+(parseInt(this.__string)+A)).split(""),n.setString(L.join(""))},NumberInputBlock}(L.InputBlock)},4744:function(n,b,A){var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1864)),L.ItemList=function(n){function ItemList(){return ItemList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ItemList,n),ItemList.prototype.init=function(){if(ItemList.__super__.init.call(this),this.addClass("cui-item-list"),this.__body=new L.Template({name:"item-list-body"}),this.append(this.__body,"center"),this._keyboardControl)return this.__initListeners()},ItemList.prototype.initOpts=function(){return ItemList.__super__.initOpts.call(this),this.addOpts({items:{mandatory:!0,check:function(n){return L.util.isFunction(n)||L.util.isArray(n)}},active_item_idx:{check:"Integer"},has_items:{default:!1,check:Boolean},allow_null:{check:Boolean},onClick:{check:Function},onActivate:{check:Function},onDeactivate:{check:Function},orientation:{default:"vertical",check:["horizontal","vertical"]},keyboardControl:{check:Boolean,default:!1}}),this},ItemList.prototype.readOpts=function(){return ItemList.__super__.readOpts.call(this),"horizontal"===this._orientation&&console.error("new CUI.ItemList, orientation == horizontal needs implementation!"),this},ItemList.prototype.setActiveIdx=function(n){this.__active_idx=n},ItemList.prototype.getActiveIdx=function(){return this.__active_idx},ItemList.prototype.getBody=function(){return this.__body},ItemList.prototype.getItemByValue=function(n){var b,A,R,D,B;for(R=0,D=(B=this.__body.DOM.children).length;R0)},ItemList.prototype.__getItems=function(n){return L.util.isFunction(this._items)?this._items(n,this)||[]:this._items},ItemList.prototype.getItems=function(n){var b;return b=this.__getItems(n),L.util.isPromise(b)?b:(new L.Deferred).resolve(b)},ItemList.prototype.__initActiveIdx=function(){var n,b,A,R,D,B;if(void 0===(n=this._active_item_idx))if(D=this.__getItems(),L.util.isPromise(D))n=-1;else{for(A=b=0,B=D.length;b{var L=A(7288),R={}.hasOwnProperty;L.EmptyLabel=function(n){function EmptyLabel(n){EmptyLabel.__super__.constructor.call(this,n),this.addClass("cui-empty-label")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(EmptyLabel,n),EmptyLabel.prototype.readOpts=function(){return EmptyLabel.__super__.readOpts.call(this)},EmptyLabel}(L.MultilineLabel)},4276:(n,b,A)=>{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.Template.loadTemplateText(A(3372)),R.Label=function(n){function Label(n){var b,A,L,D,B,E,X,$;if(Label.__super__.constructor.call(this,n),B=this._rotate_90?"label-rotate-90":this._icon||!R.__ng__?"label":"label-no-icon",this.__label=new R.Template({name:B,map_prefix:"cui-label",map:{icon:"label-no-icon"!==B||void 0,content:!0}}),this.registerTemplate(this.__label),this._icon&&!0!==this._icon&&this.setIcon(this._icon),R.util.isEmpty(this._text)?this.setContent(this._content):this.setText(this._text),this._tooltip&&(null==(E=R.util.copyObject(this._tooltip)).element&&(E.element=this.DOM),this.__tooltip=new R.Tooltip(E)),this._multiline&&this.addClass("cui-label-multiline"),this._centered&&this.addClass("cui-label-centered"),this._markdown&&this.addClass("cui-label-markdown"),this._manage_overflow&&this.addClass("cui-label-manage-overflow"),this._padded&&this.addClass("cui-label--padded"),this._size?this.addClass("cui-label-size-"+this._size):R.__ng__||this.addClass("cui-label-size-normal"),this._appearance&&this.addClass("cui-label-appearance-"+this._appearance),this._manage_overflow){for(L in b=!0===this._manage_overflow?R.util.copyObject(R.defaults.class.Label.defaults.manage_overflow,!0):this._manage_overflow,D={class:"cui-label-manage-overflow-button",appearance:"flat",switch:!0,hidden:!0,onActivate:($=this,function(){return $.__label.addClass("cui-label--show-overflow")}),onDeactivate:function(n){return function(){return n.__label.removeClass("cui-label--show-overflow")}}(this)})X=D[L],b.hasOwnProperty(L)&&"class"===L?b[L]+=" "+X:b[L]=X;this.__overflow_button=new R.defaults.class.Button(b),this.append(this.__overflow_button),A=function(n){return function(){return n.checkOverflowSize()}}(this),R.Events.listen({node:this.DOM,type:"viewport-resize",call:function(){return R.scheduleCallback({ms:500,call:A})}})}}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Label,n),Label.defaults={manage_overflow:{icon_inactive:"down",icon_active:"up",active_css_class:""}},Label.prototype.initOpts=function(){return Label.__super__.initOpts.call(this),this.addOpts({text:{check:function(n){return R.util.isString(n)||R.util.isNumber(n)}},text_node_func:{check:Function},content:{check:function(n){return R.util.isContent(n)||R.util.isString(n)}},icon:{check:function(n){return n instanceof R.Icon||R.util.isString(n)||!0===n}},size:{check:["mini","normal","big","bigger"]},appearance:{check:["title","secondary","muted","transparent-border"]},markdown:{mandatory:!0,default:!1,check:Boolean},markdown_opts:{check:"PlainObject"},tooltip:{check:"PlainObject"},group:{check:String},rotate_90:{default:!1,check:Boolean},centered:{default:!1,check:Boolean},multiline:{default:!1,check:Boolean},padded:{default:!1,check:Boolean},manage_overflow:{check:function(n){return R.util.isPlainObject(n)||!0===n||!1===n}}})},Label.prototype.readOpts=function(){var n,b,A;if(Label.__super__.readOpts.call(this),R.util.isNull(this._text)&&R.util.isNull(this._content)&&(this._text=""),this._markdown&&(R.util.assert(!this._content,"new "+this.__cls,"opts.markdown cannot be combined with opts.content, use opts.text instead.",{opts:this.opts}),L?this.__markdown=!0:(console.error("new CUI.Label: Could not find markdown renderer 'marked'. Disabling markedown option.",{opts:this.opts}),this.__markdown=!1)),this.__currentText=null,R.util.assert(R.util.xor(R.util.isNull(this._text),R.util.isNull(this._content)),"new CUI.Label","opts.text and opts.content cannot both be set.",{opts:this.opts}),this._markdown_opts)for(n in this.__markdown_opts=R.util.copyObject(R.defaults.marked_opts,!1),b=this._markdown_opts)A=b[n],this.__markdown_opts[n]=A;else this.__markdown_opts=R.defaults.marked_opts;return this._manage_overflow&&R.util.assert(this._multiline,"new CUI.Label","opts.multiline needs to be set for opts.manage_overflow",{opts:this.opts}),this},Label.prototype.setText=function(n,b){return this.__currentText=n,null==b&&(b=this.__markdown),R.util.isEmpty(this.__currentText)?this.empty("content"):b?(this.setContent(R.dom.htmlToNodes(L(this.__currentText,this.__markdown_opts))),this.addClass("cui-label-markdown")):this._text_node_func?(this.setContent(this._text_node_func(this.__currentText)),this.removeClass("cui-label-markdown")):(this.setContent(R.dom.text(this.__currentText)),this.removeClass("cui-label-markdown")),this},Label.prototype.setTextMaxChars=function(n){return R.dom.setAttribute(this.__label.map.content,"data-max-chars",n)},Label.prototype.getText=function(){return this.__currentText},Label.prototype.setContent=function(n){var b,A,L;(R.util.isString(n)?this.replace(R.dom.htmlToNodes(n),"content"):this.replace(n,"content"),"status"===(null!=(b=this._attr)?b.role:void 0)&&(A=R.dom.findElement(this.DOM,"span"))&&(R.dom.removeAttribute(this.DOM,"role"),R.dom.setAttribute(A,"role","status")),this._manage_overflow)&&(this.append(this.__overflow_button),R.dom.waitForDOMInsert({node:this.DOM}).done((L=this,function(){return L.checkOverflowSize()})))},Label.prototype.checkOverflowSize=function(){var n,b;if(this.__overflow_button)return this.__label.removeClass("cui-label--show-overflow"),this.__label.addClass("cui-label--measure-overflow"),this.__overflow_button.hide(),n=R.dom.getDimensions(this.__label.map.content),(b=R.dom.getCSSFloatValue(n.computedStyle.maxHeight))>0||(b=n.clientHeight),n.scrollHeight>b?(this.__overflow_button.show(),this.__label.addClass("cui-label--has-overflow-button"),this.__overflow_button.isActive()&&this.__label.addClass("cui-label--show-overflow")):(this.__label.addClass("cui-label--show-overflow"),this.__label.removeClass("cui-label--has-overflow-button")),this.__label.removeClass("cui-label--measure-overflow"),this},Label.prototype.getGroup=function(){return this._group},Label.prototype.setIcon=function(n){var b;return b=n instanceof R.Icon?n:R.util.isEmpty(n)?null:new R.Icon({icon:n}),this.replace(b,"icon"),this},Label.prototype.destroy=function(){var n;return null!=(n=this.__tooltip)&&n.destroy(),Label.__super__.destroy.call(this)},Label.parseLinks=function(n){var b,A,L,D,B,E,X,$,V,K,Q;for($=[],Q=[],A=function(){0!==Q.length&&($.push(R.dom.text(Q.join(""))),Q=[])},K=n.split(/(\n| )/).flatMap((function(n){return n.split(/(\[|\]|\(|\))/)})),B=D=0,E=K.length;DL&&(V=n.substring(L,B),$.push(R.dom.text(V))),null!=(X=A(E,B,n))?$.push(X):$.push(R.dom.text(E)),L=b.lastIndex;return L{var L=A(7288),R={}.hasOwnProperty;L.MultilineLabel=function(n){function MultilineLabel(n){MultilineLabel.__super__.constructor.call(this,n),this.addClass("cui-label")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultilineLabel,n),MultilineLabel.prototype.initOpts=function(){return MultilineLabel.__super__.initOpts.call(this),this.mergeOpt("multiline",{default:!0})},MultilineLabel}(L.Label)},7224:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0&&void 0===this._colResize)&&(this.__colResize=!0),this.__colResize&&L.util.assert(this.fixedRowsCount>0,"new CUI.ListView","Cannot enable col resize with no fixed rows.",{opts:this.opts}),this.__maxCols=[],b=A=0,B=(E=this.__cols).length;A=this.fixedColsCount,"new CUI.ListView","maximized columns can only be in the non-fixed side of the ListView.",{opts:this.opts}),this.__maxCols.push(b));for(this.__maximize_horizontal&&0===this.__maxCols.length&&(D=this.__cols.length-1)>=this.fixedColsCount&&(this.__maxCols.push(D),this.__cols[D]="maximize"),this.rowsCount=0,this.colsCount=this.__cols.length,this.listViewCounter=L.ListView.counter++,this.__manualColWidths=[],this.__colspanRows={},this.colsOrder=[],b=R=0,X=this.colsCount;0<=X?RX;b=0<=X?++R:--R)this.colsOrder.push(b);return this.rowsOrder=[],this.__maxRowIdx=-1,this.__resetCellDims(),this.__cells=[],this.__rows=[],this.__lvClass="cui-lv-"+this.listViewCounter,this.__deferredRows=[],this.__isInDOM=!1,this.__doLayoutBound=($=this,function(){return $.__doLayout()}),this._useCSSGridLayout&&(this.__useCSSGridLayout=!0,this.addClass("use-css-grid-layout"),L.dom.setStyle(this,{"--grid-column-count":this.__cols.length},"")),this.addClass("cui-list-view")},ListView.prototype.initOpts=function(){return ListView.__super__.initOpts.call(this),this.addOpts({colClasses:{check:"Array"},cols:{mandatory:!0,check:"Array"},fixedCols:{default:0,check:"Integer"},fixedRows:{default:0,check:"Integer"},rowMove:{default:!1,check:Boolean},rowMoveFixedRows:{default:0,check:"Integer"},rowMovePlaceholder:{default:!1,check:Boolean},colResize:{check:Boolean},useCSSGridLayout:{check:Boolean},selectableRows:{check:function(n){return!1===n||!0===n||"multiple"===n}},focusable:{check:Boolean,default:!1},onRowMove:{check:Function},onScroll:{check:Function},onColumnResize:{check:Function},header:{deprecated:!0},footer:{deprecated:!0},onSelect:{check:Function},onDeselect:{check:Function},ignoreKeyEvents:{check:Boolean,default:!1}})},ListView.prototype.readOpts=function(){return this.opts.header&&(this.opts.header_center=this.opts.header),this.opts.footer&&(this.opts.footer_left=this.opts.footer),ListView.__super__.readOpts.call(this),this.__selectableRows=this._selectableRows,this},ListView.prototype.destroy=function(){var n;return delete this.colsOrder,delete this.rowsOrder,delete this.__fillRowQ3,this.__isInDOM=null,L.scheduleCallbackCancel({call:this.__doLayoutBound}),null!=(n=this.listViewTemplate)&&n.destroy(),this.__layoutIsStopped=!1,ListView.__super__.destroy.call(this),this},ListView.prototype.getListViewClass=function(){return this.__lvClass},ListView.prototype.isKeyEventsEnabled=function(){return!this._ignoreKeyEvents},ListView.prototype.getGrid=function(){return this.grid},ListView.prototype.hasResizableColumns=function(){return this.__colResize},ListView.prototype.hasCSSGridLayout=function(){return this.__useCSSGridLayout},ListView.prototype.hasMovableRows=function(){return this._rowMove},ListView.prototype.isInactive=function(){return!!this.__inactive},ListView.prototype.setInactive=function(n,b){var A;return null==b&&(b="inactive"),this.__inactive=!!n,this.grid&&(this.__inactive?(L.dom.addClass(this.grid,b),this.__inactiveWaitBlock=new L.WaitBlock({element:this.grid,inactive:!0}).show()):(null!=(A=this.__inactiveWaitBlock)&&A.destroy(),this.__inactiveWaitBlock=null,L.dom.removeClass(this.grid,b))),this},ListView.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V,K;for(L.util.assert(!this.grid,"ListView.render","ListView already rendered",{opts:this.opts}),R=[],b=["cui-list-view-grid",this.__lvClass],1===this._fixedCols&&(this._rowMove||this._rowMovePlaceholder)&&b.push("cui-list-view-grid-fixed-col-has-only-row-move-handle"),this._rowMovePlaceholder&&b.push("cui-list-view-has-row-move-placeholder"),this._rowMove&&b.push("cui-list-view-has-row-move"),this.__maxCols.length>0&&b.push("cui-list-view-grid-has-maximized-columns"),this.fixedColsCount>0&&b.push("cui-list-view-grid-has-fixed-cols"),this.fixedRowsCount>0&&b.push("cui-list-view-grid-has-fixed-rows"),R.push('
'),R.push(""),K=this,n=function(n){var A,L,D,B;if(K.__isFocusable(),R.push('
'),2===n||3===n){for(R.push('
'),A=D=(L=K.__getColsFromAndTo(n)).from,B=L.to;D<=B;A=D+=1)b=K.__getColClass(A),R.push('
');R.push("
")}R.push("
")},this.fixedColsCount>0&&this.fixedRowsCount>0?(R.push('
'),n(0),n(1),R.push("
"),R.push('
'),n(2),n(3),R.push("
")):this.fixedColsCount>0?(R.push('
'),n(2),n(3),R.push("
")):this.fixedRowsCount>0?(R.push('
'),n(1),R.push("
"),R.push('
'),n(3),R.push("
")):n(3),R.push("
"),(E=this.center()).innerHTML=R.join(""),this.grid=E.firstChild,this.quadrant=[L.dom.matchSelector(E,".cui-list-view-grid-quadrant-0")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-1")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-2")[0],L.dom.matchSelector(E,".cui-list-view-grid-quadrant-3")[0]],this.styleElement=L.dom.matchSelector(E,"style")[0],this.__fillRowQ3=L.dom.matchSelector(this.grid,".cui-list-view-grid-fills-3")[0],this.__topQuadrants=L.dom.matchSelector(E,".cui-list-view-grid-inner-top")[0],0===this.fixedColsCount&&0===this.fixedRowsCount?this.__bottomQuadrants=this.quadrant[3]:this.__bottomQuadrants=L.dom.matchSelector(E,".cui-list-view-grid-inner-bottom")[0],this.__fillCells=[],A=D=0,X=this.colsCount-1;D<=X;A=D+=1)this.__fillCells.push(L.dom.matchSelector(E,".cui-list-view-grid-fill-col-"+A)[0]);return B=function(n){return function(){return n.__syncScrolling(),"function"==typeof n._onScroll&&n._onScroll(),n.quadrant[3].scrollTop>0?L.dom.addClass(n.grid,"is-scrolling-vertically"):L.dom.removeClass(n.grid,"is-scrolling-vertically"),n.quadrant[3].scrollLeft>0?L.dom.addClass(n.grid,"is-scrolling-horizontally"):L.dom.removeClass(n.grid,"is-scrolling-horizontally")}}(this),this.__useCSSGridLayout?L.Events.listen({node:this.grid,type:"scroll",call:function(n){return function(b){return n.grid.scrollTop>0?L.dom.addClass(n.grid,"is-scrolling-vertically"):L.dom.removeClass(n.grid,"is-scrolling-vertically"),n.grid.scrollLeft>0?L.dom.addClass(n.grid,"is-scrolling-horizontally"):L.dom.removeClass(n.grid,"is-scrolling-horizontally")}}(this)}):L.Events.listen({node:this.quadrant[3],type:"scroll",call:B}),this.__currentScroll={top:0,left:0},this.hasSelectableRows()&&($="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer",L.Events.listen({type:["click"],node:this.DOM,selector:$,call:function(n){return function(b){var A;(A=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(b.stopImmediatePropagation(),n.selectRow(b,A))}}(this)})),this.__isFocusable()&&(V="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer:focus",L.Events.listen({type:["keydown"],node:this.DOM,selector:V,call:function(n){return function(b){var A,R;"Return"!==(A=b.getKeyboard())&&"Space"!==A||(R=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(b.stopImmediatePropagation(),n.selectRow(b,R))}}(this)})),this.quadrant[2]&&L.Events.listen({type:"wheel",node:this.quadrant[2],call:function(n){return function(b){if(b.wheelDeltaY()>0){if(n.quadrant[3].scrollTop===n.quadrant[3].scrollHeight-n.quadrant[3].offsetHeight)return;n.quadrant[3].scrollTop+=100}else{if(!(b.wheelDeltaY()<0))return;if(0===n.quadrant[3].scrollTop)return;n.quadrant[3].scrollTop-=100}b.preventDefault(),B()}}(this)}),L.Events.listen({type:"viewport-resize",node:this.grid,call:function(n){return function(b,A){n.__hasLayout&&n.__doLayout({resetRows:!(!A.css_load&&!A.tab)})}}(this)}),L.Events.listen({type:"content-resize",node:this.DOM,call:function(n){return function(b,R){var D,B;n.__isInDOM&&(D=L.dom.closest(b.getNode(),".cui-lv-td"))&&(b.stopPropagation(),B=parseInt(D.getAttribute("row")),A=parseInt(D.getAttribute("col")),n.fixedColsCount>0&&L.dom.getAttribute(D.parentNode,"cui-lv-tr-unmeasured")||(n.__resetRowDim(B),n.__scheduleLayout()))}}(this)}),this.isInactive()&&this.setInactive(!0),this.appendDeferredRows(),L.dom.waitForDOMInsert({node:this.DOM}).done(function(n){return function(){return n.__isInDOM=!0,n.__doLayout()}}(this)),this.DOM},ListView.prototype.__getScrolling=function(){return{top:this.quadrant[3].scrollTop,left:this.quadrant[3].scrollLeft,height:this.quadrant[3].scrollHeight}},ListView.prototype.getScrollingContainer=function(){return this.quadrant[3]},ListView.prototype.__setScrolling=function(n){return this.quadrant[3].scrollTop=n.top,this.quadrant[3].scrollLeft=n.left},ListView.prototype.__syncScrolling=function(){return this.__currentScroll=this.__getScrolling(),this.fixedColsCount>0&&(this.quadrant[2].scrollTop=this.__currentScroll.top),this.fixedRowsCount>0&&(this.quadrant[1].scrollLeft=this.__currentScroll.left),this.__fillRowQ3&&(this.__fillRowQ3.style.width="",this.__fillRowQ3.style.width=this.__getValue(this.__fillRowQ3.scrollWidth)),this},ListView.prototype.__setMargins=function(){var n,b,A,L;return L=this.quadrant[3].offsetWidth-this.quadrant[3].clientWidth,n=this.quadrant[3].offsetHeight-this.quadrant[3].clientHeight,null!=(b=this.quadrant[1])&&(b.style.marginRight=this.__getValue(L)),null!=(A=this.quadrant[2])&&(A.style.marginBottom=this.__getValue(n)),this},ListView.prototype.getSelectedRows=function(){var n,b,A,L,R,D;for(D=[],n=0,b=(L=this.rowsOrder).length;n0)for(E=this.getSelectedRows().pop().getRowIdx(),B=b.getRowIdx();B!==E;)this.getListViewRow(B).select(n),B>E?B--:B++;else R(!1);else X();return D.promise()},ListView.prototype.getCellByTarget=function(n){var b,A;return(A=L.dom.closest(n,".cui-lv-td"))?((b={col_i:parseInt(A.getAttribute("col")),row_i:parseInt(A.getAttribute("row"))}).display_col_i=this.getDisplayColIdx(b.col_i),b.display_row_i=this.getDisplayRowIdx(b.row_i),b):null},ListView.prototype.getRowMoveTool=function(n){return null==n&&(n={}),new L.ListViewRowMove(n)},ListView.prototype.getListViewRow=function(n){return L.dom.data(this.getRow(n)[0],"listViewRow")},ListView.prototype.getDisplayColIdx=function(n){return this.colsOrder.indexOf(parseInt(n))},ListView.prototype.getDisplayRowIdx=function(n){return this.rowsOrder.indexOf(parseInt(n))},ListView.prototype.getColIdx=function(n){return L.util.assert(L.util.isArray(this.colsOrder),"ListView["+this.listViewCounter+"].getColIdx","colsOrder Array is missing",{this:this,display_col_i:n}),this.colsOrder[n]},ListView.prototype.getRowIdx=function(n){return this.rowsOrder[n]},ListView.prototype.moveInOrderArray=function(n,b,A,R){var D,B;return D=A.indexOf(n),B=A.indexOf(b),L.util.moveInArray(D,B,A,R),null},ListView.prototype.moveRow=function(n,b,A,R){var D,B,E,X,$,V,K,Q;for(null==A&&(A=!1),null==R&&(R=!0),L.util.assert(n>=this.fixedRowsCount&&b>=this.fixedRowsCount,"ListView.moveRow","from_i and to_i must not be in flexible area of the list view",{from_i:n,to_i:b,fixed_i:this.fixedRowsCount}),E=A?L.dom.insertAfter:L.dom.insertBefore,X=$=0,V=(K=this.getRow(n)).length;$-1,"ListView.insertRowAfter","ListView #"+this.listViewCounter+": Row "+n+" not found.",{row_i:n,row:b,rowsCount:this.rowsCount}),A=++this.__maxRowIdx,this.rowsCount++,this.rowsOrder.splice(R+1,0,A),this.__addRow(A,b,"after",n)},ListView.prototype.insertRowBefore=function(n,b){var A,R,D;return L.util.assert(!this.isDestroyed(),"ListView.insertRowBefore","ListView #"+this.listViewCounter+" is already destroyed."),0===(D=this.getDisplayRowIdx(n))?this.prependRow(b):(A=this.getRowIdx(D-1),R=++this.__maxRowIdx,this.rowsCount++,this.rowsOrder.splice(D,0,R),this.__addRow(R,b,"after",A))},ListView.prototype.removeAllRows=function(){var n,b,A,L;for(n=0,b=(A=this.rowsOrder.slice(0)).length;n=0,"ListView.removeRow","row_i must be >= 0",{row_i:n}),b=this.getDisplayRowIdx(n),L.util.assert(b>-1,"ListView.removeRow","display_row_id not found for row_i",{row_i:n}),this.rowsOrder.splice(b,1),this.rowsCount--,delete this.__colspanRows[n],A=0,R=(D=this.getRow(n)).length;A0?(K=!0,b(R,Ot),V.style.setProperty("width",Ot+"px"),V.style.setProperty("flex","0 0 auto")):(D.call(this.__maxCols,R)>=0&&(Q=!0),V.style.removeProperty("width"),V.style.removeProperty("flex"));for($=it=0,pt=(yt=this.__fillCells).length;it0)for(zt=0,lt=(Wt=[0,2]).length;zt "+St)).length;ft "+St)).length;mt "+St)).length;_t=1,"ListView.__addRows","anchor row "+xt+" for mode "+A+" not found.",{rows:this.__rows,row_i:xt,mode:D,mode_used:A})}for(qt=(xt=st=n)+b.length-1;st<=qt;xt=st+=1)for(this.__cells[xt]=[],this.__rows[xt]=[],pt=0,ut=(vt=this.__getQuadrants(xt)).length;pt0?'cui-lv-tr-unmeasured="'+this.listViewCounter+'"':"",it[yt].push('
'),Q=lt=nt.from,Wt=nt.to;lt<=Wt;Q=lt+=1)K=this.getColIdx(Q),(wt=this.__getColWidth(xt,K))[0],wt[1],V=this.__getColClass(K),it[yt].push('
');it[yt].push("
")}for(Ct=this,tt=function(n){var b,A,R,D,B,E,X,$,V,K;for($=0,E=(b=L.dom.matchSelector(n,".cui-lv-td")).length;$0&&(ot=this.quadrant[1].childNodes,this.fixedRowsCount0?[0,1]:[1],ft=0,Lt=ot.length-this.fixedRowsCount;ft=this.fixedRowsCount+this._rowMoveFixedRows?n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandle||n.prependColumn(new L.ListViewColumnRowMoveHandle):n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandlePlaceholder||n.prependColumn(new L.ListViewColumnRowMoveHandlePlaceholder):this._rowMovePlaceholder&&(n.getColumns()[0]instanceof L.ListViewColumnRowMoveHandlePlaceholder||n.prependColumn(new L.ListViewColumnRowMoveHandlePlaceholder)),X=0,B=V=0,tt=(A=n.getColumns()).length;V1)for(R.setAttribute("colspan",E),this.__colspanRows[b]||(this.__colspanRows[b]={}),this.__colspanRows[b][B+X]=E,K=1,it=E;1<=it?Kit;1<=it?++K:--K)L.dom.remove(this.__cells[b][B+X+1]),delete this.__cells[b][B+X+1],X++;L.util.assert(A.length+X<=this.colsCount,"ListView.addRow","ListViewRow provided more columns ("+(A.length+X)+") than colsCount ("+this.colsCount+") is set to",{colsCount:this.colsCount,cols:A}),n.addedToListView(this.__rows[b])},ListView.prototype.__getColClass=function(n){var b,A,R;return A=null!=(R=this.__colClasses)?R[n]:void 0,b=[],L.util.isArray(A)?b.push.apply(b,A):L.util.isEmpty(A)||b.push(A),D.call(this.__maxCols,n)>=0&&b.push("cui-lv-td-max"),b.join(" ")},ListView.prototype.__resetRowDim=function(n){var b,A,R,D,B,E,X,$;if(delete this.__cellDims[n],this.fixedColsCount>0&&this.__rows[n])for(R=0,B=(E=this.__rows[n]).length;R=X;A=0<=X?++D:--D)b=this.getColIdx(A),this.__resetCellStyle(n,b);return this},ListView.prototype.__resetCellStyle=function(n,b){var A,R;return(A=null!=(R=this.__cells[n])?R[b]:void 0)&&L.dom.setStyleOne(A,"cssText",""),A},ListView.prototype.__resetColWidth=function(n){var b,A,L,R,D,B,E,X;for(L=0,D=(B=this.__cellDims).length;L=E;A=0<=E?++R:--R)X=this.getRowIdx(A),this.__resetCellStyle(X,n);return this.__fillCells[n].style.cssText="",this},ListView.prototype.__resetCellDims=function(n){return this.__cellDims=[],this.__colWidths=[]},ListView.prototype.__isMaximizedCol=function(n){return D.call(this.__maxCols,n)>=0&&!this.__manualColWidths.hasOwnProperty(n)},ListView.counter=0,ListView.prototype.__getColWidth=function(n,b){var A,L,R,D,B,E,X;if((R=null!=(E=this.__colspanRows[n])?E[b]:void 0)>1){for(L=0,B=!1,A=D=b,X=b+R-1;D<=X;A=D+=1)this.__isMaximizedCol(A)&&(B=!0),L+=this.__colWidths[A];return[L,B]}return[this.__colWidths[b],this.__isMaximizedCol(b)]},ListView}(L.SimplePane)},7474:(n,b,A)=>{var L=A(7288),bind=function(n,b){return function(){return n.apply(b,arguments)}},R={}.hasOwnProperty;L.ListViewColumn=function(n){function ListViewColumn(){return this.getColspan=bind(this.getColspan,this),this.setColspan=bind(this.setColspan,this),ListViewColumn.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumn,n),ListViewColumn.prototype.readOpts=function(){return ListViewColumn.__super__.readOpts.call(this),this.__cl=this._class||"",this.__attrs=this._attrs||null},ListViewColumn.prototype.initOpts=function(){return ListViewColumn.__super__.initOpts.call(this),this.addOpts({class:{default:"",check:String},attrs:{default:null,check:"PlainObject"},text:{check:String},colspan:{check:"Integer"},element:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},onSetElement:{check:Function}})},ListViewColumn.prototype.setRow=function(n){this.listViewRow=n},ListViewColumn.prototype.getRow=function(){return this.listViewRow},ListViewColumn.prototype.setColumnIdx=function(n){return this.col_i=n,this},ListViewColumn.prototype.getColumnIdx=function(){return this.col_i},ListViewColumn.prototype.render=function(){return L.util.isUndef(this._element)?L.util.isEmpty(this._text)?null:new L.Label({text:this._text}).DOM:this._element.DOM?this._element.DOM:this._element},ListViewColumn.prototype.getAttrs=function(){return this.__attrs||{}},ListViewColumn.prototype.setElement=function(n){return this.__element=n,this.addClass(this.getClass()),this.__attrs&&L.dom.setAttributeMap(this.__element,this.__attrs),"function"==typeof this._onSetElement&&this._onSetElement(this),this.__element},ListViewColumn.prototype.getElement=function(){return this.__element},ListViewColumn.prototype.getClass=function(){return this.__cl},ListViewColumn.prototype.addClass=function(n){return this.__element?this.__element instanceof HTMLElement&&L.dom.addClass(this.__element,n):this.__cl+=" "+n,this},ListViewColumn.prototype.removeClass=function(n){return this.__element instanceof HTMLElement&&L.dom.removeClass(this.__element,n),this},ListViewColumn.prototype.setColspan=function(n){return this._colspan=n},ListViewColumn.prototype.getColspan=function(){var n;return(n=L.util.isFunction(this._colspan)?parseInt(this._colspan()):parseInt(this._colspan))>1?n:1},ListViewColumn}(L.Element)},7227:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnEmpty=function(n){function ListViewColumnEmpty(){return ListViewColumnEmpty.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnEmpty,n),ListViewColumnEmpty.prototype.render=function(){},ListViewColumnEmpty}(L.ListViewColumn)},5339:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewHeaderColumn=function(n){function ListViewHeaderColumn(){return ListViewHeaderColumn.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewHeaderColumn,n),ListViewHeaderColumn.prototype.initOpts=function(){ListViewHeaderColumn.__super__.initOpts.call(this),this.removeOpt("text"),this.addOpts({spacer:{check:Boolean},rotate_90:{check:Boolean},resizable:{default:!0,check:Boolean},label:{check:function(n){return!!(L.util.isPlainObject(n)||n instanceof L.Label)}}})},ListViewHeaderColumn.prototype.readOpts=function(){return ListViewHeaderColumn.__super__.readOpts.call(this),this._label instanceof L.Label?this.__label=this._label:this._label?(this._label.rotate_90=this._rotate_90,this.__label=new L.defaults.class.Label(this._label)):void 0},ListViewHeaderColumn.prototype.setElement=function(n){var b,A;return this.__element=n,ListViewHeaderColumn.__super__.setElement.call(this,this.__element),this._rotate_90&&this.addClass("cui-lv-td-rotate-90"),this._resizable||this.addClass("cui-not-user-resizable"),this.addClass("cui-lv-th"),(b=this.getRow().getListView()).hasCSSGridLayout()&&this._colspan&&L.dom.setStyle(this.__element,{"--colspan":this._colspan},""),b.hasResizableColumns()?("fixed"===b.getColdef(this.getColumnIdx())||(A=L.dom.element("DIV",{class:"cui-lv-col-resize-handle"}),new L.ListViewColResize({element:A,row:this.getRow(),column:this}),L.dom.append(this.__element,A)),this.__element):this.__element},ListViewHeaderColumn.prototype.render=function(){var n;return n=this._spacer?[L.dom.div("cui-tree-node-spacer")]:[],this._element?n.push(this._element):this.__label&&n.push(this.__label),n},ListViewHeaderColumn}(L.ListViewColumn)},3307:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewHeaderRow=function(n){function ListViewHeaderRow(){return ListViewHeaderRow.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewHeaderRow,n),ListViewHeaderRow.prototype.isSelectable=function(){return!1},ListViewHeaderRow}(L.ListViewRow)},8452:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewRow=function(n){function ListViewRow(){return ListViewRow.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewRow,n),ListViewRow.prototype.initOpts=function(){return ListViewRow.__super__.initOpts.call(this),this.addOpts({columns:{check:Array},selectable:{check:Boolean},class:{check:String},ui:{check:String}})},ListViewRow.prototype.readOpts=function(){var n,b,A,L,R;if(ListViewRow.__super__.readOpts.call(this),this._columns)for(this.columns=this._columns,A=b=0,L=(R=this.columns).length;b{var L=A(7288),R={}.hasOwnProperty;L.ListViewTree=function(n){function ListViewTree(n){var b,A;this.__actionOnNode=(b=this.__actionOnNode,A=this,function(){return b.apply(A,arguments)}),ListViewTree.__super__.constructor.call(this,n),L.util.assert(this.root instanceof L.ListViewTreeNode,"new CUI.ListViewTree","opts.root must be instance of ListViewTreeNode",{opts:this.opts}),this.root.setTree(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewTree,n),ListViewTree.defaults={arrow_down:"fa-angle-down",arrow_right:"fa-angle-right"},ListViewTree.prototype.initOpts=function(){return ListViewTree.__super__.initOpts.call(this),this.addOpts({rowMoveWithinNodesOnly:{check:Boolean},children:{check:Array},selectable:{deprecated:!0,check:Boolean},no_hierarchy:{default:!1,check:Boolean},root:{check:function(n){return n instanceof L.ListViewRow}},onOpen:{check:Function},onClose:{check:Function},onBeforeSelect:{check:Function}})},ListViewTree.prototype.readOpts=function(){return ListViewTree.__super__.readOpts.call(this),void 0!==this._selectable&&(L.util.assert(void 0===this._selectableRows,"new CUI.ListViewTree","opts.selectable cannot be used with opts.selectableRows, use selectableRows only.",{opts:this.opts}),this.__selectableRows=this._selectable),this},ListViewTree.prototype.getRowMoveTool=function(n){return null==n&&(n={}),n.rowMoveWithinNodesOnly=this._rowMoveWithinNodesOnly,new L.ListViewTreeRowMove(n)},ListViewTree.prototype.initListView=function(){var n;return ListViewTree.__super__.initListView.call(this),this._root?this.root=this._root:(n={},this._children?n.children=this._children:this._getChildren?n.getChildren=this._getChildren:n.children=[],this.root=new L.ListViewTreeNode(n)),this},ListViewTree.prototype.isSelectable=function(){return!!this.__selectableRows},ListViewTree.prototype.isNoHierarchy=function(){return this._no_hierarchy},ListViewTree.prototype.triggerNodeDeselect=function(n,b){var A;return A={ev:n,node:b,listView:this},"function"==typeof this._onDeselect&&this._onDeselect(n,A),L.Events.trigger({node:this,type:"row_deselected"})},ListViewTree.prototype.triggerNodeSelect=function(n,b){var A;return A={ev:n,node:b,listView:this},"function"==typeof this._onSelect&&this._onSelect(n,A),L.Events.trigger({node:this,type:"row_selected"})},ListViewTree.prototype.render=function(){var n,b,A;return A=this,n=function(n){var b;(b=L.dom.data(L.dom.closest(n.getCurrentTarget(),".cui-lv-tree-node"),"listViewRow"))instanceof L.ListViewTreeNode&&!b.isLoading()&&!b.isLeaf()&&(n.stopImmediatePropagation(),n instanceof L.DragoverScrollEvent?n.getCount()%50==0&&A.toggleNode(n,b):A.toggleNode(n,b))},ListViewTree.__super__.render.call(this),L.Events.listen({node:this.DOM,selector:".cui-tree-node-handle",capture:!0,type:["click","dragover-scroll"],call:function(b){return n(b)}}),L.Events.listen({node:this.DOM,selector:".cui-lv-tree-node",type:["click"],call:function(b){return n(b)}}),this._no_hierarchy?L.dom.addClass(this.grid,"cui-list-view-tree-no-hierarchy"):L.dom.addClass(this.grid,"cui-list-view-tree-hierarchy"),this.__isFocusable()&&(b="."+this.__lvClass+"-quadrant > .cui-lv-tr-outer:focus",L.Events.listen({type:["keydown"],node:this.DOM,selector:b,call:function(n){return function(b){var A,R;(R=L.dom.data(b.getCurrentTarget(),"listViewRow")).isSelectable()&&(A=function(b){var A;A=b.getRowIdx(),n.getRow(A)[0].focus()},"Right"!==b.getKeyboard()||R.isOpen()?"Left"===b.getKeyboard()&&R.isOpen()&&(b.preventDefault(),n.__runTrigger(b,"close",R).done((function(){return A(R)}))):(b.preventDefault(),n.__runTrigger(b,"open",R).done((function(){return A(R)}))))}}(this)})),this.DOM},ListViewTree.prototype.toggleNode=function(n,b){return b.isOpen()?this.__runTrigger(n,"close",b):this.__runTrigger(n,"open",b)},ListViewTree.prototype.__runTrigger=function(n,b,A){return n.ctrlKey()||n.metaKey()?this.__actionOnNode(n,b+"Recursively",A):this.__actionOnNode(n,b,A)},ListViewTree.prototype.__actionOnNode=function(n,b,A){var R,D,B,E;return R=null,B=L.setTimeout({ms:500,call:function(){return A.showSpinner(),B=null,R=!0}}),this.stopLayout(),(D=A[b]()).done((E=this,function(){switch(b){case"open":return"function"==typeof E._onOpen?E._onOpen(n,{node:A}):void 0;case"close":return"function"==typeof E._onClose?E._onClose(n,{node:A}):void 0}})),D.always(function(n){return function(){return B&&L.clearTimeout(B),R&&A.hideSpinner(),n.startLayout(),L.Events.trigger({type:"content-resize",node:n.DOM})}}(this)),D},ListViewTree.prototype.deselectRow=function(n,b,A){return"multiple"===this.__selectableRows||b===A?ListViewTree.__super__.deselectRow.call(this,n,b,A):L.resolvedPromise()},ListViewTree.prototype.getNodesForMove=function(n,b,A){var R,D,B;return R=this.getListViewRow(n),B=this.getListViewRow(b),L.util.assert(R,"ListViewTree.moveRow","from_i node not found",{from_i:n}),L.util.assert(B,"ListViewTree.moveRow","to_i node not found",{to_i:b}),(D=R.father!==B.father||B.is_open&&A?B.is_open&&A?B:B.father:null)===R.father&&(D=null),[R,B,D]},ListViewTree.prototype.moveRow=function(n,b,A){var R,D,B,E,X,$,V;return X=this.getNodesForMove(n,b,A),D=X[0],$=X[1],E=X[2],B=D.moveNodeBefore($,E,A),L.util.assert(L.util.isPromise(B),"ListViewTree.moveRow","moveNodeBefore needs to return a Promise",{promise:B}),R=new L.Deferred,B.done((V=this,function(){var B,X,K;return B=V.getDisplayRowIdx(n),X=V.getDisplayRowIdx(b),ListViewTree.__super__.moveRow.call(V,n,b,A,!1),D.father!==$.father||$.is_open&&A?(D.father.removeChild(D),$.is_open&&A?($.children.splice(0,0,D),D.setFather($)):(A?$.father.children.splice($.getChildIdx()+1,0,D):$.father.children.splice($.getChildIdx(),0,D),D.setFather($.father))):L.util.moveInArray(D.getChildIdx(),$.getChildIdx(),D.father.children,A),K=[D.reload()],E&&K.push(E.reload()),L.whenAll(K).done((function(){return"function"==typeof V._onRowMove&&V._onRowMove(B,X,A),L.Events.trigger({node:V.grid,type:"row_moved",info:{from_i:n,to_i:b,after:A}}),R.resolve()})).fail(R.reject)})).fail(R.reject),R.promise()},ListViewTree.prototype.getRootChildren=function(){return this.root.children},ListViewTree.prototype.getSelectedNode=function(n){return null==n&&(n="selectedNode"),this.root[n]},ListViewTree.prototype.prependNode=function(n){return this.addNode(n,!1)},ListViewTree.prototype.addNode=function(n,b){var A;return null==b&&(b=!0),L.util.assert(n instanceof L.ListViewTreeNode,L.util.getObjectClass(this)+".addNode","Node must be instance of ListViewTreeNode",{node:n}),A=this.root.addNode(n,b),L.Events.trigger({node:this,type:"row_added",info:{node:n}}),A},ListViewTree.prototype.openTreeNodeByRowDisplayIndex=function(n){var b,A;return A=this.getRowIdx(n),b=this.getRow(A),L.dom.data(b[0],"listViewRow").open()},ListViewTree}(L.ListView),L.Events.registerEvent({bubble:!0,type:["row_removed","row_added","row_moved","row_selected","row_deselected"]}),L.defaults.class.ListViewTree=L.ListViewTree},4669:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewTreeHeaderNode=function(n){function ListViewTreeHeaderNode(){return ListViewTreeHeaderNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewTreeHeaderNode,n),ListViewTreeHeaderNode.prototype.initOpts=function(){return ListViewTreeHeaderNode.__super__.initOpts.call(this),this.addOpts({headers:{check:function(n){return n.length>0}}})},ListViewTreeHeaderNode.prototype.render=function(){var n,b,A,R,D;for(this.__is_rendered=!0,A=b=0,R=(D=this._headers).length;b{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b0}},getChildren:{check:Function}})},ListViewTreeNode.prototype.readOpts=function(){return ListViewTreeNode.__super__.readOpts.call(this),this.setColspan(this._colspan),this._children&&(this.children=this.opts.children,this.initChildren()),this._open?this.do_open=!0:this.do_open=!1,this.is_open=!1,this.html=this._html,this.__loadingDeferred=null},ListViewTreeNode.prototype.setColspan=function(n){this.colspan=n},ListViewTreeNode.prototype.getColspan=function(){return this.colspan},ListViewTreeNode.prototype.getChildren=null,ListViewTreeNode.prototype.hasChildren=null,ListViewTreeNode.prototype.isLeaf=function(){return!this.children&&(!this.opts.getChildren&&(!this.getChildren||!!(this.opts.leaf||this.hasChildren&&!this.hasChildren())))},ListViewTreeNode.prototype.getClass=function(){var n;return n=ListViewTreeNode.__super__.getClass.call(this),n+=" cui-lv-tree-node",this.isLeaf()||(n+=" cui-lv-tree-node--is-branch"),n},ListViewTreeNode.prototype.isSelectable=function(){return("function"==typeof this.getTree?this.getTree().isSelectable():void 0)&&this.__selectable&&!this.isRoot()},ListViewTreeNode.prototype.getFather=function(){return this.father},ListViewTreeNode.prototype.setFather=function(n){var b;return L.util.assert(null===n||n instanceof L.ListViewTreeNode,L.util.getObjectClass(this)+".setFather","father can only be null or instanceof CUI.ListViewTreeNode",{father:n}),L.util.assert(n!==this,L.util.getObjectClass(this)+".setFather","father cannot be self",{node:this,father:n}),n&&L.util.assert(D.call(n.getPath(!0),this)<0,L.util.getObjectClass(this)+".setFather","father cannot any of the node's children",{node:this,father:n}),!n&&this.selected&&(this.setSelectedNode(null),this.selected=!1),this.father&&!n?(b=this.getTree(),this.father=n,b&&this.setTree(b)):this.father=n,this},ListViewTreeNode.prototype.isRoot=function(){return!this.father},ListViewTreeNode.prototype.setTree=function(n){return this.tree=n,L.util.assert(this.isRoot(),L.util.getObjectClass(this)+".setTree","node must be root node to set tree",{tree:this.tree,opts:this.opts}),L.util.assert(this.tree instanceof L.ListViewTree,L.util.getObjectClass(this)+".setTree","tree must be instance of ListViewTree",{tree:this.tree,opts:this.opts})},ListViewTreeNode.prototype.getRoot=function(n){return null==n&&(n=0),L.util.assert(n<100,"ListViewTreeNode.getRoot","Recursion detected."),this.father?this.father.getRoot(n+1):this},ListViewTreeNode.prototype.dump=function(n,b){var A,L,R,D,B,E;for(null==n&&(n=[]),null==b&&(b=0),D=[],A=0,B=b;0<=B?AB;0<=B?++A:--A)D.push(" ");if(n.push(D.join("")+this.dumpString()),this.children)for(L=0,R=(E=this.children).length;L-1,L.util.getObjectClass(this)+".getChildIdx()","Node not found in fathers children Array",{node:this,father:this.father,"father.children":this.father.children}),n)},ListViewTreeNode.prototype.getNodeId=function(n){var b,A;return null==n&&(n=!0),A=this.getPath(n),function(){var n,L,R;for(R=[],n=0,L=A.length;n0&&R.removeDeferredRow(this):R.removeRow(this.getRowIdx())),this.__is_rendered=!1),this.is_open=!1,this},ListViewTreeNode.prototype.replaceSelf=function(){var n;return this.father?((n=this.getTree())&&(n.replaceRow(this.getRowIdx(),this.render()),this.selected&&n.rowAddClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)),L.resolvedPromise()):this.is_open?(this.removeFromDOM(!1),this.open()):L.resolvedPromise()},ListViewTreeNode.prototype.openRecursively=function(){return this.__actionRecursively("open")},ListViewTreeNode.prototype.closeRecursively=function(){return this.__actionRecursively("close")},ListViewTreeNode.prototype.__actionRecursively=function(n){var b,A,R;return b=new L.Deferred,this.isLeaf()?b.resolve().promise():("open"===n?(A=this.getLoading())||(A=this.open()):A=this.close(),A.done((R=this,function(){var A,D,B,E,X;for(E=[],D=0,B=(X=R.children||[]).length;Dthis.father.children.length-1?this.father.addNode(n):this.father.addNode(n,b)},ListViewTreeNode.prototype.setChildren=function(n){this.children=n,this.initChildren()},ListViewTreeNode.prototype.initChildren=function(){var n,b,A,R,D,B,E,X,$,V;for(A=R=0,B=($=this.children).length;R1&&(b=0===(A=this.getChildIdx())?1:Math.min(R.length-2,A-1)),null!==b&&(E=R[b])),this.isSelected()?this.deselect().fail(D.reject).done(B):B(),D.promise()},ListViewTreeNode.prototype.removeChild=function(n,b){return null==b&&(b=!1),L.util.removeFromArray(n,this.children),0!==this.children.length||this.isRoot()||(this.is_open=!1,b||(this.children=null)),this.update(),n.setFather(null)},ListViewTreeNode.prototype.deselect=function(n,b){return this.getTree().isSelectable()?this.check_deselect(n,b).done((A=this,function(){return A.setSelectedNode(),A.removeSelectedClass(),A.selected=!1,A.getTree().triggerNodeDeselect(n,A)})):L.resolvedPromise();var A},ListViewTreeNode.prototype.allowRowMove=function(){return!0},ListViewTreeNode.prototype.check_deselect=function(n,b){return L.resolvedPromise()},ListViewTreeNode.prototype.isSelected=function(){return!!this.selected},ListViewTreeNode.prototype.addSelectedClass=function(){return this.getTree().rowAddClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)},ListViewTreeNode.prototype.removeSelectedClass=function(){return this.getTree().rowRemoveClass(this.getRowIdx(),L.ListViewRow.defaults.selected_class)},ListViewTreeNode.prototype.setSelectedNode=function(n,b){return null==n&&(n=null),null==b&&(b=this.getSelectedNodeKey()),this.getRoot()[this.getSelectedNodeKey()]=n},ListViewTreeNode.prototype.getSelectedNode=function(n){var b;return null==n&&(n=this.getSelectedNodeKey()),(null!=(b=this.getRoot())?b[n]:void 0)||null},ListViewTreeNode.prototype.getSelectedNodeKey=function(){return"selectedNode"},ListViewTreeNode.prototype.select=function(n){var b,A,R,D,B;return b=new L.Deferred,n&&("function"==typeof this.getTree?this.getTree().isSelectable():void 0)&&"function"==typeof n.stopPropagation&&n.stopPropagation(),b.done((B=this,function(){return B.getTree().triggerNodeSelect(n,B)})),this.isSelectable()?this.isSelected()?b.resolve().promise():(A=function(n){return function(){var A;return"function"==typeof(A=n.getTree())._onBeforeSelect&&A._onBeforeSelect(n),n.setSelectedNode(n),n.openUpwards().done((function(){return n.addSelectedClass(),n.selected=!0,b.resolve()})).fail(b.reject)}}(this),(D=this.getSelectedNode())&&!0===(null!=(R=this.getTree())?R.__selectableRows:void 0)?D.check_deselect(n,this).done(function(n){return function(){return D.deselect(null,n).done((function(){return A()})).fail(b.reject)}}(this)).fail(b.reject):A(),b.promise()):b.reject().promise()},ListViewTreeNode.prototype.openUpwards=function(n){var b,A,R;return null==n&&(n=0),b=new L.Deferred,this.isRoot()?this.isLoading()?this.getLoading().done((R=this,function(){return b.resolve(R)})).fail(function(n){return function(){return b.reject(n)}}(this)):this.is_open?b.resolve(this):b.reject(this):((A=this.father.openUpwards(n+1)).done(function(A){return function(){return!A.is_open&&n>0?(A.isLoading()?A.getLoading():A.open()).done((function(){return b.resolve(A)})).fail((function(){return b.reject(A)})):b.resolve(A)}}(this)),A.fail(function(A){return function(){return A.do_open=!0,0===n?b.resolve(A):b.reject(A)}}(this))),b.promise()},ListViewTreeNode.prototype.level=function(){return this.isRoot()?0:this.father.level()+1},ListViewTreeNode.prototype.renderContent=function(){return L.util.isFunction(this.html)?this.html.call(this.opts,this):this.html?this.html:new L.EmptyLabel({text:""}).DOM},ListViewTreeNode.prototype.update=function(n){var b,A;return null==n&&(n=!1),n||this.__is_rendered&&!this.isRoot()?(A=this.getTree(),b=null!=A?A.stopLayout():void 0,this.replaceSelf().done((function(){if(b)return A.startLayout()}))):L.resolvedPromise()},ListViewTreeNode.prototype.reload=function(){return L.util.assert(!this.isLoading(),"ListViewTreeNode.reload","Cannot reload node, during opening...",{node:this,tree:this.getTree()}),this.isRoot()?this.replaceSelf():this.is_open?(this.close(),this.do_open=!0,this.open()):(this.opts.children&&(this.children=null),this.update())},ListViewTreeNode.prototype.showSpinner=function(){return this.__is_rendered&&(L.dom.empty(this.__handleDiv),L.dom.append(this.__handleDiv,new L.Icon({icon:"spinner"}).DOM)),this},ListViewTreeNode.prototype.hideSpinner=function(){return this.__is_rendered&&(L.dom.empty(this.__handleDiv),this.__handleIcon&&L.dom.append(this.__handleDiv,new L.Icon({icon:this.__handleIcon}).DOM)),this},ListViewTreeNode.prototype.render=function(){var n,b,A,R,D,B,E,X,$,V;for(L.util.assert(!this.isRoot(),"ListViewTreeNode.render","Unable to render root node."),this.removeColumns(),D=L.dom.div("cui-tree-node level-"+this.level()),this.__is_rendered=!0,B=1,$=this.level();B<$;B+=1)L.dom.append(D,L.dom.div("cui-tree-node-spacer"));if(n=["cui-tree-node-handle"],this.is_open?(this.__handleIcon=L.defaults.class.ListViewTree.defaults.arrow_down,n.push("cui-tree-node-is-open")):this.isLeaf()?(this.__handleIcon=null,n.push("cui-tree-node-is-leaf")):(this.__handleIcon=L.defaults.class.ListViewTree.defaults.arrow_right,n.push("cui-tree-node-is-closed")),0===(null!=(V=this.children)?V.length:void 0)&&n.push("cui-tree-node-no-children"),this.__handleDiv=L.dom.div(n.join(" ")),this.__handleIcon&&L.dom.append(this.__handleDiv,new L.Icon({icon:this.__handleIcon}).DOM),L.dom.append(D,this.__handleDiv),this.prependColumn(new L.ListViewColumn({element:D,class:"cui-tree-node-column cui-tree-node-level-"+this.level(),colspan:this.getColspan()})),R=L.dom.div("cui-tree-node-content"),A=this.renderContent(),L.util.isArray(A))for(E=0,X=A.length;E{var L=A(7288),R={}.hasOwnProperty;L.ListViewColResize=function(n){function ListViewColResize(){return ListViewColResize.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColResize,n),ListViewColResize.prototype.initOpts=function(){return ListViewColResize.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow},column:{mandatory:!0,check:L.ListViewColumn}})},ListViewColResize.prototype.readOpts=function(){var n;ListViewColResize.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx(),this.__display_row_i=this._row.getDisplayRowIdx(),this.__listView=this._row.getListView(),this.__col_i=this._column.getColumnIdx(),L.Events.listen({type:"dblclick",node:this._element,instance:this,call:(n=this,function(b){return console.debug("list view",n.__listView,n.__col_i,n.__row_i),n.__listView.resetColWidth(n.__col_i)})})},ListViewColResize.prototype.get_axis=function(){return"x"},ListViewColResize.prototype.get_cursor=function(n){return"ew-resize"},ListViewColResize.prototype.get_helper=function(n,b,A){return this.get_marker("cui-lv-col-resize")},ListViewColResize.prototype.get_init_helper_pos=function(){var n;return n=this.__listView.getCellGridRect(this.__row_i,this.__col_i),this.__contentWidthAdjust=n.contentWidthAdjust,{left:n.left_abs,top:n.top_abs,width:n.width,height:this.__listView.getGrid().offsetHeight}},ListViewColResize.prototype.get_helper_pos=function(n,b,A){var R;return(R=ListViewColResize.__super__.get_helper_pos.call(this,n,b,A)).left=L.globalDrag.helperNodeStart.left,this.__new_width=L.globalDrag.helperNodeStart.width+A.x,R.width=this.__new_width,R},ListViewColResize.prototype.start_drag=function(n,b,A){return ListViewColResize.__super__.start_drag.call(this,n,b,A),this.__inital_width=this.__listView.getManualColWidth(this.__col_i),this},ListViewColResize.prototype.do_drag=function(n,b,A){if(ListViewColResize.__super__.do_drag.call(this,n,b,A),!L.browser.ie)return this.__setColWidth(this.__new_width)},ListViewColResize.prototype.stop_drag=function(n){return ListViewColResize.__super__.stop_drag.call(this,n),this.__inital_width?this.__listView.setColWidth(this.__col_i,this.__initial_width):this.__listView.resetColWidth(this.__col_i)},ListViewColResize.prototype.__setColWidth=function(n){return this.__listView.setColWidth(this.__col_i,n-this.__contentWidthAdjust)},ListViewColResize.prototype.end_drag=function(n){var b;return ListViewColResize.__super__.end_drag.call(this,n),"function"==typeof(b=this.__listView)._onColumnResize&&b._onColumnResize(this._column,this.__new_width),this.__setColWidth(this.__new_width)},ListViewColResize.prototype.destroy=function(){return L.Events.ignore({instance:this}),ListViewColResize.__super__.destroy.call(this)},ListViewColResize}(L.ListViewDraggable)},1993:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnRowMoveHandle=function(n){function ListViewColumnRowMoveHandle(){return ListViewColumnRowMoveHandle.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnRowMoveHandle,n),ListViewColumnRowMoveHandle.prototype.setElement=function(n){var b,A,R,D;ListViewColumnRowMoveHandle.__super__.setElement.call(this,n),(D=this.getRow()).isMovable()&&((A=D.getListView().getRowMoveTool({row:D,element:n}))&&(b=null!=(R=L.dom.children(A.element))?R[0]:void 0),L.ListView.defaults.row_move_handle_tooltip&&b&&new L.Tooltip({text:L.ListView.defaults.row_move_handle_tooltip,element:b}))},ListViewColumnRowMoveHandle.prototype.render=function(){var n,b,A;return A=null!=(n=this.getRow())&&null!=(b=n.getListView())?b._ui:void 0,L.dom.element("DIV",{class:"cui-drag-handle-row",ui:A?A+".drag.handle":void 0})},ListViewColumnRowMoveHandle}(L.ListViewColumn)},9914:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewColumnRowMoveHandlePlaceholder=function(n){function ListViewColumnRowMoveHandlePlaceholder(){return ListViewColumnRowMoveHandlePlaceholder.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewColumnRowMoveHandlePlaceholder,n),ListViewColumnRowMoveHandlePlaceholder}(L.ListViewColumnEmpty)},23:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewDraggable=function(n){function ListViewDraggable(){return ListViewDraggable.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewDraggable,n),ListViewDraggable.prototype.initOpts=function(){return ListViewDraggable.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow}})},ListViewDraggable.prototype.readOpts=function(){return ListViewDraggable.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx()},ListViewDraggable.prototype.get_marker=function(n){return null==n&&(n=""),L.dom.element("DIV",{class:"cui-lv-draggable "+n})},ListViewDraggable}(L.Draggable)},3325:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ListViewRowMove=function(n){function ListViewRowMove(){return ListViewRowMove.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ListViewRowMove,n),ListViewRowMove.prototype.initOpts=function(){return ListViewRowMove.__super__.initOpts.call(this),this.removeOpt("helper"),this.addOpts({row:{mandatory:!0,check:L.ListViewRow}})},ListViewRowMove.prototype.readOpts=function(){return ListViewRowMove.__super__.readOpts.call(this),this.__row_i=this._row.getRowIdx(),this.__display_row_i=this._row.getDisplayRowIdx(),this.__listView=this._row.getListView()},ListViewRowMove.prototype.get_helper=function(n,b,A){return this.get_marker("cui-lv-row-move")},ListViewRowMove.prototype.get_helper_contain_element=function(){return this.__listView.getBottom()},ListViewRowMove.prototype.get_axis=function(){return"y"},ListViewRowMove.prototype.get_init_helper_pos=function(n,b){var A;return{top:(A=this.__listView.getRowGridRect(this.__row_i)).top_abs,left:A.left_abs,width:A.width,height:A.height}},ListViewRowMove.prototype.init_helper=function(){return this.movableTargetDiv=this.get_marker("cui-lv-row-move-target"),L.dom.append(this.__listView.getGrid(),this.movableTargetDiv),ListViewRowMove.__super__.init_helper.call(this)},ListViewRowMove.prototype.do_drag=function(n,b,A){var L;ListViewRowMove.__super__.do_drag.call(this,n,b,A),(L=this.__listView.getCellByTarget(b))&&(L.clientX=n.clientX(),L.clientY=n.clientY(),L.display_row_i>=this.__listView.fixedRowsCount&&this.showHorizontalTargetMarker(L))},ListViewRowMove.prototype.cleanup_drag=function(n){return ListViewRowMove.__super__.cleanup_drag.call(this,n),L.dom.remove(this.movableTargetDiv),this.movableTargetDiv=null},ListViewRowMove.prototype.end_drag=function(n){var b,A;if(ListViewRowMove.__super__.end_drag.call(this,n),this.target)return b=this._row,A=this.__listView.getListViewRow(this.target.row_i),L.globalDrag.noClickKill=!0,b.moveRow?b.moveRow(this.__listView,A,this.target.after):this.__listView.moveRow(this.__row_i,this.target.row_i,this.target.after)},ListViewRowMove.prototype.showHorizontalTargetMarker=function(n){return this.showHorizontalTargetMarkerSetTarget(n),this.target.row_i===this.__row_i||this.target.before_row_i===this.__row_i&&!1===this.target.after||this.target.after_row_i===this.__row_i&&!1===this.target.before?(this.target=null,L.dom.hideElement(this.movableTargetDiv)):(L.dom.showElement(this.movableTargetDiv),L.dom.setStyle(this.movableTargetDiv,{left:this.target.left,top:this.target.top,width:this.target.width}))},ListViewRowMove.prototype.showHorizontalTargetMarkerSetTarget=function(n){var b;this.target={row_i:n.row_i},b=this.__listView.getRowGridRect(n.row_i),this.__display_row_i>0&&(this.target.before_row_i=this.__listView.getRowIdx(this.__display_row_i-1)),this.__display_row_i{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0||(L=this.target.row_i,D.call(this.blockedAfterRows,L)>=0&&this.target.after)||(R=this.target.row_i,D.call(this.blockedBeforeRows,R)>=0&&!this.target.after))&&(n=(B=this.__listView.getNodesForMove(this.__row_i,this.target.row_i,this.target.after))[0],E=B[1],b=B[2],(!this._rowMoveWithinNodesOnly||!b)&&!!n.allowRowMove(E,b,this.target.after))},ListViewTreeRowMove}(L.ListViewRowMove)},309:function(n,b,A){var L,R=A(7288),D={}.hasOwnProperty;L=A(748),R.GoogleMap=function(n){function GoogleMap(n){R.util.assert(R.GoogleMap.defaults.google_api.key,"It's necessary to add a google maps api key in order to use CUI.GoogleMap"),GoogleMap.__super__.constructor.call(this,n),this.__listeners=[]}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(GoogleMap,n),GoogleMap.defaults={google_api:{key:null,language:"en"}},GoogleMap.prototype.__getMapClassName=function(){return"cui-google-map"},GoogleMap.prototype.__buildMap=function(){var n,b;return n=new google.maps.Map(this.get("center"),{zoomControl:!1}),R.dom.waitForDOMInsert({node:this}).done((b=this,function(){return google.maps.event.trigger(n,"resize"),b._zoomToFitAllMarkersOnInit?b.zoomToFitAllMarkers():(n.setCenter(b._centerPosition),n.setZoom(b._zoom)),b.__onReady()})),n},GoogleMap.prototype.__bindOnClickMapEvent=function(){return this.__listeners.push(this.__map.addListener("click",(n=this,function(b){return n.__map.setCenter(b.latLng),n.setSelectedMarkerPosition(b.latLng)})));var n},GoogleMap.prototype.__buildMarker=function(n){return new google.maps.Marker(n)},GoogleMap.prototype.__addMarkerToMap=function(n){if(n.setMap(this.__map),n.infoWindow)return this.__listeners.push(n.addListener("click",(b=this,function(){return n.infoWindow.open(b.__map,n)})));var b},GoogleMap.prototype.__removeMarker=function(n){return n.setMap(null)},GoogleMap.prototype.getSelectedMarkerPosition=function(){var n,b;if(n=null!=(b=this.__selectedMarker)?b.getPosition():void 0)return{lat:n.lat(),lng:n.lng()}},GoogleMap.prototype.setSelectedMarkerPosition=function(n){var b,A;return this.__selectedMarker?this.__selectedMarker.setPosition(n):((b=this._selectedMarkerOptions||{}).position=n,b.draggable=this._clickable,this.__selectedMarker=this.addMarker(b),this.__listeners.push(this.__selectedMarker.addListener("dragend",(A=this,function(n){return A.__map.setCenter(n.latLng),"function"==typeof A._onMarkerSelected?A._onMarkerSelected(A.getSelectedMarkerPosition()):void 0})))),"function"==typeof this._onMarkerSelected?this._onMarkerSelected(this.getSelectedMarkerPosition()):void 0},GoogleMap.prototype.removeSelectedMarker=function(){if(this.__selectedMarker)return this.__removeMarker(this.__selectedMarker),delete this.__selectedMarker},GoogleMap.prototype.hideMarkers=function(){var n,b,A;for(n=0,b=(A=this.__markers).length;n0){for(n.__bounds=new google.maps.LatLngBounds,b=0,A=(R=n.__markers).length;b{var L=A(7288),R={}.hasOwnProperty;L.IconMarker=function(n){function IconMarker(n){var b;IconMarker.__super__.constructor.call(this,n),b=new L.Template({name:"map-div-marker",map:{icon:!0,arrow:!0}}),this.registerTemplate(b),this.render()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(IconMarker,n),IconMarker.prototype.initOpts=function(){return IconMarker.__super__.initOpts.call(this),this.addOpts({icon:{check:String},color:{check:String},size:{check:"Integer",default:28},arrowSize:{check:"Integer",default:5},onClick:{check:Function},tooltip:{check:"PlainObject"}})},IconMarker.prototype.render=function(){var n,b,A;return b={width:this._size,height:this._size,background:this._color},n=this._onClick?new L.Button({icon:this._icon,tooltip:this._tooltip,onClick:this._onClick,appearance:"flat"}):new L.Icon({icon:this._icon}),this.append(n,"icon"),L.dom.setStyle(this.DOM,b),A={width:2*this._arrowSize,height:2*this._arrowSize,"margin-left":-this._arrowSize},L.dom.setStyle(this.get("arrow"),A)},IconMarker.prototype.toHtml=function(){return this.DOM.outerHTML},IconMarker.prototype.getAnchor=function(){return{top:this._size+this._arrowSize,left:this._size/2}},IconMarker.prototype.getSize=function(){return this._size},IconMarker}(L.DOMElement)},8595:(n,b,A)=>{var R,D=A(7288),B={}.hasOwnProperty;R=A(4484),A(4906),A(2989),D.LeafletMap=function(n){function LeafletMap(n){LeafletMap.__super__.constructor.call(this,n),D.LeafletMap.loadCSSPromise||(D.LeafletMap.loadCSSPromise=this.__loadCSS()),D.LeafletMap.defaults.tileLayerOptions.maxZoom=D.Map.defaults.maxZoom,this.__groups={}}return function(n,b){for(var A in b)B.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(LeafletMap,n),LeafletMap.defaults={tileLayerUrl:"https://{s}.tile.osm.org/{z}/{x}/{y}.png",tileLayerOptions:{attribution:R}},LeafletMap.prototype.__getMapClassName=function(){return"cui-leaflet-map"},LeafletMap.prototype.__buildMap=function(){var n,b,A;return n=L.map(this.get("center"),{zoomControl:!1}),b=L.tileLayer(D.LeafletMap.defaults.tileLayerUrl,D.LeafletMap.defaults.tileLayerOptions),D.dom.waitForDOMInsert({node:this}).done((A=this,function(){return D.LeafletMap.loadCSSPromise.done((function(){return A._zoomToFitAllMarkersOnInit?A.zoomToFitAllMarkers():n.setView(A._centerPosition,A._zoom),b.addTo(n),A.__onReady()}))})),this._onClick&&n.on("click",this._onClick),this._onZoomEnd&&n.on("zoomend",this._onZoomEnd),n.on("moveend",function(n){return function(){return n.__onMoveEnd(arguments)}}(this)),n},LeafletMap.prototype.__buildMarker=function(n){var b,A,R,B,E;return n.iconName&&n.iconColor&&(R=(A=new D.IconMarker({icon:n.iconName,color:n.iconColor})).getSize(),b=A.getAnchor(),n.icon=L.divIcon({html:A.toHtml(),iconAnchor:[b.left,b.top],iconSize:[R,R]}),delete n.iconName,delete n.iconColor),B=L.marker(n.position,n),(null!=(E=n.group)?E.type:void 0)&&this._showPolylines&&(this.__groups[n.group.type]=this.__groups[n.group.type]||[],this.__groups[n.group.type].push({marker:B,options:n.group.options}),delete n.group),B},LeafletMap.prototype.__addMarkerToMap=function(n){return n.addTo(this.__map),this.__updateGroupsPolylines()},LeafletMap.prototype.__bindOnClickMapEvent=function(){return this.__map.on("click",(n=this,function(b){if(n.setSelectedMarkerPosition(b.latlng),n.__selectedMarker)return n.__map.setView(n.getSelectedMarkerPosition())}));var n},LeafletMap.prototype.__afterMarkerCreated=function(n,b){var A,L,R;L=b.cui_onClick,R=b.cui_onDoubleClick,L&&R&&(A=!1,L=function(n){return D.setTimeout((function(){if(!A)return b.cui_onClick(n)}),200)},R=function(n){return A=!0,b.cui_onDoubleClick(n),D.setTimeout((function(){return A=!1}),250)}),L&&n.on("click",L),R&&(this.__map.doubleClickZoom.disable(),n.on("dblclick",R))},LeafletMap.prototype.__removeMarker=function(n){var b,A,L,R,D;for(b in D=this.__groups)if(A=(A=(L=D[b]).filter((function(b){return b.marker===n})))[0]){R=L.indexOf(A),L.splice(R,1);break}A&&A.polyline&&this.__map.removeLayer(A.polyline),n.off(),this.__map.removeLayer(n),n=null},LeafletMap.prototype.__updateGroupsPolylines=function(){var n,b;for(n in b=this.__groups)b[n].reduce(function(n){return function(b,A){if(A)return b.polyline||(b.polyline=L.polyline([b.marker.getLatLng(),A.marker.getLatLng()],{weight:1.5,color:b.options.color,dashArray:b.options.polyline}),b.polyline.addTo(n.__map)),A}}(this))},LeafletMap.prototype.getSelectedMarkerPosition=function(){var n;return null!=(n=this.__selectedMarker)?n.getLatLng():void 0},LeafletMap.prototype.setSelectedMarkerPosition=function(n){var b,A;if(D.Map.isValidPosition(n))return this.__selectedMarker?this.__selectedMarker.setLatLng(n):((b=this._selectedMarkerOptions||{}).position=n,b.draggable=this._clickable,this.__selectedMarker=this.addMarker(b),this.__selectedMarker.on("dragstart",(A=this,function(){return A.__selectedMarkerPositionOnDragStart=A.getSelectedMarkerPosition()})),this.__selectedMarker.on("dragend",function(n){return function(){var b;return b=n.getSelectedMarkerPosition(),D.Map.isValidPosition(b)?"function"==typeof n._onMarkerSelected&&n._onMarkerSelected(n.getSelectedMarkerPosition()):n.setSelectedMarkerPosition(n.__selectedMarkerPositionOnDragStart),n.__map.setView(n.getSelectedMarkerPosition())}}(this))),"function"==typeof this._onMarkerSelected?this._onMarkerSelected(this.getSelectedMarkerPosition()):void 0},LeafletMap.prototype.removeSelectedMarker=function(){if(this.__selectedMarker)return this.__removeMarker(this.__selectedMarker),delete this.__selectedMarker},LeafletMap.prototype.hideMarkers=function(){var n,b,A;for(n=0,b=(A=this.__markers).length;n0?(b=new L.featureGroup(n.__markers),n.__map.fitBounds(b.getBounds().pad(.05))):n.__map.setView(n._centerPosition,n._zoom)}));var n},LeafletMap.prototype.zoomIn=function(){return this.__map.setZoom(this.__map.getZoom()+1)},LeafletMap.prototype.zoomOut=function(){return this.__map.setZoom(this.__map.getZoom()-1)},LeafletMap.prototype.resize=function(){return this.__map.invalidateSize()},LeafletMap.prototype.getZoom=function(){return this.__map.getZoom()},LeafletMap.prototype.setZoom=function(n){return this.__map.setZoom(n)},LeafletMap.prototype.setCenter=function(n,b){return null==b&&(b=this.getZoom()),this.__map.setView(n,b)},LeafletMap.prototype.getCenter=function(){return this.__map.getCenter()},LeafletMap.prototype.destroy=function(){var n,b,A,L,R;for(n=0,b=(L=this.__markers).length;n{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(7540)),L.Map=function(n){function Map(n){var b,A,R,D,B;Map.__super__.constructor.call(this,n),this.__mapTemplate=new L.Template({name:"map",map:{center:!0,"buttons-upper-left":!0,"buttons-upper-right":!0,"buttons-upper-center":!0,"buttons-bottom-left":!0,"buttons-bottom-right":!0,"buttons-bottom-center":!0}}),this.append(this.__mapTemplate,"center"),L.dom.addClass(this.__mapTemplate.get("center"),this.__getMapClassName()),this.__zoomButtons=this.__getZoomButtons(),A=this.__zoomButtons,this._buttonsUpperLeft&&(A=A.concat(this._buttonsUpperLeft)),b=new L.Buttonbar({buttons:A,class:"map-zoom-buttons"}),L.dom.append(this.__mapTemplate.get("buttons-upper-left"),b),this._buttonsUpperCenter&&L.dom.append(this.__mapTemplate.get("buttons-upper-center"),this._buttonsUpperCenter),R=[],this._addFullscreenButton&&(D=this.__getFullscreenButtonOpts(),R.push(L.Pane.getToggleFillScreenButton(D))),this._buttonsUpperRight&&(R=this._buttonsUpperRight.concat(R)),R.length&&(b=new L.Buttonbar({buttons:R}),L.dom.append(this.__mapTemplate.get("buttons-upper-right"),b)),this._buttonsBottomRight&&(b=new L.Buttonbar({buttons:this._buttonsBottomRight}),L.dom.append(this.__mapTemplate.get("buttons-bottom-right"),b)),this._buttonsBottomLeft&&(b=new L.Buttonbar({buttons:this._buttonsBottomLeft}),L.dom.append(this.__mapTemplate.get("buttons-bottom-left"),b)),this.__markers=[],this.__map=this.__buildMap(),this._clickable&&this.__bindOnClickMapEvent(),this.addMarkers(this._markersOptions),this._selectedMarkerPosition&&this.setSelectedMarkerPosition(this._selectedMarkerPosition),this.__viewportResizeListener=L.Events.listen({type:"viewport-resize",node:this,call:(B=this,function(){return B.resize()})})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Map,n),Map.defaults={maxZoom:18,minZoom:0,buttons:{fullscreen:{open:{icon:"fa-expand"},close:{icon:"fa-compress"}},zoom:{plus:{icon:"zoom_in",tooltip:"Zoom in"},reset:{icon:"fa-dot-circle-o",tooltip:"Reset"},minus:{icon:"zoom_out",tooltip:"Zoom out"}}}},Map.prototype.initOpts=function(){return Map.__super__.initOpts.call(this),this.addOpts({centerPosition:{check:L.Map.isValidPosition,default:{lat:0,lng:0}},zoom:{check:"Integer",default:1},markersOptions:{check:Array,default:[]},clickable:{check:Boolean,default:!0},selectedMarkerPosition:{check:L.Map.isValidPosition},selectedMarkerOptions:{check:"PlainObject"},onMarkerSelected:{check:Function},zoomToFitAllMarkersOnInit:{check:Boolean,default:!1},onClick:{check:Function},onZoomEnd:{check:Function},onMoveEnd:{check:Function},onReady:{check:Function},buttonsUpperLeft:{check:Array},buttonsUpperCenter:{check:Array},buttonsUpperRight:{check:Array},buttonsBottomRight:{check:Array},buttonsBottomLeft:{check:Array},showPolylines:{check:Boolean,default:!0},addFullscreenButton:{check:Boolean,default:!0}})},Map.prototype.addMarkers=function(n){var b,A,L,R;for(R=[],b=0,A=n.length;b=-90},Map.isValidLongitude=function(n){return L.util.isNumber(n)&&n<=180&&n>=-180},Map.isValidPosition=function(n){return n&&L.Map.isValidLatitude(n.lat)&&L.Map.isValidLongitude(n.lng)},Map}(L.Pane)},7816:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5737)),L.MapInput=function(n){function MapInput(){return MapInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MapInput,n),MapInput.defaults={labels:{mapButtonTooltip:"Show map",iconButtonTooltip:"Show icon",placeholder:"Insert or paste coordinates",iconLabel:"Icon",colorLabel:"Color"},displayFormat:"ll",mapClass:L.LeafletMap,iconColors:["#b8bfc4","#80d76a","#f95b53","#ffaf0f","#57a8ff"],icons:["fa-map-marker","fa-envelope","fa-automobile","fa-home","fa-bicycle","fa-graduation-cap"]},MapInput.displayFormats={dms:"FFf",ddm:"Ff",dd:"f",ll:function(n){return n.lat.toFixed(5)+", "+n.lng.toFixed(5)}},MapInput.prototype.getTemplateKeyForRender=function(){return"center"},MapInput.prototype.initOpts=function(){return MapInput.__super__.initOpts.call(this),this.addOpts({mapOptions:{check:"PlainObject",default:{}},displayFormat:{check:function(n){return!L.util.isNull(L.MapInput.displayFormats[n])},default:L.MapInput.defaults.displayFormat}}),this.removeOpt("getValueForDisplay"),this.removeOpt("getValueForInput"),this.removeOpt("getValueForStore"),this.removeOpt("checkInput")},MapInput.prototype.readOpts=function(){return MapInput.__super__.readOpts.call(this),this._checkInput=this.__checkInput,this.__selectedMarkerOptions={}},MapInput.prototype.initValue=function(){var n,b,A;return MapInput.__super__.initValue.call(this),n=this.getValue(),this.__selectedMarkerOptions.iconName=n.iconName||L.MapInput.defaults.icons[0],this.__selectedMarkerOptions.iconColor=n.iconColor||L.MapInput.defaults.iconColors[0],(A=this.__getPosition())&&L.Map.isValidPosition(A)?(b=this.__getFormattedPosition(A),this.setValue(b)):this.setValue("")},MapInput.prototype.getTemplate=function(){return new L.Template({name:"map-input",map:{left:!0,center:!0,right:!0}})},MapInput.prototype.getValueForDisplay=function(){return this.__getPositionForDisplay()},MapInput.prototype.getValueForInput=function(){return this.__getPositionForDisplay()},MapInput.prototype.__getPositionForDisplay=function(){var n;return(n=this.__getPosition())?this.__getFormattedPosition(n):""},MapInput.prototype.getValueForStore=function(n){var b,A;return b={iconName:this.__selectedMarkerOptions.iconName,iconColor:this.__selectedMarkerOptions.iconColor},A=L.util.parseCoordinates(n),b.position=A||"",b},MapInput.prototype.checkValue=function(n){if(L.util.isEmpty(n))return!0;if(this.__checkInput(n))return!0;throw new Error(this.__cls+".setValue(value): Value needs to be valid coordinates.")},MapInput.prototype.render=function(){var n,b;return MapInput.__super__.render.call(this),this.addClass("cui-data-field--with-button"),this.__initMap(),L.util.isEmpty(this._placeholder)&&this.__input.setAttribute("placeholder",L.MapInput.defaults.labels.placeholder),n=new L.defaults.class.Button({icon:"fa-map-o",tooltip:{text:L.MapInput.defaults.labels.mapButtonTooltip},onClick:(b=this,function(){return b.__openMapPopover(n)})}),this.__openIconPopoverButton=new L.defaults.class.Button({class:"cui-map-icon-popover-button",icon:this.__selectedMarkerOptions.iconName,tooltip:{text:L.MapInput.defaults.labels.iconButtonTooltip},onClick:function(n){return function(){return n.__openIconPopover(n.__openIconPopoverButton)}}(this)}),this.replace(n,"right"),this.replace(this.__openIconPopoverButton,"left"),this.__updateIconOptions()},MapInput.prototype.__openMapPopover=function(n){var b;(b=new L.Popover({element:n,handle_focus:!1,placement:"se",class:"cui-map-popover",pane:this.__buildMap(),onHide:function(){return b.destroy()}})).show()},MapInput.prototype.__updateIconOptions=function(){return this.__openIconPopoverButton.setIcon(this.__selectedMarkerOptions.iconName),L.dom.setStyleOne(this.__openIconPopoverButton.getIcon(),"color",this.__selectedMarkerOptions.iconColor)},MapInput.prototype.__openIconPopover=function(n){var b;(b=new L.Popover({element:n,handle_focus:!1,placement:"se",pane:{padded:!0,content:this.__buildIconPopoverContent()},onHide:function(){return b.destroy()}})).show()},MapInput.prototype.__buildIconPopoverContent=function(){var n,b,A,R;return b=new L.Select({data:this.__selectedMarkerOptions,name:"iconColor",form:{label:L.MapInput.defaults.labels.colorLabel},onDataChanged:(R=this,function(){return R.storeValue(),R.__updateIconOptions()}),options:function(){var n,b,A,R,D,B;for(D=[],b=0,R=(B=L.MapInput.defaults.iconColors).length;b{var L,R=A(7288),D={}.hasOwnProperty;L=A(3185),R.MarkdownInput=function(n){function MarkdownInput(){return MarkdownInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)D.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MarkdownInput,n),MarkdownInput.prototype.initOpts=function(){return MarkdownInput.__super__.initOpts.call(this),this.removeOpt("textarea"),this.addOpts({preview:{check:Boolean},preview_ms:{default:500,check:function(n){return n>=0}},renderFunction:{mandatory:!0,default:function(n){return L(n,R.defaults.marked_opts)},check:Function}})},MarkdownInput.prototype.readOpts=function(){var n,b,A,L,D,B;for(MarkdownInput.__super__.readOpts.call(this),this._textarea=!0,this.__preview=null,this.__updatePreview=(B=this,function(){return B.updatePreview()}),D={top:{}},n=0,A=(L=["maximize","maximize_horizontal","maximize_vertical"]).length;n1))return A.selected.startsWith(n)&&A.selected.endsWith(n)?(this.setValue(A.before+A.selected.substr(b,A.selected.length-2*b)+A.after),this.setSelection({start:A.start,end:A.end-2*b})):(this.setValue(A.before+n+A.selected+n+A.after),this.setSelection({start:A.start,end:A.end+2*b}))},MarkdownInput.prototype.makeOrderedList=function(){return this.__makeList(!1)},MarkdownInput.prototype.makeUnorderedList=function(){return this.__makeList(!0)},MarkdownInput.prototype.checkList=function(){var n;return n=this.__makeList(null,!0),console.debug("selection is type",n)},MarkdownInput.prototype.__makeList=function(n,b){var A,L,D,B,E,X,$,V,K,Q,tt;if(null==n&&(n=!0),null==b&&(b=!1),K=(Q=this.getSelection()).selected.split("\n"),""!==Q.before&&!Q.before.endsWith("\n"))return null;for(tt=null,b?L=void 0:$=n?"- ":"1. ",X=[],A=0,B=K.length;A{var L=A(7288),R={}.hasOwnProperty;L.Menu=function(n){function Menu(n){Menu.__super__.constructor.call(this,n),this._itemList&&this.setItemList(this._itemList)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Menu,n),Menu.prototype.initOpts=function(){return Menu.__super__.initOpts.call(this),this.addOpts({itemList:{check:function(n){return n instanceof L.ItemList||L.util.isPlainObject(n)}},auto_close_after_click:{default:!0,check:Boolean},parent_menu:{check:L.Menu},onBeforeItemListInit:{check:Function}}),this},Menu.prototype.readOpts=function(){Menu.__super__.readOpts.call(this),this.opts.placements||(this._parent_menu||this._show_at_position?this._placements=["es","en","ws","wn"]:this._placements=["se","sw","ne","nw"]),this.opts.placement||(this._placement=this._placements[0])},Menu.prototype.show=function(n){var b,A,R;return this.__event=n,L.util.assert(!this.isDestroyed(),L.util.getObjectClass(this)+".show","Element is already destroyed."),this.__openedByKeyboard=(null!=(A=this.__event)?A.getNativeEvent():void 0)instanceof KeyboardEvent,this.isShown()?(this.position(),this):(this.__loading||(R=this,b=function(){R.getButton()&&R.DOM.focus()},this.__itemList?(this.__loading=!0,this.__itemList.render(this,this.__event).done(function(n){return function(){return Menu.__super__.show.call(n,n.__event),b(),n.__loading=!1}}(this))):(Menu.__super__.show.call(this,this.__event),b()),this.__keyUpListener=L.Events.listen({type:"keyup",node:this.DOM,capture:!0,call:function(n){return function(b){var A;b.hasModifierKey()||"Esc"!==(A=b.getKeyboardKey())&&"Tab"!==A||(n.hide(),b.stop())}}(this)}),this.__keydownListener=L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(n){return function(b){n.__itemList&&L.Events.trigger({node:n.__itemList.DOM,type:"item-list-keydown",info:{event:b}})}}(this)})),this)},Menu.prototype.hide=function(){var n,b,A;return this.__openedByKeyboard&&null!=(n=this.getButton())&&n.DOM.focus(),null!=(b=this.__keyUpListener)&&b.destroy(),null!=(A=this.__keydownListener)&&A.destroy(),Menu.__super__.hide.call(this)},Menu.prototype.hasItems=function(n){var b;return null!=(b=this.__itemList)?b.hasItems(n):void 0},Menu.prototype.getItemList=function(){return this.__itemList},Menu.prototype.setItemList=function(n){var b;return n instanceof L.ItemList?this.__itemList=n:(delete n.maximize,n.maximize_vertical=!1,n.maximize_horizontal=!0,n.keyboardControl=!0,n.hasOwnProperty("active_item_idx")||(n.active_item_idx=null),this.__itemList=new L.ItemList(n)),this.replace(this.__itemList),this.proxy(this.__itemList,["setActiveIdx"]),this.isShown()&&this.__itemList.render(this,this.__event).done((b=this,function(){if(b.position(),b.__updateScroll&&(b.__itemList.DOM.scrollTop=b.__updateScroll),b.__waitBlock)return b.__waitBlock.hide(),b.__waitBlock=null,delete b.__updateScroll})),this},Menu.prototype.isAutoCloseAfterClick=function(){return this._auto_close_after_click},Menu.prototype.destroy=function(){var n;return null!=(n=this.__itemList)&&n.destroy(),Menu.__super__.destroy.call(this)},Menu.prototype.reload=function(n){return this.__waitBlock=new L.WaitBlock({element:this.DOM}),n&&(this.__updateScroll=this.getItemList().DOM.scrollTop),this.setItemList(this._itemList),this.__waitBlock.show()},Menu.prototype.hideAll=function(n){var b;return this.hide(n),null!=(b=this._parent_menu)&&b.hideAll(n),this},Menu.prototype.getButton=function(){var n,b;return!(b=this.getOpt("element"))||b instanceof L.Button?b:(n=L.dom.data(b.DOM||b,"element"))instanceof L.Button?n:null},Menu}(L.Layer)},6828:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Modal=function(n){function Modal(n){var b,A,R,D,B,E,X,$,V;if(Modal.__super__.constructor.call(this,n),this._header_buttons)for(B=0,E=(X=this._header_buttons).length;B{var L=A(7288),R={}.hasOwnProperty;L.MultiInput=function(n){function MultiInput(n){MultiInput.__super__.constructor.call(this,n),this.addClass("cui-multi-input"),this._textarea&&this.addClass("cui-multi-input--textarea")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInput,n),MultiInput.prototype.initOpts=function(){return MultiInput.__super__.initOpts.call(this),this.addOpts({textarea:{default:!1,check:Boolean},spellcheck:{default:!1,check:Boolean},placeholder:{check:"PlainObject"},onFocus:{check:Function},onClick:{check:Function},onKeyup:{check:Function},onBlur:{check:Function},control:{mandatory:!0,check:function(n){return n instanceof L.MultiInputControl}},content_size:{default:!1,check:Boolean},user_selectable:{default:!1,check:Boolean}})},MultiInput.prototype.readOpts=function(){return MultiInput.__super__.readOpts.call(this),this.__inputs=null,this.__userSelectedData={},this._control&&this._control.getUserSelectable&&(this._user_selectable=this._control.getUserSelectable()),this.__user_selectable=this._user_selectable},MultiInput.prototype.disable=function(){var n,b,A;if(MultiInput.__super__.disable.call(this),this.__inputs)for(n=0,b=(A=this.__inputs).length;n{var L=A(7288),R={}.hasOwnProperty;L.MultiInputControl=function(n){function MultiInputControl(n){MultiInputControl.__super__.constructor.call(this,n),this.__body=document.body,this.setKeys(this._keys),this.setPreferredKey(this._preferred_key)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInputControl,n),MultiInputControl.prototype.initOpts=function(){return MultiInputControl.__super__.initOpts.call(this),this.addOpts({preferred_key:{check:String},keys:{check:function(n){return L.util.isArray(n)&&n.length>0}},user_control:{default:!0,check:Boolean}})},MultiInputControl.prototype.setKeys=function(n){var b,A,R,D,B;if(this.__keys=[],n){for(D={},A=b=0,B=n.length;b{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(66)),L.MultiInputInput=function(n){function MultiInputInput(){return MultiInputInput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiInputInput,n),MultiInputInput.prototype.getTemplate=function(){return new L.Template({name:"data-field-multi-input",map:{center:!0,right:!0}})},MultiInputInput.prototype.getTemplateKeyForRender=function(){return"center"},MultiInputInput}(L.Input)},1240:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(792)),L.MultiOutput=function(n){function MultiOutput(){return MultiOutput.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(MultiOutput,n),MultiOutput.prototype.initOpts=function(){return MultiOutput.__super__.initOpts.call(this),this.addOpts({control:{mandatory:!0,check:L.MultiInputControl},showOnlyPreferredKey:{check:Boolean,default:!0},markdown:{mandatory:!0,default:!1,check:Boolean},markdown_opts:{check:"PlainObject"},text_node_func:{check:Function}})},MultiOutput.prototype.readOpts=function(){return MultiOutput.__super__.readOpts.call(this),this.__keyTemplates={}},MultiOutput.prototype.render=function(){var n,b,A,R,D,B,E,X,$;if(MultiOutput.__super__.render.call(this),this._showOnlyPreferredKey)A=this._control.getPreferredKey(),L.util.assert(A,"Output.displayValue","MultiInputControl: no preferred key set.",{control:this._control}),R=this.__getLabel(A.name),this.replace(R);else{for(b=n=0,D=(B=this._control.getKeys()).length;n{var L=A(7288),R={}.hasOwnProperty;L.ObjectDumper=function(n){function ObjectDumper(n){var b,A;ObjectDumper.__super__.constructor.call(this,n),this._headers&&(b=new L.ListViewTreeHeaderNode({headers:this._headers}),this.root.children.splice(0,0,b)),this.render(),this.root.open().always((A=this,function(){return"function"==typeof A._onAfterRender?A._onAfterRender(A):void 0}))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ObjectDumper,n),ObjectDumper.prototype.initOpts=function(){return ObjectDumper.__super__.initOpts.call(this),this.addOpts({object:{mandatory:!0,check:function(n){return!(!L.util.isArray(n)&&!L.util.isPlainObject(n))}},headers:{default:[{label:{text:"key"}},{label:{text:"value"}}],check:function(n){return 2===n.length||L.util.isFalse(n)}},do_open:{mandatory:!0,default:!1,check:Boolean},parse_json:{mandatory:!0,default:!1,check:Boolean},onAfterRender:{check:Function}}),this.removeOpt("root"),this.removeOpt("cols"),this.removeOpt("colResize"),this.removeOpt("fixedRows")},ObjectDumper.prototype.readOpts=function(){return ObjectDumper.__super__.readOpts.call(this),this._cols=["auto","auto"],this._colClasses=["cui-object-dumper-key","cui-object-dumper-value"],this._headers&&(this._colResize=!0,this._fixedRows=1),this._no_hierarchy=this.__hasOnlyPlainValues(this._object)},ObjectDumper.prototype.initListView=function(){return ObjectDumper.__super__.initListView.call(this),this.root=new L.ObjectDumperNode({data:this._object,do_open:this._do_open,parse_json:this._parse_json})},ObjectDumper.prototype.__hasOnlyPlainValues=function(n){var b,A;for(b in n){if(A=n[b],L.util.isPlainObject(A)||L.util.isArray(A))return!1;if(this._parse_json&&L.util.isJSON(A))return!1}return!0},ObjectDumper}(L.ListViewTree)},3378:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.ObjectDumperNode=function(n){function ObjectDumperNode(){return ObjectDumperNode.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(ObjectDumperNode,n),ObjectDumperNode.prototype.initOpts=function(){return ObjectDumperNode.__super__.initOpts.call(this),this.addOpts({key:{default:"root",mandatory:!0},data:{},do_open:{mandatory:!0,default:!1,check:Boolean},parse_json:{mandatory:!0,default:!1,check:Boolean}}),this.removeOpt("colspan"),this.removeOpt("children"),this.removeOpt("getChildren")},ObjectDumperNode.prototype.readOpts=function(){if(ObjectDumperNode.__super__.readOpts.call(this),this.setData(this._data),this.__info=this.getInfoFromData(this.getData()),"root"===this._key&&(this.children=this.getNodesFromData(this.getData())),!this.isLeaf()&&this._do_open)return this.do_open=!0},ObjectDumperNode.prototype.setData=function(n){if(this._parse_json&&L.util.isString(n))try{this.__data=JSON.parse(n),L.util.isString(this.__data)&&(this.__data=n)}catch(b){this.__data=n}else this.__data=n;return this},ObjectDumperNode.prototype.getData=function(){return this.__data},ObjectDumperNode.prototype.getChildren=function(){return this.getNodesFromData(this.getData())},ObjectDumperNode.prototype.isLeaf=function(){return!this.__info.has_children},ObjectDumperNode.prototype.renderContent=function(){var n,b;return!this.isLeaf()&&this.isOpen()||(n=new L.Label({text:this.__info.text,text_node_func:(b=this,function(){return"String"===!b.__info.cls?b.__info.text:L.Label.parseLinks(b.__info.text)}),multiline:!0}),L.dom.setAttribute(n,"data-type",this.__info.cls),this.addColumn(new L.ListViewColumn({class:"cui-object-dumper-node-value",element:n}))),new L.Label({class:"cui-object-dumper-node-key",text:this._key,multiline:!0})},ObjectDumperNode.prototype.getClass=function(){return ObjectDumperNode.__super__.getClass.call(this)+" cui-object-dumper-node-"+this.__info.cls.toLowerCase()},ObjectDumperNode.prototype.getInfoFromData=function(n){var b;return b={},void 0===n?(b.cls="undefined",b.text="undefined"):null===n?(b.cls="null",b.text="null"):!0===n?(b.cls="boolean",b.text="true"):!1===n?(b.cls="boolean",b.text="false"):"number"==typeof n&&isNaN(n)?(b.cls="NaN",b.text="NaN"):L.util.isNumber(n)?(b.cls="number",b.text=""+n):L.util.isString(n)?(b.cls="string",b.text=n):(b.cls=L.util.getObjectClass(n),L.util.isArray(n)||L.util.isPlainObject(n)?(b.has_children=!L.util.isEmptyObject(n),L.util.isArray(n)&&(b.text=b.cls+" ["+n.length+"]"),L.util.isPlainObject(n)&&(b.text=b.cls+" {"+Object.keys(n).length+"}")):(b.has_children=!0,b.text=b.cls)),b},ObjectDumperNode.prototype.getNodesFromData=function(n){var b,A,R,D,B,E,X,$,V;if(X=[],"Array"===this.getInfoFromData(n).cls)for(A=b=0,$=n.length;0<=$?b<$:b>$;A=0<=$?++b:--b)X.push(new L.ObjectDumperNode({key:A,data:n[A],do_open:this._do_open,parse_json:this._parse_json}));else{for(D in B=[],n)B.push(D);for(B.sort((function(n,b){return n.localeCompare(b)})),R=0,E=B.length;R{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1648)),L.Options=function(n){function Options(n){Options.__super__.constructor.call(this,n),this._sortable&&L.dom.addClass(this.DOM,"cui-options--sortable")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Options,n),Options.prototype.initOpts=function(){return Options.__super__.initOpts.call(this),this.addOpts({radio:{check:function(n){return L.util.isString(n)||L.util.isBoolean(n)}},radio_unchecked_value:{default:!1},min_checked:{check:function(n){return this._radio?0===n||1===n:L.util.isInteger(n)&&n>=0}},options:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},horizontal:{check:function(n){if(L.util.isBoolean(n)||L.util.isInteger(n)&&n>0)return!0}},title:{check:String},hint:{check:String},activatable:{check:Boolean},sortable:{check:Boolean},sortable_hint:{check:String},placeholder:{default:"No options available.",check:String},columns:{check:function(n){if(L.util.isInteger(n)&&n<=12)return!0},default:1}})},Options.prototype.readOpts=function(){return Options.__super__.readOpts.call(this),L.util.assert(!this._sortable||!this._left,"new CUI.Options","opts.sortable and opts.left cannot be used together.",{opts:this.opts}),L.util.assert(!this._sortable||!this._radio,"new CUI.Options","opts.sortable and opts.radio cannot be used together.",{opts:this.opts}),L.util.assert(!this._sortable||!this.opts.horizontal,"new CUI.Options","opts.sortable and opts.horizontal cannot be used together.",{opts:this.opts}),void 0===this.opts.horizontal&&(this._horizontal=!this._sortable),this._sortable&&void 0===this._activatable&&(this._activatable=!0),L.util.assert(!(this._sortable&&!this._activatable),"new CUI.Options","opts.sortable needs opts.activatable to be set.",{opts:this.opts})},Options.prototype.getTemplate=function(){return this._activatable?this.__tmpl=new L.Template({name:"options-activatable",map_prefix:"cui-options",map:{top:!0,bottom:!0,active:!0,inactive:!0}}):this.__tmpl=new L.Template({name:"options",map:{top:!0,bottom:!0,center:!0}})},Options.prototype.init=function(){switch(this._radio){case!1:this.__radio=void 0;break;case!0:this.__radio="options--"+this.getUniqueId();break;default:this.__radio=this._radio}return this.__options_data={}},Options.prototype.setData=function(n){return Options.__super__.setData.call(this,n),this._radio&&(L.util.isArray(this.getValue())?this.__radio_use_array=!0:this.__radio_use_array=!1),this.__setDataOnOptions(),this},Options.prototype.__setDataOnOptions=function(n){var b,A,L,R,D,B,E,X,$,V,K,Q,tt;if(null==n&&(n=!0),this.__checkboxes){if(n)for(A=0,D=(V=this.__checkboxes).length;A-1?this.__options_data[b.getName()]=X:this.__options_data[b.getName()]=$,n&&(this._check_changed&&JSON.parse(this.getCheckChangedValue()).indexOf(X)>-1?b.setCheckChangedValue(X):b.setCheckChangedValue($));return this}},Options.prototype.disableOption=function(n){return this.__getOptionByValue(n).indeterminate&&this.removeIndeterminate(n),this.__getCheckboxByValue(n).disable(),this},Options.prototype.enableOption=function(n){return this.__getOptionByValue(n).indeterminate&&this.removeIndeterminate(n),this.__getCheckboxByValue(n).enable(),this},Options.prototype.setIndeterminate=function(n){var b;return b=this.__getCheckboxByValue(n),this.__getOptionByValue(n).indeterminate=!0,b.setIndeterminate(),this},Options.prototype.removeIndeterminate=function(n){return this.__getOptionByValue(n).indeterminate=!1,this.__getCheckboxByValue(n).removeIndeterminate(),this},Options.prototype.isOptionIndeterminateByValue=function(n){return this.__getCheckboxByValue(n).isIndeterminate()},Options.prototype.__getCheckboxByValue=function(n){var b,A,R,D,B;for(b=null,R=A=0,D=(B=this.__options).length;AL?1:0})),ot=[],E=0,V=K.length;E1&&this.addClass("cui-options--columns-"+this._columns),this._activatable?(this.empty("active"),this.empty("inactive")):this.empty("center"),K=0,tt=(rt=this.__checkboxes).length;K0&&b.setTextMaxChars(this.__maxChars),this._sortable&&b.isActive()?(D=L.dom.element("DIV",{class:"cui-options-sortable-option"}),A=L.dom.element("DIV",{class:"cui-options-sortable-drag-handle"}),R=L.dom.element("DIV",{class:"cui-drag-handle-row"}),A.appendChild(R),D.appendChild(A),D.appendChild(b.DOM)):D=b.DOM,this._activatable?b.isActive()?this.append(D,"active"):this.append(D,"inactive"):this.append(D,"center");pt=this.__tmpl.map.active,this._sortable&&new L.Sortable({axis:"y",element:pt,selector:".cui-options-sortable-drag-handle",sorted:function(n){return function(b,A,R){var D;return L.util.moveInArray(A,R,n.__options_order,A{var L=A(7288),R={}.hasOwnProperty;L.Output=function(n){function Output(){return Output.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Output,n),Output.prototype.initOpts=function(){return Output.__super__.initOpts.call(this),this.addOpts({placeholder:{default:"",check:String},text:{check:String},markdown:{mandatory:!0,default:!1,check:Boolean},getValue:{check:Function},multiline:{check:Boolean,default:!0,mandatory:!0},allow_delete:{mandatory:!0,default:!1,check:Boolean}})},Output.prototype.readOpts=function(){var n,b,A,L;for(Output.__super__.readOpts.call(this),n=0,A=(L=["undo_support","check_changed","mark_changed"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.OutputContent=function(n){function OutputContent(){return OutputContent.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(OutputContent,n),OutputContent.prototype.initOpts=function(){return OutputContent.__super__.initOpts.call(this),this.addOpts({placeholder:{default:"",check:String},content:{check:function(n){return L.util.isElement(n)||L.util.isElement(n.DOM)}},getValue:{check:Function}})},OutputContent.prototype.setContent=function(n){return null==n&&(n=null),n?(L.dom.removeClass(this.DOM,"cui-output-empty"),this.replace(n)):(L.dom.addClass(this.DOM,"cui-output-empty"),this.empty())},OutputContent.prototype.displayValue=function(){return OutputContent.__super__.displayValue.call(this),this.getName()&&this.setContent(this.getValue()),this},OutputContent.prototype.getValue=function(){var n;return n=OutputContent.__super__.getValue.call(this),this._getValue?this._getValue.call(this,n,this):n},OutputContent.prototype.render=function(){return OutputContent.__super__.render.call(this),this.setContent(this._content)},OutputContent}(L.DataFieldInput)},2459:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.LayerPane=function(n){function LayerPane(n){LayerPane.__super__.constructor.call(this,n),this.setPane(this._pane)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(LayerPane,n),LayerPane.prototype.initOpts=function(){return LayerPane.__super__.initOpts.call(this),this.addOpts({pane:{mandatory:!0,default:new L.SimplePane,check:function(n){return n instanceof L.Pane||L.util.isPlainObject(n)}}})},LayerPane.prototype.getPane=function(){return this.__pane},LayerPane.prototype.setPane=function(n){return L.util.isPlainObject(n)?this.__pane=new L.SimplePane(n):this.__pane=n,this.__pane.hasHeader()&&this.__layer_root.DOM.classList.add("cui-pane--has-header"),this.__pane.hasFooter()&&this.__layer_root.DOM.classList.add("cui-pane--has-footer"),this.__pane.addClass("cui-layer-pane"),L.Layer.prototype.replace.call(this,this.__pane)},LayerPane.prototype.destroy=function(){return this.__pane.destroy(),LayerPane.__super__.destroy.call(this)},LayerPane}(L.Layer)},6110:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1682)),L.Pane=function(n){function Pane(){return Pane.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Pane,n),Pane.defaults={button_tooltip:{text:"Turn fullscreen on / off"}},Pane.prototype.__init=function(){if(Pane.__super__.__init.call(this),this.addClass("cui-pane"),this.__fill_screen_is_on=!1,this._padded)return this.addClass("cui-pane--padded")},Pane.prototype.initOpts=function(){return Pane.__super__.initOpts.call(this),this.addOpts({padded:{check:Boolean,default:!1}})},Pane.prototype.readOpts=function(){return this.initDefaultPanes(),Pane.__super__.readOpts.call(this)},Pane.prototype.hasHeader=function(){return!!this._top},Pane.prototype.hasFooter=function(){return!!this._bottom},Pane.prototype.getFillScreenState=function(){return this.__fill_screen_is_on},Pane.prototype.endFillScreen=function(n){var b,A;if(null==n&&(n=!0),this.getFillScreenState())return this.__fill_screen_is_on=!1,L.util.$elementIsInDOM(this.__placeholder)?(A=this,b=function(){var n;return L.dom.insertBefore(A.__placeholder,A.DOM),(n=L.dom.data(L.dom.parent(A.__placeholder),"element"))instanceof L.Popover&&n.setVisible(!0),L.dom.remove(A.__placeholder),A.__fillscreenTmpl.destroy(),delete A.__fillscreenTmpl,L.Events.trigger({type:"end-fill-screen",node:A.DOM}),L.Events.trigger({type:"viewport-resize",node:A.DOM})},n?(L.Events.wait({type:"transitionend",node:this.__fillscreenTmpl}).always((function(){return b()})),this.__fillscreenTmpl.removeClass("cui-pane-fill-screen-is-on")):b()):(this.__fillscreenTmpl.destroy(),this.__placeholder=null),this},Pane.prototype.startFillScreen=function(){var n,b,A,R,D,B,E,X,$,V,K,Q,tt;if(!this.getFillScreenState()){for(document.body.style.setProperty("--layer-sidebar-width",L.dom.getLayerSidebarWidth()+"px"),this.__fillscreenTmpl=new L.Template({name:"pane-fill-screen",map:{inner:!0}}),V=L.dom.getRect(this.DOM),tt=L.dom.getDimensions(window),this.__placeholderTmpl=new L.Template({name:"pane-fill-screen-placeholder"}),this.__placeholder=this.__placeholderTmpl.DOM,B=this.__fillscreenTmpl.map.inner,L.dom.append(document.body,this.__fillscreenTmpl.DOM),A=L.dom.getDimensions(this.__fillscreenTmpl.DOM),n={left:(R=L.dom.getDimensions(B)).clientBoundingRect.left-A.clientBoundingRect.left+R.borderLeft+R.paddingLeft,top:R.clientBoundingRect.top-A.clientBoundingRect.top+R.borderTop+R.paddingTop,right:A.clientBoundingRect.right-R.clientBoundingRect.right+R.borderRight+R.paddingRight,bottom:A.clientBoundingRect.bottom-R.clientBoundingRect.bottom+R.borderBottom+R.paddingBottom},Q={top:V.top-n.top,left:V.left-n.left,bottom:tt.height-V.bottom-n.bottom,right:tt.width-V.right-n.right},L.dom.remove(this.__fillscreenTmpl.DOM),L.dom.setStyle(this.__fillscreenTmpl.DOM,Q),L.dom.append(document.body,this.__fillscreenTmpl.DOM),L.dom.setStyle(this.__placeholder,{width:L.dom.getDimensions(this.DOM).marginBoxWidth,height:L.dom.getDimensions(this.DOM).marginBoxHeight}),D=0,X=(K=["position","top","left","right","bottom"]).length;D{var L=A(7288),R={}.hasOwnProperty;L.PaneFooter=function(n){function PaneFooter(){return PaneFooter.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneFooter,n),PaneFooter.prototype.init=function(){return PaneFooter.__super__.init.call(this),this.addClass("cui-pane-footer")},PaneFooter}(L.Toolbar)},9523:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.PaneHeader=function(n){function PaneHeader(){return PaneHeader.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneHeader,n),PaneHeader.prototype.init=function(){return PaneHeader.__super__.init.call(this),this.addClass("cui-pane-header")},PaneHeader}(L.Toolbar)},5101:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.PaneToolbar=function(n){function PaneToolbar(){return PaneToolbar.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(PaneToolbar,n),PaneToolbar.prototype.init=function(){return PaneToolbar.__super__.init.call(this),this.addClass("cui-pane-toolbar")},PaneToolbar}(L.Toolbar)},844:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.SimplePane=function(n){function SimplePane(){return SimplePane.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(SimplePane,n),SimplePane.prototype.__init=function(){var n,b,A,R,D;for(SimplePane.__super__.__init.call(this),n=0,A=(R=["header_left","header_center","header_right","footer_left","footer_center","footer_right"]).length;n{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(604)),L.Panel=function(n){function Panel(n){var b,A;Panel.__super__.constructor.call(this,n),this.panel=new L.Template({name:"panel",map:{header:!0,content:!0}}),this.registerTemplate(this.panel),this._ui&&(L.dom.setAttribute(this.panel.get("header"),"ui",this._ui+":header"),L.dom.setAttribute(this.panel.get("content"),"ui",this._ui+":content")),this._content_placeholder&&(this.append(this._content_placeholder,"content"),this.__has_placeholder=!0),L.util.isFunction(this._content)?this._load_on_open||this.loadContent():this._content&&this.append(this._content,"content"),this.__activations=0,this.button=new L.Button({text:this._text,class:"cui-panel-header-button",radio:this._radio,radio_allow_null:this._radio_allow_null,icon_active:this._icon_opened,icon_inactive:this._icon_closed,onActivate:(A=this,function(n,b,L){return A.__activations++,1===A.__activations&&"function"==typeof A._onFirstActivate&&A._onFirstActivate(A,b,L),A.__open(!b.initial_activate),!b.initial_activate&&A._save_state&&A.__save_state(!0),"function"==typeof A._onActivate?A._onActivate(n,b,L):void 0}),onDeactivate:function(n){return function(b,A,L){return n.__close(!A.initial_activate),!A.initial_activate&&n._save_state&&n.__save_state(!1),"function"==typeof n._onDeactivate?n._onDeactivate(b,A,L):void 0}}(this)}),this.append(this.button,"header"),this._save_state&&void 0!==(b=this.__get_saved_state())&&(this._closed=!b),this._closed?this.button.deactivate():this.button.activate()}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Panel,n),Panel.defaults={arrow_down:"fa-chevron-down",arrow_right:"fa-chevron-right"},Panel.prototype.initOpts=function(){return Panel.__super__.initOpts.call(this),this.addOpts({text:{mandatory:!0,check:String},content:{check:function(n){return L.util.isContent(n)||L.util.isString(n)}},content_placeholder:{check:function(n){return L.util.isContent(n)}},load_on_open:{check:Boolean},radio:{default:"panel-switcher",check:function(n){return L.util.isString(n)||!0===n}},radio_allow_null:{default:!0,mandatory:!0,check:Boolean},closed:{default:!0,check:Boolean},icon_opened:{default:L.defaults.class.Panel.defaults.arrow_down,check:String},icon_closed:{default:L.defaults.class.Panel.defaults.arrow_right,check:String},footer_right:{},footer_left:{},onFirstActivate:{check:Function},onActivate:{check:Function},onDeactivate:{check:Function},save_state:{check:String}})},Panel.prototype.readOpts=function(){return Panel.__super__.readOpts.call(this),this},Panel.prototype.isClosed=function(){return L.dom.hasClass(this.DOM,"cui-panel-closed")},Panel.prototype.isOpen=function(){return!this.isClosed()},Panel.prototype.__get_saved_state=function(){return(L.getLocalStorage("panels_state")||{})[this._save_state]},Panel.prototype.__save_state=function(n){var b;if(this._save_state)return(b=L.getLocalStorage("panels_state")||{})[this._save_state]=n,L.setLocalStorage("panels_state",b)},Panel.prototype.open=function(){return this.button.activate(),this},Panel.prototype.close=function(){return this.button.deactivate(),this},Panel.prototype.__close=function(n){return null==n&&(n=!0),L.dom.addClass(this.DOM,"cui-panel-closed"),n&&L.Events.trigger({type:"content-resize",node:this.DOM}),this},Panel.prototype.__open=function(n){var b,A;return null==n&&(n=!0),A=this,b=function(){L.dom.removeClass(A.DOM,"cui-panel-closed"),n&&L.Events.trigger({type:"content-resize",node:A.DOM})},this._load_on_open&&!this.__content_loaded?this.loadContent().done(b):b(),this},Panel.prototype.loadContent=function(){var n,b,A;return b=L.util.isFunction(this._content)?this._content(this):this._content,n=new L.Deferred,L.util.isPromise(b)?b.always((A=this,function(b){return A.setContent(b),n.resolve()})):(this.setContent(b),n.resolve()),this.__content_loaded=!0,n.promise()},Panel.prototype.setContent=function(n,b){return null==b&&(b="content"),!1===n&&this._content_placeholder||(this.__has_placeholder=!1,this.replace(n,b)),this},Panel.prototype.appendContent=function(n,b){return null==b&&(b="content"),this.__has_placeholder?this.setContent(n,b):this.append(n,b),this},Panel}(L.DOMElement),L.defaults.class.Panel=L.Panel},3736:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Password=function(n){function Password(){return Password.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Password,n),Password.prototype.initOpts=function(){return Password.__super__.initOpts.call(this),this.addOpts({toggleButton:{default:!1,check:Boolean}})},Password.prototype.readOpts=function(){if(Password.__super__.readOpts.call(this),this._toggleButton)return this._controlElement=new L.Button({icon:"fa-eye",onClick:(n=this,function(b,A){return"password"===L.dom.getAttribute(n.__input,"type")?(A.setIcon("fa-eye-slash"),n.showPassword()):(A.setIcon("fa-eye"),n.hidePassword())})});var n},Password.prototype.__createElement=function(){return Password.__super__.__createElement.call(this,"password")},Password.prototype.showPassword=function(){return L.dom.setAttribute(this.__input,"type","text")},Password.prototype.hidePassword=function(){return L.dom.setAttribute(this.__input,"type","password")},Password}(L.Input)},1104:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Popover=function(n){function Popover(){return Popover.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Popover,n),Popover.prototype.initOpts=function(){return Popover.__super__.initOpts.call(this),this.mergeOpt("placement",{default:null}),this.mergeOpt("pointer",{default:"arrow"})},Popover.prototype.readOpts=function(){var n;if(Popover.__super__.readOpts.call(this),!(null!=(n=this.opts.backdrop)?n.policy:void 0))return this._backdrop.policy="click-thru"},Popover.prototype.knownPlacements=["s","e","w","ws","wn","n","se","ne","es","en","nw","sw"],Popover.prototype.forceFocusOnShow=function(){return!1},Popover}(L.Modal)},9840:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0||"number"==typeof n&&n>=0&&n<=100},ProgressMeter.prototype.initOpts=function(){var n,b,A,R,D,B;for(ProgressMeter.__super__.initOpts.call(this),this.opts.states||(this.opts.states=Object.keys(L.defaults.ProgressMeter.states)),this.addOpts({states:{check:Array},state:{check:(B=this,function(n){return B.__checkState(n)})},css_property_percent:{default:"width",check:String},size:{default:"auto",mandatory:!0,check:["auto","mini","normal","big"]},appearance:{default:"auto",mandatory:!0,check:["auto","normal","important"]},onUpdate:{check:Function}}),R=[],n=0,b=(A=this.opts.states).length;n=0?("spinning2"===this.__state?this.__meter.replace(this.getAnimatedHourglassIcon(),"icon"):(A=this["_icon_"+this.__state])instanceof L.Icon?this.__meter.replace(A,"icon"):L.util.isEmpty(A)?this.__meter.empty("icon"):this.__meter.replace(new L.Icon({icon:A}),"icon"),this.__meter.DOM.setAttribute("state",this.__state),this.__meter.empty("text"),(b={})[this._css_property_percent]=""):(this.__meter.DOM.setAttribute("state","percent"),this.__meter.empty("icon"),this.__meter.replace(Math.round(this.__state)+"%","text"),(b={})[this._css_property_percent]=this.__state+"%"),L.dom.setStyle(this.__meter.map.fill,b),null!=(B=this._onUpdate)&&B.call(this,this),this},ProgressMeter.prototype.getAnimatedHourglassIcon=function(){var n,b,A,R,D,B;for(b=["fa-hourglass-start","fa-hourglass-half","fa-hourglass-end","fa-hourglass-end","fa-hourglass-o"],n=L.dom.div("cui-hourglass-animation fa-stack"),D=0,B=b.length;D{var L=A(7288),R={}.hasOwnProperty;L.Select=function(n){function Select(){return Select.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Select,n),Select.defaults={not_found:"- not found -"},Select.prototype.initOpts=function(){return Select.__super__.initOpts.call(this),this.addOpts({empty_text:{check:String},not_found_text:{default:L.Select.defaults.not_found,check:String},options:{mandatory:!0,check:function(n){return L.util.isArray(n)||L.util.isFunction(n)}},group:{check:String},onShow:{check:Function},onHide:{check:Function},menu_class:{check:String},onScrollToBottom:{check:Function}})},Select.prototype.init=function(){if(this.__value=null,!L.util.isFunction(this._options))return this.__loadOptions()},Select.prototype.disable=function(n){return this.__wasAutomaticDisabled=null!=n&&n,Select.__super__.disable.call(this)},Select.prototype.isDisabled=function(){return!this.__wasAutomaticDisabled&&Select.__super__.isDisabled.call(this)},Select.prototype.enableOption=function(n){var b;if(b=this.__getOptionByValue(n))return b.disabled=!1,this.displayValue()},Select.prototype.disableOption=function(n){var b;if(b=this.__getOptionByValue(n))return b.disabled=!0,this.displayValue()},Select.prototype.__getOptionByValue=function(n){var b,A,L,R;for(b=0,A=(R=this.getOptions()).length;b-20)return null!=(L=b._onScrollToBottom)?L.apply(b,arguments):void 0})})},Select.prototype.getDefaultValue=function(){return this.default_opt?this.default_opt.value:void 0},Select.prototype.getValue=function(){return this.hasData()?Select.__super__.getValue.call(this):this.__value},Select.prototype.checkValue=function(n,b){return!0},Select.prototype.reload=function(){return L.util.isFunction(this._options)&&this.__loadOptions(),Select.__super__.reload.call(this)},Select.prototype.storeValue=function(n,b){return this.hasData()?Select.__super__.storeValue.call(this,n,b):this.__value=n,this},Select.prototype.displayValue=function(){var n;return L.DataFieldInput.prototype.displayValue.call(this),L.util.isFunction(this._options)&&!this.__optionsPromise&&this.__loadOptions(),this.__optionsPromise.done((n=this,function(){return n.__displayValue()})),this},Select.prototype.__displayValue=function(){var n,b,A,R,D,B,E,X,$,V;for(n=null,D=null,A=b=0,R=(E=this.__options).length;bD&&(D=null!=($=B.text)?$.length:void 0);return n?(n.icon?n.icon instanceof L.Icon?this.__checkbox.setIcon(n.icon.copy()):this.__checkbox.setIcon(n.icon):this.__checkbox.setIcon(null),V=n.text_selected||n.text,this.__checkbox.menuSetActiveIdx(n._idx)):(V=null!==this.getValue()||L.util.isEmpty(this._empty_text)?this._not_found_text.trim()+" "+this.getValue():this._empty_text,this.__checkbox.menuSetActiveIdx(-1)),this.__checkbox.setText(V),(null!=V?V.length:void 0)>D&&(D=V.length),this.__checkbox.setTextMaxChars(D)},Select.prototype.render=function(){var n;if(Select.__super__.render.call(this),n=this.getButton())return L.Events.listen({type:"keydown",node:this.DOM,capture:!0,call:function(b){var A;"Up"!==(A=b.getKeyboardKey())&&"Down"!==A||(n.onClickAction(b),b.stopPropagation())}})},Select.prototype.getOptions=function(){return this.__options},Select.prototype.reloadMenu=function(n){return null==n&&(n=!1),this.getButton().getMenu().reload(n)},Select.newSelectOrOutput=function(n){var b;return 1===n.options.length?(b={form:n.form,text:n.options[0].text,ui:n.ui},new L.Output(b)):new L.Select(n)},Select}(L.Checkbox),L.defaults.class.Select=L.Select},3848:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(1588)),L.Slider=function(n){function Slider(){return Slider.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Slider,n),Slider.prototype.initOpts=function(){return Slider.__super__.initOpts.call(this),this.addOpts({value:{check:function(n){return L.util.isInteger(n)}},min:{mandatory:!0,default:0,check:function(n){return L.util.isInteger(n)}},max:{mandatory:!0,default:100,check:function(n){return L.util.isInteger(n)}},onDragstart:{check:Function},onDragging:{check:Function},onDrop:{check:Function},onUpdate:{check:Function}})},Slider.prototype.readOpts=function(){return Slider.__super__.readOpts.call(this),this.__distance=this._max-this._min,L.util.assert(this.__distance>1,"new CUI.Slider","opts.min and opts.max need to be at least 2 apart."),this.__value=this.getDefaultValue()},Slider.prototype.getTemplate=function(){return this.__slider=new L.Template({name:"slider",map:{track:!0,track_visual:!0,handle:!0}})},Slider.prototype.initDimensions=function(){return this.__track_dim=L.dom.getDimensions(this.__track),this.__handle_dim=L.dom.getDimensions(this.__handle),this.__track_available={width:this.__track_dim.contentBoxWidth-this.__handle_dim.borderBoxWidth/2,height:this.__track_dim.contentBoxHeight-this.__handle_dim.borderBoxHeight/2}},Slider.prototype.render=function(){var n;return Slider.__super__.render.call(this),this.__handle=this.__slider.map.handle,this.__track=this.__slider.map.track,new L.Draggable({element:this.__handle,helper:null,dragstart:(n=this,function(b,A){return n.initDimensions(),n.addClass("cui-slider--dragging"),n.__last_diff_x=0,n.__start_value=n.__value,"function"==typeof n._onDragstart?n._onDragstart(n,n.__start_value):void 0}),dragstop:function(n){return function(){return n.setValue(n.__start_value),n.removeClass("cui-slider--dragging"),"function"==typeof n._onDrop?n._onDrop(n):void 0}}(this),dragend:function(n){return function(){return n.removeClass("cui-slider--dragging"),"function"==typeof n._onDrop?n._onDrop(n):void 0}}(this),dragging:function(n){return function(b,A){var L,R,D,B;return L=A.dragDiff.bare_x-n.__last_diff_x,n.__last_diff_x=A.dragDiff.bare_x,R=n.__track_available.width/n.__distance,B=(D=A.dragDiff.bare_y/5)>1?Math.min(1,R*D):R,n.setValue(n.__value+L/B),"function"==typeof n._onDragging?n._onDragging(n,n.getValue()):void 0}}(this)}),L.Events.listen({type:"click",node:this.__slider.map.track_visual,call:function(n){return function(b){var A,L;n.initDimensions(),L=n.__track_dim.clientBoundingRect.left,A=b.getNativeEvent().clientX,n.setValue((A-L)/n.__track_available.width*n.__distance)}}(this)})},Slider.prototype.getValue=function(){return this.hasData()?Slider.__super__.getValue.call(this):this.__value},Slider.prototype.getHandle=function(){return this.__slider.map.handle},Slider.prototype.setValue=function(n,b){var A;return null==b&&(b={}),A=Math.round(Math.min(Math.max(this._min,n),this._max)),this.__value=A,void 0===b.no_trigger&&(b.no_trigger=!1),Slider.__super__.setValue.call(this,this.__value,b),this},Slider.prototype.getDefaultValue=function(){return void 0===this._value?this._min:this._value},Slider.prototype.displayValue=function(){var n;return n=this.getValue()/this._max*100,L.dom.setStyle(this.__handle,{left:n+"%"}),L.dom.setStyle(this.__slider,{"--slider-distance":n+"%"}),"function"==typeof this._onUpdate?this._onUpdate(this,this.getValue()):void 0},Slider.prototype.checkValue=function(n,b){if(nthis._max)throw new L.CheckValueError("value needs to be between "+this._min+" and "+this._max);return this},Slider}(L.DataField)},3218:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(5130)),L.StickyHeader=function(n){function StickyHeader(n){StickyHeader.__super__.constructor.call(this,n),this.header=new L.Template({name:"sticky-header",map:{center:!0}}),this.registerTemplate(this.header),this.addClass("cui-sticky-header-level-"+this._level),L.util.isEmpty(this._text)?this.replace(this._content,"center"):this.replace(L.dom.text(this._text),"center"),this._control.addStickyHeader(this)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(StickyHeader,n),StickyHeader.prototype.initOpts=function(){return StickyHeader.__super__.initOpts.call(this),this.addOpts({control:{mandatory:!0,check:L.StickyHeaderControl},text:{check:String},content:{},level:{default:0,check:function(n){return 0===n||1===n||2===n}}})},StickyHeader.prototype.getLevel=function(){return this._level},StickyHeader}(L.DOMElement)},8159:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.StickyHeaderControl=function(n){function StickyHeaderControl(n){var b,A;StickyHeaderControl.__super__.constructor.call(this,n),null!=(b=L.dom.data(this._element,"stickyHeaderControl"))&&b.destroy(),L.dom.data(this._element,"stickyHeaderControl",this),this.__control=L.dom.div("cui-sticky-header-control"),L.Events.listen({instance:this,type:"viewport-resize",node:this._element,call:(A=this,function(){return A.__positionControl()})}),this.__positionControl(),L.dom.append(this._element,this.__control),this.headers=[],this.newStickyHeaders=[],this.__hiddenHeaders=[],this.__positioned=!1,L.Events.listen({node:this._element,type:"scroll",instance:this,call:function(n){return function(b){n.position()}}(this)})}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(StickyHeaderControl,n),StickyHeaderControl.prototype.initOpts=function(){return StickyHeaderControl.__super__.initOpts.call(this),this.addOpts({element:{mandatory:!0,check:function(n){return L.util.isElement(n)}}})},StickyHeaderControl.prototype.__positionControl=function(){var n;n=L.dom.getDimensions(this._element),L.dom.setStyle(this.__control,{left:n.clientBoundingRect.left,top:n.clientBoundingRect.top}),L.dom.setDimension(this.__control,"marginBoxWidth",n.clientWidth)},StickyHeaderControl.prototype.isInDOM=function(){return this.__control&&L.dom.isInDOM(this.__control)},StickyHeaderControl.prototype.addStickyHeader=function(n){return L.util.assert(!this.__positioned||L.dom.isInDOM(this.__control),this.__cls+".addStickyHeader","StickyHeaderControl is not in DOM tree anymore. Cannot add a new CUI.StickyHeader."),L.util.assert(n instanceof L.StickyHeader,this.__cls+".addStickyHeader","Needs to be instance of StickyHeader but is "+L.util.getObjectClass(n),{stickyHeader:n}),this.newStickyHeaders.push(n)},StickyHeaderControl.prototype.initNewStickyHeaders=function(){var n,b,A,R,D,B,E,X,$;for(E=[],A=0,D=($=this.newStickyHeaders).length;A{var L=A(7288),R={}.hasOwnProperty;L.Table=function(n){function Table(n){var b,A,R,D,B,E,X,$,V,K,Q,tt;if(Table.__super__.constructor.call(this,n),b=[],"mini"===this._size&&b.push("cui-table--mini"),this._class&&b.push(this._class),this._flex&&b.push("cui-table--flex"),this._bordered&&b.push("cui-table--bordered"),this.__table=L.dom.table(b.join(" ")),this.registerDOMElement(this.__table,!1),L.Layout.prototype.maximizeAddClasses.call(this),this._header){for(R=L.dom.tr("cui-table-header"),D=0,E=($=this.__columns).length;D{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(3081)),L.Tabs=function(n){function Tabs(){return Tabs.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Tabs,n),Tabs.defaults={overflow_button_tooltip:null},Tabs.prototype.initOpts=function(){return Tabs.__super__.initOpts.call(this),this.removeOpt("header_center"),this.removeOpt("content"),this.removeOpt("force_footer"),this.removeOpt("force_header"),this.addOpts({tabs:{mandatory:!0,check:function(n){return L.util.isArray(n)&&n.length>0}},active_idx:{check:"Integer"},appearance:{check:["normal","mini"]},orientation:{check:["vertical","horizontal"],mandatory:!0,default:"horizontal"},onActivate:{check:Function},onDeactivate:{check:Function}})},Tabs.prototype.forceHeader=function(){return!0},Tabs.prototype.forceFooter=function(){return!0},Tabs.prototype.__checkOverflowButton=function(){var n,b;if(this.__maximize_horizontal)return(n=L.dom.getDimensions(this.__header)).scrollWidth>n.clientWidth?(this.__overflowBtn.show(),L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header--overflow"),this.__dragscroll=new L.Dragscroll({element:this.__buttonbar.DOM,scroll_element:this.__header})):(null!=(b=this.__dragscroll)&&b.destroy(),this.__dragscroll=null,this.__overflowBtn.hide(),L.dom.removeClass(this.__pane_header.DOM,"cui-tabs-pane-header--overflow")),this},Tabs.prototype.init=function(){var n,b,A,R,D,B,E,X;for(Tabs.__super__.init.call(this),this.__tabs_bodies=new L.Template({name:"tabs-bodies"}),L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header"),"mini"===this._appearance&&L.dom.addClass(this.__pane_header.DOM,"cui-tabs-pane-header--mini"),this.removeClass("cui-pane--padded"),this._padded&&this.addClass("cui-tabs--padded"),this.addClass("cui-tabs--"+this._orientation),this.__buttonbar=new L.Buttonbar,D="center",this.__pane_header.append(this.__buttonbar,D),this.__header=this.__pane_header[D](),L.Events.listen({type:"scroll",node:this.__header,call:(X=this,function(n){var b;return b=L.dom.getDimensions(X.__header),L.dom.setClass(X.__pane_header.DOM,"cui-tabs-pane-header--scroll-at-end",b.horizontalScrollbarAtEnd),L.dom.setClass(X.__pane_header.DOM,"cui-tabs-pane-header--scroll-at-start",b.horizontalScrollbarAtStart)})}),this.__overflowBtn=new L.Button({icon:"ellipsis_h",class:"cui-tab-header-button-overflow",icon_right:!1,size:"mini"===this._appearance?"mini":void 0,tooltip:{text:L.Tabs.defaults.overflow_button_tooltip},menu:{items:function(n){return function(){var b,A,L,R,D;for(b=[],A=function(A){return b.push({text:A.getText(),active:A===n.getActiveTab(),onClick:function(){return A.activate()}})},L=0,R=(D=n.__tabs).length;L-1&&(b=n):b=this.__tabs[n];return b},Tabs.prototype.getActiveTabIdx=function(){return this.__tabs.indexOf(this.getActiveTab())},Tabs.prototype.getActiveTab=function(){return this.__active_tab},Tabs.prototype.activate=function(n){return this.getTab(n).activate(),this},Tabs.prototype.destroy=function(){for(;this.__tabs.length>0;)this.__tabs[0].destroy();return Tabs.__super__.destroy.call(this)},Tabs}(L.SimplePane)},7256:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Toolbar=function(n){function Toolbar(){return Toolbar.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Toolbar,n),Toolbar.prototype.init=function(){return Toolbar.__super__.init.call(this),this.addClass("cui-toolbar")},Toolbar.prototype.initOpts=function(){return Toolbar.__super__.initOpts.call(this),this.removeOpt("maximize"),this.removeOpt("maximize_horizontal"),this.removeOpt("maximize_vertical"),this.addOpts({maximize_horizontal:{default:!0,mandatory:!0,check:Boolean}})},Toolbar.prototype.hasFlexHandles=function(){return!1},Toolbar.prototype.getPanes=function(){return["left","right"]},Toolbar}(L.HorizontalLayout)},5328:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Tooltip=function(n){function Tooltip(n){var b;(Tooltip.__super__.constructor.call(this,n),L.util.assert(L.util.xor(this._text,this._content),"new "+this.__cls,"One of opts.text or opts.content must be set.",{opts:this.opts}),this.__dummyInst=function(){},this._on_hover)?(!0===this._on_hover||this._on_hover(this))&&(L.dom.addClass(this.__element,"cui-dom-element-has-tooltip-on-hover"),this.showTimeout()):this._on_click&&(L.dom.addClass(this.__element,"cui-dom-element-has-tooltip-on-click"),L.Events.listen({type:"click",instance:this.__dummyInst,node:this.__element,call:(b=this,function(n){n.hasModifierKey()||b.show()})}))}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(Tooltip,n),Tooltip.prototype.initOpts=function(){Tooltip.__super__.initOpts.call(this),this.mergeOpts({element:{mandatory:!0}}),this.addOpts({text:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)}},markdown:{mandatory:!0,default:!1,check:Boolean},content:{check:function(n){return L.util.isString(n)||L.util.isFunction(n)||L.util.isElement(n)||L.util.isArray(n)||L.util.isElement(null!=n?n.DOM:void 0)}},on_click:{mandatory:!0,default:!1,check:Boolean},on_hover:{check:function(n){return L.util.isBoolean(n)||L.util.isFunction(n)}}})},Tooltip.prototype.readOpts=function(){return this.opts.hasOwnProperty("on_hover")||(this.opts.on_hover=!this.opts.on_click),this.opts.on_click&&(this.opts.backdrop||(this.opts.backdrop={}),this.opts.backdrop.policy||(this.opts.backdrop.policy="click")),L.util.isUndef(this.opts.backdrop)&&(this.opts.backdrop=!1),this.opts.pointer="arrow",this.opts.check_for_element=!0,this.opts.placement=this.opts.placement||"n",Tooltip.__super__.readOpts.call(this),L.util.assert(!(this._on_click&&this._on_hover),"new CUI.Tooltip","opts.on_click and opts.on_hover cannot be used together.",{opts:this.opts}),this},Tooltip.current=null,Tooltip.prototype.setElement=function(){},Tooltip.prototype.focusOnHide=function(n){},Tooltip.prototype.focusOnShow=function(n){},Tooltip.prototype.showTimeout=function(){var n,b;return null!=(n=this.__mouseStillEvent)&&n.destroy(),this.__mouseStillEvent=new L.Events.MouseIsStill({ms:this._show_ms,node:this._element,call:(b=this,function(n){var A,R,D,B;return b.show(n),B=!1,D=!0,A=null,R=function(n){return L.clearTimeout(A),A=L.setTimeout({ms:b._hide_ms+100,call:function(){B||D||b.hide(n)}})},L.Events.listen({type:["mouseout","mouseenter"],capture:!0,node:b.DOM,call:function(n){(B="mouseenter"===n.getType())||R(n)}}),L.Events.listen({type:["mouseout","mouseenter"],capture:!0,node:b._element,call:function(n){(D="mouseenter"===n.getType())||R(n)}}),L.Events.listen({type:["click","dblclick"],capture:!0,node:b._element,only_once:!0,call:function(n){return L.setTimeout({ms:b._hide_ms,call:function(){return b.hide(n)}})}})})}),this.__mouseStillEvent},Tooltip.prototype.hide=function(){var n;return null!=(n=this.__keyUpListener)&&n.destroy(),Tooltip.__super__.hide.call(this)},Tooltip.prototype.show=function(n){var b;return this.__keyUpListener=L.Events.listen({type:"keyup",node:window,capture:!0,call:(b=this,function(n){"Esc"===n.getKeyboardKey()&&b.hide()})}),this.__static?Tooltip.__super__.show.call(this,n):this.fillContent().done(function(b){return function(){return Tooltip.__super__.show.call(b,n)}}(this)),this},Tooltip.prototype.getElementOpenClass=function(){return null},Tooltip.prototype.fillContent=function(){var n,b,A,R,D;return(n=new L.Deferred).fail((D=this,function(){if(!D.__pane.isDestroyed())return D.__pane.empty("center")})),A=function(A){return function(R){return L.util.isEmpty(R)?n.reject():b(new L.Label({markdown:A._markdown,text:R,multiline:!0}))}}(this),b=function(b){return function(A){return!A||b.__pane.isDestroyed()?n.reject():(L.dom.setAttribute(A,"role","tooltip"),b.__pane.replace(A,"center"),n.resolve())}}(this),L.util.isFunction(this._text)?(R=this._text.call(this,this),L.util.isPromise(R)?(R.done((function(n){return A(n)})),R.fail((function(){return n.reject()}))):A(R)):L.util.isFunction(this._content)?(R=this._content.call(this,this),L.util.isPromise(R)?(R.done((function(n){return b(n)})),R.fail((function(b){return n.reject(b)}))):b(R)):L.util.isEmpty(this._text)?b(this._content):A(this._text),L.util.isFunction(this._text)||L.util.isFunction(this._content)?this.__static=!1:this.__static=!0,n.promise()},Tooltip.prototype.preventOverflow=function(){return Tooltip.__super__.preventOverflow.call(this),L.dom.width(this.DOM,this.__layer_dim._css_width)},Tooltip.prototype.resetLayer=function(){return Tooltip.__super__.resetLayer.call(this),L.dom.setStyleOne(this.DOM,"max-width",this.__viewport.width/2)},Tooltip.prototype.destroy=function(){var n,b;return null!=(n=this.__keyUpListener)&&n.destroy(),null!=(b=this.__mouseStillEvent)&&b.destroy(),L.Events.ignore({instance:this.__dummyInst}),Tooltip.__super__.destroy.call(this),L.dom.removeClass(this.__element,"cui-dom-element-has-tooltip-on-hover cui-dom-element-has-tooltip-on-click")},Tooltip}(L.LayerPane)},3066:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty,D=[].indexOf||function(n){for(var b=0,A=this.length;b=0?"vertical-layout-top-center":D.call(n,"bottom")>=0?"vertical-layout-center-bottom":"vertical-layout-center"},VerticalLayout.prototype.getMapPrefix=function(){return"cui-vertical-layout"},VerticalLayout.prototype.hasFlexHandles=function(){var n,b;return!(!(null!=(n=this._top)?n.flexHandle:void 0)&&!(null!=(b=this._bottom)?b.flexHandle:void 0))},VerticalLayout.prototype.getPanes=function(){var n;return this.hasFlexHandles()?["top","bottom"]:(n=[],this._top&&n.push("top"),this._bottom&&n.push("bottom"),n)},VerticalLayout.prototype.getSupportedPanes=function(){return["top","bottom"]},VerticalLayout}(L.Layout)},9598:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.VerticalList=function(n){function VerticalList(){return VerticalList.__super__.constructor.apply(this,arguments)}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(VerticalList,n),VerticalList.prototype.initOpts=function(){return VerticalList.__super__.initOpts.call(this),this.mergeOpt("maximize",{default:!1}),this.removeOpt("center"),this.addOpts({content:{}})},VerticalList.prototype.readOpts=function(){return VerticalList.__super__.readOpts.call(this),this._center={content:this._content}},VerticalList.prototype.getSupportedPanes=function(){return[]},VerticalList}(L.VerticalLayout)},1824:(n,b,A)=>{var L=A(7288),R={}.hasOwnProperty;L.Template.loadTemplateText(A(560)),L.WaitBlock=function(n){function WaitBlock(n){WaitBlock.__super__.constructor.call(this,n),this._inactive&&L.dom.addClass(this.DOM,"cui-wait-block-inactive"),this._fullscreen&&L.dom.addClass(this.DOM,"cui-wait-block-fullscreen")}return function(n,b){for(var A in b)R.call(b,A)&&(n[A]=b[A]);function ctor(){this.constructor=n}ctor.prototype=b.prototype,n.prototype=new ctor,n.__super__=b.prototype}(WaitBlock,n),WaitBlock.prototype.initOpts=function(){return WaitBlock.__super__.initOpts.call(this),this.mergeOpt("icon",{check:function(n){return n instanceof L.Icon||L.util.isString(n)}}),this.removeOpt("header"),this.removeOpt("content"),this.addOpts({inactive:{check:Boolean},element:{check:function(n){return L.util.isElement(n)||L.util.isElement(n.DOM)}},fullscreen:{check:Boolean}})},WaitBlock.prototype.readOpts=function(){return WaitBlock.__super__.readOpts.call(this),L.util.assert(L.util.xor(this._element,this._fullscreen),"new CUI.WaitBlock","opts.element or opt.fullscreen needs to be set.",{opts:this.opts}),this._fullscreen?this.__element=document.body:this._element.DOM?this.__element=this._element.DOM:this.__element=this._element,this._inactive||this.opts.hasOwnProperty("icon")||(this._icon="spinner"),this.__shown=!1,this.__savedPosition=null,this},WaitBlock.prototype.getTemplateName=function(){return"wait-block"},WaitBlock.prototype.show=function(){return L.dom.isPositioned(this.__element)?this.__savedPosition=null:(this.__savedPosition=L.dom.getComputedStyle(this.__element).position,L.dom.setStyleOne(this.__element,"position","relative")),L.dom.addClass(this.__element.DOM,"cui-wait-block-active"),this._fullscreen,L.dom.append(this.__element,this.DOM),this.__shown=!0,this},WaitBlock.prototype.isShown=function(){return!!this.__shown},WaitBlock.prototype.hide=function(){return this.isShown()?(L.dom.remove(this.DOM),null!==this.__savedPosition&&L.dom.setStyleOne(this.__element,"position",this.__savedPosition),L.dom.removeClass(this.__element,"cui-wait-block-active"),this.__shown=!1,this.__savedPosition=null,this):this},WaitBlock.prototype.destroy=function(){return this.hide(),WaitBlock.__super__.destroy.call(this)},WaitBlock}(L.Block)},1395:(n,b,A)=>{var L;L=A(7288),A(5797),A(2707),A(5412),A(1852),A(1007),A(7199),A(3599),A(7343),A(320),A(8784),A(6814),A(5462),A(1051),A(1123),A(283),A(9328),A(8952),A(4339),A(3328),A(9892),A(3876),A(3740),A(2305),A(9628),A(9652),A(14),A(3986),A(674),A(4204),A(5982),A(1412),A(2734),A(2536),A(9248),A(5533),A(580),A(6286),A(1884),A(5563),A(6499),A(4276),A(3245),A(8147),A(9840),A(840),A(1824),A(1934),A(6820),A(5734),A(3066),A(9598),A(8986),A(7256),A(6110),A(2459),A(844),A(5101),A(9523),A(2389),A(4949),A(8126),A(6828),A(2136),A(1946),A(4802),A(5148),A(4553),A(8528),A(5698),A(1104),A(5328),A(7224),A(3764),A(8452),A(3307),A(6576),A(4669),A(7474),A(7227),A(5339),A(1993),A(9914),A(23),A(3325),A(4342),A(4473),A(4744),A(3696),A(1396),A(7752),A(3960),A(5370),A(5460),A(4708),A(7318),A(6760),A(6437),A(8644),A(6083),A(9172),A(9619),A(8533),A(9691),A(152),A(5682),A(8044),A(3890),A(7569),A(3736),A(8285),A(2864),A(2116),A(4016),A(8179),A(5558),A(3378),A(4168),A(4169),A(1240),A(3266),A(6800),A(7250),A(9064),A(9616),A(5860),A(2896),A(4682),A(4338),A(3218),A(8159),A(1144),A(6172),A(8200),A(9081),A(4126),A(4486),A(2827),A(3848),A(9316),A(309),A(8595),A(7816),A(8745),A(2295),A(7524),n.exports=L},6853:n=>{var b;b=class CoordinateNumber{constructor(n){n=this.normalizeCoordinateNumbers(n),this.sign=this.normalizedSignOf(n[0]),[this.degrees,this.minutes,this.seconds,this.milliseconds]=n.map(Math.abs)}normalizeCoordinateNumbers(n){var b,A,L,R,D;for(D=[0,0,0,0],A=L=0,R=n.length;L=0?1:-1}detectSpecialFormats(){if(this.degreesCanBeSpecial()){if(this.degreesCanBeMilliseconds())return this.degreesAsMilliseconds();if(this.degreesCanBeDegreesMinutesAndSeconds())return this.degreesAsDegreesMinutesAndSeconds();if(this.degreesCanBeDegreesAndMinutes())return this.degreesAsDegreesAndMinutes()}}degreesCanBeSpecial(){var n;return n=!1,this.minutes||this.seconds||(n=!0),n}degreesCanBeMilliseconds(){return this.degrees>909090}degreesAsMilliseconds(){return this.milliseconds=this.degrees,this.degrees=0}degreesCanBeDegreesMinutesAndSeconds(){return this.degrees>9090}degreesAsDegreesMinutesAndSeconds(){var n;return n=Math.floor(this.degrees/1e4),this.minutes=Math.floor((this.degrees-1e4*n)/100),this.seconds=Math.floor(this.degrees-1e4*n-100*this.minutes),this.degrees=n}degreesCanBeDegreesAndMinutes(){return this.degrees>360}degreesAsDegreesAndMinutes(){var n;return n=Math.floor(this.degrees/100),this.minutes=this.degrees-100*n,this.degrees=n}toDecimal(){return this.sign*(this.degrees+this.minutes/60+this.seconds/3600+this.milliseconds/36e5)}},n.exports=b},8214:(n,b,A)=>{var L,R,D;D=A(5775),L=A(6853),R=class Coordinates{constructor(n){this.coordinates=n,this.latitudeNumbers=null,this.longitudeNumbers=null,this.validate(),this.parse()}validate(){return(new D).validate(this.coordinates)}parse(){return this.groupCoordinateNumbers(),this.latitude=this.extractLatitude(),this.longitude=this.extractLongitude()}groupCoordinateNumbers(){var n,b;return b=(n=this.extractCoordinateNumbers(this.coordinates)).length/2,this.latitudeNumbers=n.slice(0,b),this.longitudeNumbers=n.slice(0-b)}extractCoordinateNumbers(n){return n.match(/-?\d+(\.\d+)?/g)}extractLatitude(){var n;return n=this.coordinateNumbersToDecimal(this.latitudeNumbers),this.latitudeIsNegative()&&(n*=-1),n}extractLongitude(){var n;return n=this.coordinateNumbersToDecimal(this.longitudeNumbers),this.longitudeIsNegative()&&(n*=-1),n}coordinateNumbersToDecimal(n){var b;return(b=new L(n)).detectSpecialFormats(),b.toDecimal()}latitudeIsNegative(){return this.coordinates.match(/s/i)}longitudeIsNegative(){return this.coordinates.match(/w/i)}getLatitude(){return this.latitude}getLongitude(){return this.longitude}},n.exports=R},5775:n=>{var b;b=class Validator{isValid(n){var b;b=!0;try{return this.validate(n),b}catch(n){return b=!1}}validate(n){return this.checkContainsNoLetters(n),this.checkValidOrientation(n),this.checkNumbers(n)}checkContainsNoLetters(n){if(/(?![neswd])[a-z]/i.test(n))throw new Error("Coordinate contains invalid alphanumeric characters.")}checkValidOrientation(n){if(!/^[^nsew]*[ns]?[^nsew]*[ew]?[^nsew]*$/i.test(n))throw new Error("Invalid cardinal direction.")}checkNumbers(n){var b;return b=n.match(/-?\d+(\.\d+)?/g),this.checkAnyCoordinateNumbers(b),this.checkEvenCoordinateNumbers(b),this.checkMaximumCoordinateNumbers(b)}checkAnyCoordinateNumbers(n){if(0===n.length)throw new Error("Could not find any coordinate number")}checkEvenCoordinateNumbers(n){if(n.length%2)throw new Error("Uneven count of latitude/longitude numbers")}checkMaximumCoordinateNumbers(n){if(n.length>6)throw new Error("Too many coordinate numbers")}},n.exports=b},5023:function(n){!function(b){"use strict";function parse5322(n){function inStr(){return A0&&(b.semantic=" "),b}}function star(n,b){return function starFunc(){var A,L,R,D,B;for(D=getPos(),A=o("star"),R=0,B=void 0===b?0:b;null!==(L=n());)R+=1,add(A,L);return R>=B?A:(setPos(D),null)}}function isUTF8NonAscii(n){return n.charCodeAt(0)>=128}function cr(){return wrap("cr",literal("\r")())}function crlf(){return wrap("crlf",and(cr,lf)())}function dquote(){return wrap("dquote",literal('"')())}function htab(){return wrap("htab",literal("\t")())}function lf(){return wrap("lf",literal("\n")())}function sp(){return wrap("sp",literal(" ")())}function vchar(){return wrap("vchar",compareToken((function vcharFunc(b){var A=b.charCodeAt(0),L=33<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L})))}function wsp(){return wrap("wsp",or(sp,htab)())}function quotedPair(){var n=wrap("quoted-pair",or(and(literal("\\"),or(vchar,wsp)),obsQP)());return null===n?null:(n.semantic=n.semantic[1],n)}function fws(){return wrap("fws",or(obsFws,and(opt(and(star(wsp),invis(crlf))),star(wsp,1)))())}function ctext(){return wrap("ctext",or((function ctextFunc1(){return compareToken((function ctextFunc2(b){var A=b.charCodeAt(0),L=33<=A&&A<=39||42<=A&&A<=91||93<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsCtext)())}function ccontent(){return wrap("ccontent",or(ctext,quotedPair,comment)())}function comment(){return wrap("comment",and(literal("("),star(and(opt(fws),ccontent)),opt(fws),literal(")"))())}function cfws(){return wrap("cfws",or(and(star(and(opt(fws),comment),1),opt(fws)),fws)())}function atext(){return wrap("atext",compareToken((function atextFunc(b){var A="a"<=b&&b<="z"||"A"<=b&&b<="Z"||"0"<=b&&b<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(b)>=0;return n.rfc6532&&(A=A||isUTF8NonAscii(b)),A})))}function atom(){return wrap("atom",and(colwsp(opt(cfws)),star(atext,1),colwsp(opt(cfws)))())}function dotAtomText(){var n,b;return null===(n=wrap("dot-atom-text",star(atext,1)()))||null!==(b=star(and(literal("."),star(atext,1)))())&&add(n,b),n}function dotAtom(){return wrap("dot-atom",and(invis(opt(cfws)),dotAtomText,invis(opt(cfws)))())}function qtext(){return wrap("qtext",or((function qtextFunc1(){return compareToken((function qtextFunc2(b){var A=b.charCodeAt(0),L=33===A||35<=A&&A<=91||93<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsQtext)())}function qcontent(){return wrap("qcontent",or(qtext,quotedPair)())}function quotedString(){return wrap("quoted-string",and(invis(opt(cfws)),invis(dquote),star(and(opt(colwsp(fws)),qcontent)),opt(invis(fws)),invis(dquote),invis(opt(cfws)))())}function word(){return wrap("word",or(atom,quotedString)())}function address(){return wrap("address",or(mailbox,group)())}function mailbox(){return wrap("mailbox",or(nameAddr,addrSpec)())}function nameAddr(){return wrap("name-addr",and(opt(displayName),angleAddr)())}function angleAddr(){return wrap("angle-addr",or(and(invis(opt(cfws)),literal("<"),addrSpec,literal(">"),invis(opt(cfws))),obsAngleAddr)())}function group(){return wrap("group",and(displayName,literal(":"),opt(groupList),literal(";"),invis(opt(cfws)))())}function displayName(){return wrap("display-name",function phraseFixedSemantic(){var n=function phrase(){return wrap("phrase",or(obsPhrase,star(word,1))())}();return null!==n&&(n.semantic=function collapseWhitespace(n){return n.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(n.semantic)),n}())}function mailboxList(){return wrap("mailbox-list",or(and(mailbox,star(and(literal(","),mailbox))),obsMboxList)())}function addressList(){return wrap("address-list",or(and(address,star(and(literal(n.addressListSeparator),address))),obsAddrList)())}function groupList(){return wrap("group-list",or(mailboxList,invis(cfws),obsGroupList)())}function localPart(){return wrap("local-part",or(obsLocalPart,dotAtom,quotedString)())}function dtext(){return wrap("dtext",or((function dtextFunc1(){return compareToken((function dtextFunc2(b){var A=b.charCodeAt(0),L=33<=A&&A<=90||94<=A&&A<=126;return n.rfc6532&&(L=L||isUTF8NonAscii(b)),L}))}),obsDtext)())}function domainLiteral(){return wrap("domain-literal",and(invis(opt(cfws)),literal("["),star(and(opt(fws),dtext)),opt(fws),literal("]"),invis(opt(cfws)))())}function domain(){return wrap("domain",function domainCheckTLD(){var b=or(obsDomain,dotAtom,domainLiteral)();return n.rejectTLD&&b&&b.semantic&&b.semantic.indexOf(".")<0?null:(b&&(b.semantic=b.semantic.replace(/\s+/g,"")),b)}())}function addrSpec(){return wrap("addr-spec",and(localPart,literal("@"),domain)())}function obsNoWsCtl(){return n.strict?null:wrap("obs-NO-WS-CTL",compareToken((function(n){var b=n.charCodeAt(0);return 1<=b&&b<=8||11===b||12===b||14<=b&&b<=31||127===b})))}function obsCtext(){return n.strict?null:wrap("obs-ctext",obsNoWsCtl())}function obsQtext(){return n.strict?null:wrap("obs-qtext",obsNoWsCtl())}function obsQP(){return n.strict?null:wrap("obs-qp",and(literal("\\"),or(literal("\0"),obsNoWsCtl,lf,cr))())}function obsPhrase(){return n.strict?null:wrap("obs-phrase",and(word,star(or(word,literal("."),n.atInDisplayName?literal("@"):noop,n.commaInDisplayName?literal(","):noop,colwsp(cfws))))())}function obsFws(){return n.strict?null:wrap("obs-FWS",star(and(invis(opt(crlf)),wsp),1)())}function obsAngleAddr(){return n.strict?null:wrap("obs-angle-addr",and(invis(opt(cfws)),literal("<"),obsRoute,addrSpec,literal(">"),invis(opt(cfws)))())}function obsRoute(){return n.strict?null:wrap("obs-route",and(obsDomainList,literal(":"))())}function obsDomainList(){return n.strict?null:wrap("obs-domain-list",and(star(or(invis(cfws),literal(","))),literal("@"),domain,star(and(literal(","),invis(opt(cfws)),opt(and(literal("@"),domain)))))())}function obsMboxList(){return n.strict?null:wrap("obs-mbox-list",and(star(and(invis(opt(cfws)),literal(","))),mailbox,star(and(literal(","),opt(and(mailbox,invis(cfws))))))())}function obsAddrList(){return n.strict?null:wrap("obs-addr-list",and(star(and(invis(opt(cfws)),literal(","))),address,star(and(literal(","),opt(and(address,invis(cfws))))))())}function obsGroupList(){return n.strict?null:wrap("obs-group-list",and(star(and(invis(opt(cfws)),literal(",")),1),invis(opt(cfws)))())}function obsLocalPart(){return n.strict?null:wrap("obs-local-part",and(word,star(and(literal("."),word)))())}function obsDomain(){return n.strict?null:wrap("obs-domain",and(atom,star(and(literal("."),atom)))())}function obsDtext(){return n.strict?null:wrap("obs-dtext",or(obsNoWsCtl,quotedPair)())}function findNode(n,b){var A,L,R;if(null==b)return null;for(L=[b];L.length>0;){if((R=L.pop()).name===n)return R;for(A=R.children.length-1;A>=0;A-=1)L.push(R.children[A])}return null}function findAllNodesNoChildren(n,b){var A,L,R,D,B;if(null==b)return null;for(L=[b],D=[],B={},A=0;A0;)if((R=L.pop()).name in B)D.push(R);else for(A=R.children.length-1;A>=0;A-=1)L.push(R.children[A]);return D}function giveResult(b){var A,L,R,D,B;if(null===b)return null;for(A=[],L=findAllNodesNoChildren(["group","mailbox"],b),R=0;R1)return null;return b.addresses&&b.addresses[0]}(B):n.simple?B&&B.addresses:B}function giveResultGroup(n){var b,A=findNode("display-name",n),L=[],R=findAllNodesNoChildren(["mailbox"],n);for(b=0;b0;)for((R=L.pop()).name===n&&D.push(R),A=R.children.length-1;A>=0;A-=1)L.push(R.children[A]);return D}("cfws",n),R=findAllNodesNoChildren(["comment"],n),D=findNode("local-part",A),B=findNode("domain",A);return{node:n,parts:{name:b,address:A,local:D,domain:B,comments:L},type:n.name,name:grabSemantic(b),address:grabSemantic(A),local:grabSemantic(D),domain:grabSemantic(B),comments:concatComments(R),groupName:grabSemantic(n.groupName)}}function grabSemantic(n){return null!=n?n.semantic:null}function concatComments(n){var b="";if(n)for(var A=0;A{function Coords(){}Coords.prototype.init=function(){if(!arguments.length)throw new Error("no arguments");if(arguments[0].lat&&arguments[0].lng)this.lat=arguments[0].lat,this.lon=arguments[0].lng;else if("string"==typeof arguments[0]){var n=arguments[0].split(",");this.lat=parseFloat(n[0].trim()),this.lon=parseFloat(n[1].trim())}else if("[object Array]"===Object.prototype.toString.call(arguments[0])){var b=arguments[0];!0===arguments[1]?(this.lat=b[1],this.lon=b[0]):(this.lat=b[0],this.lon=b[1])}else!0===arguments[2]?(this.lat=arguments[1],this.lon=arguments[0]):(this.lat=arguments[0],this.lon=arguments[1]);this.compute()},Coords.prototype.compute=function(){function computeFor(n){var b={};return b.initValue=n,b.degrees=Math.abs(n),b.degreesInt=Math.floor(b.degrees),b.degreesFrac=b.degrees-b.degreesInt,b.secondsTotal=3600*b.degreesFrac,b.minutes=b.secondsTotal/60,b.minutesInt=Math.floor(b.minutes),b.seconds=b.secondsTotal-60*b.minutesInt,b}this.north=this.lat>0,this.east=this.lon>0,this.latValues=computeFor(this.lat),this.lonValues=computeFor(this.lon)};var b={FFf:"DD MM ss X",Ff:"DD mm X",f:"dd X"},A="°",L="′",R="″";Coords.prototype.format=function(n,D){if("object"==typeof n){D=n,n="FFf"}(void 0===n&&(n="FFf"),void 0===D&&(D={}),"string"==typeof D)&&(D={latLonSeparator:D});void 0===D.latLonSeparator&&(D.latLonSeparator=" "),void 0===D.decimalPlaces?D.decimalPlaces=5:D.decimalPlaces=parseInt(D.decimalPlaces),Object.keys(b).indexOf(n)>-1&&(n=b[n]);var B=formatFor(this.latValues,this.north?"N":"S"),E=formatFor(this.lonValues,this.east?"E":"W");function formatFor(b,B){var E=n;return E=(E=(E=(E=(E=(E=(E=(E=(E=(E=(E=(E=E.replace(/DD/g,b.degreesInt+A)).replace(/dd/g,b.degrees.toFixed(D.decimalPlaces)+A)).replace(/D/g,b.degreesInt)).replace(/d/g,b.degrees.toFixed(D.decimalPlaces))).replace(/MM/g,b.minutesInt+L)).replace(/mm/g,b.minutes.toFixed(D.decimalPlaces)+L)).replace(/M/g,b.minutesInt)).replace(/m/g,b.minutes.toFixed(D.decimalPlaces))).replace(/ss/g,b.seconds.toFixed(D.decimalPlaces)+R)).replace(/s/g,b.seconds.toFixed(D.decimalPlaces))).replace(/-/g,b.initValue<0?"-":"")).replace(/X/g,B)}return B+D.latLonSeparator+E},n.exports=function formatcoords(){var n=new Coords;return n.init.apply(n,arguments),n}},5936:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},6120:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n
\n
\n\n'},6680:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
'},1138:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t
\n
\n'},5938:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'},7467:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n
\n
\n
\n
\n'},7761:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n
\n'},3786:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n
\n'},7005:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n
\n'},6932:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\t\x3c!--\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t
--\x3e\n
\n
\n\t
\n\t
\n
\n'},4444:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n\n\n'},9158:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n
\n\n\n'},1864:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},3372:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n
\n\t
\n
\n
\n\t
\n\t\t
\n\t\t
\n\t
\n
'},4484:n=>{n.exports='© OpenStreetMap contributors'},5737:n=>{n.exports='
\n
\n
\n
\n
\n\n
\n
\n
\n
'},7540:n=>{n.exports='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'},66:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n'},792:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n
\n'},1648:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n'},1682:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t
\n
\n
Placeholder
\n'},604:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t\t
\n\t
\n
'},7939:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t
\n
'},1588:n=>{n.exports="
\n\t
\n\t
\n\t\t
\n\t
\n
\n\n"},5130:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n
'},7963:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n'},3081:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
'},6498:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n\t
\n
\n
\n\t
\n
\n'},560:n=>{n.exports='\x3c!--\n * coffeescript-ui - Coffeescript User Interface System (CUI)\n * Copyright (c) 2013 - 2016 Programmfabrik GmbH\n * MIT Licence\n * https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org\n--\x3e\n\n
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n
'},2989:function(n,b,A){!function(n){"use strict";function _detectIconOptions(b,A){var L=n.DomUtil.create("div",b,document.body),R=_extractUrls(_getBkgImageOrCursor(L),A),D=_getStyleInt(L,"width"),B=_getStyleInt(L,"height"),E=_getStyleInt(L,"margin-left"),X=_getStyleInt(L,"margin-top");return L.parentNode.removeChild(L),{Url:R[0],RetinaUrl:R[1],Size:[D,B],Anchor:[-E,-X]}}function _detectDivOverlayOptions(b){var A=n.DomUtil.create("div",b,document.body),L=_getStyleInt(A,"margin-left"),R=_getStyleInt(A,"margin-top");return A.parentNode.removeChild(A),{Anchor:[L,R]}}function _extractUrls(n,b){for(var A=/url\(['"]?([^"']*?)['"]?\)/gi,L=[],R=A.exec(n);R;)L.push(b?_stripPath(R[1]):R[1]),R=A.exec(n);return L}function _stripPath(n){return n.substr(n.lastIndexOf("/")+1)}function _getStyleInt(n,b){return parseInt(_getStyle(n,b),10)}function _getStyle(b,A){return n.DomUtil.getStyle(b,A)||n.DomUtil.getStyle(b,_kebabToCamelCase(A))}function _getBkgImageOrCursor(n){var b=_getStyle(n,"background-image");return b&&"none"!==b?b:_getStyle(n,"cursor")}function _kebabToCamelCase(n){return n.replace(/-(\w)/g,(function(n,b){return b.toUpperCase()}))}n.Icon.Default.mergeOptions({iconUrl:null,iconRetinaUrl:null,shadowUrl:null,iconSize:null,iconAnchor:null,popupAnchor:null,tooltipAnchor:null,shadowSize:null,classNamePrefix:"leaflet-default-icon-"}),n.Icon.Default.include({_needsInit:!0,_getIconUrl:function(b){var A=this.options.imagePath||n.Icon.Default.imagePath||"";return this._needsInit&&this._initializeOptions(A),A+n.Icon.prototype._getIconUrl.call(this,b)},_initializeOptions:function(n){this._setOptions("icon",_detectIconOptions,n),this._setOptions("shadow",_detectIconOptions,n),this._setOptions("popup",_detectDivOverlayOptions),this._setOptions("tooltip",_detectDivOverlayOptions),this._needsInit=!1},_setOptions:function(n,b,A){var L=this.options,R=b(L.classNamePrefix+n,A);for(var D in R)L[n+D]=L[n+D]||R[D]}})}(A(6541))},6541:function(n,b){ /* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade diff --git a/src/elements/ItemList/ItemList.coffee b/src/elements/ItemList/ItemList.coffee index 66cb6078..51b4e0d9 100644 --- a/src/elements/ItemList/ItemList.coffee +++ b/src/elements/ItemList/ItemList.coffee @@ -228,6 +228,9 @@ class CUI.ItemList extends CUI.VerticalLayout if item.hasLeft() list_has_button_left = true + if item.__tooltipOpts and (not item.__tooltipOpts.placement or not item.__tooltipOpts.placements) + item.__tooltipOpts.placements = ["w", "e"] + if item instanceof CUI.Button or item instanceof CUI.DataField or item instanceof CUI.Label @@ -262,6 +265,12 @@ class CUI.ItemList extends CUI.VerticalLayout if menu opts.menu_parent = menu + if not opts.tooltip + opts.tooltip = {} + + if not opts.tooltip.placement or not opts.tooltip.placements + opts.tooltip.placements = ["w", "e"] + btn = new CUI.defaults.class.Button(opts) listenButtonClick(btn) @@ -427,4 +436,4 @@ class CUI.ItemList extends CUI.VerticalLayout CUI.ready => CUI.Events.registerEvent type: "item-list-keydown" - sink: true \ No newline at end of file + sink: true