
static.js.main.59a45da4.js Maven / Gradle / Ivy
/*! For license information please see main.59a45da4.js.LICENSE.txt */
!function(){var e={5675:function(e,t,n){e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,i){"string"===typeof t?(2==arguments.length&&(i=n),e.modules[t]||(e.payloads[t]=i,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var r=s(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i,r=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var s=[],o=0;o=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||"undefined"===typeof l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i,r=e("./keys"),s=e("./useragent"),o=null,a=0;function l(){return void 0==i&&function(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}(),i}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=t.addListener=function(e,t,n,i){e.addEventListener(t,n,l()),i&&i.$toDestroy.push(new c(e,t,n))},u=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function r(e){t&&t(e),n&&n(e),u(i,"mousemove",t),u(i,"mouseup",r),u(i,"dragstart",r)}return h(i,"mousemove",t),h(i,"mouseup",r),h(i,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?h(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?h(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):h(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,r,o){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,s.isIE){var o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!o||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[r]("mousedown",e),u>4)u=0;else if(u>1)return i[r](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",f,o)}))};var d=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=d(t);if(!s.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),o.altGr){if(3==(3&i))return;o.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==o[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){t.timeStamp-a<50&&(o.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(s.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function p(){o=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;h(e,"keydown",(function(e){r=e.keyCode}),i),h(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;h(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),h(e,"keyup",(function(e){o[e.keyCode]=null}),i),o||(p(),h(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++;h(n,"message",(function r(s){s.data==i&&(t.stopPropagation(s),u(n,"message",r),e())})),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,h=r.isChrome>63,u=400,d=e("../lib/keys"),f=d.KEY_MODS,p=r.isIOS,m=p?/\s/:/\n/,g=r.isMobile;t.TextInput=function(e,t){var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,x=!1,b=!1,y=!1,w="";g||(n.style.fontSize="1px");var j=!1,k=!1,S="",C=0,T=0,$=0;try{var A=document.activeElement===n}catch(K){}i.addListener(n,"blur",(function(e){k||(t.onBlur(e),A=!1)}),t),i.addListener(n,"focus",(function(e){if(!k){if(A=!0,r.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),r.isEdge?setTimeout(E):E()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(K){return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return A},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);b&&r&&(S=n.value="",B()),E()}}));var E=p?function(e){if(A&&(!v||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=S=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==C&&T==r||n.setSelectionRange(4,r),C=4,T=r}}:function(){if(!b&&!y&&(A||_)){b=!0;var e=0,i=0,r="";if(t.session){var s=t.selection,o=s.getRange(),a=s.cursor.row;if(e=o.start.column,i=o.end.column,r=t.session.getLine(a),o.start.row!=a){var l=t.session.getLine(a-1);e=o.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else g&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>u&&(e0&&S[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&S.length-d>C-1&&S[S.length-d]==e[e.length-d];)d++,l--;h-=d-1,u-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!i&&!c&&!h&&!a&&!l&&!u)return"";y=!0;var p=!1;return r.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!h&&!u||j?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),y=!1,S=e,C=s,T=o,$=u,p?"\n":c},I=function(e){if(b)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=M(i,!0);(i.length>500||m.test(r)||g&&C<1&&C==T)&&E()},P=function e(t,n,i){var r=t.clipboardData||window.clipboardData;if(r&&!l){var s=c||i?"Text":"text/plain";try{return n?!1!==r.setData(s,n):r.getData(s)}catch(t){if(!i)return e(t,n,!0)}}},O=function(e,r){var s=t.getCopyText();if(!s)return i.preventDefault(e);P(e,s)?(p&&(E(s),v=s,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=s,n.select(),setTimeout((function(){v=!1,E(),r?t.onCut():t.onCopy()})))},R=function(e){O(e,!0)},D=function(e){O(e,!1)},N=function(e){var s=P(e);a.pasteCancelled()||("string"==typeof s?(s&&t.onPaste(s,e),r.isIE&&setTimeout(E),i.preventDefault(e)):(n.value="",x=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){b||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==T}(n)?g&&n.selectionStart!=C&&E():(t.selectAll(),E()))}),t),i.addListener(n,"input",I,t),i.addListener(n,"cut",R,t),i.addListener(n,"copy",D,t),i.addListener(n,"paste",N,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:N(e);break;case 88:R(e)}}),t);var F=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(j)return z();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;M(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+T-b.selectionStart+$)}}},B=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",z),e&&I())};function z(){k=!0,n.blur(),n.focus(),k=!1}var H,U=o.delayedCall(F,50).schedule.bind(null,null);function W(){clearTimeout(H),H=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!j)){e.data&&(b.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",z);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=C,t.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",C=0,T=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",F,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthT&&"\n"==S[s]?o=d.end:iT&&S.slice(0,s).split("\n").length>2?o=d.down:s>T&&" "==S[s-1]?(o=d.right,a=f.option):(s>T||s==T&&T!=C&&i==s)&&(o=d.right),i!==s&&(a|=f.shift),o){if(!t.onCommandKey({},a,o)&&t.commands){o=d.keyCodeToString(o);var l=t.commands.findKeyCommand(a,o);l&&t.execCommand(l)}C=i,T=s,E("")}}};document.addEventListener("selectionchange",s),t.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function s(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,s=e.getButton();return 0!==s?((r.getSelectionRange().isEmpty()||1==s)&&r.selection.moveToPosition(n),void(2==s&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=s(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==o&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&o>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==a)i=r.end,t=r.start;else{var l=s(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),s=Date.now();(r>0||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,s=r?e.wheelX/r:n.vx,o=r?e.wheelY/r:n.vy;r<550&&(s=(s+n.vx)/2,o=(o+n.vy)/2);var a=Math.abs(s/o),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(o)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=s,n.vy=o,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/event"),o=e("../tooltip").Tooltip;function a(e){o.call(this,e)}r.inherits(a,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+s>i&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,o=e.editor,l=o.renderer.$gutterLayer,c=new a(o.container);function h(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,o._signal("hideGutterTooltip",c),o.off("mousewheel",h))}function u(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(o.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=o.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return o.selectAll(),t.preventDefault();e.$clickSelection=o.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(s){var a=s.domEvent.target||s.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return h();r&&e.$tooltipFollowsMouse&&u(s),n=s,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return h();if(t==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(s>o.session.documentToScreenRow(a.row,a.column))return h()}if(r!=i)if(r=i.text.join("
"),c.setHtml(r),c.show(),o._signal("showGutterTooltip",c),o.on("mousewheel",h),e.$tooltipFollowsMouse)u(n);else{var d=n.domEvent.target.getBoundingClientRect(),f=c.getElement().style;f.left=d.right+"px",f.top=d.bottom+"px"}}():h()}),50))})),s.addListener(o.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,h()}),50))}),o),o.on("changeSession",h)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/event"),s=e("../lib/useragent");function o(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var o,l,c,h,u,d,f,p,m,g,v,x=t.container,b=0;function y(){var e=d;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,s=!n||e.column!=n.column;!g||r||s?(t.moveCursorToPosition(e),g=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?g=null:i-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,o=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-o.left,right:o.right-l},y:{top:c-o.top,bottom:o.bottom-c}},h=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};h/s<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):m=i:m=null}(d,e)}function w(){u=t.selection.toOrientedRange(),o=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(h),y(),h=setInterval(y,20),b=0,r.addListener(document,"mousemove",S)}function j(){clearInterval(h),t.session.removeMarker(o),o=null,t.selection.fromOrientedRange(u),t.isFocused()&&!p&&t.$resetCursorStyle(),u=null,d=null,b=0,m=null,g=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;f||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&C(e.dataTransfer))return l=e.clientX,c=e.clientY,o||w(),b++,e.dataTransfer.dropEffect=f=T(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&C(e.dataTransfer))return l=e.clientX,c=e.clientY,o||(w(),b++),null!==k&&(k=null),e.dataTransfer.dropEffect=f=T(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&o)return j(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(p)switch(f){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:t.moveText(u,d);break;case"copy":u=t.moveText(u,d,!0)}else{var i=n.getData("Text");u={start:d,end:t.session.insert(d,i)},t.focus(),f=null}return j(),r.preventDefault(e)}},r.addListener(x,"dragstart",this.onDragStart.bind(e),t),r.addListener(x,"dragend",this.onDragEnd.bind(e),t),r.addListener(x,"dragenter",this.onDragEnter.bind(e),t),r.addListener(x,"dragover",this.onDragOver.bind(e),t),r.addListener(x,"dragleave",this.onDragLeave.bind(e),t),r.addListener(x,"drop",this.onDrop.bind(e),t);var k=null;function S(){null==k&&(k=setTimeout((function(){null!=k&&o&&j()}),20))}function C(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function T(e){var t=["copy","copymove","all","uninitialized"],n=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,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(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;s.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(s.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(o.prototype),t.DragdropHandler=o})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){var n,o,a,l,c,h,u,d,f,p="scroll",m=0,g=0,v=0,x=0;function b(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r=i.target.getAttribute("action");if("more"==r||!n)return n=!n,function(){var i=t.getCopyText(),r=t.session.getUndoManager().hasUndo();f.replaceChild(s.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),f.firstChild)}();"paste"==r?e.readText().then((function(e){t.execCommand(r,e)})):r&&("cut"!=r&&"copy"!=r||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=r&&t.focus()};f=s.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function y(){f||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();f.style.top=n.pageY-s.top-3+"px",n.pageX-s.left1)return clearTimeout(c),c=null,a=-1,void(p="zoom");d=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var b=r[0],y=b.clientX,w=b.clientY;Math.abs(n-y)+Math.abs(o-w)>s&&(a=-1),n=e.clientX=y,o=e.clientY=w,v=x=0;var k=new i(e,t);if(u=k.getDocumentPosition(),f-a<500&&1==r.length&&!m)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=g>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var S=t.selection.cursor,C=t.selection.isEmpty()?S:t.selection.anchor,T=t.renderer.$cursorLayer.getPixelPosition(S,!0),$=t.renderer.$cursorLayer.getPixelPosition(C,!0),A=t.renderer.scroller.getBoundingClientRect(),E=t.renderer.layerConfig.offset,L=t.renderer.scrollLeft,_=function(e,t){return(e/=h)*e+(t=t/s-.75)*t};if(e.clientXI?"cursor":"anchor"),p=I<3.5?"anchor":M<3.5?"cursor":"scroll",c=setTimeout(j,450)}a=f}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==p?(p="",m=0):c?(t.selection.moveToPosition(u),m=0,y()):"scroll"==p?(m+=60,h=setInterval((function(){m--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(x)<.01&&(x=0),m<20&&(v*=.9),m<20&&(x*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*x),e==t.session.getScrollTop()&&(m=0)}),10),w()):y(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==p)){var s=r[0],a=n-s.clientX,h=o-s.clientY;if("wait"==p){if(!(a*a+h*h>4))return e.preventDefault();p="cursor"}n=s.clientX,o=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var u=e.timeStamp,d=u-l;if(l=u,"scroll"==p){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=h,10*Math.abs(a)1&&(r=n[n.length-2]);var o=c[t+"Path"];return null==o?o=c.basePath:"/"==i&&(t=i=""),o&&"/"!=o.slice(-1)&&(o+="/"),o+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{r=e(n)}catch(l){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a),h()}};var h=function(){c.basePath||c.workerPath||c.modePath||c.themePath||Object.keys(c.$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"),h=function(){})};function u(r){if(l&&l.document){c.packaged=r||e.packaged||i.packaged||l.define&&n.amdD.packaged;for(var s,o={},a="",h=document.currentScript||document._currentScript,u=(h&&h.ownerDocument||document).getElementsByTagName("script"),d=0;d=e){for(s=u+1;s=e;)s++;for(a=u,l=s-1;a=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(s&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(s)return 4;for(f=r+1,d=t.length;f=1425&&m<=2303||64286==m;if(l=t[f],g&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return s=!1,o=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case u:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:d[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?h:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?f[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,h){if(e.length<2)return{};var d=e.split(""),f=new Array(d.length),v=new Array(d.length),x=[];i=h?1:0,function(e,t,n,h){var u=i?c:l,d=null,f=null,p=null,v=0,x=null,b=-1,y=null,w=null,j=[];if(!h)for(y=0,h=[];y0)if(16==x){for(y=b;y-1){for(y=b;y=0&&8==h[k];k--)t[k]=i}}(d,x,d.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===u)?x[b]=t.ON_R:b>0&&"\u0644"===d[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[b])&&(x[b-1]=x[b]=t.R_H,b++);d[d.length-1]===t.DOT&&(x[d.length-1]=t.B),"\u202b"===d[0]&&(x[0]=t.RLE);for(b=0;b=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[e];s&&(void 0===t&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=t&&s[r]%2!==0&&r++;for(var a=0;at&&s[r]%2===0&&(o+=this.charWidths[s[r]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,s=[],o=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+s/2;){if(n+=s,i===r.length-1){s=0;break}s=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!==0&&r[i]%2===0?(e0&&r[i-1]%2===0&&r[i]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===s&&r[i-1]%2===0||!this.isRtlDir&&0===i&&r[i]%2!==0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!==0&&0!==s&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(o.prototype),t.BidiHandler=o})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){i.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new o(i,0,n,this.session.getLine(n).length):new o(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var s=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var s=r.stringReverse(i),o=this.$shortWordEndIndex(s);return this.moveCursorTo(t,n-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(i){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),r=2e3,s=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",a=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),s[r]=l,r+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(s[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var i=[],r=0,s=n.length;rh){var v=e.substring(h,g-m.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var x=0;xr){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(s.prototype),t.Tokenizer=s})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,r=e("../../lib/oop"),s=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return i=h[t];i=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,r,s,o,l){var c=s.getCursorPosition(),h=o.doc.getLine(c.row);if("{"==l){d(s);var u=s.getSelectionRange(),p=o.doc.getTextRange(u);if(""!==p&&"{"!==p&&s.getWrapBehavioursEnabled())return f(u,p,"{","}");if(e.isSaneInsertion(s,o))return/[\]\}\)]/.test(h[c.column])||s.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(s,o,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(s,o,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(s),"}"==h.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,h,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){d(s);var m="";if(e.isMaybeInsertedClosing(c,h)&&(m=a.stringRepeat("}",i.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===h.substring(c.column,c.column+1)){var g=o.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!g)return null;var v=this.$getIndent(o.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(h)}var x=v+o.getTabString();return{text:"\n"+x+"\n"+v+m,selection:[1,x.length,1,x.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==o){if(d(n),"}"==r.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,i,r,s){if("("==s){d(i);var o=i.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&i.getWrapBehavioursEnabled())return f(o,a,"(",")");if(e.isSaneInsertion(i,r))return e.recordAutoInsert(i,r,")"),{text:"()",selection:[1,1]}}else if(")"==s){d(i);var l=i.getCursorPosition(),c=r.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,s))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(t,n,i,r,s){if("["==s){d(i);var o=i.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&i.getWrapBehavioursEnabled())return f(o,a,"[","]");if(e.isSaneInsertion(i,r))return e.recordAutoInsert(i,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){d(i);var l=i.getCursorPosition(),c=r.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,s))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(d(n),"]"==i.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(e,t,n,i,r){var s=i.$mode.$quotes||u;if(1==r.length&&s[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var o=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&s[l])&&n.getWrapBehavioursEnabled())return f(a,l,o,o);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),p=h.substring(c.column-1,c.column),m=h.substring(c.column,c.column+1),g=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var x,b=g&&/string|escape/.test(g.type),y=!v||/string|escape/.test(v.type);if(m==o)(x=b!==y)&&/string\.end/.test(v.type)&&(x=!1);else{if(b&&!y)return null;if(b&&y)return null;var w=i.$mode.tokenRe;w.lastIndex=0;var j=w.test(p);w.lastIndex=0;var k=w.test(p);if(j||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var S=h[c.column-2];if(p==o&&(S==o||w.test(S)))return null;x=!0}return{text:x?o+o:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var s=i.$mode.$quotes||u,o=i.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new o(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new o(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+s.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=s.substr(0,r.column)+n,i.maybeInsertedLineEnd=s.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,s),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[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,s=[],o=0;o2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),g=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(e,t){b(e,t)||s&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:a},f))},x=function(e,t){var n;(n=e.match(g))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&r.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(m.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(w=e.length)})),a==1/0&&(a=w,s=!1,o=!1),h&&a%c!=0&&(a=Math.floor(a/c)*c),y(o?x:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(m=new c(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var u,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(r.start))){var f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;u=new h(f,p,f,p+r.start.length);break}a=m.stepBackward()}var m;for(a=(m=new c(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(r.end))){f=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new h(f,p,f,p+r.end.length);break}a=m.stepForward()}d&&t.remove(d),u&&(t.remove(u),s=u.start.row,o=-r.start.length)}else o=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,s=i.$modes[r];s||(i.$modes[r]=s=new n),i.$modes[t]||(i.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,i){var r="insert"==t.action,s=(r?1:-1)*(t.end.row-t.start.row),o=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+s,column:n.column+(n.row==l.row?o:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof o||(e=o.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),s<=i&&n.fireUpdateEvent(s,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(s.prototype),t.BackgroundTokenizer=s})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),s=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,s){if(this.regExp)for(var o=s.firstRow,a=s.lastRow,l=o;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new r(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(n),this.clazz,s)}}}).call(s.prototype),t.SearchHighlight=s})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,s=0,o=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,o.start);return 0===a?t&&0!==l?-s-2:s:l>0||0===l&&!t?s:-s-1}}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],s=1;s=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;oi)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&c>0&&oh.start.column&&h.end.column==s[o+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-r,c=t.column-n.column;or)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>r&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>r&&(h.start.row+=l)}if(0!=l&&o=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}o>=e&&(i-=a>=e?o-a:o-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,o=!1;e instanceof s?n=e:(n=new s(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var s=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk((function(e,t,n,a){if(!(th)break}while(s&&l.test(s.type));s=r.stepBackward()}else s=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+s.value.length-2,c}},this.foldAll=function(e,t,n,i){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var s=e=e||0;s=e&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var s=n[r];if(null==s&&(s=n[r]=this.getFoldWidget(r)),"start"==s){var o=this.getFoldWidgetRange(r);if(i||(i=o),o&&o.end.row>=e)break}r--}return{range:-1!==r&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,s=this.getFoldAt(e,-1===r?0:i.length,r);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()&&(s=this.getFoldAt(o.start.row,o.start.column,1))&&o.isEqual(s.range))return this.removeFold(s),s;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=o?o.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,s=n.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),i=!1),!o)return null;if(o[1]){if(!(a=this.$findClosingBracket(o[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(o[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var s=new r(e.row,e.column-1,e.row,e.column),o=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e);return o?[s,new r(o.row,o.column,o.row,o.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],s=1,o=new i(this,t.row,t.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-o.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==r){if(0==(s-=1))return{row:o.getCurrentTokenRow(),column:l+o.getCurrentTokenColumn()}}else h==e&&(s+=1);l-=1}do{a=o.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],s=1,o=new i(this,t.row,t.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-o.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;ln&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,s=e[r];if(t>s)n=r+1;else{if(!(t=t);s++);return(n=i[s])?(n.index=s,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var s=t;if(s>0){do{s--}while(s>=0&&n.charAt(s).match(r));s++}for(var o=t;oe&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=t.length,l=0;lo){if((l=s.end.row+1)>=a)break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(s.start.column+=c),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=c)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}if(s.end=this.insert(s.start,i),r.length){var a=e.start,l=s.start,c=(o=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=o,e.end.row+=o,e})))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var s=this.getLine(r);n.start.row=r,n.end.row=r;for(var o=0;o0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var s=new h(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,s=i.row,o=r.row,a=o-s,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(s,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(m=this.getFoldLine(r.row)){m.addRemoveChars(r.row,r.column,i.column-r.column),m.shiftRow(-a);var u=this.getFoldLine(s);u&&u!==m&&(u.merge(m),m=u),h=c.indexOf(m)+1}for(;h=r.row&&m.shiftRow(-a)}o=s}else{var d=Array(a);d.unshift(s,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);c=this.$foldData,h=0;if(m=this.getFoldLine(s)){var p=m.range.compareInside(i.row,i.column);0==p?(m=m.split(i.row,i.column))&&(m.shiftRow(a),m.addRemoveChars(o,0,r.column-i.column)):-1==p&&(m.addRemoveChars(s,0,r.column-i.column),m.shiftRow(a)),h=c.indexOf(m)+1}for(;h=s&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(s))&&m.addRemoveChars(s,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,s,o=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=n;for(i=Math.min(i,o.length-1);h<=i;)(s=this.getFoldLine(h,s))?(r=[],s.walk(function(n,i,s,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var s=[],o=n.length,a=0,l=0,c=this.$wrapAsCode,h=this.$indentedSoftWrap,u=i<=Math.max(2*r,8)||!1===h?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;ii-f;){var p=a+i-f;if(n[p-1]>=10&&n[p]>=10)d(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(i-(i>>2)),a-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?d(++p):(2==n[p=a+i]&&p--,d(p-f))}else{for(;p!=a-1&&n[p]!=e;p--);if(p>a){d(p);continue}for(p=a+i;p39&&o<48||o>57&&o<64?r.push(9):o>=4352&&n(o)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,s;for(null==t&&(t=1/0),i=i||0,s=0;s=4352&&n(r)?i+=2:i+=1,!(i>t));s++);return[i,s]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[h],s=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;for(var f=this.getLength()-1,p=this.getNextFoldLine(s),m=p?p.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(s))>e||s>=f);)a+=l,++s>m&&(s=p.end.row+1,m=(p=this.getNextFoldLine(s,p))?p.start.row:1/0),d&&(this.$docRowCache.push(s),this.$screenRowCache.push(a));if(p&&p.start.row<=s)i=this.getFoldDisplayLine(p),s=p.start.row;else{if(a+l<=e||s>f)return{row:f,column:this.getLine(f).length};i=this.getLine(s),p=null}var g=0,v=Math.floor(e-a);if(this.$useWrapMode){var x=this.$wrapData[s];x&&(r=x[v],v>0&&x.length&&(g=x.indent,o=x[v-1]||x[x.length-1],i=i.substring(o)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,s,v)&&(t=this.$bidiHandler.offsetToCol(n)),o+=this.$getStringScreenWidth(i,t-g)[1],this.$useWrapMode&&o>=r&&(o=r-1),p?p.idxToPosition(o):{row:s,column:o}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,s=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var o,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],r=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((o=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(o,d))?d.start.row:1/0}else o=a+1;r+=this.getRowLength(a),a=o,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,e,t),s=d.start.row):(p=this.getLine(e).substring(0,t),s=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[s];if(g){for(var v=0;p.length>=g[v];)r++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);ir&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var o=this.$foldData,a=0;an);s++);return[i,s]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),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(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,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(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,o){return i=new s(e,n,r,o),!(n==o&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=r.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;dm||(o.push(l=new s(u,m,u+c-1,g)),c>2&&(u=u+c-2))}}else for(var v=0;vw&&o[d].end.row==n.end.row;)d--;for(o=o.slice(v,d+1),v=0,d=o.length;v=a;n--)if(u(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=o.row;n>=a;n--)if(u(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=o.row;if(!u(n,o.column,e)){for(n+=1;n<=l;n++)if(u(n,0,e))return;if(0!=t.wrap)for(n=a,l=o.row;n<=l;n++)if(u(n,0,e))return}};if(t.$isMultiLine)var h=n.length,u=function(t,r,s){var o=i?t-h+1:t;if(!(o<0||o+h>e.getLength())){var a=e.getLine(o),l=a.search(n[0]);if(!(!i&&lr))return!!s(o,l,o+h-1,u)||void 0}}};else if(i)u=function(t,i,r){var s,o=e.getLine(t),a=[],l=0;for(n.lastIndex=0;s=n.exec(o);){var c=s[0].length;if(l=s.index,!c){if(l>=o.length)break;n.lastIndex=l+=1}if(s.index+c>i)break;a.push(s.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];if(r(t,u,t,u+(c=a[h])))return!0}};else u=function(t,i,r){var s,o,a=e.getLine(t);for(n.lastIndex=i;o=n.exec(a);){var l=o[0].length;if(r(t,s=o.index,t,s+l))return!0;if(!l&&(n.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:c}}}).call(o.prototype),t.Search=o})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/useragent"),s=i.KEY_MODS;function o(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){o.call(this,e,t),this.$singleCommand=!1}a.prototype=o.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var s=i[r];if(s==e)delete i[r];else if(Array.isArray(s)){var o=s.indexOf(e);-1!=o&&(s.splice(o,1),1==s.length&&(i[r]=s[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r,s=this.commandKeyBinding;if(n)if(!s[t]||this.$singleCommand)s[t]=n;else{Array.isArray(s[t])?-1!=(r=s[t].indexOf(n))&&s[t].splice(r,1):s[t]=[s[t]],"number"!=typeof i&&(i=e(n));var o=s[t];for(r=0;ri)break}o.splice(r,0,n)}else delete s[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var s=0,o=t.length;o--;){var a=i.KEY_MODS[t[o]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=a}return{key:n,hashId:s}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=s[t]+n,o=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(o.prototype),t.HashHandler=o,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};i.inherits(o,r),function(){i.implement(this,s),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._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(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(o.prototype),t.CommandManager=o})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),s=e("../range").Range;function o(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var h=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var o=0;o=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var s=this.selection.toJSON();this.curOp.selectionAfter=s,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(s),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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 n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,i,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new x(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===r.type.indexOf("tag-open")||(r=i.stepForward())){var s=r.value,o=r.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=r,(r=i.stepForward())&&(-1!==r.type.indexOf("tag-name")?s===(o=r.value)&&("<"===l.value?a++:""===l.value&&a--):s===o&&"/>"===r.value&&a--)}while(r&&a>=0);else{do{if(r=l,l=i.stepBackward(),r)if(-1!==r.type.indexOf("tag-name"))s===r.value&&("<"===l.value?a++:""===l.value&&a--);else if("/>"===r.value){for(var c=0,h=l;h;){if(-1!==h.type.indexOf("tag-name")&&h.value===s){a--;break}if("<"===h.value)break;h=i.stepBackward(),c++}for(var u=0;u1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new f(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),s=r.substring(n,i);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),a=r.substring(n-1,i+1);if(o.test(a))return o}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,h=n.getState(r.row),u=(a=n.getLine(r.row),i.checkOutdent(h,a,e));if(n.insert(r,e),s&&s.selection&&(2==s.selection.length?this.selection.setSelectionRange(new f(r.row,c+s.selection[0],r.row,c+s.selection[1])):this.selection.setSelectionRange(new f(r.row+s.selection[0],s.selection[1],r.row+s.selection[2],s.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}u&&i.autoOutdent(h,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var s,o,a,l="",c="",h="",u=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),h=i.getNextLineIndent(l,c,u)),s=n.getLine(d),h!==(o=i.$getIndent(s))&&(o.length>0&&(a=new f(d,0,d,o.length),n.remove(a)),h.length>0&&n.insert({row:d,column:0},h)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var s=n.getTextRange(t);if("\n"==s[s.length-1]){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new f(0,0,0,0);for(i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,a=s.start+s.value.length-o,l=parseFloat(s.value);l*=Math.pow(10,a),o!==s.end&&n=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;df+1)break;f=p.last}for(h--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(u=h+1);u<=h;)o[u].moveBy(a,0),u++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new x(this.session,n.row,n.column),r=i.getCurrentToken(),s=r||i.stepForward();if(s){var o,a,l=!1,c={},h=n.column-s.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h=0;--s)this.$tryReplace(n[s],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var s=this.$search.find(this.session);return t.preventScroll?s:s?(this.revealRange(s,n),s):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.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()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!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 s=this.on("changeSelection",(function(){i=!0})),o=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,a=s.top-o.offset;null!=(i=s.top>=0&&a+t.top<0||!(s.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=s.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",o))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;v.loadModule("./ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(y.prototype),v.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){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(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"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 w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=y})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,s=r.comparePoints;r.comparePoints;function o(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(s(t.start,e.end)>=0)d(t,e,-1);else{if(!(s(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(s(t.start,e.end)>=0)d(t,e,-1);else{if(!(s(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(s(t.start,e.start)>=0)d(t,e,1);else{if(!(s(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(s(t.start,e.start)>=0)d(t,e,1);else{if(!(s(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function h(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(s(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)s(t.start,e.end)>=0?d(t,e,-1):(s(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(s(t.start,e.end)>=0)d(t,e,-1);else{var o,a;if(!(s(t.end,e.start)<=0))return s(e.start,t.start)<0&&(o=e,e=p(e,t.start)),s(e.end,t.end)>0&&(a=p(e,t.end)),f(t.end,e.start,e.end,-1),a&&!o&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,o,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function p(e,t){var n=e.lines,i=e.end;e.end=o(t);var r=e.end.row-e.start.row,s=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:o(t),end:i,lines:s,action:e.action}}function m(e,t){t=function(e){return{start:o(e.start),end:o(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;rs&&(l=r.end.row+1,s=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,e,this.session,c),this.$lines.push(o)),this.$renderCell(o,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var s=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();(s+=o.left+o.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;r>o&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,s,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var s=e.element,o=this.session,a=s.childNodes[0],l=s.childNodes[1],c=o.$firstLineNumber,h=o.$breakpoints,u=o.$decorations,d=o.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&o.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),h[r]&&(m+=h[r]),u[r]&&(m+=u[r]),this.$annotations[r]&&(m+=this.$annotations[r].className),s.className!=m&&(s.className=m),f){var g=f[r];null==g&&(g=f[r]=o.getFoldWidget(r))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&r==p&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var s=this.$getTop(r.start.row,e),o=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,o,s,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.id?4:0)|(c==l?8:0)),r,c==l?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,r){var s=this.$padding,o=i.lineHeight,a=this.$getTop(t.start.row,i),l=s+t.start.column*i.characterWidth;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+o+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+o+"px;width:"+h+"px;top:"+a+"px;left:"+s+"px;"+(r||""))}if(!((o=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+o+"px;right:0;top:"+a+"px;left:"+s+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,s);var o=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+o+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,s){var o=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+o+"px;width:"+e.width+(r||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(s||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var s=this.$getTop(t.start.row,i),o=i.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,i)-s),this.elt(n,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var s=this.$getTop(t.start.row,i),o=i.lineHeight;this.elt(n,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))}}).call(s.prototype),t.Marker=s})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nh&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var u=s[o++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)for(;o0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],s=t,o=this.session.getNextFoldLine(s),a=o?o.start.row:1/0;s>a&&(s=o.end.row+1,a=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>n);){var l=this.$lines.createCell(s,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(c,s,s==a&&o),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),s++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\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,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var h=r[1],u=r[2],d=r[3],f=r[4],p=r[5];if(o.showSpaces||!u){var m=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,m&&l.appendChild(this.dom.createTextNode(m,this.element)),h){var g=o.session.getScreenTabSize(t+r.index);l.appendChild(o.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(u){if(o.showSpaces)(x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",x.textContent=s.stringRepeat(o.SPACE_CHAR,u.length),l.appendChild(x);else l.appendChild(this.com.createTextNode(u,this.element))}else if(d){(x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",x.textContent=s.stringRepeat(o.SPACE_CHAR,d.length),l.appendChild(x)}else if(f){t+=1,(x=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",x.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",x.textContent=o.showSpaces?o.SPACE_CHAR:f,l.appendChild(x)}else if(p){t+=1,(x=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",x.className="ace_cjk",x.textContent=p,l.appendChild(x)}}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])e.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),x=this.dom.createElement("span");"fold"==n.type&&(x.style.width=n.value.length*this.config.characterWidth+"px"),x.className=v,x.appendChild(l),e.appendChild(x)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,s=0;s=o;)a=this.$renderToken(l,a,h,u.substring(0,o-i)),u=u.substring(o-i),i=o,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(s.stringRepeat("\xa0",n.indent),this.element)),a=0,o=n[++r]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,r);n=this.$renderToken(e,n,i,r)}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=r?"":"",e.appendChild(s)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var s=this.session.getRowSplitData(t);if(s&&s.length){this.$renderWrappedLine(e,i,s);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,s,o,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,s=0;s+e[r].value.lengthn-t&&(o=o.substring(0,n-t)),i.push({type:e[r].type,value:o}),s=t+o.length,r+=1);sn?i.push({type:e[r].type,value:o.substring(0,n-s)}):i.push(e[r]),s+=o.length,r+=1}}(r,o,s))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||o.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):this.isCursorInView(o,e)?(i.setStyle(l,"display","block"),i.translate(a,o.left,o.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){i.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var h=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(h,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=h,t.VScrollBar=c,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.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(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=256,h="function"==typeof ResizeObserver,u=200,d=t.FontMetrics=function(e){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),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=o.onIdle((function t(){e.checkForSizeChanges(),o.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=s(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function o(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=o(this.els[0]),l=o(this.els[1]),c=o(this.els[2]),h=o(this.els[3]),d=n(i(h,l),i(h,c),i(r(l,c),r(h,a))),f=s(1+d[0],i(l,a)),p=s(1+d[1],i(c,a));if(t){var m=t,g=d[0]*m[0]/u+d[1]*m[1]/u+1,v=r(s(m[0],f),s(m[1],p));return r(s(1/g/u,v),a)}var x=i(e,a),b=n(i(f,s(d[0],x)),i(p,s(d[1],x)),x);return s(u,b)}}).call(d.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,d=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {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==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {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==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;r.importCssString(m,"ace_editor.css",!1);var x=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),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 o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),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=!g.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,p),this.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")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(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))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var s=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var s=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};if(i&&(e||o.height!=i)&&(o.height=i,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),n&&(e||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)}return o.$dirty=!n||!i,s&&this._signal("resize",a),s},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,s=n.top,o=n.left;s-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(s<0||s>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0]}else s+=this.lineHeight+2;else s+=this.lineHeight;(o-=this.scrollLeft)>this.$size.scrollerWidth-l&&(o=this.$size.scrollerWidth-l),o+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-l),Math.min(s,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,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()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,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()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",o=n.minHeight+"px";r.setStyle(this.content.style,"width",s),r.setStyle(this.content.style,"height",o)}if(e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),o=this.$horizScroll!==s;o&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var f,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),x=v+g,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),f=e.documentToScreenRow(v,0),p=e.getRowLength(v)*b,x=Math.min(e.screenToDocumentRow(x,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(x)*b+p,m=this.scrollTop-f*b;var w=0;return(this.layerConfig.width!=r||o)&&(w=this.CHANGE_H_SCROLL),(o||d)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:x,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,s=i.top,o=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+o>s?(t&&l+o>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):l+this.$size.scrollerHeight-ar?(r=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:a,side:s-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(o,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),s=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.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 e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var s={type:t,value:e},o=r.getTokens(n);if(null==i)o.push(s);else for(var a=0,l=0;l50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(s),c=[],h=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(u):u())}});h.setEmitSync=function(e){r=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)u()})),h},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,i,r,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){o.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var o=this.others.length-1;o>=0;o--){var a={row:(l=this.others[o]).row,column:l.column+s};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(o=this.others.length-1;o>=0;o--){var l;a={row:(l=this.others[o]).row,column:l.column+s};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.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},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.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(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],s=e.column0;)x--;if(x>0)for(var b=0;i[b].isEmpty();)b++;for(var y=x;y>=b;y--)i[y].isEmpty()&&i.splice(y,1)}return i}}.call(s.prototype);var d=e("./editor").Editor;function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(r?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new s(a);this.inVirtualSelectionMode=!0;for(var f=h.length;f--;){if(o)for(;f>0&&h[f].start.row==h[f-1].end.row;)f--;d.fromOrientedRange(h[f]),d.index=f,this.selection=a.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===p||(i=p),d.toOrientedRange(h[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;io&&(o=n.column),ih?e.insert(i,l.stringRepeat(" ",s-h)):e.remove(new r(i.row,i.column,i.row,i.column-s+h)),t.start.column=t.end.column=o,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,f=u==d;if(f){var p,m=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d0);u<0&&(u=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(u,d);g=this.$reAlignText(g,f),this.session.insert({row:u,column:0},g.join("\n")+"\n"),f||(h.start.column=0,h.end.column=g[g.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,r,s=!0,o=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(o=!1),n!=t[1].length&&(s=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:s?o?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,s=e.getLine(t),o=s.search(r);if(-1!=o){for(var a=n||s.length,l=e.getLength(),c=t,h=t;++tc){var f=e.getLine(h).length;return new i(c,a,h,f)}}},this.openingBracketBlock=function(e,t,n,r,s){var o={row:n,column:r+1},a=e.$findClosingBracket(t,o,s);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>o.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(o,a)}},this.closingBracketBlock=function(e,t,n,r,s){var o={row:n,column:r},a=e.$findOpeningBracket(t,o);if(a)return a.column++,o.column--,i.fromPoints(a,o)}}).call(r.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./lib/dom");function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,s=i.end.row,o="add"==e.action,a=r+1;at[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,s=0;s0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=r;o<=s;o++){var a=i[o];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var o=e.getCursorPosition(),a=o.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,h=function(e,t,n){var i=e.getAnnotations().sort(s.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var s=i+r>>1,o=n(t,e[s]);if(o>0)i=s+1;else{if(!(o<0))return s;r=s-1}}return-(i+1)}(i,{row:t,column:-1},s.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var o=i[r];if(o&&n){if(o.row===t){do{o=i[r+=n]}while(o&&o.row===t);if(!o)return i.slice()}var a=[];t=o.row;do{a[n<0?"unshift":"push"](o),o=i[r+=n]}while(o&&o.row==t);return a.length&&a}}}(n,a,t);if(h){var u=h[0];o.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,o.row=u.row,c=e.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(o.row),e.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(o).left;p.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),s=e("./lib/event"),o=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,h=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n.amdD,t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;o=l.value,e=r.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(o=e.textContent,e.innerHTML="");var c=t.createEditSession(o),u=new a(new h(e),c,n),d={document:c,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),s.addListener(window,"resize",d.onResize),u.on("destroy",(function(){s.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=o,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=h,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))},6866:function(e,t,n){e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),s=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,l=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){i.implement(this,r),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new s(new o(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r1024){for(var t=0,n=s.length-o;t=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(o)})),e.exports=l},4049:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8089:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7835:function(e,t,n){"use strict";var i=n(8593),r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={},o=i.version.split(".");function a(e,t){for(var n=t?t.split("."):o,i=e.split("."),r=0;r<3;r++){if(n[r]>i[r])return!0;if(n[r]0;){var s=i[r],o=t[s];if(o){var a=e[s],l=void 0===a||o(a,s,e);if(!0!==l)throw new TypeError("option "+s+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:r}},3589:function(e,t,n){"use strict";var i=n(4049),r=Object.prototype.toString;function s(e){return"[object Array]"===r.call(e)}function o(e){return"undefined"===typeof e}function a(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==r.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===r.call(e)}function h(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),s(e))for(var n=0,i=e.length;ni.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return o=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(o[0][0]=o[2][0]=n),o;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var h=this.diff_halfMatch_(e,i);if(h){var u=h[0],d=h[1],f=h[2],p=h[3],m=h[4],g=this.diff_main(u,f,r,s),v=this.diff_main(d,p,r,s);return g.concat([new t.Diff(0,m)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,s):this.diff_bisect_(e,i,s)},t.prototype.diff_lineMode_=function(e,i,r){var s=this.diff_linesToChars_(e,i);e=s.chars1,i=s.chars2;var o=s.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,o),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",d="";l=1&&h>=1){a.splice(l-c-h,c+h),l=l-c-h;for(var f=this.diff_main(u,d,!1,r),p=f.length-1;p>=0;p--)a.splice(l,0,f[p]);l+=f.length}h=0,c=0,u="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var s=e.length,o=i.length,a=Math.ceil((s+o)/2),l=a,c=2*a,h=new Array(c),u=new Array(c),d=0;dr);b++){for(var y=-b+m;y<=b-g;y+=2){for(var w=l+y,j=($=y==-b||y!=b&&h[w-1]s)g+=2;else if(j>o)m+=2;else if(p){if((C=l+f-y)>=0&&C=(S=s-u[C]))return this.diff_bisectSplit_(e,i,$,j,r)}}for(var k=-b+v;k<=b-x;k+=2){for(var S,C=l+k,T=(S=k==-b||k!=b&&u[C-1]s)x+=2;else if(T>o)v+=2;else if(!p){if((w=l+f-k)>=0&&w=(S=s-S))return this.diff_bisectSplit_(e,i,$,j,r)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var s=e.substring(0,n),o=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(s,o,!1,r),h=this.diff_main(a,l,!1,r);return c.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,o=-1,a=n.length;oi?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,s,o,a,h]:null}var o,a,l,c,h,u=s(n,i,Math.ceil(n.length/4)),d=s(n,i,Math.ceil(n.length/2));return u||d?(o=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(a=o[0],l=o[1],c=o[2],h=o[3]):(c=o[0],h=o[1],a=o[2],l=o[3]),[a,l,c,h,o[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],s=0,o=null,a=0,l=0,c=0,h=0,u=0;a0?r[s-1]:-1,l=0,c=0,h=0,u=0,o=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=m?(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,p))),e[a-1][1]=d.substring(0,d.length-p),e[a+1][1]=f.substring(p),a++):(m>=d.length/2||m>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,m))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-m),e[a+1][0]=n,e[a+1][1]=d.substring(m),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),s=i.match(t.nonAlphaNumericRegex_),o=r.match(t.nonAlphaNumericRegex_),a=s&&i.match(t.whitespaceRegex_),l=o&&r.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),h=l&&r.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),d=h&&n.match(t.blanklineStartRegex_);return u||d?5:c||h?4:s&&!a&&l?3:a||l?2:s||o?1:0}for(var i=1;i=d&&(d=f,c=r,h=s,u=o)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=h,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],s=0,o=null,a=0,l=!1,c=!1,h=!1,u=!1;a0?r[s-1]:-1,h=u=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,s=0,o=0,a="",l="";r1?(0!==s&&0!==o&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-s-o>0&&0==e[r-s-o-1][0]?e[r-s-o-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=s+o,e.splice(r,s+o),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,o=0,s=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;rt));i++)o=r,a=s;return e.length!=i&&e[i][0]===n?a:a+(t-o)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,o=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function s(e,i){var s=e/t.length,o=Math.abs(n-i);return r.Match_Distance?s+o/r.Match_Distance:o?1:s}var o=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(o=Math.min(s(0,a),o),-1!=(a=e.lastIndexOf(t,n+t.length))&&(o=Math.min(s(0,a),o)));var l,c,h=1<=p;v--){var x=i[e.charAt(v-1)];if(g[v]=0===f?(g[v+1]<<1|1)&x:(g[v+1]<<1|1)&x|(u[v+1]|u[v])<<1|1|u[v+1],g[v]&h){var b=s(f,v-1);if(b<=o){if(o=b,!((a=v-1)>n))break;p=Math.max(1,2*n-a)}}}if(s(f+1,n)>o)break;u=g}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(e&&"object"==typeof e&&"undefined"==typeof i&&"undefined"==typeof r)o=e,s=this.diff_text1(o);else if("string"==typeof e&&i&&"object"==typeof i&&"undefined"==typeof r)s=e,o=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");s=e,o=r}if(0===o.length)return[];for(var a=[],l=new t.patch_obj,c=0,h=0,u=0,d=s,f=s,p=0;p=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=f,h=u)}1!==m&&(h+=g.length),m!==n&&(u+=g.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,h.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),c+h.length-this.Match_MaxBits))||a>=u)&&(a=-1):a=this.match_main(t,h,c),-1==a)s[o]=!1,r-=e[o].length2-e[o].length1;else if(s[o]=!0,r=a-c,h==(l=-1==u?t.substring(a,a+h.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[o].diffs)+t.substring(a+h.length);else{var d=this.diff_main(h,l,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(d)/h.length>this.Patch_DeleteThreshold)s[o]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,p=0,m=0;mo[0][1].length){var a=n-o[0][1].length;o[0][1]=i.substring(o[0][1].length)+o[0][1],s.start1-=a,s.start2-=a,s.length1+=a,s.length2+=a}if(0==(o=(s=e[e.length-1]).diffs).length||0!=o[o.length-1][0])o.push(new t.Diff(0,i)),s.length1+=n,s.length2+=n;else if(n>o[o.length-1][1].length){a=n-o[o.length-1][1].length;o[o.length-1][1]+=i.substring(0,a),s.length1+=a,s.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(c.length1+=d.length,o+=d.length,h=!1,c.diffs.push(new t.Diff(u,d)),s.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,o+=d.length,0===u?(c.length2+=d.length,a+=d.length):h=!1,c.diffs.push(new t.Diff(u,d)),d==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),h||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n-1},_.prototype.set=function(e,t){var n=this.__data__,i=I(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new L,map:new(T||_),string:new L}},M.prototype.delete=function(e){return R(this,e).delete(e)},M.prototype.get=function(e){return R(this,e).get(e)},M.prototype.has=function(e){return R(this,e).has(e)},M.prototype.set=function(e,t){return R(this,e).set(e,t),this};var N=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,i,r){n.push(i?r.replace(h,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o),o};return n.cache=new(B.Cache||M),n}B.Cache=M;var z=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==j.call(e)}e.exports=function(e,t,n){var i=null==e?void 0:P(e,t);return void 0===i?n:i}},2467:function(e,t,n){e=n.nmd(e);var i="__lodash_hash_undefined__",r=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",h="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",x="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",j=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[s]=S[o]=S[y]=S[a]=S[w]=S[l]=S[c]=S[h]=S[u]=S[d]=S[f]=S[m]=S[g]=S[v]=S[b]=!1;var C="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,T="object"==typeof self&&self&&self.Object===Object&&self,$=C||T||Function("return this")(),A=t&&!t.nodeType&&t,E=A&&e&&!e.nodeType&&e,L=E&&E.exports===A,_=L&&C.process,M=function(){try{return _&&_.binding&&_.binding("util")}catch(e){}}(),I=M&&M.isTypedArray;function P(e,t){for(var n=-1,i=null==e?0:e.length;++na))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var h=-1,u=!0,d=2&n?new be:void 0;for(s.set(e,t),s.set(t,e);++h-1},ve.prototype.set=function(e,t){var n=this.__data__,i=je(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(re||ve),string:new ge}},xe.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Le(this,e).get(e)},xe.prototype.has=function(e){return Le(this,e).has(e)},xe.prototype.set=function(e,t){var n=Le(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,i),this},be.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.clear=function(){this.__data__=new ve,this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ye.prototype.get=function(e){return this.__data__.get(e)},ye.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var i=n.__data__;if(!re||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(i)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=r}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ue(e){return null!=e&&"object"==typeof e}var We=I?function(e){return function(t){return e(t)}}(I):function(e){return Ue(e)&&ze(e.length)&&!!S[ke(e)]};function Ve(e){return null!=(t=e)&&ze(t.length)&&!Be(t)?we(e):$e(e);var t}e.exports=function(e,t){return Ce(e,t)}},3700:function(e,t){"use strict";function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}var d=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(c(Error)),f=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(d),p=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(d),m=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(d),g=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),v=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(d),x=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),b=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(d),y="numeric",w="short",j="long",k={year:y,month:y,day:y},S={year:y,month:w,day:y},C={year:y,month:w,day:y,weekday:w},T={year:y,month:j,day:y},$={year:y,month:j,day:y,weekday:j},A={hour:y,minute:y},E={hour:y,minute:y,second:y},L={hour:y,minute:y,second:y,timeZoneName:w},_={hour:y,minute:y,second:y,timeZoneName:j},M={hour:y,minute:y,hour12:!1},I={hour:y,minute:y,second:y,hour12:!1},P={hour:y,minute:y,second:y,hour12:!1,timeZoneName:w},O={hour:y,minute:y,second:y,hour12:!1,timeZoneName:j},R={year:y,month:y,day:y,hour:y,minute:y},D={year:y,month:y,day:y,hour:y,minute:y,second:y},N={year:y,month:w,day:y,hour:y,minute:y},F={year:y,month:w,day:y,hour:y,minute:y,second:y},B={year:y,month:w,day:y,weekday:w,hour:y,minute:y},z={year:y,month:j,day:y,hour:y,minute:y,timeZoneName:w},H={year:y,month:j,day:y,hour:y,minute:y,second:y,timeZoneName:w},U={year:y,month:j,day:y,weekday:j,hour:y,minute:y,timeZoneName:j},W={year:y,month:j,day:y,weekday:j,hour:y,minute:y,second:y,timeZoneName:j};function V(e){return"undefined"===typeof e}function K(e){return"number"===typeof e}function q(e){return"number"===typeof e&&e%1===0}function G(){try{return"undefined"!==typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Y(){return!V(Intl.DateTimeFormat.prototype.formatToParts)}function Z(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function J(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function X(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ee(e,t,n){return q(e)&&e>=t&&e<=n}function te(e,t){void 0===t&&(t=2);var n=e<0?"-":"",i=n?-1*e:e;return""+n+(i.toString().length=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ce(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function he(e){return e>99?e:e>60?1900+e:2e3+e}function ue(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);var o=Object.assign({timeZoneName:t},s),a=G();if(a&&Y()){var l=new Intl.DateTimeFormat(n,o).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return l?l.value:null}if(a){var c=new Intl.DateTimeFormat(n,s).format(r);return new Intl.DateTimeFormat(n,o).format(r).substring(c.length).replace(/^[, \u200e]+/,"")}return null}function de(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function fe(e){var t=Number(e);if("boolean"===typeof e||""===e||Number.isNaN(t))throw new x("Invalid unit value "+e);return t}function pe(e,t,n){var i={};for(var r in e)if(Q(e,r)){if(n.indexOf(r)>=0)continue;var s=e[r];if(void 0===s||null===s)continue;i[t(r)]=fe(s)}return i}function me(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+te(n,2)+":"+te(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+te(n,2)+te(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function ge(e){return X(e,["hour","minute","second","millisecond"])}var ve=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function xe(e){return JSON.stringify(e,Object.keys(e).sort())}var be=["January","February","March","April","May","June","July","August","September","October","November","December"],ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],we=["J","F","M","A","M","J","J","A","S","O","N","D"];function je(e){switch(e){case"narrow":return[].concat(we);case"short":return[].concat(ye);case"long":return[].concat(be);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var ke=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Se=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return[].concat(Ce);case"short":return[].concat(Se);case"long":return[].concat(ke);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var $e=["AM","PM"],Ae=["Before Christ","Anno Domini"],Ee=["BC","AD"],Le=["B","A"];function _e(e){switch(e){case"narrow":return[].concat(Le);case"short":return[].concat(Ee);case"long":return[].concat(Ae);default:return null}}function Me(e,t){for(var n,i="",r=u(e);!(n=r()).done;){var s=n.value;s.literal?i+=s.val:i+=t(s.val)}return i}var Ie={D:k,DD:S,DDD:T,DDDD:$,t:A,tt:E,ttt:L,tttt:_,T:M,TT:I,TTT:P,TTTT:O,f:R,ff:N,fff:z,ffff:U,F:D,FF:F,FFF:H,FFFF:W},Pe=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],s=0;s0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||o===t?n+=o:(n.length>0&&r.push({literal:!1,val:n}),n=o,t=o)}return n.length>0&&r.push({literal:i,val:n}),r},e.macroTokenToFormatOpts=function(e){return Ie[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return te(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Y(),o=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},l=function(){return r?function(e){return $e[e.hour<12?0:1]}(t):o({hour:"numeric",hour12:!0},"dayperiod")},c=function(e,n){return r?function(e,t){return je(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},h=function(e,n){return r?function(e,t){return Te(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){return r?function(e,t){return _e(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return Me(e.parseFormat(n),(function(n){switch(n){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12===0?12:t.hour%12);case"hh":return i.num(t.hour%12===0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return s?o({day:"numeric"},"day"):i.num(t.day);case"dd":return s?o({day:"2-digit"},"day"):i.num(t.day,2);case"c":case"E":return i.num(t.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?o({month:"numeric"},"month"):i.num(t.month);case"MM":return s?o({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?o({year:"numeric"},"year"):i.num(t.year);case"yy":return s?o({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):i.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var i,r=this,s=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=e.parseFormat(n),a=o.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),l=t.shiftTo.apply(t,a.map(s).filter((function(e){return e})));return Me(o,(i=l,function(e){var t=s(e);return t?r.num(i.get(t),e.length):e}))},e}(),Oe=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Re=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new b},t.formatOffset=function(e,t){throw new b},t.offset=function(e){throw new b},t.equals=function(e){throw new b},i(e,[{key:"type",get:function(){throw new b}},{key:"name",get:function(){throw new b}},{key:"universal",get:function(){throw new b}},{key:"isValid",get:function(){throw new b}}]),e}(),De=null,Ne=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.offsetName=function(e,t){return ue(e,t.format,t.locale)},n.formatOffset=function(e,t){return me(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},i(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return G()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===De&&(De=new t),De}}]),t}(Re),Fe=RegExp("^"+ve.source+"$"),Be={};var ze={year:0,month:1,day:2,hour:3,minute:4,second:5};var He={},Ue=function(e){function t(n){var i;return(i=e.call(this)||this).zoneName=n,i.valid=t.isValidZone(n),i}r(t,e),t.create=function(e){return He[e]||(He[e]=new t(e)),He[e]},t.resetCache=function(){He={},Be={}},t.isValidSpecifier=function(e){return!(!e||!e.match(Fe))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(t){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return ue(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return me(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,i=(n=this.name,Be[n]||(Be[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Be[n]),r=i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],r=0;r=0?h:1e3+h))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},i(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Re),We=null,Ve=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(de(n[1],n[2]))}return null},i(t,null,[{key:"utcInstance",get:function(){return null===We&&(We=new t(0)),We}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return me(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},i(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+me(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Re),Ke=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},i(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Re);function qe(e,t){var n;if(V(e)||null===e)return t;if(e instanceof Re)return e;if("string"===typeof e){var i=e.toLowerCase();return"local"===i?t:"utc"===i||"gmt"===i?Ve.utcInstance:null!=(n=Ue.parseGMTOffset(e))?Ve.instance(n):Ue.isValidSpecifier(i)?Ue.create(e):Ve.parseSpecifier(i)||new Ke(e)}return K(e)?Ve.instance(e):"object"===typeof e&&e.offset&&"number"===typeof e.offset?e:new Ke(e)}var Ge=function(){return Date.now()},Ye=null,Ze=null,Je=null,Xe=null,Qe=!1,et=function(){function e(){}return e.resetCaches=function(){ut.resetCache(),Ue.resetCache()},i(e,null,[{key:"now",get:function(){return Ge},set:function(e){Ge=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ye=e?qe(e):null}},{key:"defaultZone",get:function(){return Ye||Ne.instance}},{key:"defaultLocale",get:function(){return Ze},set:function(e){Ze=e}},{key:"defaultNumberingSystem",get:function(){return Je},set:function(e){Je=e}},{key:"defaultOutputCalendar",get:function(){return Xe},set:function(e){Xe=e}},{key:"throwOnInvalid",get:function(){return Qe},set:function(e){Qe=e}}]),e}(),tt={};function nt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=tt[n];return i||(i=new Intl.DateTimeFormat(e,t),tt[n]=i),i}var it={};var rt={};function st(e,t){void 0===t&&(t={});var n=t,i=(n.base,function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r}(n,["base"])),r=JSON.stringify([e,i]),s=rt[r];return s||(s=new Intl.RelativeTimeFormat(e,t),rt[r]=s),s}var ot=null;function at(e,t,n,i,r){var s=e.listingMode(n);return"error"===s?null:"en"===s?i(t):r(t)}var lt=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&G()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=it[n];return i||(i=new Intl.NumberFormat(e,t),it[n]=i),i}(e,i)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return te(this.floor?Math.floor(e):re(e,3),this.padTo)},e}(),ct=function(){function e(e,t,n){var i;if(this.opts=n,this.hasIntl=G(),e.zone.universal&&this.hasIntl){var r=e.offset/60*-1,s=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r,o=Ue.isValidZone(s);0!==e.offset&&o?(i=s,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:fi.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);if(this.hasIntl){var a=Object.assign({},this.opts);i&&(a.timeZone=i),this.dtf=nt(t,a)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(xe(X(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case xe(k):return"M/d/yyyy";case xe(S):return"LLL d, yyyy";case xe(C):return"EEE, LLL d, yyyy";case xe(T):return"LLLL d, yyyy";case xe($):return"EEEE, LLLL d, yyyy";case xe(A):return"h:mm a";case xe(E):return"h:mm:ss a";case xe(L):case xe(_):return"h:mm a";case xe(M):return"HH:mm";case xe(I):return"HH:mm:ss";case xe(P):case xe(O):return"HH:mm";case xe(R):return"M/d/yyyy, h:mm a";case xe(N):return"LLL d, yyyy, h:mm a";case xe(z):return"LLLL d, yyyy, h:mm a";case xe(U):return t;case xe(D):return"M/d/yyyy, h:mm:ss a";case xe(F):return"LLL d, yyyy, h:mm:ss a";case xe(B):return"EEE, d LLL yyyy, h:mm a";case xe(H):return"LLLL d, yyyy, h:mm:ss a";case xe(W):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=ut.create("en-US");return Pe.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Y()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),ht=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&Z()&&(this.rtf=st(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+r[e][0];case-1:return o?"yesterday":"last "+r[e][0];case 0:return o?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,l=Math.abs(t),c=1===l,h=r[e],u=i?c?h[1]:h[2]||h[1]:c?r[e][0]:e;return a?l+" "+u+" ago":"in "+l+" "+u}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ut=function(){function e(e,t,n,i){var r=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,i=e.substring(0,t);try{n=nt(e).resolvedOptions()}catch(s){n=nt(i).resolvedOptions()}var r=n;return[i,r.numberingSystem,r.calendar]}(e),s=r[0],o=r[1],a=r[2];this.locale=s,this.numberingSystem=t||o||null,this.outputCalendar=n||a||null,this.intl=function(e,t,n){return G()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,i,r){void 0===r&&(r=!1);var s=t||et.defaultLocale;return new e(s||(r?"en-US":function(){if(ot)return ot;if(G()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return ot=e&&"und"!==e?e:"en-US"}return ot="en-US"}()),n||et.defaultNumberingSystem,i||et.defaultOutputCalendar,s)},e.resetCache=function(){ot=null,tt={},it={},rt={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,s=n.outputCalendar;return e.create(i,r,s)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=G()&&Y(),n=this.isEnglish(),i=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),at(this,e,n,je,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return i.monthsCache[r][e]||(i.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var i=fi.utc(2016,n,1);t.push(e(i))}return t}((function(e){return i.extract(e,n,"month")}))),i.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),at(this,e,n,Te,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return i.weekdaysCache[r][e]||(i.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var i=fi.utc(2016,11,13+n);t.push(e(i))}return t}((function(e){return i.extract(e,n,"weekday")}))),i.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),at(this,void 0,e,(function(){return $e}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[fi.utc(2016,11,13,9),fi.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),at(this,e,t,_e,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[fi.utc(-40,1,1),fi.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return i?i.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new lt(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ct(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new ht(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||G()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},i(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||G()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function dt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i3?ke.indexOf(e)+1:Se.indexOf(e)+1),a}var Pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ot(e){var t,n=e[1],i=e[2],r=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],f=It(n,s,r,i,o,a,l);return t=c?Mt[c]:h?0:de(u,d),[f,new Ve(t)]}var Rt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Dt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Nt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ft(e){var t=e[1],n=e[2],i=e[3];return[It(t,e[4],i,n,e[5],e[6],e[7]),Ve.utcInstance]}function Bt(e){var t=e[1],n=e[2],i=e[3],r=e[4],s=e[5],o=e[6];return[It(t,e[7],n,i,r,s,o),Ve.utcInstance]}var zt=dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,bt),Ht=dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,bt),Ut=dt(/(\d{4})-?(\d{3})/,bt),Wt=dt(xt),Vt=ft(Ct,Tt,$t),Kt=ft(yt,Tt,$t),qt=ft(wt,Tt,$t),Gt=ft(Tt,$t);var Yt=ft(Tt);var Zt=dt(/(\d{4})-(\d\d)-(\d\d)/,kt),Jt=dt(jt),Xt=ft(Ct,Tt,$t,At),Qt=ft(Tt,$t,At);var en={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},tn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},en),nn=365.2425,rn=30.436875,sn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:nn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:rn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},en),on=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],an=on.slice(0).reverse();function ln(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new hn(i)}function cn(e,t,n,i,r){var s=e[r][n],o=t[n]/s,a=!(Math.sign(o)===Math.sign(i[r]))&&0!==i[r]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);i[r]+=a,t[n]-=a*s}var hn=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ut.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?sn:tn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!==typeof t)throw new x("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:pe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ut.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var i=function(e){return pt(e,[Lt,_t])}(t),r=i[0];if(r){var s=Object.assign(r,n);return e.fromObject(s)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var i=function(e){return pt(e,[Et,Yt])}(t),r=i[0];if(r){var s=Object.assign(r,n);return e.fromObject(s)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new x("need to specify a reason the Duration is invalid");var i=t instanceof Oe?t:new Oe(t,n);if(et.throwOnInvalid)throw new m(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new v(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Pe.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=re(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=un(e),i={},r=u(on);!(t=r()).done;){var s=t.value;(Q(n.values,s)||Q(this.values,s))&&(i[s]=n.get(s)+this.get(s))}return ln(this,{values:i},!0)},t.minus=function(e){if(!this.isValid)return this;var t=un(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n=0){r=h;var d=0;for(var f in a)d+=this.matrix[f][h]*a[f],a[f]=0;K(l[h])&&(d+=l[h]);var p=Math.trunc(d);for(var m in o[h]=p,a[h]=d-p,l)on.indexOf(m)>on.indexOf(h)&&cn(this.matrix,l,m,o,h)}else K(l[h])&&(a[h]=l[h])}for(var g in a)0!==a[g]&&(o[r]+=g===r?a[g]:a[g]/this.matrix[r][g]);return ln(this,{values:o},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);te},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,i=n.start,r=n.end;return this.isValid?e.fromDateTimes(i||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r+this.e?this.e:c;o.push(e.fromDateTimes(a,h)),a=h,l+=1}return o},t.splitBy=function(t){var n=un(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r=this.s,s=1,o=[];r+this.e?this.e:a,o.push(e.fromDateTimes(r,i)),r=i,s+=1}return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,i=this.e=i?null:e.fromDateTimes(n,i)},t.union=function(t){if(!this.isValid)return this;var n=this.st.e?this.e:t.e;return e.fromDateTimes(n,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},e.xor=function(t){for(var n,i,r=null,s=0,o=[],a=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),l=u((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(i=l()).done;){var c=i.value;1===(s+="s"===c.type?1:-1)?r=c.time:(r&&+r!==+c.time&&o.push(e.fromDateTimes(r,c.time)),r=null)}return e.merge(o)},t.difference=function(){for(var t=this,n=arguments.length,i=new Array(n),r=0;r=0){var u;i=c;var d,f=h(e,t);(r=e.plus(((u={})[c]=f,u)))>t?(e=e.plus(((d={})[c]=f-1,d)),f-=1):e=r,s[c]=f}}return[e,s,r,i]}(e,t,n),s=r[0],o=r[1],a=r[2],l=r[3],c=t-s,h=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===h.length){var u;if(a0?(d=hn.fromMillis(c,i)).shiftTo.apply(d,h).plus(f):f}var xn={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"},bn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},yn=xn.hanidec.replace(/[\[|\]]/g,"").split("");function wn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+xn[n||"latn"]+t)}function jn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n=o&&i<=a&&(t+=i-o)}}return parseInt(t,10)}return t}(n))}}}var kn="( |"+String.fromCharCode(160)+")",Sn=new RegExp(kn,"g");function Cn(e){return e.replace(/\./g,"\\.?").replace(Sn,kn)}function Tn(e){return e.replace(/\./g,"").replace(Sn," ").toLowerCase()}function $n(e,t){return null===e?null:{regex:RegExp(e.map(Cn).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return Tn(i)===Tn(e)}))+t}}}function An(e,t){return{regex:e,deser:function(e){return de(e[1],e[2])},groups:t}}function En(e){return{regex:e,deser:function(e){return e[0]}}}var Ln={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var _n=null;function Mn(e,t){if(e.literal)return e;var n=Pe.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Pe.create(t,n).formatDateTimeParts((_n||(_n=fi.fromMillis(1555555555555)),_n)).map((function(e){return function(e,t,n){var i=e.type,r=e.value;if("literal"===i)return{literal:!0,val:r};var s=n[i],o=Ln[i];return"object"===typeof o&&(o=o[s]),o?{literal:!1,val:o}:void 0}(e,0,n)}));return i.includes(void 0)?e:i}function In(e,t,n){var i=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Mn(e,t)})))}(Pe.parseFormat(n),e),r=i.map((function(t){return function(e,t){var n=wn(t),i=wn(t,"{2}"),r=wn(t,"{3}"),s=wn(t,"{4}"),o=wn(t,"{6}"),a=wn(t,"{1,2}"),l=wn(t,"{1,3}"),c=wn(t,"{1,6}"),h=wn(t,"{1,9}"),u=wn(t,"{2,4}"),d=wn(t,"{4,6}"),f=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},p=function(p){if(e.literal)return f(p);switch(p.val){case"G":return $n(t.eras("short",!1),0);case"GG":return $n(t.eras("long",!1),0);case"y":return jn(c);case"yy":case"kk":return jn(u,he);case"yyyy":case"kkkk":return jn(s);case"yyyyy":return jn(d);case"yyyyyy":return jn(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return jn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return jn(i);case"MMM":return $n(t.months("short",!0,!1),1);case"MMMM":return $n(t.months("long",!0,!1),1);case"LLL":return $n(t.months("short",!1,!1),1);case"LLLL":return $n(t.months("long",!1,!1),1);case"o":case"S":return jn(l);case"ooo":case"SSS":return jn(r);case"u":return En(h);case"a":return $n(t.meridiems(),0);case"E":case"c":return jn(n);case"EEE":return $n(t.weekdays("short",!1,!1),1);case"EEEE":return $n(t.weekdays("long",!1,!1),1);case"ccc":return $n(t.weekdays("short",!0,!1),1);case"cccc":return $n(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return An(new RegExp("([+-]"+a.source+")(?::("+i.source+"))?"),2);case"ZZZ":return An(new RegExp("([+-]"+a.source+")("+i.source+")?"),2);case"z":return En(/[a-z_+-/]{1,256}?/i);default:return f(p)}}(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)})),s=r.find((function(e){return e.invalidReason}));if(s)return{input:t,tokens:i,invalidReason:s.invalidReason};var o=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),a=o[0],l=o[1],c=RegExp(a,"i"),h=function(e,t,n){var i=e.match(t);if(i){var r={},s=1;for(var o in n)if(Q(n,o)){var a=n[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,r]}return[i,{}]}(t,c,l),u=h[0],d=h[1],f=d?function(e){var t;return t=V(e.Z)?V(e.z)?null:Ue.create(e.z):new Ve(e.Z),V(e.q)||(e.M=3*(e.q-1)+1),V(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),V(e.u)||(e.S=ie(e.u)),[Object.keys(e).reduce((function(t,n){var i=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(t[i]=e[n]),t}),{}),t]}(d):[null,null],p=f[0],m=f[1];if(Q(d,"a")&&Q(d,"H"))throw new g("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:c,rawMatches:u,matches:d,result:p,zone:m}}var Pn=[0,31,59,90,120,151,181,212,243,273,304,334],On=[0,31,60,91,121,152,182,213,244,274,305,335];function Rn(e,t){return new Oe("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Dn(e,t,n){var i=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===i?7:i}function Nn(e,t,n){return n+(se(e)?On:Pn)[t-1]}function Fn(e,t){var n=se(e)?On:Pn,i=n.findIndex((function(e){return ece(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:o},ge(e))}function zn(e){var t,n=e.weekYear,i=e.weekNumber,r=e.weekday,s=Dn(n,1,4),o=oe(n),a=7*i+r-s-3;a<1?a+=oe(t=n-1):a>o?(t=n+1,a-=oe(n)):t=n;var l=Fn(t,a),c=l.month,h=l.day;return Object.assign({year:t,month:c,day:h},ge(e))}function Hn(e){var t=e.year,n=Nn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},ge(e))}function Un(e){var t=e.year,n=Fn(t,e.ordinal),i=n.month,r=n.day;return Object.assign({year:t,month:i,day:r},ge(e))}function Wn(e){var t=q(e.year),n=ee(e.month,1,12),i=ee(e.day,1,ae(e.year,e.month));return t?n?!i&&Rn("day",e.day):Rn("month",e.month):Rn("year",e.year)}function Vn(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,s=ee(t,0,23)||24===t&&0===n&&0===i&&0===r,o=ee(n,0,59),a=ee(i,0,59),l=ee(r,0,999);return s?o?a?!l&&Rn("millisecond",r):Rn("second",i):Rn("minute",n):Rn("hour",t)}var Kn="Invalid DateTime",qn=864e13;function Gn(e){return new Oe("unsupported zone",'the zone "'+e.name+'" is not supported')}function Yn(e){return null===e.weekData&&(e.weekData=Bn(e.c)),e.weekData}function Zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fi(Object.assign({},n,t,{old:n}))}function Jn(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var s=n.offset(i);return r===s?[i,r]:[e-60*Math.min(r,s)*1e3,Math.max(r,s)]}function Xn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Qn(e,t,n){return Jn(le(e),t,n)}function ei(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s=Object.assign({},e.c,{year:i,month:r,day:Math.min(e.c.day,ae(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=hn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Jn(le(s),n,e.zone),l=a[0],c=a[1];return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function ti(e,t,n,i,r){var s=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var a=t||o,l=fi.fromObject(Object.assign(e,n,{zone:a,setZone:void 0}));return s?l:l.setZone(o)}return fi.invalid(new Oe("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function ni(e,t,n){return void 0===n&&(n=!0),e.isValid?Pe.create(ut.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ii(e,t){var n=t.suppressSeconds,i=void 0!==n&&n,r=t.suppressMilliseconds,s=void 0!==r&&r,o=t.includeOffset,a=t.includePrefix,l=void 0!==a&&a,c=t.includeZone,h=void 0!==c&&c,u=t.spaceZone,d=void 0!==u&&u,f=t.format,p=void 0===f?"extended":f,m="basic"===p?"HHmm":"HH:mm";i&&0===e.second&&0===e.millisecond||(m+="basic"===p?"ss":":ss",s&&0===e.millisecond||(m+=".SSS")),(h||o)&&d&&(m+=" "),h?m+="z":o&&(m+="basic"===p?"ZZZ":"ZZ");var g=ni(e,m);return l&&(g="T"+g),g}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},si={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},oi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ai=["year","month","day","hour","minute","second","millisecond"],li=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ci=["year","ordinal","hour","minute","second","millisecond"];function hi(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new v(e);return t}function ui(e,t){for(var n,i=u(ai);!(n=i()).done;){var r=n.value;V(e[r])&&(e[r]=ri[r])}var s=Wn(e)||Vn(e);if(s)return fi.invalid(s);var o=et.now(),a=Qn(e,t.offset(o),t),l=a[0],c=a[1];return new fi({ts:l,zone:t,o:c})}function di(e,t,n){var i=!!V(n.round)||n.round,r=function(e,r){return e=re(e,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},s=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(s(n.unit),n.unit);for(var o,a=u(n.units);!(o=a()).done;){var l=o.value,c=s(l);if(Math.abs(c)>=1)return r(c,l)}return r(e>t?-0:0,n.units[n.units.length-1])}var fi=function(){function e(e){var t=e.zone||et.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Oe("invalid input"):null)||(t.isValid?null:Gn(t));this.ts=V(e.ts)?et.now():e.ts;var i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var s=[e.old.c,e.old.o];i=s[0],r=s[1]}else{var o=t.offset(this.ts);i=Xn(this.ts,o),i=(n=Number.isNaN(i.year)?new Oe("invalid input"):null)?null:i,r=n?null:o}this._zone=t,this.loc=e.loc||ut.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,i,r,s,o,a){return V(t)?e.now():ui({year:t,month:n,day:i,hour:r,minute:s,second:o,millisecond:a},et.defaultZone)},e.utc=function(t,n,i,r,s,o,a){return V(t)?new e({ts:et.now(),zone:Ve.utcInstance}):ui({year:t,month:n,day:i,hour:r,minute:s,second:o,millisecond:a},Ve.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var i,r=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);if(Number.isNaN(r))return e.invalid("invalid input");var s=qe(n.zone,et.defaultZone);return s.isValid?new e({ts:r,zone:s,loc:ut.fromObject(n)}):e.invalid(Gn(s))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),K(t))return t<-qn||t>qn?e.invalid("Timestamp out of range"):new e({ts:t,zone:qe(n.zone,et.defaultZone),loc:ut.fromObject(n)});throw new x("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),K(t))return new e({ts:1e3*t,zone:qe(n.zone,et.defaultZone),loc:ut.fromObject(n)});throw new x("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=qe(t.zone,et.defaultZone);if(!n.isValid)return e.invalid(Gn(n));var i=et.now(),r=n.offset(i),s=pe(t,hi,["zone","locale","outputCalendar","numberingSystem"]),o=!V(s.ordinal),a=!V(s.year),l=!V(s.month)||!V(s.day),c=a||l,h=s.weekYear||s.weekNumber,d=ut.fromObject(t);if((c||o)&&h)throw new g("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new g("Can't mix ordinal dates with month/day");var f,p,m=h||s.weekday&&!c,v=Xn(i,r);m?(f=li,p=si,v=Bn(v)):o?(f=ci,p=oi,v=Hn(v)):(f=ai,p=ri);for(var x,b=!1,y=u(f);!(x=y()).done;){var w=x.value;V(s[w])?s[w]=b?p[w]:v[w]:b=!0}var j=m?function(e){var t=q(e.weekYear),n=ee(e.weekNumber,1,ce(e.weekYear)),i=ee(e.weekday,1,7);return t?n?!i&&Rn("weekday",e.weekday):Rn("week",e.week):Rn("weekYear",e.weekYear)}(s):o?function(e){var t=q(e.year),n=ee(e.ordinal,1,oe(e.year));return t?!n&&Rn("ordinal",e.ordinal):Rn("year",e.year)}(s):Wn(s),k=j||Vn(s);if(k)return e.invalid(k);var S=Qn(m?zn(s):o?Un(s):s,r,n),C=new e({ts:S[0],zone:n,o:S[1],loc:d});return s.weekday&&c&&t.weekday!==C.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+s.weekday+" and a date of "+C.toISO()):C},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[zt,Vt],[Ht,Kt],[Ut,qt],[Wt,Gt])}(e);return ti(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return pt(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Pt,Ot])}(e);return ti(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Rt,Ft],[Dt,Ft],[Nt,Bt])}(e);return ti(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,i){if(void 0===i&&(i={}),V(t)||V(n))throw new x("fromFormat requires an input string and a format");var r=i,s=r.locale,o=void 0===s?null:s,a=r.numberingSystem,l=void 0===a?null:a,c=function(e,t,n){var i=In(e,t,n);return[i.result,i.zone,i.invalidReason]}(ut.fromOpts({locale:o,numberingSystem:l,defaultToEN:!0}),t,n),h=c[0],u=c[1],d=c[2];return d?e.invalid(d):ti(h,u,i,"format "+n,t)},e.fromString=function(t,n,i){return void 0===i&&(i={}),e.fromFormat(t,n,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Zt,Xt],[Jt,Qt])}(e);return ti(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new x("need to specify a reason the DateTime is invalid");var i=t instanceof Oe?t:new Oe(t,n);if(et.throwOnInvalid)throw new f(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Pe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Ve.instance(e),t)},t.toLocal=function(){return this.setZone(et.defaultZone)},t.setZone=function(t,n){var i=void 0===n?{}:n,r=i.keepLocalTime,s=void 0!==r&&r,o=i.keepCalendarTime,a=void 0!==o&&o;if((t=qe(t,et.defaultZone)).equals(this.zone))return this;if(t.isValid){var l=this.ts;if(s||a){var c=t.offset(this.ts);l=Qn(this.toObject(),c,t)[0]}return Zn(this,{ts:l,zone:t})}return e.invalid(Gn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar;return Zn(this,{loc:this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=pe(e,hi,[]),i=!V(n.weekYear)||!V(n.weekNumber)||!V(n.weekday),r=!V(n.ordinal),s=!V(n.year),o=!V(n.month)||!V(n.day),a=s||o,l=n.weekYear||n.weekNumber;if((a||r)&&l)throw new g("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new g("Can't mix ordinal dates with month/day");i?t=zn(Object.assign(Bn(this.c),n)):V(n.ordinal)?(t=Object.assign(this.toObject(),n),V(n.day)&&(t.day=Math.min(ae(t.year,t.month),t.day))):t=Un(Object.assign(Hn(this.c),n));var c=Qn(t,this.o,this.zone);return Zn(this,{ts:c[0],o:c[1]})},t.plus=function(e){return this.isValid?Zn(this,ei(this,un(e))):this},t.minus=function(e){return this.isValid?Zn(this,ei(this,un(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=hn.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Pe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Kn},t.toLocaleString=function(e){return void 0===e&&(e=k),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTime(this):Kn},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),ni(this,n)},t.toISOWeekDate=function(){return ni(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,s=void 0!==r&&r,o=t.includeOffset,a=void 0===o||o,l=t.includePrefix,c=void 0!==l&&l,h=t.format;return ii(this,{suppressSeconds:s,suppressMilliseconds:i,includeOffset:a,includePrefix:c,format:void 0===h?"extended":h})},t.toRFC2822=function(){return ni(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return ni(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return ni(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone;return ii(this,{includeOffset:i,includeZone:void 0!==r&&r,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():Kn},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return hn.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var i,r=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),s=(i=t,Array.isArray(i)?i:[i]).map(hn.normalizeUnit),o=e.valueOf()>this.valueOf(),a=vn(o?this:e,o?e:this,s,r);return o?a.negate():a},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?pn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),i=t.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return se(this.year)}},{key:"daysInMonth",get:function(){return ae(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?oe(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ce(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return k}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return C}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return $}},{key:"TIME_SIMPLE",get:function(){return A}},{key:"TIME_WITH_SECONDS",get:function(){return E}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return _}},{key:"TIME_24_SIMPLE",get:function(){return M}},{key:"TIME_24_WITH_SECONDS",get:function(){return I}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return P}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return O}},{key:"DATETIME_SHORT",get:function(){return R}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return D}},{key:"DATETIME_MED",get:function(){return N}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return F}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return B}},{key:"DATETIME_FULL",get:function(){return z}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return U}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return W}}]),e}();function pi(e){if(fi.isDateTime(e))return e;if(e&&e.valueOf&&K(e.valueOf()))return fi.fromJSDate(e);if(e&&"object"===typeof e)return fi.fromObject(e);throw new x("Unknown datetime argument: "+e+", of type "+typeof e)}t.ou=fi},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(r){return!1}}()?Object.assign:function(e,s){for(var o,a,l=r(e),c=1;c0&&this.handleMarkers(j);var T=this.editor.$options;c.editorOptions.forEach((function(t){T.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option "+t+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")})),this.handleOptions(this.props),Array.isArray(y)&&y.forEach((function(t){"string"===typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),x&&this.editor.setKeyboardHandler("ace/keyboard/"+x),n&&(this.refEditor.className+=" "+n),b&&b(this.editor),this.editor.resize(),o&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i0&&e.handleMarkers(w,t);for(i=0;i0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,i=n.suggestions,r=n.onSuggestionHighlighted,o=n.highlightFirstSuggestion;if(!(0,s.default)(i,e.suggestions)&&i.length>0&&o)this.highlightFirstSuggestion();else if(r){var a=this.getHighlightedSuggestion();a!=t.highlightedSuggestion&&r({suggestion:a})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var i=this;this.setState((function(r){var s=r.valueBeforeUpDown;return null===t?s=null:null===s&&"undefined"!==typeof n&&(s=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:i.getSuggestion(e,t),valueBeforeUpDown:s}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,i=n.suggestions,r=n.multiSection,s=n.getSectionSuggestions;return r?s(i[e])[t]:i[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"===typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var i=this.props.inputProps,r=i.value,s=i.onChange;t!==r&&s(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,i=e.inputProps,r=e.shouldRenderSuggestions,s=i.value;return n.length>0&&r(s,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,r=t.renderInputComponent,s=t.onSuggestionsFetchRequested,l=t.renderSuggestion,c=t.inputProps,h=t.multiSection,u=t.renderSectionTitle,f=t.id,p=t.getSectionSuggestions,m=t.theme,g=t.getSuggestionValue,v=t.alwaysRenderSuggestions,x=t.highlightFirstSuggestion,b=t.containerProps,C=this.state,T=C.isFocused,$=C.isCollapsed,A=C.highlightedSectionIndex,E=C.highlightedSuggestionIndex,L=C.valueBeforeUpDown,_=v?y:this.props.shouldRenderSuggestions,M=c.value,I=c.onFocus,P=c.onKeyDown,O=this.willRenderSuggestions(this.props,"render"),R=v||T&&!$&&O,D=R?n:[],N=d({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=_(M,j);e.setState({isFocused:!0,isCollapsed:!n}),I&&I(t),n&&s({value:M,reason:j})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=_(n,k);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(d({},x?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?s({value:n,reason:k}):e.onSuggestionsClearRequested()},onKeyDown:function(t,i){var r=t.keyCode;switch(r){case 40:case 38:if($)_(M,w)&&(s({value:M,reason:w}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var o,a=i.newHighlightedSectionIndex,l=i.newHighlightedItemIndex;o=null===l?null===L?M:L:e.getSuggestionValueByIndex(a,l),e.updateHighlightedSuggestion(a,l,M),e.maybeCallOnChange(t,o,40===r?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(R&&!v&&e.closeSuggestions(),null!=c){t.preventDefault();var h=g(c);e.maybeCallOnChange(t,h,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:h,suggestionIndex:E,sectionIndex:A,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:R&&t.preventDefault();var u=R&&!v;null===L?u||(e.maybeCallOnChange(t,"","escape"),_("",S)?s({value:"",reason:S}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,L,"escape"),u?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}P&&P(t)}}),F={query:this.getQuery()};return i.default.createElement(o.default,{multiSection:h,items:D,renderInputComponent:r,renderItemsContainer:this.renderSuggestionsContainer,renderItem:l,renderItemData:F,renderSectionTitle:u,getSectionItems:p,highlightedSectionIndex:A,highlightedItemIndex:E,containerProps:b,inputProps:N,itemProps:this.itemProps,theme:(0,a.mapToAutowhateverTheme)(m),id:f,ref:this.storeAutowhateverRef})}}],r&&f(n.prototype,r),l&&f(n,l),h}(i.Component);t.default=C,b(C,"propTypes",{suggestions:r.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!==typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!==typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:r.default.func,onSuggestionSelected:r.default.func,onSuggestionHighlighted:r.default.func,renderInputComponent:r.default.func,renderSuggestionsContainer:r.default.func,getSuggestionValue:r.default.func.isRequired,renderSuggestion:r.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:r.default.func,alwaysRenderSuggestions:r.default.bool,multiSection:r.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!==typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!==typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:r.default.bool,highlightFirstSuggestion:r.default.bool,theme:r.default.object,id:r.default.string,containerProps:r.default.object}),b(C,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return i.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:a.defaultTheme,id:"1",containerProps:{}})},9198:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==m(e)&&"function"!==typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(2791)),r=c(n(2007)),s=c(n(5201)),o=c(n(1016)),a=c(n(326)),l=c(n(5875));function c(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function d(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);ni+t.offsetHeight&&(i=n+e.offsetHeight-t.offsetHeight),i!==t.scrollTop&&(t.scrollTop=i)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,r=t.multiSection,s=t.renderInputComponent,o=t.renderItemsContainer,a=t.highlightedSectionIndex,l=t.highlightedItemIndex,c=this.state.isInputFocused,h=r?this.renderSections():this.renderItems(),u=null!==h,f=this.getItemId(a,l),p="react-autowhatever-".concat(n),m=d({role:"combobox","aria-haspopup":"listbox","aria-owns":p,"aria-expanded":u},e("react-autowhatever-".concat(n,"-container"),"container",u&&"containerOpen"),{},this.props.containerProps),g=s(d({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":p,"aria-activedescendant":f},e("react-autowhatever-".concat(n,"-input"),"input",u&&"inputOpen",c&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),v=o({containerProps:d({id:p,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",u&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:h});return i.default.createElement("div",m,g,v)}}])&&g(n.prototype,r),c&&g(n,c),u}(i.Component);t.default=S,j(S,"propTypes",{id:r.default.string,multiSection:r.default.bool,renderInputComponent:r.default.func,renderItemsContainer:r.default.func,items:r.default.array.isRequired,renderItem:r.default.func,renderItemData:r.default.object,renderSectionTitle:r.default.func,getSectionItems:r.default.func,containerProps:r.default.object,inputProps:r.default.object,itemProps:r.default.oneOfType([r.default.object,r.default.func]),highlightedSectionIndex:r.default.number,highlightedItemIndex:r.default.number,theme:r.default.oneOfType([r.default.object,r.default.array])}),j(S,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return i.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return i.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:k,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:k,inputProps:k,itemProps:k,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},7391:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!==typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(2791)),r=o(n(2007)),s=o(n(8448));function o(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function l(e){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){return c=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!0;var o,a,l={};for(o=0,a=i.length;ot}return!1}(t,n,r,i)&&(n=null),i||null===r?function(e){return!!f.call(m,e)||!f.call(p,e)&&(d.test(e)?m[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(x,b);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(x,b);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(x,b);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=60103,k=60106,S=60107,C=60108,T=60114,$=60109,A=60110,E=60112,L=60113,_=60120,M=60115,I=60116,P=60121,O=60128,R=60129,D=60130,N=60131;if("function"===typeof Symbol&&Symbol.for){var F=Symbol.for;j=F("react.element"),k=F("react.portal"),S=F("react.fragment"),C=F("react.strict_mode"),T=F("react.profiler"),$=F("react.provider"),A=F("react.context"),E=F("react.forward_ref"),L=F("react.suspense"),_=F("react.suspense_list"),M=F("react.memo"),I=F("react.lazy"),P=F("react.block"),F("react.scope"),O=F("react.opaque.id"),R=F("react.debug_trace_mode"),D=F("react.offscreen"),N=F("react.legacy_hidden")}var B,z="function"===typeof Symbol&&Symbol.iterator;function H(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=z&&e[z]||e["@@iterator"])?e:null}function U(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var W=!1;function V(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var i=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){i=l}e.call(t.prototype)}else{try{throw Error()}catch(l){i=l}e()}}catch(l){if(l&&i&&"string"===typeof l.stack){for(var r=l.stack.split("\n"),s=i.stack.split("\n"),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(1!==o||1!==a)do{if(o--,0>--a||r[o]!==s[a])return"\n"+r[o].replace(" at new "," at ")}while(1<=o&&0<=a);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function K(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 22:return e=V(e.type._render,!1);case 1:return e=V(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case T:return"Profiler";case C:return"StrictMode";case L:return"Suspense";case _:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case $:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case M:return q(e.type);case P:return q(e._render);case I:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Y(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?re(e,t.type,n):t.hasOwnProperty("defaultValue")&&re(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ie(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function re(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function se(e,t){return e=r({children:void 0},t),(t=function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ce(e,t){var n=G(t.value),i=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function he(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var ue="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ge,ve=(ge=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function xe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function je(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=we(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(be).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var ke=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(ke[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Te(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var $e=null,Ae=null,Ee=null;function Le(e){if(e=ir(e)){if("function"!==typeof $e)throw Error(o(280));var t=e.stateNode;t&&(t=sr(t),$e(e.stateNode,e.type,t))}}function _e(e){Ae?Ee?Ee.push(e):Ee=[e]:Ae=e}function Me(){if(Ae){var e=Ae,t=Ee;if(Ee=Ae=null,Le(e),t)for(e=0;e(i=31-Wt(i))?0:1<n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var i=t-1;e.suspendedLanes&=i,e.pingedLanes&=i,(e=e.eventTimes)[t=31-Wt(t)]=n}var Wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/Kt|0)|0},Vt=Math.log,Kt=Math.LN2;var qt=s.unstable_UserBlockingPriority,Gt=s.unstable_runWithPriority,Yt=!0;function Zt(e,t,n,i){De||Oe();var r=Xt,s=De;De=!0;try{Pe(r,e,t,n,i)}finally{(De=s)||Fe()}}function Jt(e,t,n,i){Gt(qt,Xt.bind(null,e,t,n,i))}function Xt(e,t,n,i){var r;if(Yt)if((r=0===(4&t))&&0=Nn),zn=String.fromCharCode(32),Hn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Kn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Kn[e.type]:"textarea"===t}function Gn(e,t,n,i){_e(i),0<(t=Di(t,"onChange")).length&&(n=new fn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Yn=null,Zn=null;function Jn(e){Ei(e,0)}function Xn(e){if(J(rr(e)))return e}function Qn(e,t){if("change"===e)return t}var ei=!1;if(u){var ti;if(u){var ni="oninput"in document;if(!ni){var ii=document.createElement("div");ii.setAttribute("oninput","return;"),ni="function"===typeof ii.oninput}ti=ni}else ti=!1;ei=ti&&(!document.documentMode||9=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=fi(i)}}function mi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gi(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var xi=u&&"documentMode"in document&&11>=document.documentMode,bi=null,yi=null,wi=null,ji=!1;function ki(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ji||null==bi||bi!==X(i)||("selectionStart"in(i=bi)&&vi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},wi&&di(wi,i)||(wi=i,0<(i=Di(yi,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=bi)))}Ot("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ot("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ot(Pt,2);for(var Si="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ci=0;Cilr||(e.current=ar[lr],ar[lr]=null,lr--)}function ur(e,t){lr++,ar[lr]=e.current,e.current=t}var dr={},fr=cr(dr),pr=cr(!1),mr=dr;function gr(e,t){var n=e.type.contextTypes;if(!n)return dr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,s={};for(r in n)s[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function vr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function xr(){hr(pr),hr(fr)}function br(e,t,n){if(fr.current!==dr)throw Error(o(168));ur(fr,t),ur(pr,n)}function yr(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var s in i=i.getChildContext())if(!(s in e))throw Error(o(108,q(t)||"Unknown",s));return r({},n,i)}function wr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dr,mr=fr.current,ur(fr,e),ur(pr,pr.current),!0}function jr(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=yr(e,t,mr),i.__reactInternalMemoizedMergedChildContext=e,hr(pr),hr(fr),ur(fr,e)):hr(pr),ur(pr,n)}var kr=null,Sr=null,Cr=s.unstable_runWithPriority,Tr=s.unstable_scheduleCallback,$r=s.unstable_cancelCallback,Ar=s.unstable_shouldYield,Er=s.unstable_requestPaint,Lr=s.unstable_now,_r=s.unstable_getCurrentPriorityLevel,Mr=s.unstable_ImmediatePriority,Ir=s.unstable_UserBlockingPriority,Pr=s.unstable_NormalPriority,Or=s.unstable_LowPriority,Rr=s.unstable_IdlePriority,Dr={},Nr=void 0!==Er?Er:function(){},Fr=null,Br=null,zr=!1,Hr=Lr(),Ur=1e4>Hr?Lr:function(){return Lr()-Hr};function Wr(){switch(_r()){case Mr:return 99;case Ir:return 98;case Pr:return 97;case Or:return 96;case Rr:return 95;default:throw Error(o(332))}}function Vr(e){switch(e){case 99:return Mr;case 98:return Ir;case 97:return Pr;case 96:return Or;case 95:return Rr;default:throw Error(o(332))}}function Kr(e,t){return e=Vr(e),Cr(e,t)}function qr(e,t,n){return e=Vr(e),Tr(e,t,n)}function Gr(){if(null!==Br){var e=Br;Br=null,$r(e)}Yr()}function Yr(){if(!zr&&null!==Fr){zr=!0;var e=0;try{var t=Fr;Kr(99,(function(){for(;em?(g=u,u=null):g=u.sibling;var v=f(r,u,a[m],l);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(r,u),o=s(v,o,m),null===h?c=v:h.sibling=v,h=v,u=g}if(m===a.length)return n(r,u),c;if(null===u){for(;mg?(v=m,m=null):v=m.sibling;var b=f(r,m,x.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(r,m),a=s(b,a,g),null===u?h=b:u.sibling=b,u=b,m=v}if(x.done)return n(r,m),h;if(null===m){for(;!x.done;g++,x=l.next())null!==(x=d(r,x.value,c))&&(a=s(x,a,g),null===u?h=x:u.sibling=x,u=x);return h}for(m=i(r,m);!x.done;g++,x=l.next())null!==(x=p(m,r,g,x.value,c))&&(e&&null!==x.alternate&&m.delete(null===x.key?g:x.key),a=s(x,a,g),null===u?h=x:u.sibling=x,u=x);return e&&m.forEach((function(e){return t(r,e)})),h}return function(e,i,s,l){var c="object"===typeof s&&null!==s&&s.type===S&&null===s.key;c&&(s=s.props.children);var h="object"===typeof s&&null!==s;if(h)switch(s.$$typeof){case j:e:{for(h=s.key,c=i;null!==c;){if(c.key===h){if(7===c.tag){if(s.type===S){n(e,c.sibling),(i=r(c,s.props.children)).return=e,e=i;break e}}else if(c.elementType===s.type){n(e,c.sibling),(i=r(c,s.props)).ref=ks(e,c,s),i.return=e,e=i;break e}n(e,c);break}t(e,c),c=c.sibling}s.type===S?((i=Gl(s.props.children,e.mode,l,s.key)).return=e,e=i):((l=ql(s.type,s.key,s.props,null,e.mode,l)).ref=ks(e,i,s),l.return=e,e=l)}return a(e);case k:e:{for(c=s.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){n(e,i.sibling),(i=r(i,s.children||[])).return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}(i=Jl(s,e.mode,l)).return=e,e=i}return a(e)}if("string"===typeof s||"number"===typeof s)return s=""+s,null!==i&&6===i.tag?(n(e,i.sibling),(i=r(i,s)).return=e,e=i):(n(e,i),(i=Zl(s,e.mode,l)).return=e,e=i),a(e);if(js(s))return m(e,i,s,l);if(H(s))return g(e,i,s,l);if(h&&Ss(e,s),"undefined"===typeof s&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,q(e.type)||"Component"))}return n(e,i)}}var Ts=Cs(!0),$s=Cs(!1),As={},Es=cr(As),Ls=cr(As),_s=cr(As);function Ms(e){if(e===As)throw Error(o(174));return e}function Is(e,t){switch(ur(_s,t),ur(Ls,e),ur(Es,As),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}hr(Es),ur(Es,t)}function Ps(){hr(Es),hr(Ls),hr(_s)}function Os(e){Ms(_s.current);var t=Ms(Es.current),n=pe(t,e.type);t!==n&&(ur(Ls,e),ur(Es,n))}function Rs(e){Ls.current===e&&(hr(Es),hr(Ls))}var Ds=cr(0);function Ns(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fs=null,Bs=null,zs=!1;function Hs(e,t){var n=Wl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Us(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ws(e){if(zs){var t=Bs;if(t){var n=t;if(!Us(e,t)){if(!(t=Gi(n.nextSibling))||!Us(e,t))return e.flags=-1025&e.flags|2,zs=!1,void(Fs=e);Hs(Fs,n)}Fs=e,Bs=Gi(t.firstChild)}else e.flags=-1025&e.flags|2,zs=!1,Fs=e}}function Vs(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Fs=e}function Ks(e){if(e!==Fs)return!1;if(!zs)return Vs(e),zs=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Wi(t,e.memoizedProps))for(t=Bs;t;)Hs(e,t),t=Gi(t.nextSibling);if(Vs(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Bs=Gi(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Bs=null}}else Bs=Fs?Gi(e.stateNode.nextSibling):null;return!0}function qs(){Bs=Fs=null,zs=!1}var Gs=[];function Ys(){for(var e=0;es))throw Error(o(301));s+=1,to=eo=null,t.updateQueue=null,Zs.current=Oo,e=n(i,r)}while(io)}if(Zs.current=Mo,t=null!==eo&&null!==eo.next,Xs=0,to=eo=Qs=null,no=!1,t)throw Error(o(300));return e}function ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===to?Qs.memoizedState=to=e:to=to.next=e,to}function lo(){if(null===eo){var e=Qs.alternate;e=null!==e?e.memoizedState:null}else e=eo.next;var t=null===to?Qs.memoizedState:to.next;if(null!==t)to=t,eo=e;else{if(null===e)throw Error(o(310));e={memoizedState:(eo=e).memoizedState,baseState:eo.baseState,baseQueue:eo.baseQueue,queue:eo.queue,next:null},null===to?Qs.memoizedState=to=e:to=to.next=e}return to}function co(e,t){return"function"===typeof t?t(e):t}function ho(e){var t=lo(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=eo,r=i.baseQueue,s=n.pending;if(null!==s){if(null!==r){var a=r.next;r.next=s.next,s.next=a}i.baseQueue=r=s,n.pending=null}if(null!==r){r=r.next,i=i.baseState;var l=a=s=null,c=r;do{var h=c.lane;if((Xs&h)===h)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),i=c.eagerReducer===e?c.eagerState:e(i,c.action);else{var u={lane:h,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(a=l=u,s=i):l=l.next=u,Qs.lanes|=h,za|=h}c=c.next}while(null!==c&&c!==r);null===l?s=i:l.next=a,hi(i,t.memoizedState)||(Do=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function uo(e){var t=lo(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,s=t.memoizedState;if(null!==r){n.pending=null;var a=r=r.next;do{s=e(s,a.action),a=a.next}while(a!==r);hi(s,t.memoizedState)||(Do=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,i]}function fo(e,t,n){var i=t._getVersion;i=i(t._source);var r=t._workInProgressVersionPrimary;if(null!==r?e=r===i:(e=e.mutableReadLanes,(e=(Xs&e)===e)&&(t._workInProgressVersionPrimary=i,Gs.push(t))),e)return n(t._source);throw Gs.push(t),Error(o(350))}function po(e,t,n,i){var r=Ia;if(null===r)throw Error(o(349));var s=t._getVersion,a=s(t._source),l=Zs.current,c=l.useState((function(){return fo(r,t,n)})),h=c[1],u=c[0];c=to;var d=e.memoizedState,f=d.refs,p=f.getSnapshot,m=d.source;d=d.subscribe;var g=Qs;return e.memoizedState={refs:f,source:t,subscribe:i},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=h;var e=s(t._source);if(!hi(a,e)){e=n(t._source),hi(u,e)||(h(e),e=fl(g),r.mutableReadLanes|=e&r.pendingLanes),e=r.mutableReadLanes,r.entangledLanes|=e;for(var i=r.entanglements,o=e;0n?98:n,(function(){e(!0)})),Kr(97<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),"select"===n&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Xi]=t,e[Qi]=i,Go(e,t),t.stateNode=e,c=Ce(n,i),n){case"dialog":Li("cancel",e),Li("close",e),s=i;break;case"iframe":case"object":case"embed":Li("load",e),s=i;break;case"video":case"audio":for(s=0;sKa&&(t.flags|=64,a=!0,oa(i,!1),t.lanes=33554432)}else{if(!a)if(null!==(e=Ns(c))){if(t.flags|=64,a=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),oa(i,!0),null===i.tail&&"hidden"===i.tailMode&&!c.alternate&&!zs)return null!==(t=t.lastEffect=i.lastEffect)&&(t.nextEffect=null),null}else 2*Ur()-i.renderingStartTime>Ka&&1073741824!==n&&(t.flags|=64,a=!0,oa(i,!1),t.lanes=33554432);i.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=i.last)?n.sibling=c:t.child=c,i.last=c)}return null!==i.tail?(n=i.tail,i.rendering=n,i.tail=n.sibling,i.lastEffect=t.lastEffect,i.renderingStartTime=Ur(),n.sibling=null,t=Ds.current,ur(Ds,a?1&t|2:1&t),n):null;case 23:case 24:return kl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==i.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function la(e){switch(e.tag){case 1:vr(e.type)&&xr();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ps(),hr(pr),hr(fr),Ys(),0!==(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Rs(e),null;case 13:return hr(Ds),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return hr(Ds),null;case 4:return Ps(),null;case 10:return is(e),null;case 23:case 24:return kl(),null;default:return null}}function ca(e,t){try{var n="",i=t;do{n+=K(i),i=i.return}while(i);var r=n}catch(s){r="\nError generating stack: "+s.message+"\n"+s.stack}return{value:e,source:t,stack:r}}function ha(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Go=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Yo=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,Ms(Es.current);var o,a=null;switch(n){case"input":s=Q(e,s),i=Q(e,i),a=[];break;case"option":s=se(e,s),i=se(e,i),a=[];break;case"select":s=r({},s,{value:void 0}),i=r({},i,{value:void 0}),a=[];break;case"textarea":s=ae(e,s),i=ae(e,i),a=[];break;default:"function"!==typeof s.onClick&&"function"===typeof i.onClick&&(e.onclick=Bi)}for(u in Se(n,i),n=null,s)if(!i.hasOwnProperty(u)&&s.hasOwnProperty(u)&&null!=s[u])if("style"===u){var c=s[u];for(o in c)c.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(l.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in i){var h=i[u];if(c=null!=s?s[u]:void 0,i.hasOwnProperty(u)&&h!==c&&(null!=h||null!=c))if("style"===u)if(c){for(o in c)!c.hasOwnProperty(o)||h&&h.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in h)h.hasOwnProperty(o)&&c[o]!==h[o]&&(n||(n={}),n[o]=h[o])}else n||(a||(a=[]),a.push(u,n)),n=h;else"dangerouslySetInnerHTML"===u?(h=h?h.__html:void 0,c=c?c.__html:void 0,null!=h&&c!==h&&(a=a||[]).push(u,h)):"children"===u?"string"!==typeof h&&"number"!==typeof h||(a=a||[]).push(u,""+h):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(l.hasOwnProperty(u)?(null!=h&&"onScroll"===u&&Li("scroll",e),a||c===h||(a=[])):"object"===typeof h&&null!==h&&h.$$typeof===O?h.toString():(a=a||[]).push(u,h))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Zo=function(e,t,n,i){n!==i&&(t.flags|=4)};var ua="function"===typeof WeakMap?WeakMap:Map;function da(e,t,n){(n=hs(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Za||(Za=!0,Ja=i),ha(0,t)},n}function fa(e,t,n){(n=hs(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return ha(0,t),i(r)}}var s=e.stateNode;return null!==s&&"function"===typeof s.componentDidCatch&&(n.callback=function(){"function"!==typeof i&&(null===Xa?Xa=new Set([this]):Xa.add(this),ha(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var pa="function"===typeof WeakSet?WeakSet:Set;function ma(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Bl(e,n)}else t.current=null}function ga(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,i=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Jr(t.type,n),i),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&qi(t.stateNode.containerInfo))}throw Error(o(163))}function va(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var i=e.create;e.destroy=i()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var r=e;i=r.next,0!==(4&(r=r.tag))&&0!==(1&r)&&(Dl(n,e),Rl(n,e)),e=i}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(i=n.elementType===n.type?t.memoizedProps:Jr(n.type,t.memoizedProps),e.componentDidUpdate(i,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ps(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ps(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ui(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&jt(n)))))}throw Error(o(163))}function xa(e,t){for(var n=e;;){if(5===n.tag){var i=n.stateNode;if(t)"function"===typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none";else{i=n.stateNode;var r=n.memoizedProps.style;r=void 0!==r&&null!==r&&r.hasOwnProperty("display")?r.display:null,i.style.display=we("display",r)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ba(e,t){if(Sr&&"function"===typeof Sr.onCommitFiberUnmount)try{Sr.onCommitFiberUnmount(kr,t)}catch(s){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var i=n,r=i.destroy;if(i=i.tag,void 0!==r)if(0!==(4&i))Dl(t,n);else{i=t;try{r()}catch(s){Bl(i,s)}}n=n.next}while(n!==e)}break;case 1:if(ma(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(s){Bl(t,s)}break;case 5:ma(t);break;case 4:Ca(e,t)}}function ya(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function wa(e){return 5===e.tag||3===e.tag||4===e.tag}function ja(e){e:{for(var t=e.return;null!==t;){if(wa(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var i=!1;break;case 3:case 4:t=t.containerInfo,i=!0;break;default:throw Error(o(161))}16&n.flags&&(xe(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||wa(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}i?ka(e,n,t):Sa(e,n,t)}function ka(e,t,n){var i=e.tag,r=5===i||6===i;if(r)e=r?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Bi));else if(4!==i&&null!==(e=e.child))for(ka(e,t,n),e=e.sibling;null!==e;)ka(e,t,n),e=e.sibling}function Sa(e,t,n){var i=e.tag,r=5===i||6===i;if(r)e=r?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(Sa(e,t,n),e=e.sibling;null!==e;)Sa(e,t,n),e=e.sibling}function Ca(e,t){for(var n,i,r=t,s=!1;;){if(!s){s=r.return;e:for(;;){if(null===s)throw Error(o(160));switch(n=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:n=n.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===r.tag||6===r.tag){e:for(var a=e,l=r,c=l;;)if(ba(a,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}i?(a=n,l=r.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):n.removeChild(r.stateNode)}else if(4===r.tag){if(null!==r.child){n=r.stateNode.containerInfo,i=!0,r.child.return=r,r=r.child;continue}}else if(ba(e,r),null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;4===(r=r.return).tag&&(s=!1)}r.sibling.return=r.return,r=r.sibling}}function Ta(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var i=n=n.next;do{3===(3&i.tag)&&(e=i.destroy,i.destroy=void 0,void 0!==e&&e()),i=i.next}while(i!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){i=t.memoizedProps;var r=null!==e?e.memoizedProps:i;e=t.type;var s=t.updateQueue;if(t.updateQueue=null,null!==s){for(n[Qi]=i,"input"===e&&"radio"===i.type&&null!=i.name&&te(n,i),Ce(e,r),t=Ce(e,i),r=0;rr&&(r=a),n&=~s}if(n=r,10<(n=(120>(n=Ur()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ea(n/1960))-n)){e.timeoutHandle=Vi(Ml.bind(null,e),n);break}Ml(e);break;default:throw Error(o(329))}}return gl(e,Ur()),e.callbackNode===t?vl.bind(null,e):null}function xl(e,t){for(t&=~Ua,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Na&&(Na=2),l=ca(l,a),d=o;do{switch(d.tag){case 3:s=l,d.flags|=4096,t&=-t,d.lanes|=t,ds(d,da(0,s,t));break e;case 1:s=l;var w=d.type,j=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==j&&"function"===typeof j.componentDidCatch&&(null===Xa||!Xa.has(j)))){d.flags|=4096,t&=-t,d.lanes|=t,ds(d,fa(d,s,t));break e}}d=d.return}while(null!==d)}_l(n)}catch(k){t=k,Pa===n&&null!==n&&(Pa=n=n.return);continue}break}}function Tl(){var e=La.current;return La.current=Mo,null===e?Mo:e}function $l(e,t){var n=Ma;Ma|=16;var i=Tl();for(Ia===e&&Oa===t||Sl(e,t);;)try{Al();break}catch(r){Cl(e,r)}if(ns(),Ma=n,La.current=i,null!==Pa)throw Error(o(261));return Ia=null,Oa=0,Na}function Al(){for(;null!==Pa;)Ll(Pa)}function El(){for(;null!==Pa&&!Ar();)Ll(Pa)}function Ll(e){var t=Ga(e.alternate,e,Ra);e.memoizedProps=e.pendingProps,null===t?_l(e):Pa=t,_a.current=null}function _l(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=aa(n,t,Ra)))return void(Pa=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ra)||0===(4&n.mode)){for(var i=0,r=n.child;null!==r;)i|=r.lanes|r.childLanes,r=r.sibling;n.childLanes=i}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1a&&(l=a,a=j,j=l),l=pi(b,j),s=pi(b,a),l&&s&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==s.node||w.focusOffset!==s.offset)&&((y=y.createRange()).setStart(l.node,l.offset),w.removeAllRanges(),j>a?(w.addRange(y),w.extend(s.node,s.offset)):(y.setEnd(s.node,s.offset),w.addRange(y))))),y=[];for(w=b;w=w.parentNode;)1===w.nodeType&&y.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;bUr()-Va?Sl(e,0):Ua|=n),gl(e,t)}function Hl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Wr()?1:2:(0===ll&&(ll=Ba),0===(t=zt(62914560&~ll))&&(t=4194304))),n=dl(),null!==(e=ml(e,t))&&(Ut(e,t,n),gl(e,n))}function Ul(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Wl(e,t,n,i){return new Ul(e,t,n,i)}function Vl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Kl(e,t){var n=e.alternate;return null===n?((n=Wl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ql(e,t,n,i,r,s){var a=2;if(i=e,"function"===typeof e)Vl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case S:return Gl(n.children,r,s,t);case R:a=8,r|=16;break;case C:a=8,r|=1;break;case T:return(e=Wl(12,n,t,8|r)).elementType=T,e.type=T,e.lanes=s,e;case L:return(e=Wl(13,n,t,r)).type=L,e.elementType=L,e.lanes=s,e;case _:return(e=Wl(19,n,t,r)).elementType=_,e.lanes=s,e;case D:return Yl(n,r,s,t);case N:return(e=Wl(24,n,t,r)).elementType=N,e.lanes=s,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case $:a=10;break e;case A:a=9;break e;case E:a=11;break e;case M:a=14;break e;case I:a=16,i=null;break e;case P:a=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Wl(a,n,t,r)).elementType=e,t.type=i,t.lanes=s,t}function Gl(e,t,n,i){return(e=Wl(7,e,i,t)).lanes=n,e}function Yl(e,t,n,i){return(e=Wl(23,e,i,t)).elementType=D,e.lanes=n,e}function Zl(e,t,n){return(e=Wl(6,e,null,t)).lanes=n,e}function Jl(e,t,n){return(t=Wl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Ql(e,t,n){var i=31?t-1:0),i=1;i=b},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,r=e[i];if(!(void 0!==r&&0C(o,n))void 0!==l&&0>C(l,o)?(e[i]=l,e[a]=n,i=a):(e[i]=o,e[s]=n,i=s);else{if(!(void 0!==l&&0>C(l,n)))break e;e[i]=l,e[a]=n,i=a}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],$=[],A=1,E=null,L=3,_=!1,M=!1,I=!1;function P(e){for(var t=k($);null!==t;){if(null===t.callback)S($);else{if(!(t.startTime<=e))break;S($),t.sortIndex=t.expirationTime,j(T,t)}t=k($)}}function O(e){if(I=!1,P(e),!M)if(null!==k(T))M=!0,n(R);else{var t=k($);null!==t&&i(O,t.startTime-e)}}function R(e,n){M=!1,I&&(I=!1,r()),_=!0;var s=L;try{for(P(n),E=k(T);null!==E&&(!(E.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=E.callback;if("function"===typeof o){E.callback=null,L=E.priorityLevel;var a=o(E.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?E.callback=a:E===k(T)&&S(T),P(n)}else S(T);E=k(T)}if(null!==E)var l=!0;else{var c=k($);null!==c&&i(O,c.startTime-n),l=!1}return l}finally{E=null,L=s,_=!1}}var D=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||_||(M=!0,n(R))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return k(T)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=D,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,s,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0a?(e.sortIndex=o,j($,e),null===k(T)&&e===k($)&&(I?r():I=!0,i(O,o-a))):(e.sortIndex=l,j(T,e),M||_||(M=!0,n(R))),e},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},5201:function(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(l){r=!0,s=l}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,i=e.multiSection;function r(e){var r=t(e,2),s=r[0],o=r[1];return i?null===o||o===n[s]-1?null===(s=function(e){for(null===e?e=0:e++;e=0&&0===n[e];)e--;return-1===e?null:e}(s))?[null,null]:[s,n[s]-1]:[s,o-1]:0===n||0===o?[null,null]:null===o?[null,n-1]:[null,o-1]},isLast:function(e){return null===r(e)[1]}}}},1511:function(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var i=0;i ',album:'',"arrow-down":'',"arrow-left":'',"arrow-right":'',"arrow-up":'',bag:'',ban:'',behance:'',bell:'',bold:'',bolt:'',bookmark:'',calendar:'',camera:'',cart:'',check:'',"chevron-double-left":'',"chevron-double-right":'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',clock:'',close:'',"cloud-download":'',"cloud-upload":'',code:'',cog:'',comment:'',commenting:'',comments:'',copy:'',"credit-card":'',database:'',desktop:'',discord:'',download:'',dribbble:'',etsy:'',expand:'',facebook:'',"file-edit":'',"file-pdf":'',"file-text":'',file:'',flickr:'',folder:'',forward:'',foursquare:'',future:'',"git-branch":'',"git-fork":'',"github-alt":'',github:'',gitter:'',google:'',grid:'',happy:'',hashtag:'',heart:'',history:'',home:'',image:'',info:'',instagram:'',italic:'',joomla:'',laptop:'',lifesaver:'',link:'',linkedin:'',list:'',location:'',lock:'',mail:'',menu:'',microphone:'',"minus-circle":'',minus:'',"more-vertical":'',more:'',move:'',nut:'',pagekit:'',"paint-bucket":'',pencil:'',"phone-landscape":'',phone:'',pinterest:'',"play-circle":'',play:'',"plus-circle":'',plus:'',print:'',pull:'',push:'',question:'',"quote-right":'',receiver:'',reddit:'',refresh:'',reply:'',rss:'',search:'',server:'',settings:'',shrink:'',"sign-in":'',"sign-out":'',social:'',soundcloud:'',star:'',strikethrough:'',table:'',"tablet-landscape":'',tablet:'',tag:'',thumbnails:'',tiktok:'',trash:'',"triangle-down":'',"triangle-left":'',"triangle-right":'',"triangle-up":'',tripadvisor:'',tumblr:'',tv:'',twitch:'',twitter:'',uikit:'',unlock:'',upload:'',user:'',users:'',"video-camera":'',vimeo:'',warning:'',whatsapp:'',wordpress:'',world:'',xing:'',yelp:'',youtube:''})}return"undefined"!==typeof window&&window.UIkit&&window.UIkit.use(e),e}()},5656:function(e){e.exports=function(){"use strict";var e=Object.prototype,t=e.hasOwnProperty;function n(e,n){return t.call(e,n)}var i=/\B([A-Z])/g,r=re((function(e){return e.replace(i,"-$1").toLowerCase()})),s=/-(\w)/g,o=re((function(e){return e.replace(s,l)})),a=re((function(e){return e.length?l(null,e.charAt(0))+e.slice(1):""}));function l(e,t){return t?t.toUpperCase():""}var c=String.prototype,h=c.startsWith||function(e){return 0===this.lastIndexOf(e,0)};function u(e,t){return h.call(e,t)}var d=c.endsWith||function(e){return this.substr(-e.length)===e};function f(e,t){return d.call(e,t)}var p=Array.prototype,m=function(e,t){return!!~this.indexOf(e,t)},g=c.includes||m,v=p.includes||m;function x(e,t){return e&&(M(e)?g:v).call(e,t)}var b=p.findIndex||function(e){for(var t=arguments,n=0;n=1}function E(e){return 1===L(e)}function L(e){return!T(e)&&k(e)&&e.nodeType}function _(e){return"boolean"===typeof e}function M(e){return"string"===typeof e}function I(e){return"number"===typeof e}function P(e){return I(e)||M(e)&&!isNaN(e-parseFloat(e))}function O(e){return!(w(e)?e.length:k(e)&&Object.keys(e).length)}function R(e){return void 0===e}function D(e){return _(e)?e:"true"===e||"1"===e||""===e||"false"!==e&&"0"!==e&&e}function N(e){var t=Number(e);return!isNaN(t)&&t}function F(e){return parseFloat(e)||0}var B=Array.from||function(e){return p.slice.call(e)};function z(e){return H(e)[0]}function H(e){return e&&(A(e)?[e]:B(e).filter(A))||[]}function U(e){return T(e)?e:(e=z(e))?($(e)?e:e.ownerDocument).defaultView:window}function W(e){return e?f(e,"ms")?F(e):1e3*F(e):0}function V(e,t){return e===t||k(e)&&k(t)&&Object.keys(e).length===Object.keys(t).length&&Y(e,(function(e,n){return e===t[n]}))}function K(e,t,n){return e.replace(new RegExp(t+"|"+n,"g"),(function(e){return e===t?n:t}))}var q=Object.assign||function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];e=Object(e);for(var r=0;rr?1:r>i?-1:0}))}function J(e,t){var n=new Set;return e.filter((function(e){var i=e[t];return!n.has(i)&&(n.add(i)||!0)}))}function X(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),Math.min(Math.max(N(e)||0,t),n)}function Q(){}function ee(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return[["bottom","top"],["right","left"]].every((function(t){var n=t[0],i=t[1];return Math.min.apply(Math,e.map((function(e){return e[n]})))-Math.max.apply(Math,e.map((function(e){return e[i]})))>0}))}function te(e,t){return e.x<=t.right&&e.x>=t.left&&e.y<=t.bottom&&e.y>=t.top}var ne={ratio:function(e,t,n){var i,r="width"===t?"height":"width";return(i={})[r]=e[t]?Math.round(n*e[r]/e[t]):e[r],i[t]=n,i},contain:function(e,t){var n=this;return Y(e=q({},e),(function(i,r){return e=e[r]>t[r]?n.ratio(e,r,t[r]):e})),e},cover:function(e,t){var n=this;return Y(e=this.contain(e,t),(function(i,r){return e=e[r]")&&(t=t.slice(1)),E(e)?Ie.call(e,t):H(e).map((function(e){return Pe(e,t)})).filter(Boolean)}function Oe(e,t){return M(t)?Me(e,t)||!!Pe(e,t):e===t||($(t)?t.documentElement:z(t)).contains(z(e))}function Re(e,t){for(var n=[];e=Ae(e);)t&&!Me(e,t)||n.push(e);return n}function De(e,t){var n=(e=z(e))?H(e.children):[];return t?Ee(n,t):n}function Ne(e,t){return t?H(e).indexOf(z(t)):De(Ae(e)).indexOf(e)}function Fe(e,t){return He(e,ze(e,t))}function Be(e,t){return Ue(e,ze(e,t))}function ze(e,t){return void 0===t&&(t=document),M(e)&&qe(e)||$(t)?t:t.ownerDocument}function He(e,t){return z(We(e,t,"querySelector"))}function Ue(e,t){return H(We(e,t,"querySelectorAll"))}function We(e,t,n){if(void 0===t&&(t=document),!e||!M(e))return e;e=e.replace(Ke,"$1 *"),qe(e)&&(e=Ye(e).map((function(e){var n=t;if("!"===e[0]){var i=e.substr(1).trim().split(" ");n=Pe(Ae(t),i[0]),e=i.slice(1).join(" ").trim()}if("-"===e[0]){var r=e.substr(1).trim().split(" "),s=(n||t).previousElementSibling;n=Me(s,e.substr(1))?s:null,e=r.slice(1).join(" ")}return n?Ze(n)+" "+e:null})).filter(Boolean).join(","),t=document);try{return t[n](e)}catch(i){return null}}var Ve=/(^|[^\\],)\s*[!>+~-]/,Ke=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,qe=re((function(e){return e.match(Ve)})),Ge=/.*?[^\\](?:,|$)/g,Ye=re((function(e){return e.match(Ge).map((function(e){return e.replace(/,$/,"").trim()}))}));function Ze(e){for(var t=[];e.parentNode;){if(e.id){t.unshift("#"+Xe(e.id));break}var n=e.tagName;"HTML"!==n&&(n+=":nth-child("+(Ne(e)+1)+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}var Je=ce&&window.CSS&&CSS.escape||function(e){return e.replace(/([^\x7f-\uFFFF\w-])/g,(function(e){return"\\"+e}))};function Xe(e){return M(e)?Je.call(null,e):""}function Qe(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=rt(e),i=n[0],r=n[1],s=n[2],o=n[3],a=n[4];return i=ut(i),o.length>1&&(o=ot(o)),a&&a.self&&(o=at(o)),s&&(o=st(s,o)),a=lt(a),r.split(" ").forEach((function(e){return i.forEach((function(t){return t.addEventListener(e,o,a)}))})),function(){return et(i,r,o,a)}}function et(e,t,n,i){void 0===i&&(i=!1),i=lt(i),e=ut(e),t.split(" ").forEach((function(t){return e.forEach((function(e){return e.removeEventListener(t,n,i)}))}))}function tt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=rt(e),i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=n[5],c=Qe(i,r,s,(function(e){var t=!l||l(e);t&&(c(),o(e,t))}),a);return c}function nt(e,t,n){return ut(e).reduce((function(e,i){return e&&i.dispatchEvent(it(t,!0,!0,n))}),!0)}function it(e,t,n,i){if(void 0===t&&(t=!0),void 0===n&&(n=!1),M(e)){var r=document.createEvent("CustomEvent");r.initCustomEvent(e,t,n,i),e=r}return e}function rt(e){return j(e[2])&&e.splice(2,0,!1),e}function st(e,t){var n=this;return function(i){var r=">"===e[0]?Ue(e,i.currentTarget).reverse().filter((function(e){return Oe(i.target,e)}))[0]:Pe(i.target,e);r&&(i.current=r,t.call(n,i))}}function ot(e){return function(t){return w(t.detail)?e.apply(void 0,[t].concat(t.detail)):e(t)}}function at(e){return function(t){if(t.target===t.currentTarget||t.target===t.current)return e.call(null,t)}}function lt(e){return e&&he&&!_(e)?!!e.capture:e}function ct(e){return e&&"addEventListener"in e}function ht(e){return ct(e)?e:z(e)}function ut(e){return w(e)?e.map(ht).filter(Boolean):M(e)?Ue(e):ct(e)?[e]:H(e)}function dt(e){return"touch"===e.pointerType||!!e.touches}function ft(e){var t=e.touches,n=e.changedTouches,i=t&&t[0]||n&&n[0]||e;return{x:i.clientX,y:i.clientY}}var pt=ce&&window.Promise||yt,mt=function(){var e=this;this.promise=new pt((function(t,n){e.reject=n,e.resolve=t}))},gt=0,vt=1,xt=2,bt=ce&&window.setImmediate||setTimeout;function yt(e){this.state=xt,this.value=void 0,this.deferred=[];var t=this;try{e((function(e){t.resolve(e)}),(function(e){t.reject(e)}))}catch(n){t.reject(n)}}yt.reject=function(e){return new yt((function(t,n){n(e)}))},yt.resolve=function(e){return new yt((function(t,n){t(e)}))},yt.all=function(e){return new yt((function(t,n){var i=[],r=0;function s(n){return function(s){i[n]=s,(r+=1)===e.length&&t(i)}}0===e.length&&t(i);for(var o=0;o=200&&r.status<300||304===r.status?("json"===t.responseType&&M(r.response)&&(r=q(Ct(r),{response:JSON.parse(r.response)})),n(r)):i(q(Error(r.statusText),{xhr:r,status:r.status}))})),Qe(r,"error",(function(){return i(q(Error("Network Error"),{xhr:r}))})),Qe(r,"timeout",(function(){return i(q(Error("Network Timeout"),{xhr:r}))})),r.send(t.data)}))}function St(e,t,n){return new pt((function(i,r){var s=new Image;s.onerror=function(e){return r(e)},s.onload=function(){return i(s)},n&&(s.sizes=n),t&&(s.srcset=t),s.src=e}))}function Ct(e){var t={};for(var n in e)t[n]=e[n];return t}function Tt(e){if("loading"===document.readyState)var t=Qe(document,"DOMContentLoaded",(function(){t(),e()}));else e()}function $t(e){return(e=Ht(e)).innerHTML="",e}function At(e,t){return e=Ht(e),R(t)?e.innerHTML:Lt(e.hasChildNodes()?$t(e):e,t)}function Et(e,t){return(e=Ht(e)).hasChildNodes()?It(t,(function(t){return e.insertBefore(t,e.firstChild)})):Lt(e,t)}function Lt(e,t){return e=Ht(e),It(t,(function(t){return e.appendChild(t)}))}function _t(e,t){return e=Ht(e),It(t,(function(t){return e.parentNode.insertBefore(t,e)}))}function Mt(e,t){return e=Ht(e),It(t,(function(t){return e.nextSibling?_t(e.nextSibling,t):Lt(e.parentNode,t)}))}function It(e,t){return(e=M(e)?Bt(e):e)?"length"in e?H(e).map(t):t(e):null}function Pt(e){H(e).forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)}))}function Ot(e,t){for(t=z(_t(e,t));t.firstChild;)t=t.firstChild;return Lt(t,e),t}function Rt(e,t){return H(H(e).map((function(e){return e.hasChildNodes?Ot(H(e.childNodes),t):Lt(e,t)})))}function Dt(e){H(e).map(Ae).filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(e){_t(e,e.childNodes),Pt(e)}))}wt.resolve=function(e){var t=this;if(t.state===xt){if(e===t)throw new TypeError("Promise settled with itself.");var n=!1;try{var i=e&&e.then;if(null!==e&&k(e)&&j(i))return void i.call(e,(function(e){n||t.resolve(e),n=!0}),(function(e){n||t.reject(e),n=!0}))}catch(r){return void(n||t.reject(r))}t.state=gt,t.value=e,t.notify()}},wt.reject=function(e){var t=this;if(t.state===xt){if(e===t)throw new TypeError("Promise settled with itself.");t.state=vt,t.value=e,t.notify()}},wt.notify=function(){var e=this;bt((function(){if(e.state!==xt)for(;e.deferred.length;){var t=e.deferred.shift(),n=t[0],i=t[1],r=t[2],s=t[3];try{e.state===gt?j(n)?r(n.call(void 0,e.value)):r(e.value):e.state===vt&&(j(i)?r(i.call(void 0,e.value)):s(e.value))}catch(o){s(o)}}}))},wt.then=function(e,t){var n=this;return new yt((function(i,r){n.deferred.push([e,t,i,r]),n.notify()}))},wt.catch=function(e){return this.then(void 0,e)};var Nt=/^\s*<(\w+|!)[^>]*>/,Ft=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Bt(e){var t=Ft.exec(e);if(t)return document.createElement(t[1]);var n=document.createElement("div");return Nt.test(e)?n.insertAdjacentHTML("beforeend",e.trim()):n.textContent=e,n.childNodes.length>1?H(n.childNodes):n.firstChild}function zt(e,t){if(E(e))for(t(e),e=e.firstElementChild;e;){var n=e.nextElementSibling;zt(e,t),e=n}}function Ht(e,t){return Wt(e)?z(Bt(e)):He(e,t)}function Ut(e,t){return Wt(e)?H(Bt(e)):Ue(e,t)}function Wt(e){return M(e)&&("<"===e[0]||e.match(/^\s*))}function Vt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];Jt(e,t,"add")}function Kt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];Jt(e,t,"remove")}function qt(e,t){se(e,"class",(function(e){return(e||"").replace(new RegExp("\\b"+t+"\\b","g"),"")}))}function Gt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];t[0]&&Kt(e,t[0]),t[1]&&Vt(e,t[1])}function Yt(e,t){t=Xt(t)[0];for(var n=H(e),i=0;i5&&t.positions.shift())}),50)},cancel:function(){this.unbind&&this.unbind(),this.interval&&clearInterval(this.interval)},movesTo:function(e){if(this.positions.length<2)return!1;var t=e.getBoundingClientRect(),n=t.left,i=t.right,r=t.top,s=t.bottom,o=this.positions[0],a=G(this.positions),l=[o,a];return!te(a,t)&&[[{x:n,y:r},{x:i,y:s}],[{x:n,y:s},{x:i,y:r}]].some((function(e){var n=On(l,e);return n&&te(n,t)}))}};var Rn={};function Dn(e,t,n){return Rn.computed(j(e)?e.call(n,n):e,j(t)?t.call(n,n):t)}function Nn(e,t){return e=e&&!w(e)?[e]:e,t?e?e.concat(t):w(t)?t:[t]:e}function Fn(e,t){return R(t)?e:t}function Bn(e,t,i){var r={};if(j(t)&&(t=t.options),t.extends&&(e=Bn(e,t.extends,i)),t.mixins)for(var s=0,o=t.mixins.length;sc?(r=h-c,h=c):r=0,function(){return s(o,h-l).then(t)}}),(function(){return pt.resolve()}))();function s(e,t){return new pt((function(n){var i=e.scrollTop,r=o(Math.abs(t)),s=Date.now();!function o(){var l=a(X((Date.now()-s)/r));ti(e,i+t*l),1!==l?requestAnimationFrame(o):n()}()}))}function o(e){return 40*Math.pow(e,.375)}function a(e){return.5*(1-Math.cos(Math.PI*e))}}function ii(e,t){if(void 0===t&&(t=0),!ke(e))return 0;var n=ri(e,/auto|scroll/,!0)[0],i=n.scrollHeight,r=n.scrollTop,s=oi(n),o=yn(e)[0]-r-yn(n)[0],a=Math.min(s,o+r);return X(-1*(o-a)/Math.min(e.offsetHeight+t+a,i-(o+r),i-s))}function ri(e,t,n){void 0===t&&(t=/auto|scroll|hidden/),void 0===n&&(n=!1);var i=ai(e),r=Re(e).reverse(),s=y(r=r.slice(r.indexOf(i)+1),(function(e){return"fixed"===tn(e,"position")}));return~s&&(r=r.slice(s)),[i].concat(r.filter((function(e){return t.test(tn(e,"overflow"))&&(!n||e.scrollHeight>oi(e))}))).reverse()}function si(e){return e===ai(e)?window:e}function oi(e){return(e===ai(e)?document.documentElement:e).clientHeight}function ai(e){var t=U(e).document;return t.scrollingElement||t.documentElement}var li={width:["x","left","right"],height:["y","top","bottom"]};function ci(e,t,n,i,r,s,o,a){n=ui(n),i=ui(i);var l={element:n,target:i};if(!e||!t)return l;var c=xn(e),h=xn(t),u=h;if(hi(u,n,c,-1),hi(u,i,h,1),r=di(r,c.width,c.height),s=di(s,h.width,h.height),r.x+=s.x,r.y+=s.y,u.left+=r.x,u.top+=r.y,o){var d=ri(e).map(si);a&&!x(d,a)&&d.unshift(a),d=d.map((function(e){return xn(e)})),Y(li,(function(e,t){var s=e[0],a=e[1],f=e[2];(!0===o||x(o,s))&&d.some((function(e){var o=n[s]===a?-c[t]:n[s]===f?c[t]:0,d=i[s]===a?h[t]:i[s]===f?-h[t]:0;if(u[a]e[f]){var p=c[t]/2,m="center"===i[s]?-h[t]/2:0;return"center"===n[s]&&(g(p,m)||g(-p,-m))||g(o,d)}function g(n,i){var o=F((u[a]+n+i-2*r[s]).toFixed(4));if(o>=e[a]&&o+c[t]<=e[f])return u[a]=o,["element","target"].forEach((function(e){l[e][s]=n?l[e][s]===li[t][1]?li[t][2]:li[t][1]:l[e][s]})),!0}}))}))}return xn(e,u),l}function hi(e,t,n,i){Y(li,(function(r,s){var o=r[0],a=r[1],l=r[2];t[o]===l?e[a]+=n[s]*i:"center"===t[o]&&(e[a]+=n[s]*i/2)}))}function ui(e){var t=/left|center|right/,n=/top|center|bottom/;return 1===(e=(e||"").split(" ")).length&&(e=t.test(e[0])?e.concat("center"):n.test(e[0])?["center"].concat(e):["center","center"]),{x:t.test(e[0])?e[0]:"center",y:n.test(e[1])?e[1]:"center"}}function di(e,t,n){var i=(e||"").split(" "),r=i[0],s=i[1];return{x:r?F(r)*(f(r,"%")?t/100:1):0,y:s?F(s)*(f(s,"%")?n/100:1):0}}var fi=Object.freeze({__proto__:null,ajax:jt,getImage:St,transition:hn,Transition:un,animate:fn,Animation:mn,attr:se,hasAttr:oe,removeAttr:ae,data:le,addClass:Vt,removeClass:Kt,removeClasses:qt,replaceClass:Gt,hasClass:Yt,toggleClass:Zt,dimensions:vn,offset:xn,position:bn,offsetPosition:yn,height:wn,width:jn,boxModelAdjust:Sn,flipPosition:Cn,toPx:Tn,ready:Tt,empty:$t,html:At,prepend:Et,append:Lt,before:_t,after:Mt,remove:Pt,wrapAll:Ot,wrapInner:Rt,unwrap:Dt,fragment:Bt,apply:zt,$:Ht,$$:Ut,inBrowser:ce,isIE:he,isRtl:ue,hasTouch:pe,pointerDown:me,pointerMove:ge,pointerUp:ve,pointerEnter:xe,pointerLeave:be,pointerCancel:ye,on:Qe,off:et,once:tt,trigger:nt,createEvent:it,toEventTargets:ut,isTouch:dt,getEventPos:ft,fastdom:An,isVoidElement:je,isVisible:ke,selInput:Se,isInput:Ce,selFocusable:Te,isFocusable:$e,parent:Ae,filter:Ee,matches:Me,closest:Pe,within:Oe,parents:Re,children:De,index:Ne,hasOwn:n,hyphenate:r,camelize:o,ucfirst:a,startsWith:u,endsWith:f,includes:x,findIndex:y,isArray:w,isFunction:j,isObject:k,isPlainObject:C,isWindow:T,isDocument:$,isNode:A,isElement:E,isBoolean:_,isString:M,isNumber:I,isNumeric:P,isEmpty:O,isUndefined:R,toBoolean:D,toNumber:N,toFloat:F,toArray:B,toNode:z,toNodes:H,toWindow:U,toMs:W,isEqual:V,swap:K,assign:q,last:G,each:Y,sortBy:Z,uniqueBy:J,clamp:X,noop:Q,intersectRect:ee,pointInRect:te,Dimensions:ne,getIndex:ie,memoize:re,MouseTracker:Pn,mergeOptions:Bn,parseOptions:zn,play:Hn,pause:Un,mute:Wn,positionAt:ci,Promise:pt,Deferred:mt,query:Fe,queryAll:Be,find:He,findAll:Ue,escape:Xe,css:tn,getCssVar:on,propName:an,isInView:ei,scrollTop:ti,scrollIntoView:ni,scrolledOver:ii,scrollParents:ri,getViewport:si,getViewportClientHeight:oi});function pi(e){var t,n=e.data;function i(e,t){if(e)for(var n in e)e[n]._connected&&e[n]._callUpdate(t)}e.use=function(e){if(!e.installed)return e.call(null,this),e.installed=!0,this},e.mixin=function(t,n){(n=(M(n)?e.component(n):n)||this).options=Bn(n.options,t)},e.extend=function(e){e=e||{};var t=this,n=function(e){this._init(e)};return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.options=Bn(t.options,e),n.super=t,n.extend=t.extend,n},e.update=function(e,t){Re(e=e?z(e):document.body).reverse().forEach((function(e){return i(e[n],t)})),zt(e,(function(e){return i(e[n],t)}))},Object.defineProperty(e,"container",{get:function(){return t||document.body},set:function(e){t=Ht(e)}})}function mi(e){function t(e){for(var t=this,n=this.$options.update,i=function(i){var r=n[i],s=r.read,o=r.write,a=r.events;if(e.has("update")||a&&a.some((function(t){return e.has(t)}))){var l=void 0;s&&(l=s.call(t,t._data,e))&&C(l)&&q(t._data,l),o&&!1!==l&&An.write((function(){return o.call(t,t._data,e)}))}},r=0;r100||s&&Math.abs(t.y-s)>100)&&setTimeout((function(){nt(n,"swipe"),nt(n,"swipe"+ji(t.x,t.y,r,s))}))}))}}),{passive:!0})}}function ji(e,t,n,i){return Math.abs(e-n)>=Math.abs(t-i)?e-n>0?"Left":"Right":t-i>0?"Up":"Down"}function ki(e){var t=e.connect,n=e.disconnect;function i(e){for(var i=e.addedNodes,r=e.removedNodes,s=0;s *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease",offset:0},computed:{items:{get:function(e,t){return Ut(e.targets,t)},watch:function(e,t){var n=this;if(e.forEach((function(e){return Ei(Ht(n.content,e),!Yt(e,n.clsOpen))})),!t&&!Yt(e,this.clsOpen)){var i=!1!==this.active&&e[Number(this.active)]||!this.collapsible&&e[0];i&&this.toggle(i,!1)}},immediate:!0},toggles:function(e){var t=e.toggle;return this.items.map((function(e){return Ht(t,e)}))}},events:[{name:"click",delegate:function(){return this.targets+" "+this.$props.toggle},handler:function(e){e.preventDefault(),this.toggle(Ne(this.toggles,e.current))}}],methods:{toggle:function(e,t){var n=this,i=[this.items[ie(e,this.items)]],r=Ee(this.items,"."+this.clsOpen);this.multiple||x(r,i[0])||(i=i.concat(r)),!this.collapsible&&r.length<2&&!Ee(i,":not(."+this.clsOpen+")").length||i.forEach((function(e){return n.toggleElement(e,!Yt(e,n.clsOpen),(function(e,i){Zt(e,n.clsOpen,i),se(Ht(n.$props.toggle,e),"aria-expanded",i);var r=Ht((e._wrapper?"> * ":"")+n.content,e);if(!1!==t&&n.hasTransition)return e._wrapper||(e._wrapper=Ot(r,"")),Ei(r,!1),Ti(n)(e._wrapper,i).then((function(){if(Ei(r,!i),delete e._wrapper,Dt(r),i){var t=Ht(n.$props.toggle,e);ei(t)||ni(t,{offset:n.offset})}}));Ei(r,!i)}))}))}}};function Ei(e,t){e&&(e.hidden=t)}var Li={mixins:[Si,Ci],args:"animation",props:{close:String},data:{animation:[!0],selClose:".uk-alert-close",duration:150,hideProps:q({opacity:0},Ci.data.hideProps)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(e){e.preventDefault(),this.close()}}],methods:{close:function(){var e=this;this.toggleElement(this.$el).then((function(){return e.$destroy(!0)}))}}},_i={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},computed:{inView:function(e){return"inview"===e.autoplay}},connected:function(){this.inView&&!oe(this.$el,"preload")&&(this.$el.preload="none"),this.automute&&Wn(this.$el)},update:{read:function(){return{visible:ke(this.$el)&&"hidden"!==tn(this.$el,"visibility"),inView:this.inView&&ei(this.$el)}},write:function(e){var t=e.visible,n=e.inView;!t||this.inView&&!n?Un(this.$el):(!0===this.autoplay||this.inView&&n)&&Hn(this.$el)},events:["resize","scroll"]}},Mi={mixins:[Si,_i],props:{width:Number,height:Number},data:{automute:!0},update:{read:function(){var e=this.$el,t=Ii(e)||Ae(e),n=t.offsetHeight,i=t.offsetWidth,r=ne.cover({width:this.width||e.naturalWidth||e.videoWidth||e.clientWidth,height:this.height||e.naturalHeight||e.videoHeight||e.clientHeight},{width:i+(i%2?1:0),height:n+(n%2?1:0)});return!(!r.width||!r.height)&&r},write:function(e){var t=e.height,n=e.width;tn(this.$el,{height:t,width:n})},events:["resize"]}};function Ii(e){for(;e=Ae(e);)if("static"!==tn(e,"position"))return e}var Pi,Oi={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var t=e.container;return!0===t&&this.$container||t&&Ht(t)}}},Ri={props:{pos:String,offset:null,flip:Boolean,clsPos:String},data:{pos:"bottom-"+(ue?"right":"left"),flip:!0,offset:!1,clsPos:""},computed:{pos:function(e){var t=e.pos;return(t+(x(t,"-")?"":"-center")).split("-")},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(e,t,n){qt(e,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?");var i=this.offset,r=this.getAxis();if(!P(i)){var s=Ht(i);i=s?xn(s)["x"===r?"left":"top"]-xn(t)["x"===r?"right":"bottom"]:0}var o=ci(e,t,"x"===r?Cn(this.dir)+" "+this.align:this.align+" "+Cn(this.dir),"x"===r?this.dir+" "+this.align:this.align+" "+this.dir,"x"===r?""+("left"===this.dir?-i:i):" "+("top"===this.dir?-i:i),null,this.flip,n).target,a=o.x,l=o.y;this.dir="x"===r?a:l,this.align="x"===r?l:a,Zt(e,this.clsPos+"-"+this.dir+"-"+this.align,!1===this.offset)},getAxis:function(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}},Di={mixins:[Oi,Ri,Ci],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},data:{mode:["click","hover"],toggle:"- *",boundary:!0,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,animation:["uk-animation-fade"],cls:"uk-open",container:!1},computed:{boundary:function(e,t){var n=e.boundary;return!0===n?window:Fe(n,t)},clsDrop:function(e){var t=e.clsDrop;return t||"uk-"+this.$options.name},clsPos:function(){return this.clsDrop}},created:function(){this.tracker=new Pn},connected:function(){Vt(this.$el,this.clsDrop),this.toggle&&!this.target&&(this.target=this.$create("toggle",Fe(this.toggle,this.$el),{target:this.$el,mode:this.mode}))},disconnected:function(){this.isActive()&&(Pi=null)},events:[{name:"click",delegate:function(){return"."+this.clsDrop+"-close"},handler:function(e){e.preventDefault(),this.hide(!1)}},{name:"click",delegate:function(){return'a[href^="#"]'},handler:function(e){var t=e.defaultPrevented,n=e.current.hash;t||!n||Oe(n,this.$el)||this.hide(!1)}},{name:"beforescroll",handler:function(){this.hide(!1)}},{name:"toggle",self:!0,handler:function(e,t){e.preventDefault(),this.isToggled()?this.hide(!1):this.show(t.$el,!1)}},{name:"toggleshow",self:!0,handler:function(e,t){e.preventDefault(),this.show(t.$el)}},{name:"togglehide",self:!0,handler:function(e){e.preventDefault(),this.hide()}},{name:xe+" focusin",filter:function(){return x(this.mode,"hover")},handler:function(e){dt(e)||this.clearTimers()}},{name:be+" focusout",filter:function(){return x(this.mode,"hover")},handler:function(e){!dt(e)&&e.relatedTarget&&this.hide()}},{name:"toggled",self:!0,handler:function(e,t){t&&(this.clearTimers(),this.position())}},{name:"show",self:!0,handler:function(){var e=this;Pi=this,this.tracker.init(),tt(this.$el,"hide",Qe(document,me,(function(t){var n=t.target;return!Oe(n,e.$el)&&tt(document,ve+" "+ye+" scroll",(function(t){var i=t.defaultPrevented,r=t.type,s=t.target;i||r!==ve||n!==s||e.target&&Oe(n,e.target)||e.hide(!1)}),!0)})),{self:!0}),tt(this.$el,"hide",Qe(document,"keydown",(function(t){27===t.keyCode&&e.hide(!1)})),{self:!0})}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(e){var t=e.target;this.$el===t?(Pi=this.isActive()?null:Pi,this.tracker.cancel()):Pi=null===Pi&&Oe(t,this.$el)&&this.isToggled()?this:Pi}}],update:{write:function(){this.isToggled()&&!Yt(this.$el,this.clsEnter)&&this.position()},events:["resize"]},methods:{show:function(e,t){var n=this;if(void 0===e&&(e=this.target),void 0===t&&(t=!0),this.isToggled()&&e&&this.target&&e!==this.target&&this.hide(!1),this.target=e,this.clearTimers(),!this.isActive()){if(Pi){if(t&&Pi.isDelaying)return void(this.showTimer=setTimeout(this.show,10));for(var i;Pi&&i!==Pi&&!Oe(this.$el,Pi.$el);)i=Pi,Pi.hide(!1)}this.container&&Ae(this.$el)!==this.container&&Lt(this.container,this.$el),this.showTimer=setTimeout((function(){return n.toggleElement(n.$el,!0)}),t&&this.delayShow||0)}},hide:function(e){var t=this;void 0===e&&(e=!0);var n=function(){return t.toggleElement(t.$el,!1,!1)};this.clearTimers(),this.isDelaying=Ni(this.$el).some((function(e){return t.tracker.movesTo(e)})),e&&this.isDelaying?this.hideTimer=setTimeout(this.hide,50):e&&this.delayHide?this.hideTimer=setTimeout(n,this.delayHide):n()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return Pi===this},position:function(){Kt(this.$el,this.clsDrop+"-stack"),Zt(this.$el,this.clsDrop+"-boundary",this.boundaryAlign);var e=xn(this.boundary),t=this.boundaryAlign?e:xn(this.target);if("justify"===this.align){var n="y"===this.getAxis()?"width":"height";tn(this.$el,n,t[n])}else this.boundary&&this.$el.offsetWidth>Math.max(e.right-t.left,t.right-e.left)&&Vt(this.$el,this.clsDrop+"-stack");this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.target,this.boundary)}}};function Ni(e){var t=[];return zt(e,(function(e){return"static"!==tn(e,"position")&&t.push(e)})),t}var Fi={mixins:[Si],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:function(e,t){return Ht(Se,t)},state:function(){return this.input.nextElementSibling},target:function(e,t){var n=e.target;return n&&(!0===n&&Ae(this.input)===t&&this.input.nextElementSibling||Fe(n,t))}},update:function(){var e=this,t=e.target,n=e.input;if(t){var i,r=Ce(t)?"value":"textContent",s=t[r],o=n.files&&n.files[0]?n.files[0].name:Me(n,"select")&&(i=Ut("option",n).filter((function(e){return e.selected}))[0])?i.textContent:n.value;s!==o&&(t[r]=o)}},events:[{name:"change",handler:function(){this.$update()}},{name:"reset",el:function(){return Pe(this.$el,"form")},handler:function(){this.$update()}}]},Bi={update:{read:function(e){var t=ei(this.$el);if(!t||e.isInView===t)return!1;e.isInView=t},write:function(){this.$el.src=""+this.$el.src},events:["scroll","resize"]}},zi={props:{margin:String,firstColumn:Boolean},data:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(){var e=Hi(this.$el.children);return{rows:e,columns:Ui(e)}},write:function(e){for(var t=e.columns,n=e.rows,i=0;i=0;a--){var l=i[a];if(!l[0]){l.push(s);break}var c=void 0;if(l[0].offsetParent===s.offsetParent?c=Vi(l[0]):(o=Vi(s,!0),c=Vi(l[0],!0)),o[t]>=c[n]-1&&o[t]!==c[t]){i.push([s]);break}if(o[n]-1>c[t]||o[t]===c[t]){l.push(s);break}if(0===a){i.unshift([s]);break}}}return i}function Vi(e,t){var n;void 0===t&&(t=!1);var i=e.offsetTop,r=e.offsetLeft,s=e.offsetHeight,o=e.offsetWidth;return t&&(i=(n=yn(e))[0],r=n[1]),{top:i,left:r,bottom:i+s,right:r+o}}var Ki={extends:zi,mixins:[Si],name:"grid",props:{masonry:Boolean,parallax:Number},data:{margin:"uk-grid-margin",clsStack:"uk-grid-stack",masonry:!1,parallax:0},connected:function(){this.masonry&&Vt(this.$el,"uk-flex-top uk-flex-wrap-top")},update:[{write:function(e){var t=e.columns;Zt(this.$el,this.clsStack,t.length<2)},events:["resize"]},{read:function(e){var t=e.columns,n=e.rows;if(!t.length||!this.masonry&&!this.parallax||qi(this.$el))return e.translates=!1,!1;var i=!1,r=De(this.$el),s=Zi(t),o=Yi(r,this.margin)*(n.length-1),a=Math.max.apply(Math,s)+o;this.masonry&&(i=Gi(n,t=t.map((function(e){return Z(e,"offsetTop")}))));var l=Math.abs(this.parallax);return l&&(l=s.reduce((function(e,t,n){return Math.max(e,t+o+(n%2?l:l/8)-a)}),0)),{padding:l,columns:t,translates:i,height:i?a:""}},write:function(e){var t=e.height,n=e.padding;tn(this.$el,"paddingBottom",n||""),!1!==t&&tn(this.$el,"height",t)},events:["resize"]},{read:function(e){var t=e.height;return!qi(this.$el)&&{scrolled:!!this.parallax&&ii(this.$el,t?t-wn(this.$el):0)*Math.abs(this.parallax)}},write:function(e){var t=e.columns,n=e.scrolled,i=e.translates;(!1!==n||i)&&t.forEach((function(e,t){return e.forEach((function(e,r){return tn(e,"transform",n||i?"translateY("+((i&&-i[t][r])+(n?t%2?n:n/8:0))+"px)":"")}))}))},events:["scroll","resize"]}]};function qi(e){return De(e).some((function(e){return"absolute"===tn(e,"position")}))}function Gi(e,t){var n=e.map((function(e){return Math.max.apply(Math,e.map((function(e){return e.offsetHeight})))}));return t.map((function(e){var t=0;return e.map((function(i,r){return t+=r?n[r-1]-e[r-1].offsetHeight:0}))}))}function Yi(e,t){var n=e.filter((function(e){return Yt(e,t)}))[0];return F(n?tn(n,"marginTop"):tn(e[0],"paddingLeft"))}function Zi(e){return e.map((function(e){return e.reduce((function(e,t){return e+t.offsetHeight}),0)}))}var Ji=he?{props:{selMinHeight:String},data:{selMinHeight:!1,forceHeight:!1},computed:{elements:function(e,t){var n=e.selMinHeight;return n?Ut(n,t):[t]}},update:[{read:function(){tn(this.elements,"height","")},order:-5,events:["resize"]},{write:function(){var e=this;this.elements.forEach((function(t){var n=F(tn(t,"minHeight"));n&&(e.forceHeight||Math.round(n+Sn(t,"height","content-box"))>=t.offsetHeight)&&tn(t,"height",n)}))},order:5,events:["resize"]}]}:{},Xi={mixins:[Ji],args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0,forceHeight:!0},computed:{elements:function(e,t){return Ut(e.target,t)}},update:{read:function(){return{rows:(this.row?Hi(this.elements):[this.elements]).map(Qi)}},write:function(e){e.rows.forEach((function(e){var t=e.heights;return e.elements.forEach((function(e,n){return tn(e,"minHeight",t[n])}))}))},events:["resize"]}};function Qi(e){if(e.length<2)return{heights:[""],elements:e};var t=e.map(er),n=Math.max.apply(Math,t),i=e.some((function(e){return e.style.minHeight})),r=e.some((function(e,i){return!e.style.minHeight&&t[i]0&&r/g,or={};function ar(e,t){var n;if(!or[e])for(or[e]={},sr.lastIndex=0;n=sr.exec(e);)or[e][n[3]]='