← Back
Editing: 317.min.js
/*! For license information please see 317.min.js.LICENSE.txt */ (self.webpackChunkpost_expirator=self.webpackChunkpost_expirator||[]).push([[317],{2(e,t,n){var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},9(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 r,o=e("./lib/oop"),i=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),s=e("./editor").Editor,a=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){o.implement(this,i),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 a(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.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)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 l(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 r=this.$editors.some(function(t){return t.session===e});return r&&(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 r=t/this.$splits,o=0;o<this.$splits;o++)(e=this.$editors[o]).container.style.width=r+"px",e.container.style.top="0px",e.container.style.left=o*r+"px",e.container.style.height=n+"px",e.resize();else{var i=n/this.$splits;for(o=0;o<this.$splits;o++)(e=this.$editors[o]).container.style.width=t+"px",e.container.style.top=o*i+"px",e.container.style.left="0px",e.container.style.height=i+"px",e.resize()}}}).call((r=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))}).prototype),t.Split=r}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}),ace.require(["ace/ext/split"],function(t){e&&(e.exports=t)})},47(e,t,n){e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/dom"),o=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,d=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return d.getText&&d.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var f=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var r={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return e.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return("}"==r&&n.length||-1!="`$\\".indexOf(r))&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var o=t(e.substr(1));return r.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return 2==e.length?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return"}"==r&&n.length||-1!="`$\\".indexOf(r)?e=r:"n"==r?e="\n":"t"==r?e="\t":-1!="ulULE".indexOf(r)&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return"function"==typeof r&&(r=this.variables[t](e,t,n)),null==r?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",o=t.guard;o=new RegExp(o,r.replace(/[^gim]/g,""));var i="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(o,function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(i,n),r="E",o=0;o<t.length;o++){var a=t[o];if("object"==typeof a)if(t[o]="",a.changeCase&&a.local){var l=t[o+1];l&&"string"==typeof l&&("u"==a.changeCase?t[o]=l[0].toUpperCase():t[o]=l[0].toLowerCase(),t[o+1]=l.substr(1))}else a.changeCase&&(r=a.changeCase);else"U"==r?t[o]=a.toUpperCase():"L"==r&&(t[o]=a.toLowerCase())}return s.variables.__=e,t.join("")});return a},e.prototype.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){for(var n=[],r="",o=!0,i=0;i<e.length;i++){var s=e[i];if("string"!=typeof s){if(s){if(o=!1,s.fmtString){var a=e.indexOf(s,i+1);-1==a&&(a=e.length),s.fmt=e.slice(i+1,a),i=a}if(s.text){var l=this.getVariableValue(t,s.text,r)+"";s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(n.push(l),c(s)):!l&&s.ifEnd&&c(s.ifEnd)}else s.elseEnd?c(s.elseEnd):(null!=s.tabstopId||null!=s.changeCase)&&n.push(s)}}else n.push(s),"\n"==s?(o=!0,r=""):o&&(r=/^\t*/.exec(s)[0],o=/\S/.test(s))}function c(t){var n=e.indexOf(t,i+1);-1!=n&&(i=n)}return n},e.prototype.getDisplayTextForSnippet=function(e,t){return g.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){void 0===n&&(n={});var r=g.call(this,e,t,n),o=e.getSelectionRange(),i=e.session.replace(o,r.text),s=new m(e),a=e.inVirtualSelectionMode&&e.selection.index;s.addTabstops(r.tabstops,o.start,i,a)},e.prototype.insertSnippet=function(e,t,n){void 0===n&&(n={});var r=this;if(e.inVirtualSelectionMode)return r.insertSnippetForSelection(e,t,n);e.forEachSelection(function(){r.insertSnippetForSelection(e,t,n)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);"object"==typeof r&&(r=r[0]),r.substring&&("js-"==r.substring(0,3)?t="javascript":"css-"==r.substring(0,4)?t="css":"php-"==r.substring(0,4)&&(t="php"))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},e.prototype.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},e.prototype.expandSnippetForSelection=function(e,t){var n,r=e.getCursorPosition(),o=e.session.getLine(r.row),i=o.substring(0,r.column),s=o.substr(r.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,i,s)),!!n},this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(r.row,r.column-n.replaceBefore.length,r.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},e.prototype.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var o=e[r];if((!o.startRe||o.startRe.test(t))&&(!o.endRe||o.endRe.test(n))&&(o.startRe||o.endRe))return o.matchBefore=o.startRe?o.startRe.exec(t):[""],o.matchAfter=o.endRe?o.endRe.exec(n):[""],o.replaceBefore=o.triggerRe?o.triggerRe.exec(t)[0]:"",o.replaceAfter=o.endTriggerRe?o.endTriggerRe.exec(n)[0]:"",o}},e.prototype.register=function(e,t){var n=this.snippetMap,r=this.snippetNameMap,o=this;function i(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=i(e),t=i(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var i=r[t];if(e.name){var l=i[e.name];l&&o.unregister(l),i[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach(function(t){l(e[t])}),this._signal("registerSnippets",{scope:t})},e.prototype.unregister=function(e,t){var n=this.snippetMap,r=this.snippetNameMap;function o(e){var o=r[e.scope||t];if(o&&o[e.name]){delete o[e.name];var i=n[e.scope||t],s=i&&i.indexOf(e);s>=0&&i.splice(s,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],r={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{r=JSON.parse(t[1]),n.push(r)}catch(e){}if(t[4])r.content=t[4].replace(/^\t/gm,""),n.push(r),r={};else{var i=t[2],s=t[3];if("regex"==i){var a=/\/((?:[^\/\\]|\\.)*)|$/g;r.guard=a.exec(s)[1],r.trigger=a.exec(s)[1],r.endTrigger=a.exec(s)[1],r.endGuard=a.exec(s)[1]}else"snippet"==i?(r.tabTrigger=s.match(/^\S*/)[0],r.name||(r.name=s)):i&&(r[i]=s)}}return n},e.prototype.getSnippetByName=function(e,t){var n,r=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var o=r[t];return o&&(n=o[e]),!!n},this),n},e}();o.implement(f.prototype,i);var g=function(e,t,n){void 0===n&&(n={});var r=e.getCursorPosition(),o=e.session.getLine(r.row),i=e.session.getTabString(),s=o.match(/^\s*/)[0];r.column<s.length&&(s=s.slice(0,r.column)),t=t.replace(/\r/g,"");var a=this.tokenizeTmSnippet(t);a=(a=this.resolveVariables(a,e)).map(function(e){return"\n"!=e||n.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,i):e:e+s});var l=[];a.forEach(function(e,t){if("object"==typeof e){var n=e.tabstopId,r=l[n];if(r||((r=l[n]=[]).index=n,r.value="",r.parents={}),-1===r.indexOf(e)){e.choices&&!r.choices&&(r.choices=e.choices),r.push(e);var o=a.indexOf(e,t+1);if(-1!==o){var i=a.slice(t+1,o);i.some(function(e){return"object"==typeof e})&&!r.value?r.value=i:!i.length||r.value&&"string"==typeof r.value||(r.value=i.join(""))}}}}),l.forEach(function(e){e.length=0});var c={};function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if("object"==typeof r){if(c[r.tabstopId])continue;r=t[e.lastIndexOf(r,n-1)]||{tabstopId:r.tabstopId}}t[n]=r}return t}for(var d=0;d<a.length;d++){var h=a[d];if("object"==typeof h){var p=h.tabstopId,f=l[p],g=a.indexOf(h,d+1);if(c[p])c[p]===h&&(delete c[p],Object.keys(c).forEach(function(e){f.parents[e]=!0}));else{c[p]=h;var m=f.value;"string"!=typeof m?m=u(m):h.fmt&&(m=this.tmStrFormat(m,h,e)),a.splice.apply(a,[d+1,Math.max(0,g-d)].concat(m,h)),-1===f.indexOf(h)&&f.push(h)}}}var v=0,y=0,b="";return a.forEach(function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:v,column:y}:e.start={row:v,column:y})}),{text:b,tabstops:l,tokens:a}},m=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},r=n.parents||{},o=this.tabstops.slice(),i=0;i<o.length;i++){var s=o[i],a=s==n||r[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(e.end,l);u=u<0?-u-1:u-1;for(var d=s.rangeList.ranges.slice(c,u),h=0;h<d.length;h++)this.removeRange(d[h])}s.rangeList.$onChange(e)}var p=this.session;this.$inChange||!t||1!=p.getLength()||p.getValue()||this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.session,r=n.getTextRange(e.firstNonLinked),o=0;o<e.length;o++){var i=e[o];if(i.linked){var s=i.original,a=t.snippetManager.tmStrFormat(r,s,this.editor);n.replace(i,a)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),r=0;r<this.ranges.length;r++)if(!this.ranges[r].linked){var o=this.ranges[r].contains(e.row,e.column),i=n||this.ranges[r].contains(t.row,t.column);if(o&&i)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),this.updateTabstopMarkers(),0===n&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var r=this.editor.multiSelect;r.toSingleRange(n);for(var o=0;o<t.length;o++)t.hasLinkedRanges&&t[o].linked||r.addRange(t[o].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,n){var r=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var o=a.fromPoints(n,n);y(o.start,t),y(o.end,t),e[0]=[o],e[0].index=0}var i=[this.index+1,0],s=this.ranges,c=this.snippetId=(this.snippetId||0)+1;e.forEach(function(e,n){var o=this.$openTabstops[n]||e;o.snippetId=c;for(var u=0;u<e.length;u++){var d=e[u],h=a.fromPoints(d.start,d.end||d.start);v(h.start,t),v(h.end,t),h.original=d,h.tabstop=o,s.push(h),o!=e?o.unshift(h):o[u]=h,d.fmtString||o.firstNonLinked&&r?(h.linked=!0,o.hasLinkedRanges=!0):o.firstNonLinked||(o.firstNonLinked=h)}o.firstNonLinked||(o.hasLinkedRanges=!1),o===e&&(i.push(o),this.$openTabstops[n]=o),this.addTabstopMarkers(o),o.rangeList=o.rangeList||new l,o.rangeList.$bias=0,o.rangeList.addList(o)},this),i.length>2&&(this.tabstops.length&&i.push(i.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,i))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new c,m.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var v=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new f;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,i=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,u=e("./../lib/useragent"),d=function(e){return"suggest-aria-id:".concat(e)},h=u.isSafari?"menu":"listbox",p=u.isSafari?"menuitem":"option",f=u.isSafari?"aria-current":"aria-selected",g=function(e){var t=new r(e);t.$maxLines=4;var n=new o(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=g(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r,o=function(){};n.focus=o,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=o,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()});var u=new i(-1,0,-1,1/0),m=new i(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(r){if(r.x!=e.x||r.y!=e.y){(r=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=r.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),y(t))}}else r=e}),n.renderer.on("beforeRender",function(){if(r&&-1!=u.start.row){r.$pos=null;var e=r.getDocumentPosition().row;u.id||n.setRow(e),y(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(r!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),o.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute(f),n.selectedNode.removeAttribute("id")),n.selectedNode=r,r){l.addCssClass(r,"ace_selected");var i=d(e);r.id=i,t.element.setAttribute("aria-activedescendant",i),o.setAttribute("aria-activedescendant",i),r.setAttribute("role",p),r.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),r.setAttribute("aria-label",n.getData(e).caption||n.getData(e).value),r.setAttribute("aria-setsize",n.data.length),r.setAttribute("aria-posinset",e+1),r.setAttribute("aria-describedby","doc-tooltip"),r.setAttribute(f,"true")}});var v=function(){y(-1)},y=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",function(){n.isMouseOver=!1,v()}),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){var t=n.data[e],r=[];if(!t)return r;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function i(e,n){e&&r.push({type:(t.className||"")+(n||""),value:e})}for(var s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(t.matchMask&1<<u||u==a.length)){var d=a.slice(c,u);c=u;var h=s.indexOf(d,l);if(-1==h)continue;i(o.slice(l,h),""),l=h+d.length,i(o.slice(h,l),"completion-highlight")}return i(o.slice(l,o.length),""),r.push({type:"completion-spacer",value:" "}),t.meta&&r.push({type:"completion-meta",value:t.meta}),t.message&&r.push({type:"completion-message",value:t.message}),r},b.$updateOnChange=o,b.start=o,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return m.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),m.start.row!=e&&(n.selection.clearSelection(),m.start.row=m.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(e,t,o,i){if(!i&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===e.top&&n.anchorPos.left===e.left&&n.anchor===o)return!0;var s=this.container,a=window.innerHeight,l=window.innerWidth,c=this.renderer,u=c.$maxLines*t*1.4,d={top:0,bottom:0,left:0},h=a-e.top-3*this.$borderSize-t,p=e.top-3*this.$borderSize;o||(o=p<=h||h>=u?"bottom":"top"),"top"===o?(d.bottom=e.top-this.$borderSize,d.top=d.bottom-u):"bottom"===o&&(d.top=e.top+t+this.$borderSize,d.bottom=d.top+u);var f=d.top>=0&&d.bottom<=a;if(!i&&!f)return!1;c.$maxPixelHeight=f?null:"top"===o?p:h,"top"===o?(s.style.top="",s.style.bottom=a-d.bottom+"px",n.isTopdown=!1):(s.style.top=d.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var g=e.left;return g+s.offsetWidth>l&&(g=l-s.offsetWidth),s.style.left=g+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),r=null),n.anchorPos=e,n.anchor=o,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=g,t.getAriaId=d}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r="doc-tooltip ",o=0;o<this._lines.length;o++)r+="ace-inline-screenreader-line-".concat(o," ");n.setAttribute("aria-describedby",r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement("pre");e.setAttribute("id","ace-inline-screenreader");for(var t=0;t<this._lines.length;t++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(t));var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}();t.AceInlineScreenReader=r}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,t,n){"use strict";var r=e("../snippets").snippetManager,o=e("./inline_screenreader").AceInlineScreenReader,i=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n=n||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||(this.inlineScreenReader=new o(e));var i=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return!(t.hideInlinePreview||!i||!i.startsWith(n)||(this.editor=e,this.inlineScreenReader.setScreenReaderContent(i),""===(i=i.slice(n.length))?e.removeGhostText():e.setGhostText(i),0))},e.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},e.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},e}();t.AceInline=i}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,o=e.length;0===o&&n();for(var i=0;i<o;i++)t(e[i],function(e,t){++r===o&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;for(var o=[],i=t-1;i>=0&&n.test(e[i]);i--)o.push(e[i]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;for(var o=[],i=t;i<e.length&&n.test(e[i]);i++)o.push(e[i]);return o},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),r=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(r,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(r,n.column)},t.triggerAutocomplete=function(e,t){return t=null==t?e.session.getPrecedingCharacter():t,e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,t,n){"use strict";var r=e("./keyboard/hash_handler").HashHandler,o=e("./autocomplete/popup").AcePopup,i=e("./autocomplete/inline").AceInline,s=e("./autocomplete/popup").getAriaId,a=e("./autocomplete/util"),l=e("./lib/lang"),c=e("./lib/dom"),u=e("./snippets").snippetManager,d=e("./config"),h=e("./lib/event"),p=e("./lib/scroll").preventParentScroll,f=function(e,t){t.completer&&t.completer.destroy()},g=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||0===this.editor.completers.length||(this.completions=new v(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new o(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),h.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new i,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&"function"==typeof e.completer.onSeen&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,o=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,o)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();r.top+=o.top-t.layerConfig.offset,r.left+=o.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var i={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(i.top+=t.$ghostTextWidget.el.offsetHeight);var s=e.container.getBoundingClientRect().bottom-n,a=s<i.top?{top:s,left:i.left}:i;this.popup.tryShow(a,n,"bottom")||this.popup.tryShow(r,n,"top")||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r,o=this.popup.getRow(),i=this.popup.data[o];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(r=this.popup.data.indexOf(i)),r&&-1!==r||(r=0),this.popup.setRow(this.autoSelect?r:-1),r===o&&i!==this.completions.filtered[r]&&this.$onPopupChange();var a=this.inlineRenderer&&this.inlineEnabled;if(r===o&&a){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),o=this.popup&&this.popup.container;t==n||t.parentNode==o||r||t==this.tooltipNode||e.relatedTarget==n||this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(""===e.value)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new m(e)),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition();if((i=this.editor.session.getTextRange({start:this.base,end:r}))==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,t):this.detach()}if(n&&n.matches)return r=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new v(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t);var o=this.editor.getSession(),i=(r=this.editor.getCursorPosition(),a.getCompletionPrefix(this.editor));this.base=o.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var s={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,s,function(n,r,o){var i=r.filtered,s=a.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),o){if(!i.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(s)),l){var c=[{caption:l,value:""}];return this.completions=new v(c),this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}return this.detach()}if(1==i.length&&i[0].value==s&&!i[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==i.length)return this.insertMatch(i[0])}this.completions=!o&&this.showLoadingState?new v(e.completionsForLoading.concat(i),r.filterText):r,this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!o)}.bind(this)),!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var o=this.editor.completers.length,i=0;i<o;i++){var s=this.editor.completers[i];if(s.getDocTooltip&&n.completerId===s.id){r=s.getDocTooltip(n);break}}if(r||"string"==typeof n||(r=n),"string"==typeof r&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",p));var t=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||"");var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,o=r.container.getBoundingClientRect();n.style.top=r.container.style.top,n.style.bottom=r.container.style.bottom,n.style.display="block",window.innerWidth-o.right<320?o.left<320?r.isTopdown?(n.style.top=o.bottom+"px",n.style.left=o.left+"px",n.style.right="",n.style.bottom=""):(n.style.top=r.container.offsetTop-n.offsetHeight+"px",n.style.left=o.left+"px",n.style.right="",n.style.bottom=""):(n.style.right=window.innerWidth-o.left+"px",n.style.left=""):(n.style.left=o.right+1+"px",n.style.right="")},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",f),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),d.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",f))),t.completer},e}();g.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!a.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},g.startCommand={name:"startAutocomplete",exec:function(e,t){var n=g.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var m=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,o=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,o+=t.range.end.column-this.initialPosition.pos.column),r||o){var i;i=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var s,a=0;s=i[a];a++)s.start.column-=r,s.end.column+=o,e.session.remove(s)}t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand("insertstring",n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),o=a.getCompletionPrefix(e),i=[];this.completers=e.completers;var s=e.completers.length;return e.completers.forEach(function(l,c){l.getCompletions(e,n,r,o,function(n,r){l.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:l.hideInlinePreview})})),!n&&r&&(i=i.concat(r)),t(null,{prefix:a.getCompletionPrefix(e),matches:i,finished:0===--s})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,o=e.matches;this.completions=new v(o),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),o=!0,i=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(n(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(o?i=t:r(t)))}.bind(this)),o=!1,i){var s=i;i=null,r(s)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){"function"==typeof e.cancel&&e.cancel()})},e}(),v=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),o=t.toLowerCase();e:for(var i,s=0;i=e[s];s++){var a=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(a){var l,c,u=-1,d=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var p=a.toLowerCase().indexOf(o);if(p>-1)h=p;else for(var f=0;f<t.length;f++){var g=a.indexOf(o[f],u+1),m=a.indexOf(r[f],u+1);if((l=g>=0&&(m<0||g<m)?g:m)<0)continue e;(c=l-u-1)>0&&(-1===u&&(h+=10),h+=c,d|=1<<f),u=l}}i.matchMask=d,i.exactMatch=h?0:1,i.$score=(i.score||0)-h,n.push(i)}}return n},e}();t.Autocomplete=g,t.CompletionProvider=m,t.FilteredList=v}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,i,s){var a=function(e,t){var n=function(e,t){return e.getTextRange(r.fromPoints({row:0,column:0},t)).split(o).length-1}(e,t),i=e.getValue().split(o),s=Object.create(null),a=i[n];return i.forEach(function(e,t){if(e&&e!==a){var r=Math.abs(n-t),o=i.length-r;s[e]?s[e]=Math.max(o,s[e]):s[e]=o}}),s}(t,n);s(null,Object.keys(a).map(function(e){return{caption:e,value:e,score:a[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,i=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),l=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,r,o){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,o);var i=e.session.getState(n.row),s=t.$mode.getCompletions(i,t,n,r);o(null,s=s.map(function(e){return e.completerId=c.id,e}))},id:"keywordCompleter"},u={getCompletions:function(e,t,n,o,i){var s=[],a=t.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=r.getActiveScopes(e);var l=r.snippetMap,c=[];s.forEach(function(e){for(var t=l[e]||[],n=t.length;n--;){var r=t[n],o=r.name||r.tabTrigger;o&&c.push({caption:o,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"⇥ ":"snippet",completerId:u.id})}},this),i(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,function(e,t,r,o){return n[t]=o||""}).replace(/\$(\d+?)/g,function(e,t){return n[t]})))].join(""))},id:"snippetCompleter"},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var h,p={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){g(t.session.$mode)},g=function(e){"string"==typeof e&&(e=i.$modes[e]),e&&(r.files||(r.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},m=function(e,t){t&&e&&!r.files[e]&&(r.files[e]={},i.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g("ace/mode/"+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){h=e;var r=e.editor.$liveAutocompletionDelay;r?y.delay(r):b(e)}},y=s.delayedCall(function(){b(h)},0),b=function(e){var t=e.editor,n=a.getCompletionPrefix(t),r=e.args,i=a.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||i){var s=o.for(t);s.autoShown=!0,s.showPopup(t)}},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",v)):this.commands.off("afterExec",v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(p),this.off("changeMode",f))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(t){e&&(e.exports=t)})},79(e,t,n){var r=n(3702),o=n(80),i=n(4739),s=n(8655),a=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},80(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},104(e,t,n){var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},124(e){"use strict";var t,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{Immer:()=>Y,applyPatches:()=>se,castDraft:()=>ce,castImmutable:()=>ue,createDraft:()=>ae,current:()=>Q,enableMapSet:()=>ee,enablePatches:()=>J,finishDraft:()=>le,freeze:()=>k,immerable:()=>l,isDraft:()=>h,isDraftable:()=>p,nothing:()=>a,original:()=>m,produce:()=>ne,produceWithPatches:()=>re,setAutoFreeze:()=>oe,setUseStrictShallowCopy:()=>ie}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))!i.call(e,s)&&void 0!==s&&n(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(n({},"__esModule",{value:!0}),t));var a=Symbol.for("immer-nothing"),l=Symbol.for("immer-draftable"),c=Symbol.for("immer-state");function u(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var d=Object.getPrototypeOf;function h(e){return!!e&&!!e[c]}function p(e){return!!e&&(g(e)||Array.isArray(e)||!!e[l]||!!e.constructor?.[l]||S(e)||C(e))}var f=Object.prototype.constructor.toString();function g(e){if(!e||"object"!=typeof e)return!1;let t=d(e);if(null===t)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===f}function m(e){return h(e)||u(15),e[c].t}function v(e,t){0===y(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function y(e){let t=e[c];return t?t.o:Array.isArray(e)?1:S(e)?2:C(e)?3:0}function b(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function w(e,t){return 2===y(e)?e.get(t):e[t]}function x(e,t,n){let r=y(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function S(e){return e instanceof Map}function C(e){return e instanceof Set}function _(e){return e.e||e.t}function $(e,t){if(S(e))return new Map(e);if(C(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=g(e);if(!0===t||"class_only"===t&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[c];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(d(e),t)}{let t=d(e);if(null!==t&&n)return{...e};let r=Object.create(t);return Object.assign(r,e)}}function k(e,t=!1){return M(e)||h(e)||!p(e)||(y(e)>1&&(e.set=e.add=e.clear=e.delete=A),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>k(t,!0))),e}function A(){u(2)}function M(e){return Object.isFrozen(e)}var E,R={};function T(e){let t=R[e];return t||u(0),t}function L(e,t){R[e]||(R[e]=t)}function N(){return E}function O(e,t){t&&(T("Patches"),e.f=[],e.h=[],e.b=t)}function I(e){D(e),e.a.forEach(j),e.a=null}function D(e){e===E&&(E=e.i)}function P(e){return E=function(e,t){return{a:[],i:e,p:t,P:!0,d:0}}(E,e)}function j(e){let t=e[c];0===t.o||1===t.o?t.x():t.m=!0}function z(e,t){t.d=t.a.length;let n=t.a[0];return void 0!==e&&e!==n?(n[c].s&&(I(t),u(4)),p(e)&&(e=F(t,e),t.i||H(t,e)),t.f&&T("Patches").T(n[c].t,e,t.f,t.h)):e=F(t,n,[]),I(t),t.f&&t.b(t.f,t.h),e!==a?e:void 0}function F(e,t,n){if(M(t))return t;let r=t[c];if(!r)return v(t,(o,i)=>B(e,r,t,o,i,n)),t;if(r.n!==e)return t;if(!r.s)return H(e,r.t,!0),r.t;if(!r.c){r.c=!0,r.n.d--;let t=r.e,o=t,i=!1;3===r.o&&(o=new Set(t),t.clear(),i=!0),v(o,(o,s)=>B(e,r,t,o,s,n,i)),H(e,t,!1),n&&e.f&&T("Patches").g(r,n,e.f,e.h)}return r.e}function B(e,t,n,r,o,i,s){if(h(o)){let s=F(e,o,i&&t&&3!==t.o&&!b(t.r,r)?i.concat(r):void 0);if(x(n,r,s),!h(s))return;e.P=!1}else s&&n.add(o);if(p(o)&&!M(o)){if(!e.p.y&&e.d<1)return;F(e,o),(!t||!t.n.i)&&"symbol"!=typeof r&&Object.prototype.propertyIsEnumerable.call(n,r)&&H(e,o)}}function H(e,t,n=!1){!e.i&&e.p.y&&e.P&&k(t,n)}var W={get(e,t){if(t===c)return e;let n=_(e);if(!b(n,t))return function(e,t,n){let r=U(t,n);return r?"value"in r?r.value:r.get?.call(e.u):void 0}(e,n,t);let r=n[t];return e.c||!p(r)?r:r===V(e.t,t)?(K(e),e.e[t]=X(r,e)):r},has:(e,t)=>t in _(e),ownKeys:e=>Reflect.ownKeys(_(e)),set(e,t,n){let r=U(_(e),t);if(r?.set)return r.set.call(e.u,n),!0;if(!e.s){let r=V(_(e),t),o=r?.[c];if(o&&o.t===n)return e.e[t]=n,e.r[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||b(e.t,t)))return!0;K(e),q(e)}return e.e[t]===n&&(void 0!==n||t in e.e)||Number.isNaN(n)&&Number.isNaN(e.e[t])||(e.e[t]=n,e.r[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==V(e.t,t)||t in e.t?(e.r[t]=!1,K(e),q(e)):delete e.r[t],e.e&&delete e.e[t],!0),getOwnPropertyDescriptor(e,t){let n=_(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.o||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){u(11)},getPrototypeOf:e=>d(e.t),setPrototypeOf(){u(12)}},G={};function V(e,t){let n=e[c];return(n?_(n):e)[t]}function U(e,t){if(!(t in e))return;let n=d(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=d(n)}}function q(e){e.s||(e.s=!0,e.i&&q(e.i))}function K(e){e.e||(e.e=$(e.t,e.n.p.S))}v(W,(e,t)=>{G[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),G.deleteProperty=function(e,t){return G.set.call(this,e,t,void 0)},G.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var Y=class{constructor(e){this.y=!0,this.S=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){let n=t;t=e;let r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&u(6),void 0!==n&&"function"!=typeof n&&u(7),p(e)){let o=P(this),i=X(e,void 0),s=!0;try{r=t(i),s=!1}finally{s?I(o):D(o)}return O(o,n),z(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===a&&(r=void 0),this.y&&k(r,!0),n){let t=[],o=[];T("Patches").T(e,r,t,o),n(t,o)}return r}u(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){p(e)||u(8),h(e)&&(e=Q(e));let t=P(this),n=X(e,void 0);return n[c].l=!0,D(t),n}finishDraft(e,t){let n=e&&e[c];(!n||!n.l)&&u(9);let{n:r}=n;return O(r,t),z(void 0,r)}setAutoFreeze(e){this.y=e}setUseStrictShallowCopy(e){this.S=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=T("Patches").A;return h(e)?r(e,t):this.produce(e,e=>r(e,t))}};function X(e,t){let n=S(e)?T("MapSet").I(e,t):C(e)?T("MapSet").D(e,t):function(e,t){let n=Array.isArray(e),r={o:n?1:0,n:t?t.n:N(),s:!1,c:!1,r:{},i:t,t:e,u:null,e:null,x:null,l:!1},o=r,i=W;n&&(o=[r],i=G);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.u=a,r.x=s,a}(e,t);return(t?t.n:N()).a.push(n),n}function Q(e){return h(e)||u(10),Z(e)}function Z(e){if(!p(e)||M(e))return e;let t,n=e[c];if(n){if(!n.s)return n.t;n.c=!0,t=$(e,n.n.p.S)}else t=$(e,!0);return v(t,(e,n)=>{x(t,e,Z(n))}),n&&(n.c=!1),t}function J(){let e="replace",t="add",n="remove";function r(e){if(!p(e))return e;if(Array.isArray(e))return e.map(r);if(S(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(C(e))return new Set(Array.from(e).map(r));let t=Object.create(d(e));for(let n in e)t[n]=r(e[n]);return b(e,l)&&(t[l]=e[l]),t}function o(e){return h(e)?r(e):e}L("Patches",{A:function(o,i){return i.forEach(i=>{let{path:s,op:a}=i,l=o;for(let e=0;e<s.length-1;e++){let t=y(l),n=s[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&u(19),"function"==typeof l&&"prototype"===n&&u(19),l=w(l,n),"object"!=typeof l&&u(18,s.join("/"))}let c=y(l),d=r(i.value),h=s[s.length-1];switch(a){case e:switch(c){case 2:return l.set(h,d);case 3:u(16);default:return l[h]=d}case t:switch(c){case 1:return"-"===h?l.push(d):l.splice(h,0,d);case 2:return l.set(h,d);case 3:return l.add(d);default:return l[h]=d}case n:switch(c){case 1:return l.splice(h,1);case 2:return l.delete(h);case 3:return l.delete(i.value);default:return delete l[h]}default:u(17)}}),o},g:function(r,i,s,a){switch(r.o){case 0:case 2:return function(r,i,s,a){let{t:l,e:c}=r;v(r.r,(r,u)=>{let d=w(l,r),h=w(c,r),p=u?b(l,r)?e:t:n;if(d===h&&p===e)return;let f=i.concat(r);s.push(p===n?{op:p,path:f}:{op:p,path:f,value:h}),a.push(p===t?{op:n,path:f}:p===n?{op:t,path:f,value:o(d)}:{op:e,path:f,value:o(d)})})}(r,i,s,a);case 1:return function(r,i,s,a){let{t:l,r:c}=r,u=r.e;u.length<l.length&&([l,u]=[u,l],[s,a]=[a,s]);for(let t=0;t<l.length;t++)if(c[t]&&u[t]!==l[t]){let n=i.concat([t]);s.push({op:e,path:n,value:o(u[t])}),a.push({op:e,path:n,value:o(l[t])})}for(let e=l.length;e<u.length;e++){let n=i.concat([e]);s.push({op:t,path:n,value:o(u[e])})}for(let e=u.length-1;l.length<=e;--e){let t=i.concat([e]);a.push({op:n,path:t})}}(r,i,s,a);case 3:return function(e,r,o,i){let{t:s,e:a}=e,l=0;s.forEach(e=>{if(!a.has(e)){let s=r.concat([l]);o.push({op:n,path:s,value:e}),i.unshift({op:t,path:s,value:e})}l++}),l=0,a.forEach(e=>{if(!s.has(e)){let s=r.concat([l]);o.push({op:t,path:s,value:e}),i.unshift({op:n,path:s,value:e})}l++})}(r,i,s,a)}},T:function(t,n,r,o){r.push({op:e,path:[],value:n===a?void 0:n}),o.push({op:e,path:[],value:t})}})}function ee(){class e extends Map{constructor(e,t){super(),this[c]={o:2,i:t,n:t?t.n:N(),s:!1,c:!1,e:void 0,r:void 0,t:e,u:this,l:!1,m:!1}}get size(){return _(this[c]).size}has(e){return _(this[c]).has(e)}set(e,n){let r=this[c];return o(r),(!_(r).has(e)||_(r).get(e)!==n)&&(t(r),q(r),r.r.set(e,!0),r.e.set(e,n),r.r.set(e,!0)),this}delete(e){if(!this.has(e))return!1;let n=this[c];return o(n),t(n),q(n),n.t.has(e)?n.r.set(e,!1):n.r.delete(e),n.e.delete(e),!0}clear(){let e=this[c];o(e),_(e).size&&(t(e),q(e),e.r=new Map,v(e.t,t=>{e.r.set(t,!1)}),e.e.clear())}forEach(e,t){_(this[c]).forEach((n,r,o)=>{e.call(t,this.get(r),r,this)})}get(e){let n=this[c];o(n);let r=_(n).get(e);if(n.c||!p(r)||r!==n.t.get(e))return r;let i=X(r,n);return t(n),n.e.set(e,i),i}keys(){return _(this[c]).keys()}values(){let e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){let e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let t=e.next();if(t.done)return t;let n=this.get(t.value);return{done:!1,value:[t.value,n]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.e||(e.r=new Map,e.e=new Map(e.t))}class n extends Set{constructor(e,t){super(),this[c]={o:3,i:t,n:t?t.n:N(),s:!1,c:!1,e:void 0,t:e,u:this,a:new Map,m:!1,l:!1}}get size(){return _(this[c]).size}has(e){let t=this[c];return o(t),t.e?!!(t.e.has(e)||t.a.has(e)&&t.e.has(t.a.get(e))):t.t.has(e)}add(e){let t=this[c];return o(t),this.has(e)||(r(t),q(t),t.e.add(e)),this}delete(e){if(!this.has(e))return!1;let t=this[c];return o(t),r(t),q(t),t.e.delete(e)||!!t.a.has(e)&&t.e.delete(t.a.get(e))}clear(){let e=this[c];o(e),_(e).size&&(r(e),q(e),e.e.clear())}values(){let e=this[c];return o(e),r(e),e.e.values()}entries(){let e=this[c];return o(e),r(e),e.e.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){let n=this.values(),r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}}function r(e){e.e||(e.e=new Set,e.t.forEach(t=>{if(p(t)){let n=X(t,e);e.a.set(t,n),e.e.add(n)}else e.e.add(t)}))}function o(e){e.m&&u(3,JSON.stringify(_(e)))}L("MapSet",{I:function(t,n){return new e(t,n)},D:function(e,t){return new n(e,t)}})}var te=new Y,ne=te.produce,re=te.produceWithPatches.bind(te),oe=te.setAutoFreeze.bind(te),ie=te.setUseStrictShallowCopy.bind(te),se=te.applyPatches.bind(te),ae=te.createDraft.bind(te),le=te.finishDraft.bind(te);function ce(e){return e}function ue(e){return e}},183(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8227);function o(e){return"string"==typeof e?new r.LN([[document.querySelector(e)]],[document.documentElement]):new r.LN([[e]],r.zr)}},257(e,t,n){var r=n(980),o=n(6017),i=n(3007);e.exports=function(e){if(e instanceof r)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},270(e,t,n){var r=n(7068),o=n(346);e.exports=function e(t,n,i,s,a){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,s,e,a))}},289(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},317(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},353(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}))},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},403(e,t,n){"use strict";n.d(t,{o:()=>y});var r=n(1594),o=n(6100),i=n(3402),s=n(4232),a=n(9216),l=n(183),c=n(1967);const u=({id:e,x:t,y:n,width:i,height:s,style:a,color:l,strokeColor:c,strokeWidth:u,className:d,borderRadius:h,shapeRendering:p,onClick:f,selected:g})=>{const{background:m,backgroundColor:v}=a||{},y=l||m||v;return r.createElement("rect",{className:(0,o.A)(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:h,ry:h,width:i,height:s,fill:y,stroke:c,strokeWidth:u,shapeRendering:p,onClick:f?t=>f(t,e):void 0})};u.displayName="MiniMapNode";var d=(0,r.memo)(u);const h=e=>e.nodeOrigin,p=e=>e.getNodes().filter(e=>!e.hidden&&e.width&&e.height),f=e=>e instanceof Function?e:()=>e;var g=(0,r.memo)(function({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:s=2,nodeComponent:a=d,onClick:l}){const u=(0,c.Pj)(p,i.x),g=(0,c.Pj)(h),m=f(t),v=f(e),y=f(n),b="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return r.createElement(r.Fragment,null,u.map(e=>{const{x:t,y:n}=(0,c.Cz)(e,g).positionAbsolute;return r.createElement(a,{key:e.id,x:t,y:n,width:e.width,height:e.height,style:e.style,selected:e.selected,className:y(e),color:m(e),borderRadius:o,strokeColor:v(e),strokeWidth:s,shapeRendering:b,onClick:l,id:e.id})}))});const m=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?(0,c.Mi)((0,c.Jo)(t,e.nodeOrigin),n):n,rfId:e.rfId}};function v({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:u="#e2e2e2",nodeClassName:d="",nodeBorderRadius:h=5,nodeStrokeWidth:p=2,nodeComponent:f,maskColor:v="rgb(240, 240, 240, 0.6)",maskStrokeColor:y="none",maskStrokeWidth:b=1,position:w="bottom-right",onClick:x,onNodeClick:S,pannable:C=!1,zoomable:_=!1,ariaLabel:$="React Flow mini map",inversePan:k=!1,zoomStep:A=10,offsetScale:M=5}){const E=(0,c.PI)(),R=(0,r.useRef)(null),{boundingRect:T,viewBB:L,rfId:N}=(0,c.Pj)(m,i.x),O=e?.width??200,I=e?.height??150,D=T.width/O,P=T.height/I,j=Math.max(D,P),z=j*O,F=j*I,B=M*j,H=T.x-(z-T.width)/2-B,W=T.y-(F-T.height)/2-B,G=z+2*B,V=F+2*B,U=`react-flow__minimap-desc-${N}`,q=(0,r.useRef)(0);q.current=j,(0,r.useEffect)(()=>{if(R.current){const e=(0,l.A)(R.current),t=e=>{const{transform:t,d3Selection:n,d3Zoom:r}=E.getState();if("wheel"!==e.sourceEvent.type||!n||!r)return;const o=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*A,i=t[2]*Math.pow(2,o);r.scaleTo(n,i)},n=e=>{const{transform:t,d3Selection:n,d3Zoom:r,translateExtent:o,width:i,height:a}=E.getState();if("mousemove"!==e.sourceEvent.type||!n||!r)return;const l=q.current*Math.max(1,t[2])*(k?-1:1),c={x:t[0]-e.sourceEvent.movementX*l,y:t[1]-e.sourceEvent.movementY*l},u=[[0,0],[i,a]],d=s.GS.translate(c.x,c.y).scale(t[2]),h=r.constrain()(d,u,o);r.transform(n,h)},r=(0,s.s_)().on("zoom",C?n:null).on("zoom.wheel",_?t:null);return e.call(r),()=>{e.on("zoom",null)}}},[C,_,k,A]);const K=x?e=>{const t=(0,a.A)(e);x(e,{x:t[0],y:t[1]})}:void 0,Y=S?(e,t)=>{const n=E.getState().nodeInternals.get(t);S(e,n)}:void 0;return r.createElement(c.Zk,{position:w,style:e,className:(0,o.A)(["react-flow__minimap",t]),"data-testid":"rf__minimap"},r.createElement("svg",{width:O,height:I,viewBox:`${H} ${W} ${G} ${V}`,role:"img","aria-labelledby":U,ref:R,onClick:K},$&&r.createElement("title",{id:U},$),r.createElement(g,{onClick:Y,nodeColor:u,nodeStrokeColor:n,nodeBorderRadius:h,nodeClassName:d,nodeStrokeWidth:p,nodeComponent:f}),r.createElement("path",{className:"react-flow__minimap-mask",d:`M${H-B},${W-B}h${G+2*B}v${V+2*B}h${-G-2*B}z\n M${L.x},${L.y}h${L.width}v${L.height}h${-L.width}z`,fill:v,fillRule:"evenodd",stroke:y,strokeWidth:b,pointerEvents:"none"})))}v.displayName="MiniMap";var y=(0,r.memo)(v)},420(e,t,n){"use strict";var r=n(5072),o=n.n(r),i=n(7825),s=n.n(i),a=n(7659),l=n.n(a),c=n(5056),u=n.n(c),d=n(540),h=n.n(d),p=n(1113),f=n.n(p),g=n(6241),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=h(),o()(g.A,m),g.A&&g.A.locals&&g.A.locals},470(e,t,n){"use strict";var r=n(5549);n(3091).default,n(4038).default,t.Ay=r.default},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},542(e,t,n){"use strict";n.d(t,{Fm:()=>i,_f:()=>s,dz:()=>m,kx:()=>y,JF:()=>f,_A:()=>v});var r=n(2470);function o(e=null){if(!e){if("undefined"==typeof window)return!1;e=window}const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}const i=13,s=27,a="alt",l="ctrl",c="meta",u="shift";function d(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function h(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]))}const p={primary:e=>e()?[c]:[l],primaryShift:e=>e()?[u,c]:[l,u],primaryAlt:e=>e()?[a,c]:[l,a],secondary:e=>e()?[u,a,c]:[l,u,a],access:e=>e()?[l,a]:[u,a],ctrl:()=>[l],alt:()=>[a],ctrlShift:()=>[l,u],shift:()=>[u],shiftAlt:()=>[u,a],undefined:()=>[]},f=h(p,e=>(t,n=o)=>[...e(n),t.toLowerCase()].join("+")),g=h(p,e=>(t,n=o)=>{const r=n(),i={[a]:r?"⌥":"Alt",[l]:r?"⌃":"Ctrl",[c]:"⌘",[u]:r?"⇧":"Shift"};return[...e(n).reduce((e,t)=>{var n;const o=null!==(n=i[t])&&void 0!==n?n:t;return r?[...e,o]:[...e,o,"+"]},[]),d(t)]}),m=h(g,e=>(t,n=o)=>e(t,n).join("")),v=h(p,e=>(t,n=o)=>{const i=n(),s={[u]:"Shift",[c]:i?"Command":"Control",[l]:"Control",[a]:i?"Option":"Alt",",":(0,r.__)("Comma"),".":(0,r.__)("Period"),"`":(0,r.__)("Backtick"),"~":(0,r.__)("Tilde")};return[...e(n),t].map(e=>{var t;return d(null!==(t=s[e])&&void 0!==t?t:e)}).join(i?" ":" + ")}),y=h(p,e=>(t,n,r=o)=>{const i=e(r),s=function(e){return[a,l,c,u].filter(t=>e[`${t}Key`])}(t),d={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},h=i.filter(e=>!s.includes(e)),p=s.filter(e=>!i.includes(e));if(h.length>0||p.length>0)return!1;let f=t.key.toLowerCase();return n?(t.altKey&&1===n.length&&(f=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&1===n.length&&d[t.code]&&(f=d[t.code]),"del"===n&&(n="delete"),f===n.toLowerCase()):i.includes(f)})},574(e,t,n){"use strict";function r(){}function o(e){return null==e?r:function(){return this.querySelector(e)}}n.d(t,{A:()=>o})},583(e,t,n){var r=n(7237),o=n(7255),i=n(8586),s=n(7797);e.exports=function(e){return i(e)?r(s(e)):o(e)}},631(e,t,n){var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},641(e,t,n){var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},659(e,t,n){var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}},684(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}))},689(e,t,n){var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,s,a){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:o.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=l;++d<u;){var v=e[h=c[d]],y=t[h];if(i)var b=l?i(y,v,h,t,e,a):i(v,y,h,e,t,a);if(!(void 0===b?v===y||s(v,y,n,i,a):b)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return a.delete(e),a.delete(t),g}},695(e,t,n){var r=n(8096),o=n(2428),i=n(6449),s=n(3656),a=n(361),l=n(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),d=!n&&!u&&s(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],g=f.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||f.push(m);return f}},747(e,t,n){"use strict";function r(){return[]}function o(e){return null==e?r:function(){return this.querySelectorAll(e)}}n.d(t,{A:()=>o})},756(e,t,n){var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776(e,t,n){var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,r(s)]}return t}},814(e,t,n){"use strict";e.exports=n(3258)},821(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null==e},e.exports=t.default,e.exports.default=t.default},828(e,t,n){var r=n(4647),o=n(3222),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(s,"")}},840(e,t,n){"use strict";var r,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(l,{parseJsonLogic:()=>B}),e.exports=(r=l,((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of s(t))a.call(e,n)||void 0===n||o(e,n,{get:()=>t[n],enumerable:!(r=i(t,n))||r.enumerable});return e})(o({},"__esModule",{value:!0}),r));var c={"=":"!=","!=":"=","<":">=","<=":">",">":"<=",">=":"<",beginsWith:"doesNotBeginWith",doesNotBeginWith:"beginsWith",endsWith:"doesNotEndWith",doesNotEndWith:"endsWith",contains:"doesNotContain",doesNotContain:"contains",between:"notBetween",notBetween:"between",in:"notIn",notIn:"in",notNull:"null",null:"notNull"},u=(e,t=",")=>e.map(e=>`${e??""}`.replaceAll(t[0],`\\${t[0]}`)).join(t),d=(n(9407),n(814)),h=(new RegExp(d.numericRegex.source.replace(/^\^/,String.raw`^\s*`).replace(/\$$/,String.raw`\s*$`)),e=>null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype),p=e=>h(e)&&Array.isArray(e.rules),f=e=>p(e)&&"string"==typeof e.combinator,g=e=>{if((e=>p(e)&&void 0===e.combinator)(e))return e;const{combinator:t,...n}=e,r=[],{length:o}=e.rules;for(const[n,i]of e.rules.entries())p(i)?r.push(g(i)):r.push(i),t&&n<o-1&&r.push(t);return{...n,rules:r}},m=Object.keys,v=n(9407),y=e=>h(e)&&"name"in e&&"string"==typeof e.name,b=e=>h(e)&&"value"in e&&"string"==typeof e.value;function w(e,t){return(0,v.produce)(e=>{const n={};let r=!!t;if(y(e)&&!b(e)?(n.value=e.name,r=!0):!y(e)&&b(e)&&(n.name=e.value,r=!0),r)return Object.assign({},t,e,n)})(e)}var x=e=>{let t=!1;if(Array.isArray(e))for(const n of e){if(!y(n)&&!b(n))return!1;t=!0}return t},S=(e,{allowEmpty:t=!1}={})=>{let n=!1;if(Array.isArray(e))for(const r of e){if(!(h(r)&&"options"in r&&(x(r.options)||t&&Array.isArray(r.options)&&0===r.options.length)))return!1;n=!0}return n},C=(e,t,n)=>{const r=w(e),o=w(n);return r.value!==o.value&&("string"==typeof r.comparator?r[r.comparator]===o[r.comparator]:r.comparator?.(o,t)??!1)},_=["value"],$={name:"name",value:"name",valueSources:null,label:"label"},k=(e,t,n)=>{const r=e?w(e):$;if(r.valueSources)return"function"==typeof r.valueSources?r.valueSources(t):r.valueSources;if(n){const e=n(r.value,t,{fieldData:w(r)});if(e)return e}return _};var A=n(9407),M=globalThis.crypto,E=()=>"00-0-4-2-000".replaceAll(/[^-]/g,e=>(65536*(Math.random()+Math.trunc(e))>>parseInt(e)).toString(16).padStart(4,"0"));if(M)if("function"==typeof M.randomUUID)E=()=>M.randomUUID();else if("function"==typeof M.getRandomValues){const e="89ab",t=new Uint32Array(32);E=()=>{M.getRandomValues(t);let n=(t[0]%16).toString(16);for(let r=1;r<32;r++)n=12===r?`${n}4`:16===r?`${n}${e[t[17]%4]}`:`${n}${(t[r]%16).toString(16)}`,7!==r&&11!==r&&15!==r&&19!==r||(n=`${n}-`);return n}}var R=(e,{idGenerator:t=E}={})=>(0,A.produce)(e,e=>{e.id||(e.id=t()),e.rules=e.rules.map(e=>"string"==typeof e?e:p(e)?R(e,{idGenerator:t}):((e,{idGenerator:t=E}={})=>(0,A.produce)(e,e=>{e.id||(e.id=t())}))(e,{idGenerator:t}))}),T=e=>(e=>h(e)&&"var"in e)(e)&&"string"==typeof e.var,L=e=>h(e)&&"=="in e,N=e=>h(e)&&"==="in e,O=e=>h(e)&&"!="in e,I=e=>h(e)&&"!=="in e,D=e=>h(e)&&"in"in e&&!Array.isArray(e.in[1]),P=e=>h(e)&&"<"in e&&Array.isArray(e["<"])&&3===e["<"].length,j=e=>h(e)&&"startsWith"in e,z=e=>h(e)&&"endsWith"in e,F={combinator:"and",rules:[]};function B(e,t={}){const n=(e=>{const t=e?Array.isArray(e)?e:Object.keys(e).map(t=>({...e[t],name:t})).sort((e,t)=>e.label.localeCompare(t.label)):[];return(e=>{const t=new Set,n=[];for(const r of e)t.has(r.value??r.name)||(t.add(r.value??r.name),n.push(r));return e.length===n.length?e:n})((e=>Array.isArray(e)&&e.length>0&&h(e[0])&&"options"in e[0]&&Array.isArray(e[0].options))(n=t)?n.flatMap(e=>e.options):n);var n})(t.fields),{getValueSources:r,listsAsArrays:o,jsonLogicOperations:i}=t,s=(e,t,o)=>function(e){const{fieldsFlat:t,fieldName:n,operator:r,subordinateFieldName:o,getValueSources:i}=e;if(0===t.length)return!0;let s=!1;const a=w(t.find(e=>e.name===n));if(a&&(s=!(!o&&"notNull"!==r&&"null"!==r&&!k(a,r,i).includes("value")),s&&o))if(k(a,r,i).includes("field")&&n!==o){const e=((e,t,n)=>{if(!e.comparator){const n=t=>(t.value??t.name)!==(e.value??e.name);return S(t)?t.map(e=>({...e,options:e.options.filter(e=>n(e))})):t.filter(e=>n(e))}return S(t)?t.map(t=>({...t,options:t.options.filter(t=>C(e,n,t))})).filter(e=>e.options.length>0):t.filter(t=>C(e,n,t))})(a,t,r);e.some(e=>e.name===o)||(s=!1)}else s=!1;return s}({fieldName:e,fieldsFlat:n,operator:t,subordinateFieldName:o,getValueSources:r}),a=t.generateIDs?R:e=>e;let l=e;if("string"==typeof e)try{l=JSON.parse(e)}catch{return a(F)}const d=function e(t,n){if(n&&!h(t))return!1;const[r,a]=Object.entries(t||{})?.[0]??[];if(i&&m(i).includes(r)){const e=i[r](a);return!!e&&(n&&!p(e)?{combinator:"and",rules:[e]}:e)}if((e=>h(e)&&"and"in e)(t))return{combinator:"and",rules:t.and.map(t=>e(t)).filter(Boolean)};if((e=>h(e)&&"or"in e)(t))return{combinator:"or",rules:t.or.map(t=>e(t)).filter(Boolean)};if((e=>h(e)&&"!"in e)(t)){const r=e(t["!"]);if(r){if(!(f(r)||"between"!==r.operator&&"in"!==r.operator&&"contains"!==r.operator&&"beginsWith"!==r.operator&&"endsWith"!==r.operator)){const e={...r,operator:c[r.operator]};return n?{combinator:"and",rules:[e]}:e}return P(t["!"])||f(r)?{...r,not:!0}:{combinator:"and",rules:[r],not:!0}}return!1}if((e=>h(e)&&"!!"in e)(t))return e(t["!!"])||!1;let l,d=!1,g="",v="=",y="";if(L(t)||N(t)||O(t)||I(t)||(e=>h(e)&&">"in e)(t)||(e=>h(e)&&">="in e)(t)||(e=>h(e)&&"<"in e&&2===e["<"].length)(t)||(e=>h(e)&&"<="in e&&2===e["<="].length)(t)||D(t)||j(t)||z(t)){const[e,n]=a;if(T(e)&&!h(n))g=e.var,y=n;else if(!h(e)&&T(n))g=n.var,y=e;else{if(!T(e)||!T(n))return!1;g=e.var,y=n.var,l="field"}v=L(t)||N(t)?null===y?"null":"=":O(t)||I(t)?null===y?"notNull":"!=":D(t)?"contains":j(t)?"beginsWith":z(t)?"endsWith":r,s(g,v,"field"===l?y:void 0)&&(d={field:g,operator:v,value:y,valueSource:l})}else if(P(t)&&T(t["<"][1])){g=t["<"][1].var;const n=[t["<"][0],t["<"][2]];if(n.every(e=>T(e))||n.every(e=>"string"==typeof e)||n.every(e=>"number"==typeof e)||n.every(e=>"boolean"==typeof e))return e({and:[{">":[{var:g},n[0]]},{"<":[{var:g},n[1]]}]})||!1}else if((e=>h(e)&&"<="in e&&Array.isArray(e["<="])&&3===e["<="].length)(t)&&T(t["<="][1])){g=t["<="][1].var,v="between";const e=[t["<="][0],t["<="][2]];if(t["<="].every(e=>T(e))){l="field";const t=e.map(e=>e.var).filter(e=>s(g,v,e));y=o?t:u(t,",")}else(e.every(e=>"string"==typeof e)||e.every(e=>"number"==typeof e)||e.every(e=>"boolean"==typeof e))&&(y=o?e:u(e.map(e=>`${e}`),","));s(g,v)&&y.length>=2&&(d={field:g,operator:v,value:y,valueSource:l})}else if((e=>h(e)&&"in"in e&&Array.isArray(e.in[1]))(t)&&T(a[0])){if(g=a[0].var,v="in",t.in[1].every(e=>T(e))){l="field";const e=t.in[1].map(e=>e.var).filter(e=>s(g,v,e));y=o?e:u(e,",")}else(t.in[1].every(e=>"string"==typeof e)||t.in[1].every(e=>"number"==typeof e)||t.in[1].every(e=>"boolean"==typeof e))&&(y=o?t.in[1]:u(t.in[1].map(e=>`${e}`),","));y.length>0&&(d={field:g,operator:v,value:y,valueSource:l})}return!!d&&(n?{combinator:"and",rules:[d]}:d)}(l,!0)||F;return a(t.independentCombinators?g(d):d)}},909(e,t,n){var r=n(641),o=n(8329)(r);e.exports=o},938(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945(e,t,n){var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}},952(e,t,n){e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,r){"string"==typeof e?(2==arguments.length&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,r,o=function(e,t,n){if("string"==typeof t){var r=a(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],s=0,l=t.length;s<l;++s){var c=a(e,t[s]);if(null==c&&i.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},i=function(e,t){var n=o("",e,t);return null==n&&i.original?i.original.apply(this,arguments):n},s=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return s(e,n[0])+"!"+s(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,n){n=s(e,n);var r=t.modules[n];if(!r){if("function"==typeof(r=t.payloads[n])){var i={},a={id:n,uri:"",exports:i,packaged:!0};i=r(function(e,t){return o(n,e,t)},i,a)||a.exports,t.modules[n]=i,delete t.payloads[n]}r=t.modules[n]=i||r}return r};r=e,(n="ace")&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.require&&r.require.packaged||(i.original=r.require,r.require=i,r.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,"startsWith",function(e,t){return t=t||0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,"endsWith",function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),String.prototype.repeat||r(String.prototype,"repeat",function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];null!=r&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,"find",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var o=this[r];if(e.call(n,o,r,this))return o}}),Array.prototype.findIndex||r(Array.prototype,"findIndex",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var o=this[r];if(e.call(n,o,r,this))return r}}),Array.prototype.includes||r(Array.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Array.prototype.fill||r(Array.prototype,"fill",function(e){for(var t=this,n=t.length>>>0,r=0|arguments[1],o=r<0?Math.max(n+r,0):Math.min(r,n),i=arguments[2],s=void 0===i?n:0|i,a=s<0?Math.max(n+s,0):Math.min(s,n);o<a;)t[o]=e,o++;return t}),Array.of||r(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,n){"use strict";e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(o,"")},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,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},o=function(e){null==n&&(n=setTimeout(r,e||t))};return o.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){n&&clearTimeout(n),n=null},o.isPending=function(){return n},o},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),i=r.userAgent||"",s=r.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(i.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!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 r,o=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],s=0;s<t.length;s++){var a=e(t[s],n,r);a&&i.push(a)}return i}var l=document.createElement(t[0]),c=t[1],u=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(u=2),s=u;s<t.length;s++)e(t[s],l,r);return 2==u&&Object.keys(c).forEach(function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?r&&(r[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)}),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var o=n.indexOf(t);if(-1==o)break;r=!1,n.splice(o,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var i=[];function s(){var e=i;i=null,e&&e.forEach(function(e){a(e[0],e[1])})}function a(e,n,o){if("undefined"!=typeof document){if(i)if(o)s();else if(!1===o)return i.push([e,n]);if(!r){var a=o;o&&o.getRootNode&&(a=o.getRootNode())&&a!=o||(a=document);var l=a.ownerDocument||a;if(n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),a==l&&(a=t.getDocumentHead(l)),a.insertBefore(c,a.firstChild)}}}if(t.useStrictCSP=function(e){r=e,0==e?s():i||(i=[])},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),o=r.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",r.appendChild(n);var i=e&&e.documentElement||document&&document.documentElement;if(!i)return 0;i.appendChild(r);var s=n.offsetWidth;o.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=r.clientWidth),i.removeChild(r),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!o.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,o.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),o.isEdge||void 0===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/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),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/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},o=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=i),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],o=n._disabled_[e];o||(n._disabled_[e]=o=[]),o.push(r);var i=o.indexOf(t);-1!=i&&o.splice(i,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var o=r.indexOf(t);-1!=o&&r.splice(o,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,t,n){var r,o,i=e("./oop"),s=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return u('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:u('misspelled option "'+e+'"')}};function u(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var d=function(){function e(){this.$defaultOptions={},r=l,o="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),i.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){r=e,t&&t.placeholders&&(o=t.placeholders)},e.prototype.nls=function(e,t,n){r[e]||(u("No message found for the key '"+e+"' in messages with id "+r.$id+", trying to find a translation for the default string '"+t+"'."),r[t]||u("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var i=r[e]||r[t]||t;return n&&("dollarSigns"===o&&(i=i.replace(/\$(\$|[\d]+)/g,function(e,t){return"$"==t?"$":n[t]})),"curlyBrackets"===o&&(i=i.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),i},e}();d.prototype.warn=u,d.prototype.reportError=a,i.implement(d.prototype,s),t.AppConfig=d}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,t,n){var r=e("./lib/lang"),o=e("./lib/net"),i=e("./lib/dom"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a,l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&i.useStrictCSP(t)},t.all=function(){return r.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",o=n[n.length-1];if("worker"==t&&"-"==r){var i=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(i,"")}(!o||o==t)&&n.length>1&&(o=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==r&&(t=r=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+r+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){a=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,r){var i;if(Array.isArray(n))var s=n[0],l=n[1];else"string"==typeof n&&(l=n);var u=function(n){if(n&&!t.$loading[l])return r&&r(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(r),!(t.$loading[l].length>1)){var i=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):a?a(t,n):console.error("loader is not configured")}(l,function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var r=t.$loading[l];t.$loading[l]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return i();o.loadScript(t.moduleUrl(l,s),i),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then(function(e){e.default?u(e.default):u(e)});else{try{i=this.$require(l)}catch(e){}u(i||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$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"),c=function(){})};t.version="1.37.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var o=e("./config");o.setLoader(function(t,n){e([t],function(e){n(null,e)})});var i=function(){return this||"undefined"!=typeof window&&window}();function s(t){if(i&&i.document){o.set("packaged",t||e.packaged||r.packaged||i.define&&n.amdD.packaged);var s={},l="",c=document.currentScript||document._currentScript,u=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d=u.getElementsByTagName("script"),h=0;h<d.length;h++){var p=d[h],f=p.src||p.getAttribute("src");if(f){for(var g=p.attributes,m=0,v=g.length;m<v;m++){var y=g[m];0===y.name.indexOf("data-ace-")&&(s[a(y.name.replace(/^data-ace-/,""))]=y.value)}var b=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(l=b[1])}}for(var w in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&o.set(w,s[w])}}function a(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}r.exports=function(t){o.init=s,o.$require=e,t.require=e,t.define=n.amdD},s(!0)}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.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},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.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)},e.prototype.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)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.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)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else this.end.row<t&&(r={row:t,column:0});if(this.start.row>n)var o={row:n+1,column:0};else this.start.row<t&&(o={row:t,column:0});return e.fromPoints(o||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(0==r)return this;if(-1==r)var o={row:t,column:n};else var i={row:t,column:n};return e.fromPoints(o||this.start,i||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";for(var r=e("./oop"),o={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","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},i={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)i["Digit"+s]=48+s,i["Numpad"+s]=96+s,o.PRINTABLE_KEYS[48+s]=""+s,o.FUNCTION_KEYS[96+s]="Numpad"+s;for(s=65;s<91;s++){var a=String.fromCharCode(s+32);i["Key"+a.toUpperCase()]=s,o.PRINTABLE_KEYS[s]=a}for(s=1;s<13;s++)i["F"+s]=111+s,o.FUNCTION_KEYS[111+s]="F"+s;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)i[c]=i[c+"Left"]=i[c+"Right"]=l[c];for(var u in t.$codeToKeyCode=i,o.PRINTABLE_KEYS[173]="-",o.FUNCTION_KEYS){var d=o.FUNCTION_KEYS[u].toLowerCase();o[d]=parseInt(u,10)}for(var u in o.PRINTABLE_KEYS)d=o.PRINTABLE_KEYS[u].toLowerCase(),o[d]=parseInt(u,10);r.mixin(o,o.MODIFIER_KEYS),r.mixin(o,o.PRINTABLE_KEYS),r.mixin(o,o.FUNCTION_KEYS),o.enter=o.return,o.escape=o.esc,o.del=o.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)o.KEY_MODS[t]=e.filter(function(e){return t&o.KEY_MODS[e]}).join("-")+"-"}(),o.KEY_MODS[0]="",o.KEY_MODS[-1]="input-",r.mixin(t,o),t.default=t,t.keyCodeToString=function(e){var t=o[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 r,o=e("./keys"),i=e("./useragent"),s=null,a=0;function l(){return null==r&&function(){r=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return r={passive:!1},!0}})}catch(e){}}(),r}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new c(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function h(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function p(){s=Object.create(null)}if(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||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",o),d(r,"dragstart",o)}return u(r,"mousemove",t),u(r,"mouseup",o),u(r,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){u(e,"wheel",function(e){var n=e.deltaX||0,r=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*r;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*r;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*r}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,o,s){var a,l,c,d=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,i.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(d=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[d-1]||600),1==d&&(a=e.clientX,l=e.clientY)}if(e._clicks=d,r[o]("mousedown",e),d>4)d=0;else if(d>1)return r[o](h[d],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){u(e,"mousedown",p,s)})},t.getModifierString=function(e){return o.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,n,r){var l=null;u(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=function(e,t,n){var r=h(t);if(!n&&t.code&&(n=o.$codeToKeyCode[t.code]||n),!i.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),s.altGr){if(!(3&~r))return;s.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==s[n]&&(a=t.timeStamp):18===n&&3===r&&2===l&&t.timeStamp-a<50&&(s.altGr=!0)}}if(n in o.MODIFIER_KEYS&&(n=-1),r||13!==n||3!==t.location||(e(t,r,-n),!t.defaultPrevented)){if(i.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t},r),u(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)},r),u(e,"keyup",function(e){s[e.keyCode]=null},r),s||(p(),u(window,"focus",p))},"object"==typeof window&&window.postMessage&&!i.isOldIE){var f=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+f++,o=function(i){i.data==r&&(t.stopPropagation(i),d(n,"message",o),e())};u(n,"message",o),n.postMessage(r,"*")}}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/clipboard",["require","exports","module"],function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var r,o=e("../lib/event"),i=e("../config").nls,s=e("../lib/useragent"),a=e("../lib/dom"),l=e("../lib/lang"),c=e("../clipboard"),u=s.isChrome<18,d=s.isIE,h=s.isChrome>63,p=400,f=e("../lib/keys"),g=f.KEY_MODS,m=s.isIOS,v=m?/\s/:/\n/,y=s.isMobile;r=function(e,t){var n=a.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild);var r=!1,b=!1,w=!1,x=!1,S="";y||(n.style.fontSize="1px");var C=!1,_=!1,$="",k=0,A=0,M=0,E=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,T=0;try{var L=document.activeElement===n}catch(e){}this.setNumberOfExtraLines=function(e){E=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,T=e<0?0:e},this.setAriaLabel=function(){var e="";if(t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", ")),t.session){var r=t.session.selection.cursor.row;e+=i("text-input.aria-label","Cursor at row $0",[r+1])}n.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",i("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),o.addListener(n,"blur",function(e){_||(t.onBlur(e),L=!1)},t),o.addListener(n,"focus",function(e){if(!_){if(L=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(O):O()}},t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),S||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var r=0!=n.getBoundingClientRect().top}catch(e){return}var o=[];if(r)for(var i=n.parentElement;i&&1==i.nodeType;)o.push(i),i.setAttribute("ace_nocontext","true"),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;n.focus({preventScroll:!0}),r&&o.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 L},t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var o=r&&(e.docChanged||e.selectionChanged);w&&o&&($=n.value="",V()),O()}}),t.on("changeSelection",this.setAriaLabel);var N=function(e,n){for(var r=n,o=1;o<=e-E&&o<2*T+1;o++)r+=t.session.getLine(e-o).length+1;return r},O=m?function(e){if(L&&(!r||e)&&!x){e||(e="");var o="\n ab"+e+"cde fg\n";o!=n.value&&(n.value=$=o);var i=4+(e.length||(t.selection.isEmpty()?0:1));4==k&&A==i||n.setSelectionRange(4,i),k=4,A=i}}:function(){if(!w&&!x&&(L||D)){w=!0;var e=0,r=0,o="";if(t.session){var i=t.selection,s=i.getRange(),a=i.cursor.row;a===R+1?R=(E=R+1)+2*T:a===E-1?E=(R=E-1)-2*T:(a<E-1||a>R+1)&&(E=a>T?a-T:0,R=a>T?a+T:2*T);for(var l=[],c=E;c<=R;c++)l.push(t.session.getLine(c));if(o=l.join("\n"),e=N(s.start.row,s.start.column),r=N(s.end.row,s.end.column),s.start.row<E){var u=t.session.getLine(E-1);e=s.start.row<E-1?0:e,r+=u.length+1,o=u+"\n"+o}else if(s.end.row>R){var d=t.session.getLine(R+1);r=s.end.row>R+1?d.length:s.end.column,r+=o.length+1,o=o+"\n"+d}else y&&a>0&&(o="\n"+o,r+=1,e+=1);o.length>p&&(e<p&&r<p?o=o.slice(0,p):(o="\n",e==r?e=r=0:(e=0,r=1)));var h=o+"\n\n";h!=$&&(n.value=$=h,k=A=h.length)}if(D&&(k=n.selectionStart,A=n.selectionEnd),A!=r||k!=e||n.selectionEnd!=A)try{n.setSelectionRange(e,r),k=e,A=r}catch(e){}w=!1}};this.resetSelection=O,L&&t.onFocus();var I=null;this.setInputHandler=function(e){I=e},this.getInputHandler=function(){return I};var D=!1,P=function(e,r){if(D&&(D=!1),b)return O(),e&&t.onPaste(e),b=!1,"";for(var o=n.selectionStart,i=n.selectionEnd,a=k,l=$.length-A,c=e,u=e.length-o,d=e.length-i,h=0;a>0&&$[h]==e[h];)h++,a--;for(c=c.slice(h),h=1;l>0&&$.length-h>k-1&&$[$.length-h]==e[e.length-h];)h++,l--;u-=h-1,d-=h-1;var p=c.length-h+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!(r||c||u||a||l||d))return"";x=!0;var f=!1;return s.isAndroid&&". "==c&&(c=" ",f=!0),c&&!a&&!l&&!u&&!d||C?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:d}),x=!1,$=e,k=o,A=i,M=d,f?"\n":c},j=function(e){if(w)return G();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,o=P(r,!0);(r.length>500||v.test(o)||y&&k<1&&k==A)&&O()},z=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!u){var o=d||n?"Text":"text/plain";try{return t?!1!==r.setData(o,t):r.getData(o)}catch(e){if(!n)return z(e,t,!0)}}},F=function(e,i){var s=t.getCopyText();if(!s)return o.preventDefault(e);z(e,s)?(m&&(O(s),r=s,setTimeout(function(){r=!1},10)),i?t.onCut():t.onCopy(),o.preventDefault(e)):(r=!0,n.value=s,n.select(),setTimeout(function(){r=!1,O(),i?t.onCut():t.onCopy()}))},B=function(e){F(e,!0)},H=function(e){F(e,!1)},W=function(e){var r=z(e);c.pasteCancelled()||("string"==typeof r?(r&&t.onPaste(r,e),s.isIE&&setTimeout(O),o.preventDefault(e)):(n.value="",b=!0))};o.addCommandKeyListener(n,function(e,n,r){if(!w)return t.onCommandKey(e,n,r)},t),o.addListener(n,"select",function(e){w||(r?r=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=$.length&&e.value===$&&$&&e.selectionEnd!==A}(n)?(t.selectAll(),O()):y&&n.selectionStart!=k&&O())},t),o.addListener(n,"input",j,t),o.addListener(n,"cut",B,t),o.addListener(n,"copy",H,t),o.addListener(n,"paste",W,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||o.addListener(e,"keydown",function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:H(e);break;case 86:W(e);break;case 88:B(e)}},t);var G=function(){if(w&&t.onCompositionUpdate&&!t.$readOnly){if(C)return U();if(w.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;P(e),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+A-w.selectionStart+M)}}},V=function(e){t.onCompositionEnd&&!t.$readOnly&&(w=!1,t.onCompositionEnd(),t.off("mousedown",U),e&&j())};function U(){_=!0,n.blur(),n.focus(),_=!1}var q,K=l.delayedCall(G,50).schedule.bind(null,null);function Y(){clearTimeout(q),q=setTimeout(function(){S&&(n.style.cssText=S,S=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()},0)}o.addListener(n,"compositionstart",function(e){if(!w&&t.onCompositionStart&&!t.$readOnly&&(w={},!C)){e.data&&(w.useTextareaForIME=!1),setTimeout(G,0),t._signal("compositionStart"),t.on("mousedown",U);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,w.markerRange=r,w.selectionStart=k,t.onCompositionStart(w),w.useTextareaForIME?($=n.value="",k=0,A=0):(n.msGetInputContext&&(w.context=n.msGetInputContext()),n.getInputContext&&(w.context=n.getInputContext()))}},t),o.addListener(n,"compositionupdate",G,t),o.addListener(n,"keyup",function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(w||($=n.value),k=A=-1,O()),K()},t),o.addListener(n,"keydown",K,t),o.addListener(n,"compositionend",V,t),this.getElement=function(){return n},this.setCommandMode=function(e){C=e,n.readOnly=!1},this.setReadOnly=function(e){C||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){D=!0,O(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){S||(S=n.style.cssText),n.style.cssText=(r?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+A)*t.renderer.characterWidth*.5+"px;";var i=t.container.getBoundingClientRect(),l=a.computedStyle(t.container),c=i.top+(parseInt(l.borderTopWidth)||0),u=i.left+(parseInt(i.borderLeftWidth)||0),d=i.bottom-c-n.clientHeight-2,h=function(e){a.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,d))};h(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(q),s.isWin&&o.capture(t.container,h,Y))},this.onContextMenuClose=Y;var X=function(e){t.textInput.onContextMenu(e),Y()};o.addListener(n,"mouseup",X,t),o.addListener(n,"mousedown",function(e){e.preventDefault(),Y()},t),o.addListener(t.renderer.scroller,"contextmenu",X,t),o.addListener(n,"contextmenu",X,t),m&&function(e,t,n){var o=null,i=!1;n.addEventListener("keydown",function(e){o&&clearTimeout(o),i=!0},!0),n.addEventListener("keyup",function(e){o=setTimeout(function(){i=!1},100)},!0);var s=function(e){if(document.activeElement===n&&!(i||w||t.$mouseHandler.isMousePressed||r)){var o=n.selectionStart,s=n.selectionEnd,a=null,l=0;if(0==o?a=f.up:1==o?a=f.home:s>A&&"\n"==$[s]?a=f.end:o<k&&" "==$[o-1]?(a=f.left,l=g.option):o<k||o==k&&A!=k&&o==s?a=f.left:s>A&&$.slice(0,s).split("\n").length>2?a=f.down:s>A&&" "==$[s-1]?(a=f.right,l=g.option):(s>A||s==A&&A!=k&&o==s)&&(a=f.right),o!==s&&(l|=g.shift),a){if(!t.onCommandKey({},l,a)&&t.commands){a=f.keyCodeToString(a);var c=t.commands.findKeyCommand(l,a);c&&t.execCommand(c)}k=o,A=s,O("")}}};document.addEventListener("selectionchange",s),t.on("destroy",function(){document.removeEventListener("selectionchange",s)})}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=r,t.$setUserAgentForTests=function(e,t){y=e,m=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/useragent"),o=function(){function e(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")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,i=e.getButton();return 0!==i?((o.getSelectionRange().isEmpty()||1==i)&&o.selection.moveToPosition(n),void(2==i&&(o.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.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.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==s&&1==a)r=o.end,t=o.start;else{var l=i(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,r,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),i=Date.now();(o>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.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,r=e.domEvent.timeStamp,o=r-n.t,i=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;o<550&&(i=(i+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(i/s),l=!1;return 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=r:r-n.allowed<550&&(Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0),n.t=r,n.vx=i,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function i(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 n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,t.DefaultHandlers=o}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",u=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=s.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){s.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.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)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),d=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,r;this.popups.sort(function(e,t){return t.priority-e.priority});var o=[];try{for(var s=i(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var u=(n=void 0,i(o)),d=u.next();!d.done;d=u.next()){var h=d.value;if(this.doPopupsOverlap(h,l)){c=!1;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),r=t.getElement().getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top},e}());t.popupManager=d,t.Tooltip=u;var h=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var r=n.getElement();return r.style.whiteSpace="pre-wrap",r.style.pointerEvents="auto",r.addEventListener("mouseout",n.onMouseOut),r.tabIndex=-1,r.addEventListener("blur",function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener("wheel",l),n}return o(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var r=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(r.row,r.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),r=t.session.getLine(n.row);if(n.column==r.length){var o=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),i=t.session.documentToScreenPosition(n.row,n.column);if(i.column!=o.column||i.row!=o.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){if(!(r&&r!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var o=e.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end);var i=o.textToScreenCoordinates(t.start.row,t.start.column),s=o.scroller.getBoundingClientRect();i.pageX<s.left&&(i.pageX=s.left);var l=this.getElement();l.innerHTML="",l.appendChild(n),l.style.maxHeight="",l.style.display="block";var c=l.clientHeight,u=l.clientWidth,h=window.innerHeight-i.pageY-o.lineHeight,p=!0;i.pageY-c<0&&i.pageY<h&&(p=!1),l.style.maxHeight=(p?i.pageY:h)-10+"px",l.style.top=p?"":i.pageY+o.lineHeight+"px",l.style.bottom=p?window.innerHeight-i.pageY+"px":"",l.style.left=Math.min(i.pageX,window.innerWidth-u-10)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(u);t.HoverTooltip=h}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../lib/dom"),a=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;e("../lib/lang"),t.GutterHandler=function(e){var t,n,r=e.editor,o=r.renderer.$gutterLayer,i=new u(r);function l(){t&&(t=clearTimeout(t)),i.isOpen&&(i.hideTooltip(),r.off("mousewheel",l))}function c(e){i.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()&&"foldWidgets"!=o.getRegion(t)){var n=t.getDocumentPosition().row,i=r.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(a){var u=a.domEvent.target||a.domEvent.srcElement;if(s.hasCssClass(u,"ace_fold-widget"))return l();i.isOpen&&e.$tooltipFollowsMouse&&c(a),n=a,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row;if(t==r.session.getLength()){var s=r.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(s>r.session.documentToScreenRow(a.row,a.column))return l()}if(i.showTooltip(t),i.isOpen)if(r.on("mousewheel",l),e.$tooltipFollowsMouse)c(n);else{var u=n.getGutterRow(),d=o.$lines.get(u);if(d){var h=d.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),p=i.getElement().style;p.left=h.right+"px",p.top=h.bottom+"px"}else c(n)}}():l()},50))}),a.addListener(r.renderer.$gutter,"mouseout",function(e){n=null,i.isOpen&&!t&&(t=setTimeout(function(){t=null,l()},50))},r),r.on("changeSession",l),r.on("input",l)};var u=function(e){function t(t){var n=e.call(this,t.container)||this;return n.editor=t,n.visibleTooltipRow,n}return o(t,e),t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),i=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+i>r&&(t-=20+i),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r,o=this.editor.renderer.$gutterLayer,i=o.$annotations[e];r=i?{displayText:Array.from(i.displayText),type:Array.from(i.type)}:{displayText:[],type:[]};var a=o.session.getFoldLine(e);if(a&&o.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},d=e+1;d<=a.end.row;d++)if(o.$annotations[d])for(var h=0;h<o.$annotations[d].text.length;h++){var p=o.$annotations[d].type[h];c[p].push(o.$annotations[d].text[h]),(!l||u[p]<u[l])&&(l=p)}if(["error","security","warning"].includes(l)){var f="".concat(t.annotationsToSummaryString(c)," in folded code.");r.displayText.push(f),r.type.push(l+"_fold")}}if(0===r.displayText.length)return this.hideTooltip();var g={error:[],security:[],warning:[],info:[],hint:[]},m=o.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(d=0;d<r.displayText.length;d++){var v=s.createElement("span"),y=s.createElement("span");(n=y.classList).add.apply(n,["ace_".concat(r.type[d]),m]),y.setAttribute("aria-label","".concat(t.annotationLabels[r.type[d].replace("_fold","")].singular)),y.setAttribute("role","img"),y.appendChild(s.createTextNode(" ")),v.appendChild(y),v.appendChild(s.createTextNode(r.displayText[d])),v.appendChild(s.createElement("br")),g[r.type[d].replace("_fold","")].push(v)}var b=this.getElement();s.removeChildren(b),g.error.forEach(function(e){return b.appendChild(e)}),g.security.forEach(function(e){return b.appendChild(e)}),g.warning.forEach(function(e){return b.appendChild(e)}),g.info.forEach(function(e){return b.appendChild(e)}),g.hint.forEach(function(e){return b.appendChild(e)}),b.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},t.annotationsToSummaryString=function(e){var n,r,o=[];try{for(var s=i(["error","security","warning","info","hint"]),a=s.next();!a.done;a=s.next()){var l=a.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;o.push("".concat(e[l].length," ").concat(c))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.join(", ")},t}(l);t.GutterTooltip=u}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,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}return e.prototype.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.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},e.prototype.getButton=function(){return r.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=i}),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 r=e("../lib/dom"),o=e("../lib/event"),i=e("../lib/useragent");function s(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,d,h,p,f,g,m,v,y=t.container,b=0;function w(){var e=h;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,i=!n||e.column!=n.column;!m||o||i?(t.moveCursorToPosition(e),m=r,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:r-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),o=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),d=Math.min(a.y.top,a.y.bottom),h={row:e.row,column:e.column};u/i<=2&&(h.column+=a.x.left<a.x.right?-3:2),d/o<=1&&(h.row+=a.y.top<a.y.bottom?-1:1);var p=e.row!=h.row,f=e.column!=h.column,m=!n||e.row!=n.row;p||f&&!m?g?r-g>=200&&t.renderer.scrollCursorIntoView(h):g=r:g=null}(h,e)}function x(){d=t.selection.toOrientedRange(),s=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),b=0,o.addListener(document,"mousemove",_)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(d),t.isFocused()&&!f&&t.$resetCursorStyle(),d=null,h=null,b=0,g=null,m=null,o.removeListener(document,"mousemove",_)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),o.clearData(),o.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"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()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),b++,e.dataTransfer.dropEffect=p=k(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&$(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),b++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=k(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&s)return S(),p=null,o.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(f)switch(p){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var r=n.getData("Text");d={start:h,end:t.session.insert(h,r)},t.focus(),p=null}return S(),o.preventDefault(e)}},o.addListener(y,"dragstart",this.onDragStart.bind(e),t),o.addListener(y,"dragend",this.onDragEnd.bind(e),t),o.addListener(y,"dragenter",this.onDragEnter.bind(e),t),o.addListener(y,"dragover",this.onDragOver.bind(e),t),o.addListener(y,"dragleave",this.onDragLeave.bind(e),t),o.addListener(y,"drop",this.onDrop.bind(e),t);var C=null;function _(){null==C&&(C=setTimeout(function(){null!=C&&s&&S()},20))}function $(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function k(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-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=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.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(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on"),t.getDragDelay()?(i.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s}),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 r=e("./mouse_event").MouseEvent,o=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,d,h,p,f="scroll",g=0,m=0,v=0,y=0;function b(){if(t.getOption("enableMobileMenu")){p||(a=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},u=function(e){var n,r,o=e.target.getAttribute("action");if("more"==o||!l)return l=!l,n=t.getCopyText(),r=t.session.getUndoManager().hasUndo(),void p.replaceChild(i.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],a&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild);"paste"==o?a.readText().then(function(e){t.execCommand(o,e)}):o&&("cut"!=o&&"copy"!=o||(a?a.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),p.firstChild.style.display="none",l=!1,"openCommandPalette"!=o&&t.focus()},p=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){f="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),u(e)},onclick:u},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();p.style.top=n.pageY-s.top-3+"px",n.pageX-s.left<s.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=r+o-s.left+"px"),p.style.display="",p.firstChild.style.display="none",t.on("input",w)}else p&&w();var a,l,c,u}function w(e){p&&(p.style.display="none"),t.off("input",w)}function x(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(d.row,d.column);!e.isEmpty()&&n||(t.selection.moveToPosition(d),t.selection.selectWord()),f="wait",b()}o.addListener(e,"contextmenu",function(e){h&&t.textInput.getElement().focus()},t),o.addListener(e,"touchstart",function(e){var o=e.touches;if(c||o.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");h=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var b=o[0],w=b.clientX,S=b.clientY;Math.abs(n-w)+Math.abs(s-S)>i&&(a=-1),n=e.clientX=w,s=e.clientY=S,v=y=0;var C=new r(e,t);if(d=C.getDocumentPosition(),p-a<500&&1==o.length&&!g)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(d);var e=m>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{m=0;var _=t.selection.cursor,$=t.selection.isEmpty()?_:t.selection.anchor,k=t.renderer.$cursorLayer.getPixelPosition(_,!0),A=t.renderer.$cursorLayer.getPixelPosition($,!0),M=t.renderer.scroller.getBoundingClientRect(),E=t.renderer.layerConfig.offset,R=t.renderer.scrollLeft,T=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientX<M.left)return void(f="zoom");var L=T(e.clientX-M.left-k.left+R,e.clientY-M.top-k.top+E),N=T(e.clientX-M.left-A.left+R,e.clientY-M.top-A.top+E);L<3.5&&N<3.5&&(f=L>N?"cursor":"anchor"),f=N<3.5?"anchor":L<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p},t),o.addListener(e,"touchend",function(e){h=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",g=0):c?(t.selection.moveToPosition(d),g=0,b()):"scroll"==f?(g+=60,u=setInterval(function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(g=0)},10),w()):b(),clearTimeout(c),c=null},t),o.addListener(e,"touchmove",function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==f)){var i=o[0],a=n-i.clientX,u=s-i.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=i.clientX,s=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var d=e.timeStamp,h=d-l;if(l=d,"scroll"==f){var p=new r(e,t);p.speed=1,p.wheelX=a,p.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=h&&(v=a/h,y=u/h),t._emit("mousewheel",p),p.propagationStopped||(v=y=0)}else{var g=new r(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(g):"anchor"==f&&t.selection.setSelectionAnchor(g.row,g.column),t.renderer.scrollCursorIntoView(g),e.preventDefault()}}},t)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),d=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new i(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})},a=e.renderer.getMouseEventTarget();r.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;r.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(a,"mousedown",n,e),r.addListener(u,"mousedown",n,e),o.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),o=e.session.selection.getRange(),i=e.renderer;!o.isEmpty()&&o.insideStart(r.row,r.column)?i.setCursorStyle("default"):i.setCursorStyle("")}},e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,i=this.editor.renderer;i.$isMousePressed=!0;var s=this,l=function(e){if(e){if(o.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",d),clearInterval(h),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=i.$isMousePressed=!1,i.$keepTextAreaAtCursor&&i.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){c(e)});var d=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",d),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=r.capture(this.editor.container,l,c);var h=setInterval(u,20)},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();d.prototype.releaseMouse=null,u.defineOptions(d.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=d}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom");t.FoldHandler=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),o=e.session,i=o.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?o.removeFold(i):o.expandFold(i),t.stop());var s=t.domEvent&&t.domEvent.target;s&&r.hasCssClass(s,"ace_inline_button")&&r.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,o=r.getParentFoldRangeData(n,!0),i=o.range||o.firstRange;if(i){n=i.start.row;var s=r.getFoldAt(n,r.getLine(n).length,1);s?r.removeFold(s):(r.addFold("...",i),e.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../lib/event"),i=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,r){for(var i,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((i=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&i.command&&((s="null"==i.command||a.exec(i.command,this.$editor,i.args,r))&&r&&-1!=e&&1!=i.passEvent&&1!=i.command.passEvent&&o.stopEvent(r),s)););return s||-1!=e||(i={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),s},e.prototype.onCommandKey=function(e,t,n){var o=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,o,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=i}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";var r=0,o=0,i=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=11,d=18,h=[d,d,d,d,d,d,d,d,d,6,5,6,8,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,5,5,5,6,8,4,4,u,u,u,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,d,d,d,d,d,d,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,9,4,u,u,u,u,4,4,4,4,0,4,4,d,4,4,u,u,2,2,4,0,4,4,4,2,0,4,4,4,4,4],p=[8,8,8,8,8,8,8,8,8,8,8,d,d,d,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,u,u,u,u,u,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function f(e,t,n){if(!(o<e))if(1!=e||1!=r||s)for(var i,a,l,c,u=n.length,d=0;d<u;){if(t[d]>=e){for(i=d+1;i<u&&t[i]>=e;)i++;for(a=d,l=i-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=i}d++}else n.reverse()}function g(e,t,n,o){var l,c,h,p,f=t[o];switch(f){case 0:case 1:i=!1;case 4:case 3:return f;case 2:return i?3:2;case 7:return i=!0,1;case 8:return 4;case 9:return o<1||o+1>=t.length||2!=(l=n[o-1])&&3!=l||2!=(c=t[o+1])&&3!=c?4:(i&&(c=3),c==l?c:4);case 10:return 2==(l=o>0?n[o-1]:5)&&o+1<t.length&&2==t[o+1]?2:4;case u:if(o>0&&2==n[o-1])return 2;if(i)return 4;for(p=o+1,h=t.length;p<h&&t[p]==u;)p++;return p<h&&2==t[p]?2:4;case 12:for(h=t.length,p=o+1;p<h&&12==t[p];)p++;if(p<h){var g=e[o],m=g>=1425&&g<=2303||64286==g;if(l=t[p],m&&(1==l||7==l))return 1}return o<1||5==(l=t[o-1])?4:n[o-1];case 5:return i=!1,s=!0,r;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case d:return 4}}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:h[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?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?p[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="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),p=new Array(h.length),v=new Array(h.length),y=[];r=u?1:0,function(e,t,n,u){var d=r?c:l,h=null,p=null,f=null,v=0,y=null,b=-1,w=null,x=null,S=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=m(e[w]);for(o=r,i=!1,s=!1,a=!1,x=0;x<n;x++){if(h=v,S[x]=p=g(e,u,S,x),y=240&(v=d[h][p]),v&=15,t[x]=f=d[v][5],y>0)if(16==y){for(w=b;w<x;w++)t[w]=1;b=-1}else b=-1;if(d[v][6])-1==b&&(b=x);else if(b>-1){for(w=b;w<x;w++)t[w]=f;b=-1}5==u[x]&&(t[x]=0),o|=f}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=r;for(var C=w-1;C>=0&&8==u[C];C--)t[C]=r}}(h,y,h.length,n);for(var b=0;b<p.length;p[b]=b,b++);for(f(2,y,p),f(1,y,p),b=0;b<p.length-1;b++)3===n[b]?y[b]=t.AN:1===y[b]&&(n[b]>7&&n[b]<13||4===n[b]||n[b]===d)?y[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(y[b-1]=y[b]=t.R_H,b++);for(h[h.length-1]===t.DOT&&(y[h.length-1]=t.B),""===h[0]&&(y[0]=t.RLE),b=0;b<p.length;b++)v[b]=y[p[b]];return{logicalFromVisual:p,bidiLevels:v}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=m(e.charAt(r)),n||1!=t[r]&&7!=t[r]&&3!=t[r]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";var r=e("./lib/bidiutil"),o=e("./lib/lang"),i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=i.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&i.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},e.prototype.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 i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<i.length?this.line.substring(i[t-1],i[t]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[t]),t==i.length&&(this.line+=this.showInvisibles?n:r.DOT))}else this.line+=this.showInvisibles?n:r.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,o.stringRepeat(r.DOT,s)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,o=r.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&i[o]%2!=0&&o++;for(var a=0;a<o;a++)s+=this.charWidths[i[a]];return!this.session.getOverwrite()&&e>t&&i[o]%2==0&&(s+=this.charWidths[i[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},e.prototype.getSelections=function(e,t){var n,r=this.bidiMap,o=r.bidiLevels,i=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,d=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p<o.length;p++)h=r.logicalFromVisual[p],n=o[p],(c=h>=a&&h<l)&&!u?d=s:!c&&u&&i.push({left:d,width:s-d}),s+=this.charWidths[n],u=c;if(c&&p===o.length&&i.push({left:d,width:s-d}),this.isRtlDir)for(var f=0;f<i.length;f++)i[f].left+=this.rtlLineOffset;return i},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,o=this.bidiMap.bidiLevels,i=this.charWidths[o[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+i/2;){if(n+=i,r===o.length-1){i=0;break}i=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&o[r-1]%2==0&&o[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===i&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==i&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=s}),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 r=e("./lib/oop"),o=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(){function e(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")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(!this.$silent){var o=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||i)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(r);return o?(r=o.start.row,n=o.end.row):n=r,!0===t?new s(r,0,n,this.session.getLine(n).length):new s(r,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,o=e.column+t;return n<0&&(r=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==t},e.prototype.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)}},e.prototype.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.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),o=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=o[0].length),this.moveCursorToPosition(r)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var i=o.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(n-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<i&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var s=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+s)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var i=o.stringReverse(r),s=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-s)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.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)},e.prototype.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.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},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.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},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.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)},e.prototype.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},e}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,r.implement(a.prototype,i),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var r=e("./lib/report_error").reportError,o=2e3,i=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],o=0,i=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(i.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,d=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==d?c.token=c.token[0]:d-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:d-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=d>1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)}):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),i[o]=l,o+=d,r.push(u),c.onMatch||(c.onMatch=null)}}r.length||(i[0]=0,r.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",s)}}return e.prototype.$setMaxTokenCount=function(e){o=0|e},e.prototype.$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 r=[],o=0,i=n.length;o<i;o++)t[o]&&(r[r.length]={type:n[o],value:t[o]});return r},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,o=0,i=r.length;o<i;o++)t[o+1]&&(n[n.length]={type:r[o],value:t[o+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e})},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,r=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,i,s,a,l){return r?r="]"!=a:a?r=!0:s?(n==o.stack&&(o.end=l+1,o.stack=-1),n--):i&&(n++,1!=i.length&&(o.stack=n,o.start=l)),e}),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var r=t||"start",i=this.states[r];i||(r="start",i=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];a.lastIndex=0;for(var l,c=[],u=0,d=0,h={type:null,value:""};l=a.exec(e);){var p=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);h.type==p?h.value+=v:(h.type&&c.push(h),h={type:p,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){p=(f=i[s[y]]).onMatch?f.onMatch(g,r,n,e):f.token,f.next&&(r="string"==typeof f.next?f.next:f.next(r,n),(i=this.states[r])||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),s=this.matchMappings[r],u=m,(a=this.regExps[r]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof p)f&&!1===f.merge||h.type!==p?(h.type&&c.push(h),h={type:p,value:g}):h.value+=g;else if(p)for(h.type&&c.push(h),h={type:null,value:""},y=0;y<p.length;y++)c.push(p[y]);if(u==e.length)break;if(u=m,d++>o){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)h.type&&c.push(h),h={value:e.substring(u,u+=500),type:"overflow"};r="start",n=[];break}}return h.type&&c.push(h),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},e}();i.prototype.reportError=r,t.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var r,o=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],o=0;o<r.length;o++){var i=r[o];(i.next||i.onMatch)&&("string"==typeof i.next&&0!==i.next.indexOf(t)&&(i.next=t+i.next),i.nextState&&0!==i.nextState.indexOf(t)&&(i.nextState=t+i.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,i){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else for(var l in r=[],s)r.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[i?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],o(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,r=this.$rules;Object.keys(r).forEach(function o(i){var s=r[i];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var d=l.stateName;d||("string"!=typeof(d=l.token)&&(d=d[0]||""),r[d]&&(d+=n++)),r[d]=u,l.next=d,o(d)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var h in l.rules)r[h]?r[h].push&&r[h].push.apply(r[h],l.rules[h]):r[h]=l.rules[h];var p="string"==typeof l?l:l.include;if(p&&("$self"===p&&(p="start"),c=Array.isArray(p)?p.map(function(e){return r[e]}):r[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter(function(e){return!e.next})),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,r){var o=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var i=e[t].split(r||"|"),s=i.length;s--;){var a=i[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),o[a]=t}},this),e=null,n?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((r=function(){this.$behaviours={}}).prototype),t.Behaviour=r}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,o=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=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]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.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},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=o}),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 r,o,i=e("../../lib/oop"),s=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d={},h={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,d.rangeCount!=e.multiSelect.rangeCount&&(d={rangeCount:e.multiSelect.rangeCount})),d[t])return r=d[t];r=d[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,r){var o=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}};(o=function(e){e=e||{},this.add("braces","insertion",function(t,n,i,s,a){var c=i.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==a){p(i);var d=i.getSelectionRange(),h=s.doc.getTextRange(d),g=s.getTokenAt(c.row,c.column);if(""!==h&&"{"!==h&&i.getWrapBehavioursEnabled())return f(d,h,"{","}");if(g&&/(?:string)\.quasi|\.xml/.test(g.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some(function(e){return e.test(g.type)})||/(string)\.quasi/.test(g.type)&&"$"!==g.value[c.column-g.start-1])return;return o.recordAutoInsert(i,s,"}"),{text:"{}",selection:[1,1]}}if(o.isSaneInsertion(i,s))return/[\]\}\)]/.test(u[c.column])||i.inMultiSelectMode||e.braces?(o.recordAutoInsert(i,s,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(i,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(p(i),"}"==u.substring(c.column,c.column+1)&&null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&o.isAutoInsertedClosing(c,u,a))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){p(i);var m="";if(o.isMaybeInsertedClosing(c,u)&&(m=l.stringRepeat("}",r.maybeInsertedBrackets),o.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var v=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!v)return null;var y=this.$getIndent(s.getLine(v.row))}else{if(!m)return void o.clearMaybeInsertedClosing();y=this.$getIndent(u)}var b=y+s.getTabString();return{text:"\n"+b+"\n"+y+m,selection:[1,b.length,1,b.length]}}o.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){if(p(n),"}"==o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){p(n);var s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"(",")");if(o.isSaneInsertion(n,r))return o.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){p(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==r.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,i))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i&&(p(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){p(n);var s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"[","]");if(o.isSaneInsertion(n,r))return o.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){p(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==r.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,i))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i&&(p(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("string_dquotes","insertion",function(e,t,n,r,o){var i=r.$mode.$quotes||h;if(1==o.length&&i[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;p(n);var s=o,a=n.getSelectionRange(),l=r.doc.getTextRange(a);if(!(""===l||1==l.length&&i[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=r.doc.getLine(c.row),d=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==d&&m&&/escape/.test(m.type))return null;var y,b=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(y=b!==w)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=r.$mode.tokenRe;x.lastIndex=0;var S=x.test(d);x.lastIndex=0;var C=x.test(g),_=r.$mode.$pairQuotesAfter;if(!(_&&_[s]&&_[s].test(d))&&S||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var $=u[c.column-2];if(d==s&&($==s||x.test($)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.$mode.$quotes||h,s=r.doc.getTextRange(o);if(!o.isMultiLine()&&i.hasOwnProperty(s)&&(p(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o}),!1!==e.closeDocComment&&this.add("doc comment end","insertion",function(e,t,n,r,o){if("doc-start"===e&&("\n"===o||"\r\n"===o)&&n.selection.isEmpty()){var i=n.getCursorPosition();if(0===i.column)return;for(var s=r.doc.getLine(i.row),a=r.doc.getLine(i.row+1),l=r.getTokens(i.row),c=0,u=0;u<l.length;u++){c+=l[u].value.length;var d=l[u];if(c>=i.column){if(c===i.column){if(!/\.doc/.test(d.type))return;if(/\*\//.test(d.value)){var h=l[u+1];if(!h||!/\.doc/.test(h.type))return}}var p=i.column-(c-d.value.length),f=d.value.indexOf("*/"),g=d.value.indexOf("/**",f>-1?f+2:0);if(-1!==g&&p>g&&p<g+3)return;if(-1!==f&&-1!==g&&p>=f&&p<=g||!/\.doc/.test(d.type))return;break}}var m=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:o+m+"* ",selection:[1,2+m.length,1,2+m.length]}:{text:o+m+" * ",selection:[1,3+m.length,1,3+m.length]};if(/\/\*\*/.test(s.substring(0,i.column)))return{text:o+m+" * "+o+" "+m+"*/",selection:[1,4+m.length,1,4+m.length]}}})}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},o.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},o.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},o.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},o.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},o.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},o.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},o.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(o,s),t.CstyleBehaviour=o}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";for(var r=[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],o=0,i=[],s=0;s<r.length;s+=2)i.push(o+=r[s]),r[s+1]&&i.push(45,o+=r[s+1]);t.wordChars=String.fromCharCode.apply(null,i)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r,o=e("../config"),i=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,d=e("../range").Range;(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var o=t.doc,i=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(g=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0]):(g=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart),g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs(),y=function(e,t){var n=e.match(g);if(n){var r=n[1].length,i=n[0].length;h(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}};var d=p+" ",h=(v=function(e,t){i&&!/\S/.test(e)||(h(e,a,a)?o.insertInLine({row:t,column:a},d):o.insertInLine({row:t,column:a},p))},b=function(e,t){return g.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){b(e,t)||i&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},f),o.insertInLine({row:t,column:a},p))},y=function(e,t){var n;(n=e.match(m))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&o.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(g.test(e))return!0;for(var r=t.getTokens(n),o=0;o<r.length;o++)if("comment"===r[o].type)return!0}}function w(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)}var x=1/0;w(function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!b(e,t)&&(s=!1)):x>e.length&&(x=e.length)}),a==1/0&&(a=x,i=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?y:v)},this.toggleBlockComment=function(e,t,n,r){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var i,s,a=(g=new u(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,h;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;c=new d(p,f,p,f+o.start.length);break}a=g.stepBackward()}var g;for(a=(g=new u(t,r.row,r.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){p=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m,h=new d(p,f,p,f+o.end.length);break}a=g.stepForward()}h&&t.remove(h),c&&(t.remove(c),i=c.start.row,s=-o.start.length)}else s=o.start.length,i=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==i&&(l.start.column+=s),l.end.row==i&&(l.end.column+=s),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,i=o.$modes[r];i||(o.$modes[r]=i=new n),o.$modes[t]||(o.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(e){var t,n,r;r=(t=l)[n=s[e]],t[s[e]]=function(){return this.$delegator(n,arguments,r)}},l=this;for(t=0;t<s.length;t++)a(t)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var o=r[2][r[2].length-1];if(s=this.$modes[o])return s[e].apply(s,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var i=0;i<this.$embeds.length;i++)if(this.$modes[this.$embeds[i]]){var s,a=r.split(this.$embeds[i]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[i]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,o){if(this.$behaviour){var i=this.$behaviour.getBehaviours();for(var s in i)if(i[s][t]){var a=i[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var o=t[r],i=0,s=o.length;i<s;i++)if("string"==typeof o[i].token)/keyword|support|storage/.test(o[i].token)&&n.push(o[i].regex);else if("object"==typeof o[i].token)for(var a=0,l=o[i].token.length;a<l;a++)/keyword|support|storage/.test(o[i].token[a])&&(r=o[i].regex.match(/\(.+?\)/g)[a],n.push(r.substr(1,r.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call((r=function(){this.HighlightRules=s}).prototype),t.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./lib/dom"),o=function(){function e(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)}return e.prototype.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},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.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)))},e.prototype.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))})}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,o=r.start.row,i=r.end.row,s="add"==e.action,a=o+1;a<i;a++)n[a]&&(n[a].hidden=s);n[i]&&(s?n[o]?n[i].hidden=s:n[o]=n[i]:(n[o]==n[i]&&(n[o]=void 0),n[i].hidden=s))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var o=t.splice(n+1,r);!t[n]&&o[o.length-1]&&(t[n]=o.pop()),o.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},e.prototype.$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)}},e.prototype.$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},e.prototype.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=r.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement("div"),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&r.addCssClass(e.el,e.className),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 o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.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(e){}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()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var o=1/0,i=0;i<n.length;i++){var s=n[i];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/r.characterWidth));var a=s.h/r.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<o&&(o=s.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var o=Math.min(this.firstRow,n.firstRow),i=Math.max(this.lastRow,n.lastRow,r.length);o>0&&!r[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=i;s++){var a=r[s];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:s,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=""}}}},e}();t.LineWidgets=o}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,o=t.start.column,i=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=i.substring(0,o)+t.lines[0]+i.substring(o);else{var s=[r,1].concat(t.lines);e.splice.apply(e,s),e[r]=i.substring(0,o)+e[r],e[r+t.lines.length-1]+=i.substring(o)}break;case"remove":var a=t.end.column,l=t.end.row;r===l?e[r]=i.substring(0,o)+i.substring(a):e.splice(r,l-r+1,i.substring(0,o)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,i=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var r="insert"==e.action,o=(r?1:-1)*(e.end.row-e.start.row),i=(r?1:-1)*(e.end.column-e.start.column),a=e.start,l=r?a:e.end;return s(t,a,n)?{row:t.row,column:t.column}:s(l,t,!n)?{row:t.row+o,column:t.column+(t.row==l.row?i:0)}:{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$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},e}();function s(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}i.prototype.$insertRight=!1,r.implement(i.prototype,o),t.Anchor=i}),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 r=e("./lib/oop"),o=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(){function e(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)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new a(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.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},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.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 r=this.getLine(e);return null==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$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},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),o=this.clippedPos(e,n);return this.applyDelta({start:r,end:o,action:"remove",lines:this.getLinesForRange({start:r,end:o})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,o=n?e-1:e,i=n?this.getLine(o).length:0,a=r?t+1:t,l=r?0:this.getLine(a).length,c=new s(o,i,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof s||(e=s.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)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,o=e.start.row,i=e.start.column,s=0,a=0;s<r;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(o+s,i),end:this.pos(o+a,i=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=o+s,e.start.column=i,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,o=t||0,i=n.length;o<i;o++)if((e-=n[o].length+r)<0)return{row:o,column:e+n[o].length+r};return{row:i-1,column:e+n[i-1].length+r}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,o=0,i=Math.min(e.row,n.length),s=t||0;s<i;++s)o+=n[s].length+r;return o+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",r.implement(l.prototype,i),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,i=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,o=n.doc,i=t;n.lines[t];)t++;var s=o.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),r=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),i<=r&&n.fireUpdateEvent(i,r)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.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)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$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 r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(i.prototype,o),t.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./range").Range,i=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,i){if(this.regExp)for(var s=i.firstRow,a=i.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&((u=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new o(c,e.offset,c,e.offset+e.length)}),this.cache[c]=u.length?u:"");for(var d=u.length;d--;){var h=u[d].toScreenRange(n),p=h.toString();l[p]||(l[p]=!0,t.drawSingleLineMarker(e,h,this.clazz,i))}}},e}();i.prototype.MAX_RANGES=500,t.SearchHighlight=i}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var r=this.$undoStack.length;r>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var o=n[r][0];if(o.id<=e)break;o.id<t&&(o.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var o=n[r];if(o.rev<e)return t&&(o=n[r+1]),o}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,o=0,i=n.length;i--;){var s=n[i][0];if(s.id<t&&!r&&(r=i+1),s.id<=e){o=i+1;break}}return n.slice(o,r)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var o=u(e[n],e[n+1]);e[n]=o[0],e[n+1]=o[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),o=null;return r&&(o=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,o}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],o=0;o<r.length;o++)g(e,r[o])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var r=this.$redoStack.pop(),o=null;return r&&(o=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,o},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;var o=e("./range").Range,i=o.comparePoints;function s(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,r="insert"==t.action;if(n&&r)if(i(t.start,e.end)>=0)h(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!r)if(i(t.start,e.end)>=0)h(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&r)if(i(t.start,e.start)>=0)h(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!r)if(i(t.start,e.start)>=0)h(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!c(e[n],t[r])){for(;n<e.length;){for(;r--;)c(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function d(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)i(e.start,t.start)<0?h(t,e,1):h(e,t,1);else if(n&&!r)i(e.start,t.end)>=0?h(e,t,-1):(i(e.start,t.start)<=0||h(e,o.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&r)i(t.start,e.end)>=0?h(t,e,-1):(i(t.start,e.start)<=0||h(t,o.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!r)if(i(t.start,e.end)>=0)h(t,e,-1);else{var s,a;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(s=e,e=f(e,t.start)),i(e.end,t.end)>0&&(a=f(e,t.end)),p(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function f(e,t){var n=e.lines,r=e.end;e.end=s(t);var o=e.end.row-e.start.row,i=n.splice(o,n.length),a=o?t.column:t.column-e.start.column;return n.push(i[0].substring(0,a)),i[0]=i[0].substr(a),{start:s(t),end:r,lines:i,action:e.action}}function g(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],o=0;o<r.length;o++){var i=d(r[o],t);t=i[0],2!=i.length&&(i[2]?(r.splice(o+1,1,i[1],i[2]),o++):i[1]||(r.splice(o,1),o--))}r.length||e.splice(n,1)}return e}o.comparePoints,t.UndoManager=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(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)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.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},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r,o,i=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(r=s[l]).range.compareStart(t,n)))return void e(null,t,n,i,a);if(!e(null,r.start.row,r.start.column,i,a)&&e(r.placeholder,r.start.row,r.start.column,i)||0===o)return;a=!r.sameRow,i=r.end.column}e(null,t,n,i,a)},e.prototype.getNextFoldTo=function(e,t){for(var n,r,o=0;o<this.folds.length;o++){if(-1==(r=(n=this.folds[o]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var r,o,i=this.getNextFoldTo(e,t);if(i)if(r=i.fold,"inside"==i.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var s=(o=this.folds).indexOf(r);for(0===s&&(this.start.column+=n);s<o.length;s++){if((r=o[s]).start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var r=this.getNextFoldTo(t,n);if(!r||"inside"==r.kind)return null;var o=r.fold,i=this.folds,s=this.foldData,a=i.indexOf(o),l=i[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(s,i=i.splice(a,i.length-a));return s.splice(s.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=o}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,o=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var o=this.ranges,i=n||0;i<o.length;i++){var s=o[i],a=r(e,s.end);if(!(a>0)){var l=r(e,s.start);return 0===a?t&&0!==l?-i-2:i:l>0||0===l&&!t?i:-i-1}}return-i-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort(function(e,t){return r(e.start,t.start)}))[0],i=1;i<n.length;i++){e=o,o=n[i];var s=r(e.end,o.start);s<0||(0!=s||e.isEmpty()||o.isEmpty())&&(r(e.end,o.end)<0&&(e.end.row=o.end.row,e.end.column=o.end.column),n.splice(i,1),t.push(o),o=e,i--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var o=this.pointIndex({row:t,column:0},r);o<0&&(o=-o-1);for(var i=[],s=r;s<o;s++)i.push(n[s]);return i},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,o=n.row,i=this.ranges,s=0,a=i.length;s<a&&!((u=i[s]).end.row>=r);s++);if("insert"==e.action){for(var l=o-r,c=-t.column+n.column;s<a&&!((u=i[s]).start.row>r);s++)if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==i[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=r-o,c=t.column-n.column;s<a&&!((u=i[s]).start.row>o);s++)u.end.row<o&&(r<u.end.row||r==u.end.row&&t.column<u.end.column)?(u.end.row=r,u.end.column=t.column):u.end.row==o?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>o&&(u.end.row+=l),u.start.row<o&&(r<u.start.row||r==u.start.row&&t.column<u.start.column)?(u.start.row=r,u.start.column=t.column):u.start.row==o?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>o&&(u.start.row+=l);if(0!=l&&s<a)for(;s<a;s++){var u;(u=i[s]).start.row+=l,u.end.row+=l}},e}();o.prototype.comparePoints=r,t.RangeList=o}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return o(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var r=e.start.row,o=e.start.column,i=0,a=-1;i<this.subFolds.length&&1==(a=this.subFolds[i].range.compare(r,o));i++);var l=this.subFolds[i],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}r=e.range.end.row,o=e.range.end.column;var u=i;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(r,o));u++);0==a&&u++;for(var d=this.subFolds.splice(i,u-i,e),h=0==a?d.length-1:d.length,p=c;p<h;p++)e.addSubFold(d[p]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=i}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,t,n){"use strict";var r=e("../range").Range,o=e("./fold_line").FoldLine,i=e("./fold").Fold,s=e("../token_iterator").TokenIterator,a=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var o=r.folds,i=0;i<o.length;i++){var s=o[i].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return o[i]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,o=[];t.column+=1,n.column-=1;for(var i=0;i<r.length;i++){var s=r[i].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=r[i].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;o.push(c)}}}}return t.column-=1,n.column+=1,o},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var o,i,s={end:{column:0}},a=0;a<r.folds.length;a++){var l=(i=r.folds[a]).range.compareEnd(e,t);if(-1==l){o=this.getLine(i.start.row).substring(s.end.column,i.start.column);break}if(0===l)return null;s=i}return o||(o=this.getLine(i.start.row).substring(s.end.column)),-1==n?o.substring(0,t-s.end.column):1==n?o.substring(t-s.end.column):o},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var o=n[r];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var o=n[r];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,o=0;o<n.length;o++){var i=n[o],s=i.end.row,a=i.start.row;if(s>=t){a<t&&(a>=e?r-=t-a:r=0);break}s>=e&&(r-=a>=e?s-a:s-e+1)}return r},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,r=this.$foldData,s=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,d=this.getFoldAt(a,l,1),h=this.getFoldAt(c,u,-1);if(d&&h==d)return d.addSubFold(n);d&&!d.range.isStart(a,l)&&this.removeFold(d),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach(function(e){n.addSubFold(e)}));for(var f=0;f<r.length;f++){var g=r[f];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=r[f+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,o=this.$foldData,i=t.folds;if(1==i.length)o.splice(o.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))i.pop(),t.end.row=i[i.length-1].end.row,t.end.column=i[i.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))i.shift(),t.start.row=i[0].start.row,t.start.column=i[0].start.column;else if(e.sameRow)i.splice(i.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(i=s.folds).shift(),s.start.row=i[0].start.row,s.start.column=i[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&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,o;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach(function(e){o=o.concat(this.unfold(e))},this),o;n=e}for(var i=o=this.getFoldsInRangeList(n);1==o.length&&r.comparePoints(o[0].start,n.start)<0&&r.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),i.length)return i},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,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,s="";return e.walk(function(e,t,n,a){if(!(t<r)){if(t==r){if(n<o)return;a=Math.max(o,a)}s+=null!=e?e:i.getLine(t).substring(a,n)}},t,n),s},this.getDisplayLine=function(e,t,n,r){var o,i=this.getFoldLine(e);return i?this.getFoldDisplayLine(i,e,t,n,r):(o=this.doc.getLine(e)).substring(r||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new o(e,n)})},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var o=r.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var i=this.getFoldsInRange(r);if(e&&i.length)return void this.expandFolds(i);1==i.length&&(t=i[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var o=new s(this,e,t),i=o.getCurrentToken(),a=i&&i.type;if(i&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start|\\.doc");var l=new RegExp(a),c=new r;if(1!=n){do{i=o.stepBackward()}while(i&&l.test(i.type));i=o.stepForward()}c.start.row=o.getCurrentTokenRow(),c.start.column=o.getCurrentTokenColumn()+i.value.length,o=new s(this,e,t);var u=this.getState(o.$row);if(-1!=n){var d=-1;do{if(i=o.stepForward(),-1==d){var h=this.getState(o.$row);u.toString()!==h.toString()&&(d=o.$row)}else if(o.$row>d)break}while(i&&l.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn(),c}},this.foldAll=function(e,t,n,r){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var i=e=e||0;i<t;i++)if(null==o[i]&&(o[i]=this.getFoldWidget(i)),"start"==o[i]&&(!r||r(i))){var s=this.getFoldWidgetRange(i);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(i=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},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),r=0;r<n.length;r++){var o=n[r];if("text"!=o.type||!/^\s+$/.test(o.value))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,o=e-1;o>=0;){var i=n[o];if(null==i&&(i=n[o]=this.getFoldWidget(o)),"start"==i){var s=this.getFoldWidgetRange(o);if(r||(r=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:r}},this.onFoldWidgetClick=function(e,t){t instanceof a&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),o="end"===n?-1:1,i=this.getFoldAt(e,-1===o?0:r.length,o);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(i=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(i.range))return this.removeFold(i),i;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=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):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 r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},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 r=e("../token_iterator").TokenIterator,o=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 r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),s=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(s||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},s=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,i=!t&&n.charAt(e.column-1),s=i&&i.match(r);if(s||(i=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=i&&i.match(r)),!s)return null;var a=new o(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new o(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(0==(i-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(i+=1);l-=1}do{a=s.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 o=this.$brackets[e],i=1,s=new r(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var d=c.charAt(l);if(d==o){if(0==(i-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else d==e&&(i+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=r?e.stepBackward():e.stepForward())&&("/>"===t.value?r=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,i=t.value,s=0,a=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(i===(r=t.value))if("<"===n.value)s++;else if("</"===n.value&&--s<0){e.stepBackward();var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else i===r&&"/>"===t.value&&--s<0&&(p=h=d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new o(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&s>=0);if(a&&u&&d&&p&&l&&h)return{openTag:new o(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new o(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:l,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,i=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new o(s,a,s,l);e.stepForward();var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(r===t.value)if("<"===n.value){if(++i>0){var h=new o(s,a,s,l),p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var f=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&i--}else if("/>"===t.value){for(var g=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===r){i--;break}if("<"===m.value)break;m=e.stepBackward(),g++}for(var v=0;v<g;v++)e.stepForward()}}while(n&&i<=0);return p&&f&&c&&d&&h&&u?{openTag:new o(p.start.row,p.start.column,f.end.row,f.end.column),closeTag:new o(c.start.row,c.start.column,d.end.row,d.end.column),openTagName:h,closeTagName:u}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/lang"),i=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,d=e("./line_widgets").LineWidgets,h=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,g=e("./undomanager").UndoManager,m=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new p((new c).getTokenizer(),this);var r=this;this.bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new h(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new i(this),s.resetOptions(this),this.setMode(n),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=o.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new d(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,i=e[o];if(t>i)n=o+1;else{if(!(t<i))return o;r=o-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new g;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var r=new e(t.value);return t.folds.forEach(function(e){r.addFold("...",u.fromPoints(e.start,e.end))}),r.setAnnotations(t.annotations),r.setBreakpoints(t.breakpoints),r.setMode(t.mode),r.setScrollLeft(t.scrollLeft),r.setScrollTop(t.scrollTop),r.setUndoManager(n),r.selection.fromJSON(t.selection),r},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),o=0;if(null==t){var i=r.length-1;o=this.getLine(e).length}else for(i=0;i<r.length&&!((o+=r[i].value.length)>=t);i++);return(n=r[i])?(n.index=i,n.start=o-n.value.length,n):null},e.prototype.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=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,r){var o=this.$markerId++,i={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:o};return r?(this.$frontMarkers[o]=i,this._signal("changeFrontMarker")):(this.$backMarkers[o]=i,this._signal("changeBackMarker")),o},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var o=new u(e,0,t,1/0);return o.id=this.addMarker(o,n,"fullLine",r),o},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var o=this.tokenRe;else o=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(o));i++}for(var s=t;s<n.length&&n.charAt(s).match(o);)s++;return new u(e,i,e,s)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]),void(t&&t());this.$modeId=r,s.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(void 0!==r.on){var o=this.onReloadTokenizer.bind(this);r.on("update",o)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$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,r=0,o=0,i=this.$foldData[o],s=i?i.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=i.end.row+1)>=a)break;s=(i=this.$foldData[o++])?i.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var r,o,i=0;i<e.length;i++){var s=e[i];s.start&&(r?n(s)?(o=s.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=s.end,1==r.compare(o.row,o.column)&&r.setEnd(o)):(o=s.start,-1==r.compare(o.row,o.column)&&(r=u.fromPoints(s.start,s.start))):r=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return r},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var r=this.getTextRange(e),o=this.getFoldsInRange(e),i=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(i.start.row==e.end.row&&i.start.column>e.end.column&&(i.start.column+=c),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=c)),s&&i.start.row>=e.end.row&&(i.start.row+=s,i.end.row+=s)}if(i.end=this.insert(i.start,r),o.length){var a=e.start,l=i.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(o.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+=s,e.end.row+=s,e}))}return i},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var i=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s<r&&" "==i.charAt(s);++s);s<r&&"\t"==i.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((o=this.getRowFoldStart(e+n))<0)return 0;var r=o-e}else if(n>0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=o-t}else e=this.$clipRowToDocument(e),r=(t=this.$clipRowToDocument(t))-e+1;var i=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(i).map(function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,a),s.length&&this.addFolds(s),r},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$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}},e.prototype.$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},e.prototype.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")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.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"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,o=e.end,i=r.row,s=o.row,a=s-i,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(o.row)){g.addRemoveChars(o.row,o.column,r.column-o.column),g.shiftRow(-a);var d=this.getFoldLine(i);d&&d!==g&&(d.merge(g),g=d),u=c.indexOf(g)+1}for(;u<c.length;u++)(g=c[u]).start.row>=o.row&&g.shiftRow(-a);s=i}else{var h=Array(a);h.unshift(i,0);var p=t?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,h),c=this.$foldData,u=0,g=this.getFoldLine(i)){var f=g.range.compareInside(r.row,r.column);0==f?(g=g.split(r.row,r.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,o.column-r.column)):-1==f&&(g.addRemoveChars(i,0,o.column-r.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){var g;(g=c[u]).start.row>=i&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(i))&&g.addRemoveChars(i,r.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(i,s):this.$updateRowLengthCache(i,s),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,r,o=this.doc.getAllLines(),i=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;for(t=Math.min(t,o.length-1);l<=t;)(r=this.getFoldLine(l,r))?(n=[],r.walk(function(e,t,r,i){var s;if(null!=e){(s=this.$getDisplayTokens(e,n.length))[0]=b;for(var a=1;a<s.length;a++)s[a]=w}else s=this.$getDisplayTokens(o[t].substring(i,r),n.length);n=n.concat(s)}.bind(this),r.end.row,o[r.end.row].length+1),s[r.start.row]=this.$computeWrapSplits(n,a,i),l=r.end.row+1):(n=this.$getDisplayTokens(o[l]),s[l]=this.$computeWrapSplits(n,a,i),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var r=[],o=e.length,i=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function u(t){for(var o=t-i,u=i;u<t;u++){var h=e[u];12!==h&&2!==h||(o-=1)}r.length||(d=function(){var t=0;if(0===c)return t;if(l)for(var r=0;r<e.length;r++){var o=e[r];if(o==S)t+=1;else{if(o!=C){if(o==_)continue;break}t+=n}}return a&&!1!==l&&(t+=n),Math.min(t,c)}(),r.indent=d),s+=o,r.push(s),i=t}for(var d=0;o-i>t-d;){var h=i+t-d;if(e[h-1]>=S&&e[h]>=S)u(h);else if(e[h]!=b&&e[h]!=w){for(var p=Math.max(h-(t-(t>>2)),i-1);h>p&&e[h]<b;)h--;if(a){for(;h>p&&e[h]<b;)h--;for(;h>p&&e[h]==x;)h--}else for(;h>p&&e[h]<S;)h--;h>p?u(++h):(e[h=i+t]==y&&h--,u(h-d))}else{for(;h!=i-1&&e[h]!=b;h--);if(h>i){u(h);continue}for(h=i+t;h<e.length&&e[h]==w;h++);if(h==e.length)break;u(h)}}return r},e.prototype.$getDisplayTokens=function(e,t){var n,r=[];t=t||0;for(var o=0;o<e.length;o++){var i=e.charCodeAt(o);if(9==i){n=this.getScreenTabSize(r.length+t),r.push(C);for(var s=1;s<n;s++)r.push(_)}else 32==i?r.push(S):i>39&&i<48||i>57&&i<64?r.push(x):i>=4352&&$(i)?r.push(v,y):r.push(v)}return r},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),n=n||0,o=0;o<e.length&&(9==(r=e.charCodeAt(o))?n+=this.getScreenTabSize(n):r>=4352&&$(r)?n+=2:n+=1,!(n>t));o++);return[n,o]},e.prototype.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},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,o,i=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),d=c.length;if(d&&u>=0){a=c[u],i=this.$docRowCache[u];var h=e>c[d-1]}else h=!d;for(var p=this.getLength()-1,f=this.getNextFoldLine(i),g=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(i))>e||i>=p);)a+=l,++i>g&&(i=f.end.row+1,g=(f=this.getNextFoldLine(i,f))?f.start.row:1/0),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(f&&f.start.row<=i)r=this.getFoldDisplayLine(f),i=f.start.row;else{if(a+l<=e||i>p)return{row:p,column:this.getLine(p).length};r=this.getLine(i),f=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(o=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],r=r.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),f?f.idxToPosition(s):{row:i,column:s}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,o=0,i=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],o=this.$screenRowCache[c];var d=e>l[u-1]}else d=!u;for(var h=this.getNextFoldLine(a),p=h?h.start.row:1/0;a<e;){if(a>=p){if((s=h.end.row+1)>e)break;p=(h=this.getNextFoldLine(s,h))?h.start.row:1/0}else s=a+1;o+=this.getRowLength(a),a=s,d&&(this.$docRowCache.push(a),this.$screenRowCache.push(o))}var f="";h&&a>=p?(f=this.getFoldDisplayLine(h,e,t),i=h.start.row):(f=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;f.length>=m[v];)o++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(o+=this.lineWidgets[a].rowsAbove),{row:o,column:g+this.$getStringScreenWidth(f)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);r<n;){var i=this.$wrapData[r];e+=i?i.length+1:1,++r>o&&(r=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];var o,i;for(n||(n=1/0),r=r||0,i=0;i<t.length&&!((r+="\t"===(o=t.charAt(i))?this.getScreenTabSize(r):e.getCharacterWidth(o))>n);i++);return[r,i]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();m.$uid=0,m.prototype.$modes=s.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=$,r.implement(m.prototype,a);var v=1,y=2,b=3,w=4,x=9,S=10,C=11,_=12;function $(e){return!(e<4352)&&(e>=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)}e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),s.defineOptions(m.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=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./lib/oop"),i=e("./range").Range,s=function(){function e(){this.$options={}}return e.prototype.set=function(e){return o.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,o,s){return r=new i(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start)&&(r=null,1))}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=o.length-c;e:for(var d=a.offset||0;d<=u;d++){for(var h=0;h<c;h++)if(-1==o[d+h].search(a[h]))continue e;var p=o[d],f=o[d+c-1],g=p.length-p.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===d&&l.end.column>g||(s.push(l=new i(d,g,d+c-1,m)),c>2&&(d=d+c-2))}}else for(var v=0;v<o.length;v++){var y=r.getMatchOffsets(o[v],a);for(h=0;h<y.length;h++){var b=y[h];s.push(new i(v,b.offset,v,b.offset+b.length))}}if(n){var w=n.start.column,x=n.end.column;for(v=0,h=s.length-1;v<h&&s[v].start.column<w&&0==s[v].start.row;)v++;for(var S=n.end.row-n.start.row;v<h&&s[h].end.column>x&&s[h].end.row==S;)h--;for(s=s.slice(v,h+1),v=0,h=s.length;v<h;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var o=r.exec(e);if(!o||o[0].length!=e.length)return null;if(n.regExp||(t=t.replace(/\$/g,"$$$$")),t=e.replace(r,t),n.preserveCase){t=t.split("");for(var i=Math.min(e.length,e.length);i--;){var s=e[i];s&&s.toLowerCase()!=s?t[i]=t[i].toUpperCase():t[i]=t[i].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n));var o=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,o+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=r.supportsLookbehind();function o(e,r){return void 0===r&&(r=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?r?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var i=Array.from(e),s=i[0],a=i[i.length-1];return o(s)+e+o(a,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var i=new RegExp(n,o)}catch(e){i=!1}return e.re=i},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],o=0;o<n.length;o++)try{r.push(new RegExp(n[o],t))}catch(e){return!1}return r},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var o=1==t.backwards,i=0!=t.skipCurrent,s=n.unicode,a=t.range,l=t.start;l||(l=a?a[o?"end":"start"]:e.selection.getRange()),l.start&&(l=l[i!=o?"end":"start"]);var c=a?a.start.row:0,u=a?a.end.row:e.getLength()-1;if(o)var d=function(e){var n=l.row;if(!p(n,l.column,e)){for(n--;n>=c;n--)if(p(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=u,c=l.row;n>=c;n--)if(p(n,Number.MAX_VALUE,e))return}};else d=function(e){var n=l.row;if(!p(n,l.column,e)){for(n+=1;n<=u;n++)if(p(n,0,e))return;if(0!=t.wrap)for(n=c,u=l.row;n<=u;n++)if(p(n,0,e))return}};if(t.$isMultiLine)var h=n.length,p=function(t,r,i){var s=o?t-h+1:t;if(!(s<0||s+h>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!o&&l<r||-1===l)){for(var c=1;c<h;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var u=a.match(n[h-1])[0].length;if(!(o&&u>r))return!!i(s,l,s+h-1,u)||void 0}}};else p=o?function(t,o,i){var a,l=e.getLine(t),c=[],u=0;for(n.lastIndex=0;a=n.exec(l);){var d=a[0].length;if(u=a.index,!d){if(u>=l.length)break;n.lastIndex=u+=r.skipEmptyMatch(l,u,s)}if(a.index+d>o)break;c.push(a.index,d)}for(var h=c.length-1;h>=0;h-=2){var p=c[h-1];if(i(t,p,t,p+(d=c[h])))return!0}}:function(t,o,i){var a,l,c=e.getLine(t);for(n.lastIndex=o;l=n.exec(c);){var u=l[0].length;if(i(t,a=l.index,t,a+u))return!0;if(!u&&(n.lastIndex=a+=r.skipEmptyMatch(c,a,s),a>=c.length))return!1}};return{forEach:d}},e}();t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e("../lib/keys"),s=e("../lib/useragent"),a=i.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var o in r){var i=r[o];if(i==e)delete r[o];else if(Array.isArray(i)){var s=i.indexOf(e);-1!=s&&(i.splice(s,1),1==i.length&&(r[o]=i[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==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 r="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var i=this.parseKeys(e),s=a[i.hashId]+i.key;this._addCommandToBinding(r+s,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var r,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(r=o[e].indexOf(t))&&o[e].splice(r,1):o[e]=[o[e]],"number"!=typeof n&&(n=c(t));var i=o[e];for(r=0;r<i.length&&!(c(i[r])>n);r++);i.splice(r,0,t)}else delete o[e]},e.prototype.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)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.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 o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},e.prototype.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(!(r<0)){var o=a[t]+n,i=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,i=this.commandKeyBinding[e.$keyChain]||i),!i||"chainKeys"!=i&&"chainKeys"!=i[i.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:i}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var u=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return o(t,e),t}(l);u.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=u,t.MultiHashHandler=l}),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 r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,a=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),r}return o(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!this.canExecute(e,t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.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)},t.prototype.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}}},t.prototype.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(s);i.implement(l.prototype,a),t.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var r=e("../lib/lang"),o=e("../config"),i=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("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:s("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:s("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:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("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:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("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:s("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:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){o.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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("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:s("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:s("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:s("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:s("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:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("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:s("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:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("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:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("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:s(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:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("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:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("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:s("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:s(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:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("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:s("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:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("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:s("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:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("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(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("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:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=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<=o.row+1;c++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}o.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new i(n.row,0,o.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,o=[];r.length<1&&(r=[e.selection.getRange()]);for(var s=0;s<r.length;s++)s==r.length-1&&(r[s].end.row===t&&r[s].end.column===n||o.push(new i(r[s].end.row,r[s].end.column,t,n))),0===s?0===r[s].start.row&&0===r[s].start.column||o.push(new i(0,0,r[s].start.row,r[s].start.column)):o.push(new i(r[s-1].end.row,r[s-1].end.column,r[s].start.row,r[s].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),s=0;s<o.length;s++)e.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../mouse/default_gutter_handler").GutterTooltip,i=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===r.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=r.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return null===t&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==t&&null===n?(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-e)<Math.abs(t-e)?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new s(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==r.tab){if(e.keyCode===r.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==r.up)if(e.keyCode!==r.down){if(e.keyCode===r.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===r.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==r.enter&&e.keyCode!==r.space);else switch(e.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var t=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=n.right+"px",o.top=n.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldWidget=function(e){if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(null==n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},e}();t.GutterKeyboardHandler=i;var s=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return r.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=s}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,p=e("./search").Search,f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,y=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,S=e("./clipboard"),C=e("./lib/keys"),_=function(){function e(t,n,r){this.session,this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new d(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||r&&r.session||new h("")),y.resetOptions(this),r&&this.setOptions(r),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),o=this.renderer.layerConfig;(r.start.row>=o.lastRow||r.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.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),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);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.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),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}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),o=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),i=t.getMatchingBracketRanges(n,o);if(!i){var s=new b(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(i=[a.openTagName.isEmpty()?a.openTag:a.openTagName,a.closeTagName.isEmpty()?a.closeTag:a.closeTagName])}}if(!i&&t.$mode.getMatching&&(i=t.$mode.getMatching(e.session)),i){var l="ace_bracket";Array.isArray(i)?1==i.length&&(l="ace_error_bracket"):i=[i],2==i.length&&(0==f.comparePoints(i[0].end,i[1].start)?i=[f.fromPoints(i[0].start,i[1].end)]:0==f.comparePoints(i[0].start,i[1].end)&&(i=[f.fromPoints(i[1].start,i[0].end)])),t.$bracketHighlight={ranges:i,markerIds:i.map(function(e){return t.addMarker(e,l,"text")})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}},50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(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"))},e.prototype.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(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,o=e.getLine(t.start.row),i=o.substring(n,r);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),a=o.substring(n-1,r+1);if(s.test(a))return s}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),o=0;o<r.length;o++){var i=r[o];o&&r[o-1].start.row==i.start.row||(e+=this.session.getLine(i.start.row)+t)}}var s={text:e};return this._signal("copy",s),S.lineMode=!!n&&s.text,s.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===S.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach(function(e){r.insert({row:e.start.row,column:0},t)});else{var o=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges,s=!(2!=o.length||o[0]&&o[1]);if(o.length!=i.length||s)return this.commands.exec("insertstring",this,t);for(var a=i.length;a--;){var l=i[a];l.isEmpty()||r.remove(l),r.insert(l.start,o[a])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,r=n.getMode(),o=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var i=r.transformAction(n.getState(o.row),"insertion",this,n,e);i&&(e!==i.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=i.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=f.fromPoints(o,o)).end.column+=e.length,this.session.remove(s));else{var s=this.getSelectionRange();o=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(o.row);if(o.column>a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,u=n.getState(o.row),d=(a=n.getLine(o.row),r.checkOutdent(u,a,e));if(n.insert(o,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new f(o.row,c+i.selection[0],o.row,c+i.selection[1])):this.selection.setSelectionRange(new f(o.row+i.selection[0],i.selection[1],o.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(u,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},h)}d&&r.autoOutdent(u,n,o.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new f(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r="",o="",i="",s=e.getTabString(),a=0;a<n.length;a++)for(var l=n[a].start.row,c=n[a].end.row,u=l;u<=c;u++){u>0&&(r=e.getState(u-1),o=e.getLine(u-1),i=t.getNextLineIndent(r,o,s));var d=e.getLine(u),h=t.$getIndent(d);if(i!==h){if(h.length>0){var p=new f(u,0,u,h.length);e.remove(p)}i.length>0&&e.insert({row:u,column:0},i)}t.autoOutdent(r,e,u)}},e.prototype.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()},e.prototype.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))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.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,r=n.getState(t.start.row),o=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.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()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,o=this.session.getLine(e.row);t<o.length?(n=o.charAt(t)+o.charAt(t-1),r=new f(e.row,t-1,e.row,t+1)):(n=o.charAt(t-1)+o.charAt(t-2),r=new f(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return u=this.$getSelectedRows(),void e.indentRows(u.first,u.last,"\t")}var r=e.getLine(t.start.row),o=t.start,i=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var l=i-a%i,c=s.stringRepeat(" ",l);else{for(l=a%i;" "==r[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var o=new f(0,0,0,0);for(r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var o=n.exec(r);if(o.index<=t&&o.index+o[0].length>=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new f(t,n-1,t,n),o=this.session.getTextRange(r);if(!isNaN(parseFloat(o))&&isFinite(o)){var i=this.getNumberAt(t,n);if(i){var s=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,a=i.start+i.value.length-s,l=parseFloat(i.value);l*=Math.pow(10,a),s!==i.end&&n<s?e*=Math.pow(10,i.end-n-1):e*=Math.pow(10,i.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new f(t,i.start,t,i.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(i.start+1,n+c.length-i.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,o=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),i=t-r-1;i<0&&(i=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&o.forEach(function(t,o){l=a+t.length,i>=a&&i<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+r),c.selection.selectTo(e,l+r)),a=l});for(var u,d=this.$toggleWordPairs,h=0;h<d.length;h++)for(var p=d[h],f=0;f<=1;f++){var g=+!f,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\s?$","i"));m&&n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(p[f]),"i"),function(e){var t=p[g];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[g].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(u),u="")}},e.prototype.findLinkAt=function(e,t){var n,o,i=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),s=t;s<0&&(s=0);var a,l=0,c=0;try{for(var u=r(i),d=u.next();!d.done;d=u.next()){var h=d.value;if(c=l+h.length,s>=l&&s<=c&&h.match(/((?:https?|ftp):\/\/[\S]+)/)){a=h.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return a},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var i=r?n.start:n.end,s=t.insert(i,t.getTextRange(n));n.start=i,n.end=s,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var i=o.toOrientedRange();n=this.$getSelectedRows(i),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),i.moveBy(r,0),o.fromOrientedRange(i)}else{var s=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var d=u;s[u].moveBy(a,0);for(var h=(n=this.$getSelectedRows(s[u])).first,p=n.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=p)break;if(!t&&f.first>p+1)break;p=f.last}for(u--,a=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=u+1);d<=u;)s[d].moveBy(a,0),d++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,o=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,o*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.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)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),o=r.getCurrentToken(),i=0;o&&-1!==o.type.indexOf("tag-name")&&(o=r.stepBackward());var s=o||r.stepForward();if(s){var a,l,c=!1,u={},d=n.column-s.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;d<s.value.length&&!c;d++)if(h[s.value[d]])switch(l=h[s.value[d]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[d]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===o.value&&i>1?u[s.value]++:"</"===o.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(o=s,i++,s=r.stepForward(),d=0)}while(s&&!c);if(a){var p,g;if("bracket"===a)(p=this.session.getBracketRange(n))||(g=(p=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+d-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+d-1)).start,(t||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(p=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(0===(p=new f(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?g=(p=m.closeTag).start:(p=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?p.end:p.start))}g=g||p.start}(g=p&&p.cursor||g)&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var o=this.getSelectionRange();this.selection.moveTo(0,0);for(var i=n.length-1;i>=0;--i)this.$tryReplace(n[i],e)&&r++;return this.selection.setSelectionRange(o),r},e.prototype.$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},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&o.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 i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.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)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.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()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var i=this.on("changeSelection",function(){r=!0}),s=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=i.top-s.offset;null!=(r=i.top>=0&&a+t.top<0||!(i.top<s.height&&i.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(o.style.top=a+"px",o.style.left=i.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;y.loadModule("ace/ext/prompt",function(o){o.prompt(r,e,t,n)})},e}();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(_.prototype,g),y.defineOptions(_.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?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?$.attach(this):$.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),i.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),i.addCssClass(this.container,"ace_hasPlaceholder");var t=i.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()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},r=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",r.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new w(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",r.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var $={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},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=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,o=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,o){var i=this.cellCache.pop();if(!i){var s=r.createElement("div");o&&o(s),this.element.appendChild(s),i={element:s,text:"",row:e}}return i.row=e,i},e}();t.Lines=o}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,o=this.$annotations[r];o||(o=this.$annotations[r]={text:[],type:[],displayText:[]});var s=n.text,a=n.text,l=n.type;s=s?i.escapeHTML(s):n.html||"",a=a||n.html||"",-1===o.text.indexOf(s)&&(o.text.push(s),o.type.push(l),o.displayText.push(a));var c=n.className;c?o.className=c:"error"===l?o.className=" ace_error":"security"!==l||/\bace_error\b/.test(o.className)?"warning"!==l||/\bace_(error|security)\b/.test(o.className)?"info"!==l||o.className?"hint"!==l||o.className||(o.className=" ace_hint"):o.className=" ace_info":o.className=" ace_warning":o.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var o=t.getNextFoldLine(n),i=o?o.start.row:1/0,s=null,a=-1,l=n;;){if(l>i&&(l=o.end.row+1,i=(o=t.getNextFoldLine(l,o))?o.start.row:1/0),l>r){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,u),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+r-1);var i=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(i+=s.left+s.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.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<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},e.prototype.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),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(r>n)for(o=this.session.getFoldedRowCount(n+1,r);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],o=t,i=this.session.getNextFoldLine(o),s=i?i.start.row:1/0;o>s&&(o=i.end.row+1,s=(i=this.session.getNextFoldLine(o,i))?i.start.row:1/0),!(o>n);){var a=this.$lines.createCell(o,e,this.session,u);this.$renderCell(a,e,i,o),r.push(a),o++}return r},e.prototype.$renderCell=function(e,t,n,o){var i=e.element,s=this.session,a=i.childNodes[0],c=i.childNodes[1],u=i.childNodes[2],d=u.firstChild,h=s.$firstLineNumber,p=s.$breakpoints,f=s.$decorations,g=s.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&s.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",w=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",x=(g?g.getText(s,o):o+h).toString();if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o<this.$cursorRow&&o>=v&&this.$cursorRow<=n.end.row)&&(b+="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)),p[o]&&(b+=p[o]),f[o]&&(b+=f[o]),this.$annotations[o]&&o!==v&&(b+=this.$annotations[o].className),m){var S=m[o];null==S&&(S=m[o]=s.getFoldWidget(o))}if(S){var C="ace_fold-widget ace_"+S,_="start"==S&&o==v&&o<n.end.row;if(_){C+=" ace_closed";for(var $="",k=!1,A=o+1;A<=n.end.row;A++)if(this.$annotations[A]){if(" ace_error"===this.$annotations[A].className){k=!0,$=" ace_error_fold";break}" ace_security"===this.$annotations[A].className?(k=!0,$=" ace_security_fold"):" ace_warning"===this.$annotations[A].className&&" ace_security_fold"!==$&&(k=!0,$=" ace_warning_fold")}b+=$}else C+=" ace_open";c.className!=C&&(c.className=C),r.setStyle(c.style,"height",y),r.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var M=s.getFoldWidgetRange(o);M?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[M.start.row+1,M.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[o+1])),_?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(r.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));if(k&&this.$showFoldedAnnotations){switch(u.className="ace_gutter_annotation",d.className=w,d.className+=$,r.setStyle(d.style,"height",y),r.setStyle(u.style,"display","block"),r.setStyle(u.style,"height",y),$){case" ace_error_fold":E=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[x]);break;case" ace_security_fold":E=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[x]);break;case" ace_warning_fold":E=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[x])}u.setAttribute("aria-label",E),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else if(this.$annotations[o]){var E;switch(u.className="ace_gutter_annotation",d.className=w,this.$useSvgGutterIcons?d.className+=this.$annotations[o].className:i.classList.add(this.$annotations[o].className.replace(" ","")),r.setStyle(d.style,"height",y),r.setStyle(u.style,"display","block"),r.setStyle(u.style,"height",y),this.$annotations[o].className){case" ace_error":E=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[x]);break;case" ace_security":E=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[x]);break;case" ace_warning":E=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[x]);break;case" ace_info":E=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[x]);break;case" ace_hint":E=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[x])}u.setAttribute("aria-label",E),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else r.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0");return x!==a.data&&(a.data=x),i.className!=b&&(i.className=b),r.setStyle(e.element.style,"height",this.$lines.computeLineHeight(o,t,s)+"px"),r.setStyle(e.element.style,"top",this.$lines.computeLineTop(o,t,s)+"px"),e.text=x,"none"===u.style.display&&"none"===c.style.display?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function u(e){var t=document.createTextNode("");e.appendChild(t);var n=r.createElement("span");e.appendChild(n);var o=r.createElement("span");e.appendChild(o);var i=r.createElement("span");return o.appendChild(i),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,o.implement(c.prototype,s),t.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/dom"),i=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.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},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var o=r.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),r.renderer){var i=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;r.renderer(t,o,s,i,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,o,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,o,r.clazz,e):o.isMultiLine()?"text"==r.type?this.drawTextMarker(t,o,r.clazz,e):this.drawMultiLineMarker(t,o,r.clazz,e):this.drawSingleLineMarker(t,o,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,o,i){for(var a=this.session,l=t.start.row,c=t.end.row,u=l,d=0,h=0,p=a.getScreenLastRowColumn(u),f=new r(u,t.start.column,u,h);u<=c;u++)f.start.row=f.end.row=u,f.start.column=u==l?t.start.column:a.getRowWrapIndent(u),f.end.column=p,d=h,h=p,p=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:t.end.column,this.drawSingleLineMarker(e,f,n+(u==l?" ace_start":"")+" ace_br"+s(u==l||u==l+1&&t.start.column,d<h,h>p,u==c),o,u==c?0:1,i)},e.prototype.drawMultiLineMarker=function(e,t,n,r,o){var i=this.$padding,s=r.lineHeight,a=this.$getTop(t.start.row,r),l=i+t.start.column*r.characterWidth;if(o=o||"",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",r,null,o)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+a+"px;left:"+l+"px;"+(o||"")),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",r,null,o)}else{a=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+i+"px;"+(o||""))}if(!((s=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){a=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+s+"px;right:"+i+"px;top:"+a+"px;left:"+i+"px;"+(o||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,o,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,o,i);var s=r.lineHeight,a=(t.end.column+(o||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(i||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,o,i){var s=r.lineHeight,a=this.$getTop(t.start.row,r),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(o||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(i||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-i),this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(o||""))},e.prototype.drawScreenLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),s=r.lineHeight;this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(o||""))},e}();function s(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}i.prototype.$padding=0,t.Marker=i}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var r=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return r.has(e)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,u=function(){function e(e){this.dom=o,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 s(this.element)}return e.prototype.$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},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.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)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=i.stringRepeat(this.TAB_CHAR,n),t.push(r)):t.push(this.dom.createTextNode(i.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,o="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?i.stringRepeat(this.SPACE_CHAR,this.tabSize):i.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?i.stringRepeat(this.TAB_CHAR,this.tabSize):a;(r=this.dom.createElement("span")).className=o+s,r.textContent=a,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className=o+l,r.textContent=c,this.$tabStrings["\t"]=r}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),o=Math.min(n,e.lastRow),i=this.element.childNodes,s=0,a=e.firstRow;a<r;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(r)){r=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=r,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>o);){var d=i[s++];if(d){this.dom.removeChildren(d),this.$renderLine(d,a,a==u&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(a)+"px";d.style.height!=h&&(c=!0,d.style.height=h)}a++}if(c)for(;s<this.$lines.cells.length;){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var r=[],i=t,s=this.session.getNextFoldLine(i),a=s?s.start.row:1/0;i>a&&(i=s.end.row+1,a=(s=this.session.getNextFoldLine(i,s))?s.start.row:1/0),!(i>n);){var l=this.$lines.createCell(i,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(c,i,i==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),i++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){for(var o,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\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,u=this.dom.createFragment(this.element),d=0;o=a.exec(r);){var h=o[1],p=o[2],f=o[3],g=o[4],m=o[5];if(s.showSpaces||!p){var v=d!=o.index?r.slice(d,o.index):"";if(d=o.index+o[0].length,v&&u.appendChild(this.dom.createTextNode(v,this.element)),h){var y=s.session.getScreenTabSize(t+o.index);u.appendChild(s.$tabStrings[y].cloneNode(!0)),t+=y-1}else p?s.showSpaces?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",w.textContent=i.stringRepeat(s.SPACE_CHAR,p.length),u.appendChild(w)):u.appendChild(this.dom.createTextNode(p,this.element)):f?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",w.textContent=i.stringRepeat(s.SPACE_CHAR,f.length),u.appendChild(w)):g?(t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:g,u.appendChild(w)):m&&(t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=m,u.appendChild(w))}}if(u.appendChild(this.dom.createTextNode(d?r.slice(d):r,this.element)),c(n.type))e.appendChild(u);else{var b="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),w.className=b,w.appendChild(u),e.appendChild(w)}return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var o=(r-=r%this.tabSize)/this.tabSize,i=0;i<o;i++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if("\t"==t[0]){for(i=0;i<r;i++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight)for(var o=this.session.$bracketHighlight.ranges,i=0;i<o.length;i++)if(t.row!==o[i].start.row){this.$highlightIndentGuideMarker.end=o[i].start.row,t.row>o[i].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,i=t.row+1;i<e.length;i++){var s=e[i],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=i,a<=n))break}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t].element.childNodes;if(n.length>0)for(var r=0;r<n.length;r++)if(n[r].classList&&n[r].classList.contains("ace_indent-guide-active")){n[r].classList.remove("ace_indent-guide-active");break}}},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element.childNodes;if(n){var r=n[t-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(n=e.length-1;n>=0;n--)if(r=e[n],this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var r=0,o=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],d=u.value;if(0==c&&this.displayIndentGuides){if(r=d.length,!(d=this.renderIndentGuide(l,d,s)))continue;r-=d.length}if(r+d.length<s)a=this.$renderToken(l,a,u,d),r+=d.length;else{for(;r+d.length>=s;)a=this.$renderToken(l,a,u,d.substring(0,s-r)),d=d.substring(s-r),r=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(i.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++o]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,a=this.$renderToken(l,a,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var o=t[r],i=o.value;if(0!=r||!this.displayIndentGuides||(i=this.renderIndentGuide(e,i))){if(n+i.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,i);n=this.$renderToken(e,n,o,i)}}},e.prototype.$renderOverflowMessage=function(e,t,n,r,o){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=o?"<hide>":"<click to see more...>",e.appendChild(i)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var o=e;if(r.length){var i=this.session.getRowSplitData(t);i&&i.length?(this.$renderWrappedLine(e,r,i),o=e.lastChild):(o=e,this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,r))}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,r=[],o=n.getTokens(e);return t.walk(function(e,t,i,s,a){null!=e?r.push({type:"fold",value:e}):(a&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,i=0;i+e[o].value.length<t;)if(i+=e[o].value.length,++o==e.length)return;for(i!=t&&((s=e[o].value.substring(t-i)).length>n-t&&(s=s.substring(0,n-t)),r.push({type:e[o].type,value:s}),i=t+s.length,o+=1);i<n&&o<e.length;){var s;(s=e[o].value).length+i>n?r.push({type:e[o].type,value:s.substring(0,n-i)}):r.push(e[o]),i+=s.length,o+=1}}(o,s,i))},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,r.implement(u.prototype,a),t.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(){function e(e){this.element=r.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(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$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&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.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()},e.prototype.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}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,o=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[o++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(r.setStyle(l,"display","block"),r.translate(a,s.left,s.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();o.prototype.$padding=0,o.prototype.drawCursor=null,t.Cursor=o}),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 r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,u=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(u.prototype,l);var d=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=s.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+"px",r.$minWidth=0,r}return o(t,e),t.prototype.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},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(u);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}return o(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(u);t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=h,t.VScrollBar=d,t.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;s.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(c.prototype,l);var u=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+"px",r.$minWidth=0,r}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientY,o=t.clientY,i=this.thumbTop;a.capture(this.inner,function(e){r=e.clientY},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollTopFromThumbTop(i+r-o);e!==n.scrollTop&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var d=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=n,r}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientX,o=t.clientX,i=this.thumbLeft;a.capture(this.inner,function(e){r=e.clientX},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollLeftFromThumbLeft(i+r-o);e!==n.scrollLeft&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);d.prototype.setInnerWidth=d.prototype.setScrollWidth,t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=d,t.VScrollBar=u,t.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),o=function(){function e(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&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=o}),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 r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,u="function"==typeof ResizeObserver,d=200,h=function(){function e(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$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"},e.prototype.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})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle(function t(){e.checkForSizeChanges(),s.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$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},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=i(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),u=s(this.els[3]),h=n(r(u,l),r(u,c),r(o(l,c),o(u,a))),p=i(1+h[0],r(l,a)),f=i(1+h[1],r(c,a));if(t){var g=t,m=h[0]*g[0]/d+h[1]*g[1]/d+1,v=o(i(g[0],p),i(g[1],f));return o(i(1/m/d,v),a)}var y=r(e,a),b=n(r(p,i(h[0],y)),r(f,i(h[1],y)),y);return i(d,b)},e}();h.prototype.$characterSize={width:0,height:0},r.implement(h.prototype,l),t.FontMetrics=h}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.canvas=r.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight);var n=this.canvas.getContext("2d"),r=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),r){var o={info:1,warning:2,error:3};r.forEach(function(e){e.priority=o[e.type]||null}),r=r.sort(function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0});for(var i=this.renderer.session.$foldData,s=0;s<r.length;s++){var a=r[s].row,l=this.compensateFoldRows(a,i),c=Math.round((a-l)*this.lineHeight*this.heightRatio),u=Math.round((a-l)*this.lineHeight*this.heightRatio),d=Math.round(((a-l)*this.lineHeight+this.lineHeight)*this.heightRatio);if(d-u<this.minDecorationHeight){var h=(u+d)/2|0;h<this.halfMinDecorationHeight?h=this.halfMinDecorationHeight:h+this.halfMinDecorationHeight>this.canvasHeight&&(h=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(h-this.halfMinDecorationHeight),d=Math.round(h+this.halfMinDecorationHeight)}n.fillStyle=t[r[s].type]||null,n.fillRect(0,c,this.canvasWidth,d-u)}}var p=this.renderer.session.selection.getCursor();p&&(l=this.compensateFoldRows(p.row,i),c=Math.round((p.row-l)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2))},e.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var r=0;r<t.length;r++)e>t[r].start.row&&e<t[r].end.row?n+=e-t[r].start.row:e>=t[r].end.row&&(n+=t[r].end.row-t[r].start.row);return n},e}();o.implement(s.prototype,i),t.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./lib/lang"),s=e("./config"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),b=e("./layer/decorators").Decorator,w=e("./lib/useragent"),x=e("./layer/text_util").isTextToken;o.importCssString(y,"ace_editor.css",!1);var S=function(){function e(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(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 m(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=!w.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.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))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;r||(r=o.clientHeight||o.scrollHeight),!r&&this.$maxLines&&this.lineHeight>1&&(o.style.height&&"0px"!=o.style.height||(o.style.height="1px",r=o.clientHeight||o.scrollHeight)),n||(n=o.clientWidth||o.scrollWidth);var i=this.$updateCachedSize(e,t,n,r);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(r&&(e||s.height!=r)&&(s.height=r,i|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){i|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",l),o.setStyle(this.scroller.style,"right",l),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return s.$dirty=!n||!r,i&&this._signal("resize",a),i},e.prototype.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()},e.prototype.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)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.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()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$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 r=this.layerConfig,i=n.top,s=n.left;i-=r.offset;var a=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(i<0||i>r.height-a)o.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",a+"px"),o.setStyle(e,"width",l+"px"),o.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(i,c))}}}else o.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.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},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.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()},e.prototype.setScrollMargin=function(e,t,n,r){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$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)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$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 r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",s=n.minHeight+"px";o.setStyle(this.content.style,"width",i),o.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(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.$customScrollbar&&this.$scrollDecorator.$updateDecorators(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),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(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},e.prototype.$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 r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==i;s&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));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;r+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>u.top),h=a!==d;h&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,f,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),y=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),p=e.documentToScreenRow(v,0),f=e.getRowLength(v)*b,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(y)*b+f,g=this.scrollTop-p*b;var x=0;return(this.layerConfig.width!=o||s)&&(x=this.CHANGE_H_SCROLL),(s||h)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:g,gutterOffset:b?Math.max(0,Math.ceil((g+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},e.prototype.$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||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),o=r.left,i=r.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>i?(t&&l+s>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):l+this.$size.scrollerHeight-a<i+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<i-this.lineHeight&&(i+=t*this.$size.scrollerHeight),this.session.setScrollTop(i+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft,u=2*this.layerConfig.characterWidth;o-u<c?((o-=u)<this.$padding+u&&(o=-this.scrollMargin.left),this.session.setScrollLeft(o)):(o+=u,c+this.$size.scrollerWidth<o+this.characterWidth?this.session.setScrollLeft(Math.round(o+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&o-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,o=n.top-r*(t||0);return this.session.setScrollTop(o),o},e.prototype.$calcSteps=function(e,t){var n=0,r=this.STEPS,o=[],i=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)o.push(i(n/this.STEPS,e,t-e));return o},e.prototype.scrollToLine=function(e,t,n,r){var o=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(o-=this.$size.scrollerHeight/2);var i=this.scrollTop;this.session.setScrollTop(o),!1!==n&&this.animateScrolling(i,r)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0])==n)return}var i=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:i},clearInterval(this.$timer),r.session.setScrollTop(i.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){if(!r.$stopAnimation)return r.session?void(i.length?(r.session.setScrollTop(i.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):s()):clearInterval(r.$timer);s()},10)}}function s(){r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,r.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=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},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(i):Math.round(i);return{row:s,column:a,side:i-a>0?1:-1,offsetX:o}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,s=this.$blockCursor?Math.floor(i):Math.round(i),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),o)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),i=r.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+i-this.scrollTop}},e.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.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")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.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=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,r=t||{row:n.row,column:n.column};this.removeGhostText();var i=this.$calculateWrappedTextChunks(e,r);this.addToken(i[0].text,"ghost_text",r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var s=o.createElement("div");if(i.length>1){var a,l=this.hideTokensAfterPosition(r.row,r.column);i.slice(1).forEach(function(e){var t=o.createElement("div"),n=o.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(o.createTextNode(e.text)),t.appendChild(n),s.appendChild(t),a=t}),l.forEach(function(e){var t=o.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(o.createTextNode(e.value)),a.appendChild(t)}),this.$ghostTextWidget={el:s,row:r.row,column:r.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(r,!0),u=this.container.getBoundingClientRect().height,d=i.length*this.lineHeight;if(d<u-c.top)return;d<u?this.scrollBy(0,(i.length-1)*this.lineHeight):this.scrollToRow(r.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,r=Math.floor(n/this.characterWidth)-2;r=r<=0?60:r;for(var o=e.split(/\r?\n/),i=[],s=0;s<o.length;s++){var a=this.session.$getDisplayTokens(o[s],t.column),l=this.session.$computeWrapSplits(a,r,this.session.$tabSize);if(l.length>0){var c=0;l.push(o[s].length);for(var u=0;u<l.length;u++){var d=o[s].slice(c,l[u]);i.push({text:d,wrapped:!0}),c=l[u]}}else i.push({text:o[s],wrapped:!1})}return i},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,r){var o=this.session;o.bgTokenizer.lines[n]=null;var i={type:t,value:e},s=o.getTokens(n);if(null!=r&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(r<=(a+=c.value.length)){var u=c.value.length-(a-r),d=c.value.slice(0,u),h=c.value.slice(u);s.splice(l,1,{type:c.type,value:d},i,{type:c.type,value:h});break}}else s.push(i);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),r=0,o=!1,i=[],s=0;s<n.length;s++){var a=n[s];r+=a.value.length,"ghost_text"!==a.type&&(o?(i.push({type:a.type,value:a.value}),a.type="hidden_token"):r===t&&(o=!0))}return this.updateLines(e,e),i},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var r=e||this.$options.theme.initialValue;s.loadModule(["theme",r],i)}function i(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.$id&&(n.$themeId=r.$id),o.importCssString(r.cssText,r.cssClass,n.container),n.theme&&o.removeCssClass(n.container,n.theme.cssClass);var i="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&i!=n.$padding&&n.setPadding(i),n.$theme=r.cssClass,n.theme=r,o.addCssClass(n.container,r.cssClass),o.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t(),w.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){o.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){o.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){o.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){o.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){o.importCssString(y,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}),this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=i.delayedCall(function(){e.destroyed||e.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(t){var n=t[0].contentRect.width,r=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},e}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,r.implement(S.prototype,v),s.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/net"),i=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,i),this.$createWorkerFromOldConfig=function(t,n,r,o,i){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(o),i&&this.send("importScripts",i),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&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 r=null,o=!1,a=Object.create(i),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.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})},s.loadModule(["worker",t],function(e){for(r=new e[n](a);c.length;)d()}),u},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 r=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),s=function(){function e(e,t,n,r,o,i){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){s.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)}return e.prototype.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 o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new r(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,o=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+i};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+i},this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},e.prototype.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))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();i.implement(s.prototype,o),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),o=e("../lib/useragent");function i(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&o.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,d=e.editor,h=d.selection,p=d.inMultiSelectMode,f=e.getDocumentPosition(),g=h.getCursor(),m=e.inSelection()||h.isEmpty()&&i(f,g),v=e.x,y=e.y,b=d.session,w=d.renderer.pixelToScreenCoordinates(v,y),x=w;if(d.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&d.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!p&&s)return}else n&&d.$blockSelectEnabled&&(u="block");if(u&&o.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&m)return;if(!p){var S=h.toOrientedRange();d.addSelectionMarker(S)}var C=h.rangeList.rangeAtPoint(f);d.inVirtualSelectionMode=!0,s&&(C=null,S=h.ranges[0]||S,d.removeSelectionMarker(S)),d.once("mouseup",function(){var e=h.toOrientedRange();C&&e.isEmpty()&&i(C.cursor,e.cursor)?h.substractPoint(e.cursor):(s?h.substractPoint(S.cursor):S&&(d.removeSelectionMarker(S),h.addRange(S)),h.addRange(e)),d.inVirtualSelectionMode=!1})}else if("block"==u){var _;e.stop(),d.inVirtualSelectionMode=!0;var $=[],k=function(){var e=d.renderer.pixelToScreenCoordinates(v,y),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);i(x,e)&&i(t,h.lead)||(x=e,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers($),$=h.rectangularRangeBlock(x,w),d.$mouseHandler.$clickSelection&&1==$.length&&$[0].isEmpty()&&($[0]=d.$mouseHandler.$clickSelection.clone()),$.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};p&&!l?h.toSingleRange():!p&&l&&(_=h.toOrientedRange(),d.addSelectionMarker(_)),s?w=b.documentToScreenPosition(h.lead):h.moveToPosition(f),x={row:-1,column:-1};var A=k;r.capture(d.container,function(e){v=e.clientX,y=e.clientY},function(e){k(),clearInterval(M),d.removeSelectionMarkers($),$.length||($=[h.toOrientedRange()]),_&&(d.removeSelectionMarker(_),h.toSingleRange(_));for(var t=0;t<$.length;t++)h.addRange($[t]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null});var M=setInterval(function(){A()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?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 r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(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 r=e("./range_list").RangeList,o=e("./range").Range,i=e("./selection").Selection,s=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 u=new(0,e("./search").Search),d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.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 r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),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 r=this.ranges.indexOf(e[n]);this.ranges.splice(r,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 r,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;n<e.length;n++){var r=e[n],i=r.start.row,s=r.end.row;if(i===s)t.push(r.clone());else{for(t.push(new o(i,r.start.column,i,this.session.getLine(i).length));++i<s;)t.push(this.getLineRange(i,!0));t.push(new o(s,0,s,r.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column<t.column;if(i)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,d=e.row<t.row;if(d)var h=e.row,f=t.row;else h=t.row,f=e.row;s<0&&(s=0),h<0&&(h=0),h==f&&(n=!0);for(var g=h;g<=f;g++){var m=o.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,a,c));if(m.isEmpty()){if(u&&p(m.end,u))break;u=m.end}m.cursor=i?m.start:m.end,r.push(m)}if(d&&r.reverse(),!n){for(var v=r.length-1;r[v].isEmpty()&&v>0;)v--;if(v>0)for(var y=0;r[y].isEmpty();)y++;for(var b=v;b>=y;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(i.prototype);var h=e("./editor").Editor;function p(e,t){return e.row==t.row&&e.column==t.column}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",s),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;a.addListener(t,"keydown",function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),a.addListener(t,"keyup",r,e),a.addListener(t,"blur",r,e)}function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(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 r=e[n];if(r.marker){this.session.removeMarker(r.marker);var o=t.indexOf(r);-1!=o&&t.splice(o,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?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,o=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(o?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=l._eventRegistry;l._eventRegistry={};var h=new i(a);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(s)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;h.fromOrientedRange(u[p]),h.index=p,this.selection=a.selection=h;var f=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===f||(r=f),h.toOrientedRange(u[p])}h.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),r}},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=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var o=this.session.getDocument().getNewLineCharacter();(e=n.join(o)).length==(n.length-1)*o.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var o=this.$search.findAll(this.session);if(!o.length)return 0;var i=this.multiSelect;n||i.toSingleRange(o[0]);for(var s=o.length;s--;)i.addRange(o[s],!0);return r&&i.rangeList.rangeAtPoint(r.start)&&i.addRange(r,!0),o.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,i=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(i.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(i.row+e,i.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(r?(s=o.fromPoints(a,c)).cursor=s.start:(s=o.fromPoints(c,a)).cursor=s.end,s.desiredColumn=i.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,o=r.length;o--;)if((a=r[o]).isEmpty()){var i=t.getWordRange(a.start.row,a.start.column);a.start.row=i.start.row,a.start.column=i.start.column,a.end.row=i.end.row,a.end.column=i.end.column}n.mergeOverlappingRanges();var s=[];for(o=r.length;o--;){var a=r[o];s.unshift(t.getTextRange(a))}for(e<0?s.unshift(s.pop()):s.push(s.shift()),o=r.length;o--;){var l=(a=r[o]).clone();t.replace(a,s[o]),a.start.row=l.start.row,a.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,o=r.multiSelect.toOrientedRange();if(!o.isEmpty()||((o=r.getWordRange(o.start.row,o.start.column)).cursor=-1==e?o.start:o.end,this.multiSelect.addRange(o),!n)){var i=r.getTextRange(o),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(r,i,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(o.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,i=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(n.length&&i.length!=n.length-1){i.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,c=n.map(function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r});n.forEach(function(t,n){var r=t.cursor,i=s-r.column,u=c[n]-a;i>u?e.insert(r,l.stringRepeat(" ",i-u)):e.remove(new o(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,p=d==h;if(p){var f,g=this.session.getLength();do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&++h<g);do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&--d>0);d<0&&(d=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(d,h);m=this.$reAlignText(m,p),this.session.insert({row:d,column:0},m.join("\n")+"\n"),p||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,o,i=!0,s=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,o=t[3].length,t):(n+r+o!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?c:i?s?function(e){return e[2]?a(n+r-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(o)+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(r-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.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(h.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?this.on("mousedown",s):this.off("mousedown",s)},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 r=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,i=e.getLine(t),s=i.search(o);if(-1!=s){for(var a=n||i.length,l=e.getLength(),c=t,u=t;++t<l;){var d=e.getLine(t).search(o);if(-1!=d){if(d<=s){var h=e.getTokenAt(t,0);if(!h||"string"!==h.type)break}u=t}}if(u>c){var p=e.getLine(u).length;return new r(c,a,u,p)}}},this.openingBracketBlock=function(e,t,n,o,i){var s={row:n,column:o+1},a=e.$findClosingBracket(t,s,i);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),r.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,o,i){var s={row:n,column:o},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,r.fromPoints(a,s)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../range").Range,i=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,o=e.length-1;r<=o;){var i=r+o>>1,s=n(t,e[i]);if(s>0)r=i+1;else{if(!(s<0))return i;o=i-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var s=r[i];if(s&&n){if(s.row===t){do{s=r[i+=n]}while(s&&s.row===t);if(!s)return r.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=r[i+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var d=u[0];s.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,s.row=d.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={displayText:[i("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=h.el.appendChild(r.createElement("div")),f=h.el.appendChild(r.createElement("div"));f.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach(function(e,t){p.appendChild(r.createTextNode(e)),t<c.displayText.length-1&&p.appendChild(r.createElement("br"))}),p.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","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","ace/loader_build"],function(e,t,n){"use strict";e("./loader_build")(t);var r=e("./lib/dom"),o=e("./range").Range,i=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=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.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof i)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=r.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),u=new i(new l(e),c,n),d={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(d.textarea=a),u.on("destroy",function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=o,t.Editor=i,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l;var c=t.config.version;t.version=c}),ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var r in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(r)&&(n.ace[r]=t[r]);n.ace.default=n.ace,e&&(e.exports=n.ace)})},980(e,t,n){var r=n(9344),o=n(4033);function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},981(e,t,n){var r=n(5251),o=n(2060),i=n(2865),s=n(5948);e.exports=function(e,t,n){var a=t+"";return i(e,o(a,s(r(a),n)))}},1020(e,t,n){"use strict";var r=n(1594),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},1033(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042(e,t,n){var r=n(6110)(Object,"create");e.exports=r},1063(e,t,n){"use strict";var r=n(1594),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a(function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})},[e,n,t]),s(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},1089(e,t,n){"use strict";n.d(t,{A:()=>l});var r={value:()=>{}};function o(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new i(r)}function i(e){this._=e}function s(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function a(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=r,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}i.prototype=o.prototype={constructor:i,on:function(e,t){var n,r,o=this._,i=(r=o,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),l=-1,c=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l<c;)if(n=(e=i[l]).type)o[n]=a(o[n],e.name,t);else if(null==t)for(n in o)o[n]=a(o[n],e.name,null);return this}for(;++l<c;)if((n=(e=i[l]).type)&&(n=s(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new i(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};const l=o},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1175(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1287(e){e.exports=function(e){return e.placeholder}},1380(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1420(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1459(e){e.exports=function(e){return this.__data__.has(e)}},1468(e,t,n){"use strict";n.d(t,{Kq:()=>p,Nk:()=>m,iI:()=>y,jO:()=>w});var r=n(1594),o=n(3428);var i={notify(){},get:()=>[]};var s=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),a=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),l=(()=>s||a?r.useLayoutEffect:r.useEffect)();Object.defineProperty,Object.getOwnPropertyNames,Object.getOwnPropertySymbols,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.prototype;var c=Symbol.for("react-redux-context"),u="undefined"!=typeof globalThis?globalThis:{};function d(){if(!r.createContext)return{};const e=u[c]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var h=d(),p=function(e){const{children:t,context:n,serverState:o,store:s}=e,a=r.useMemo(()=>{const e=function(e,t){let n,r=i,o=0,s=!1;function a(){u.onStateChange&&u.onStateChange()}function l(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function c(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=i)}const u={addNestedSub:function(e){l();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return s},trySubscribe:function(){s||(s=!0,l())},tryUnsubscribe:function(){s&&(s=!1,c())},getListeners:()=>r};return u}(s);return{store:s,subscription:e,getServerState:o?()=>o:void 0}},[s,o]),c=r.useMemo(()=>s.getState(),[s]);l(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),c!==s.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,c]);const u=n||h;return r.createElement(u.Provider,{value:a},t)};function f(e=h){return function(){return r.useContext(e)}}var g=f();function m(e=h){const t=e===h?g:f(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var v=m();function y(e=h){const t=e===h?v:m(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var b=(e,t)=>e===t;function w(e=h){const t=e===h?g:f(e),n=(e,n={})=>{const{equalityFn:i=b}="function"==typeof n?{equalityFn:n}:n,s=t(),{store:a,subscription:l,getServerState:c}=s,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,u,i);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}},1489(e,t,n){var r=n(7400);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},1549(e,t,n){var r=n(2032),o=n(3862),i=n(6721),s=n(2749),a=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},1572(e,t){"use strict";function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0;r<t.length;r++){var o=t[r];if(e===o||n(o)&&o.test(e))return!0}return!1},e.exports=t.default,e.exports.default=t.default},1596(e){var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,s=e.length,a=r.length,l=-1,c=n.length,u=t(s-a,0),d=Array(c+u),h=!o;++l<c;)d[l]=n[l];for(;++i<a;)(h||i<s)&&(d[r[i]]=e[i]);for(;u--;)d[l++]=e[i++];return d}},1601(e){"use strict";e.exports=function(e){return e[1]}},1707(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4011),o=n(8306);const i=({path:e,url:t,...n},o)=>({...n,url:t&&(0,r.addQueryArgs)(t,o),path:e&&(0,r.addQueryArgs)(e,o)}),s=e=>e.json?e.json():Promise.reject(e),a=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},l=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await(0,o.A)({...i(e,{per_page:100}),parse:!1}),r=await s(n);if(!Array.isArray(r))return r;let l=a(n);if(!l)return r;let c=[].concat(r);for(;l;){const t=await(0,o.A)({...e,path:void 0,url:l,parse:!1}),n=await s(t);c=c.concat(n),l=a(t)}return c}},1733(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1769(e,t,n){var r=n(6449),o=n(8586),i=n(1802),s=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(s(e))}},1799(e,t,n){var r=n(7217),o=n(270);e.exports=function(e,t,n,i){var s=n.length,a=s,l=!i;if(null==e)return!a;for(e=Object(e);s--;){var c=n[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=n[s])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(i)var f=i(d,h,u,e,t,p);if(!(void 0===f?o(h,d,3,i,p):f))return!1}}return!0}},1800(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1802(e,t,n){var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t});e.exports=s},1811(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1826(e,t,n){"use strict";n.d(t,{ne:()=>i,nr:()=>o});var r=n(8306);function o(e){return{type:"API_FETCH",request:e}}n(7562);const i={AWAIT_PROMISE:({promise:e})=>e,API_FETCH:({request:e})=>(0,r.A)(e)}},1842(e,t,n){var r=n(2819),o=n(9325);e.exports=function(e,t,n){var i=1&t,s=r(e);return function t(){return(this&&this!==o&&this instanceof t?s:e).apply(i?n:this,arguments)}}},1873(e,t,n){var r=n(9325).Symbol;e.exports=r},1882(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1932(e,t,n){"use strict";n.d(t,{Qx:()=>l,a6:()=>c,jM:()=>V});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),i=Symbol.for("immer-state");function s(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var a=Object.getPrototypeOf;function l(e){return!!e&&!!e[i]}function c(e){return!!e&&(d(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||m(e)||v(e))}var u=Object.prototype.constructor.toString();function d(e){if(!e||"object"!=typeof e)return!1;const t=a(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===u}function h(e,t){0===p(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function p(e){const t=e[i];return t?t.type_:Array.isArray(e)?1:m(e)?2:v(e)?3:0}function f(e,t){return 2===p(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g(e,t,n){const r=p(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function m(e){return e instanceof Map}function v(e){return e instanceof Set}function y(e){return e.copy_||e.base_}function b(e,t){if(m(e))return new Map(e);if(v(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=d(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[i];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(a(e),t)}{const t=a(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function w(e,t=!1){return S(e)||l(e)||!c(e)||(p(e)>1&&(e.set=e.add=e.clear=e.delete=x),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>w(t,!0))),e}function x(){s(2)}function S(e){return Object.isFrozen(e)}var C,_={};function $(e){const t=_[e];return t||s(0),t}function k(){return C}function A(e,t){t&&($("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function M(e){E(e),e.drafts_.forEach(T),e.drafts_=null}function E(e){e===C&&(C=e.parent_)}function R(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function T(e){const t=e[i];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function L(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[i].modified_&&(M(t),s(4)),c(e)&&(e=N(t,e),t.parent_||I(t,e)),t.patches_&&$("Patches").generateReplacementPatches_(n[i].base_,e,t.patches_,t.inversePatches_)):e=N(t,n,[]),M(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function N(e,t,n){if(S(t))return t;const r=t[i];if(!r)return h(t,(o,i)=>O(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return I(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),h(o,(o,s)=>O(e,r,t,o,s,n,i)),I(e,t,!1),n&&e.patches_&&$("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function O(e,t,n,r,o,i,s){if(l(o)){const s=N(e,o,i&&t&&3!==t.type_&&!f(t.assigned_,r)?i.concat(r):void 0);if(g(n,r,s),!l(s))return;e.canAutoFreeze_=!1}else s&&n.add(o);if(c(o)&&!S(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;N(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||I(e,o)}}function I(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&w(t,n)}var D={get(e,t){if(t===i)return e;const n=y(e);if(!f(n,t))return function(e,t,n){const r=z(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!c(r)?r:r===j(e.base_,t)?(B(e),e.copy_[t]=H(r,e)):r},has:(e,t)=>t in y(e),ownKeys:e=>Reflect.ownKeys(y(e)),set(e,t,n){const r=z(y(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=j(y(e),t),a=r?.[i];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(s=r)?0!==o||1/o==1/s:o!=o&&s!=s)&&(void 0!==n||f(e.base_,t)))return!0;B(e),F(e)}var o,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==j(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,B(e),F(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=y(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){s(11)},getPrototypeOf:e=>a(e.base_),setPrototypeOf(){s(12)}},P={};function j(e,t){const n=e[i];return(n?y(n):e)[t]}function z(e,t){if(!(t in e))return;let n=a(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=a(n)}}function F(e){e.modified_||(e.modified_=!0,e.parent_&&F(e.parent_))}function B(e){e.copy_||(e.copy_=b(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function H(e,t){const n=m(e)?$("MapSet").proxyMap_(e,t):v(e)?$("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:k(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=D;n&&(o=[r],i=P);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}(e,t);return(t?t.scope_:k()).drafts_.push(n),n}function W(e){if(!c(e)||S(e))return e;const t=e[i];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=b(e,t.scope_.immer_.useStrictShallowCopy_)}else n=b(e,!0);return h(n,(e,t)=>{g(n,e,W(t))}),t&&(t.finalized_=!1),n}h(D,(e,t)=>{P[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),P.deleteProperty=function(e,t){return P.set.call(this,e,t,void 0)},P.set=function(e,t,n){return D.set.call(this,e[0],t,n,e[0])};var G=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let o;if("function"!=typeof t&&s(6),void 0!==n&&"function"!=typeof n&&s(7),c(e)){const r=R(this),i=H(e,void 0);let s=!0;try{o=t(i),s=!1}finally{s?M(r):E(r)}return A(r,n),L(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&w(o,!0),n){const t=[],r=[];$("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}s(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;c(e)||s(8),l(e)&&(l(t=e)||s(10),e=W(t));const n=R(this),r=H(e,void 0);return r[i].isManual_=!0,E(n),r}finishDraft(e,t){const n=e&&e[i];n&&n.isManual_||s(9);const{scope_:r}=n;return A(r,t),L(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=$("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,e=>r(e,t))}},V=G.produce;G.produceWithPatches.bind(G),G.setAutoFreeze.bind(G),G.setUseStrictShallowCopy.bind(G),G.applyPatches.bind(G),G.createDraft.bind(G),G.finishDraft.bind(G)},1965(e,t,n){"use strict";n.d(t,{WK:()=>ke,fA:()=>Ae,Du:()=>Oe,dq:()=>Se});var r={};n.r(r),n.d(r,{setIsMatching:()=>x});var o={};n.r(o),n.d(o,{isViewportMatch:()=>S});var i={};n.r(i),n.d(i,{set:()=>A,setDefaults:()=>M,setPersistenceLayer:()=>E,toggle:()=>k});var s={};n.r(s),n.d(s,{get:()=>L});var a={};n.r(a),n.d(a,{closeModal:()=>ie,disableComplementaryArea:()=>Z,enableComplementaryArea:()=>Q,openModal:()=>oe,pinItem:()=>J,setDefaultComplementaryArea:()=>X,setFeatureDefaults:()=>re,setFeatureValue:()=>ne,toggleFeature:()=>te,unpinItem:()=>ee});var l={};n.r(l),n.d(l,{getActiveComplementaryArea:()=>se,isComplementaryAreaLoading:()=>ae,isFeatureActive:()=>ce,isItemPinned:()=>le,isModalActive:()=>ue});var c=n(4164),u=n(2214),d=n(7562),h=n(2470),p=n(1386),f=n(4848);const g=e=>(0,p.createElement)("path",e),m=(0,p.forwardRef)(({className:e,isPressed:t,...n},r)=>{const o={...n,className:(0,c.A)(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,f.jsx)("svg",{...o,ref:r})});m.displayName="SVG";const v=(0,f.jsx)(m,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(g,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),y=(0,f.jsx)(m,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(g,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),b=(0,f.jsx)(m,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(g,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})}),w=(e,t,n)=>{let r,o,i,s,a,l=0,c=0,u=!1,d=!1,h=!0;function p(t){const n=r,s=o;return r=void 0,o=void 0,c=t,i=e.apply(s,n),i}function f(e,t){s=setTimeout(e,t)}function g(e){return e-(a||0)}function m(e){const n=g(e);return void 0===a||n>=t||n<0||d&&e-c>=l}function v(){const e=Date.now();if(m(e))return b(e);f(v,function(e){const n=g(e),r=e-c,o=t-n;return d?Math.min(o,l-r):o}(e))}function y(){s=void 0}function b(e){return y(),h&&r?p(e):(r=o=void 0,i)}function w(){return void 0!==s}function x(...e){const n=Date.now(),s=m(n);if(r=e,o=this,a=n,s){if(!w())return function(e){return c=e,f(v,t),u?p(e):i}(a);if(d)return f(v,t),p(a)}return w()||f(v,t),i}return n&&(u=!!n.leading,d="maxWait"in n,void 0!==n.maxWait&&(l=Math.max(n.maxWait,t)),h="trailing"in n?!!n.trailing:h),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,y(),r=a=o=void 0},x.flush=function(){return w()?b(Date.now()):i},x.pending=w,x};function x(e){return{type:"SET_IS_MATCHING",values:e}}function S(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const C=(0,d.createReduxStore)("core/viewport",{reducer:function(e={},t){return"SET_IS_MATCHING"===t.type?t.values:e},actions:r,selectors:o});(0,d.register)(C);((e,t)=>{const n=w(()=>{const e=Object.fromEntries(o.map(([e,t])=>[e,t.matches]));(0,d.dispatch)(C).setIsMatching(e)},0,{leading:!0}),r=Object.entries(t),o=Object.entries(e).flatMap(([e,t])=>r.map(([r,o])=>{const i=window.matchMedia(`(${o}: ${t}px)`);return i.addEventListener("change",n),[`${r} ${e}`,i]}));window.addEventListener("orientationchange",n),n(),n.flush()})({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"});const _=function(){let e;return(t,n)=>{if("SET_PERSISTENCE_LAYER"===n.type){const{persistenceLayer:t,persistedData:r}=n;return e=t,r}const r=((e={},t)=>{if("SET_PREFERENCE_VALUE"===t.type){const{scope:n,name:r,value:o}=t;return{...e,[n]:{...e[n],[r]:o}}}return e})(t,n);return"SET_PREFERENCE_VALUE"===n.type&&e?.set(r),r}}(),$=(0,d.combineReducers)({defaults:function(e={},t){if("SET_PREFERENCE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return{...e,[n]:{...e[n],...r}}}return e},preferences:_});function k(e,t){return function({select:n,dispatch:r}){const o=n.get(e,t);r.set(e,t,!o)}}function A(e,t,n){return{type:"SET_PREFERENCE_VALUE",scope:e,name:t,value:n}}function M(e,t){return{type:"SET_PREFERENCE_DEFAULTS",scope:e,defaults:t}}async function E(e){const t=await e.get();return{type:"SET_PERSISTENCE_LAYER",persistenceLayer:e,persistedData:t}}var R=n(8566);const T=Object.create(null),L=(N=(e,t,n)=>{const r=e.preferences[t]?.[n];return void 0!==r?r:e.defaults[t]?.[n]},(e,t,n)=>["allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","hiddenBlockTypes","inactivePanels","keepCaretInsideBlock","mostUsedBlocks","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","isComplementaryAreaVisible","pinnedItems"].includes(n)&&["core/edit-post","core/edit-site"].includes(t)?(function(e,t={}){const{since:n,version:r,alternative:o,plugin:i,link:s,hint:a}=t,l=`${e} is deprecated${n?` since version ${n}`:""}${r?` and will be removed${i?` from ${i}`:""} in version ${r}`:""}.${o?` Please use ${o} instead.`:""}${s?` See: ${s}`:""}${a?` Note: ${a}`:""}`;l in T||((0,R.doAction)("deprecated",e,t,l),console.warn(l),T[l]=!0)}(`wp.data.select( 'core/preferences' ).get( '${t}', '${n}' )`,{since:"6.5",alternative:`wp.data.select( 'core/preferences' ).get( 'core', '${n}' )`}),N(e,"core",n)):N(e,t,n));var N;const O=(0,d.createReduxStore)("core/preferences",{reducer:$,actions:i,selectors:s});(0,d.register)(O);const I=new Map;function D(e){const t=(0,p.useMemo)(()=>{const t=function(e){if(!e)return null;let t=I.get(e);return t||("undefined"!=typeof window&&"function"==typeof window.matchMedia?(t=window.matchMedia(e),I.set(e,t),t):null)}(e);return{subscribe:e=>t?(t.addEventListener?.("change",e),()=>{t.removeEventListener?.("change",e)}):()=>{},getValue(){var e;return null!==(e=t?.matches)&&void 0!==e&&e}}},[e]);return(0,p.useSyncExternalStore)(t.subscribe,t.getValue,()=>!1)}const P=()=>D("(prefers-reduced-motion: reduce)"),j={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},z={">=":"min-width","<":"max-width"},F={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},B=(0,p.createContext)(null),H=(e,t=">=")=>{const n=(0,p.useContext)(B),r=D(!n&&`(${z[t]}: ${j[e]}px)`||void 0);return n?F[t](j[e],n):r};H.__experimentalWidthProvider=B.Provider;const W=H;function G(e){const t=(0,p.useRef)();return(0,p.useEffect)(()=>{t.current=e},[e]),t.current}const V=(0,f.jsx)(m,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(g,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),U=Object.create(null);function q(e,t={}){const{since:n,version:r,alternative:o,plugin:i,link:s,hint:a}=t,l=`${e} is deprecated${n?` since version ${n}`:""}${r?` and will be removed${i?` from ${i}`:""} in version ${r}`:""}.${o?` Please use ${o} instead.`:""}${s?` See: ${s}`:""}${a?` Note: ${a}`:""}`;l in U||((0,R.doAction)("deprecated",e,t,l),console.warn(l),U[l]=!0)}function K(e){return["core/edit-post","core/edit-site"].includes(e)?(q(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Y(e,t){return"core"===e&&"edit-site/template"===t?(q("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):"core"===e&&"edit-site/block-inspector"===t?(q("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}const X=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e=K(e),area:t=Y(e,t)}),Q=(e,t)=>({registry:n,dispatch:r})=>{t&&(e=K(e),t=Y(e,t),n.select(O).get(e,"isComplementaryAreaVisible")||n.dispatch(O).set(e,"isComplementaryAreaVisible",!0),r({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t}))},Z=e=>({registry:t})=>{e=K(e),t.select(O).get(e,"isComplementaryAreaVisible")&&t.dispatch(O).set(e,"isComplementaryAreaVisible",!1)},J=(e,t)=>({registry:n})=>{if(!t)return;e=K(e),t=Y(e,t);const r=n.select(O).get(e,"pinnedItems");!0!==r?.[t]&&n.dispatch(O).set(e,"pinnedItems",{...r,[t]:!0})},ee=(e,t)=>({registry:n})=>{if(!t)return;e=K(e),t=Y(e,t);const r=n.select(O).get(e,"pinnedItems");n.dispatch(O).set(e,"pinnedItems",{...r,[t]:!1})};function te(e,t){return function({registry:n}){q("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(O).toggle(e,t)}}function ne(e,t,n){return function({registry:r}){q("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),r.dispatch(O).set(e,t,!!n)}}function re(e,t){return function({registry:n}){q("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(O).setDefaults(e,t)}}function oe(e){return{type:"OPEN_MODAL",name:e}}function ie(){return{type:"CLOSE_MODAL"}}const se=(0,d.createRegistrySelector)(e=>(t,n)=>{n=K(n);const r=e(O).get(n,"isComplementaryAreaVisible");if(void 0!==r)return!1===r?null:t?.complementaryAreas?.[n]}),ae=(0,d.createRegistrySelector)(e=>(t,n)=>{n=K(n);const r=e(O).get(n,"isComplementaryAreaVisible"),o=t?.complementaryAreas?.[n];return r&&void 0===o}),le=(0,d.createRegistrySelector)(e=>(t,n,r)=>{var o;r=Y(n=K(n),r);const i=e(O).get(n,"pinnedItems");return null===(o=i?.[r])||void 0===o||o}),ce=(0,d.createRegistrySelector)(e=>(t,n,r)=>(q("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(O).get(n,r)));function ue(e,t){return e.activeModal===t}const de=(0,d.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return e[n]?e:{...e,[n]:r}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return{...e,[n]:r}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}}),he=(0,d.createReduxStore)("core/interface",{reducer:de,actions:a,selectors:l});(0,d.register)(he);const pe=(0,n(9986).withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})),fe=pe(function({as:e=u.Button,scope:t,identifier:n,icon:r,selectedIcon:o,name:i,...s}){const a=e,l=(0,d.useSelect)(e=>e(he).getActiveComplementaryArea(t)===n,[n,t]),{enableComplementaryArea:c,disableComplementaryArea:h}=(0,d.useDispatch)(he);return(0,f.jsx)(a,{icon:o&&l?o:r,"aria-controls":n.replace("/",":"),onClick:()=>{l?h(t):c(t,n)},...s})}),ge=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:r})=>{const o=(0,f.jsx)(fe,{icon:V,...r});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:"components-panel__header interface-complementary-area-header__small",children:[e&&(0,f.jsx)("h2",{className:"interface-complementary-area-header__small-title",children:e}),o]}),(0,f.jsxs)("div",{className:(0,c.A)("components-panel__header","interface-complementary-area-header",n),tabIndex:-1,children:[t,o]})]})},me=()=>{};function ve({name:e,as:t=u.Button,onClick:n,...r}){return(0,f.jsx)(u.Fill,{name:e,children:({onClick:e})=>(0,f.jsx)(t,{onClick:n||e?(...t)=>{(n||me)(...t),(e||me)(...t)}:void 0,...r})})}ve.Slot=function({name:e,as:t=u.ButtonGroup,fillProps:n={},bubblesVirtually:r,...o}){return(0,f.jsx)(u.Slot,{name:e,bubblesVirtually:r,fillProps:n,children:e=>{if(!p.Children.toArray(e).length)return null;const n=[];p.Children.forEach(e,({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)});const r=p.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e);return(0,f.jsx)(t,{...o,children:r})}})};const ye=ve,be=({__unstableExplicitMenuItem:e,__unstableTarget:t,...n})=>(0,f.jsx)(u.MenuItem,{...n});function we({scope:e,target:t,__unstableExplicitMenuItem:n,...r}){return(0,f.jsx)(fe,{as:r=>(0,f.jsx)(ye,{__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:be,name:`${e}/plugin-more-menu`,...r}),role:"menuitemcheckbox",selectedIcon:v,name:t,scope:e,...r})}function xe({scope:e,...t}){return(0,f.jsx)(u.Fill,{name:`PinnedItems/${e}`,...t})}xe.Slot=function({scope:e,className:t,...n}){return(0,f.jsx)(u.Slot,{name:`PinnedItems/${e}`,...n,children:e=>e?.length>0&&(0,f.jsx)("div",{className:(0,c.A)(t,"interface-pinned-items"),children:e})})};const Se=xe,Ce={open:{width:280},closed:{width:0},mobileOpen:{width:"100vw"}};function _e({activeArea:e,isActive:t,scope:n,children:r,className:o,id:i}){const s=P(),a=W("medium","<"),l=G(e),c=G(t),[,d]=(0,p.useState)({});(0,p.useEffect)(()=>{d({})},[t]);const h={type:"tween",duration:s||a||l&&e&&e!==l?0:.3,ease:[.6,0,.4,1]};return(0,f.jsx)(u.Fill,{name:`ComplementaryArea/${n}`,children:(0,f.jsx)(u.__unstableAnimatePresence,{initial:!1,children:(c||t)&&(0,f.jsx)(u.__unstableMotion.div,{variants:Ce,initial:"closed",animate:a?"mobileOpen":"open",exit:"closed",transition:h,className:"interface-complementary-area__fill",children:(0,f.jsx)("div",{id:i,className:o,style:{width:a?"100vw":280},children:r})})})})}const $e=pe(function({children:e,className:t,closeLabel:n=(0,h.__)("Close plugin"),identifier:r,header:o,headerClassName:i,icon:s,isPinnable:a=!0,panelClassName:l,scope:g,name:m,smallScreenTitle:w,title:x,toggleShortcut:S,isActiveByDefault:_}){const[$,k]=(0,p.useState)(!1),{isLoading:A,isActive:M,isPinned:E,activeArea:R,isSmall:T,isLarge:L,showIconLabels:N}=(0,d.useSelect)(e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:n,isItemPinned:o}=e(he),{get:i}=e(O),s=t(g);return{isLoading:n(g),isActive:s===r,isPinned:o(g,r),activeArea:s,isSmall:e(C).isViewportMatch("< medium"),isLarge:e(C).isViewportMatch("large"),showIconLabels:i("core","showIconLabels")}},[r,g]);!function(e,t,n,r,o){const i=(0,p.useRef)(!1),s=(0,p.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,d.useDispatch)(he);(0,p.useEffect)(()=>{r&&o&&!i.current?(l(e),s.current=!0):s.current&&!o&&i.current?(s.current=!1,a(e,t)):s.current&&n&&n!==t&&(s.current=!1),o!==i.current&&(i.current=o)},[r,o,e,t,n,l,a])}(g,r,R,M,T);const{enableComplementaryArea:I,disableComplementaryArea:D,pinItem:P,unpinItem:j}=(0,d.useDispatch)(he);if((0,p.useEffect)(()=>{_&&void 0===R&&!T?I(g,r):void 0===R&&T&&D(g,r),k(!0)},[R,_,g,r,T,I,D]),$)return(0,f.jsxs)(f.Fragment,{children:[a&&(0,f.jsx)(Se,{scope:g,children:E&&(0,f.jsx)(fe,{scope:g,identifier:r,isPressed:M&&(!N||L),"aria-expanded":M,"aria-disabled":A,label:x,icon:N?v:s,showTooltip:!N,variant:N?"tertiary":void 0,size:"compact"})}),m&&a&&(0,f.jsx)(we,{target:m,scope:g,icon:s,children:x}),(0,f.jsxs)(_e,{activeArea:R,isActive:M,className:(0,c.A)("interface-complementary-area",t),scope:g,id:r.replace("/",":"),children:[(0,f.jsx)(ge,{className:i,closeLabel:n,onClose:()=>D(g),smallScreenTitle:w,toggleButtonProps:{label:n,size:"small",shortcut:S,scope:g,identifier:r},children:o||(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h2",{className:"interface-complementary-area-header__title",children:x}),a&&(0,f.jsx)(u.Button,{className:"interface-complementary-area__pin-unpin-item",icon:E?y:b,label:E?(0,h.__)("Unpin from toolbar"):(0,h.__)("Pin to toolbar"),onClick:()=>(E?j:P)(g,r),isPressed:E,"aria-expanded":E,size:"compact"})]})}),(0,f.jsx)(u.Panel,{className:l,children:e})]})]})});$e.Slot=function({scope:e,...t}){return(0,f.jsx)(u.Slot,{name:`ComplementaryArea/${e}`,...t})};const ke=$e,Ae=({isActive:e})=>((0,p.useEffect)(()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}},[]),(0,p.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),Me=(e,t,n)=>e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0;function Ee(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Re(e){const t=(0,p.useRef)(),n=(0,p.useRef)(!1),r=(0,p.useRef)(!1),o=(0,p.useRef)([]),i=(0,p.useRef)(e);return i.current=e,(0,p.useLayoutEffect)(()=>{!1===r.current&&!0===n.current&&e.forEach((e,n)=>{const r=o.current[n];e!==r&&(Ee(r,null),Ee(e,t.current))}),o.current=e},e),(0,p.useLayoutEffect)(()=>{r.current=!1}),(0,p.useCallback)(e=>{Ee(t,e),r.current=!0,n.current=null!==e;const s=e?i.current:o.current;for(const t of s)Ee(t,e)},[])}function Te({children:e,className:t,ariaLabel:n,as:r="div",...o}){return(0,f.jsx)(r,{className:(0,c.A)("interface-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...o,children:e})}const Le={type:"tween",duration:.25,ease:[.6,0,.4,1]},Ne={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Le,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Le,delay:.8,delayChildren:.8}}},Oe=(0,p.forwardRef)(function({isDistractionFree:e,footer:t,header:n,editorNotices:r,sidebar:o,secondarySidebar:i,content:s,actions:a,labels:l,className:d,enableRegionNavigation:g=!0,shortcuts:m},v){const[y,b]=function(){const{ref:e,width:t,height:n}=function(e={}){const t=e.onResize,n=(0,p.useRef)(void 0);n.current=t;const r=e.round||Math.round,o=(0,p.useRef)(),[i,s]=(0,p.useState)({width:void 0,height:void 0}),a=(0,p.useRef)(!1);(0,p.useEffect)(()=>(a.current=!1,()=>{a.current=!0}),[]);const l=(0,p.useRef)({width:void 0,height:void 0}),c=function(e,t){const n=(0,p.useRef)(null),r=(0,p.useRef)(null),o=(0,p.useRef)(),i=(0,p.useCallback)(()=>{let s=null;n.current?s=n.current:t&&(s=t instanceof HTMLElement?t:t.current),r.current&&r.current.element===s&&r.current.reporter===i||(o.current&&(o.current(),o.current=null),r.current={reporter:i,element:s},s&&(o.current=e(s)))},[t,e]);return(0,p.useEffect)(()=>{i()},[i]),(0,p.useCallback)(e=>{n.current=e,i()},[i])}((0,p.useCallback)(t=>(o.current&&o.current.box===e.box&&o.current.round===r||(o.current={box:e.box,round:r,instance:new ResizeObserver(t=>{const o=t[0];let i="borderBoxSize";i="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize";const c=Me(o,i,"inlineSize"),u=Me(o,i,"blockSize"),d=c?r(c):void 0,h=u?r(u):void 0;if(l.current.width!==d||l.current.height!==h){const e={width:d,height:h};l.current.width=d,l.current.height=h,n.current?n.current(e):a.current||s(e)}})}),o.current.instance.observe(t,{box:e.box}),()=>{o.current&&o.current.instance.unobserve(t)}),[e.box,r]),e.ref);return(0,p.useMemo)(()=>({ref:c,width:i.width,height:i.height}),[c,i?i.width:null,i?i.height:null])}(),r=(0,p.useMemo)(()=>({width:null!=t?t:null,height:null!=n?n:null}),[t,n]);return[(0,f.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1},"aria-hidden":"true",ref:e}),r]}(),w=W("medium","<"),x={type:"tween",duration:P()?0:.25,ease:[.6,0,.4,1]},S=(0,u.__unstableUseNavigateRegions)(m);!function(e){(0,p.useEffect)(()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}("interface-interface-skeleton__html-container");const C={header:(0,h._x)("Header","header landmark area"),body:(0,h.__)("Content"),secondarySidebar:(0,h.__)("Block Library"),sidebar:(0,h.__)("Settings"),actions:(0,h.__)("Publish"),footer:(0,h.__)("Footer"),...l};return(0,f.jsxs)("div",{...g?S:{},ref:Re([v,g?S.ref:void 0]),className:(0,c.A)(d,"interface-interface-skeleton",S.className,!!t&&"has-footer"),children:[(0,f.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,f.jsx)(u.__unstableAnimatePresence,{initial:!1,children:!!n&&(0,f.jsx)(Te,{as:u.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":C.header,initial:e?"distractionFreeHidden":"hidden",whileHover:e?"distractionFreeHover":"visible",animate:e?"distractionFreeDisabled":"visible",exit:e?"distractionFreeHidden":"hidden",variants:Ne,transition:x,children:n})}),e&&(0,f.jsx)("div",{className:"interface-interface-skeleton__header",children:r}),(0,f.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,f.jsx)(u.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,f.jsx)(Te,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:C.secondarySidebar,as:u.__unstableMotion.div,initial:"closed",animate:w?"mobileOpen":"open",exit:"closed",variants:{open:{width:b.width},closed:{width:0},mobileOpen:{width:"100vw"}},transition:x,children:(0,f.jsxs)("div",{style:{position:"absolute",width:w?"100vw":"fit-content",height:"100%",right:0},children:[y,i]})})}),(0,f.jsx)(Te,{className:"interface-interface-skeleton__content",ariaLabel:C.body,children:s}),!!o&&(0,f.jsx)(Te,{className:"interface-interface-skeleton__sidebar",ariaLabel:C.sidebar,children:o}),!!a&&(0,f.jsx)(Te,{className:"interface-interface-skeleton__actions",ariaLabel:C.actions,children:a})]})]}),!!t&&(0,f.jsx)(Te,{className:"interface-interface-skeleton__footer",ariaLabel:C.footer,children:t})]})})},1967(e,t,n){"use strict";n.d(t,{tE:()=>te,rV:()=>ur,h7:()=>Ze,TG:()=>ce,Zk:()=>L,yX:()=>ue,Gc:()=>lr,Ln:()=>er,rN:()=>Te,zW:()=>Xt,_0:()=>Yt,Fp:()=>Se,Mi:()=>V,FB:()=>Me,Cz:()=>Ie,Jo:()=>De,RM:()=>Ae,Hp:()=>Le,p4:()=>fr,bk:()=>pr,VH:()=>Dt,Pj:()=>E,PI:()=>R,PF:()=>dr});var r=n(1594),o=n(6100),i=n(9242);const s=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!=={NODE_ENV:"production"}.MODE&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,o,i);return i},{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:l}=i,c=e=>e;function u(e,t=c,n){const r=l(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return a(r),r}const d=(e,t)=>{const n=(e=>e?s(e):s)(e),r=(e,r=t)=>u(n,e,r);return Object.assign(r,n),r};var h=n(3402),p=n(4232),f=n(183),g=n(9216),m=n(1089),v=n(9274),y=n(5226);const b=e=>()=>e;function w(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function x(e){return!e.ctrlKey&&!e.button}function S(){return this.parentNode}function C(e,t){return null==t?{x:e.x,y:e.y}:t}function _(){return navigator.maxTouchPoints||"ontouchstart"in this}w.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var $=n(5206);const k=(0,r.createContext)(null),A=k.Provider,M="[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001";function E(e,t){const n=(0,r.useContext)(k);if(null===n)throw new Error(M);return u(n,e,t)}const R=()=>{const e=(0,r.useContext)(k);if(null===e)throw new Error(M);return(0,r.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},T=e=>e.userSelectionActive?"none":"all";function L({position:e,children:t,className:n,style:i,...s}){const a=E(T),l=`${e}`.split("-");return r.createElement("div",{className:(0,o.A)(["react-flow__panel",n,...l]),style:{...i,pointerEvents:a},...s},t)}function N({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:r.createElement(L,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},r.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var O=(0,r.memo)(({x:e,y:t,label:n,labelStyle:i={},labelShowBg:s=!0,labelBgStyle:a={},labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:u,className:d,...h})=>{const p=(0,r.useRef)(null),[f,g]=(0,r.useState)({x:0,y:0,width:0,height:0}),m=(0,o.A)(["react-flow__edge-textwrapper",d]);return(0,r.useEffect)(()=>{if(p.current){const e=p.current.getBBox();g({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),void 0!==n&&n?r.createElement("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...h},s&&r.createElement("rect",{width:f.width+2*l[0],x:-l[0],y:-l[1],height:f.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:c,ry:c}),r.createElement("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:p,style:i},n),u):null});const I=e=>({width:e.offsetWidth,height:e.offsetHeight}),D=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),P=(e={x:0,y:0},t)=>({x:D(e.x,t[0][0],t[1][0]),y:D(e.y,t[0][1],t[1][1])}),j=(e,t,n)=>e<t?D(Math.abs(e-t),1,50)/50:e>n?-D(Math.abs(e-n),1,50)/50:0,z=(e,t)=>[20*j(e.x,35,t.width-35),20*j(e.y,35,t.height-35)],F=e=>e.getRootNode?.()||window?.document,B=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),H=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),W=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),G=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),V=(e,t)=>W(B(H(e),H(t))),U=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},q=e=>!isNaN(e)&&isFinite(e),K=Symbol.for("internals"),Y=["Enter"," ","Escape"],X=(e,t)=>{};function Q(e){const t=(e=>"nativeEvent"in e)(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const Z=e=>"clientX"in e,J=(e,t)=>{const n=Z(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},ee=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,te=({id:e,path:t,labelX:n,labelY:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:p,interactionWidth:f=20})=>r.createElement(r.Fragment,null,r.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:h,markerStart:p}),f&&r.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}),i&&q(n)&&q(o)?r.createElement(O,{x:n,y:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null);function ne(e,t,n){return void 0===n?n:r=>{const o=t().edges.find(t=>t.id===e);o&&n(r,{...o})}}function re({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2;return[i,r<t?r+s:r-s,o,s]}function oe({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=.125*e+.375*o+.375*s+.125*n,c=.125*t+.375*i+.375*a+.125*r;return[l,c,Math.abs(l-e),Math.abs(c-t)]}var ie,se,ae,le,ce,ue;function de({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===ue.Left||e===ue.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function he({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:r,targetY:o,targetPosition:i=ue.Top}){const[s,a]=de({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=de({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,h,p]=oe({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:c});return[`M${e},${t} C${s},${a} ${l},${c} ${r},${o}`,u,d,h,p]}te.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(ie||(ie={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(se||(se={})),function(e){e.Partial="partial",e.Full="full"}(ae||(ae={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(le||(le={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(ce||(ce={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(ue||(ue={}));const pe=(0,r.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,sourcePosition:i=ue.Bottom,targetPosition:s=ue.Top,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:f,markerStart:g,interactionWidth:m})=>{const[v,y,b]=he({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:o,targetPosition:s});return r.createElement(te,{path:v,labelX:y,labelY:b,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:f,markerStart:g,interactionWidth:m})});pe.displayName="SimpleBezierEdge";const fe={[ue.Left]:{x:-1,y:0},[ue.Right]:{x:1,y:0},[ue.Top]:{x:0,y:-1},[ue.Bottom]:{x:0,y:1}},ge=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function me({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:r,targetY:o,targetPosition:i=ue.Top,borderRadius:s=5,centerX:a,centerY:l,offset:c=20}){const[u,d,h,p,f]=function({source:e,sourcePosition:t=ue.Bottom,target:n,targetPosition:r=ue.Top,center:o,offset:i}){const s=fe[t],a=fe[r],l={x:e.x+s.x*i,y:e.y+s.y*i},c={x:n.x+a.x*i,y:n.y+a.y*i},u=(({source:e,sourcePosition:t=ue.Bottom,target:n})=>t===ue.Left||t===ue.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1})({source:l,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",h=u[d];let p,f,g=[];const m={x:0,y:0},v={x:0,y:0},[y,b,w,x]=re({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[d]*a[d]===-1){p=o.x??y,f=o.y??b;const e=[{x:p,y:l.y},{x:p,y:c.y}],t=[{x:l.x,y:f},{x:c.x,y:f}];g=s[d]===h?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:l.x,y:c.y}],u=[{x:c.x,y:l.y}];if(g="x"===d?s.x===h?u:o:s.y===h?o:u,t===r){const t=Math.abs(e[d]-n[d]);if(t<=i){const r=Math.min(i-1,i-t);s[d]===h?m[d]=(l[d]>e[d]?-1:1)*r:v[d]=(c[d]>n[d]?-1:1)*r}}if(t!==r){const e="x"===d?"y":"x",t=s[d]===a[e],n=l[e]>c[e],r=l[e]<c[e];(1===s[d]&&(!t&&n||t&&r)||1!==s[d]&&(!t&&r||t&&n))&&(g="x"===d?o:u)}const y={x:l.x+m.x,y:l.y+m.y},b={x:c.x+v.x,y:c.y+v.y};Math.max(Math.abs(y.x-g[0].x),Math.abs(b.x-g[0].x))>=Math.max(Math.abs(y.y-g[0].y),Math.abs(b.y-g[0].y))?(p=(y.x+b.x)/2,f=g[0].y):(p=g[0].x,f=(y.y+b.y)/2)}return[[e,{x:l.x+m.x,y:l.y+m.y},...g,{x:c.x+v.x,y:c.y+v.y},n],p,f,w,x]}({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:c});return[u.reduce((e,t,n)=>{let r="";return r=n>0&&n<u.length-1?function(e,t,n,r){const o=Math.min(ge(e,t)/2,ge(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s)return`L ${i+o*(e.x<n.x?-1:1)},${s}Q ${i},${s} ${i},${s+o*(e.y<n.y?1:-1)}`;const a=e.x<n.x?1:-1;return`L ${i},${s+o*(e.y<n.y?-1:1)}Q ${i},${s} ${i+o*a},${s}`}(u[n-1],t,u[n+1],s):`${0===n?"M":"L"}${t.x} ${t.y}`,e+r},""),d,h,p,f]}const ve=(0,r.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,sourcePosition:h=ue.Bottom,targetPosition:p=ue.Top,markerEnd:f,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,b,w]=me({sourceX:e,sourceY:t,sourcePosition:h,targetX:n,targetY:o,targetPosition:p,borderRadius:m?.borderRadius,offset:m?.offset});return r.createElement(te,{path:y,labelX:b,labelY:w,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:g,interactionWidth:v})});ve.displayName="SmoothStepEdge";const ye=(0,r.memo)(e=>r.createElement(ve,{...e,pathOptions:(0,r.useMemo)(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));ye.displayName="StepEdge";const be=(0,r.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:p,interactionWidth:f})=>{const[g,m,v]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=re({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}({sourceX:e,sourceY:t,targetX:n,targetY:o});return r.createElement(te,{path:g,labelX:m,labelY:v,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:p,interactionWidth:f})});function we(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function xe({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case ue.Left:return[t-we(t-r,i),n];case ue.Right:return[t+we(r-t,i),n];case ue.Top:return[t,n-we(n-o,i)];case ue.Bottom:return[t,n+we(o-n,i)]}}function Se({sourceX:e,sourceY:t,sourcePosition:n=ue.Bottom,targetX:r,targetY:o,targetPosition:i=ue.Top,curvature:s=.25}){const[a,l]=xe({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[c,u]=xe({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[d,h,p,f]=oe({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${r},${o}`,d,h,p,f]}be.displayName="StraightEdge";const Ce=(0,r.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,sourcePosition:i=ue.Bottom,targetPosition:s=ue.Top,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:f,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,b,w]=Se({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:o,targetPosition:s,curvature:m?.curvature});return r.createElement(te,{path:y,labelX:b,labelY:w,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:f,markerStart:g,interactionWidth:v})});Ce.displayName="BezierEdge";const _e=(0,r.createContext)(null),$e=_e.Provider;_e.Consumer;const ke=e=>"id"in e&&!("source"in e)&&!("target"in e),Ae=(e,t,n)=>{if(!ke(e))return[];const r=n.filter(t=>t.source===e.id).map(e=>e.target);return t.filter(e=>r.includes(e.id))},Me=(e,t,n)=>{if(!ke(e))return[];const r=n.filter(t=>t.target===e.id).map(e=>e.source);return t.filter(e=>r.includes(e.id))},Ee=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,Re=(e,t)=>void 0===e?"":"string"==typeof e?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`,Te=(e,t)=>{if(!e.source||!e.target)return t;let n;var r;return n="id"in(r=e)&&"source"in r&&"target"in r?{...e}:{...e,id:Ee(e)},((e,t)=>t.some(t=>!(t.source!==e.source||t.target!==e.target||t.sourceHandle!==e.sourceHandle&&(t.sourceHandle||e.sourceHandle)||t.targetHandle!==e.targetHandle&&(t.targetHandle||e.targetHandle))))(n,t)?t:t.concat(n)},Le=(e,t,n,r={shouldReplaceId:!0})=>(console.warn("[DEPRECATED] `updateEdge` is deprecated. Instead use `reconnectEdge` https://reactflow.dev/api-reference/utils/reconnect-edge"),((e,t,n,r={shouldReplaceId:!0})=>{const{id:o,...i}=e;if(!t.source||!t.target)return n;if(!n.find(e=>e.id===o))return n;const s={...i,id:r.shouldReplaceId?Ee(t):o,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(e=>e.id!==o).concat(s)})(e,t,n,r)),Ne=({x:e,y:t},[n,r,o],i,[s,a])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:s*Math.round(l.x/s),y:a*Math.round(l.y/a)}:l},Oe=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Ie=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},De=(e,t=[0,0])=>{if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce((e,n)=>{const{x:r,y:o}=Ie(n,t).positionAbsolute;return B(e,H({x:r,y:o,width:n.width||0,height:n.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return W(n)},Pe=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1,a=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach(e=>{const{width:t,height:n,selectable:r=!0,hidden:o=!1}=e;if(s&&!r||o)return!1;const{positionAbsolute:u}=Ie(e,a),d={x:u.x,y:u.y,width:t||0,height:n||0},h=U(l,d);(void 0===t||void 0===n||null===t||null===n||i&&h>0||h>=(t||0)*(n||0)||e.dragging)&&c.push(e)}),c},je=(e,t)=>{const n=e.map(e=>e.id);return t.filter(e=>n.includes(e.source)||n.includes(e.target))},ze=(e,t,n,r,o,i=.1)=>{const s=t/(e.width*(1+i)),a=n/(e.height*(1+i)),l=Math.min(s,a),c=D(l,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},Fe=(e,t=0)=>e.transition().duration(t);function Be(e,t,n,r){return(t[n]||[]).reduce((t,o)=>(`${e.id}-${o.id}-${n}`!==r&&t.push({id:o.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+o.x+o.width/2,y:(e.positionAbsolute?.y??0)+o.y+o.height/2}),t),[])}const He={source:null,target:null,sourceHandle:null,targetHandle:null},We=()=>({handleDomNode:null,isValid:!1,connection:He,endHandle:null});function Ge(e,t,n,r,o,i,s){const a="target"===o,l=s.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...We(),handleDomNode:l};if(l){const e=Ve(void 0,l),o=l.getAttribute("data-nodeid"),s=l.getAttribute("data-handleid"),u=l.classList.contains("connectable"),d=l.classList.contains("connectableend"),h={source:a?o:n,sourceHandle:a?s:r,target:a?n:o,targetHandle:a?r:s};c.connection=h,u&&d&&(t===ie.Strict?a&&"source"===e||!a&&"target"===e:o!==n||s!==r)&&(c.endHandle={nodeId:o,handleId:s,type:e},c.isValid=i(h))}return c}function Ve(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Ue(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function qe(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Ke({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:s,isValidConnection:a,edgeUpdaterType:l,onReconnectEnd:c}){const u=F(e.target),{connectionMode:d,domNode:h,autoPanOnConnect:p,connectionRadius:f,onConnectStart:g,panBy:m,getNodes:v,cancelConnection:y}=i();let b,w=0;const{x,y:S}=J(e),C=u?.elementFromPoint(x,S),_=Ve(l,C),$=h?.getBoundingClientRect();if(!$||!_)return;let k,A=J(e,$),M=!1,E=null,R=!1,T=null;const L=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((e,o)=>{if(o[K]){const{handleBounds:i}=o[K];let s=[],a=[];i&&(s=Be(o,i,"source",`${t}-${n}-${r}`),a=Be(o,i,"target",`${t}-${n}-${r}`)),e.push(...s,...a)}return e},[])}({nodes:v(),nodeId:n,handleId:t,handleType:_}),N=()=>{if(!p)return;const[e,t]=z(A,$);m({x:e,y:t}),w=requestAnimationFrame(N)};function O(e){const{transform:r}=i();A=J(e,$);const{handle:l,validHandleResult:c}=function(e,t,n,r,o,i){const{x:s,y:a}=J(e),l=t.elementsFromPoint(s,a).find(e=>e.classList.contains("react-flow__handle"));if(l){const e=l.getAttribute("data-nodeid");if(e){const t=Ve(void 0,l),r=l.getAttribute("data-handleid"),s=i({nodeId:e,id:r,type:t});if(s){const i=o.find(n=>n.nodeId===e&&n.type===t&&n.id===r);return{handle:{id:r,type:t,nodeId:e,x:i?.x||n.x,y:i?.y||n.y},validHandleResult:s}}}}let c=[],u=1/0;if(o.forEach(e=>{const t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){const n=i(e);t<=u&&(t<u?c=[{handle:e,validHandleResult:n}]:t===u&&c.push({handle:e,validHandleResult:n}),u=t)}}),!c.length)return{handle:null,validHandleResult:We()};if(1===c.length)return c[0];const d=c.some(({validHandleResult:e})=>e.isValid),h=c.some(({handle:e})=>"target"===e.type);return c.find(({handle:e,validHandleResult:t})=>h?"target"===e.type:!d||t.isValid)||c[0]}(e,u,Ne(A,r,!1,[1,1]),f,L,e=>Ge(e,d,n,t,o?"target":"source",a,u));if(b=l,M||(N(),M=!0),T=c.handleDomNode,E=c.connection,R=c.isValid,s({connectionPosition:b&&R?Oe({x:b.x,y:b.y},r):A,connectionStatus:qe(!!b,R),connectionEndHandle:c.endHandle}),!b&&!R&&!T)return Ue(k);E.source!==E.target&&T&&(Ue(k),k=T,T.classList.add("connecting","react-flow__handle-connecting"),T.classList.toggle("valid",R),T.classList.toggle("react-flow__handle-valid",R))}function I(e){(b||T)&&E&&R&&r?.(E),i().onConnectEnd?.(e),l&&c?.(e),Ue(k),y(),cancelAnimationFrame(w),M=!1,R=!1,E=null,T=null,u.removeEventListener("mousemove",O),u.removeEventListener("mouseup",I),u.removeEventListener("touchmove",O),u.removeEventListener("touchend",I)}s({connectionPosition:A,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:_,connectionStartHandle:{nodeId:n,handleId:t,type:_},connectionEndHandle:null}),g?.(e,{nodeId:n,handleId:t,handleType:_}),u.addEventListener("mousemove",O),u.addEventListener("mouseup",I),u.addEventListener("touchmove",O),u.addEventListener("touchend",I)}const Ye=()=>!0,Xe=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Qe=(0,r.forwardRef)(({type:e="source",position:t=ue.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:l,onConnect:c,children:u,className:d,onMouseDown:p,onTouchStart:f,...g},m)=>{const v=l||null,y="target"===e,b=R(),w=(0,r.useContext)(_e),{connectOnClick:x,noPanClassName:S}=E(Xe,h.x),{connecting:C,clickConnecting:_}=E(((e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:s}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||i?.nodeId===e&&i?.handleId===t&&i?.type===n,clickConnecting:s?.nodeId===e&&s?.handleId===t&&s?.type===n}})(w,v,e),h.x);w||b.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");const $=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=b.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=b.getState();t(Te(o,e))}n?.(o),c?.(o)},k=e=>{if(!w)return;const t=Z(e);s&&(t&&0===e.button||!t)&&Ke({event:e,handleId:v,nodeId:w,onConnect:$,isTarget:y,getState:b.getState,setState:b.setState,isValidConnection:n||b.getState().isValidConnection||Ye}),t?p?.(e):f?.(e)};return r.createElement("div",{"data-handleid":v,"data-nodeid":w,"data-handlepos":t,"data-id":`${w}-${v}-${e}`,className:(0,o.A)(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",S,d,{source:!y,target:y,connectable:i,connectablestart:s,connectableend:a,connecting:_,connectionindicator:i&&(s&&!C||a&&C)}]),onMouseDown:k,onTouchStart:k,onClick:x?t=>{const{onClickConnectStart:r,onClickConnectEnd:o,connectionClickStartHandle:i,connectionMode:a,isValidConnection:l}=b.getState();if(!w||!i&&!s)return;if(!i)return r?.(t,{nodeId:w,handleId:v,handleType:e}),void b.setState({connectionClickStartHandle:{nodeId:w,type:e,handleId:v}});const c=F(t.target),u=n||l||Ye,{connection:d,isValid:h}=Ge({nodeId:w,id:v,type:e},a,i.nodeId,i.handleId||null,i.type,u,c);h&&$(d),o?.(t),b.setState({connectionClickStartHandle:null})}:void 0,ref:m,...g},u)});Qe.displayName="Handle";var Ze=(0,r.memo)(Qe);const Je=({data:e,isConnectable:t,targetPosition:n=ue.Top,sourcePosition:o=ue.Bottom})=>r.createElement(r.Fragment,null,r.createElement(Ze,{type:"target",position:n,isConnectable:t}),e?.label,r.createElement(Ze,{type:"source",position:o,isConnectable:t}));Je.displayName="DefaultNode";var et=(0,r.memo)(Je);const tt=({data:e,isConnectable:t,sourcePosition:n=ue.Bottom})=>r.createElement(r.Fragment,null,e?.label,r.createElement(Ze,{type:"source",position:n,isConnectable:t}));tt.displayName="InputNode";var nt=(0,r.memo)(tt);const rt=({data:e,isConnectable:t,targetPosition:n=ue.Top})=>r.createElement(r.Fragment,null,r.createElement(Ze,{type:"target",position:n,isConnectable:t}),e?.label);rt.displayName="OutputNode";var ot=(0,r.memo)(rt);const it=()=>null;it.displayName="GroupNode";const st=e=>({selectedNodes:e.getNodes().filter(e=>e.selected),selectedEdges:e.edges.filter(e=>e.selected).map(e=>({...e}))}),at=e=>e.id;function lt(e,t){return(0,h.x)(e.selectedNodes.map(at),t.selectedNodes.map(at))&&(0,h.x)(e.selectedEdges.map(at),t.selectedEdges.map(at))}const ct=(0,r.memo)(({onSelectionChange:e})=>{const t=R(),{selectedNodes:n,selectedEdges:o}=E(st,lt);return(0,r.useEffect)(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChange.forEach(e=>e(r))},[n,o,e]),null});ct.displayName="SelectionListener";const ut=e=>!!e.onSelectionChange;function dt({onSelectionChange:e}){const t=E(ut);return e||t?r.createElement(ct,{onSelectionChange:e}):null}const ht=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function pt(e,t){(0,r.useEffect)(()=>{void 0!==e&&t(e)},[e])}function ft(e,t,n){(0,r.useEffect)(()=>{void 0!==t&&n({[e]:t})},[t])}const gt=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:i,onConnectStart:s,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:p,edgesFocusable:f,edgesUpdatable:g,elevateNodesOnSelect:m,minZoom:v,maxZoom:y,nodeExtent:b,onNodesChange:w,onEdgesChange:x,elementsSelectable:S,connectionMode:C,snapGrid:_,snapToGrid:$,translateExtent:k,connectOnClick:A,defaultEdgeOptions:M,fitView:T,fitViewOptions:L,onNodesDelete:N,onEdgesDelete:O,onNodeDrag:I,onNodeDragStart:D,onNodeDragStop:P,onSelectionDrag:j,onSelectionDragStart:z,onSelectionDragStop:F,noPanClassName:B,nodeOrigin:H,rfId:W,autoPanOnConnect:G,autoPanOnNodeDrag:V,onError:U,connectionRadius:q,isValidConnection:K,nodeDragThreshold:Y})=>{const{setNodes:X,setEdges:Q,setDefaultNodesAndEdges:Z,setMinZoom:J,setMaxZoom:ee,setTranslateExtent:te,setNodeExtent:ne,reset:re}=E(ht,h.x),oe=R();return(0,r.useEffect)(()=>{const e=o?.map(e=>({...e,...M}));return Z(n,e),()=>{re()}},[]),ft("defaultEdgeOptions",M,oe.setState),ft("connectionMode",C,oe.setState),ft("onConnect",i,oe.setState),ft("onConnectStart",s,oe.setState),ft("onConnectEnd",a,oe.setState),ft("onClickConnectStart",l,oe.setState),ft("onClickConnectEnd",c,oe.setState),ft("nodesDraggable",u,oe.setState),ft("nodesConnectable",d,oe.setState),ft("nodesFocusable",p,oe.setState),ft("edgesFocusable",f,oe.setState),ft("edgesUpdatable",g,oe.setState),ft("elementsSelectable",S,oe.setState),ft("elevateNodesOnSelect",m,oe.setState),ft("snapToGrid",$,oe.setState),ft("snapGrid",_,oe.setState),ft("onNodesChange",w,oe.setState),ft("onEdgesChange",x,oe.setState),ft("connectOnClick",A,oe.setState),ft("fitViewOnInit",T,oe.setState),ft("fitViewOnInitOptions",L,oe.setState),ft("onNodesDelete",N,oe.setState),ft("onEdgesDelete",O,oe.setState),ft("onNodeDrag",I,oe.setState),ft("onNodeDragStart",D,oe.setState),ft("onNodeDragStop",P,oe.setState),ft("onSelectionDrag",j,oe.setState),ft("onSelectionDragStart",z,oe.setState),ft("onSelectionDragStop",F,oe.setState),ft("noPanClassName",B,oe.setState),ft("nodeOrigin",H,oe.setState),ft("rfId",W,oe.setState),ft("autoPanOnConnect",G,oe.setState),ft("autoPanOnNodeDrag",V,oe.setState),ft("onError",U,oe.setState),ft("connectionRadius",q,oe.setState),ft("isValidConnection",K,oe.setState),ft("nodeDragThreshold",Y,oe.setState),pt(e,X),pt(t,Q),pt(v,J),pt(y,ee),pt(k,te),pt(b,ne),null},mt={display:"none"},vt={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},yt="react-flow__node-desc",bt="react-flow__edge-desc",wt=e=>e.ariaLiveMessage;function xt({rfId:e}){const t=E(wt);return r.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:vt},t)}function St({rfId:e,disableKeyboardA11y:t}){return r.createElement(r.Fragment,null,r.createElement("div",{id:`${yt}-${e}`,style:mt},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),r.createElement("div",{id:`${bt}-${e}`,style:mt},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&r.createElement(xt,{rfId:e}))}var Ct=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,o]=(0,r.useState)(!1),i=(0,r.useRef)(!1),s=(0,r.useRef)(new Set([])),[a,l]=(0,r.useMemo)(()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.split("+")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,r.useEffect)(()=>{const n="undefined"!=typeof document?document:null,r=t?.target||n;if(null!==e){const e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Q(e))return!1;const n=$t(e.code,l);s.current.add(e[n]),_t(a,s.current,!1)&&(e.preventDefault(),o(!0))},n=e=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Q(e))return!1;const n=$t(e.code,l);_t(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(e[n]),"Meta"===e.key&&s.current.clear(),i.current=!1},c=()=>{s.current.clear(),o(!1)};return r?.addEventListener("keydown",e),r?.addEventListener("keyup",n),window.addEventListener("blur",c),()=>{r?.removeEventListener("keydown",e),r?.removeEventListener("keyup",n),window.removeEventListener("blur",c)}}},[e,o]),n};function _t(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function $t(e,t){return t.includes(e)?"code":"key"}function kt(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),s=Ie(i,r);return kt(i,t,{x:(n.x??0)+s.x,y:(n.y??0)+s.y,z:(i[K]?.z??0)>(n.z??0)?i[K]?.z??0:n.z??0},r)}function At(e,t,n){e.forEach(r=>{const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){const{x:o,y:i,z:s}=kt(r,e,{...r.position,z:r[K]?.z??0},t);r.positionAbsolute={x:o,y:i},r[K].z=s,n?.[r.id]&&(r[K].isParent=!0)}})}function Mt(e,t,n,r){const o=new Map,i={},s=r?1e3:0;return e.forEach(e=>{const n=(q(e.zIndex)?e.zIndex:0)+(e.selected?s:0),r=t.get(e.id),a={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},l=e.parentNode||e.parentId;l&&(i[l]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(a,K,{enumerable:!1,value:{handleBounds:c?void 0:r?.[K]?.handleBounds,z:n}}),o.set(e.id,a)}),At(o,n,i),o}function Et(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:s,d3Zoom:a,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),h=t.initial&&!c&&u;if(a&&l&&(h||!t.initial)){const e=n().filter(e=>{const n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some(t=>t.id===e.id):n}),c=e.every(e=>e.width&&e.height);if(e.length>0&&c){const n=De(e,d),{x:c,y:u,zoom:h}=ze(n,r,o,t.minZoom??i,t.maxZoom??s,t.padding??.1),f=p.GS.translate(c,u).scale(h);return"number"==typeof t.duration&&t.duration>0?a.transform(Fe(l,t.duration),f):a.transform(l,f),!0}}return!1}function Rt(e,t){return e.forEach(e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[K]:n[K],selected:e.selected})}),new Map(t)}function Tt(e,t){return t.map(t=>{const n=e.find(e=>e.id===t.id);return n&&(t.selected=n.selected),t})}function Lt({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:s,onEdgesChange:a,hasDefaultNodes:l,hasDefaultEdges:c}=n();e?.length&&(l&&r({nodeInternals:Rt(e,o)}),s?.(e)),t?.length&&(c&&r({edges:Tt(t,i)}),a?.(t))}const Nt=()=>{},Ot={zoomIn:Nt,zoomOut:Nt,zoomTo:Nt,getZoom:()=>1,setViewport:Nt,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Nt,fitBounds:Nt,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},It=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function Dt(){const e=(()=>{const e=R(),{d3Zoom:t,d3Selection:n}=E(It,h.x);return(0,r.useMemo)(()=>n&&t?{zoomIn:e=>t.scaleBy(Fe(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(Fe(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(Fe(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,s,a]=e.getState().transform,l=p.GS.translate(r.x??i,r.y??s).scale(r.zoom??a);t.transform(Fe(n,o?.duration),l)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>Et(e.getState,t),setCenter:(r,o,i)=>{const{width:s,height:a,maxZoom:l}=e.getState(),c=void 0!==i?.zoom?i.zoom:l,u=s/2-r*c,d=a/2-o*c,h=p.GS.translate(u,d).scale(c);t.transform(Fe(n,i?.duration),h)},fitBounds:(r,o)=>{const{width:i,height:s,minZoom:a,maxZoom:l}=e.getState(),{x:c,y:u,zoom:d}=ze(r,i,s,a,l,o?.padding??.1),h=p.GS.translate(c,u).scale(d);t.transform(Fe(n,o?.duration),h)},project:t=>{const{transform:n,snapToGrid:r,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Ne(t,n,r,o)},screenToFlowPosition:t=>{const{transform:n,snapToGrid:r,snapGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:s,y:a}=i.getBoundingClientRect(),l={x:t.x-s,y:t.y-a};return Ne(l,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Oe(t,n);return{x:s.x+o,y:s.y+i}},viewportInitialized:!0}:Ot,[t,n])})(),t=R(),n=(0,r.useCallback)(()=>t.getState().getNodes().map(e=>({...e})),[]),o=(0,r.useCallback)(e=>t.getState().nodeInternals.get(e),[]),i=(0,r.useCallback)(()=>{const{edges:e=[]}=t.getState();return e.map(e=>({...e}))},[]),s=(0,r.useCallback)(e=>{const{edges:n=[]}=t.getState();return n.find(t=>t.id===e)},[]),a=(0,r.useCallback)(e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),s=n(),a="function"==typeof e?e(s):e;o?r(a):i&&i(0===a.length?s.map(e=>({type:"remove",id:e.id})):a.map(e=>({item:e,type:"reset"})))},[]),l=(0,r.useCallback)(e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:i}=t.getState(),s="function"==typeof e?e(n):e;o?r(s):i&&i(0===s.length?n.map(e=>({type:"remove",id:e.id})):s.map(e=>({item:e,type:"reset"})))},[]),c=(0,r.useCallback)(e=>{const n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:o,hasDefaultNodes:i,onNodesChange:s}=t.getState();i?o([...r(),...n]):s&&s(n.map(e=>({item:e,type:"add"})))},[]),u=(0,r.useCallback)(e=>{const n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:o,hasDefaultEdges:i,onEdgesChange:s}=t.getState();i?o([...r,...n]):s&&s(n.map(e=>({item:e,type:"add"})))},[]),d=(0,r.useCallback)(()=>{const{getNodes:e,edges:n=[],transform:r}=t.getState(),[o,i,s]=r;return{nodes:e().map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:o,y:i,zoom:s}}},[]),f=(0,r.useCallback)(({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:s,hasDefaultEdges:a,onNodesDelete:l,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),h=(e||[]).map(e=>e.id),p=(n||[]).map(e=>e.id),f=o().reduce((e,t)=>{const n=t.parentNode||t.parentId,r=!h.includes(t.id)&&n&&e.find(e=>e.id===n);return("boolean"!=typeof t.deletable||t.deletable)&&(h.includes(t.id)||r)&&e.push(t),e},[]),g=i.filter(e=>"boolean"!=typeof e.deletable||e.deletable),m=g.filter(e=>p.includes(e.id));if(f||m){const e=je(f,g),n=[...m,...e],o=n.reduce((e,t)=>(e.includes(t.id)||e.push(t.id),e),[]);(a||s)&&(a&&t.setState({edges:i.filter(e=>!o.includes(e.id))}),s&&(f.forEach(e=>{r.delete(e.id)}),t.setState({nodeInternals:new Map(r)}))),o.length>0&&(c?.(n),d&&d(o.map(e=>({id:e,type:"remove"})))),f.length>0&&(l?.(f),u)&&u(f.map(e=>({id:e.id,type:"remove"})))}},[]),g=(0,r.useCallback)(e=>{const n=q((r=e).width)&&q(r.height)&&q(r.x)&&q(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);return n||o?[n?e:G(o),o,n]:[null,null,n]},[]),m=(0,r.useCallback)((e,n=!0,r)=>{const[o,i,s]=g(e);return o?(r||t.getState().getNodes()).filter(e=>{if(!(s||e.id!==i.id&&e.positionAbsolute))return!1;const t=G(e),r=U(t,o);return n&&r>0||r>=o.width*o.height}):[]},[]),v=(0,r.useCallback)((e,t,n=!0)=>{const[r]=g(e);if(!r)return!1;const o=U(r,t);return n&&o>0||o>=r.width*r.height},[]);return(0,r.useMemo)(()=>({...e,getNodes:n,getNode:o,getEdges:i,getEdge:s,setNodes:a,setEdges:l,addNodes:c,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:m,isNodeIntersecting:v}),[e,n,o,i,s,a,l,c,u,d,f,m,v])}const Pt={actInsideInputWithModifier:!1},jt={position:"absolute",width:"100%",height:"100%",top:0,left:0},zt=e=>({x:e.x,y:e.y,zoom:e.k}),Ft=(e,t)=>e.target.closest(`.${t}`),Bt=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),Ht=e=>{const t=e.ctrlKey&&ee()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},Wt=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Gt=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:o,zoomOnScroll:i=!0,zoomOnPinch:s=!0,panOnScroll:a=!1,panOnScrollSpeed:l=.5,panOnScrollMode:c=se.Free,zoomOnDoubleClick:u=!0,elementsSelectable:d,panOnDrag:m=!0,defaultViewport:v,translateExtent:y,minZoom:b,maxZoom:w,zoomActivationKeyCode:x,preventScrolling:S=!0,children:C,noWheelClassName:_,noPanClassName:$})=>{const k=(0,r.useRef)(),A=R(),M=(0,r.useRef)(!1),T=(0,r.useRef)(!1),L=(0,r.useRef)(null),N=(0,r.useRef)({x:0,y:0,zoom:0}),{d3Zoom:O,d3Selection:P,d3ZoomHandler:j,userSelectionActive:z}=E(Wt,h.x),F=Ct(x),B=(0,r.useRef)(0),H=(0,r.useRef)(!1),W=(0,r.useRef)();return function(e){const t=R();(0,r.useEffect)(()=>{let n;const r=()=>{if(!e.current)return;const n=I(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004","The React Flow parent container needs a width and a height to render the graph."),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}(L),(0,r.useEffect)(()=>{if(L.current){const e=L.current.getBoundingClientRect(),t=(0,p.s_)().scaleExtent([b,w]).translateExtent(y),n=(0,f.A)(L.current).call(t),r=p.GS.translate(v.x,v.y).scale(D(v.zoom,b,w)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,y);t.transform(n,i),t.wheelDelta(Ht),A.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:L.current.closest(".react-flow")})}},[]),(0,r.useEffect)(()=>{P&&O&&(!a||F||z?void 0!==j&&P.on("wheel.zoom",function(e,t){if(!S&&"wheel"===e.type&&!e.ctrlKey||Ft(e,_))return null;e.preventDefault(),j.call(this,e,t)},{passive:!1}):P.on("wheel.zoom",r=>{if(Ft(r,_))return!1;r.preventDefault(),r.stopImmediatePropagation();const o=P.property("__zoom").k||1;if(r.ctrlKey&&s){const e=(0,g.A)(r),t=Ht(r),n=o*Math.pow(2,t);return void O.scaleTo(P,n,e,r)}const i=1===r.deltaMode?20:1;let a=c===se.Vertical?0:r.deltaX*i,u=c===se.Horizontal?0:r.deltaY*i;!ee()&&r.shiftKey&&c!==se.Vertical&&(a=r.deltaY*i,u=0),O.translateBy(P,-a/o*l,-u/o*l,{internal:!0});const d=zt(P.property("__zoom")),{onViewportChangeStart:h,onViewportChange:p,onViewportChangeEnd:f}=A.getState();clearTimeout(W.current),H.current||(H.current=!0,t?.(r,d),h?.(d)),H.current&&(e?.(r,d),p?.(d),W.current=setTimeout(()=>{n?.(r,d),f?.(d),H.current=!1},150))},{passive:!1}))},[z,a,c,P,O,j,F,s,S,_,t,e,n]),(0,r.useEffect)(()=>{O&&O.on("start",e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;B.current=e.sourceEvent?.button;const{onViewportChangeStart:n}=A.getState(),r=zt(e.transform);M.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&A.setState({paneDragging:!0}),n?.(r),t?.(e.sourceEvent,r)})},[O,t]),(0,r.useEffect)(()=>{O&&(z&&!M.current?O.on("zoom",null):z||O.on("zoom",t=>{const{onViewportChange:n}=A.getState();if(A.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),T.current=!(!o||!Bt(m,B.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=zt(t.transform);n?.(r),e?.(t.sourceEvent,r)}}))},[z,O,e,m,o]),(0,r.useEffect)(()=>{O&&O.on("end",e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=A.getState();if(M.current=!1,A.setState({paneDragging:!1}),o&&Bt(m,B.current??0)&&!T.current&&o(e.sourceEvent),T.current=!1,(n||t)&&(r=N.current,i=e.transform,r.x!==i.x||r.y!==i.y||r.zoom!==i.k)){const r=zt(e.transform);N.current=r,clearTimeout(k.current),k.current=setTimeout(()=>{t?.(r),n?.(e.sourceEvent,r)},a?150:0)}var r,i})},[O,a,m,n,o]),(0,r.useEffect)(()=>{O&&O.filter(e=>{const t=F||i,n=s&&e.ctrlKey;if((!0===m||Array.isArray(m)&&m.includes(1))&&1===e.button&&"mousedown"===e.type&&(Ft(e,"react-flow__node")||Ft(e,"react-flow__edge")))return!0;if(!(m||t||a||u||s))return!1;if(z)return!1;if(!u&&"dblclick"===e.type)return!1;if(Ft(e,_)&&"wheel"===e.type)return!1;if(Ft(e,$)&&("wheel"!==e.type||a&&"wheel"===e.type&&!F))return!1;if(!s&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!a&&!n&&"wheel"===e.type)return!1;if(!m&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(m)&&!m.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(m)&&m.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r})},[z,O,i,s,a,u,m,d,F]),r.createElement("div",{className:"react-flow__renderer",ref:L,style:jt},C)},Vt=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ut(){const{userSelectionActive:e,userSelectionRect:t}=E(Vt,h.x);return e&&t?r.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function qt(e,t){const n=t.parentNode||t.parentId,r=e.find(e=>e.id===n);if(r){const e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style}||{},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){const e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){const e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Kt(e,t){if(e.some(e=>"reset"===e.type))return e.filter(e=>"reset"===e.type).map(e=>e.item);const n=e.filter(e=>"add"===e.type).map(e=>e.item);return t.reduce((t,n)=>{const r=e.filter(e=>e.id===n.id);if(0===r.length)return t.push(n),t;const o={...n};for(const e of r)if(e)switch(e.type){case"select":o.selected=e.selected;break;case"position":void 0!==e.position&&(o.position=e.position),void 0!==e.positionAbsolute&&(o.positionAbsolute=e.positionAbsolute),void 0!==e.dragging&&(o.dragging=e.dragging),o.expandParent&&qt(t,o);break;case"dimensions":void 0!==e.dimensions&&(o.width=e.dimensions.width,o.height=e.dimensions.height),void 0!==e.updateStyle&&(o.style={...o.style||{},...e.dimensions}),"boolean"==typeof e.resizing&&(o.resizing=e.resizing),o.expandParent&&qt(t,o);break;case"remove":return t}return t.push(o),t},n)}function Yt(e,t){return Kt(e,t)}function Xt(e,t){return Kt(e,t)}const Qt=(e,t)=>({id:e,type:"select",selected:t});function Zt(e,t){return e.reduce((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(Qt(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(Qt(n.id,!1))),e},[])}const Jt=(e,t)=>n=>{n.target===t.current&&e?.(n)},en=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),tn=(0,r.memo)(({isSelecting:e,selectionMode:t=ae.Full,panOnDrag:n,onSelectionStart:i,onSelectionEnd:s,onPaneClick:a,onPaneContextMenu:l,onPaneScroll:c,onPaneMouseEnter:u,onPaneMouseMove:d,onPaneMouseLeave:p,children:f})=>{const g=(0,r.useRef)(null),m=R(),v=(0,r.useRef)(0),y=(0,r.useRef)(0),b=(0,r.useRef)(),{userSelectionActive:w,elementsSelectable:x,dragging:S}=E(en,h.x),C=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),v.current=0,y.current=0},_=e=>{a?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},$=c?e=>c(e):void 0,k=x&&(e||w);return r.createElement("div",{className:(0,o.A)(["react-flow__pane",{dragging:S,selection:e}]),onClick:k?void 0:Jt(_,g),onContextMenu:Jt(e=>{Array.isArray(n)&&n?.includes(2)?e.preventDefault():l?.(e)},g),onWheel:Jt($,g),onMouseEnter:k?void 0:u,onMouseDown:k?t=>{const{resetSelectedElements:n,domNode:r}=m.getState();if(b.current=r?.getBoundingClientRect(),!x||!e||0!==t.button||t.target!==g.current||!b.current)return;const{x:o,y:s}=J(t,b.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i?.(t)}:void 0,onMouseMove:k?n=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:s,onNodesChange:a,onEdgesChange:l,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!b.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=J(n,b.current),h=r.startX??0,p=r.startY??0,f={...r,x:d.x<h?d.x:h,y:d.y<p?d.y:p,width:Math.abs(d.x-h),height:Math.abs(d.y-p)},g=u(),w=Pe(o,f,s,t===ae.Partial,!0,c),x=je(w,i).map(e=>e.id),S=w.map(e=>e.id);if(v.current!==S.length){v.current=S.length;const e=Zt(g,S);e.length&&a?.(e)}if(y.current!==x.length){y.current=x.length;const e=Zt(i,x);e.length&&l?.(e)}m.setState({userSelectionRect:f})}:d,onMouseUp:k?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!w&&t&&e.target===g.current&&_?.(e),m.setState({nodesSelectionActive:v.current>0}),C(),s?.(e)}:void 0,onMouseLeave:k?e=>{w&&(m.setState({nodesSelectionActive:v.current>0}),s?.(e)),C()}:p,ref:g,style:jt},f,r.createElement(Ut,null))});function nn(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||nn(r,t))}function rn(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function on(e,t,n,r){return Array.from(e.values()).filter(n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!nn(n,e))&&(n.draggable||t&&void 0===n.draggable)).map(e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent}))}function sn(e,t,n,r,o=[0,0],i){const s=function(e,t){return t&&"parent"!==t?[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]:t}(e,e.extent||r);let a=s;const l=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&l&&"parent"!==e.extent){const t=n.get(l),{x:r,y:i}=Ie(t,o).positionAbsolute;a=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(l&&e.width&&e.height){const t=n.get(l),{x:r,y:i}=Ie(t,o).positionAbsolute;a=t&&q(r)&&q(i)&&q(t.width)&&q(t.height)?[[r+e.width*o[0],i+e.height*o[1]],[r+t.width-e.width+e.width*o[0],i+t.height-e.height+e.height*o[1]]]:a}else i?.("005","Only child nodes can use a parent extent."),a=s;let c={x:0,y:0};if(l){const e=n.get(l);c=Ie(e,o).positionAbsolute}const u=a&&"parent"!==a?P(t,a):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function an({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(e=>({...n.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute}));return[e?r.find(t=>t.id===e):r[0],r]}tn.displayName="Pane";const ln=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),s=t.getBoundingClientRect(),a=s.width*r[0],l=s.height*r[1];return i.map(e=>{const t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-s.left-a)/n,y:(t.top-s.top-l)/n,...I(e)}})};function cn(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function un({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeInternals:a,onError:l}=t.getState(),c=a.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(i({nodes:[c],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])):l?.("012",(e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`)(e))}function dn(e){return(t,n,r)=>e?.(t,r)}function hn({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:s,selectNodesOnDrag:a}){const l=R(),[c,u]=(0,r.useState)(!1),d=(0,r.useRef)([]),h=(0,r.useRef)({x:null,y:null}),p=(0,r.useRef)(0),$=(0,r.useRef)(null),k=(0,r.useRef)({x:0,y:0}),A=(0,r.useRef)(null),M=(0,r.useRef)(!1),E=(0,r.useRef)(!1),T=(0,r.useRef)(!1),L=function(){const e=R();return(0,r.useCallback)(({sourceEvent:t})=>{const{transform:n,snapGrid:r,snapToGrid:o}=e.getState(),i=t.touches?t.touches[0].clientX:t.clientX,s=t.touches?t.touches[0].clientY:t.clientY,a={x:(i-n[0])/n[2],y:(s-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(a.x/r[0]):a.x,ySnapped:o?r[1]*Math.round(a.y/r[1]):a.y,...a}},[])}();return(0,r.useEffect)(()=>{if(e?.current){const r=(0,f.A)(e.current),c=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:o,updateNodePositions:s,nodeExtent:a,snapGrid:c,snapToGrid:p,nodeOrigin:f,onError:g}=l.getState();h.current={x:e,y:t};let m=!1,v={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&a){const e=De(d.current,f);v=H(e)}if(d.current=d.current.map(r=>{const o={x:e-r.distance.x,y:t-r.distance.y};p&&(o.x=c[0]*Math.round(o.x/c[0]),o.y=c[1]*Math.round(o.y/c[1]));const i=[[a[0][0],a[0][1]],[a[1][0],a[1][1]]];d.current.length>1&&a&&!r.extent&&(i[0][0]=r.positionAbsolute.x-v.x+a[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-v.x2+a[1][0],i[0][1]=r.positionAbsolute.y-v.y+a[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-v.y2+a[1][1]);const s=sn(r,o,n,i,f,g);return m=m||r.position.x!==s.position.x||r.position.y!==s.position.y,r.position=s.position,r.positionAbsolute=s.positionAbsolute,r}),!m)return;s(d.current,!0,!0),u(!0);const y=i?r:dn(o);if(y&&A.current){const[e,t]=an({nodeId:i,dragItems:d.current,nodeInternals:n});y(A.current,e,t)}},R=()=>{if(!$.current)return;const[e,t]=z(k.current,$.current);if(0!==e||0!==t){const{transform:n,panBy:r}=l.getState();h.current.x=(h.current.x??0)-e/n[2],h.current.y=(h.current.y??0)-t/n[2],r({x:e,y:t})&&c(h.current)}p.current=requestAnimationFrame(R)},N=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:o,unselectNodesAndEdges:c,onNodeDragStart:u,onSelectionDragStart:p}=l.getState();E.current=!0;const f=i?u:dn(p);a&&s||r||!i||n.get(i)?.selected||c(),i&&s&&a&&un({id:i,store:l,nodeRef:e});const g=L(t);if(h.current=g,d.current=on(n,o,g,i),f&&d.current){const[e,r]=an({nodeId:i,dragItems:d.current,nodeInternals:n});f(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=x,i=S,s=C,a=_,l={},c=(0,m.A)("start","drag","end"),u=0,d=0;function h(e){e.on("mousedown.drag",p).filter(a).on("touchstart.drag",A).on("touchmove.drag",M,y.vr).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&o.call(this,s,a)){var l=R(this,i.call(this,s,a),s,a,"mouse");l&&((0,f.A)(s.view).on("mousemove.drag",$,y.Rw).on("mouseup.drag",k,y.Rw),(0,v.A)(s.view),(0,y.GK)(s),n=!1,e=s.clientX,t=s.clientY,l("start",s))}}function $(r){if((0,y.Ay)(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}l.mouse("drag",r)}function k(e){(0,f.A)(e.view).on("mousemove.drag mouseup.drag",null),(0,v.y)(e.view,n),(0,y.Ay)(e),l.mouse("end",e)}function A(e,t){if(o.call(this,e,t)){var n,r,s=e.changedTouches,a=i.call(this,e,t),l=s.length;for(n=0;n<l;++n)(r=R(this,a,e,t,s[n].identifier,s[n]))&&((0,y.GK)(e),r("start",e,s[n]))}}function M(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&((0,y.Ay)(e),n("drag",e,r[t]))}function E(e){var t,n,o=e.changedTouches,i=o.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<i;++t)(n=l[o[t].identifier])&&((0,y.GK)(e),n("end",e,o[t]))}function R(e,t,n,r,o,i){var a,d,p,f=c.copy(),m=(0,g.A)(i||n,t);if(null!=(p=s.call(e,new w("beforestart",{sourceEvent:n,target:h,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:f}),r)))return a=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,s,c){var v,y=m;switch(i){case"start":l[o]=n,v=u++;break;case"end":delete l[o],--u;case"drag":m=(0,g.A)(c||s,t),v=u}f.call(i,e,new w(i,{sourceEvent:s,subject:p,target:h,identifier:o,active:v,x:m[0]+a,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:f}),r)}}return h.filter=function(e){return arguments.length?(o="function"==typeof e?e:b(!!e),h):o},h.container=function(e){return arguments.length?(i="function"==typeof e?e:b(e),h):i},h.subject=function(e){return arguments.length?(s="function"==typeof e?e:b(e),h):s},h.touchable=function(e){return arguments.length?(a="function"==typeof e?e:b(!!e),h):a},h.on=function(){var e=c.on.apply(c,arguments);return e===c?h:e},h.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,h):Math.sqrt(d)},h}().on("start",e=>{const{domNode:t,nodeDragThreshold:n}=l.getState();0===n&&N(e),T.current=!1;const r=L(e);h.current=r,$.current=t?.getBoundingClientRect()||null,k.current=J(e.sourceEvent,$.current)}).on("drag",e=>{const t=L(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=l.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(T.current=!0),!T.current){if(!M.current&&E.current&&n&&(M.current=!0,R()),!E.current){const n=t.xSnapped-(h?.current?.x??0),o=t.ySnapped-(h?.current?.y??0);Math.sqrt(n*n+o*o)>r&&N(e)}(h.current.x!==t.xSnapped||h.current.y!==t.ySnapped)&&d.current&&E.current&&(A.current=e.sourceEvent,k.current=J(e.sourceEvent,$.current),c(t))}}).on("end",e=>{if(E.current&&!T.current&&(u(!1),M.current=!1,E.current=!1,cancelAnimationFrame(p.current),d.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:o}=l.getState(),s=i?r:dn(o);if(t(d.current,!1,!1),s){const[t,r]=an({nodeId:i,dragItems:d.current,nodeInternals:n});s(e.sourceEvent,t,r)}}}).filter(t=>{const r=t.target;return!t.button&&(!n||!rn(r,`.${n}`,e))&&(!o||rn(r,o,e))});return r.call(t),()=>{r.on(".drag",null)}}r.on(".drag",null)}},[e,t,n,o,s,l,i,a,L]),c}function pn(){const e=R();return(0,r.useCallback)(t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:s,snapGrid:a,onError:l,nodesDraggable:c}=e.getState(),u=i().filter(e=>e.selected&&(e.draggable||c&&void 0===e.draggable)),d=s?a[0]:5,h=s?a[1]:5,p=t.isShiftPressed?4:1,f=t.x*d*p,g=t.y*h*p;o(u.map(e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+f,y:e.positionAbsolute.y+g};s&&(t.x=a[0]*Math.round(t.x/a[0]),t.y=a[1]*Math.round(t.y/a[1]));const{positionAbsolute:o,position:i}=sn(e,t,n,r,void 0,l);e.position=i,e.positionAbsolute=o}return e}),!0,!1)},[])}const fn={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var gn=e=>{const t=({id:t,type:n,data:i,xPos:s,yPos:a,xPosOrigin:l,yPosOrigin:c,selected:u,onClick:d,onMouseEnter:h,onMouseMove:p,onMouseLeave:f,onContextMenu:g,onDoubleClick:m,style:v,className:y,isDraggable:b,isSelectable:w,isConnectable:x,isFocusable:S,selectNodesOnDrag:C,sourcePosition:_,targetPosition:$,hidden:k,resizeObserver:A,dragHandle:M,zIndex:E,isParent:T,noDragClassName:L,noPanClassName:N,initialized:O,disableKeyboardA11y:I,ariaLabel:D,rfId:P,hasHandleBounds:j})=>{const z=R(),F=(0,r.useRef)(null),B=(0,r.useRef)(null),H=(0,r.useRef)(_),W=(0,r.useRef)($),G=(0,r.useRef)(n),V=w||b||d||h||p||f,U=pn(),q=cn(t,z.getState,h),K=cn(t,z.getState,p),X=cn(t,z.getState,f),Z=cn(t,z.getState,g),J=cn(t,z.getState,m);(0,r.useEffect)(()=>()=>{B.current&&(A?.unobserve(B.current),B.current=null)},[]),(0,r.useEffect)(()=>{if(F.current&&!k){const e=F.current;O&&j&&B.current===e||(B.current&&A?.unobserve(B.current),A?.observe(e),B.current=e)}},[k,O,j]),(0,r.useEffect)(()=>{const e=G.current!==n,r=H.current!==_,o=W.current!==$;F.current&&(e||r||o)&&(e&&(G.current=n),r&&(H.current=_),o&&(W.current=$),z.getState().updateNodeDimensions([{id:t,nodeElement:F.current,forceUpdate:!0}]))},[t,n,_,$]);const ee=hn({nodeRef:F,disabled:k||!b,noDragClassName:L,handleSelector:M,nodeId:t,isSelectable:w,selectNodesOnDrag:C});return k?null:r.createElement("div",{className:(0,o.A)(["react-flow__node",`react-flow__node-${n}`,{[N]:b},y,{selected:u,selectable:w,parent:T,dragging:ee}]),ref:F,style:{zIndex:E,transform:`translate(${l}px,${c}px)`,pointerEvents:V?"all":"none",visibility:O?"visible":"hidden",...v},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:q,onMouseMove:K,onMouseLeave:X,onContextMenu:Z,onClick:e=>{const{nodeDragThreshold:n}=z.getState();if(w&&(!C||!b||n>0)&&un({id:t,store:z,nodeRef:F}),d){const n=z.getState().nodeInternals.get(t);n&&d(e,{...n})}},onDoubleClick:J,onKeyDown:S?e=>{if(!Q(e)&&!I)if(Y.includes(e.key)&&w){const n="Escape"===e.key;un({id:t,store:z,unselect:n,nodeRef:F})}else b&&u&&Object.prototype.hasOwnProperty.call(fn,e.key)&&(z.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~a}`}),U({x:fn[e.key].x,y:fn[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":I?void 0:`${yt}-${P}`,"aria-label":D},r.createElement($e,{value:t},r.createElement(e,{id:t,data:i,type:n,xPos:s,yPos:a,selected:u,isConnectable:x,sourcePosition:_,targetPosition:$,dragging:ee,dragHandle:M,zIndex:E})))};return t.displayName="NodeWrapper",(0,r.memo)(t)};const mn=e=>{const t=e.getNodes().filter(e=>e.selected);return{...De(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var vn=(0,r.memo)(function({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=R(),{width:s,height:a,x:l,y:c,transformString:u,userSelectionActive:d}=E(mn,h.x),p=pn(),f=(0,r.useRef)(null);if((0,r.useEffect)(()=>{n||f.current?.focus({preventScroll:!0})},[n]),hn({nodeRef:f}),d||!s||!a)return null;const g=e?t=>{const n=i.getState().getNodes().filter(e=>e.selected);e(t,n)}:void 0;return r.createElement("div",{className:(0,o.A)(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u}},r.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(fn,e.key)&&p({x:fn[e.key].x,y:fn[e.key].y,isShiftPressed:e.shiftKey})},style:{width:s,height:a,top:c,left:l}}))});const yn=e=>e.nodesSelectionActive,bn=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,deleteKeyCode:l,onMove:c,onMoveStart:u,onMoveEnd:d,selectionKeyCode:h,selectionOnDrag:p,selectionMode:f,onSelectionStart:g,onSelectionEnd:m,multiSelectionKeyCode:v,panActivationKeyCode:y,zoomActivationKeyCode:b,elementsSelectable:w,zoomOnScroll:x,zoomOnPinch:S,panOnScroll:C,panOnScrollSpeed:_,panOnScrollMode:$,zoomOnDoubleClick:k,panOnDrag:A,defaultViewport:M,translateExtent:T,minZoom:L,maxZoom:N,preventScrolling:O,onSelectionContextMenu:I,noWheelClassName:D,noPanClassName:P,disableKeyboardA11y:j})=>{const z=E(yn),F=Ct(h),B=Ct(y),H=B||A,W=B||C,G=F||p&&!0!==H;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=R(),{deleteElements:o}=Dt(),i=Ct(e,Pt),s=Ct(t);(0,r.useEffect)(()=>{if(i){const{edges:e,getNodes:t}=n.getState(),r=t().filter(e=>e.selected),i=e.filter(e=>e.selected);o({nodes:r,edges:i}),n.setState({nodesSelectionActive:!1})}},[i]),(0,r.useEffect)(()=>{n.setState({multiSelectionActive:s})},[s])})({deleteKeyCode:l,multiSelectionKeyCode:v}),r.createElement(Gt,{onMove:c,onMoveStart:u,onMoveEnd:d,onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:x,zoomOnPinch:S,panOnScroll:W,panOnScrollSpeed:_,panOnScrollMode:$,zoomOnDoubleClick:k,panOnDrag:!F&&H,defaultViewport:M,translateExtent:T,minZoom:L,maxZoom:N,zoomActivationKeyCode:b,preventScrolling:O,noWheelClassName:D,noPanClassName:P},r.createElement(tn,{onSelectionStart:g,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:H,isSelecting:!!G,selectionMode:f},e,z&&r.createElement(vn,{onSelectionContextMenu:I,noPanClassName:P,disableKeyboardA11y:j})))};bn.displayName="FlowRenderer";var wn=(0,r.memo)(bn);function xn(e){return{input:gn(e.input||nt),default:gn(e.default||et),output:gn(e.output||ot),group:gn(e.group||it),...Object.keys(e).filter(e=>!["input","default","output","group"].includes(e)).reduce((t,n)=>(t[n]=gn(e[n]||et),t),{})}}const Sn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Cn=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,updateNodeDimensions:s,onError:a}=E(Sn,h.x),l=(c=e.onlyRenderVisibleElements,E((0,r.useCallback)(e=>c?Pe(e.nodeInternals,{x:0,y:0,width:e.width,height:e.height},e.transform,!0):e.getNodes(),[c])));var c;const u=(0,r.useRef)(),d=(0,r.useMemo)(()=>{if("undefined"==typeof ResizeObserver)return null;const e=new ResizeObserver(e=>{const t=e.map(e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0}));s(t)});return u.current=e,e},[]);return(0,r.useEffect)(()=>()=>{u?.current?.disconnect()},[]),r.createElement("div",{className:"react-flow__nodes",style:jt},l.map(s=>{let l=s.type||"default";e.nodeTypes[l]||(a?.("003",(e=>`Node type "${e}" not found. Using fallback type "default".`)(l)),l="default");const c=e.nodeTypes[l]||e.nodeTypes.default,u=!!(s.draggable||t&&void 0===s.draggable),h=!!(s.selectable||i&&void 0===s.selectable),p=!!(s.connectable||n&&void 0===s.connectable),f=!!(s.focusable||o&&void 0===s.focusable),g=e.nodeExtent?P(s.positionAbsolute,e.nodeExtent):s.positionAbsolute,m=g?.x??0,v=g?.y??0,y=(({x:e,y:t,width:n,height:r,origin:o})=>n&&r?o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]}:{x:e,y:t})({x:m,y:v,width:s.width??0,height:s.height??0,origin:e.nodeOrigin});return r.createElement(c,{key:s.id,id:s.id,className:s.className,style:s.style,type:l,data:s.data,sourcePosition:s.sourcePosition||ue.Bottom,targetPosition:s.targetPosition||ue.Top,hidden:s.hidden,xPos:m,yPos:v,xPosOrigin:y.x,yPosOrigin:y.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!s.selected,isDraggable:u,isSelectable:h,isConnectable:p,isFocusable:f,resizeObserver:d,dragHandle:s.dragHandle,zIndex:s[K]?.z??0,isParent:!!s[K]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!s.width&&!!s.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:s.ariaLabel,hasHandleBounds:!!s[K]?.handleBounds})}))};Cn.displayName="NodeRenderer";var _n=(0,r.memo)(Cn);const $n=(e,t,n)=>n===ue.Left?e-t:n===ue.Right?e+t:e,kn=(e,t,n)=>n===ue.Top?e-t:n===ue.Bottom?e+t:e,An="react-flow__edgeupdater",Mn=({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:s,onMouseEnter:a,onMouseOut:l,type:c})=>r.createElement("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:l,className:(0,o.A)([An,`${An}-${c}`]),cx:$n(t,i,e),cy:kn(n,i,e),r:i,stroke:"transparent",fill:"transparent"}),En=()=>!0;var Rn=e=>{const t=({id:t,className:n,type:i,data:s,onClick:a,onEdgeDoubleClick:l,selected:c,animated:u,label:d,labelStyle:h,labelShowBg:p,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:m,style:v,source:y,target:b,sourceX:w,sourceY:x,targetX:S,targetY:C,sourcePosition:_,targetPosition:$,elementsSelectable:k,hidden:A,sourceHandleId:M,targetHandleId:E,onContextMenu:T,onMouseEnter:L,onMouseMove:N,onMouseLeave:O,reconnectRadius:I,onReconnect:D,onReconnectStart:P,onReconnectEnd:j,markerEnd:z,markerStart:F,rfId:B,ariaLabel:H,isFocusable:W,isReconnectable:G,pathOptions:V,interactionWidth:U,disableKeyboardA11y:q})=>{const K=(0,r.useRef)(null),[X,Q]=(0,r.useState)(!1),[Z,J]=(0,r.useState)(!1),ee=R(),te=(0,r.useMemo)(()=>`url('#${Re(F,B)}')`,[F,B]),re=(0,r.useMemo)(()=>`url('#${Re(z,B)}')`,[z,B]);if(A)return null;const oe=ne(t,ee.getState,l),ie=ne(t,ee.getState,T),se=ne(t,ee.getState,L),ae=ne(t,ee.getState,N),le=ne(t,ee.getState,O),ce=(e,n)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=ee.getState(),i=n?b:y,s=(n?E:M)||null,a=n?"target":"source",l=o||En,c=n,u=r.find(e=>e.id===t);J(!0),P?.(e,u,a),Ke({event:e,handleId:s,nodeId:i,onConnect:e=>D?.(u,e),isTarget:c,getState:ee.getState,setState:ee.setState,isValidConnection:l,edgeUpdaterType:a,onReconnectEnd:e=>{J(!1),j?.(e,u,a)}})},ue=()=>Q(!0),de=()=>Q(!1),he=!k&&!a;return r.createElement("g",{className:(0,o.A)(["react-flow__edge",`react-flow__edge-${i}`,n,{selected:c,animated:u,inactive:he,updating:X}]),onClick:e=>{const{edges:n,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:i}=ee.getState(),s=n.find(e=>e.id===t);s&&(k&&(ee.setState({nodesSelectionActive:!1}),s.selected&&i?(o({nodes:[],edges:[s]}),K.current?.blur()):r([t])),a&&a(e,s))},onDoubleClick:oe,onContextMenu:ie,onMouseEnter:se,onMouseMove:ae,onMouseLeave:le,onKeyDown:W?e=>{if(!q&&Y.includes(e.key)&&k){const{unselectNodesAndEdges:n,addSelectedEdges:r,edges:o}=ee.getState();"Escape"===e.key?(K.current?.blur(),n({edges:[o.find(e=>e.id===t)]})):r([t])}}:void 0,tabIndex:W?0:void 0,role:W?"button":"img","data-testid":`rf__edge-${t}`,"aria-label":null===H?void 0:H||`Edge from ${y} to ${b}`,"aria-describedby":W?`${bt}-${B}`:void 0,ref:K},!Z&&r.createElement(e,{id:t,source:y,target:b,selected:c,animated:u,label:d,labelStyle:h,labelShowBg:p,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:m,data:s,style:v,sourceX:w,sourceY:x,targetX:S,targetY:C,sourcePosition:_,targetPosition:$,sourceHandleId:M,targetHandleId:E,markerStart:te,markerEnd:re,pathOptions:V,interactionWidth:U}),G&&r.createElement(r.Fragment,null,("source"===G||!0===G)&&r.createElement(Mn,{position:_,centerX:w,centerY:x,radius:I,onMouseDown:e=>ce(e,!0),onMouseEnter:ue,onMouseOut:de,type:"source"}),("target"===G||!0===G)&&r.createElement(Mn,{position:$,centerX:S,centerY:C,radius:I,onMouseDown:e=>ce(e,!1),onMouseEnter:ue,onMouseOut:de,type:"target"})))};return t.displayName="EdgeWrapper",(0,r.memo)(t)};function Tn(e){return{default:Rn(e.default||Ce),straight:Rn(e.bezier||be),step:Rn(e.step||ye),smoothstep:Rn(e.step||ve),simplebezier:Rn(e.simplebezier||pe),...Object.keys(e).filter(e=>!["default","bezier"].includes(e)).reduce((t,n)=>(t[n]=Rn(e[n]||Ce),t),{})}}function Ln(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,i=n?.width||t.width,s=n?.height||t.height;switch(e){case ue.Top:return{x:r+i/2,y:o};case ue.Right:return{x:r+i,y:o+s/2};case ue.Bottom:return{x:r+i/2,y:o+s};case ue.Left:return{x:r,y:o+s/2}}}function Nn(e,t){return e?1!==e.length&&t?t&&e.find(e=>e.id===t)||null:e[0]:null}function On(e){const t=e?.[K]?.handleBounds||null,n=t&&e?.width&&e?.height&&void 0!==e?.positionAbsolute?.x&&void 0!==e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const In=[{level:0,isMaxLevel:!0,edges:[]}];const Dn={[ce.Arrow]:({color:e="none",strokeWidth:t=1})=>r.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[ce.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>r.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Pn=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=function(e){const t=R();return(0,r.useMemo)(()=>Object.prototype.hasOwnProperty.call(Dn,e)?Dn[e]:(t.getState().onError?.("009",(e=>`Marker type "${e}" doesn't exist.`)(e)),null),[e])}(t);return c?r.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0"},r.createElement(c,{color:n,strokeWidth:a})):null},jn=({defaultColor:e,rfId:t})=>{const n=E((0,r.useCallback)((({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((n,o)=>([o.markerStart,o.markerEnd].forEach(o=>{if(o&&"object"==typeof o){const i=Re(o,t);r.includes(i)||(n.push({id:i,color:o.color||e,...o}),r.push(i))}}),n),[]).sort((e,t)=>e.id.localeCompare(t.id))})({defaultColor:e,rfId:t}),[e,t]),(e,t)=>!(e.length!==t.length||e.some((e,n)=>e.id!==t[n].id)));return r.createElement("defs",null,n.map(e=>r.createElement(Pn,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient})))};jn.displayName="MarkerDefinitions";var zn=(0,r.memo)(jn);const Fn=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),Bn=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:i,edgeTypes:s,noPanClassName:a,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:d,onEdgeClick:p,onEdgeDoubleClick:f,onReconnect:g,onReconnectStart:m,onReconnectEnd:v,reconnectRadius:y,children:b,disableKeyboardA11y:w})=>{const{edgesFocusable:x,edgesUpdatable:S,elementsSelectable:C,width:_,height:$,connectionMode:k,nodeInternals:A,onError:M}=E(Fn,h.x),R=function(e,t,n){return function(e,t,n=!1){let r=-1;const o=e.reduce((e,o)=>{const i=q(o.zIndex);let s=i?o.zIndex:0;if(n){const e=t.get(o.target),n=t.get(o.source),r=o.selected||e?.selected||n?.selected,a=Math.max(n?.[K]?.z||0,e?.[K]?.z||0,1e3);s=(i?o.zIndex:0)+(r?a:0)}return e[s]?e[s].push(o):e[s]=[o],r=s>r?s:r,e},{}),i=Object.entries(o).map(([e,t])=>{const n=+e;return{edges:t,level:n,isMaxLevel:n===r}});return 0===i.length?In:i}(E((0,r.useCallback)(n=>e?n.edges.filter(e=>{const r=t.get(e.source),o=t.get(e.target);return r?.width&&r?.height&&o?.width&&o?.height&&function({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:s,height:a,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=H({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:a/l[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),h=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*h)>0}({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:o.width,targetHeight:o.height,width:n.width,height:n.height,transform:n.transform})}):n.edges,[e,t])),t,n)}(t,A,n);return _?r.createElement(r.Fragment,null,R.map(({level:t,edges:n,isMaxLevel:h})=>r.createElement("svg",{key:t,style:{zIndex:t},width:_,height:$,className:"react-flow__edges react-flow__container"},h&&r.createElement(zn,{defaultColor:e,rfId:i}),r.createElement("g",null,n.map(e=>{const[t,n,h]=On(A.get(e.source)),[b,_,$]=On(A.get(e.target));if(!h||!$)return null;let E=e.type||"default";s[E]||(M?.("011",(e=>`Edge type "${e}" not found. Using fallback type "default".`)(E)),E="default");const R=s[E]||s.default,T=k===ie.Strict?_.target:(_.target??[]).concat(_.source??[]),L=Nn(n.source,e.sourceHandle),N=Nn(T,e.targetHandle),O=L?.position||ue.Bottom,I=N?.position||ue.Top,D=!!(e.focusable||x&&void 0===e.focusable),P=e.reconnectable||e.updatable,j=void 0!==g&&(P||S&&void 0===P);if(!L||!N)return M?.("008",((e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`)(L,e)),null;const{sourceX:z,sourceY:F,targetX:B,targetY:H}=((e,t,n,r,o,i)=>{const s=Ln(n,e,t),a=Ln(i,r,o);return{sourceX:s.x,sourceY:s.y,targetX:a.x,targetY:a.y}})(t,L,O,b,N,I);return r.createElement(R,{key:e.id,id:e.id,className:(0,o.A)([e.className,a]),type:E,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:z,sourceY:F,targetX:B,targetY:H,sourcePosition:O,targetPosition:I,elementsSelectable:C,onContextMenu:l,onMouseEnter:c,onMouseMove:u,onMouseLeave:d,onClick:p,onEdgeDoubleClick:f,onReconnect:g,onReconnectStart:m,onReconnectEnd:v,reconnectRadius:y,rfId:i,ariaLabel:e.ariaLabel,isFocusable:D,isReconnectable:j,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:w})})))),b):null};Bn.displayName="EdgeRenderer";var Hn=(0,r.memo)(Bn);const Wn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Gn({children:e}){const t=E(Wn);return r.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}const Vn={[ue.Left]:ue.Right,[ue.Right]:ue.Left,[ue.Top]:ue.Bottom,[ue.Bottom]:ue.Top},Un=({nodeId:e,handleType:t,style:n,type:o=le.Bezier,CustomComponent:i,connectionStatus:s})=>{const{fromNode:a,handleId:l,toX:c,toY:u,connectionMode:d}=E((0,r.useCallback)(t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode}),[e]),h.x),p=a?.[K]?.handleBounds;let f=p?.[t];if(d===ie.Loose&&(f=f||p?.["source"===t?"target":"source"]),!a||!f)return null;const g=l?f.find(e=>e.id===l):f[0],m=g?g.x+g.width/2:(a.width??0)/2,v=g?g.y+g.height/2:a.height??0,y=(a.positionAbsolute?.x??0)+m,b=(a.positionAbsolute?.y??0)+v,w=g?.position,x=w?Vn[w]:null;if(!w||!x)return null;if(i)return r.createElement(i,{connectionLineType:o,connectionLineStyle:n,fromNode:a,fromHandle:g,fromX:y,fromY:b,toX:c,toY:u,fromPosition:w,toPosition:x,connectionStatus:s});let S="";const C={sourceX:y,sourceY:b,sourcePosition:w,targetX:c,targetY:u,targetPosition:x};return o===le.Bezier?[S]=Se(C):o===le.Step?[S]=me({...C,borderRadius:0}):o===le.SmoothStep?[S]=me(C):o===le.SimpleBezier?[S]=he(C):S=`M${y},${b} ${c},${u}`,r.createElement("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};Un.displayName="ConnectionLine";const qn=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Kn({containerStyle:e,style:t,type:n,component:i}){const{nodeId:s,handleType:a,nodesConnectable:l,width:c,height:u,connectionStatus:d}=E(qn,h.x);return s&&a&&c&&l?r.createElement("svg",{style:e,width:c,height:u,className:"react-flow__edges react-flow__connectionline react-flow__container"},r.createElement("g",{className:(0,o.A)(["react-flow__connection",d])},r.createElement(Un,{nodeId:s,handleType:a,style:t,type:n,CustomComponent:i,connectionStatus:d}))):null}function Yn(e,t){return(0,r.useRef)(null),R(),(0,r.useMemo)(()=>t(e),[e])}const Xn=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:o,onMoveEnd:i,onInit:s,onNodeClick:a,onEdgeClick:l,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:h,onNodeMouseLeave:p,onNodeContextMenu:f,onSelectionContextMenu:g,onSelectionStart:m,onSelectionEnd:v,connectionLineType:y,connectionLineStyle:b,connectionLineComponent:w,connectionLineContainerStyle:x,selectionKeyCode:S,selectionOnDrag:C,selectionMode:_,multiSelectionKeyCode:$,panActivationKeyCode:k,zoomActivationKeyCode:A,deleteKeyCode:M,onlyRenderVisibleElements:E,elementsSelectable:R,selectNodesOnDrag:T,defaultViewport:L,translateExtent:N,minZoom:O,maxZoom:I,preventScrolling:D,defaultMarkerColor:P,zoomOnScroll:j,zoomOnPinch:z,panOnScroll:F,panOnScrollSpeed:B,panOnScrollMode:H,zoomOnDoubleClick:W,panOnDrag:G,onPaneClick:V,onPaneMouseEnter:U,onPaneMouseMove:q,onPaneMouseLeave:K,onPaneScroll:Y,onPaneContextMenu:X,onEdgeContextMenu:Q,onEdgeMouseEnter:Z,onEdgeMouseMove:J,onEdgeMouseLeave:ee,onReconnect:te,onReconnectStart:ne,onReconnectEnd:re,reconnectRadius:oe,noDragClassName:ie,noWheelClassName:se,noPanClassName:ae,elevateEdgesOnSelect:le,disableKeyboardA11y:ce,nodeOrigin:ue,nodeExtent:de,rfId:he})=>{const pe=Yn(e,xn),fe=Yn(t,Tn);return function(e){const t=Dt(),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}(s),r.createElement(wn,{onPaneClick:V,onPaneMouseEnter:U,onPaneMouseMove:q,onPaneMouseLeave:K,onPaneContextMenu:X,onPaneScroll:Y,deleteKeyCode:M,selectionKeyCode:S,selectionOnDrag:C,selectionMode:_,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:$,panActivationKeyCode:k,zoomActivationKeyCode:A,elementsSelectable:R,onMove:n,onMoveStart:o,onMoveEnd:i,zoomOnScroll:j,zoomOnPinch:z,zoomOnDoubleClick:W,panOnScroll:F,panOnScrollSpeed:B,panOnScrollMode:H,panOnDrag:G,defaultViewport:L,translateExtent:N,minZoom:O,maxZoom:I,onSelectionContextMenu:g,preventScrolling:D,noDragClassName:ie,noWheelClassName:se,noPanClassName:ae,disableKeyboardA11y:ce},r.createElement(Gn,null,r.createElement(Hn,{edgeTypes:fe,onEdgeClick:l,onEdgeDoubleClick:u,onlyRenderVisibleElements:E,onEdgeContextMenu:Q,onEdgeMouseEnter:Z,onEdgeMouseMove:J,onEdgeMouseLeave:ee,onReconnect:te,onReconnectStart:ne,onReconnectEnd:re,reconnectRadius:oe,defaultMarkerColor:P,noPanClassName:ae,elevateEdgesOnSelect:!!le,disableKeyboardA11y:ce,rfId:he},r.createElement(Kn,{style:b,type:y,component:w,containerStyle:x})),r.createElement("div",{className:"react-flow__edgelabel-renderer"}),r.createElement(_n,{nodeTypes:pe,onNodeClick:a,onNodeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:h,onNodeMouseLeave:p,onNodeContextMenu:f,selectNodesOnDrag:T,onlyRenderVisibleElements:E,noPanClassName:ae,noDragClassName:ie,disableKeyboardA11y:ce,nodeOrigin:ue,nodeExtent:de,rfId:he})))};Xn.displayName="GraphView";var Qn=(0,r.memo)(Xn);const Zn=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Jn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Zn,nodeExtent:Zn,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:ie.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:X,isValidConnection:void 0},er=({children:e})=>{const t=(0,r.useRef)(null);return t.current||(t.current=(n=(e,t)=>({...Jn,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:Mt(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(e=>({...r,...e}))})},setDefaultNodesAndEdges:(n,r)=>{const o=void 0!==n,i=void 0!==r,s=o?Mt(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:s,fitViewOnInitOptions:a,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:h}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[K]:{...n[K],handleBounds:void 0}});else if(n){const r=I(t.nodeElement);r.width&&r.height&&(n.width!==r.width||n.height!==r.height||t.forceUpdate)&&(o.set(n.id,{...n,[K]:{...n[K],handleBounds:{source:ln(".source",t.nodeElement,h,c),target:ln(".target",t.nodeElement,h,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e},[]);At(o,c);const f=s||i&&!s&&Et(t,{initial:!0,...a});e({nodeInternals:new Map(o),fitViewOnInitDone:f}),p?.length>0&&r?.(p)},updateNodePositions:(e,n=!0,r=!1)=>{const{triggerNodeChanges:o}=t();o(e.map(e=>{const t={id:e.id,type:"position",dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}))},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:s,getNodes:a,elevateNodesOnSelect:l}=t();if(n?.length){if(i){const t=Mt(Yt(n,a()),o,s,l);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let s,a=null;r?s=n.map(e=>Qt(e,!0)):(s=Zt(i(),n),a=Zt(o,[])),Lt({changedNodes:s,changedEdges:a,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let s,a=null;r?s=n.map(e=>Qt(e,!0)):(s=Zt(o,n),a=Zt(i(),[])),Lt({changedNodes:a,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),s=r||o;Lt({changedNodes:(n||i()).map(e=>(e.selected=!1,Qt(e.id,!1))),changedEdges:s.map(e=>Qt(e.id,!1)),get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t();Lt({changedNodes:r().filter(e=>e.selected).map(e=>Qt(e.id,!1)),changedEdges:n.filter(e=>e.selected).map(e=>Qt(e.id,!1)),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(e=>{e.positionAbsolute=P(e.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:s,translateExtent:a}=t();if(!i||!s||!e.x&&!e.y)return!1;const l=p.GS.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(l,c,a);return i.transform(s,u),n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:Jn.connectionNodeId,connectionHandleId:Jn.connectionHandleId,connectionHandleType:Jn.connectionHandleType,connectionStatus:Jn.connectionStatus,connectionStartHandle:Jn.connectionStartHandle,connectionEndHandle:Jn.connectionEndHandle}),reset:()=>e({...Jn})}),o=Object.is,n?d(n,o):d)),r.createElement(A,{value:t.current},e);var n,o};er.displayName="ReactFlowProvider";const tr=({children:e})=>(0,r.useContext)(k)?r.createElement(r.Fragment,null,e):r.createElement(er,null,e);tr.displayName="ReactFlowWrapper";const nr={input:nt,default:et,output:ot,group:it},rr={default:Ce,straight:be,step:ye,smoothstep:ve,simplebezier:pe},or=[0,0],ir=[15,15],sr={x:0,y:0,zoom:1},ar={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},lr=(0,r.forwardRef)(({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:s,nodeTypes:a=nr,edgeTypes:l=rr,onNodeClick:c,onEdgeClick:u,onInit:d,onMove:h,onMoveStart:p,onMoveEnd:f,onConnect:g,onConnectStart:m,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:_,onNodeDragStart:$,onNodeDrag:k,onNodeDragStop:A,onNodesDelete:M,onEdgesDelete:E,onSelectionChange:R,onSelectionDragStart:T,onSelectionDrag:L,onSelectionDragStop:O,onSelectionContextMenu:I,onSelectionStart:D,onSelectionEnd:P,connectionMode:j=ie.Strict,connectionLineType:z=le.Bezier,connectionLineStyle:F,connectionLineComponent:B,connectionLineContainerStyle:H,deleteKeyCode:W="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:V=!1,selectionMode:U=ae.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:K=(ee()?"Meta":"Control"),zoomActivationKeyCode:Y=(ee()?"Meta":"Control"),snapToGrid:X=!1,snapGrid:Q=ir,onlyRenderVisibleElements:Z=!1,selectNodesOnDrag:J=!0,nodesDraggable:te,nodesConnectable:ne,nodesFocusable:re,nodeOrigin:oe=or,edgesFocusable:ce,edgesUpdatable:ue,elementsSelectable:de,defaultViewport:he=sr,minZoom:pe=.5,maxZoom:fe=2,translateExtent:ge=Zn,preventScrolling:me=!0,nodeExtent:ve,defaultMarkerColor:ye="#b1b1b7",zoomOnScroll:be=!0,zoomOnPinch:we=!0,panOnScroll:xe=!1,panOnScrollSpeed:Se=.5,panOnScrollMode:Ce=se.Free,zoomOnDoubleClick:_e=!0,panOnDrag:$e=!0,onPaneClick:ke,onPaneMouseEnter:Ae,onPaneMouseMove:Me,onPaneMouseLeave:Ee,onPaneScroll:Re,onPaneContextMenu:Te,children:Le,onEdgeContextMenu:Ne,onEdgeDoubleClick:Oe,onEdgeMouseEnter:Ie,onEdgeMouseMove:De,onEdgeMouseLeave:Pe,onEdgeUpdate:je,onEdgeUpdateStart:ze,onEdgeUpdateEnd:Fe,onReconnect:Be,onReconnectStart:He,onReconnectEnd:We,reconnectRadius:Ge=10,edgeUpdaterRadius:Ve=10,onNodesChange:Ue,onEdgesChange:qe,noDragClassName:Ke="nodrag",noWheelClassName:Ye="nowheel",noPanClassName:Xe="nopan",fitView:Qe=!1,fitViewOptions:Ze,connectOnClick:Je=!0,attributionPosition:et,proOptions:tt,defaultEdgeOptions:nt,elevateNodesOnSelect:rt=!0,elevateEdgesOnSelect:ot=!1,disableKeyboardA11y:it=!1,autoPanOnConnect:st=!0,autoPanOnNodeDrag:at=!0,connectionRadius:lt=20,isValidConnection:ct,onError:ut,style:ht,id:pt,nodeDragThreshold:ft,...mt},vt)=>{const yt=pt||"1";return r.createElement("div",{...mt,style:{...ht,...ar},ref:vt,className:(0,o.A)(["react-flow",s]),"data-testid":"rf__wrapper",id:pt},r.createElement(tr,null,r.createElement(Qn,{onInit:d,onMove:h,onMoveStart:p,onMoveEnd:f,onNodeClick:c,onEdgeClick:u,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:z,connectionLineStyle:F,connectionLineComponent:B,connectionLineContainerStyle:H,selectionKeyCode:G,selectionOnDrag:V,selectionMode:U,deleteKeyCode:W,multiSelectionKeyCode:K,panActivationKeyCode:q,zoomActivationKeyCode:Y,onlyRenderVisibleElements:Z,selectNodesOnDrag:J,defaultViewport:he,translateExtent:ge,minZoom:pe,maxZoom:fe,preventScrolling:me,zoomOnScroll:be,zoomOnPinch:we,zoomOnDoubleClick:_e,panOnScroll:xe,panOnScrollSpeed:Se,panOnScrollMode:Ce,panOnDrag:$e,onPaneClick:ke,onPaneMouseEnter:Ae,onPaneMouseMove:Me,onPaneMouseLeave:Ee,onPaneScroll:Re,onPaneContextMenu:Te,onSelectionContextMenu:I,onSelectionStart:D,onSelectionEnd:P,onEdgeContextMenu:Ne,onEdgeDoubleClick:Oe,onEdgeMouseEnter:Ie,onEdgeMouseMove:De,onEdgeMouseLeave:Pe,onReconnect:Be??je,onReconnectStart:He??ze,onReconnectEnd:We??Fe,reconnectRadius:Ge??Ve,defaultMarkerColor:ye,noDragClassName:Ke,noWheelClassName:Ye,noPanClassName:Xe,elevateEdgesOnSelect:ot,rfId:yt,disableKeyboardA11y:it,nodeOrigin:oe,nodeExtent:ve}),r.createElement(gt,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:g,onConnectStart:m,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:te,nodesConnectable:ne,nodesFocusable:re,edgesFocusable:ce,edgesUpdatable:ue,elementsSelectable:de,elevateNodesOnSelect:rt,minZoom:pe,maxZoom:fe,nodeExtent:ve,onNodesChange:Ue,onEdgesChange:qe,snapToGrid:X,snapGrid:Q,connectionMode:j,translateExtent:ge,connectOnClick:Je,defaultEdgeOptions:nt,fitView:Qe,fitViewOptions:Ze,onNodesDelete:M,onEdgesDelete:E,onNodeDragStart:$,onNodeDrag:k,onNodeDragStop:A,onSelectionDrag:L,onSelectionDragStart:T,onSelectionDragStop:O,noPanClassName:Xe,nodeOrigin:oe,rfId:yt,autoPanOnConnect:st,autoPanOnNodeDrag:at,onError:ut,connectionRadius:lt,isValidConnection:ct,nodeDragThreshold:ft}),r.createElement(dt,{onSelectionChange:R}),Le,r.createElement(N,{proOptions:tt,position:et}),r.createElement(St,{rfId:yt,disableKeyboardA11y:it})))});lr.displayName="ReactFlow";const cr=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function ur({children:e}){const t=E(cr);return t?(0,$.createPortal)(e,t):null}function dr(){const e=R();return(0,r.useCallback)(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=(Array.isArray(t)?t:[t]).reduce((e,t)=>{const r=n?.querySelector(`.react-flow__node[data-id="${t}"]`);return r&&e.push({id:t,nodeElement:r,forceUpdate:!0}),e},[]);requestAnimationFrame(()=>r(o))},[])}function hr(e){return t=>{const[n,o]=(0,r.useState)(t),i=(0,r.useCallback)(t=>o(n=>e(t,n)),[]);return[n,o,i]}}function pr({onStart:e,onChange:t,onEnd:n}){const o=R();(0,r.useEffect)(()=>{o.setState({onViewportChangeStart:e})},[e]),(0,r.useEffect)(()=>{o.setState({onViewportChange:t})},[t]),(0,r.useEffect)(()=>{o.setState({onViewportChangeEnd:n})},[n])}function fr({onChange:e}){const t=R();(0,r.useEffect)(()=>{const n=[...t.getState().onSelectionChange,e];return t.setState({onSelectionChange:n}),()=>{const n=t.getState().onSelectionChange.filter(t=>t!==e);t.setState({onSelectionChange:n})}},[e])}hr(Yt),hr(Xt)},1986(e,t,n){var r=n(1873),o=n(5447),i=n(5288),s=n(5911),a=n(317),l=n(4247),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=s(p(e),p(t),r,c,d,h);return h.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},2e3(e,t,n){var r=n(3945),o=n(2429),i=n(5389),s=n(6449);e.exports=function(e,t){return function(n,a){var l=s(n)?r:o,c=t?t():{};return l(n,e,i(a,2),c)}}},2006(e,t,n){var r=n(5389),o=n(4894),i=n(5950);e.exports=function(e){return function(t,n,s){var a=Object(t);if(!o(t)){var l=r(n,3);t=i(t),n=function(e){return l(a[e],e,a)}}var c=e(t,n,s);return c>-1?a[l?t[c]:c]:void 0}}},2013(e,t,n){var r=n(3360),o=n(2e3),i=Object.prototype.hasOwnProperty,s=o(function(e,t,n){i.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=s},2032(e,t,n){var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2060(e){var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,n){var r=n.length;if(!r)return e;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+n+"] */\n")}},2086(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}))},2189(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var s=r,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var u=this.diff_compute_(e,n,s,i);return l&&u.unshift(new t.Diff(0,l)),c&&u.push(new t.Diff(0,c)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,r,o,i){var s;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var a=e.length>r.length?e:r,l=e.length>r.length?r:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>r.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,r)];var u=this.diff_halfMatch_(e,r);if(u){var d=u[0],h=u[1],p=u[2],f=u[3],g=u[4],m=this.diff_main(d,p,o,i),v=this.diff_main(h,f,o,i);return m.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,i):this.diff_bisect_(e,r,i)},t.prototype.diff_lineMode_=function(e,r,o){var i=this.diff_linesToChars_(e,r);e=i.chars1,r=i.chars2;var s=i.lineArray,a=this.diff_main(e,r,!1,o);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,u=0,d="",h="";l<a.length;){switch(a[l][0]){case 1:u++,h+=a[l][1];break;case n:c++,d+=a[l][1];break;case 0:if(c>=1&&u>=1){a.splice(l-c-u,c+u),l=l-c-u;for(var p=this.diff_main(d,h,!1,o),f=p.length-1;f>=0;f--)a.splice(l,0,p[f]);l+=p.length}u=0,c=0,d="",h=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,r,o){for(var i=e.length,s=r.length,a=Math.ceil((i+s)/2),l=a,c=2*a,u=new Array(c),d=new Array(c),h=0;h<c;h++)u[h]=-1,d[h]=-1;u[l+1]=0,d[l+1]=0;for(var p=i-s,f=p%2!=0,g=0,m=0,v=0,y=0,b=0;b<a&&!((new Date).getTime()>o);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=l+w,S=(A=w==-b||w!=b&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1)-w;A<i&&S<s&&e.charAt(A)==r.charAt(S);)A++,S++;if(u[x]=A,A>i)m+=2;else if(S>s)g+=2;else if(f&&($=l+p-w)>=0&&$<c&&-1!=d[$]&&A>=(_=i-d[$]))return this.diff_bisectSplit_(e,r,A,S,o)}for(var C=-b+v;C<=b-y;C+=2){for(var _,$=l+C,k=(_=C==-b||C!=b&&d[$-1]<d[$+1]?d[$+1]:d[$-1]+1)-C;_<i&&k<s&&e.charAt(i-_-1)==r.charAt(s-k-1);)_++,k++;if(d[$]=_,_>i)y+=2;else if(k>s)v+=2;else if(!f){var A;if((x=l+p-C)>=0&&x<c&&-1!=u[x])if(S=l+(A=u[x])-x,A>=(_=i-_))return this.diff_bisectSplit_(e,r,A,S,o)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),c=this.diff_main(i,s,!1,o),u=this.diff_main(a,l,!1,o);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,s=-1,a=n.length;s<e.length-1;){-1==(s=e.indexOf("\n",o))&&(s=e.length-1);var l=e.substring(o,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a==i&&(l=e.substring(o),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),o=s+1}return t}n[0]="";var i=4e4,s=o(e);return i=65535,{chars1:s,chars2:o(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],o=[],i=0;i<r.length;i++)o[i]=t[r.charCodeAt(i)];e[n][1]=o.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(i,o)==t.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(e.length-o,e.length-i)==t.substring(t.length-o,t.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var o=Math.min(n,r);if(e==t)return o;for(var i=0,s=1;;){var a=e.substring(o-s),l=t.indexOf(a);if(-1==l)return i;s+=l,0!=l&&e.substring(o-s)!=t.substring(0,s)||(i=s,s++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var o=this;function i(e,t,n){for(var r,i,s,a,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var d=o.diff_commonPrefix(e.substring(n),t.substring(c)),h=o.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length<h+d&&(u=t.substring(c-h,c)+t.substring(c,c+d),r=e.substring(0,n-h),i=e.substring(n+d),s=t.substring(0,c-h),a=t.substring(c+d))}return 2*u.length>=e.length?[r,i,s,a,u]:null}var s,a,l,c,u,d=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));return d||h?(s=h?d&&d[4].length>h[4].length?d:h:d,e.length>t.length?(a=s[0],l=s[1],c=s[2],u=s[3]):(c=s[0],u=s[1],a=s[2],l=s[3]),[a,l,c,u,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,o=[],i=0,s=null,a=0,l=0,c=0,u=0,d=0;a<e.length;)0==e[a][0]?(o[i++]=a,l=u,c=d,u=0,d=0,s=e[a][1]):(1==e[a][0]?u+=e[a][1].length:d+=e[a][1].length,s&&s.length<=Math.max(l,c)&&s.length<=Math.max(u,d)&&(e.splice(o[i-1],0,new t.Diff(n,s)),e[o[i-1]+1][0]=1,i--,a=--i>0?o[i-1]:-1,l=0,c=0,u=0,d=0,s=null,r=!0)),a++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==n&&1==e[a][0]){var h=e[a-1][1],p=e[a][1],f=this.diff_commonOverlap_(h,p),g=this.diff_commonOverlap_(p,h);f>=g?(f>=h.length/2||f>=p.length/2)&&(e.splice(a,0,new t.Diff(0,p.substring(0,f))),e[a-1][1]=h.substring(0,h.length-f),e[a+1][1]=p.substring(f),a++):(g>=h.length/2||g>=p.length/2)&&(e.splice(a,0,new t.Diff(0,h.substring(0,g))),e[a-1][0]=1,e[a-1][1]=p.substring(0,p.length-g),e[a+1][0]=n,e[a+1][1]=h.substring(g),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),o=n.charAt(0),i=r.match(t.nonAlphaNumericRegex_),s=o.match(t.nonAlphaNumericRegex_),a=i&&r.match(t.whitespaceRegex_),l=s&&o.match(t.whitespaceRegex_),c=a&&r.match(t.linebreakRegex_),u=l&&o.match(t.linebreakRegex_),d=c&&e.match(t.blanklineEndRegex_),h=u&&n.match(t.blanklineStartRegex_);return d||h?5:c||u?4:i&&!a&&l?3:a||l?2:i||s?1:0}for(var r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var o=e[r-1][1],i=e[r][1],s=e[r+1][1],a=this.diff_commonSuffix(o,i);if(a){var l=i.substring(i.length-a);o=o.substring(0,o.length-a),i=l+i.substring(0,i.length-a),s=l+s}for(var c=o,u=i,d=s,h=n(o,i)+n(i,s);i.charAt(0)===s.charAt(0);){o+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var p=n(o,i)+n(i,s);p>=h&&(h=p,c=o,u=i,d=s)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=u,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}},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 r=!1,o=[],i=0,s=null,a=0,l=!1,c=!1,u=!1,d=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(u||d)?(o[i++]=a,l=u,c=d,s=e[a][1]):(i=0,s=null),u=d=!1):(e[a][0]==n?d=!0:u=!0,s&&(l&&c&&u&&d||s.length<this.Diff_EditCost/2&&l+c+u+d==3)&&(e.splice(o[i-1],0,new t.Diff(n,s)),e[o[i-1]+1][0]=1,i--,s=null,l&&c?(u=d=!0,i=0):(a=--i>0?o[i-1]:-1,u=d=!1),r=!0)),a++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,o=0,i=0,s=0,a="",l="";o<e.length;)switch(e[o][0]){case 1:s++,l+=e[o][1],o++;break;case n:i++,a+=e[o][1],o++;break;case 0:i+s>1?(0!==i&&0!==s&&(0!==(r=this.diff_commonPrefix(l,a))&&(o-i-s>0&&0==e[o-i-s-1][0]?e[o-i-s-1][1]+=l.substring(0,r):(e.splice(0,0,new t.Diff(0,l.substring(0,r))),o++),l=l.substring(r),a=a.substring(r)),0!==(r=this.diff_commonSuffix(l,a))&&(e[o][1]=l.substring(l.length-r)+e[o][1],l=l.substring(0,l.length-r),a=a.substring(0,a.length-r))),o-=i+s,e.splice(o,i+s),a.length&&(e.splice(o,0,new t.Diff(n,a)),o++),l.length&&(e.splice(o,0,new t.Diff(1,l)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,s=0,i=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(o=1;o<e.length-1;)0==e[o-1][0]&&0==e[o+1][0]&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)==e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),c=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),c=!0)),o++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var r,o=0,i=0,s=0,a=0;for(r=0;r<e.length&&(1!==e[r][0]&&(o+=e[r][1].length),e[r][0]!==n&&(i+=e[r][1].length),!(o>t));r++)s=o,a=i;return e.length!=r&&e[r][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,o=/</g,i=/>/g,s=/\n/g,a=0;a<e.length;a++){var l=e[a][0],c=e[a][1].replace(r,"&").replace(o,"<").replace(i,">").replace(s,"¶<br>");switch(l){case 1:t[a]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[a]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[a]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],r=0;r<e.length;r++)e[r][0]!==n&&(t[r]=e[r][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,r=0,o=0,i=0;i<e.length;i++){var s=e[i][0],a=e[i][1];switch(s){case 1:r+=a.length;break;case n:o+=a.length;break;case 0:t+=Math.max(r,o),r=0,o=0}}return t+Math.max(r,o)},t.prototype.diff_toDelta=function(e){for(var t=[],r=0;r<e.length;r++)switch(e[r][0]){case 1:t[r]="+"+encodeURI(e[r][1]);break;case n:t[r]="-"+e[r][1].length;break;case 0:t[r]="="+e[r][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,r){for(var o=[],i=0,s=0,a=r.split(/\t/g),l=0;l<a.length;l++){var c=a[l].substring(1);switch(a[l].charAt(0)){case"+":try{o[i++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var u=parseInt(c,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+c);var d=e.substring(s,s+=u);"="==a[l].charAt(0)?o[i++]=new t.Diff(0,d):o[i++]=new t.Diff(n,d);break;default:if(a[l])throw new Error("Invalid diff operation in diff_fromDelta: "+a[l])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return o},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,s=Math.abs(n-r);return o.Match_Distance?i+s/o.Match_Distance:s?1:i}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(i(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(i(0,a),s)));var l,c,u=1<<t.length-1;a=-1;for(var d,h=t.length+e.length,p=0;p<t.length;p++){for(l=0,c=h;l<c;)i(p,n+c)<=s?l=c:h=c,c=Math.floor((h-l)/2+l);h=c;var f=Math.max(1,n-c+1),g=Math.min(n+c,e.length)+t.length,m=Array(g+2);m[g+1]=(1<<p)-1;for(var v=g;v>=f;v--){var y=r[e.charAt(v-1)];if(m[v]=0===p?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(d[v+1]|d[v])<<1|1|d[v+1],m[v]&u){var b=i(p,v-1);if(b<=s){if(s=b,!((a=v-1)>n))break;f=Math.max(1,2*n-a)}}}if(i(p+1,n)>s)break;d=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var r=n.substring(e.start2,e.start2+e.length1),o=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)o+=this.Patch_Margin,r=n.substring(e.start2-o,e.start2+e.length1+o);o+=this.Patch_Margin;var i=n.substring(e.start2-o,e.start2);i&&e.diffs.unshift(new t.Diff(0,i));var s=n.substring(e.start2+e.length1,e.start2+e.length1+o);s&&e.diffs.push(new t.Diff(0,s)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+s.length,e.length2+=i.length+s.length}},t.prototype.patch_make=function(e,r,o){var i,s;if("string"==typeof e&&"string"==typeof r&&void 0===o)i=e,(s=this.diff_main(i,r,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===r&&void 0===o)s=e,i=this.diff_text1(s);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===o)i=e,s=r;else{if("string"!=typeof e||"string"!=typeof r||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,s=o}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,u=0,d=0,h=i,p=i,f=0;f<s.length;f++){var g=s[f][0],m=s[f][1];switch(c||0===g||(l.start1=u,l.start2=d),g){case 1:l.diffs[c++]=s[f],l.length2+=m.length,p=p.substring(0,d)+m+p.substring(d);break;case n:l.length1+=m.length,l.diffs[c++]=s[f],p=p.substring(0,d)+p.substring(d+m.length);break;case 0:m.length<=2*this.Patch_Margin&&c&&s.length!=f+1?(l.diffs[c++]=s[f],l.length1+=m.length,l.length2+=m.length):m.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),a.push(l),l=new t.patch_obj,c=0,h=p,u=d)}1!==g&&(u+=m.length),g!==n&&(d+=m.length)}return c&&(this.patch_addContext_(l,h),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=new t.patch_obj;i.diffs=[];for(var s=0;s<o.diffs.length;s++)i.diffs[s]=new t.Diff(o.diffs[s][0],o.diffs[s][1]);i.start1=o.start1,i.start2=o.start2,i.length1=o.length1,i.length2=o.length2,n[r]=i}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var r=this.patch_addPadding(e);t=r+t+r,this.patch_splitMax(e);for(var o=0,i=[],s=0;s<e.length;s++){var a,l,c=e[s].start2+o,u=this.diff_text1(e[s].diffs),d=-1;if(u.length>this.Match_MaxBits?-1!=(a=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(d=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||a>=d)&&(a=-1):a=this.match_main(t,u,c),-1==a)i[s]=!1,o-=e[s].length2-e[s].length1;else if(i[s]=!0,o=a-c,u==(l=-1==d?t.substring(a,a+u.length):t.substring(a,d+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+u.length);else{var h=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(h)/u.length>this.Patch_DeleteThreshold)i[s]=!1;else{this.diff_cleanupSemanticLossless(h);for(var p,f=0,g=0;g<e[s].diffs.length;g++){var m=e[s].diffs[g];0!==m[0]&&(p=this.diff_xIndex(h,f)),1===m[0]?t=t.substring(0,a+p)+m[1]+t.substring(a+p):m[0]===n&&(t=t.substring(0,a+p)+t.substring(a+this.diff_xIndex(h,f+m[1].length))),m[0]!==n&&(f+=m[1].length)}}}}return[t=t.substring(r.length,t.length-r.length),i]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r="",o=1;o<=n;o++)r+=String.fromCharCode(o);for(o=0;o<e.length;o++)e[o].start1+=n,e[o].start2+=n;var i=e[0],s=i.diffs;if(0==s.length||0!=s[0][0])s.unshift(new t.Diff(0,r)),i.start1-=n,i.start2-=n,i.length1+=n,i.length2+=n;else if(n>s[0][1].length){var a=n-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],i.start1-=a,i.start2-=a,i.length1+=a,i.length2+=a}return 0==(s=(i=e[e.length-1]).diffs).length||0!=s[s.length-1][0]?(s.push(new t.Diff(0,r)),i.length1+=n,i.length2+=n):n>s[s.length-1][1].length&&(a=n-s[s.length-1][1].length,s[s.length-1][1]+=r.substring(0,a),i.length1+=a,i.length2+=a),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=r)){var i=e[o];e.splice(o--,1);for(var s=i.start1,a=i.start2,l="";0!==i.diffs.length;){var c=new t.patch_obj,u=!0;for(c.start1=s-l.length,c.start2=a-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==i.diffs.length&&c.length1<r-this.Patch_Margin;){var d=i.diffs[0][0],h=i.diffs[0][1];1===d?(c.length2+=h.length,a+=h.length,c.diffs.push(i.diffs.shift()),u=!1):d===n&&1==c.diffs.length&&0==c.diffs[0][0]&&h.length>2*r?(c.length1+=h.length,s+=h.length,u=!1,c.diffs.push(new t.Diff(d,h)),i.diffs.shift()):(h=h.substring(0,r-c.length1-this.Patch_Margin),c.length1+=h.length,s+=h.length,0===d?(c.length2+=h.length,a+=h.length):u=!1,c.diffs.push(new t.Diff(d,h)),h==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),u||e.splice(++o,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var r=[];if(!e)return r;for(var o=e.split("\n"),i=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<o.length;){var a=o[i].match(s);if(!a)throw new Error("Invalid patch string: "+o[i]);var l=new t.patch_obj;for(r.push(l),l.start1=parseInt(a[1],10),""===a[2]?(l.start1--,l.length1=1):"0"==a[2]?l.length1=0:(l.start1--,l.length1=parseInt(a[2],10)),l.start2=parseInt(a[3],10),""===a[4]?(l.start2--,l.length2=1):"0"==a[4]?l.length2=0:(l.start2--,l.length2=parseInt(a[4],10)),i++;i<o.length;){var c=o[i].charAt(0);try{var u=decodeURI(o[i].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+u)}if("-"==c)l.diffs.push(new t.Diff(n,u));else if("+"==c)l.diffs.push(new t.Diff(1,u));else if(" "==c)l.diffs.push(new t.Diff(0,u));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+u)}i++}}return r},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[r+1]=e+encodeURI(this.diffs[r][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},2193(e,t,n){var r=n(8984),o=n(5861),i=n(2428),s=n(6449),a=n(4894),l=n(3656),c=n(5527),u=n(7167),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},2199(e,t,n){var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2224(e,t,n){var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2225(e){var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s="["+i+"]",a="\\d+",l="["+n+"]",c="["+r+"]",u="[^"+t+i+a+n+r+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+o+"]",f="(?:"+c+"|"+u+")",g="(?:"+p+"|"+u+")",m="(?:['’](?:d|ll|m|re|s|t|ve))?",v="(?:['’](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",b="[\\ufe0e\\ufe0f]?",w=b+y+"(?:\\u200d(?:"+["[^"+t+"]",d,h].join("|")+")"+b+y+")*",x="(?:"+[l,d,h].join("|")+")"+w,S=RegExp([p+"?"+c+"+"+m+"(?="+[s,p,"$"].join("|")+")",g+"+"+v+"(?="+[s,p+f,"$"].join("|")+")",p+"?"+f+"+"+m,p+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a,x].join("|"),"g");e.exports=function(e){return e.match(S)||[]}},2284(e,t,n){var r=n(4629),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],i=o.call(r,t)?n.length:0;i--;){var s=n[i],a=s.func;if(null==a||a==e)return s.name}return t}},2288(e,t,n){"use strict";n.d(t,{qy:()=>te});var r=n(1594),o=n(4848),i=n(5008),s=Symbol.for("react.memo_cache_sentinel");function a(e){return r.useMemo(function(){for(var t=Array.from({length:e}),n=0;n<e;n++)t[n]=s;return t[s]=!0,t},[])}var l=i.YM.rule,c=i.YM.ruleGroup,u=i.YM.combinatorSelector,d=(0,r.createContext)({baseControls:{rule:l,ruleGroup:c,combinatorSelector:u}});function h(e){return(h="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})(e)}var p=["component"];function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v(e,t,n){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){var t,n,s=a(18);if(s[0]!==e){var l=e;n=l.component,t=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(l,p),s[0]=e,s[1]=t,s[2]=n}else t=s[1],n=s[2];var c,u=(0,r.useContext)(d),h=u.canDrop,f=u.useDrop;s[3]!==t||s[4]!==n||s[5]!==f||s[6]!==h?(c=m(m({},t),{},{component:n,useDrop:f,canDrop:h}),s[3]=t,s[4]=n,s[5]=f,s[6]=h,s[7]=c):c=s[7];var g,v=b(c),y=v.dropRef,x=v.dropMonitorId,S=v.isOver,C=t.schema.suppressStandardClassnames||i.q4.betweenRules,_=S&&!t.schema.classNames.dndOver||!1,$=S&&!t.schema.suppressStandardClassnames&&i.q4.dndOver||!1;s[8]!==C||s[9]!==_||s[10]!==$?(g=[C,_,$].filter(w),s[8]=C,s[9]=_,s[10]=$,s[11]=g):g=s[11];var k,A=g.join(" ");return s[12]!==t||s[13]!==n||s[14]!==y||s[15]!==A||s[16]!==x?(k=(0,o.jsx)("div",{ref:y,className:A,"data-dropmonitorid":x,"data-testid":i.W.inlineCombinator,children:(0,o.jsx)(n,m(m({},t),{},{testID:i.W.combinators}))},"dnd"),s[12]=t,s[13]=n,s[14]=y,s[15]=A,s[16]=x,s[17]=k):k=s[17],k},b=function(e){var t,n,o=e.path,s=e.canDrop,a=e.schema,l=e.useDrop,c=e.rules,u=(0,r.useRef)(null),d=(null!=c?c:[])[o.at(-1)-1],h=(t=l(function(){return{accept:["rule","ruleGroup"],canDrop:function(e){var t=e.path;if(e&&"function"==typeof s&&!s({dragging:e,hovering:m(m({},d),{},{path:o,qbId:a.qbId})}))return!1;var n=(0,i._6)(o),r=(0,i._6)(t),l=o.at(-1),c=t.at(-1);return!((0,i.QX)(t,o)||(0,i.P9)(t,o)||(0,i.P9)(n,r)&&l-1===c||a.independentCombinators&&(0,i.P9)(n,r)&&l===c-1)},collect:function(e){var t,n;return{isOver:e.canDrop()&&e.isOver(),dropMonitorId:null!==(t=e.getHandlerId())&&void 0!==t?t:"",dropEffect:(null!==(n=e.getDropResult())&&void 0!==n?n:{}).dropEffect}},drop:function(){var e=a.qbId,t=a.getQuery,n=a.dispatchQuery;return{type:"inlineCombinator",path:o,qbId:e,getQuery:t,dispatchQuery:n}}}},[o,a.independentCombinators]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=h[0],g=p.isOver,v=p.dropMonitorId;return(0,h[1])(u),{dropRef:u,dropMonitorId:v,isOver:g}};function w(e){return"string"==typeof e}var x="move";function S(e){return(S="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})(e)}function C(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function A(e,t,n){return(t=function(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){"Alt"===e.key&&(x="copy")}),document.addEventListener("keyup",function(e){"Alt"===e.key&&(x="move")})),"undefined"!=typeof window&&window.addEventListener("blur",function(){x="move"});var M=function(e){var t=e.type,n=e.path,r=e.disabled,o=e.actions,s=e.schema;return(0,e.useDrag)(function(){return{type:t,item:function(){return k(k({},(0,i.Hh)(n,s.getQuery())),{},{path:n,qbId:s.qbId})},canDrag:!r,collect:function(e){var t;return{isDragging:!r&&e.isDragging(),dragMonitorId:null!==(t=e.getHandlerId())&&void 0!==t?t:""}},end:function(e,t){var n=t.getDropResult();if(n){var r=(0,i._6)(n.path),a=n.path.at(-1),l="ruleGroup"===n.type?[].concat(C(n.path),[0]):"inlineCombinator"===n.type?[].concat(C(r),[a]):[].concat(C(r),[a+1]);if(s.qbId===n.qbId)o.moveRule(e.path,l,"copy"===n.dropEffect);else{var c=n.getQuery();c&&(n.dispatchQuery((0,i.Yr)(c,e,l)),"copy"!==n.dropEffect&&o.onRuleRemove(e.path))}}}}},[r,n])};function E(e){return(E="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})(e)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t,n){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=function(e){var t,n=a(11),i=(0,r.useContext)(d),s=i.canDrop,l=i.useDrag,c=i.useDrop,u=!!e.parentDisabled||!!e.disabled;n[0]!==e||n[1]!==u||n[2]!==l||n[3]!==c||n[4]!==s?(t=N(N({},e),{},{disabled:u,useDrag:l,useDrop:c,canDrop:s}),n[0]=e,n[1]=u,n[2]=l,n[3]=c,n[4]=s,n[5]=t):t=n[5];var h,p=P(t),f=i.baseControls.rule;return n[6]!==e||n[7]!==p||n[8]!==f||n[9]!==i?(h=(0,o.jsx)(d.Provider,{value:i,children:(0,o.jsx)(f,N(N({},e),p))}),n[6]=e,n[7]=p,n[8]=f,n[9]=i,n[10]=h):h=n[10],h},D=["rule","ruleGroup"],P=function(e){var t=e.path,n=e.rule,o=e.disabled,s=e.schema,a=e.actions,l=e.useDrag,c=e.useDrop,u=e.canDrop,d=(0,r.useRef)(null),h=(0,r.useRef)(null),p=R(M({type:"rule",path:t,disabled:o,independentCombinators:s.independentCombinators,moveRule:a.moveRule,schema:s,actions:a,useDrag:l}),3),f=p[0],g=f.isDragging,m=f.dragMonitorId,v=p[1],y=p[2],b=R(c(function(){return{accept:D,canDrop:function(e){if(e&&"function"==typeof u&&!u({dragging:e,hovering:N(N({},n),{},{path:t,qbId:s.qbId})}))return!1;if(s.qbId!==e.qbId)return!0;var r=(0,i._6)(t),o=(0,i._6)(e.path),a=t.at(-1),l=e.path.at(-1);return!((0,i.QX)(e.path,t)||(0,i.P9)(r,o)&&(a===l||a===l-1||s.independentCombinators&&a===l-2))},collect:function(e){var t,n,r;return{isOver:e.canDrop()&&e.isOver(),dropMonitorId:null!==(t=e.getHandlerId())&&void 0!==t?t:"",dropEffect:null!==(n=null===(r=e.getDropResult())||void 0===r?void 0:r.dropEffect)&&void 0!==n?n:x}},drop:function(){var e=s.qbId,n=s.getQuery,r=s.dispatchQuery;return{type:"rule",path:t,qbId:e,getQuery:n,dispatchQuery:r}}}},[o,s.independentCombinators,a.moveRule,t]),2),w=b[0],S=w.isOver,C=w.dropMonitorId,_=w.dropEffect,$=b[1];return v(h),y($(d)),{isDragging:g,dragMonitorId:m,isOver:S,dropMonitorId:C,dndRef:d,dragRef:h,dropEffect:_}};function j(e){return(j="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})(e)}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach(function(t){W(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W(e,t,n){return(t=function(e){var t=function(e){if("object"!=j(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=function(e){var t,n=a(10),i=(0,r.useContext)(d),s=i.canDrop,l=i.useDrag,c=i.useDrop,u=!!e.parentDisabled||!!e.disabled;n[0]!==e||n[1]!==u||n[2]!==l||n[3]!==c||n[4]!==s?(t=H(H({},e),{},{disabled:u,useDrag:l,useDrop:c,canDrop:s}),n[0]=e,n[1]=u,n[2]=l,n[3]=c,n[4]=s,n[5]=t):t=n[5];var h,p=U(t),f=i.baseControls.ruleGroup;return n[6]!==e||n[7]!==p||n[8]!==f?(h=(0,o.jsx)(f,H(H({},e),p)),n[6]=e,n[7]=p,n[8]=f,n[9]=h):h=n[9],h},V=["rule","ruleGroup"],U=function(e){var t=e.disabled,n=e.path,o=e.ruleGroup,s=e.schema,a=e.actions,l=e.useDrag,c=e.useDrop,u=e.canDrop,d=(0,r.useRef)(null),h=(0,r.useRef)(null),p=(0,r.useRef)(null),f=z(M({type:"ruleGroup",path:n,disabled:t,independentCombinators:s.independentCombinators,moveRule:a.moveRule,schema:s,actions:a,useDrag:l}),3),g=f[0],m=g.isDragging,v=g.dragMonitorId,y=f[1],b=f[2],w=z(c(function(){return{accept:V,canDrop:function(e){if(t||e&&"function"==typeof u&&!u({dragging:e,hovering:H(H({},o),{},{path:n,qbId:s.qbId})}))return!1;if(s.qbId!==e.qbId)return!0;var r=(0,i._6)(e.path),a=e.path.at(-1);return!((0,i.QX)(e.path,n)||(0,i.P9)(n,r)&&0===a||(0,i.P9)(n,e.path))},collect:function(e){var t,n,r;return{isOver:e.canDrop()&&e.isOver(),dropMonitorId:null!==(t=e.getHandlerId())&&void 0!==t?t:"",dropEffect:null!==(n=null===(r=e.getDropResult())||void 0===r?void 0:r.dropEffect)&&void 0!==n?n:x}},drop:function(e,t){var r,o=s.qbId,i=s.getQuery,a=s.dispatchQuery;return null!==(r=t.getDropResult())&&void 0!==r?r:{type:"ruleGroup",path:n,qbId:o,getQuery:i,dispatchQuery:a}}}},[t,a.moveRule,n]),2),S=w[0],C=S.isOver,_=S.dropMonitorId,$=S.dropEffect,k=w[1];return n.length>0&&(y(h),b(d)),k(p),{isDragging:m,dragMonitorId:v,isOver:C,dropMonitorId:_,previewRef:d,dragRef:h,dropRef:p,dropEffect:$}};function q(e){return(q="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})(e)}function K(){K=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,s=Object.create(i.prototype),a=new R(r||[]);return o(s,"_invoke",{value:k(e,n,a)}),s}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,s,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,s)&&(w=S);var C=b.prototype=v.prototype=Object.create(w);function _(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function $(e,t){function n(o,i,s,a){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==q(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,s,a)},function(e){n("throw",e,s,a)}):t.resolve(u).then(function(e){c.value=e,s(c)},function(e){return n("throw",e,s,a)})}a(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function k(t,n,r){var o=h;return function(i,s){if(o===f)throw Error("Generator is already running");if(o===g){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var l=A(a,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function A(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,A(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(q(t)+" is not iterable")}return y.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},_($.prototype),c($.prototype,a,function(){return this}),t.AsyncIterator=$,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new $(u(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then(function(e){return e.done?e.value:s.next()})},_(C),c(C,l,"Generator"),c(C,s,function(){return this}),c(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Y(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach(function(t){ee(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ee(e,t,n){return(t=function(e){var t=function(e){if("object"!=q(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==q(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var te=function(e){var t,n,r=a(24),s=e.controlClassnames,l=e.controlElements,c=e.debugMode,u=e.enableDragAndDrop,d=e.enableMountQueryChange,h=e.translations,p=e.canDrop,f=null==u||u;r[0]!==h?(t=null!=h?h:{},r[0]=h,r[1]=t):t=r[1],r[2]!==s||r[3]!==l||r[4]!==c||r[5]!==f||r[6]!==d||r[7]!==t?(n={controlClassnames:s,controlElements:l,debugMode:c,enableDragAndDrop:f,enableMountQueryChange:d,translations:t},r[2]=s,r[3]=l,r[4]=c,r[5]=f,r[6]=d,r[7]=t,r[8]=n):n=r[8];var g,m=(0,i.JZ)(n),v=m.enableDragAndDrop,y=re(e.dnd),b=v&&y?"dnd":"no-dnd";if(!v||!y)return r[9]!==m||r[10]!==c||r[11]!==e.children||r[12]!==b?(g=(0,o.jsx)(i.PD.Provider,{value:J(J({},m),{},{enableDragAndDrop:!1,debugMode:c}),children:e.children},b),r[9]=m,r[10]=c,r[11]=e.children,r[12]=b,r[13]=g):g=r[13],g;var w,x=y.DndProvider,S=y.HTML5Backend;return r[14]!==m||r[15]!==v||r[16]!==c||r[17]!==y||r[18]!==p||r[19]!==e.children||r[20]!==b||r[21]!==S||r[22]!==x?(w=(0,o.jsx)(x,{backend:S,debugMode:c,children:(0,o.jsx)(i.PD.Provider,{value:J(J({},m),{},{enableDragAndDrop:v,debugMode:c}),children:(0,o.jsx)(ne,{dnd:y,canDrop:p,children:e.children})},b)},b),r[14]=m,r[15]=v,r[16]=c,r[17]=y,r[18]=p,r[19]=e.children,r[20]=b,r[21]=S,r[22]=x,r[23]=w):w=r[23],w},ne=function(e){var t,n,s,a,l,c,u=(0,r.useContext)(i.PD),h=(0,r.useContext)(d),p=re(e.dnd),f=(0,i.$_)(!1,e.debugMode,u.debugMode),g=(0,i.Fi)(void 0,e.canDrop,h.canDrop),m=(0,i.$_)(!0,e.enableDragAndDrop,u.enableDragAndDrop),v=m&&p?"dnd":"no-dnd",b=(0,r.useMemo)(function(){var t,n,r,o,i,s,a,l,c,d,p,f;return{rule:null!==(t=null!==(n=null===(r=e.controlElements)||void 0===r?void 0:r.rule)&&void 0!==n?n:null===(o=u.controlElements)||void 0===o?void 0:o.rule)&&void 0!==t?t:h.baseControls.rule,ruleGroup:null!==(i=null!==(s=null===(a=e.controlElements)||void 0===a?void 0:a.ruleGroup)&&void 0!==s?s:null===(l=u.controlElements)||void 0===l?void 0:l.ruleGroup)&&void 0!==i?i:h.baseControls.ruleGroup,combinatorSelector:null!==(c=null!==(d=null===(p=e.controlElements)||void 0===p?void 0:p.combinatorSelector)&&void 0!==d?d:null===(f=u.controlElements)||void 0===f?void 0:f.combinatorSelector)&&void 0!==c?c:h.baseControls.combinatorSelector}},[null===(t=e.controlElements)||void 0===t?void 0:t.combinatorSelector,null===(n=e.controlElements)||void 0===n?void 0:n.rule,null===(s=e.controlElements)||void 0===s?void 0:s.ruleGroup,null===(a=u.controlElements)||void 0===a?void 0:a.combinatorSelector,null===(l=u.controlElements)||void 0===l?void 0:l.rule,null===(c=u.controlElements)||void 0===c?void 0:c.ruleGroup,h.baseControls.combinatorSelector,h.baseControls.rule,h.baseControls.ruleGroup]),w=(0,r.useMemo)(function(){return J(J({},u),{},{controlElements:J(J({},u.controlElements),{},{ruleGroup:G,rule:I,inlineCombinator:y})})},[u]);if(!m||!p)return(0,o.jsx)(i.PD.Provider,{value:J(J({},u),{},{enableDragAndDrop:!1,debugMode:f}),children:e.children},v);var x=p.DndContext,S=p.useDrag,C=p.useDrop;return(0,o.jsx)(x.Consumer,{children:function(){return(0,o.jsx)(i.PD.Provider,{value:w,children:(0,o.jsx)(d.Provider,{value:{useDrag:S,useDrop:C,baseControls:b,canDrop:g},children:e.children})},v)}},v)},re=function(e){var t=X((0,r.useState)(null!=e?e:null),2),o=t[0],i=t[1];return(0,r.useEffect)(function(){var e=!1,t=function(){var t,r=(t=K().mark(function t(){var r,o,s,a;return K().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(648).then(n.bind(n,9648)).catch(function(){return null}),n.e(631).then(n.bind(n,3631)).catch(function(){return null})]);case 2:r=t.sent,o=X(r,2),s=o[0],a=o[1],e||s&&a&&i(function(){return J(J({},s),a)});case 7:case"end":return t.stop()}},t)}),function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function s(e){Y(i,r,o,s,a,"next",e)}function a(e){Y(i,r,o,s,a,"throw",e)}s(void 0)})});return function(){return r.apply(this,arguments)}}();return o||t(),function(){e=!0}},[o]),o}},2406(e,t,n){"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{U1:()=>w,Z0:()=>k});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),s={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function a(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function l(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(l)(e,t)}let i=e,c=t,u=new Map,d=u,h=0,p=!1;function f(){d===u&&(d=new Map,u.forEach((e,t)=>{d.set(t,e)}))}function g(){if(p)throw new Error(r(3));return c}function m(e){if("function"!=typeof e)throw new Error(r(4));if(p)throw new Error(r(5));let t=!0;f();const n=h++;return d.set(n,e),function(){if(t){if(p)throw new Error(r(6));t=!1,f(),d.delete(n),u=null}}}function v(e){if(!a(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(p)throw new Error(r(9));try{p=!0,c=i(c,e)}finally{p=!1}return(u=d).forEach(e=>{e()}),e}return v({type:s.INIT}),{dispatch:v,subscribe:m,getState:g,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,v({type:s.REPLACE})},[o]:function(){const e=m;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(g())}return n(),{unsubscribe:e(n)}},[o](){return this}}}}}function c(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function u(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var d=u(),h=u,p=n(1932),f="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?c:c.apply(null,arguments)};function g(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(E(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return a(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var m=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function v(e){return(0,p.a6)(e)?(0,p.jM)(e,()=>{}):e}function y(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var b=e=>t=>{setTimeout(t,e)};function w(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new m;return t&&("boolean"==typeof t?i.push(d):i.push(h(t.extraArgument))),i},{reducer:n,middleware:o,devTools:i=!0,preloadedState:u,enhancers:p}=e||{};let g,v;if("function"==typeof n)g=n;else{if(!a(n))throw new Error(E(1));g=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:s.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))})}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let s=!1;const a={};for(let i=0;i<o.length;i++){const l=o[i],c=n[l],u=e[l],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(r(14));a[l]=d,s=s||d!==u}return s=s||o.length!==Object.keys(e).length,s?a:e}}(n)}v="function"==typeof o?o(t):t();let y=c;i&&(y=f({trace:!1,..."object"==typeof i&&i}));const w=function(...e){return t=>(n,o)=>{const i=t(n,o);let s=()=>{throw new Error(r(15))};const a={getState:i.getState,dispatch:(e,...t)=>s(e,...t)},l=e.map(e=>e(a));return s=c(...l)(i.dispatch),{...i,dispatch:s}}}(...v),x=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new m(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,s=!1;const a=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:b(10):"callback"===e.type?e.queueNotification:b(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,i=!o,i&&(s||(s=!0,l(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r})(w);return l(g,u,y(..."function"==typeof p?p(x):x()))}function x(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(E(28));if(r in t)throw new Error(E(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}var S=Symbol.for("rtk-slice-createasyncthunk");function C(e,t){return`${e}/${t}`}function _({creators:e}={}){const t=e?.asyncThunk?.[S];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(E(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(o),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(E(12));if(n in s.sliceCaseReducersByType)throw new Error(E(13));return s.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(s.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(s.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(s.sliceCaseReducersByName[e]=t,a)};function l(){const[t={},n=[],r]="function"==typeof e.extraReducers?x(e.extraReducers):[e.extraReducers],o={...t,...s.sliceCaseReducersByType};return function(e){let t,[i,a,l]=x(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of s.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>v(e());else{const n=v(e);t=()=>n}function c(e=t(),n){let r=[i[n.type],...a.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[l]),r.reduce((e,t)=>{if(t){if((0,p.Qx)(e)){const r=t(e,n);return void 0===r?e:r}if((0,p.a6)(e))return(0,p.jM)(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return c.getInitialState=t,c}(e.initialState)}i.forEach(r=>{const i=o[r],s={reducerName:r,type:C(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(E(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?g(e,s):g(e))}(s,i,a):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(E(18));const{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:s||A,pending:a||A,rejected:l||A,settled:c||A})}(s,i,a,t)});const c=e=>e,u=new Map;let d;function h(e,t){return d||(d=l()),d(e,t)}function f(){return d||(d=l()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return void 0===r&&n&&(r=f()),r}function o(t=c){const r=y(u,n,()=>new WeakMap);return y(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=$(i,t,f,n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const b={name:n,reducer:h,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:f,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:h},n),{...b,...m(o,!0)}}};return b}}function $(e,t,n,r){function o(o,...i){let s=t(o);return void 0===s&&r&&(s=n()),e(s,...i)}return o.unwrapped=e,o}var k=_();function A(){}var{assign:M}=Object;function E(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},2428(e,t,n){var r=n(7534),o=n(346),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},2429(e,t,n){var r=n(909);e.exports=function(e,t,n,o){return r(e,function(e,r,i){t(o,e,n(e),i)}),o}},2442(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6861);const o=e=>(t,n)=>(0,r.A)(t,t=>{let r,o=t.url,i=t.path;return"string"==typeof i&&(r=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(i=i.replace("?","&")),o=r+i),n({...t,url:o})})},2523(e){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},2552(e,t,n){var r=n(1873),o=n(659),i=n(9350),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},2651(e,t,n){var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2672(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),s=n.n(i)()(o());s.push([e.id,"/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n cursor: -webkit-grab;\n cursor: grab;\n}\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__pane.dragging {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow .react-flow__edges {\n pointer-events: none;\n overflow: visible;\n}\n.react-flow__edge-path,\n.react-flow__connection-path {\n stroke: #b1b1b7;\n stroke-width: 1;\n fill: none;\n}\n.react-flow__edge {\n pointer-events: visibleStroke;\n cursor: pointer;\n}\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n -webkit-animation: dashdraw 0.5s linear infinite;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n -webkit-animation: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge:focus .react-flow__edge-path,\n .react-flow__edge:focus-visible .react-flow__edge-path {\n stroke: #555;\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge-textbg {\n fill: white;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n -webkit-animation: dashdraw 0.5s linear infinite;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__connectionline {\n z-index: 1001;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: -webkit-grab;\n cursor: grab;\n}\n.react-flow__node.dragging {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: -webkit-grab;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background: #1a192b;\n border: 1px solid white;\n border-radius: 100%;\n}\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: -4px;\n transform: translate(-50%, 0);\n }\n.react-flow__handle-top {\n left: 50%;\n top: -4px;\n transform: translate(-50%, 0);\n }\n.react-flow__handle-left {\n top: 50%;\n left: -4px;\n transform: translate(0, -50%);\n }\n.react-flow__handle-right {\n right: -4px;\n top: 50%;\n transform: translate(0, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: rgba(255, 255, 255, 0.5);\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@-webkit-keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-default,\n.react-flow__node-input,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: 3px;\n width: 150px;\n font-size: 12px;\n color: #222;\n text-align: center;\n border-width: 1px;\n border-style: solid;\n border-color: #1a192b;\n background-color: white;\n}\n.react-flow__node-default.selectable:hover, .react-flow__node-input.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n }\n.react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: 0 0 0 0.5px #1a192b;\n }\n.react-flow__node-group {\n background-color: rgba(240, 240, 240, 0.25);\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: rgba(0, 89, 220, 0.08);\n border: 1px dotted rgba(0, 89, 220, 0.8);\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls {\n box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n}\n.react-flow__controls-button {\n border: none;\n background: #fefefe;\n border-bottom: 1px solid #eee;\n box-sizing: content-box;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 16px;\n height: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 5px;\n }\n.react-flow__controls-button:hover {\n background: #f4f4f4;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__minimap {\n background-color: #fff;\n}\n.react-flow__minimap svg {\n display: block;\n}\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: #3367d9;\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: #3367d9;\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n",""]);const a=s},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2711(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){const t=(e,n)=>{const{headers:r={}}=e;for(const o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return n(e);return n({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}},2747(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1386);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},2749(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2797(e,t,n){e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},i.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=i}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",i="(function)(\\s*)(\\*?)",a={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[o.getStartRule("doc-start"),c("no_regex"),a,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:i+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?(?:"+e+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.inherits(a,i),t.JavaScriptHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,i=e.findMatchingBracket({row:t,column:o});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator;function s(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){var a=o,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:a+l+a,selection:!1};var c=n.getCursorPosition(),u=r.doc.getLine(c.row).substring(c.column,c.column+1),d=new i(r,c.row,c.column),h=d.getCurrentToken();if(u==a&&(s(h,"attribute-value")||s(h,"string")))return{text:"",selection:[1,1]};if(h||(h=d.stepBackward()),!h)return;for(;s(h,"tag-whitespace")||s(h,"whitespace");)h=d.stepBackward();var p=!u||u.match(/\s/);if(s(h,"attribute-equals")&&(p||">"==u)||s(h,"decl-attribute-equals")&&(p||"?"==u))return{text:a+a,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)&&r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==i)return o.end.column++,o}),this.add("autoclosing","insertion",function(e,t,n,r,o){if(">"==o){var a=n.getSelectionRange().start,l=new i(r,a.row,a.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(s(c,"tag-name")||s(c,"tag-whitespace")||s(c,"attribute-name")||s(c,"attribute-equals")||s(c,"attribute-value")))return;if(s(c,"reference.attribute-value"))return;if(s(c,"attribute-value")){var u=l.getCurrentTokenColumn()+c.value.length;if(a.column<u)return;if(a.column==u){var d=l.stepForward();if(d&&s(d,"attribute-value"))return;l.stepBackward()}}if(/^\s*>/.test(r.getLine(a.row).slice(a.column)))return;for(;!s(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var h=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(s(l.stepBackward(),"end-tag-open"))return;var f=c.value;if(h==a.row&&(f=f.substring(0,a.column-p)),this.voidElements&&this.voidElements.hasOwnProperty(f.toLowerCase()))return;return{text:"></"+f+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,o){if("\n"==o){var a=n.getCursorPosition(),l=r.getLine(a.row),c=new i(r,a.row,a.column),u=c.getCurrentToken();if(s(u,"")&&-1!==u.type.indexOf("tag-close")){if("/>"==u.value)return;for(;u&&-1===u.type.indexOf("tag-name");)u=c.stepBackward();if(!u)return;var d=u.value,h=c.getCurrentTokenRow();if(!(u=c.stepBackward())||-1!==u.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[d]||!this.voidElements){var p=r.getTokenAt(a.row,a.column+1),f=(l=r.getLine(h),this.$getIndent(l)),g=f+r.getTabString();return p&&"</"===p.value?{text:"\n"+g+"\n"+f,selection:[1,g.length,1,g.length]}:{text:"\n"+g}}}}})};r.inherits(a,o),t.XmlBehaviour=a}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../token_iterator").TokenIterator,i=e("../behaviour/cstyle").CstyleBehaviour,s=e("../behaviour/xml").XmlBehaviour,a=function(){var e=new s({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(e),this.inherit(i),this.add("autoclosing-fragment","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getSelectionRange().start,a=new o(r,s.row,s.column),l=a.getCurrentToken()||a.stepBackward();if(!l)return;if("<"==l.value)return{text:"></>",selection:[1,1]}}})};r.inherits(a,i),t.JavaScriptBehaviour=a}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(s,i);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"===t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())||this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new a,o=0;o<n.length;o++){var i=n[o];if(l(i,"tag-open")){if(r.end.column=r.start.column+i.value.length,r.closing=l(i,"end-tag-open"),!(i=n[++o]))return null;if(r.tagName=i.value,""===i.value){if(!(i=n[++o]))return null;r.tagName=i.value}for(r.end.column+=i.value.length,o++;o<n.length;o++)if(i=n[o],r.end.column+=i.value.length,l(i,"tag-close")){r.selfClosing="/>"==i.value;break}return r}if(l(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var o=e.getTokens(t),i=0,s=0;s<o.length;s++){var a=o[s];if(!((i+=a.value.length)<r-1)&&l(a,"end-tag-open")&&(l(a=o[s+1],"tag-name")&&""===a.value&&(a=o[s+2]),a&&a.value==n))return!0}return!1},this.getFoldWidgetRange=function(e,t,n){if(!this._getFirstTagInLine(e,n))return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var r=e.getMatchingTags({row:n,column:0});return r?new o(r.openTag.end.row,r.openTag.end.column,r.closeTag.start.row,r.closeTag.start.column):void 0}}).call(s.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o,i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);if(o=i.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}return"markbegin"!==t&&(o=i.match(this.foldingStopMarker))?(s=o.index+o[0].length,o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(r>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<i;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new o(s,r,n,t.length)}}.call(s.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new o};r.inherits(s,i),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){return this.getFoldWidgetBase(e,t,n)||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){return this.getFoldWidgetRangeBase(e,t,n,r)||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e)t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(r+=n);else if("doc-start"==e&&("start"==s||"no_regex"==s))return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",s=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",d=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",h=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":s,"support.constant":a,"support.type":i,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:h},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(p,o),t.CssHighlightRules=p}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var o=t.getLine(n.row).substr(0,n.column),i=/\([^)]*$/.test(o);return i&&(o=o.substr(o.lastIndexOf("(")+1)),/:[^;]+$/.test(o)?(/([\w\-]+):[^:]*$/.test(o),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,i)}return[]},this.getPropertyCompletions=function(e,t,n,o,i){return i=i||!1,Object.keys(r).map(function(e){return{caption:e,snippet:e+": $0"+(i?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,o){var i=t.getLine(n.row).substr(0,n.column),s=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!s)return[];var a=[];return s in r&&"object"==typeof r[s]&&(a=Object.keys(r[s])),a.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(o.prototype),t.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,s=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=new i(r,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(s.row);if(":"===c.substring(s.column,s.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===s){var a=n.getCursorPosition(),l=new i(r,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type&&";"===r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o&&n.selection.isEmpty()){var i=n.getCursorPosition();if(";"===r.doc.getLine(i.row).substring(i.column,i.column+1))return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,o){if("!"===o&&n.selection.isEmpty()){var i=n.getCursorPosition(),s=r.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(s.substring(i.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(s,o),t.CssBehaviour=s}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new u};r.inherits(d,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;return o.length&&"comment"==o[o.length-1].type||t.match(/^.*\{\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"--\x3e",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(i,o),t.XmlHighlightRules=i}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){a.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(new s({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,a),t.HtmlHighlightRules=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(i,o),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var o=this.$getMode(e);return o?o.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));return r&&r.getFoldWidget(e,t,n)||(r=this.$getMode(e.getState(n))),r&&r.getFoldWidget(e,t,n)||(r=this.defaultMode),r.getFoldWidgetRange(e,t,n)}}.call(i.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./mixed").FoldMode,i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,a=t.FoldMode=function(e,t){o.call(this,new i(e,t),{"js-":new s,"css-":new s})};r.inherits(a,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"].concat(["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"]),i={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},s=Object.keys(i);function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){for(var n=new r(e,t.row,t.column),o=n.getCurrentToken();o&&!a(o,"tag-name");)o=n.stepBackward();if(o)return o.value}var c=function(){};(function(){this.getCompletions=function(e,t,n,r){var o=t.getTokenAt(n.row,n.column);if(!o)return[];if(a(o,"tag-name")||a(o,"tag-open")||a(o,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(a(o,"tag-whitespace")||a(o,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(a(o,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var i=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(i)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return s.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var s=l(t,n);if(!s)return[];var a=o;return s in i&&(a=a.concat(Object.keys(i[s]))),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,o){var s=l(t,n),c=function(e,t){for(var n=new r(e,t.row,t.column),o=n.getCurrentToken();o&&!a(o,"attribute-name");)o=n.stepBackward();if(o)return o.value}(t,n);if(!s)return[];var u=[];return s in i&&c in i[s]&&"object"==typeof i[s][c]&&(u=Object.keys(i[s][c])),u.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(c.prototype),t.HtmlCompletions=c}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text").Mode,s=e("./javascript").Mode,a=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,d=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],f=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],g=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new d,this.createModeDelegates({"js-":s,"css-":a}),this.foldingRules=new u(this.voidElements,o.arrayToMap(f))};r.inherits(g,i),function(){this.blockComment={start:"\x3c!--",end:"--\x3e"},this.voidElements=o.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==g){var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html_highlight_rules").HtmlHighlightRules;function i(e,t){return t.splice(0,3),t.shift()||"start"}var s=function(){o.call(this);var e={regex:"(?={{)",push:"handlebars"};for(var t in this.$rules)this.$rules[t].unshift(e);this.$rules.handlebars=[{token:"comment.start",regex:"{{!--",push:[{token:"comment.end",regex:"--}}",next:i},{defaultToken:"comment"}]},{token:"comment.start",regex:"{{!",push:[{token:"comment.end",regex:"}}",next:i},{defaultToken:"comment"}]},{token:"support.function",regex:"{{{",push:[{token:"support.function",regex:"}}}",next:i},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]},{token:"storage.type.start",regex:"{{[#\\^/&]?",push:[{token:"storage.type.end",regex:"}}",next:i},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]}],this.normalizeRules()};r.inherits(s,o),t.HandlebarsHighlightRules=s}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../behaviour/xml").XmlBehaviour,i=function(){o.call(this)};r.inherits(i,o),t.HtmlBehaviour=i}),ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html").Mode,i=e("./handlebars_highlight_rules").HandlebarsHighlightRules,s=e("./behaviour/html").HtmlBehaviour,a=(e("./folding/html").FoldMode,function(){o.call(this),this.HighlightRules=i,this.$behaviour=new s});r.inherits(a,o),function(){this.blockComment={start:"{{!--",end:"--}}"},this.$id="ace/mode/handlebars"}.call(a.prototype),t.Mode=a}),ace.require(["ace/mode/handlebars"],function(t){e&&(e.exports=t)})},2804(e,t,n){var r=n(6110)(n(9325),"Promise");e.exports=r},2819(e,t,n){var r=n(9344),o=n(3805);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return o(i)?i:n}}},2865(e,t,n){var r=n(9570),o=n(1811)(r);e.exports=o},2877(e,t,n){var r=n(6155),o=n(6449);e.exports=function(e,t,n,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=i?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},2949(e,t,n){var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},3007(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3034(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"}))},3040(e,t,n){var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},3091(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5556),s=n(1594),a=n(4038),l=n(2189),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return o(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var r=e.diff_main(t,n);e.diff_cleanupSemantic(r);var o=this.generateDiffedLines(r);return this.setCodeMarkers(o)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach(function(e){var r=e[0],o=e[1],i=o.split("\n").length-1;if(0!==o.length){var s=o[0],a=o[o.length-1],l=0;switch(r){case 0:n.left+=i,n.right+=i;break;case-1:"\n"===s&&(n.left++,i--),0===(l=i)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===a&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=i;break;case 1:"\n"===s&&(n.right++,i--),0===(l=i)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===a&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=i;break;default:throw new Error("Diff type was not defined.")}}}),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},r=0;r<e.left.length;r++){var o={startRow:e.left[r].startLine-1,endRow:e.left[r].endLine,type:"text",className:"codeMarker"};n.left.push(o)}for(r=0;r<e.right.length;r++)o={startRow:e.right[r].startLine-1,endRow:e.right[r].endLine,type:"text",className:"codeMarker"},n.right.push(o);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return s.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:i.number,editorProps:i.object,enableBasicAutocompletion:i.bool,enableLiveAutocompletion:i.bool,focus:i.bool,fontSize:i.number,height:i.string,highlightActiveLine:i.bool,maxLines:i.number,minLines:i.number,mode:i.string,name:i.string,className:i.string,onLoad:i.func,onPaste:i.func,onScroll:i.func,onChange:i.func,orientation:i.string,readOnly:i.bool,scrollMargin:i.array,setOptions:i.object,showGutter:i.bool,showPrintMargin:i.bool,splits:i.number,style:i.object,tabSize:i.number,theme:i.string,value:i.array,width:i.string,wrapEnabled:i.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(s.Component);t.default=c},3120(e,t,n){var r=n(4528),o=n(5891);e.exports=function e(t,n,i,s,a){var l=-1,c=t.length;for(i||(i=o),a||(a=[]);++l<c;){var u=t[l];n>0&&i(u)?n>1?e(u,n-1,i,s,a):r(a,u):s||(a[a.length]=u)}return a}},3186(e,t,n){"use strict";var r=n(1594),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,s=r.useRef,a=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=l(function(){function e(e){if(!a){if(a=!0,i=e,e=r(e),void 0!==u&&h.hasValue){var t=h.value;if(u(t,e))return s=t}return s=e}if(t=s,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,s=n)}var i,s,a=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=i(e,d[0],d[1]);return a(function(){h.hasValue=!0,h.value=p},[p]),c(p),p}},3209(e,t,n){var r=n(1596),o=n(3320),i=n(6306),s="__lodash_placeholder__",a=Math.min;e.exports=function(e,t){var n=e[1],l=t[1],c=n|l,u=c<131,d=128==l&&8==n||128==l&&256==n&&e[7].length<=t[8]||384==l&&t[7].length<=t[8]&&8==n;if(!u&&!d)return e;1&l&&(e[2]=t[2],c|=1&n?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?r(p,h,t[4]):h,e[4]=p?i(e[3],s):t[4]}return(h=t[5])&&(p=e[5],e[5]=p?o(p,h,t[6]):h,e[6]=p?i(e[5],s):t[6]),(h=t[7])&&(e[7]=h),128&l&&(e[8]=null==e[8]?t[8]:a(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},3221(e){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}}},3222(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3258(e){"use strict";var t,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{defaultOptions:()=>g,numericQuantity:()=>y,numericRegex:()=>l,numericRegexWithTrailingInvalid:()=>c,parseRomanNumerals:()=>m,romanNumeralRegex:()=>f,romanNumeralUnicodeRegex:()=>p,romanNumeralUnicodeToAsciiMap:()=>h,romanNumeralValues:()=>d,vulgarFractionToAsciiMap:()=>a,vulgarFractionsRegex:()=>u}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))!i.call(e,s)&&void 0!==s&&n(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(n({},"__esModule",{value:!0}),t));var a={"¼":"1/4","½":"1/2","¾":"3/4","⅐":"1/7","⅑":"1/9","⅒":"1/10","⅓":"1/3","⅔":"2/3","⅕":"1/5","⅖":"2/5","⅗":"3/5","⅘":"4/5","⅙":"1/6","⅚":"5/6","⅛":"1/8","⅜":"3/8","⅝":"5/8","⅞":"7/8","⅟":"1/"},l=/^(?=-?\s*\.\d|-?\s*\d)(-)?\s*((?:\d(?:[\d,_]*\d)?)*)(([eE][+-]?\d(?:[\d,_]*\d)?)?|\.\d(?:[\d,_]*\d)?([eE][+-]?\d(?:[\d,_]*\d)?)?|(\s+\d(?:[\d,_]*\d)?\s*)?\s*\/\s*\d(?:[\d,_]*\d)?)?$/,c=new RegExp(l.source.replace(/\$$/,"(?:\\s*[^\\.\\d\\/].*)?")),u=new RegExp(`(${Object.keys(a).join("|")})`),d={MMM:3e3,MM:2e3,M:1e3,CM:900,DCCC:800,DCC:700,DC:600,D:500,CD:400,CCC:300,CC:200,C:100,XC:90,LXXX:80,LXX:70,LX:60,L:50,XL:40,XXX:30,XX:20,XII:12,XI:11,X:10,IX:9,VIII:8,VII:7,VI:6,V:5,IV:4,III:3,II:2,I:1},h={Ⅰ:"I",Ⅱ:"II",Ⅲ:"III",Ⅳ:"IV",Ⅴ:"V",Ⅵ:"VI",Ⅶ:"VII",Ⅷ:"VIII",Ⅸ:"IX",Ⅹ:"X",Ⅺ:"XI",Ⅻ:"XII",Ⅼ:"L",Ⅽ:"C",Ⅾ:"D",Ⅿ:"M",ⅰ:"I",ⅱ:"II",ⅲ:"III",ⅳ:"IV",ⅴ:"V",ⅵ:"VI",ⅶ:"VII",ⅷ:"VIII",ⅸ:"IX",ⅹ:"X",ⅺ:"XI",ⅻ:"XII",ⅼ:"L",ⅽ:"C",ⅾ:"D",ⅿ:"M"},p=new RegExp(`(${Object.keys(h).join("|")})`,"gi"),f=/^(?=[MDCLXVI])(M{0,3})(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$/i,g={round:3,allowTrailingInvalid:!1,romanNumerals:!1},m=e=>{let t=`${e}`.replace(p,(e,t)=>h[t]).toUpperCase(),n=f.exec(t);if(!n)return NaN;let[,r,o,i,s]=n;return(d[r]??0)+(d[o]??0)+(d[i]??0)+(d[s]??0)},v=/^\s*\//,y=(e,t=g)=>{if("number"==typeof e||"bigint"==typeof e)return e;let n=NaN,r=`${e}`.replace(u,(e,t)=>` ${a[t]}`).replace("⁄","/").trim();if(0===r.length)return NaN;let o={...g,...t},i=(o.allowTrailingInvalid?c:l).exec(r);if(!i)return o.romanNumerals?m(r):NaN;let[,s,d,h]=i,p=d.replace(/[,_]/g,""),f=null==h?void 0:h.replace(/[,_]/g,"");if(n=!p&&f&&f.startsWith(".")?0:parseInt(p),!f)return s?-1*n:n;let y=!1===o.round?NaN:parseFloat(`1e${Math.floor(Math.max(0,o.round))}`);if(f.startsWith(".")||f.startsWith("e")||f.startsWith("E")){let e=parseFloat(`${n}${f}`);n=isNaN(y)?e:Math.round(e*y)/y}else if(v.test(f)){let e=parseInt(p),t=parseInt(f.replace("/",""));n=isNaN(y)?e/t:Math.round(e*y/t)/y}else{let e=f.split("/"),[t,r]=e.map(e=>parseInt(e));n+=isNaN(y)?t/r:Math.round(t*y/r)/y}return s?-1*n:n}},3320(e){var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,s=e.length,a=-1,l=r.length,c=-1,u=n.length,d=t(s-l,0),h=Array(d+u),p=!o;++i<d;)h[i]=e[i];for(var f=i;++c<u;)h[f+c]=n[c];for(;++a<l;)(p||i<s)&&(h[f+r[a]]=e[i++]);return h}},3345(e){e.exports=function(){return[]}},3360(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3399(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null==e)throw new TypeError("Expected a string but received a ".concat(e));if("String"!==e.constructor.name)throw new TypeError("Expected a string but received a ".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default},3402(e,t,n){"use strict";function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}n.d(t,{x:()=>r})},3428(e,t,n){"use strict";e.exports=n(3186)},3488(e){e.exports=function(e){return e}},3605(e){e.exports=function(e){return this.__data__.get(e)}},3610(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default,e.exports.default=t.default},3650(e,t,n){var r=n(4335)(Object.keys,Object);e.exports=r},3656(e,t,n){e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},3661(e,t,n){var r=n(3040),o=n(7670),i=n(289),s=n(4509),a=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},3663(e,t,n){var r=n(1799),o=n(776),i=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3683(e,t,n){"use strict";n.d(t,{A:()=>a,j:()=>l});var r=n(6747);function o(e){return function(){this.style.removeProperty(e)}}function i(e,t,n){return function(){this.style.setProperty(e,t,n)}}function s(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function a(e,t,n){return arguments.length>1?this.each((null==t?o:"function"==typeof t?s:i)(e,t,null==n?"":n)):l(this.node(),e)}function l(e,t){return e.style.getPropertyValue(t)||(0,r.A)(e).getComputedStyle(e,null).getPropertyValue(t)}},3693(e,t,n){var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},3714(e,t,n){var r=n(3730);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,s=t.criteria,a=i.length,l=n.length;++o<a;){var c=r(i[o],s[o]);if(c)return o>=l?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}},3729(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3730(e,t,n){var r=n(4394);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,s=r(e),a=void 0!==t,l=null===t,c=t==t,u=r(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||o&&a&&c||!n&&c||!i)return 1;if(!o&&!s&&!u&&e<t||u&&n&&i&&!o&&!s||l&&n&&i||!a&&i||!c)return-1}return 0}},3758(e,t,n){var r=n(980),o=n(6017),i=n(4033),s=n(6449),a=n(346),l=n(257),c=Object.prototype.hasOwnProperty;function u(e){if(a(e)&&!s(e)&&!(e instanceof r)){if(e instanceof o)return e;if(c.call(e,"__wrapped__"))return l(e)}return new o(e)}u.prototype=i.prototype,u.prototype.constructor=u,e.exports=u},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3915(e,t,n){var r=n(8859),o=n(5325),i=n(9905),s=n(4932),a=n(7301),l=n(9219);e.exports=function(e,t,n,c){var u=-1,d=o,h=!0,p=e.length,f=[],g=t.length;if(!p)return f;n&&(t=s(t,a(n))),c?(d=i,h=!1):t.length>=200&&(d=l,h=!1,t=new r(t));e:for(;++u<p;){var m=e[u],v=null==n?m:n(m);if(m=c||0!==m?m:0,h&&v==v){for(var y=g;y--;)if(t[y]===v)continue e;f.push(m)}else d(t,v,c)||f.push(m)}return f}},3937(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},3945(e){e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(r,s,n(s),e)}return r}},3950(e){e.exports=function(){}},3988(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}))},4033(e){e.exports=function(){}},4038(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5707),a=(0,s.getAceInstance)(),l=n(952),c=n(9),u=n(5556),d=n(1594),h=n(8142),p=n(6762),f=function(e){function t(t){var n=e.call(this,t)||this;return s.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=s.debounce,n}return o(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,o=t.mode,i=t.focus,l=t.theme,u=t.fontSize,d=t.value,h=t.defaultValue,f=t.cursorStart,g=t.showGutter,m=t.wrapEnabled,v=t.showPrintMargin,y=t.scrollMargin,b=void 0===y?[0,0,0,0]:y,w=t.keyboardHandler,x=t.onLoad,S=t.commands,C=t.annotations,_=t.markers,$=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),r&&r(a);var k=Object.keys(this.props.editorProps),A=new c.Split(this.editor.container,"ace/theme/".concat(l),$);this.editor.env.split=A,this.splitEditor=A.getEditor(0),this.split=A,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var M=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),A.forEach(function(t,n){for(var r=0;r<k.length;r++)t[k[r]]=e.props.editorProps[k[r]];var i=p(h,n),c=p(d,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(b[0],b[1],b[2],b[3]),t.getSession().setMode("ace/mode/".concat(o)),t.setFontSize(u),t.renderer.setShowGutter(g),t.getSession().setUseWrapMode(m),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===i?c:i,f);var y=p(C,n,[]),x=p(_,n,[]);for(t.getSession().setAnnotations(y),x&&x.length>0&&e.handleMarkers(x,t),r=0;r<s.editorOptions.length;r++){var $=s.editorOptions[r];M.hasOwnProperty($)?t.setOption($,e.props[$]):e.props[$]&&console.warn("ReaceAce: editor option ".concat($," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(S)&&S.forEach(function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)}),w&&t.setKeyboardHandler("ace/keyboard/"+w)}),n&&(this.refEditor.className+=" "+n),i&&this.splitEditor.focus();var E=this.editor.env.split;E.setOrientation("below"===this.props.orientation?E.BELOW:E.BESIDE),E.resize(!0),x&&x(E)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,o=this.editor.env.split;if(r.splits!==n.splits&&o.setSplits(r.splits),r.orientation!==n.orientation&&o.setOrientation("below"===r.orientation?o.BELOW:o.BESIDE),o.forEach(function(e,o){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var i=0;i<s.editorOptions.length;i++){var a=s.editorOptions[i];r[a]!==n[a]&&e.setOption(a,r[a])}h(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=p(r.value,o,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=p(r.annotations,o,[]),d=p(n.annotations,o,[]);h(u,d)||e.getSession().setAnnotations(u);var f=p(r.markers,o,[]),g=p(n.markers,o,[]);!h(f,g)&&Array.isArray(f)&&t.handleMarkers(f,e)}),r.className!==n.className){var i=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach(function(e){var t=i.indexOf(e);i.splice(t,1)}),this.refEditor.className=" "+r.className+" "+i.join(" ")}r.theme!==n.theme&&o.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getValue())}),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,o=e.endRow,i=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,d=new l.Range(n,r,o,i);t.getSession().addMarker(d,s,a,u)})},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,s=i({width:n,height:r},o);return d.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(d.Component);t.default=f},4128(e,t,n){var r=n(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},4164(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},4168(e,t,n){var r=n(1033),o=n(2819),i=n(9325);e.exports=function(e,t,n,s){var a=1&t,l=o(e);return function t(){for(var o=-1,c=arguments.length,u=-1,d=s.length,h=Array(d+c),p=this&&this!==i&&this instanceof t?l:e;++u<d;)h[u]=s[u];for(;c--;)h[u++]=arguments[++o];return r(p,a?n:this,h)}}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4232(e,t,n){"use strict";n.d(t,{s_:()=>yt,GS:()=>ct});var r=n(1089),o=n(9274);function i(e){return((e=Math.exp(e))+1/e)/2}const s=function e(t,n,r){function o(e,o){var s,a,l=e[0],c=e[1],u=e[2],d=o[0],h=o[1],p=o[2],f=d-l,g=h-c,m=f*f+g*g;if(m<1e-12)a=Math.log(p/u)/t,s=function(e){return[l+e*f,c+e*g,u*Math.exp(t*e*a)]};else{var v=Math.sqrt(m),y=(p*p-u*u+r*m)/(2*u*n*v),b=(p*p-u*u-r*m)/(2*p*n*v),w=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(b*b+1)-b);a=(x-w)/t,s=function(e){var r,o=e*a,s=i(w),d=u/(n*v)*(s*(r=t*o+w,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w));return[l+d*f,c+d*g,u*s/i(t*o+w)]}}return s.duration=1e3*a*t/Math.SQRT2,s}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4);var a,l,c=n(183),u=n(9216),d=n(8227),h=0,p=0,f=0,g=0,m=0,v=0,y="object"==typeof performance&&performance.now?performance:Date,b="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function w(){return m||(b(x),m=y.now()+v)}function x(){m=0}function S(){this._call=this._time=this._next=null}function C(e,t,n){var r=new S;return r.restart(e,t,n),r}function _(){m=(g=y.now())+v,h=p=0;try{!function(){w(),++h;for(var e,t=a;t;)(e=m-t._time)>=0&&t._call.call(void 0,e),t=t._next;--h}()}finally{h=0,function(){for(var e,t,n=a,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:a=t);l=e,k(r)}(),m=0}}function $(){var e=y.now(),t=e-g;t>1e3&&(v-=t,g=e)}function k(e){h||(p&&(p=clearTimeout(p)),e-m>24?(e<1/0&&(p=setTimeout(_,e-y.now()-v)),f&&(f=clearInterval(f))):(f||(g=y.now(),f=setInterval($,1e3)),h=1,b(_)))}function A(e,t,n){var r=new S;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}S.prototype=C.prototype={constructor:S,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?w():+n)+(null==t?0:+t),this._next||l===this||(l?l._next=this:a=this,l=this),this._call=e,this._time=n,k()},stop:function(){this._call&&(this._call=null,this._time=1/0,k())}};var M=(0,r.A)("start","end","cancel","interrupt"),E=[];function R(e,t,n,r,o,i){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(l){var c,u,d,h;if(1!==n.state)return a();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return A(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(A(function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(a),n.state=5,1),i=-1,s=r.length;++i<s;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=C(function(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:o,on:M,tween:E,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function T(e,t){var n=N(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function L(e,t){var n=N(e,t);if(n.state>3)throw new Error("too late; already running");return n}function N(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function O(e,t){var n,r,o,i=e.__transition,s=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):s=!1;s&&delete e.__transition}}function I(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var D,P=180/Math.PI,j={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function z(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*P,skewX:Math.atan(l)*P,scaleX:s,scaleY:a}}function F(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,s){var a=[],l=[];return i=e(i),s=e(s),function(e,r,o,i,s,a){if(e!==o||r!==i){var l=s.push("translate(",null,t,null,n);a.push({i:l-4,x:I(e,o)},{i:l-2,x:I(r,i)})}else(o||i)&&s.push("translate("+o+t+i+n)}(i.translateX,i.translateY,s.translateX,s.translateY,a,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:I(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,s.rotate,a,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:I(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,s.skewX,a,l),function(e,t,n,r,i,s){if(e!==n||t!==r){var a=i.push(o(i)+"scale(",null,",",null,")");s.push({i:a-4,x:I(e,n)},{i:a-2,x:I(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,s.scaleX,s.scaleY,a,l),i=s=null,function(e){for(var t,n=-1,r=l.length;++n<r;)a[(t=l[n]).i]=t.x(e);return a.join("")}}}var B=F(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?j:z(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),H=F(function(e){return null==e?j:(D||(D=document.createElementNS("http://www.w3.org/2000/svg","g")),D.setAttribute("transform",e),(e=D.transform.baseVal.consolidate())?z((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):j)},", ",")",")"),W=n(7268);function G(e,t){var n,r;return function(){var o=L(this,e),i=o.tween;if(i!==n)for(var s=0,a=(r=n=i).length;s<a;++s)if(r[s].name===t){(r=r.slice()).splice(s,1);break}o.tween=r}}function V(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=L(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a;break}l===c&&o.push(a)}i.tween=o}}function U(e,t,n){var r=e._id;return e.each(function(){var e=L(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return N(e,r).value[t]}}function q(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function K(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Y(){}var X=.7,Q=1/X,Z="\\s*([+-]?\\d+)\\s*",J="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",te=/^#([0-9a-f]{3,8})$/,ne=new RegExp(`^rgb\\(${Z},${Z},${Z}\\)$`),re=new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`),oe=new RegExp(`^rgba\\(${Z},${Z},${Z},${J}\\)$`),ie=new RegExp(`^rgba\\(${ee},${ee},${ee},${J}\\)$`),se=new RegExp(`^hsl\\(${J},${ee},${ee}\\)$`),ae=new RegExp(`^hsla\\(${J},${ee},${ee},${J}\\)$`),le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ce(){return this.rgb().formatHex()}function ue(){return this.rgb().formatRgb()}function de(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=te.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?he(t):3===n?new ge(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?pe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?pe(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ne.exec(e))?new ge(t[1],t[2],t[3],1):(t=re.exec(e))?new ge(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=oe.exec(e))?pe(t[1],t[2],t[3],t[4]):(t=ie.exec(e))?pe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=se.exec(e))?xe(t[1],t[2]/100,t[3]/100,1):(t=ae.exec(e))?xe(t[1],t[2]/100,t[3]/100,t[4]):le.hasOwnProperty(e)?he(le[e]):"transparent"===e?new ge(NaN,NaN,NaN,0):null}function he(e){return new ge(e>>16&255,e>>8&255,255&e,1)}function pe(e,t,n,r){return r<=0&&(e=t=n=NaN),new ge(e,t,n,r)}function fe(e,t,n,r){return 1===arguments.length?((o=e)instanceof Y||(o=de(o)),o?new ge((o=o.rgb()).r,o.g,o.b,o.opacity):new ge):new ge(e,t,n,null==r?1:r);var o}function ge(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function me(){return`#${we(this.r)}${we(this.g)}${we(this.b)}`}function ve(){const e=ye(this.opacity);return`${1===e?"rgb(":"rgba("}${be(this.r)}, ${be(this.g)}, ${be(this.b)}${1===e?")":`, ${e})`}`}function ye(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function be(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function we(e){return((e=be(e))<16?"0":"")+e.toString(16)}function xe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,n,r)}function Se(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof Y||(e=de(e)),!e)return new Ce;if(e instanceof Ce)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(s=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new Ce(s,a,l,e.opacity)}function Ce(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _e(e){return(e=(e||0)%360)<0?e+360:e}function $e(e){return Math.max(0,Math.min(1,e||0))}function ke(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Ae(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}q(Y,de,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ce,formatHex:ce,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Se(this).formatHsl()},formatRgb:ue,toString:ue}),q(ge,fe,K(Y,{brighter(e){return e=null==e?Q:Math.pow(Q,e),new ge(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?X:Math.pow(X,e),new ge(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ge(be(this.r),be(this.g),be(this.b),ye(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:me,formatHex:me,formatHex8:function(){return`#${we(this.r)}${we(this.g)}${we(this.b)}${we(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ve,toString:ve})),q(Ce,function(e,t,n,r){return 1===arguments.length?Se(e):new Ce(e,t,n,null==r?1:r)},K(Y,{brighter(e){return e=null==e?Q:Math.pow(Q,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?X:Math.pow(X,e),new Ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ge(ke(e>=240?e-240:e+120,o,r),ke(e,o,r),ke(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ce(_e(this.h),$e(this.s),$e(this.l),ye(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ye(this.opacity);return`${1===e?"hsl(":"hsla("}${_e(this.h)}, ${100*$e(this.s)}%, ${100*$e(this.l)}%${1===e?")":`, ${e})`}`}}));const Me=e=>()=>e;function Ee(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Me(isNaN(e)?t:e)}const Re=function e(t){var n=function(e){return 1===(e=+e)?Ee:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Me(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=fe(e)).r,(t=fe(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),s=Ee(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function Te(e){return function(t){var n,r,o=t.length,i=new Array(o),s=new Array(o),a=new Array(o);for(n=0;n<o;++n)r=fe(t[n]),i[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return i=e(i),s=e(s),a=e(a),r.opacity=1,function(e){return r.r=i(e),r.g=s(e),r.b=a(e),r+""}}}Te(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,a=r<t-1?e[r+2]:2*i-o;return Ae((n-r/t)*t,s,o,i,a)}}),Te(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return Ae((n-r/t)*t,o,i,s,a)}});var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ne=new RegExp(Le.source,"g");function Oe(e,t){var n,r,o,i=Le.lastIndex=Ne.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=Le.exec(e))&&(r=Ne.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:I(n,r)})),i=Ne.lastIndex;return i<t.length&&(o=t.slice(i),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}function Ie(e,t){var n;return("number"==typeof t?I:t instanceof de?Re:(n=de(t))?(t=n,Re):Oe)(e,t)}function De(e){return function(){this.removeAttribute(e)}}function Pe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function je(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function ze(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function Fe(e,t,n){var r,o,i;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttribute(e))===(a=l+"")?null:s===r&&a===o?i:(o=a,i=t(r=s,l));this.removeAttribute(e)}}function Be(e,t,n){var r,o,i;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:s===r&&a===o?i:(o=a,i=t(r=s,l));this.removeAttributeNS(e.space,e.local)}}function He(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function We(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function Ge(e,t){return function(){T(this,e).delay=+t.apply(this,arguments)}}function Ve(e,t){return t=+t,function(){T(this,e).delay=t}}function Ue(e,t){return function(){L(this,e).duration=+t.apply(this,arguments)}}function qe(e,t){return t=+t,function(){L(this,e).duration=t}}var Ke=n(6541),Ye=n(574),Xe=n(747),Qe=d.Ay.prototype.constructor,Ze=n(3683);function Je(e){return function(){this.style.removeProperty(e)}}var et=0;function tt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function nt(){return++et}var rt=d.Ay.prototype;tt.prototype=function(e){return(0,d.Ay)().transition(e)}.prototype={constructor:tt,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=(0,Ye.A)(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a,l,c=r[s],u=c.length,d=i[s]=new Array(u),h=0;h<u;++h)(a=c[h])&&(l=e.call(a,a.__data__,h,c))&&("__data__"in a&&(l.__data__=a.__data__),d[h]=l,R(d[h],t,n,h,d,N(a,n)));return new tt(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=(0,Xe.A)(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l,c=r[a],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,p=e.call(l,l.__data__,d,c),f=N(l,n),g=0,m=p.length;g<m;++g)(h=p[g])&&R(h,t,n,g,p,f);i.push(p),s.push(l)}return new tt(i,s,t,n)},selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:function(e){"function"!=typeof e&&(e=(0,Ke.A)(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,s=t[o],a=s.length,l=r[o]=[],c=0;c<a;++c)(i=s[c])&&e.call(i,i.__data__,c,s)&&l.push(i);return new tt(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l,c=t[a],u=n[a],d=c.length,h=s[a]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(h[p]=l);for(;a<r;++a)s[a]=t[a];return new tt(s,this._parents,this._name,this._id)},selection:function(){return new Qe(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=nt(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s,a=r[i],l=a.length,c=0;c<l;++c)if(s=a[c]){var u=N(s,t);R(s,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new tt(r,this._parents,e,n)},call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:function(e,t){var n=this._id;return arguments.length<2?N(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?T:L;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=(0,W.A)(e),r="transform"===n?H:Ie;return this.attrTween(e,"function"==typeof t?(n.local?Be:Fe)(n,r,U(this,"attr."+e,t)):null==t?(n.local?Pe:De)(n):(n.local?ze:je)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=(0,W.A)(e);return this.tween(n,(r.local?He:We)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?B:Ie;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=(0,Ze.j)(this,e),s=(this.style.removeProperty(e),(0,Ze.j)(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}(e,r)).on("end.style."+e,Je(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var s=(0,Ze.j)(this,e),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(e),l=a=(0,Ze.j)(this,e)),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}(e,r,U(this,"style."+e,t))).each(function(e,t){var n,r,o,i,s="style."+t,a="end."+s;return function(){var l=L(this,e),c=l.on,u=null==l.value[s]?i||(i=Je(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(a,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var s=(0,Ze.j)(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,i,n)),r}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(U(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=N(this.node(),n).tween,i=0,s=o.length;i<s;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?G:V)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ge:Ve)(t,e)):N(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ue:qe)(t,e)):N(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){L(this,e).ease=t}}(t,e)):N(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;L(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){0===--o&&i()}};n.each(function(){var n=L(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t}),0===o&&i()})},[Symbol.iterator]:rt[Symbol.iterator]};var ot={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function it(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}d.Ay.prototype.interrupt=function(e){return this.each(function(){O(this,e)})},d.Ay.prototype.transition=function(e){var t,n;e instanceof tt?(t=e._id,e=e._name):(t=nt(),(n=ot).time=w(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s,a=r[i],l=a.length,c=0;c<l;++c)(s=a[c])&&R(s,e,t,c,a,n||it(s,t));return new tt(r,this._parents,e,t)};const st=e=>()=>e;function at(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function lt(e,t,n){this.k=e,this.x=t,this.y=n}lt.prototype={constructor:lt,scale:function(e){return 1===e?this:new lt(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new lt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ct=new lt(1,0,0);function ut(e){e.stopImmediatePropagation()}function dt(e){e.preventDefault(),e.stopImmediatePropagation()}function ht(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function pt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ft(){return this.__zoom||ct}function gt(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function mt(){return navigator.maxTouchPoints||"ontouchstart"in this}function vt(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function yt(){var e,t,n,i=ht,a=pt,l=vt,d=gt,h=mt,p=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],g=250,m=s,v=(0,r.A)("start","zoom","end"),y=0,b=10;function w(e){e.property("__zoom",ft).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",E).filter(h).on("touchstart.zoom",R).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(e,t){return(t=Math.max(p[0],Math.min(p[1],t)))===e.k?e:new lt(t,e.x,e.y)}function S(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new lt(e.k,r,o)}function C(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function _(e,t,n,r){e.on("start.zoom",function(){$(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(r).end()}).tween("zoom",function(){var e=this,o=arguments,i=$(e,o).event(r),s=a.apply(e,o),l=null==n?C(s):"function"==typeof n?n.apply(e,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,d="function"==typeof t?t.apply(e,o):t,h=m(u.invert(l).concat(c/u.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=h(e),n=c/t[2];e=new lt(n,l[0]-t[0]*n,l[1]-t[1]*n)}i.zoom(null,e)}})}function $(e,t,n){return!n&&e.__zooming||new k(e,t)}function k(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=a.apply(e,t),this.taps=0}function A(e,...t){if(i.apply(this,arguments)){var n=$(this,t).event(e),r=this.__zoom,o=Math.max(p[0],Math.min(p[1],r.k*Math.pow(2,d.apply(this,arguments)))),s=(0,u.A)(e);if(n.wheel)n.mouse[0][0]===s[0]&&n.mouse[0][1]===s[1]||(n.mouse[1]=r.invert(n.mouse[0]=s)),clearTimeout(n.wheel);else{if(r.k===o)return;n.mouse=[s,r.invert(s)],O(this),n.start()}dt(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",l(S(x(r,o),n.mouse[0],n.mouse[1]),n.extent,f))}}function M(e,...t){if(!n&&i.apply(this,arguments)){var r=e.currentTarget,s=$(this,t,!0).event(e),a=(0,c.A)(e.view).on("mousemove.zoom",function(e){if(dt(e),!s.moved){var t=e.clientX-h,n=e.clientY-p;s.moved=t*t+n*n>y}s.event(e).zoom("mouse",l(S(s.that.__zoom,s.mouse[0]=(0,u.A)(e,r),s.mouse[1]),s.extent,f))},!0).on("mouseup.zoom",function(e){a.on("mousemove.zoom mouseup.zoom",null),(0,o.y)(e.view,s.moved),dt(e),s.event(e).end()},!0),d=(0,u.A)(e,r),h=e.clientX,p=e.clientY;(0,o.A)(e.view),ut(e),s.mouse=[d,this.__zoom.invert(d)],O(this),s.start()}}function E(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,r=(0,u.A)(e.changedTouches?e.changedTouches[0]:e,this),o=n.invert(r),s=n.k*(e.shiftKey?.5:2),d=l(S(x(n,s),r,o),a.apply(this,t),f);dt(e),g>0?(0,c.A)(this).transition().duration(g).call(_,d,r,e):(0,c.A)(this).call(w.transform,d,r,e)}}function R(n,...r){if(i.apply(this,arguments)){var o,s,a,l,c=n.touches,d=c.length,h=$(this,r,n.changedTouches.length===d).event(n);for(ut(n),s=0;s<d;++s)a=c[s],l=[l=(0,u.A)(a,this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),o&&(h.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),O(this),h.start())}}function T(e,...t){if(this.__zooming){var n,r,o,i,s=$(this,t).event(e),a=e.changedTouches,c=a.length;for(dt(e),n=0;n<c;++n)r=a[n],o=(0,u.A)(r,this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var d=s.touch0[0],h=s.touch0[1],p=s.touch1[0],g=s.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,v=(v=g[0]-h[0])*v+(v=g[1]-h[1])*v;r=x(r,Math.sqrt(m/v)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],i=[(h[0]+g[0])/2,(h[1]+g[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],i=s.touch0[1]}s.zoom("touch",l(S(r,o,i),s.extent,f))}}function L(e,...r){if(this.__zooming){var o,i,s=$(this,r).event(e),a=e.changedTouches,l=a.length;for(ut(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),o=0;o<l;++o)i=a[o],s.touch0&&s.touch0[2]===i.identifier?delete s.touch0:s.touch1&&s.touch1[2]===i.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(i=(0,u.A)(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<b)){var d=(0,c.A)(this).on("dblclick.zoom");d&&d.apply(this,arguments)}}}return w.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",ft),e!==o?_(e,t,n,r):o.interrupt().each(function(){$(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},w.scaleBy=function(e,t,n,r){w.scaleTo(e,function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)},n,r)},w.scaleTo=function(e,t,n,r){w.transform(e,function(){var e=a.apply(this,arguments),r=this.__zoom,o=null==n?C(e):"function"==typeof n?n.apply(this,arguments):n,i=r.invert(o),s="function"==typeof t?t.apply(this,arguments):t;return l(S(x(r,s),o,i),e,f)},n,r)},w.translateBy=function(e,t,n,r){w.transform(e,function(){return l(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),a.apply(this,arguments),f)},null,r)},w.translateTo=function(e,t,n,r,o){w.transform(e,function(){var e=a.apply(this,arguments),o=this.__zoom,i=null==r?C(e):"function"==typeof r?r.apply(this,arguments):r;return l(ct.translate(i[0],i[1]).scale(o.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,f)},r,o)},k.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=(0,c.A)(this.that).datum();v.call(e,this.that,new at(e,{sourceEvent:this.sourceEvent,target:w,type:e,transform:this.that.__zoom,dispatch:v}),t)}},w.wheelDelta=function(e){return arguments.length?(d="function"==typeof e?e:st(+e),w):d},w.filter=function(e){return arguments.length?(i="function"==typeof e?e:st(!!e),w):i},w.touchable=function(e){return arguments.length?(h="function"==typeof e?e:st(!!e),w):h},w.extent=function(e){return arguments.length?(a="function"==typeof e?e:st([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),w):a},w.scaleExtent=function(e){return arguments.length?(p[0]=+e[0],p[1]=+e[1],w):[p[0],p[1]]},w.translateExtent=function(e){return arguments.length?(f[0][0]=+e[0][0],f[1][0]=+e[1][0],f[0][1]=+e[0][1],f[1][1]=+e[1][1],w):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},w.constrain=function(e){return arguments.length?(l=e,w):l},w.duration=function(e){return arguments.length?(g=+e,w):g},w.interpolate=function(e){return arguments.length?(m=e,w):m},w.on=function(){var e=v.on.apply(v,arguments);return e===v?w:e},w.clickDistance=function(e){return arguments.length?(y=(e=+e)*e,w):Math.sqrt(y)},w.tapDistance=function(e){return arguments.length?(b=+e,w):b},w}lt.prototype},4247(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4335(e){e.exports=function(e,t){return function(n){return e(t(n))}}},4394(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},4458(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}))},4509(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4528(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4552(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4629(e){e.exports={}},4641(e,t,n){var r=n(8882),o=n(1811)(r);e.exports=o},4647(e,t,n){var r=n(4552)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},4664(e,t,n){var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),function(t){return i.call(e,t)}))}:o;e.exports=a},4707(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},4713(e,t,n){var r=n(2523),o=n(5389),i=n(1489),s=Math.max;e.exports=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var l=null==n?0:i(n);return l<0&&(l=s(a+l,0)),r(e,o(t,3),l)}},4739(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4840(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4848(e,t,n){"use strict";e.exports=n(1020)},4889(e,t,n){var r=n(3915),o=n(3120),i=n(9302),s=n(3693),a=n(8090),l=i(function(e,t){var n=a(t);return s(n)&&(n=void 0),s(e)?r(e,o(t,1,s,!0),void 0,n):[]});e.exports=l},4894(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901(e,t,n){var r=n(2552),o=n(294),i=n(346),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["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[r(e)]}},4932(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},4944(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1386);n(8939);const o="undefined"==typeof window?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback,i=function(e,t={step:1}){const{step:n=1}=t,[i,s]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let t=function(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(!t.includes(o))break;n.push(o)}return n}(e,i);t.length<n&&(t=t.concat(e.slice(t.length,n))),s(t);const a=(()=>{const e=new Map;let t=!1;const n=r=>{for(const[t,n]of e)if(e.delete(t),n(),"number"==typeof r||r.timeRemaining()<=0)break;0!==e.size?o(n):t=!1};return{add:(r,i)=>{e.set(r,i),t||(t=!0,o(n))},flush:t=>{const n=e.get(t);return void 0!==n&&(e.delete(t),n(),!0)},cancel:t=>e.delete(t),reset:()=>{e.clear(),t=!1}}})();for(let o=t.length;o<e.length;o+=n)a.add({},()=>{(0,r.flushSync)(()=>{s(t=>[...t,...e.slice(o,o+n)])})});return()=>a.reset()},[e]),i}},5008(e,t,n){"use strict";n.d(t,{PD:()=>y,r6:()=>Ln,Ie:()=>W,W:()=>A,YM:()=>gn,lV:()=>C,Ws:()=>dt,gI:()=>mt,Hh:()=>Nt,OJ:()=>Rt,_6:()=>Ot,Yr:()=>on,QX:()=>Dt,P9:()=>It,q4:()=>$,tN:()=>Z,JZ:()=>bn,Fi:()=>Wt,$_:()=>Ht});var r=n(1594),o=n(4848),i=n(1468),s=n(2406),a={"¼":"1/4","½":"1/2","¾":"3/4","⅐":"1/7","⅑":"1/9","⅒":"1/10","⅓":"1/3","⅔":"2/3","⅕":"1/5","⅖":"2/5","⅗":"3/5","⅘":"4/5","⅙":"1/6","⅚":"5/6","⅛":"1/8","⅜":"3/8","⅝":"5/8","⅞":"7/8","⅟":"1/"},l=/^(?=-?\s*\.\d|-?\s*\d)(-)?\s*((?:\d(?:[\d,_]*\d)?)*)(([eE][+-]?\d(?:[\d,_]*\d)?)?|\.\d(?:[\d,_]*\d)?([eE][+-]?\d(?:[\d,_]*\d)?)?|(\s+\d(?:[\d,_]*\d)?\s*)?\s*\/\s*\d(?:[\d,_]*\d)?)?$/,c=new RegExp(l.source.replace(/\$$/,"(?:\\s*[^\\.\\d\\/].*)?")),u=new RegExp(`(${Object.keys(a).join("|")})`),d={MMM:3e3,MM:2e3,M:1e3,CM:900,DCCC:800,DCC:700,DC:600,D:500,CD:400,CCC:300,CC:200,C:100,XC:90,LXXX:80,LXX:70,LX:60,L:50,XL:40,XXX:30,XX:20,XII:12,XI:11,X:10,IX:9,VIII:8,VII:7,VI:6,V:5,IV:4,III:3,II:2,I:1},h={Ⅰ:"I",Ⅱ:"II",Ⅲ:"III",Ⅳ:"IV",Ⅴ:"V",Ⅵ:"VI",Ⅶ:"VII",Ⅷ:"VIII",Ⅸ:"IX",Ⅹ:"X",Ⅺ:"XI",Ⅻ:"XII",Ⅼ:"L",Ⅽ:"C",Ⅾ:"D",Ⅿ:"M",ⅰ:"I",ⅱ:"II",ⅲ:"III",ⅳ:"IV",ⅴ:"V",ⅵ:"VI",ⅶ:"VII",ⅷ:"VIII",ⅸ:"IX",ⅹ:"X",ⅺ:"XI",ⅻ:"XII",ⅼ:"L",ⅽ:"C",ⅾ:"D",ⅿ:"M"},p=new RegExp(`(${Object.keys(h).join("|")})`,"gi"),f=/^(?=[MDCLXVI])(M{0,3})(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$/i,g={round:3,allowTrailingInvalid:!1,romanNumerals:!1},m=/^\s*\//,v=n(1932),y=(0,r.createContext)({}),b=e=>(0,o.jsx)("button",{type:"button","data-testid":e.testID,disabled:e.disabled&&!e.disabledTranslation,className:e.className,title:e.disabledTranslation&&e.disabled?e.disabledTranslation.title:e.title,onClick:t=>e.handleOnClick(t),children:e.disabledTranslation&&e.disabled?e.disabledTranslation.label:e.label}),w=(0,r.forwardRef)((e,t)=>(0,o.jsx)("span",{"data-testid":e.testID,ref:t,className:e.className,title:e.title,children:e.label})),x="------",S={fields:{title:"Fields",placeholderName:"~",placeholderLabel:x,placeholderGroupLabel:x},operators:{title:"Operators",placeholderName:"~",placeholderLabel:x,placeholderGroupLabel:x},values:{title:"Values",placeholderName:"~",placeholderLabel:x,placeholderGroupLabel:x},value:{title:"Value"},removeRule:{label:"⨯",title:"Remove rule"},removeGroup:{label:"⨯",title:"Remove group"},addRule:{label:"+ Rule",title:"Add rule"},addGroup:{label:"+ Group",title:"Add group"},combinators:{title:"Combinators"},notToggle:{label:"Not",title:"Invert this group"},cloneRule:{label:"⧉",title:"Clone rule"},cloneRuleGroup:{label:"⧉",title:"Clone group"},shiftActionUp:{label:"˄",title:"Shift up"},shiftActionDown:{label:"˅",title:"Shift down"},dragHandle:{label:"⁞⁞",title:"Drag handle"},lockRule:{label:"🔓",title:"Lock rule"},lockGroup:{label:"🔓",title:"Lock group"},lockRuleDisabled:{label:"🔒",title:"Unlock rule"},lockGroupDisabled:{label:"🔒",title:"Unlock group"},valueSourceSelector:{title:"Value source"}},C=[{name:"=",value:"=",label:"="},{name:"!=",value:"!=",label:"!="},{name:"<",value:"<",label:"<"},{name:">",value:">",label:">"},{name:"<=",value:"<=",label:"<="},{name:">=",value:">=",label:">="},{name:"contains",value:"contains",label:"contains"},{name:"beginsWith",value:"beginsWith",label:"begins with"},{name:"endsWith",value:"endsWith",label:"ends with"},{name:"doesNotContain",value:"doesNotContain",label:"does not contain"},{name:"doesNotBeginWith",value:"doesNotBeginWith",label:"does not begin with"},{name:"doesNotEndWith",value:"doesNotEndWith",label:"does not end with"},{name:"null",value:"null",label:"is null"},{name:"notNull",value:"notNull",label:"is not null"},{name:"in",value:"in",label:"in"},{name:"notIn",value:"notIn",label:"not in"},{name:"between",value:"between",label:"between"},{name:"notBetween",value:"notBetween",label:"not between"}],_=[{name:"and",value:"and",label:"AND"},{name:"or",value:"or",label:"OR"}],$={queryBuilder:"queryBuilder",ruleGroup:"ruleGroup",header:"ruleGroup-header",body:"ruleGroup-body",combinators:"ruleGroup-combinators",addRule:"ruleGroup-addRule",addGroup:"ruleGroup-addGroup",cloneRule:"rule-cloneRule",cloneGroup:"ruleGroup-cloneGroup",removeGroup:"ruleGroup-remove",notToggle:"ruleGroup-notToggle",rule:"rule",fields:"rule-fields",operators:"rule-operators",value:"rule-value",removeRule:"rule-remove",betweenRules:"betweenRules",valid:"queryBuilder-valid",invalid:"queryBuilder-invalid",shiftActions:"shiftActions",dndDragging:"dndDragging",dndOver:"dndOver",dndCopy:"dndCopy",dndGroup:"dndGroup",dragHandle:"queryBuilder-dragHandle",disabled:"queryBuilder-disabled",lockRule:"rule-lock",lockGroup:"ruleGroup-lock",valueSource:"rule-valueSource",valueListItem:"rule-value-list-item",branches:"queryBuilder-branches"},k={queryBuilder:"",ruleGroup:"",header:"",body:"",combinators:"",addRule:"",addGroup:"",cloneRule:"",cloneGroup:"",removeGroup:"",notToggle:"",rule:"",fields:"",operators:"",value:"",removeRule:"",shiftActions:"",dragHandle:"",lockRule:"",lockGroup:"",valueSource:"",actionElement:"",valueSelector:"",betweenRules:"",valid:"",invalid:"",dndDragging:"",dndOver:"",dndGroup:"",dndCopy:"",disabled:"",valueListItem:"",branches:""},A={rule:"rule",ruleGroup:"rule-group",inlineCombinator:"inline-combinator",addGroup:"add-group",removeGroup:"remove-group",cloneGroup:"clone-group",cloneRule:"clone-rule",addRule:"add-rule",removeRule:"remove-rule",combinators:"combinators",fields:"fields",operators:"operators",valueEditor:"value-editor",notToggle:"not-toggle",shiftActions:"shift-actions",dragHandle:"drag-handle",lockRule:"lock-rule",lockGroup:"lock-group",valueSourceSelector:"value-source-selector"},M="action aborted: parent path disabled",E="action aborted: path is disabled",R="rule or group added",T=[];function L(e){let t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){const o=e.length;for(t=0;t<o;t++)e[t]&&(n=L(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function N(){let e,t,n=0,r="";const o=arguments.length;for(;n<o;n++)(e=n<0||arguments.length<=n?void 0:arguments[n])&&(t=L(e))&&(r&&(r+=" "),r+=t);return r}var O=N,I="QueryBuilder was rendered with a truthy independentCombinators prop. This prop is deprecated and unnecessary. Furthermore, the initial query/defaultQuery prop was of type RuleGroupType instead of type RuleGroupIC. More info: https://react-querybuilder.js.org/docs/components/querybuilder#independent-combinators",D="QueryBuilder was rendered with the deprecated and unnecessary independentCombinators prop. To use independent combinators, make sure the query/defaultQuery prop is of type RuleGroupIC when the component mounts. More info: https://react-querybuilder.js.org/docs/components/querybuilder#independent-combinators",P="A custom RuleGroup component has rendered a standard RuleGroup component with deprecated props. The combinator, not, and rules props should not be used. Instead, the full group object should be passed as the ruleGroup prop.",j="A custom RuleGroup component has rendered a standard Rule component with deprecated props. The field, operator, value, and valueSource props should not be used. Instead, the full rule object should be passed as the rule prop.",z="QueryBuilder was rendered with both query and defaultQuery props. QueryBuilder must be either controlled or uncontrolled (specify either the query prop, or the defaultQuery prop, but not both). Decide between using a controlled or uncontrolled query builder and remove one of these props. More info: https://reactjs.org/link/controlled-components",F="QueryBuilder is changing from an uncontrolled component to be controlled. This is likely caused by the query changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled query builder for the lifetime of the component. More info: https://reactjs.org/link/controlled-components",B="QueryBuilder is changing from a controlled component to be uncontrolled. This is likely caused by the query changing from defined to undefined, which should not happen. Decide between using a controlled or uncontrolled query builder for the lifetime of the component. More info: https://reactjs.org/link/controlled-components",H="QueryBuilder was rendered with the enableDragAndDrop prop set to true, but either react-dnd was not detected or one of react-dnd-html5-backend or react-dnd-touch-backend was not detected. To enable drag-and-drop functionality, install react-dnd and one of the backend packages and wrap QueryBuilder in QueryBuilderDnD from @react-querybuilder/dnd.",W=r.createContext(null),G=(0,s.Z0)({name:"queries",initialState:{},reducers:{setQueryState:(e,t)=>{let{payload:{qbId:n,query:r}}=t;e[n]=r}},selectors:{getQuerySelectorById:(e,t)=>e[t]}}),V={[I]:!1,[D]:!1,[P]:!1,[j]:!1,[z]:!1,[F]:!1,[B]:!1,[H]:!1},U=(0,s.Z0)({name:"warnings",initialState:V,reducers:{rqbWarn:(e,t)=>{let{payload:n}=t;e[n]||(console.error(n),e[n]=!0)}}}),q=e=>{let{payload:t,onQueryChange:n}=e;return e=>{e(G.actions.setQueryState(t)),"function"==typeof n&&n(t.query)}},K=(0,i.iI)(W),Y=(0,i.Nk)(W),{rqbWarn:X}=U.actions,Q={queries:G.getInitialState(),warnings:U.getInitialState()},Z={reducer:{queries:G.reducer,warnings:U.reducer},preloadedState:Q,middleware:e=>e({serializableCheck:{ignoredActions:[G.actions.setQueryState.type],ignoredPaths:[/^queries\b.*\.rules\.\d+\.value$/]}})};function J(e,t,n){K()}var ee=Symbol.for("react.memo_cache_sentinel");function te(e){return r.useMemo(()=>{const t=Array.from({length:e});for(let n=0;n<e;n++)t[n]=ee;return t[ee]=!0,t},[])}var ne=e=>{const t=te(2);let n;return t[0]!==e?(n=(t,n)=>{t?.preventDefault(),t?.stopPropagation(),e(t,n)},t[0]=e,t[1]=n):n=t[1],n},re=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return"string"==typeof e?e.split(`\\${t}`).map(e=>e.split(t)).reduce((e,n,r)=>0===r?n:[...e.slice(0,-1),`${e.at(-1)}${t}${n[0]}`,...n.slice(1)],[]):[]},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return e.map(e=>`${e??""}`.replaceAll(t[0],`\\${t[0]}`)).join(t)},ie=e=>"string"==typeof e?e.trim():e,se=function(e){let{retainEmptyStrings:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)?e.map(e=>ie(e)):"string"==typeof e?re(e,",").filter(t?()=>!0:e=>!/^\s*$/.test(e)).map(e=>e.trim()):"number"==typeof e?[e]:[]},ae=new RegExp(l.source.replace(/^\^/,String.raw`^\s*`).replace(/\$$/,String.raw`\s*$`)),le=e=>null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype,ce=e=>null==e||""===e,ue=e=>le(e)&&Array.isArray(e.rules),de=e=>ue(e)&&"string"==typeof e.combinator,he=e=>ue(e)&&void 0===e.combinator,pe=["or","xor","and"],fe=(e,t)=>"string"==typeof e&&e.toLowerCase()===t,ge=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=pe[t];return e.rules.includes(n)?(0,v.jM)(e,e=>{let r=0;for(;r<e.rules.length-2;){if(fe(e.rules[r+1],n)){r+=2;continue}const o=e.rules.findIndex((e,t)=>t>r&&"string"==typeof e&&e.toLowerCase()===n);if(-1===o){e.rules.splice(r,e.rules.length,ge({rules:e.rules.slice(r)},t+1));break}e.rules.splice(r,o-r,ge({rules:e.rules.slice(r,o)},t+1))}}):t<pe.length-2?ge(e,t+1):e},me=e=>{if(de(e))return e;const t=ge(e),n=t.rules.map(e=>"string"!=typeof e&&ue(e)?me(e):e),r=n.length<2?"and":n[1],o=n.filter(e=>"string"!=typeof e);return{...t,combinator:r,rules:o}},ve=e=>le(e)&&"name"in e&&"string"==typeof e.name,ye=e=>le(e)&&"value"in e&&"string"==typeof e.value;function be(e,t){return(0,v.jM)(e=>{const n={};let r=!!t;if(ve(e)&&!ye(e)?(n.value=e.name,r=!0):!ve(e)&&ye(e)&&(n.name=e.value,r=!0),r)return Object.assign({},t,e,n)})(e)}function we(e,t){return Array.isArray(e)?(0,v.jM)(e=>{if($e(e))for(const n of e)for(const[e,r]of n.options.entries())n.options[e]=be(r,t);else for(const[n,r]of e.entries())e[n]=be(r,t)})(e):[]}function xe(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[n,r]=e;return[n,be(r,t)]}))}var Se=e=>{const t=new Set,n=[];for(const r of e)t.has(r.value??r.name)||(t.add(r.value??r.name),n.push(r));return e.length===n.length?e:n},Ce=e=>Array.isArray(e)&&e.length>0&&le(e[0])&&"options"in e[0]&&Array.isArray(e[0].options),_e=e=>{let t=!1;if(Array.isArray(e))for(const n of e){if(!ve(n)&&!ye(n))return!1;t=!0}return t},$e=function(e){let{allowEmpty:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1;if(Array.isArray(e))for(const r of e){if(!(le(r)&&"options"in r&&(_e(r.options)||t&&Array.isArray(r.options)&&0===r.options.length)))return!1;n=!0}return n},ke=(e,t)=>($e(e,{allowEmpty:!0})?e.flatMap(e=>e.options):e).find(e=>e.value===t||e.name===t),Ae=e=>{if(!Array.isArray(e)||0===e.length)return null;if($e(e,{allowEmpty:!0})){for(const t of e)if(t.options.length>0)return t.options[0].value??t.options[0].name;return null}return e[0].value??e[0].name},Me=e=>{const t=new Set,n=new Set,r=[];for(const o of e)if(!t.has(o.label)){t.add(o.label);const e=[];for(const t of o.options)n.has(t.value??t.name)||(n.add(t.value??t.name),e.push(be(t)));r.push({...o,options:e})}return r},Ee=(e,t,n)=>{const r=be(e),o=be(n);return r.value!==o.value&&("string"==typeof r.comparator?r[r.comparator]===o[r.comparator]:r.comparator?.(o,t)??!1)},Re=(e,t,n)=>{if(!e.comparator){const n=t=>(t.value??t.name)!==(e.value??e.name);return $e(t)?t.map(e=>({...e,options:e.options.filter(e=>n(e))})):t.filter(e=>n(e))}return $e(t)?t.map(t=>({...t,options:t.options.filter(t=>Ee(e,n,t))})).filter(e=>e.options.length>0):t.filter(t=>Ee(e,n,t))},Te=function(e){let{parseNumbers:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"bigint"==typeof e||"number"==typeof e)return e;if("native"===t)return parseFloat(e);const n=((e,t=g)=>{if("number"==typeof e||"bigint"==typeof e)return e;let n=NaN;const r=`${e}`.replace(u,(e,t)=>` ${a[t]}`).replace("⁄","/").trim();if(0===r.length)return NaN;const o={...g,...t},i=(o.allowTrailingInvalid?c:l).exec(r);if(!i)return o.romanNumerals?(e=>{const t=`${e}`.replace(p,(e,t)=>h[t]).toUpperCase(),n=f.exec(t);if(!n)return NaN;const[,r,o,i,s]=n;return(d[r]??0)+(d[o]??0)+(d[i]??0)+(d[s]??0)})(r):NaN;const[,s,v,y]=i,b=v.replace(/[,_]/g,""),w=null==y?void 0:y.replace(/[,_]/g,"");if(n=!b&&w&&w.startsWith(".")?0:parseInt(b),!w)return s?-1*n:n;const x=!1===o.round?NaN:parseFloat(`1e${Math.floor(Math.max(0,o.round))}`);if(w.startsWith(".")||w.startsWith("e")||w.startsWith("E")){const e=parseFloat(`${n}${w}`);n=isNaN(x)?e:Math.round(e*x)/x}else if(m.test(w)){const e=parseInt(b),t=parseInt(w.replace("/",""));n=isNaN(x)?e/t:Math.round(e*x/t)/x}else{const e=w.split("/"),[t,r]=e.map(e=>parseInt(e));n+=isNaN(x)?t/r:Math.round(t*x/r)/x}return s?-1*n:n})(e,{allowTrailingInvalid:"enhanced"===t,romanNumerals:!1,round:!1});return isNaN(n)?e:n},Le=e=>{let{parseNumbers:t,inputType:n}=e;if("string"==typeof t){const[e,r]=t.split("-");return"limited"===r?"number"===n&&e:e}return!!t&&"strict"},Ne={"=":"$eq","!=":"$ne","<":"$lt","<=":"$lte",">":"$gt",">=":"$gte",in:"$in",notin:"$nin",notIn:"$nin"},Oe={and:"&&",or:"||"},Ie=(e,t)=>({...e,rules:e.rules.map(e=>{if("string"==typeof e)return e;if(ue(e))return Ie(e,t);const n=ke(t.fields,e.field),r=Le({parseNumbers:t.parseNumbers,inputType:n?.inputType});if(Array.isArray(e.value))return{...e,value:e.value.map(e=>Te(e,{parseNumbers:r}))};const o=se(e.value,{retainEmptyStrings:!0}).map(e=>Te(e,{parseNumbers:r}));if(o.every(e=>"number"==typeof e)){if(o.length>1)return{...e,value:o};if(1===o.length)return{...e,value:o[0]}}return e})}),De=e=>"string"==typeof e&&e.length>0||"number"==typeof e&&!isNaN(e)||"string"!=typeof e&&"number"!=typeof e,Pe=(e,t)=>!!t&&("number"==typeof e||"bigint"==typeof e||"string"==typeof e&&ae.test(e)),je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["",""];return Array.isArray(e)?e:"string"==typeof e?[e,e]:e??["",""]},ze=(e,t)=>{let{quoteFieldNamesWith:n,fieldIdentifierSeparator:r}=t;const[o,i]=je(n);return"string"==typeof r&&r.length>0?oe(re(e,r).map(e=>`${o}${e}${i}`),r):`${o}${e}${i}`},Fe=["S","V","O"],Be={groupPrefix:"",groupPrefix_not_xor:"either zero or more than one of",groupPrefix_xor:"exactly one of",groupSuffix:"is true",groupSuffix_not:"is not true"},He=(e,t,n)=>t.startsWith(e)&&n.every(e=>t.includes(`_${e}`)&&t.match(/_/g)?.length===n.length),We=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return 0===n.length?t[e]??Be[e]??"":Object.entries(t).find(t=>{let[r]=t;return He(e,r,n)})?.[1]??Object.entries(Be).find(t=>{let[r]=t;return He(e,r,n)})?.[1]??Be[e]??""},Ge=e=>e.startsWith("not")||e.startsWith("doesnot"),Ve=(e,t)=>"string"==typeof e&&t?e.replaceAll('"','\\"'):e,Ue=function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{escapeQuotes:i,parseNumbers:s,preserveValueOrder:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l="field"===o,c=("="===n?"==":n).toLowerCase(),u="number"==typeof r||"boolean"==typeof r||"bigint"==typeof r||Pe(r,s);switch(c){case"<":case"<=":case"==":case"!=":case">":case">=":return`${t} ${c} ${l||u?ie(r):`"${Ve(r,i)}"`}`;case"contains":case"doesnotcontain":return`${Ge(c)?"!":""}${t}.contains(${l?ie(r):`"${Ve(r,i)}"`})`;case"beginswith":case"doesnotbeginwith":return`${Ge(c)?"!":""}${t}.startsWith(${l?ie(r):`"${Ve(r,i)}"`})`;case"endswith":case"doesnotendwith":return`${Ge(c)?"!":""}${t}.endsWith(${l?ie(r):`"${Ve(r,i)}"`})`;case"null":return`${t} == null`;case"notnull":return`${t} != null`;case"in":case"notin":{const[e,n]=Ge(c)?["!(",")"]:["",""];return`${e}${t} in [${se(r).map(e=>l||Pe(e,s)?`${ie(e)}`:`"${Ve(e,i)}"`).join(", ")}]${n}`}case"between":case"notbetween":{const e=se(r);if(e.length>=2&&!ce(e[0])&&!ce(e[1])){const[n,r]=e,o=Pe(n,!0)?Te(n,{parseNumbers:!0}):NaN,s=Pe(r,!0)?Te(r,{parseNumbers:!0}):NaN;let u=isNaN(o)?l?`${n}`:`"${Ve(n,i)}"`:o,d=isNaN(s)?l?`${r}`:`"${Ve(r,i)}"`:s;return!a&&u===o&&d===s&&s<o&&(d=o,u=s),"between"===c?`(${t} >= ${u} && ${t} <= ${d})`:`(${t} < ${u} || ${t} > ${d})`}return""}}return""},qe=function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{parseNumbers:i,preserveValueOrder:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a="field"===o;if("="===n&&!a)return{[t]:Pe(r,i)?Te(r,{parseNumbers:"strict"}):r};const l=n.toLowerCase();switch(l){case"<":case"<=":case"=":case"!=":case">":case">=":{const e=Ne[l];return a?{$expr:{[e]:[`$${t}`,`$${r}`]}}:{[t]:{[e]:Pe(r,i)?Te(r,{parseNumbers:"strict"}):r}}}case"contains":return a?{$where:`this.${t}.includes(this.${r})`}:{[t]:{$regex:r}};case"beginswith":return a?{$where:`this.${t}.startsWith(this.${r})`}:{[t]:{$regex:`^${r}`}};case"endswith":return a?{$where:`this.${t}.endsWith(this.${r})`}:{[t]:{$regex:`${r}$`}};case"doesnotcontain":return a?{$where:`!this.${t}.includes(this.${r})`}:{[t]:{$not:{$regex:r}}};case"doesnotbeginwith":return a?{$where:`!this.${t}.startsWith(this.${r})`}:{[t]:{$not:{$regex:`^${r}`}}};case"doesnotendwith":return a?{$where:`!this.${t}.endsWith(this.${r})`}:{[t]:{$not:{$regex:`${r}$`}}};case"null":return{[t]:null};case"notnull":return{[t]:{$ne:null}};case"in":case"notin":{const e=se(r);return a?{$where:`${"notin"===l?"!":""}[${e.map(e=>`this.${e}`).join(",")}].includes(this.${t})`}:{[t]:{[Ne[l]]:e.map(e=>Pe(e,i)?Te(e,{parseNumbers:"strict"}):e)}}}case"between":case"notbetween":{const e=se(r);if(e.length>=2&&De(e[0])&&De(e[1])){const[n,r]=e,o=Pe(n,!0)?Te(n,{parseNumbers:"strict"}):NaN,i=Pe(r,!0)?Te(r,{parseNumbers:"strict"}):NaN;let c=a||isNaN(o)?n:o,u=a||isNaN(i)?r:i;return!s&&c===o&&u===i&&i<o&&(u=o,c=i),"between"===l?a?{$and:[{$expr:{$gte:[`$${t}`,`$${c}`]}},{$expr:{$lte:[`$${t}`,`$${u}`]}}]}:{[t]:{$gte:c,$lte:u}}:a?{$or:[{$expr:{$lt:[`$${t}`,`$${c}`]}},{$expr:{$gt:[`$${t}`,`$${u}`]}}]}:{$or:[{[t]:{$lt:c}},{[t]:{$gt:u}}]}}return""}}return""},Ke=(e,t)=>{const n=qe(e,t);return n?JSON.stringify(n):""},Ye=e=>e.startsWith("not")||e.startsWith("doesnot"),Xe=(e,t)=>t?`!(${e})`:`${e}`,Qe=(e,t)=>"string"==typeof e&&t?e.replaceAll("'","\\'"):e,Ze=function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{escapeQuotes:i,parseNumbers:s,preserveValueOrder:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l="field"===o,c=("="===n?"==":n).toLowerCase(),u="number"==typeof r||"boolean"==typeof r||"bigint"==typeof r||Pe(r,s);switch(c){case"<":case"<=":case"==":case"!=":case">":case">=":return`${t} ${c} ${l||u?ie(r):`'${Qe(r,i)}'`}`;case"contains":case"doesnotcontain":return Xe(`${t} matches ${l||u?ie(r):`'${Qe(r,i)}'`}`,Ye(c));case"beginswith":case"doesnotbeginwith":{const e=l?`'^'.concat(${ie(r)})`:`'${"string"==typeof r&&!r.startsWith("^")||u?"^":""}${Qe(r,i)}'`;return Xe(`${t} matches ${e}`,Ye(c))}case"endswith":case"doesnotendwith":{const e=l?`${ie(r)}.concat('$')`:`'${Qe(r,i)}${"string"==typeof r&&!r.endsWith("$")||u?"$":""}'`;return Xe(`${t} matches ${e}`,Ye(c))}case"null":return`${t} == null`;case"notnull":return`${t} != null`;case"in":case"notin":{const e=Ye(c)?"!":"",n=se(r);return n.length>0?`${e}(${n.map(e=>`${t} == ${l||Pe(e,s)?`${ie(e)}`:`'${Qe(e,i)}'`}`).join(" or ")})`:""}case"between":case"notbetween":{const e=se(r);if(e.length>=2&&!ce(e[0])&&!ce(e[1])){const[n,r]=e,o=Pe(n,!0)?Te(n,{parseNumbers:!0}):NaN,s=Pe(r,!0)?Te(r,{parseNumbers:!0}):NaN;let u=isNaN(o)?l?`${n}`:`'${Qe(n,i)}'`:o,d=isNaN(s)?l?`${r}`:`'${Qe(r,i)}'`:s;return!a&&u===o&&d===s&&s<o&&(d=o,u=s),"between"===c?`(${t} >= ${u} and ${t} <= ${d})`:`(${t} < ${u} or ${t} > ${d})`}return""}}return""},Je=function(e){let{operator:t,value:n,valueSource:r}=e,{escapeQuotes:o,parseNumbers:i,preserveValueOrder:s,quoteFieldNamesWith:a,quoteValuesWith:l,concatOperator:c="||",fieldIdentifierSeparator:u,wrapValueWith:d=["",""],translations:h}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const p="field"===r,f=t.toLowerCase(),g=l||"'",m=e=>`${d[0]}${g}${e}${g}${d[1]}`,v=e=>((e,t,n)=>n&&"string"==typeof e?e.replaceAll(`${t}`,`${t}${t}`):e)(e,g,o),y=e=>m(v(e)),b=e=>ze(e,{quoteFieldNamesWith:a,fieldIdentifierSeparator:u}),w=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"CONCAT"===c.toUpperCase()?`CONCAT(${t.join(", ")})`:t.join(` ${c} `)};switch(f){case"null":case"notnull":return"";case"in":case"notin":{const e=se(n);return e.length>0?`(${e.map(e=>p?b(e):Pe(e,i)?`${ie(e)}`:`${y(e)}`).join(", ")})`:""}case"between":case"notbetween":{const e=se(n,{retainEmptyStrings:!0});if(e.length<2||!De(e[0])||!De(e[1]))return"";const[t,r]=e,o=Pe(t,i)?Te(t,{parseNumbers:"strict"}):NaN,a=Pe(r,i)?Te(r,{parseNumbers:"strict"}):NaN,l=isNaN(o)?p?`${t}`:t:o,c=isNaN(a)?p?`${r}`:r:a,u=[l,c];return!s&&l===o&&c===a&&a<o&&(u[0]=a,u[1]=o),(p?u.map(e=>b(e)):u.every(e=>Pe(e,i))?u.map(e=>Te(e,{parseNumbers:"strict"})):u.map(e=>y(e))).join(` ${h?.and??"and"} `)}case"contains":case"doesnotcontain":return p?w(m("%"),b(n),m("%")):m(`%${v(n)}%`);case"beginswith":case"doesnotbeginwith":return p?w(b(n),m("%")):m(`${v(n)}%`);case"endswith":case"doesnotendwith":return p?w(m("%"),b(n)):m(`%${v(n)}`)}return"boolean"==typeof n?n?"TRUE":"FALSE":p?b(n):Pe(n,i)?`${ie(n)}`:`${y(n)}`},et={"<":"lt","<=":"lte",">":"gt",">=":"gte"},tt=(e,t)=>e.startsWith("not")||e.startsWith("doesnot")?{bool:{must_not:t}}:t,nt=e=>e?.replace(/('|\\)/g,"\\$1"),rt={beginswith:"startsWith",doesnotbeginwith:"startsWith",doesnotcontain:"contains",doesnotendwith:"endsWith",endswith:"endsWith"},ot=(e,t)=>"boolean"==typeof e?e:Pe(e,t)?Te(e,{parseNumbers:t}):e,it=e=>e.startsWith("not")||e.startsWith("doesnot"),st=(e,t)=>`"${"string"==typeof e&&t?e.replaceAll('"','\\"'):e}"`,at=(e,t)=>t?`$not(${e})`:`${e}`,lt=e=>`${e}`.replaceAll(/[$()*+.?[\\\]^{|}]/g,String.raw`\$&`).replaceAll("-",String.raw`\x2d`),ct=e=>e.replace(/^(=)$/,"$1=").replace(/^notnull$/i,"!=").replace(/^null$/i,"=="),ut=(e,t)=>e.startsWith("not")||e.startsWith("doesnot")?{"!":t}:t,dt=function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{parseNumbers:i,preserveValueOrder:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a="field"===o,l={var:t},c=e=>a?{var:`${e}`}:Pe(e,i)?Te(e,{parseNumbers:i}):e,u=n.toLowerCase();switch(u){case"<":case"<=":case"=":case"!=":case">":case">=":return{[ct(u)]:[l,c(r)]};case"null":case"notnull":return{[("notnull"===u?"!":"=")+"="]:[l,null]};case"in":case"notin":{const e=se(r).map(e=>c(e));return ut(u,{in:[l,e]})}case"between":case"notbetween":{const e=se(r);if(e.length>=2&&De(e[0])&&De(e[1])){let[t,n]=e;if(!a&&Pe(t,!0)&&Pe(n,!0)){const e=Te(t,{parseNumbers:!0}),r=Te(n,{parseNumbers:!0});!s&&r<e?(n=e,t=r):(t=e,n=r)}else a&&(t={var:t},n={var:n});return ut(u,{"<=":[t,l,n]})}return!1}case"contains":case"doesnotcontain":{const e={in:[c(r),l]};return ut(u,e)}case"beginswith":case"doesnotbeginwith":{const e={startsWith:[l,c(r)]};return ut(u,e)}case"endswith":case"doesnotendwith":{const e={endsWith:[l,c(r)]};return ut(u,e)}}return!1},ht=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{escapeQuotes:n,fields:r,parseNumbers:o,quoteFieldNamesWith:i,quoteValuesWith:s,fieldIdentifierSeparator:a,translations:l}=t,c="field"===e.valueSource,u=e.operator.toLowerCase(),d=s||"'",h=e=>(e=>`${d}${e}${d}`)((e=>((e,t,n)=>n&&"string"==typeof e?e.replaceAll(`${t}`,`${t}${t}`):e)(e,d,n))(e)),p=e=>ze(e,{quoteFieldNamesWith:i,fieldIdentifierSeparator:a}),f=l??{},g=f.or??"or",m=f.true??"true",v=f.false??"false";switch(u){case"null":case"notnull":return"";case"between":case"notbetween":{if(!c)return Je(e,t);const n=se(e.value,{retainEmptyStrings:!0}).slice(0,2).map(e=>p(ke(r??[],e)?.label??e));return n.length<2||!De(n[0])||!De(n[1])?"":Je({...e,value:n},t)}case"in":case"notin":{const t=se(e.value);if(0===t.length)return"";const n=t.map(e=>c?p(ke(r??[],e)?.label??e):Pe(e,o)?`${ie(e)}`:`${h(e)}`);return`${n.slice(0,-1).join(", ")}${n.length>2?",":""} ${g} ${n.at(-1)}`}}return"boolean"==typeof e.value?e.value?m:v:c?p(ke(r??[],e.value)?.label??e.value):Pe(e.value,o)?`${ie(e.value)}`:`${h(e.value)}`},pt={"=":["is","is the same as the value in"],"!=":["is not","is not the same as the value in"],"<":["is less than","is less than the value in"],">":["is greater than","is greater than the value in"],"<=":["is less than or equal to","is less than or equal to the value in"],">=":["is greater than or equal to","is greater than or equal to the value in"],contains:["contains","contains the value in"],beginswith:["starts with","starts with the value in"],endswith:["ends with","ends with the value in"],doesnotcontain:["does not contain","does not contain the value in"],doesnotbeginwith:["does not start with","does not start with the value in"],doesnotendwith:["does not end with","does not end with the value in"],null:"is null",notnull:"is not null",in:["is one of the values","is the same as a value in"],notin:["is not one of the values","is not the same as any value in"],between:["is between","is between the values in"],notbetween:["is not between","is not between the values in"]},ft=()=>[],gt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{valueSource:n="value"}=e,{getOperators:r=ft,operatorMap:o=pt}=t,i=new Map(Object.entries(pt));for(const[e,t]of Object.entries(o))i.set(e.toLowerCase(),t);const s=Object.fromEntries(i),{value:a,label:l}=ke(we(r(e.field,{fieldData:t.fieldData??{name:e.field,value:e.field,label:e.field}})??[]),e.operator)??{name:e.operator,value:e.operator,label:e.operator},c=s[a]??s[a.toLowerCase()]??[l,l];return"string"==typeof c?c:c["field"===n?1:0]},mt=(e,t)=>{const{fieldData:n,quoteFieldNamesWith:r=["",""],fieldIdentifierSeparator:o="",quoteValuesWith:i="'",operatorProcessor:s=gt,valueProcessor:a=ht,concatOperator:l="||",wordOrder:c="SVO"}=t??{},u=a(e,{...t,quoteFieldNamesWith:r,fieldIdentifierSeparator:o,quoteValuesWith:i,concatOperator:l}),d=e.operator.toLowerCase();if(("in"===d||"notin"===d||"between"===d||"notbetween"===d)&&!u)return"";const h={S:ze(n?.label??e.field,{quoteFieldNamesWith:r,fieldIdentifierSeparator:o}),V:s(e,t),O:u};return(e=>{const t=[],n=new Set(Fe);for(const r of e.toUpperCase())if(n.has(r)&&(t.push(r),n.delete(r),0===n.size))break;for(const e of Fe)n.has(e)&&t.push(e);return t})(c).map(e=>`${h[e]}`).join(" ").trim()},vt=e=>(e=>{switch(e.toLowerCase()){case"null":return"is null";case"notnull":return"is not null";case"notin":return"not in";case"notbetween":return"not between";case"contains":case"beginswith":case"endswith":return"like";case"doesnotcontain":case"doesnotbeginwith":case"doesnotendwith":return"not like";default:return e}})(e.operator).toLowerCase(),yt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{quoteFieldNamesWith:n=["",""],fieldIdentifierSeparator:r="",quoteValuesWith:o="'",operatorProcessor:i=vt,valueProcessor:s=Je,concatOperator:a="||"}=t,l=s(e,{...t,quoteFieldNamesWith:n,fieldIdentifierSeparator:r,quoteValuesWith:o,concatOperator:a}),c=i(e,t),u=c.toLowerCase();return"in"!==u&&"not in"!==u&&"between"!==u&&"not between"!==u||l?`${ze(e.field,{quoteFieldNamesWith:n,fieldIdentifierSeparator:r})} ${c} ${l}`.trim():""},bt=(e,t,n)=>{const{fieldData:r,format:o,getNextNamedParam:i,parseNumbers:s,paramPrefix:a,paramsKeepPrefix:l,numberedParams:c,quoteFieldNamesWith:u=["",""],concatOperator:d,operatorProcessor:h=vt,valueProcessor:p=Je}=t??{},{processedParams:f=[]}=n??{},g="parameterized"===o,m=[],v={},y=e=>g?{sql:e,params:m}:{sql:e,params:v},b=p(e,{parseNumbers:s,quoteFieldNamesWith:u,concatOperator:d,fieldData:r,format:o}),w=h(e,t),x=w.toLowerCase(),[S,C]=u;if(!("in"!==x&&"not in"!==x&&"between"!==x&&"not between"!==x||b))return y("");if("is null"===x||"is not null"===x)return y(`${S}${e.field}${C} ${w}`);if("field"===e.valueSource)return y(`${S}${e.field}${C} ${w} ${b}`.trim());if("in"===x||"not in"===x){const t=se(e.value);if(g){for(const e of t)m.push(Pe(e,s)?Te(e,{parseNumbers:s}):e);return y(`${S}${e.field}${C} ${w} (${t.map((e,n)=>c?`${a}${f.length+1+t.length-(t.length-n)}`:"?").join(", ")})`)}const n=[];for(const r of t){const t=i(e.field);n.push(`${a}${t}`),v[`${l?a:""}${t}`]=Pe(r,s)?Te(r,{parseNumbers:s}):r}return y(`${S}${e.field}${C} ${w} (${n.join(", ")})`)}if("between"===x||"not between"===x){const t=se(e.value,{retainEmptyStrings:!0}),[n,r]=t.slice(0,2).map(e=>Pe(e,s)?Te(e,{parseNumbers:s}):e);if(g)return m.push(n,r),y(`${S}${e.field}${C} ${w} ${c?`${a}${f.length+1}`:"?"} and ${c?`${a}${f.length+2}`:"?"}`);const o=i(e.field),u=i(e.field);return v[`${l?a:""}${o}`]=n,v[`${l?a:""}${u}`]=r,y(`${S}${e.field}${C} ${w} ${a}${o} and ${a}${u}`)}let _=e.value;"string"==typeof e.value&&(_=Pe(e.value,s)?Te(e.value,{parseNumbers:s}):/^'.*'$/g.test(b)?b.replaceAll(/(^'|'$)/g,""):b);let $="";return g?m.push(_):($=i(e.field),v[`${l?a:""}${$}`]=_),y(`${S}${e.field}${C} ${w} ${g?c?`${a}${f.length+1}`:"?":`${a}${$}`}`.trim())},wt=e=>le(e)&&"boolean"==typeof e.valid,xt=(e,t,n)=>{if("boolean"==typeof t)return t;if(wt(t))return t.valid;if("function"==typeof n&&!ue(e)){const t=n(e);if("boolean"==typeof t)return t;if(wt(t))return t.valid}return!0},St={ansi:{},sqlite:{paramsKeepPrefix:!0},oracle:{},mssql:{concatOperator:"+",quoteFieldNamesWith:["[","]"],fieldIdentifierSeparator:".",paramPrefix:"@"},mysql:{concatOperator:"CONCAT"},postgresql:{quoteFieldNamesWith:'"',numberedParams:!0,paramPrefix:"$"}},Ct={cel:Ue,elasticsearch:function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{parseNumbers:i,preserveValueOrder:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=n.toLowerCase();if("field"===o){if(se(r).some(e=>"string"!=typeof e))return!1;const e=nt(t);switch(a){case"=":case"!=":case">":case">=":case"<":case"<=":{const t="="===a?"==":a,n=nt(r);return!!n&&{bool:{filter:{script:{script:`doc['${e}'].value ${t} doc['${n}'].value`}}}}}case"in":case"notin":{const t=se(r);if(t.length>0){const n=t.map(t=>({bool:{filter:{script:{script:`doc['${e}'].value == doc['${t}'].value`}}}}));return{bool:"in"===a?{should:n}:{must_not:n}}}return!1}case"between":case"notbetween":{const t=se(r);if(t.length>=2&&t[0]&&t[1]){const n=`doc['${e}'].value >= doc['${t[0]}'].value && doc['${e}'].value <= doc['${t[1]}'].value`;return{bool:{filter:{script:{script:"notbetween"===a?`!(${n})`:n}}}}}return!1}case"contains":case"doesnotcontain":case"beginswith":case"doesnotbeginwith":case"endswith":case"doesnotendwith":{const t=nt(r);return!!t&&{bool:{filter:{script:{script:((e,t,n)=>{const r=`doc['${e}'].value.${rt[t]??t}(doc['${n}'].value)`;return t.startsWith("d")?`!${r}`:r})(e,a,t)}}}}}}}switch(a){case"<":case"<=":case">":case">=":return{range:{[t]:{[et[a]]:ot(r,i)}}};case"=":return{term:{[t]:ot(r,i)}};case"!=":return{bool:{must_not:{term:{[t]:ot(r,i)}}}};case"null":return{bool:{must_not:{exists:{field:t}}}};case"notnull":return{exists:{field:t}};case"in":case"notin":{const e=se(r).map(e=>ot(e,i));if(e.length>0){const n=e.map(e=>({term:{[t]:ot(e,i)}}));return{bool:"in"===a?{should:n}:{must_not:n}}}return!1}case"between":case"notbetween":{const e=se(r);if(e.length>=2&&De(e[0])&&De(e[1])){let[n,r]=e;if(Pe(n,!0)&&Pe(r,!0)){const e=Te(n,{parseNumbers:!0}),t=Te(r,{parseNumbers:!0});!s&&t<e?(r=e,n=t):(n=e,r=t)}return tt(a,{range:{[t]:{gte:n,lte:r}}})}return!1}case"contains":case"doesnotcontain":return tt(a,{regexp:{[t]:{value:`.*${r}.*`}}});case"beginswith":case"doesnotbeginwith":return tt(a,{regexp:{[t]:{value:`${r}.*`}}});case"endswith":case"doesnotendwith":return tt(a,{regexp:{[t]:{value:`.*${r}`}}})}return!1},json_without_ids:yt,json:yt,jsonata:function(e){let{field:t,operator:n,value:r,valueSource:o}=e,{escapeQuotes:i,parseNumbers:s=!0,preserveValueOrder:a,quoteFieldNamesWith:l=["",""],fieldIdentifierSeparator:c=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u="field"===o,d="number"==typeof r||"boolean"==typeof r||"bigint"==typeof r||Pe(r,s),h=e=>ze(e,{quoteFieldNamesWith:l,fieldIdentifierSeparator:c}),p=n.toLowerCase();switch(p){case"<":case"<=":case"=":case"!=":case">":case">=":return`${h(t)} ${p} ${u?h(ie(r)):d?ie(r):st(r,i)}`;case"contains":case"doesnotcontain":return at(`$contains(${h(t)}, ${u?h(ie(r)):st(r,i)})`,it(p));case"beginswith":case"doesnotbeginwith":return at(u?`$substring(${h(t)}, 0, $length(${h(ie(r))})) = ${h(ie(r))}`:`$contains(${h(t)}, /^${lt(r)}/)`,it(p));case"endswith":case"doesnotendwith":return at(u?`$substring(${h(t)}, $length(${h(t)}) - $length(${h(ie(r))})) = ${h(ie(r))}`:`$contains(${h(t)}, /${lt(r)}$/)`,it(p));case"null":return`${h(t)} = null`;case"notnull":return`${h(t)} != null`;case"in":case"notin":{const e=se(r);return at(`${h(t)} in [${e.map(e=>u?`${h(ie(e))}`:Pe(e,s)?`${ie(e)}`:st(e,i)).join(", ")}]`,it(p))}case"between":case"notbetween":{const e=se(r);if(e.length<2||ce(e[0])||ce(e[1]))return"";const[n,o]=e,l=Pe(n,!0)?Te(n,{parseNumbers:!0}):NaN,c=Pe(o,!0)?Te(o,{parseNumbers:!0}):NaN;let d=isNaN(l)?u?`${n}`:n:l,f=isNaN(c)?u?`${o}`:o:c;!a&&d===l&&f===c&&c<l&&(f=l,d=c);const g=Pe(n,s)&&Pe(o,s),m=`${h(t)} >= ${u?h(n):g?d:st(d,i)} and ${h(t)} <= ${u?h(o):g?f:st(f,i)}`;return"between"===p?`(${m})`:at(m,!0)}}return""},jsonlogic:dt,mongodb_query:qe,mongodb:Ke,natural_language:mt,parameterized_named:bt,parameterized:bt,spel:Ze,sql:yt},_t=e=>e.operator,$t={cel:_t,elasticsearch:_t,json_without_ids:_t,json:_t,jsonata:_t,jsonlogic:_t,mongodb_query:_t,mongodb:_t,natural_language:gt,parameterized_named:vt,parameterized:vt,spel:_t,sql:vt},kt={cel:"1 == 1",mongodb:'"$and":[{"$expr":true}]',natural_language:"1 is 1",spel:"1 == 1",sql:"(1 = 1)"},At={$and:[{$expr:!0}]},Mt={format:"json",fields:[],quoteFieldNamesWith:["",""],fieldIdentifierSeparator:"",getOperators:()=>[],paramPrefix:":",paramsKeepPrefix:!1,numberedParams:!1,parseNumbers:!1,preserveValueOrder:!1,placeholderFieldName:"~",placeholderOperatorName:"~",quoteValuesWith:"'",concatOperator:"||",preset:"ansi",wordOrder:"SVO",translations:{},operatorMap:{}},Et=e=>"mongodb"===e||"mongodb_query"===e||"cel"===e||"spel"===e||"jsonlogic"===e||"elasticsearch"===e||"jsonata"===e;function Rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...Mt,...St[t.preset??"ansi"]??null,..."string"==typeof t?{format:t}:t,..."string"!=typeof t&&!t.format&&(Object.keys(St).includes(t.preset??"")?{format:"sql"}:null)},{fallbackExpression:r,getOperators:o,operatorProcessor:i,parseNumbers:s,placeholderFieldName:a,placeholderOperatorName:l,placeholderValueName:c,quoteFieldNamesWith:u,ruleProcessor:d,validator:h,valueProcessor:p,translations:f}=n,g=e=>!!Le({parseNumbers:s,inputType:e}),m=n.format.toLowerCase(),y="function"==typeof i?i:$t[m]??_t,b="function"==typeof p?(e=>e.length>=3)(p)?e=>p(e.field,e.operator,e.value,e.valueSource):p:"natural_language"===m?ht:Et(m)?d??Ct[m]:Je,w=("function"==typeof d?d:null)??(Et(m)&&"function"!=typeof d&&p?b:null)??Ct[m]??yt,x=je(u),S=we(n.fields),C=r??kt[m]??kt.sql,_={...n,fallbackExpression:C,fields:S,format:m,getOperators:(e,t)=>we(o(e,t)??[]),quoteFieldNamesWith:x,operatorProcessor:y,ruleProcessor:w,valueProcessor:b};if("json"===m||"json_without_ids"===m){const t=s?(0,v.jM)(e,e=>Ie(e,_)):e;return"json_without_ids"===m?JSON.stringify(t,(e,t)=>"id"===e||"path"===e?void 0:t):JSON.stringify(t,null,2)}let $={};if("function"==typeof h){const t=h(e);if("boolean"==typeof t){if(!1===t)return"parameterized"===m?{sql:C,params:[]}:"parameterized_named"===m?{sql:C,params:{}}:"mongodb"===m?`{${C}}`:"mongodb_query"===m?At:"jsonlogic"!==m&&("elasticsearch"===m?{}:C)}else $=t}const k={},A=Se(Ce(M=S)?M.flatMap(e=>e.options):M);var M;for(const e of A)"function"==typeof e.validator&&(k[e.value??e.name]=e.validator);const E=e=>{let t,n;if(e.id&&(t=$[e.id]),A.length>0){const t=A.filter(t=>t.name===e.field);if(t.length>0){const e=t[0];"function"==typeof e.validator&&(n=e.validator)}}return[t,n]};if("sql"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";const r=e.rules.map(n=>{if("string"==typeof n)return n;if(ue(n))return t(n,1===e.rules.length);const[r,o]=E(n);if(!xt(n,r,o)||n.field===a||n.operator===l||void 0!==c&&n.value===c)return"";const i="value"===(n.valueSource??"value"),s=ke(S,n.field);return w(n,{..._,parseNumbers:g(s?.inputType),escapeQuotes:i,fieldData:s})}).filter(Boolean);return 0===r.length?C:`${e.not?"NOT ":""}(${r.join(de(e)?` ${e.combinator} `:" ")})`};return t(e,!0)}if("parameterized"===m||"parameterized_named"===m){const t="parameterized"===m,n=[],r={},o=new Map,i=e=>{o.has(e)||o.set(e,new Set);const t=`${e}_${o.get(e).size+1}`;return o.get(e).add(t),t},s=e=>{const[t,s]=E(e);if(!xt(e,t,s)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const u=ke(S,e.field),d=Object.fromEntries([...o.entries()].map(e=>{let[t,n]=e;return[t,[...n]]})),h=w(e,{..._,parseNumbers:g(u?.inputType),getNextNamedParam:i,fieldParamNames:d,fieldData:u},{processedParams:n});if(!le(h))return"";const{sql:p,params:f}=h;if("string"!=typeof p||!p)return"";if("parameterized"===m&&Array.isArray(f))n.push(...f);else if("parameterized_named"===m&&le(f)){Object.assign(r,f);for(const t of Object.keys(f))o.get(e.field)?.add(t)}return p},u=(e,t)=>{if(!xt(e,$[e.id??""]))return t?C:"";const n=e.rules.map(t=>"string"==typeof t?t:ue(t)?u(t,1===e.rules.length):s(t)).filter(Boolean);return 0===n.length?C:`${e.not?"NOT ":""}(${n.join(de(e)?` ${e.combinator} `:" ")})`};return t?{sql:u(e,!0),params:n}:{sql:u(e,!0),params:r}}if("mongodb"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";const r=`"$${e.combinator.toLowerCase()}"`;let o=!1;const i=e.rules.map(e=>{if(ue(e)){const n=t(e);return n?(o=!0,/^\{.+\}$/.test(n)?n:`{${n}}`):""}const[n,r]=E(e);if(!xt(e,n,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const i=ke(S,e.field);return w(e,{..._,parseNumbers:g(i?.inputType),fieldData:i})}).filter(Boolean);return i.length>0?1!==i.length||o?`${r}:[${i.join(",")}]`:i[0]:C},n=de(e)?e:me(e),r=t(n,!0);return/^\{.+\}$/.test(r)?r:`{${r}}`}if("mongodb_query"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return!!n&&At;const r=`$${e.combinator.toLowerCase()}`;let o=!1;const i=e.rules.map(e=>{if(ue(e)){const n=t(e);return!!n&&(o=!0,n)}const[n,r]=E(e);if(!xt(e,n,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return!1;const i=ke(S,e.field);return w(e,{..._,parseNumbers:g(i?.inputType),fieldData:i})}).filter(Boolean);return i.length>0?1!==i.length||o?{[r]:i}:i[0]:At};return t(me(e),!0)}if("cel"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";const r=e.rules.map(e=>{if("string"==typeof e)return Oe[e];if(ue(e))return t(e);const[n,r]=E(e);if(!xt(e,n,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const o=ke(S,e.field);return w(e,{..._,parseNumbers:g(o?.inputType),escapeQuotes:"value"===(e.valueSource??"value"),fieldData:o})}).filter(Boolean).join(de(e)?` ${Oe[e.combinator]} `:" "),[o,i]=e.not||!n?[(e.not?"!":"")+"(",")"]:["",""];return r?`${o}${r}${i}`:C};return t(e,!0)}if("spel"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";const r=e.rules.map(e=>{if("string"==typeof e)return e;if(ue(e))return t(e);const[n,r]=E(e);if(!xt(e,n,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const o=ke(S,e.field);return w(e,{..._,parseNumbers:g(o?.inputType),escapeQuotes:"value"===(e.valueSource??"value"),fieldData:o})}).filter(Boolean).join(de(e)?` ${e.combinator} `:" "),[o,i]=e.not||!n?[(e.not?"!":"")+"(",")"]:["",""];return r?`${o}${r}${i}`:C};return t(e,!0)}if("jsonata"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";const r=e.rules.map(e=>{if("string"==typeof e)return e;if(ue(e))return t(e);const[n,r]=E(e);if(!xt(e,n,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const o=ke(S,e.field);return w(e,{..._,parseNumbers:g(o?.inputType),escapeQuotes:"value"===(e.valueSource??"value"),fieldData:o})}).filter(Boolean).join(de(e)?` ${e.combinator} `:" "),[o,i]=e.not||!n?[(e.not?"$not":"")+"(",")"]:["",""];return r?`${o}${r}${i}`:C};return t(e,!0)}if("jsonlogic"===m){const t=de(e)?e:me(e),n=(e,t)=>{if(!xt(e,$[e.id??""]))return!1;const r=e.rules.map(e=>{if(ue(e))return n(e);const[t,r]=E(e);if(!xt(e,t,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return!1;const o=ke(S,e.field);return w(e,{..._,parseNumbers:g(o?.inputType),fieldData:o})}).filter(Boolean);if(0===r.length)return!1;const o={[e.combinator]:r};return e.not?{"!":o}:o};return n(t,!0)}if("elasticsearch"===m){const t=de(e)?e:me(e),n=e=>{if(!xt(e,$[e.id??""]))return!1;const t=e.rules.map(e=>{if(ue(e))return n(e);const[t,r]=E(e);if(!xt(e,t,r)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return!1;const o=ke(S,e.field);return w(e,{..._,parseNumbers:g(o?.inputType),fieldData:o})}).filter(Boolean);return 0!==t.length&&{bool:e.not?{must_not:/^or$/i.test(e.combinator)?{bool:{should:t}}:t}:{[/^or$/i.test(e.combinator)?"should":"must"]:t}}},r=n(t);return!1===r?{}:r}if("natural_language"===m){const t=(e,n)=>{if(!xt(e,$[e.id??""]))return n?C:"";let r=e;he(e)&&e.rules.some(e=>"string"==typeof e&&"xor"===e.toLowerCase())&&(r=me(e));const o=r.rules.map(e=>{if("string"==typeof e)return`, ${f[e]??e} `;if(ue(e))return t(e,1===r.rules.length&&!(r.not||/^xor$/i.test(r.combinator??"")));const[n,o]=E(e);if(!xt(e,n,o)||e.field===a||e.operator===l||void 0!==c&&e.value===c)return"";const i="value"===(e.valueSource??"value"),s=ke(S,e.field);return w(e,{..._,parseNumbers:g(s?.inputType),escapeQuotes:i,fieldData:s})});if(0===o.length)return C;const i="xor"===(r.combinator??"").toLowerCase(),s=i?r.combinator.slice(1):r.combinator,u=r.not||!n||i&&o.length>1,[d,h]=["groupPrefix","groupSuffix"].map(e=>r.not?We(e,f,i?["not","xor"]:["not"]):i?We(e,f,["xor"]):We(e,f)),p=u?`${d} (`.trim():"",m=u?`) ${h}`.trim():"";return`${p}${o.filter(Boolean).join(de(r)?`, ${f[s]??s} `:"")}${m}`};return t(e,!0)}return""}var Tt={default:Je,mongodb:Ke,cel:Ue,spel:Ze},Lt=e=>(t,n,r,o)=>Tt[e]({field:t,operator:n,value:r,valueSource:o},{parseNumbers:!1}),Nt=(Lt("default"),Lt("mongodb"),Lt("cel"),Lt("spel"),(e,t)=>{let n=t,r=0;for(;r<e.length&&n&&ue(n);){const t=n.rules[e[r]];n="string"==typeof t?null:t,r++}return n}),Ot=e=>e.slice(0,-1),It=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Dt=(e,t)=>e.length<t.length&&new RegExp(`^${e.join("-")}`).test(t.join("-")),Pt=(e,t)=>{const n=[],r=Ot(e),o=Ot(t);let i=0;for(;i<r.length&&i<o.length&&r[i]===o[i];)n.push(o[i]),i++;return n},jt=(e,t)=>{let n=!!t.disabled,r=t,o=0;for(;o<e.length&&!n&&ue(r);){const t=r.rules[e[o]];le(t)&&(ue(t)||"field"in t&&t.field)&&(n=!!t.disabled,r=t),o++}return n},zt=e=>It([],e.path)?"Query builder":`Rule group at path ${e.path.join("-")}`,Ft=globalThis.crypto,Bt=()=>"00-0-4-2-000".replaceAll(/[^-]/g,e=>(65536*(Math.random()+Math.trunc(e))>>parseInt(e)).toString(16).padStart(4,"0"));if(Ft)if("function"==typeof Ft.randomUUID)Bt=()=>Ft.randomUUID();else if("function"==typeof Ft.getRandomValues){const e="89ab",t=new Uint32Array(32);Bt=()=>{Ft.getRandomValues(t);let n=(t[0]%16).toString(16);for(let r=1;r<32;r++)n=12===r?`${n}4`:16===r?`${n}${e[t[17]%4]}`:`${n}${(t[r]%16).toString(16)}`,7!==r&&11!==r&&15!==r&&19!==r||(n=`${n}-`);return n}}var Ht=(e,t,n)=>((e,t,n)=>e?((e,t)=>!1!==e&&(!!e||!1!==t))(t,n):((e,t)=>!!e||!1!==e&&!!t)(t,n))(e,t,n),Wt=(e,t,n)=>void 0!==t&&null!=t?t:void 0!==n&&null!=n?n:e,Gt=e=>{const t="boolean"==typeof e?e:"object"==typeof e&&null!==e?e.valid:null;return"boolean"==typeof t?t?$.valid:$.invalid:""},Vt=["value"],Ut={name:"name",value:"name",valueSources:null,label:"label"},qt=(e,t)=>N(t.map(t=>N(t?.[e]))),Kt=Object.keys,Yt=Object.entries,Xt=(e,t,n)=>{const r=Yt(t).map(t=>{let[r,[o,i]]=t;return[r,o??i??(n?S:{})[e]?.[r]]}).filter(e=>!!e[1]);return r.length>0?{[e]:Object.fromEntries(r)}:void 0},Qt=function(e){let{idGenerator:t=Bt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,v.jM)(e,e=>{e.id||(e.id=t())})},Zt=function(e){let{idGenerator:t=Bt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,v.jM)(e,e=>{e.id||(e.id=t()),e.rules=e.rules.map(e=>"string"==typeof e?e:ue(e)?Zt(e,{idGenerator:t}):Qt(e,{idGenerator:t}))})},Jt=function(e){let{idGenerator:t=Bt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ue(e)?Zt(e,{idGenerator:t}):Qt(e,{idGenerator:t})},en=function(e){let{idGenerator:t=Bt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return structuredClone({...e,id:t()})},tn=function(e){let{idGenerator:t=Bt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!le(e))return e;if(!ue(e))return structuredClone({...e,id:t()});if(de(e)){const n=e.rules.map(e=>ue(e)?tn(e,{idGenerator:t}):en(e,{idGenerator:t}));return{...e,id:t(),rules:n}}const n=e.rules.map(e=>"string"==typeof e?e:ue(e)?tn(e,{idGenerator:t}):en(e,{idGenerator:t}));return{...e,id:t(),rules:n}},nn=function(e,t,n){let{combinators:r=_,combinatorPreceding:o,idGenerator:i=Bt}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,v.jM)(e,e=>{const s=Nt(n,e);if(s&&ue(s)){if(he(s)&&s.rules.length>0){const e=s.rules.at(-2);s.rules.push(o??("string"==typeof e?e:Ae(r)))}s.rules.push(Jt(t,{idGenerator:i}))}})},rn=(e,t,n)=>{if(Array.isArray(n))return n;const r=he(e);if("up"===n){if(It(t,[0]))return t;if(0===t.at(-1)){const e=Ot(t);return[...Ot(e),Math.max(0,e.at(-1)-(r?1:0))]}{const n=[...Ot(t),Math.max(0,t.at(-1)-(r?2:1))],o=Nt(n,e);return ue(o)?[...n,o.rules.length]:[...Ot(t),Math.max(0,t.at(-1)-(r?3:1))]}}if("down"===n){if(It([e.rules.length-1],t))return t;if(t.at(-1)===Nt(Ot(t),e).rules.length-1){const e=Ot(t);return[...Ot(e),e.at(-1)+1]}{const n=[...Ot(t),t.at(-1)+(r?2:1)],o=Nt(n,e);return ue(o)?[...n,0]:[...Ot(t),t.at(-1)+(r?3:2)]}}return t},on=function(e,t,n){let{combinators:r=_,combinatorPreceding:o,combinatorSucceeding:i,idGenerator:s=Bt,replace:a=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,v.jM)(e,e=>{const l=Nt(Ot(n),e);if(!l||!ue(l))return;const c=tn(t,{idGenerator:s}),u=he(e),d=n.at(-1),h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.rules.splice(e,a?n.length:0,...n)};if(0!==l.rules.length&&u)if(a&&u)h(d+d%2,c);else if(0===d)0===c.path?.at(-1)&&i?h(d,c,i):h(d,c,l.rules[1]??o??Ae(r));else{const e=d%2==0?d-1:d;h(e,o||(l.rules[e-2]??i??Ae(r)),c)}else h(d,c)})},sn=r.memo(function(e){const t=te(7),n=ln(e),r=ne(n.cloneRule),i=ne(n.toggleLockRule),s=ne(n.removeRule),a=ne(n.shiftRuleUp),l=ne(n.shiftRuleDown);let c;return t[0]!==r||t[1]!==n||t[2]!==s||t[3]!==l||t[4]!==a||t[5]!==i?(c=(0,o.jsx)("div",{ref:n.dndRef,"data-testid":A.rule,"data-dragmonitorid":n.dragMonitorId,"data-dropmonitorid":n.dropMonitorId,className:n.outerClassName,"data-rule-id":n.id,"data-level":n.path.length,"data-path":JSON.stringify(n.path),children:(0,o.jsx)(an,{...n,cloneRule:r,toggleLockRule:i,removeRule:s,shiftRuleUp:a,shiftRuleDown:l})}),t[0]=r,t[1]=n,t[2]=s,t[3]=l,t[4]=a,t[5]=i,t[6]=c):c=t[6],c}),an=r.memo(function(e){const{schema:{controls:{shiftActions:t,dragHandle:n,fieldSelector:r,operatorSelector:i,valueSourceSelector:s,valueEditor:a,cloneRuleAction:l,lockRuleAction:c,removeRuleAction:u}}}=e;return(0,o.jsxs)(o.Fragment,{children:[e.schema.showShiftActions&&(0,o.jsx)(t,{testID:A.shiftActions,level:e.path.length,path:e.path,titles:{shiftUp:e.translations.shiftActionUp.title,shiftDown:e.translations.shiftActionDown.title},labels:{shiftUp:e.translations.shiftActionUp.label,shiftDown:e.translations.shiftActionDown.label},className:e.classNames.shiftActions,disabled:e.disabled,shiftUp:e.shiftRuleUp,shiftDown:e.shiftRuleDown,shiftUpDisabled:e.shiftUpDisabled,shiftDownDisabled:e.shiftDownDisabled,context:e.context,validation:e.validationResult,schema:e.schema,ruleOrGroup:e.rule},A.shiftActions),e.schema.enableDragAndDrop&&(0,o.jsx)(n,{testID:A.dragHandle,ref:e.dragRef,level:e.path.length,path:e.path,title:e.translations.dragHandle.title,label:e.translations.dragHandle.label,className:e.classNames.dragHandle,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,ruleOrGroup:e.rule},A.dragHandle),(0,o.jsx)(r,{testID:A.fields,options:e.schema.fields,title:e.translations.fields.title,value:e.rule.field,operator:e.rule.operator,className:e.classNames.fields,handleOnChange:e.onChangeField,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,rule:e.rule},A.fields),(e.schema.autoSelectField||e.rule.field!==e.translations.fields.placeholderName)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i,{testID:A.operators,field:e.rule.field,fieldData:e.fieldData,title:e.translations.operators.title,options:e.operators,value:e.rule.operator,className:e.classNames.operators,handleOnChange:e.onChangeOperator,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,rule:e.rule},A.operators),(e.schema.autoSelectOperator||e.rule.operator!==e.translations.operators.placeholderName)&&!e.hideValueControls&&(0,o.jsxs)(o.Fragment,{children:[!["null","notNull"].includes(e.rule.operator)&&e.valueSources.length>1&&(0,o.jsx)(s,{testID:A.valueSourceSelector,field:e.rule.field,fieldData:e.fieldData,title:e.translations.valueSourceSelector.title,options:e.valueSourceOptions,value:e.rule.valueSource??"value",className:e.classNames.valueSource,handleOnChange:e.onChangeValueSource,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,rule:e.rule},A.valueSourceSelector),(0,o.jsx)(a,{testID:A.valueEditor,field:e.rule.field,fieldData:e.fieldData,title:e.translations.value.title,operator:e.rule.operator,value:e.rule.value,valueSource:e.rule.valueSource??"value",type:e.valueEditorType,inputType:e.inputType,values:e.values,listsAsArrays:e.schema.listsAsArrays,parseNumbers:e.schema.parseNumbers,separator:e.valueEditorSeparator,className:e.classNames.value,handleOnChange:e.onChangeValue,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,rule:e.rule},A.valueEditor)]})]}),e.schema.showCloneButtons&&(0,o.jsx)(l,{testID:A.cloneRule,label:e.translations.cloneRule.label,title:e.translations.cloneRule.title,className:e.classNames.cloneRule,handleOnClick:e.cloneRule,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.rule,schema:e.schema},A.cloneRule),e.schema.showLockButtons&&(0,o.jsx)(c,{testID:A.lockRule,label:e.translations.lockRule.label,title:e.translations.lockRule.title,className:e.classNames.lockRule,handleOnClick:e.toggleLockRule,level:e.path.length,path:e.path,disabled:e.disabled,disabledTranslation:e.parentDisabled?void 0:e.translations.lockRuleDisabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.rule,schema:e.schema},A.lockRule),(0,o.jsx)(u,{testID:A.removeRule,label:e.translations.removeRule.label,title:e.translations.removeRule.title,className:e.classNames.removeRule,handleOnClick:e.removeRule,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.rule,schema:e.schema},A.removeRule)]})}),ln=e=>{const{id:t,path:n,rule:o,schema:{classNames:i,fields:s,fieldMap:a,getInputType:l,getOperators:c,getValueEditorType:u,getValueEditorSeparator:d,getValueSources:h,getValues:p,validationMap:f,enableDragAndDrop:g,getRuleClassname:m,suppressStandardClassnames:v},actions:{moveRule:y,onPropChange:b,onRuleRemove:w},disabled:x,parentDisabled:S,shiftUpDisabled:C,shiftDownDisabled:_,field:k,operator:A,value:M,valueSource:E,dropEffect:R="move",groupItems:T=!1,dragMonitorId:L="",dropMonitorId:O="",dndRef:I=null,dragRef:D=null,isDragging:P=!1,isOver:j=!1}=e;J();const z=!!S||!!x,F=(0,r.useMemo)(()=>o??{id:t,field:k??"",operator:A??"",value:M,valueSource:E},[k,t,A,o,M,E]),B=(0,r.useMemo)(()=>({shiftActions:N(v||$.shiftActions,i.shiftActions),dragHandle:N(v||$.dragHandle,i.dragHandle),fields:N(v||$.fields,i.valueSelector,i.fields),operators:N(v||$.operators,i.valueSelector,i.operators),valueSource:N(v||$.valueSource,i.valueSelector,i.valueSource),value:N(v||$.value,i.value),cloneRule:N(v||$.cloneRule,i.actionElement,i.cloneRule),lockRule:N(v||$.lockRule,i.actionElement,i.lockRule),removeRule:N(v||$.removeRule,i.actionElement,i.removeRule),valueListItem:N(v||$.valueListItem,i.valueListItem)}),[i.shiftActions,i.dragHandle,i.valueSelector,i.fields,i.operators,i.valueSource,i.value,i.actionElement,i.cloneRule,i.lockRule,i.removeRule,i.valueListItem,v]),H=(0,r.useCallback)(e=>(t,r)=>{z||b(e,t,n,r)},[z,b,n]),W=(0,r.useMemo)(()=>H("field"),[H]),G=(0,r.useMemo)(()=>H("operator"),[H]),V=(0,r.useMemo)(()=>H("valueSource"),[H]),U=(0,r.useMemo)(()=>H("value"),[H]),q=(0,r.useCallback)((e,t)=>{if(!z){const e=[...Ot(n),n.at(-1)+1];y(n,e,!0,t)}},[z,y,n]),K=(0,r.useCallback)((e,t)=>b("disabled",!z,n,t),[z,b,n]),Y=(0,r.useCallback)((e,t)=>{z||w(n)},[z,w,n]),X=(0,r.useCallback)((e,t)=>{z||C||y(n,"up",e?.altKey,t)},[z,y,n,C]),Q=(0,r.useCallback)((e,t)=>{z||_||y(n,"down",e?.altKey,t)},[z,y,n,_]),Z=(0,r.useMemo)(()=>a?.[F.field]??{name:F.field,value:F.field,label:F.field},[a,F.field]),ee=(0,r.useMemo)(()=>Z.inputType??l(F.field,F.operator,{fieldData:Z}),[Z,l,F.field,F.operator]),te=(0,r.useMemo)(()=>c(F.field,{fieldData:Z}),[Z,c,F.field]),ne=(0,r.useMemo)(()=>ke(te,F.operator),[te,F.operator]),re=ne?.arity,oe="string"==typeof re&&"unary"===re||"number"==typeof re&&re<2,ie=(0,r.useMemo)(()=>"function"==typeof Z.valueSources?Z.valueSources(F.operator):Z.valueSources??h(F.field,F.operator,{fieldData:Z}),[Z,h,F.field,F.operator]),se=(0,r.useMemo)(()=>"field"===F.valueSource?"select":u(F.field,F.operator,{fieldData:Z}),[Z,u,F.field,F.operator,F.valueSource]),ae=(0,r.useMemo)(()=>d(F.field,F.operator,{fieldData:Z}),[Z,d,F.field,F.operator]),le=(0,r.useMemo)(()=>{const e="field"===F.valueSource?Re(Z,s,F.operator):p(F.field,F.operator,{fieldData:Z});return _e(e)||$e(e)?we(e):e},[Z,s,p,F.field,F.operator,F.valueSource]),ce=(0,r.useMemo)(()=>ie.map(e=>({name:e,value:e,label:e})),[ie]),ue=(0,r.useMemo)(()=>f[t??""]??("function"==typeof Z.validator?Z.validator(F):null),[Z,t,F,f]),de=(0,r.useMemo)(()=>Gt(ue),[ue]),he=(0,r.useMemo)(()=>Z?.className??"",[Z?.className]),pe=(0,r.useMemo)(()=>ne?.className??"",[ne?.className]),fe=(0,r.useMemo)(()=>N(m(F,{fieldData:Z}),he,pe,v||$.rule,i.rule,z&&i.disabled,P&&i.dndDragging,j&&i.dndOver,j&&"copy"===R&&i.dndCopy,j&&T&&i.dndGroup,v||{[$.disabled]:z,[$.dndDragging]:P,[$.dndOver]:j,[$.dndCopy]:j&&"copy"===R,[$.dndGroup]:j&&T},de),[i.disabled,i.dndCopy,i.dndDragging,i.dndGroup,i.dndOver,i.rule,z,R,he,Z,m,T,P,j,pe,F,v,de]);return{...e,classNames:B,cloneRule:q,disabled:z,dndRef:I,dragMonitorId:L,dragRef:D,dropMonitorId:O,fieldData:Z,generateOnChangeHandler:H,onChangeField:W,onChangeOperator:G,onChangeValueSource:V,onChangeValue:U,hideValueControls:oe,inputType:ee,operators:te,outerClassName:fe,removeRule:Y,rule:F,shiftRuleUp:X,shiftRuleDown:Q,toggleLockRule:K,validationResult:ue,valueEditorSeparator:ae,valueEditorType:se,values:le,valueSourceOptions:ce,valueSources:ie}},cn=r.memo(function(e){const t=te(11),n=dn(e),{schema:r}=n,{controls:i}=r,{ruleGroupBodyElements:s,ruleGroupHeaderElements:a}=i,l=ne(n.addRule),c=ne(n.addGroup),u=ne(n.cloneGroup),d=ne(n.toggleLockGroup),h=ne(n.removeGroup),p=ne(n.shiftGroupUp),f=ne(n.shiftGroupDown);let g;return t[0]!==s||t[1]!==a||t[2]!==c||t[3]!==l||t[4]!==u||t[5]!==h||t[6]!==n||t[7]!==f||t[8]!==p||t[9]!==d?(g=(0,o.jsxs)("div",{ref:n.previewRef,title:n.accessibleDescription,className:n.outerClassName,"data-testid":A.ruleGroup,"data-dragmonitorid":n.dragMonitorId,"data-dropmonitorid":n.dropMonitorId,"data-rule-group-id":n.id,"data-level":n.path.length,"data-path":JSON.stringify(n.path),children:[(0,o.jsx)("div",{ref:n.dropRef,className:n.classNames.header,children:(0,o.jsx)(a,{...n,addRule:l,addGroup:c,cloneGroup:u,toggleLockGroup:d,removeGroup:h,shiftGroupUp:p,shiftGroupDown:f})}),(0,o.jsx)("div",{className:n.classNames.body,children:(0,o.jsx)(s,{...n,addRule:l,addGroup:c,cloneGroup:u,toggleLockGroup:d,removeGroup:h,shiftGroupUp:p,shiftGroupDown:f})})]}),t[0]=s,t[1]=a,t[2]=c,t[3]=l,t[4]=u,t[5]=h,t[6]=n,t[7]=f,t[8]=p,t[9]=d,t[10]=g):g=t[10],g}),un=r.memo(function(e){const{schema:{controls:{shiftActions:t,dragHandle:n,combinatorSelector:r,notToggle:i,addRuleAction:s,addGroupAction:a,cloneGroupAction:l,lockGroupAction:c,removeGroupAction:u}}}=e;return(0,o.jsxs)(o.Fragment,{children:[e.schema.showShiftActions&&e.path.length>0&&(0,o.jsx)(t,{testID:A.shiftActions,level:e.path.length,path:e.path,titles:{shiftUp:e.translations.shiftActionUp.title,shiftDown:e.translations.shiftActionDown.title},labels:{shiftUp:e.translations.shiftActionUp.label,shiftDown:e.translations.shiftActionDown.label},className:e.classNames.shiftActions,disabled:e.disabled,shiftUp:e.shiftGroupUp,shiftDown:e.shiftGroupDown,shiftUpDisabled:e.shiftUpDisabled,shiftDownDisabled:e.shiftDownDisabled,context:e.context,validation:e.validationResult,schema:e.schema,ruleOrGroup:e.ruleGroup},A.shiftActions),e.path.length>0&&e.schema.enableDragAndDrop&&(0,o.jsx)(n,{testID:A.dragHandle,ref:e.dragRef,level:e.path.length,path:e.path,title:e.translations.dragHandle.title,label:e.translations.dragHandle.label,className:e.classNames.dragHandle,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema,ruleOrGroup:e.ruleGroup},A.dragHandle),!e.schema.showCombinatorsBetweenRules&&!e.schema.independentCombinators&&(0,o.jsx)(r,{testID:A.combinators,options:e.schema.combinators,value:e.combinator,title:e.translations.combinators.title,className:e.classNames.combinators,handleOnChange:e.onCombinatorChange,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,schema:e.schema},A.combinators),e.schema.showNotToggle&&(0,o.jsx)(i,{testID:A.notToggle,className:e.classNames.notToggle,title:e.translations.notToggle.title,label:e.translations.notToggle.label,checked:e.ruleGroup.not,handleOnChange:e.onNotToggleChange,level:e.path.length,disabled:e.disabled,path:e.path,context:e.context,validation:e.validationResult,schema:e.schema,ruleGroup:e.ruleGroup},A.notToggle),(0,o.jsx)(s,{testID:A.addRule,label:e.translations.addRule.label,title:e.translations.addRule.title,className:e.classNames.addRule,handleOnClick:e.addRule,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.ruleGroup,schema:e.schema},A.addRule),(0,o.jsx)(a,{testID:A.addGroup,label:e.translations.addGroup.label,title:e.translations.addGroup.title,className:e.classNames.addGroup,handleOnClick:e.addGroup,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.ruleGroup,schema:e.schema},A.addGroup),e.schema.showCloneButtons&&e.path.length>0&&(0,o.jsx)(l,{testID:A.cloneGroup,label:e.translations.cloneRuleGroup.label,title:e.translations.cloneRuleGroup.title,className:e.classNames.cloneGroup,handleOnClick:e.cloneGroup,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.ruleGroup,schema:e.schema},A.cloneGroup),e.schema.showLockButtons&&(0,o.jsx)(c,{testID:A.lockGroup,label:e.translations.lockGroup.label,title:e.translations.lockGroup.title,className:e.classNames.lockGroup,handleOnClick:e.toggleLockGroup,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,disabledTranslation:e.parentDisabled?void 0:e.translations.lockGroupDisabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.ruleGroup,schema:e.schema},A.lockGroup),e.path.length>0&&(0,o.jsx)(u,{testID:A.removeGroup,label:e.translations.removeGroup.label,title:e.translations.removeGroup.title,className:e.classNames.removeGroup,handleOnClick:e.removeGroup,rules:e.ruleGroup.rules,level:e.path.length,path:e.path,disabled:e.disabled,context:e.context,validation:e.validationResult,ruleOrGroup:e.ruleGroup,schema:e.schema},A.removeGroup)]})}),dn=e=>{const{id:t,path:n,ruleGroup:o,schema:{qbId:i,accessibleDescriptionGenerator:s,classNames:a,combinators:l,createRule:c,createRuleGroup:u,disabledPaths:d,independentCombinators:h,validationMap:p,enableDragAndDrop:f,getRuleGroupClassname:g,suppressStandardClassnames:m},actions:{onGroupAdd:v,onGroupRemove:y,onPropChange:b,onRuleAdd:w,moveRule:x},disabled:S,parentDisabled:C,shiftUpDisabled:_,shiftDownDisabled:k,combinator:A,rules:M,not:E,dropEffect:R="move",groupItems:T=!1,dragMonitorId:L="",dropMonitorId:O="",previewRef:I=null,dragRef:D=null,dropRef:P=null,isDragging:j=!1,isOver:z=!1}=e;J();const F=!!C||!!S,B=(0,r.useMemo)(()=>o&&de(o)?o.combinator:o?Ae(l):A??Ae(l),[A,l,o]),H=(0,r.useMemo)(()=>{if(o){if(o.combinator===B||h)return o;const e=structuredClone(o);return e.combinator=B,e}return{rules:M,not:E}},[B,h,E,o,M]),W=(0,r.useMemo)(()=>({header:N(m||$.header,a.header,z&&"copy"===R&&a.dndCopy,m||{[$.dndOver]:z,[$.dndCopy]:z&&"copy"===R}),shiftActions:N(m||$.shiftActions,a.shiftActions),dragHandle:N(m||$.dragHandle,a.dragHandle),combinators:N(m||$.combinators,a.valueSelector,a.combinators),notToggle:N(m||$.notToggle,a.notToggle),addRule:N(m||$.addRule,a.actionElement,a.addRule),addGroup:N(m||$.addGroup,a.actionElement,a.addGroup),cloneGroup:N(m||$.cloneGroup,a.actionElement,a.cloneGroup),lockGroup:N(m||$.lockGroup,a.actionElement,a.lockGroup),removeGroup:N(m||$.removeGroup,a.actionElement,a.removeGroup),body:N(m||$.body,a.body)}),[a.actionElement,a.addGroup,a.addRule,a.body,a.cloneGroup,a.combinators,a.dndCopy,a.dragHandle,a.header,a.lockGroup,a.notToggle,a.removeGroup,a.shiftActions,a.valueSelector,R,z,m]),G=(0,r.useCallback)(e=>{F||b("combinator",e,n)},[F,b,n]),V=(0,r.useCallback)((e,t,r)=>{F||b("combinator",e,[...n,t])},[F,b,n]),U=(0,r.useCallback)((e,t)=>{F||b("not",e,n)},[F,b,n]),q=(0,r.useCallback)((e,t)=>{if(!F){const e=c();w(e,n,t)}},[c,F,w,n]),K=(0,r.useCallback)((e,t)=>{if(!F){const e=u(h);v(e,n,t)}},[u,F,h,v,n]),Y=(0,r.useCallback)(()=>{if(!F){const e=[...Ot(n),n.at(-1)+1];x(n,e,!0)}},[F,x,n]),X=(0,r.useCallback)((e,t)=>{F||_||x(n,"up",e?.altKey)},[F,x,n,_]),Q=(0,r.useCallback)((e,t)=>{F||k||x(n,"down",e?.altKey)},[F,x,n,k]),Z=(0,r.useCallback)(()=>{b("disabled",!F,n)},[F,b,n]),ee=(0,r.useCallback)(()=>{F||y(n)},[F,y,n]),te=(0,r.useMemo)(()=>p[t??""],[t,p]),ne=(0,r.useMemo)(()=>Gt(te),[te]),re=(0,r.useMemo)(()=>h?null:ke(l,B)?.className??"",[B,l,h]),oe=(0,r.useMemo)(()=>g(H),[g,H]),ie=(0,r.useMemo)(()=>N(oe,re,m||$.ruleGroup,a.ruleGroup,F&&a.disabled,j&&a.dndDragging,z&&T&&a.dndGroup,m||{[$.disabled]:F,[$.dndDragging]:j,[$.dndGroup]:z&&T},ne),[a.disabled,a.dndDragging,a.dndGroup,a.ruleGroup,re,F,T,j,z,oe,m,ne]),se=(0,r.useMemo)(()=>{const e=[];for(let t=0;t<H.rules.length;t++){const r=[...n,t];e[t]={path:r,disabled:F||d.some(e=>It(r,e))}}return e},[F,n,H.rules.length,d]),ae=(0,r.useMemo)(()=>s({path:n,qbId:i}),[s,n,i]);return{...e,addGroup:K,addRule:q,accessibleDescription:ae,classNames:W,cloneGroup:Y,combinator:B,disabled:F,dragMonitorId:L,dragRef:D,dropMonitorId:O,dropRef:P,isDragging:j,isOver:z,onCombinatorChange:G,onGroupAdd:v,onIndependentCombinatorChange:V,onNotToggleChange:U,outerClassName:ie,parentDisabled:C,pathsMemo:se,previewRef:I,removeGroup:ee,ruleGroup:H,shiftGroupUp:X,shiftGroupDown:Q,toggleLockGroup:Z,validationClassName:ne,validationResult:te}};function hn(e){return e.value}var pn=e=>{const t=te(12),{onChange:n,val:r}=fn(e);let i;t[0]!==n||t[1]!==e.multiple?(i={multiple:e.multiple,onChange:n},t[0]=n,t[1]=e.multiple,t[2]=i):i=t[2];const s=(e=>{const t=te(3),{multiple:n,onChange:r}=e;let o,i;return t[0]!==n||t[1]!==r?(i=n?e=>r(Array.from(e.target.selectedOptions).map(hn)):e=>r(e.target.value),t[0]=n,t[1]=r,t[2]=i):i=t[2],o=i,o})(i),a=!!e.multiple;let l;var c;return t[3]!==e.className||t[4]!==e.disabled||t[5]!==e.options||t[6]!==e.testID||t[7]!==e.title||t[8]!==s||t[9]!==a||t[10]!==r?(l=(0,o.jsx)("select",{"data-testid":e.testID,className:e.className,value:r,title:e.title,disabled:e.disabled,multiple:a,onChange:s,children:(c=e.options,Ce(c)?c.map(e=>(0,o.jsx)("optgroup",{label:e.label,children:e.options.map(e=>(0,o.jsx)("option",{value:e.name,disabled:e.disabled,children:e.label},e.name))},e.label)):Array.isArray(c)?c.map(e=>(0,o.jsx)("option",{value:e.name,disabled:e.disabled,children:e.label},e.name)):null)}),t[3]=e.className,t[4]=e.disabled,t[5]=e.options,t[6]=e.testID,t[7]=e.title,t[8]=s,t[9]=a,t[10]=r,t[11]=l):l=t[11],l},fn=e=>{const t=te(10),{handleOnChange:n,listsAsArrays:r,multiple:o,value:i}=e,s=void 0!==r&&r,a=void 0!==o&&o;let l;t[0]!==n||t[1]!==s||t[2]!==a?(l=e=>{if(a){const t=se(e);n(s?t:oe(t,","))}else n(e)},t[0]=n,t[1]=s,t[2]=a,t[3]=l):l=t[3];const c=l;let u,d;t[4]!==a||t[5]!==i?(d=a?se(i):i,t[4]=a,t[5]=i,t[6]=d):d=t[6],u=d;const h=u;let p;return t[7]!==c||t[8]!==h?(p={onChange:c,val:h},t[7]=c,t[8]=h,t[9]=p):p=t[9],p},gn={actionElement:b,addGroupAction:b,addRuleAction:b,cloneGroupAction:b,cloneRuleAction:b,combinatorSelector:pn,dragHandle:w,fieldSelector:pn,inlineCombinator:e=>{const{component:t,...n}=e,r=N(n.schema.suppressStandardClassnames||$.betweenRules,n.schema.classNames.betweenRules);return(0,o.jsx)("div",{className:r,"data-testid":A.inlineCombinator,children:(0,o.jsx)(t,{...n,testID:A.combinators})})},lockGroupAction:b,lockRuleAction:b,notToggle:e=>(0,o.jsxs)("label",{"data-testid":e.testID,className:e.className,title:e.title,children:[(0,o.jsx)("input",{type:"checkbox",onChange:t=>e.handleOnChange(t.target.checked),checked:!!e.checked,disabled:e.disabled}),e.label]}),operatorSelector:pn,removeGroupAction:b,removeRuleAction:b,rule:sn,ruleGroup:cn,ruleGroupBodyElements:r.memo(function(e){const{schema:{controls:{combinatorSelector:t,inlineCombinator:n,ruleGroup:i,rule:s}}}=e;return(0,o.jsx)(o.Fragment,{children:e.ruleGroup.rules.map((a,l,c)=>{let{length:u}=c;const d=e.pathsMemo[l],h=d.path,p=d.disabled||"string"!=typeof a&&a.disabled,f=It([0],h),g=0===e.path.length&&l===u-1,m="string"==typeof a?[...h,a].join("-"):a.id;return(0,o.jsxs)(r.Fragment,{children:[l>0&&!e.schema.independentCombinators&&e.schema.showCombinatorsBetweenRules&&(0,o.jsx)(n,{options:e.schema.combinators,value:e.combinator,title:e.translations.combinators.title,className:e.classNames.combinators,handleOnChange:e.onCombinatorChange,rules:e.ruleGroup.rules,level:e.path.length,context:e.context,validation:e.validationResult,component:t,path:h,disabled:e.disabled,schema:e.schema},A.inlineCombinator),"string"==typeof a?(0,o.jsx)(n,{options:e.schema.combinators,value:a,title:e.translations.combinators.title,className:e.classNames.combinators,handleOnChange:t=>e.onIndependentCombinatorChange(t,l),rules:e.ruleGroup.rules,level:e.path.length,context:e.context,validation:e.validationResult,component:t,path:h,disabled:p,schema:e.schema},`${A.inlineCombinator}-independent`):ue(a)?(0,o.jsx)(i,{id:a.id,schema:e.schema,actions:e.actions,path:h,translations:e.translations,ruleGroup:a,rules:a.rules,combinator:de(a)?a.combinator:void 0,not:!!a.not,disabled:p,parentDisabled:e.parentDisabled||e.disabled,shiftUpDisabled:f,shiftDownDisabled:g,context:e.context},A.ruleGroup):(0,o.jsx)(s,{id:a.id,rule:a,field:a.field,operator:a.operator,value:a.value,valueSource:a.valueSource,schema:e.schema,actions:e.actions,path:h,disabled:p,parentDisabled:e.parentDisabled||e.disabled,translations:e.translations,shiftUpDisabled:f,shiftDownDisabled:g,context:e.context},A.rule)]},m)})})}),ruleGroupHeaderElements:un,shiftActions:e=>(0,o.jsxs)("div",{"data-testid":e.testID,className:e.className,children:[(0,o.jsx)("button",{disabled:e.disabled||e.shiftUpDisabled,onClick:e.shiftUp,title:e.titles?.shiftUp,children:e.labels?.shiftUp}),(0,o.jsx)("button",{disabled:e.disabled||e.shiftDownDisabled,onClick:e.shiftDown,title:e.titles?.shiftDown,children:e.labels?.shiftDown})]}),valueEditor:e=>{const{operator:t,value:n,handleOnChange:i,title:s,className:a,type:l="text",values:c=[],listsAsArrays:u,fieldData:d,disabled:h,separator:p=null,testID:f,selectorComponent:g=e.schema.controls.valueSelector,inputType:m,parseNumbers:y,skipHook:b,valueSource:w,...x}=e,{valueAsArray:S,multiValueHandler:C,parseNumberMethod:_,valueListItemClassName:k,inputTypeCoerced:A}=(e=>{const t=te(29),{handleOnChange:n,inputType:o,operator:i,value:s,listsAsArrays:a,parseNumbers:l,values:c,type:u,skipHook:d,schema:h}=e,{classNames:p,suppressStandardClassnames:f}=h;let g,m,y,b;t[0]!==n||t[1]!==o||t[2]!==i||t[3]!==d||t[4]!==u||t[5]!==s?(g=()=>{d||"multiselect"===u||["between","notBetween","in","notIn"].includes(i)||!(Array.isArray(s)||"number"===o&&"string"==typeof s&&s.includes(","))||n(se(s,{retainEmptyStrings:!0})[0]??"")},m=[n,o,i,d,u,s],t[0]=n,t[1]=o,t[2]=i,t[3]=d,t[4]=u,t[5]=s,t[6]=g,t[7]=m):(g=t[6],m=t[7]),(0,r.useEffect)(g,m),t[8]!==s?(b=se(s,{retainEmptyStrings:!0}),t[8]=s,t[9]=b):b=t[9],y=b;const w=y;let x,S;t[10]!==o||t[11]!==l?(S=Le({parseNumbers:l,inputType:o}),t[10]=o,t[11]=l,t[12]=S):S=t[12],x=S;const C=x;let _;t[13]!==n||t[14]!==a||t[15]!==i||t[16]!==C||t[17]!==w||t[18]!==c?(_=(e,t)=>{const r=(0,v.jM)(w,n=>{n[t]=Te(e,{parseNumbers:C}),0!==t||"between"!==i&&"notBetween"!==i||!(n.length<2||void 0===n[1])||(n[1]=Ae(c))});n(a?r:oe(r,","))},t[13]=n,t[14]=a,t[15]=i,t[16]=C,t[17]=w,t[18]=c,t[19]=_):_=t[19];const k=_,A=f||$.valueListItem,M=p?.valueListItem;let E;t[20]!==A||t[21]!==M?(E=O(A,M),t[20]=A,t[21]=M,t[22]=E):E=t[22];const R=E,T="in"===i||"notIn"===i?"text":o||"text";let L;return t[23]!==T||t[24]!==k||t[25]!==C||t[26]!==w||t[27]!==R?(L={valueAsArray:w,multiValueHandler:k,parseNumberMethod:C,valueListItemClassName:R,inputTypeCoerced:T},t[23]=T,t[24]=k,t[25]=C,t[26]=w,t[27]=R,t[28]=L):L=t[28],L})(e);if("null"===t||"notNull"===t)return null;const M=d?.placeholder??"";if(!("between"!==t&&"notBetween"!==t||"select"!==l&&"text"!==l)){const t=["from","to"].map((t,n)=>"text"===l?(0,o.jsx)("input",{type:A,placeholder:M,value:S[n]??"",className:k,disabled:h,onChange:e=>C(e.target.value,n)},t):(0,o.jsx)(g,{...x,schema:e.schema,className:k,handleOnChange:e=>C(e,n),disabled:h,value:S[n]??Ae(c),options:c,listsAsArrays:u},t));return(0,o.jsxs)("span",{"data-testid":f,className:a,title:s,children:[t[0],p,t[1]]})}switch(l){case"select":case"multiselect":return(0,o.jsx)(g,{...x,schema:e.schema,testID:f,className:a,title:s,handleOnChange:i,disabled:h,value:n,options:c,multiple:"multiselect"===l,listsAsArrays:u});case"textarea":return(0,o.jsx)("textarea",{"data-testid":f,placeholder:M,value:n,title:s,className:a,disabled:h,onChange:e=>i(e.target.value)});case"switch":case"checkbox":return(0,o.jsx)("input",{"data-testid":f,type:"checkbox",className:a,title:s,onChange:e=>i(e.target.checked),checked:!!n,disabled:h});case"radio":return(0,o.jsx)("span",{"data-testid":f,className:a,title:s,children:c.map(e=>(0,o.jsxs)("label",{children:[(0,o.jsx)("input",{type:"radio",value:e.name,disabled:h,checked:n===e.name,onChange:e=>i(e.target.value)}),e.label]},e.name))})}return(0,o.jsx)("input",{"data-testid":f,type:A,placeholder:M,value:n,title:s,className:a,disabled:h,onChange:e=>i(Te(e.target.value,{parseNumbers:_}))})},valueSelector:pn,valueSourceSelector:pn},mn=()=>null,vn=(0,r.forwardRef)(mn),yn={},bn=e=>{const t=te(193);let n,o;t[0]!==e?(({finalize:n,...o}=e),t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);const i=(0,r.useContext)(y),s=Ht(!1,o.debugMode,i.debugMode),a=n?s:o.debugMode??i.debugMode,l=Ht(!0,o.enableMountQueryChange,i.enableMountQueryChange),c=n?l:o.enableMountQueryChange??i.enableMountQueryChange,u=Ht(!1,o.enableDragAndDrop,i.enableDragAndDrop)&&!1!==i.enableDragAndDrop,d=n?u:o.enableDragAndDrop??i.enableDragAndDrop;let h,p;t[3]!==n||t[4]!==o.controlClassnames||t[5]!==i.controlClassnames?(p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return{queryBuilder:qt("queryBuilder",t),ruleGroup:qt("ruleGroup",t),header:qt("header",t),body:qt("body",t),combinators:qt("combinators",t),addRule:qt("addRule",t),addGroup:qt("addGroup",t),cloneRule:qt("cloneRule",t),cloneGroup:qt("cloneGroup",t),removeGroup:qt("removeGroup",t),rule:qt("rule",t),fields:qt("fields",t),operators:qt("operators",t),value:qt("value",t),removeRule:qt("removeRule",t),notToggle:qt("notToggle",t),shiftActions:qt("shiftActions",t),dragHandle:qt("dragHandle",t),lockRule:qt("lockRule",t),lockGroup:qt("lockGroup",t),valueSource:qt("valueSource",t),actionElement:qt("actionElement",t),valueSelector:qt("valueSelector",t),betweenRules:qt("betweenRules",t),valid:qt("valid",t),invalid:qt("invalid",t),dndDragging:qt("dndDragging",t),dndOver:qt("dndOver",t),dndCopy:qt("dndCopy",t),dndGroup:qt("dndGroup",t),disabled:qt("disabled",t),valueListItem:qt("valueListItem",t),branches:qt("branches",t)}}(n?Object.assign({},k):yn,i.controlClassnames,o.controlClassnames),t[3]=n,t[4]=o.controlClassnames,t[5]=i.controlClassnames,t[6]=p):p=t[6],h=p;const f=h;let g,m;t[7]!==f.actionElement||t[8]!==f.addGroup||t[9]!==f.addRule||t[10]!==f.betweenRules||t[11]!==f.body||t[12]!==f.branches||t[13]!==f.cloneGroup||t[14]!==f.cloneRule||t[15]!==f.combinators||t[16]!==f.disabled||t[17]!==f.dndCopy||t[18]!==f.dndDragging||t[19]!==f.dndGroup||t[20]!==f.dndOver||t[21]!==f.dragHandle||t[22]!==f.fields||t[23]!==f.header||t[24]!==f.invalid||t[25]!==f.lockGroup||t[26]!==f.lockRule||t[27]!==f.notToggle||t[28]!==f.operators||t[29]!==f.queryBuilder||t[30]!==f.removeGroup||t[31]!==f.removeRule||t[32]!==f.rule||t[33]!==f.ruleGroup||t[34]!==f.shiftActions||t[35]!==f.valid||t[36]!==f.value||t[37]!==f.valueListItem||t[38]!==f.valueSelector||t[39]!==f.valueSource?(m={actionElement:f.actionElement,addGroup:f.addGroup,addRule:f.addRule,body:f.body,cloneGroup:f.cloneGroup,cloneRule:f.cloneRule,combinators:f.combinators,dragHandle:f.dragHandle,fields:f.fields,header:f.header,lockGroup:f.lockGroup,lockRule:f.lockRule,notToggle:f.notToggle,operators:f.operators,queryBuilder:f.queryBuilder,removeGroup:f.removeGroup,removeRule:f.removeRule,rule:f.rule,ruleGroup:f.ruleGroup,shiftActions:f.shiftActions,value:f.value,valueSelector:f.valueSelector,valueSource:f.valueSource,betweenRules:f.betweenRules,valid:f.valid,invalid:f.invalid,dndDragging:f.dndDragging,dndOver:f.dndOver,dndCopy:f.dndCopy,dndGroup:f.dndGroup,disabled:f.disabled,valueListItem:f.valueListItem,branches:f.branches},t[7]=f.actionElement,t[8]=f.addGroup,t[9]=f.addRule,t[10]=f.betweenRules,t[11]=f.body,t[12]=f.branches,t[13]=f.cloneGroup,t[14]=f.cloneRule,t[15]=f.combinators,t[16]=f.disabled,t[17]=f.dndCopy,t[18]=f.dndDragging,t[19]=f.dndGroup,t[20]=f.dndOver,t[21]=f.dragHandle,t[22]=f.fields,t[23]=f.header,t[24]=f.invalid,t[25]=f.lockGroup,t[26]=f.lockRule,t[27]=f.notToggle,t[28]=f.operators,t[29]=f.queryBuilder,t[30]=f.removeGroup,t[31]=f.removeRule,t[32]=f.rule,t[33]=f.ruleGroup,t[34]=f.shiftActions,t[35]=f.valid,t[36]=f.value,t[37]=f.valueListItem,t[38]=f.valueSelector,t[39]=f.valueSource,t[40]=m):m=t[40],g=m;const v=g,b=i.controlElements??yn,w=o.controlElements??yn;let x;t[41]!==b.actionElement||t[42]!==b.valueSelector||t[43]!==n||t[44]!==w.actionElement||t[45]!==w.valueSelector?(x=(e,t,r)=>{const o="dragHandle"===e?vn:mn,i=(e.endsWith("Action")&&w.actionElement?w.actionElement:void 0)??(e.endsWith("Selector")&&w.valueSelector?w.valueSelector:void 0),s=(e.endsWith("Action")&&b.actionElement?b.actionElement:void 0)??(e.endsWith("Selector")&&b.valueSelector?b.valueSelector:void 0),a=null===t?o:t??(n?i:void 0)??(null===r?o:r??(n?s:void 0));return a?{[e]:a}:n?{[e]:gn[e]}:yn},t[41]=b.actionElement,t[42]=b.valueSelector,t[43]=n,t[44]=w.actionElement,t[45]=w.valueSelector,t[46]=x):x=t[46];const C=x;let _,$;t[47]!==b.actionElement||t[48]!==b.addGroupAction||t[49]!==b.addRuleAction||t[50]!==b.cloneGroupAction||t[51]!==b.cloneRuleAction||t[52]!==b.combinatorSelector||t[53]!==b.dragHandle||t[54]!==b.fieldSelector||t[55]!==b.inlineCombinator||t[56]!==b.lockGroupAction||t[57]!==b.lockRuleAction||t[58]!==b.notToggle||t[59]!==b.operatorSelector||t[60]!==b.removeGroupAction||t[61]!==b.removeRuleAction||t[62]!==b.rule||t[63]!==b.ruleGroup||t[64]!==b.ruleGroupBodyElements||t[65]!==b.ruleGroupHeaderElements||t[66]!==b.shiftActions||t[67]!==b.valueEditor||t[68]!==b.valueSelector||t[69]!==b.valueSourceSelector||t[70]!==n||t[71]!==C||t[72]!==w.actionElement||t[73]!==w.addGroupAction||t[74]!==w.addRuleAction||t[75]!==w.cloneGroupAction||t[76]!==w.cloneRuleAction||t[77]!==w.combinatorSelector||t[78]!==w.dragHandle||t[79]!==w.fieldSelector||t[80]!==w.inlineCombinator||t[81]!==w.lockGroupAction||t[82]!==w.lockRuleAction||t[83]!==w.notToggle||t[84]!==w.operatorSelector||t[85]!==w.removeGroupAction||t[86]!==w.removeRuleAction||t[87]!==w.rule||t[88]!==w.ruleGroup||t[89]!==w.ruleGroupBodyElements||t[90]!==w.ruleGroupHeaderElements||t[91]!==w.shiftActions||t[92]!==w.valueEditor||t[93]!==w.valueSelector||t[94]!==w.valueSourceSelector?($=Object.assign({},C("addGroupAction",w.addGroupAction,b.addGroupAction),C("addRuleAction",w.addRuleAction,b.addRuleAction),C("cloneGroupAction",w.cloneGroupAction,b.cloneGroupAction),C("cloneRuleAction",w.cloneRuleAction,b.cloneRuleAction),C("combinatorSelector",w.combinatorSelector,b.combinatorSelector),C("dragHandle",w.dragHandle,b.dragHandle),C("fieldSelector",w.fieldSelector,b.fieldSelector),C("inlineCombinator",w.inlineCombinator,b.inlineCombinator),C("lockGroupAction",w.lockGroupAction,b.lockGroupAction),C("lockRuleAction",w.lockRuleAction,b.lockRuleAction),C("notToggle",w.notToggle,b.notToggle),C("operatorSelector",w.operatorSelector,b.operatorSelector),C("removeGroupAction",w.removeGroupAction,b.removeGroupAction),C("removeRuleAction",w.removeRuleAction,b.removeRuleAction),C("shiftActions",w.shiftActions,b.shiftActions),{valueEditor:null===w.valueEditor?mn:w.valueEditor??(null===b.valueEditor?mn:b.valueEditor)??gn.valueEditor},C("valueSourceSelector",w.valueSourceSelector,b.valueSourceSelector),C("rule",w.rule,b.rule),C("ruleGroup",w.ruleGroup,b.ruleGroup),C("ruleGroupBodyElements",w.ruleGroupBodyElements,b.ruleGroupBodyElements),C("ruleGroupHeaderElements",w.ruleGroupHeaderElements,b.ruleGroupHeaderElements),{actionElement:w.actionElement??b.actionElement??(n?gn.actionElement:void 0)},{valueSelector:w.valueSelector??b.valueSelector??(n?gn.valueSelector:void 0)}),t[47]=b.actionElement,t[48]=b.addGroupAction,t[49]=b.addRuleAction,t[50]=b.cloneGroupAction,t[51]=b.cloneRuleAction,t[52]=b.combinatorSelector,t[53]=b.dragHandle,t[54]=b.fieldSelector,t[55]=b.inlineCombinator,t[56]=b.lockGroupAction,t[57]=b.lockRuleAction,t[58]=b.notToggle,t[59]=b.operatorSelector,t[60]=b.removeGroupAction,t[61]=b.removeRuleAction,t[62]=b.rule,t[63]=b.ruleGroup,t[64]=b.ruleGroupBodyElements,t[65]=b.ruleGroupHeaderElements,t[66]=b.shiftActions,t[67]=b.valueEditor,t[68]=b.valueSelector,t[69]=b.valueSourceSelector,t[70]=n,t[71]=C,t[72]=w.actionElement,t[73]=w.addGroupAction,t[74]=w.addRuleAction,t[75]=w.cloneGroupAction,t[76]=w.cloneRuleAction,t[77]=w.combinatorSelector,t[78]=w.dragHandle,t[79]=w.fieldSelector,t[80]=w.inlineCombinator,t[81]=w.lockGroupAction,t[82]=w.lockRuleAction,t[83]=w.notToggle,t[84]=w.operatorSelector,t[85]=w.removeGroupAction,t[86]=w.removeRuleAction,t[87]=w.rule,t[88]=w.ruleGroup,t[89]=w.ruleGroupBodyElements,t[90]=w.ruleGroupHeaderElements,t[91]=w.shiftActions,t[92]=w.valueEditor,t[93]=w.valueSelector,t[94]=w.valueSourceSelector,t[95]=$):$=t[95],_=$;const A=_,M=o.translations??yn,E=i.translations??yn;let R,T;E.addGroup,E.addGroup,E.addRule,E.addRule,E.cloneRule,E.cloneRule,E.cloneRuleGroup,E.cloneRuleGroup,E.combinators,E.dragHandle,E.dragHandle,E.fields,E.fields,E.fields,E.fields,E.lockGroup,E.lockGroup,E.lockGroupDisabled,E.lockGroupDisabled,E.lockRule,E.lockRule,E.lockRuleDisabled,E.lockRuleDisabled,E.notToggle,E.notToggle,E.operators,E.operators,E.operators,E.operators,E.removeGroup,E.removeGroup,E.removeRule,E.removeRule,E.shiftActionDown,E.shiftActionDown,E.shiftActionUp,E.shiftActionUp,E.value,E.values,E.values,E.values,E.values,E.valueSourceSelector,M.addGroup,M.addGroup,M.addRule,M.addRule,M.cloneRule,M.cloneRule,M.cloneRuleGroup,M.cloneRuleGroup,M.combinators,M.dragHandle,M.dragHandle,M.fields,M.fields,M.fields,M.fields,M.lockGroup,M.lockGroup,M.lockGroupDisabled,M.lockGroupDisabled,M.lockRule,M.lockRule,M.lockRuleDisabled,M.lockRuleDisabled,M.notToggle,M.notToggle,M.operators,M.operators,M.operators,M.operators,M.removeGroup,M.removeGroup,M.removeRule,M.removeRule,M.shiftActionDown,M.shiftActionDown,M.shiftActionUp,M.shiftActionUp,M.value,M.values,M.values,M.values,M.values,M.valueSourceSelector,t[96]!==E.addGroup?.label||t[97]!==E.addGroup?.title||t[98]!==E.addRule?.label||t[99]!==E.addRule?.title||t[100]!==E.cloneRule?.label||t[101]!==E.cloneRule?.title||t[102]!==E.cloneRuleGroup?.label||t[103]!==E.cloneRuleGroup?.title||t[104]!==E.combinators?.title||t[105]!==E.dragHandle?.label||t[106]!==E.dragHandle?.title||t[107]!==E.fields?.placeholderGroupLabel||t[108]!==E.fields?.placeholderLabel||t[109]!==E.fields?.placeholderName||t[110]!==E.fields?.title||t[111]!==E.lockGroup?.label||t[112]!==E.lockGroup?.title||t[113]!==E.lockGroupDisabled?.label||t[114]!==E.lockGroupDisabled?.title||t[115]!==E.lockRule?.label||t[116]!==E.lockRule?.title||t[117]!==E.lockRuleDisabled?.label||t[118]!==E.lockRuleDisabled?.title||t[119]!==E.notToggle?.label||t[120]!==E.notToggle?.title||t[121]!==E.operators?.placeholderGroupLabel||t[122]!==E.operators?.placeholderLabel||t[123]!==E.operators?.placeholderName||t[124]!==E.operators?.title||t[125]!==E.removeGroup?.label||t[126]!==E.removeGroup?.title||t[127]!==E.removeRule?.label||t[128]!==E.removeRule?.title||t[129]!==E.shiftActionDown?.label||t[130]!==E.shiftActionDown?.title||t[131]!==E.shiftActionUp?.label||t[132]!==E.shiftActionUp?.title||t[133]!==E.value?.title||t[134]!==E.valueSourceSelector?.title||t[135]!==E.values?.placeholderGroupLabel||t[136]!==E.values?.placeholderLabel||t[137]!==E.values?.placeholderName||t[138]!==E.values?.title||t[139]!==n||t[140]!==M.addGroup?.label||t[141]!==M.addGroup?.title||t[142]!==M.addRule?.label||t[143]!==M.addRule?.title||t[144]!==M.cloneRule?.label||t[145]!==M.cloneRule?.title||t[146]!==M.cloneRuleGroup?.label||t[147]!==M.cloneRuleGroup?.title||t[148]!==M.combinators?.title||t[149]!==M.dragHandle?.label||t[150]!==M.dragHandle?.title||t[151]!==M.fields?.placeholderGroupLabel||t[152]!==M.fields?.placeholderLabel||t[153]!==M.fields?.placeholderName||t[154]!==M.fields?.title||t[155]!==M.lockGroup?.label||t[156]!==M.lockGroup?.title||t[157]!==M.lockGroupDisabled?.label||t[158]!==M.lockGroupDisabled?.title||t[159]!==M.lockRule?.label||t[160]!==M.lockRule?.title||t[161]!==M.lockRuleDisabled?.label||t[162]!==M.lockRuleDisabled?.title||t[163]!==M.notToggle?.label||t[164]!==M.notToggle?.title||t[165]!==M.operators?.placeholderGroupLabel||t[166]!==M.operators?.placeholderLabel||t[167]!==M.operators?.placeholderName||t[168]!==M.operators?.title||t[169]!==M.removeGroup?.label||t[170]!==M.removeGroup?.title||t[171]!==M.removeRule?.label||t[172]!==M.removeRule?.title||t[173]!==M.shiftActionDown?.label||t[174]!==M.shiftActionDown?.title||t[175]!==M.shiftActionUp?.label||t[176]!==M.shiftActionUp?.title||t[177]!==M.value?.title||t[178]!==M.valueSourceSelector?.title||t[179]!==M.values?.placeholderGroupLabel||t[180]!==M.values?.placeholderLabel||t[181]!==M.values?.placeholderName||t[182]!==M.values?.title?(T=Object.assign(n?Object.assign({},S):{},Xt("addGroup",{label:[M.addGroup?.label,E.addGroup?.label],title:[M.addGroup?.title,E.addGroup?.title]},n),Xt("addRule",{label:[M.addRule?.label,E.addRule?.label],title:[M.addRule?.title,E.addRule?.title]},n),Xt("cloneRule",{label:[M.cloneRule?.label,E.cloneRule?.label],title:[M.cloneRule?.title,E.cloneRule?.title]},n),Xt("cloneRuleGroup",{label:[M.cloneRuleGroup?.label,E.cloneRuleGroup?.label],title:[M.cloneRuleGroup?.title,E.cloneRuleGroup?.title]},n),Xt("combinators",{title:[M.combinators?.title,E.combinators?.title]},n),Xt("dragHandle",{label:[M.dragHandle?.label,E.dragHandle?.label],title:[M.dragHandle?.title,E.dragHandle?.title]},n),Xt("fields",{placeholderGroupLabel:[M.fields?.placeholderGroupLabel,E.fields?.placeholderGroupLabel],placeholderLabel:[M.fields?.placeholderLabel,E.fields?.placeholderLabel],placeholderName:[M.fields?.placeholderName,E.fields?.placeholderName],title:[M.fields?.title,E.fields?.title]},n),Xt("lockGroup",{label:[M.lockGroup?.label,E.lockGroup?.label],title:[M.lockGroup?.title,E.lockGroup?.title]},n),Xt("lockGroupDisabled",{label:[M.lockGroupDisabled?.label,E.lockGroupDisabled?.label],title:[M.lockGroupDisabled?.title,E.lockGroupDisabled?.title]},n),Xt("lockRule",{label:[M.lockRule?.label,E.lockRule?.label],title:[M.lockRule?.title,E.lockRule?.title]},n),Xt("lockRuleDisabled",{label:[M.lockRuleDisabled?.label,E.lockRuleDisabled?.label],title:[M.lockRuleDisabled?.title,E.lockRuleDisabled?.title]},n),Xt("notToggle",{label:[M.notToggle?.label,E.notToggle?.label],title:[M.notToggle?.title,E.notToggle?.title]},n),Xt("operators",{placeholderGroupLabel:[M.operators?.placeholderGroupLabel,E.operators?.placeholderGroupLabel],placeholderLabel:[M.operators?.placeholderLabel,E.operators?.placeholderLabel],placeholderName:[M.operators?.placeholderName,E.operators?.placeholderName],title:[M.operators?.title,E.operators?.title]},n),Xt("values",{placeholderGroupLabel:[M.values?.placeholderGroupLabel,E.values?.placeholderGroupLabel],placeholderLabel:[M.values?.placeholderLabel,E.values?.placeholderLabel],placeholderName:[M.values?.placeholderName,E.values?.placeholderName],title:[M.values?.title,E.values?.title]},n),Xt("removeGroup",{label:[M.removeGroup?.label,E.removeGroup?.label],title:[M.removeGroup?.title,E.removeGroup?.title]},n),Xt("removeRule",{label:[M.removeRule?.label,E.removeRule?.label],title:[M.removeRule?.title,E.removeRule?.title]},n),Xt("shiftActionDown",{label:[M.shiftActionDown?.label,E.shiftActionDown?.label],title:[M.shiftActionDown?.title,E.shiftActionDown?.title]},n),Xt("shiftActionUp",{label:[M.shiftActionUp?.label,E.shiftActionUp?.label],title:[M.shiftActionUp?.title,E.shiftActionUp?.title]},n),Xt("value",{title:[M.value?.title,E.value?.title]},n),Xt("valueSourceSelector",{title:[M.valueSourceSelector?.title,E.valueSourceSelector?.title]},n)),t[96]=E.addGroup?.label,t[97]=E.addGroup?.title,t[98]=E.addRule?.label,t[99]=E.addRule?.title,t[100]=E.cloneRule?.label,t[101]=E.cloneRule?.title,t[102]=E.cloneRuleGroup?.label,t[103]=E.cloneRuleGroup?.title,t[104]=E.combinators?.title,t[105]=E.dragHandle?.label,t[106]=E.dragHandle?.title,t[107]=E.fields?.placeholderGroupLabel,t[108]=E.fields?.placeholderLabel,t[109]=E.fields?.placeholderName,t[110]=E.fields?.title,t[111]=E.lockGroup?.label,t[112]=E.lockGroup?.title,t[113]=E.lockGroupDisabled?.label,t[114]=E.lockGroupDisabled?.title,t[115]=E.lockRule?.label,t[116]=E.lockRule?.title,t[117]=E.lockRuleDisabled?.label,t[118]=E.lockRuleDisabled?.title,t[119]=E.notToggle?.label,t[120]=E.notToggle?.title,t[121]=E.operators?.placeholderGroupLabel,t[122]=E.operators?.placeholderLabel,t[123]=E.operators?.placeholderName,t[124]=E.operators?.title,t[125]=E.removeGroup?.label,t[126]=E.removeGroup?.title,t[127]=E.removeRule?.label,t[128]=E.removeRule?.title,t[129]=E.shiftActionDown?.label,t[130]=E.shiftActionDown?.title,t[131]=E.shiftActionUp?.label,t[132]=E.shiftActionUp?.title,t[133]=E.value?.title,t[134]=E.valueSourceSelector?.title,t[135]=E.values?.placeholderGroupLabel,t[136]=E.values?.placeholderLabel,t[137]=E.values?.placeholderName,t[138]=E.values?.title,t[139]=n,t[140]=M.addGroup?.label,t[141]=M.addGroup?.title,t[142]=M.addRule?.label,t[143]=M.addRule?.title,t[144]=M.cloneRule?.label,t[145]=M.cloneRule?.title,t[146]=M.cloneRuleGroup?.label,t[147]=M.cloneRuleGroup?.title,t[148]=M.combinators?.title,t[149]=M.dragHandle?.label,t[150]=M.dragHandle?.title,t[151]=M.fields?.placeholderGroupLabel,t[152]=M.fields?.placeholderLabel,t[153]=M.fields?.placeholderName,t[154]=M.fields?.title,t[155]=M.lockGroup?.label,t[156]=M.lockGroup?.title,t[157]=M.lockGroupDisabled?.label,t[158]=M.lockGroupDisabled?.title,t[159]=M.lockRule?.label,t[160]=M.lockRule?.title,t[161]=M.lockRuleDisabled?.label,t[162]=M.lockRuleDisabled?.title,t[163]=M.notToggle?.label,t[164]=M.notToggle?.title,t[165]=M.operators?.placeholderGroupLabel,t[166]=M.operators?.placeholderLabel,t[167]=M.operators?.placeholderName,t[168]=M.operators?.title,t[169]=M.removeGroup?.label,t[170]=M.removeGroup?.title,t[171]=M.removeRule?.label,t[172]=M.removeRule?.title,t[173]=M.shiftActionDown?.label,t[174]=M.shiftActionDown?.title,t[175]=M.shiftActionUp?.label,t[176]=M.shiftActionUp?.title,t[177]=M.value?.title,t[178]=M.valueSourceSelector?.title,t[179]=M.values?.placeholderGroupLabel,t[180]=M.values?.placeholderLabel,t[181]=M.values?.placeholderName,t[182]=M.values?.title,t[183]=T):T=t[183],R=T;const L=R;let N;return t[184]!==v||t[185]!==A||t[186]!==a||t[187]!==d||t[188]!==c||t[189]!==o.initialQuery||t[190]!==o.qbId||t[191]!==L?(N={controlClassnames:v,controlElements:A,debugMode:a,enableDragAndDrop:d,enableMountQueryChange:c,translations:L,initialQuery:o.initialQuery,qbId:o.qbId},t[184]=v,t[185]=A,t[186]=a,t[187]=d,t[188]=c,t[189]=o.initialQuery,t[190]=o.qbId,t[191]=L,t[192]=N):N=t[192],N},wn=e=>t=>G.selectors.getQuerySelectorById({queries:t.queries},e),xn=(0,i.jO)(W),Sn={},Cn={},_n=[],$n={},kn=()=>null,An=()=>"",Mn=()=>!0,En=function(){console.log(...arguments)};function Rn(e,t){const{query:n,defaultQuery:o,getValueEditorSeparator:i=kn,getRuleClassname:s=An,getRuleGroupClassname:a=An,onAddRule:l=Mn,onAddGroup:c=Mn,onMoveRule:u=Mn,onMoveGroup:d=Mn,onGroupRule:h=Mn,onGroupGroup:p=Mn,onRemove:f=Mn,onQueryChange:g,showCombinatorsBetweenRules:m=!1,showNotToggle:b=!1,showShiftActions:w=!1,showCloneButtons:x=!1,showLockButtons:S=!1,suppressStandardClassnames:C=!1,resetOnFieldChange:k=!0,resetOnOperatorChange:A=!1,autoSelectField:T=!0,autoSelectOperator:L=!0,autoSelectValue:O=!0,addRuleToNewGroups:I=!1,listsAsArrays:D=!1,parseNumbers:P=!1,disabled:j=!1,validator:z,onLog:F=En,idGenerator:B,accessibleDescriptionGenerator:H=zt}=e,{qbId:W,rqbContext:G,fields:V,fieldMap:U,combinators:X,getOperatorsMain:Q,getRuleDefaultOperator:Z,getValueEditorTypeMain:ee,getValueSourcesMain:te,getValuesMain:ne,getRuleDefaultValue:re,getInputTypeMain:oe,createRule:ie,createRuleGroup:se}=t,{controlClassnames:ae,controlElements:le,debugMode:ce,enableDragAndDrop:pe,enableMountQueryChange:fe,translations:ge}=G,me=!!m,ve=!!b,ye=!!w,be=!!x,we=!!S,xe=!!k,Se=!!A,Ce=!!T,_e=!!L,$e=!!O,ke=!!I,Me=!!D,Ee=!!C,Re=(0,r.useCallback)(function(){ce&&F(...arguments)},[ce,F]);(e=>{K();const{defaultQuery:t,queryProp:n}=e;(e=>{const t=(0,r.useRef)({value:e,prev:null}),n=t.current.value;e!==n&&(t.current={value:e,prev:n}),t.current.prev})(!!n)})({defaultQuery:o,queryProp:n});const Te=Y(),Le=K(),Ne=(0,r.useMemo)(()=>wn(W),[W]),Oe=(e=>{const t=r.useContext(y);return xn(e,void 0)??t?.initialQuery})(Ne),Ie=(0,r.useCallback)(()=>Ne(Te.getState()),[Te,Ne]),De=(0,r.useMemo)(()=>se(),[se]),Pe=n??Oe??o??De,je=Pe.id?Pe:Zt(Pe,{idGenerator:B}),[ze]=(0,r.useState)(je),Fe=(0,r.useMemo)(()=>({...G,initialQuery:ze}),[G,ze]);(0,r.useEffect)(()=>{n&&!Object.is(n,Oe)&&Le(q({payload:{qbId:W,query:n},onQueryChange:void 0}))},[n,W,Oe,Le]);const Be=(0,r.useMemo)(()=>he(je),[je]),He=!!e.independentCombinators&&!Be;J(0,He||!He&&e.independentCombinators);const We=(0,r.useRef)(!1);(0,r.useEffect)(()=>{We.current||(We.current=!0,Le(q({payload:{qbId:W,query:je},onQueryChange:fe&&"function"==typeof g?g:void 0})))},[fe,g,W,Le,je]);const Ge=(0,r.useCallback)(e=>{Le(q({payload:{qbId:W,query:e},onQueryChange:g}))},[g,W,Le]),Ve=(0,r.useMemo)(()=>Array.isArray(j)&&j||_n,[j]),Ue=!0===j,qe=(0,r.useMemo)(()=>je.disabled||Ve.some(e=>0===e.length),[Ve,je.disabled]),Ke=(0,r.useCallback)((e,t,n)=>{const r=wn(W)(Te.getState());if(!r)return;if(jt(t,r)||Ue)return void Re({qbId:W,type:M,rule:e,parentPath:t,query:r});const o=l(e,t,r,n);if(!o)return void Re({qbId:W,type:"onAddRule callback returned false",rule:e,parentPath:t,query:r});const i=!0===o?e:o,s=nn(r,i,t,{combinators:X,combinatorPreceding:i.combinatorPreceding??void 0,idGenerator:B});Re({qbId:W,type:R,query:r,newQuery:s,newRule:i,parentPath:t}),Ge(s)},[W,Te,Ue,l,X,B,Re,Ge]),Ye=(0,r.useCallback)((e,t,n)=>{const r=wn(W)(Te.getState());if(!r)return;if(jt(t,r)||Ue)return void Re({qbId:W,type:M,ruleGroup:e,parentPath:t,query:r});const o=c(e,t,r,n);if(!o)return void Re({qbId:W,type:"onAddGroup callback returned false",ruleGroup:e,parentPath:t,query:r});const i=!0===o?e:o,s=nn(r,i,t,{combinators:X,combinatorPreceding:i.combinatorPreceding??void 0,idGenerator:B});Re({qbId:W,type:R,query:r,newQuery:s,newGroup:i,parentPath:t}),Ge(s)},[W,Te,Ue,c,X,B,Re,Ge]),Xe=(0,r.useCallback)((e,t,n)=>{const r=wn(W)(Te.getState());if(!r)return;if(jt(n,r)&&"disabled"!==e||Ue)return void Re({qbId:W,type:E,path:n,prop:e,value:t,query:r});const o=function(e,t,n,r){let{resetOnFieldChange:o=!0,resetOnOperatorChange:i=!1,getRuleDefaultOperator:s=()=>"=",getValueSources:a=()=>["value"],getRuleDefaultValue:l=()=>""}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return(0,v.jM)(e,e=>{if("combinator"===t&&!de(e)){const t=Nt(Ot(r),e).rules;return void(r.at(-1)%2==1&&(t[r.at(-1)]=n))}const c=Nt(r,e);if(!c)return;const u=ue(c);if(c[t]===n)return;if("valueSource"!==t&&(c[t]=n),u)return;let d=!1,h=!1;o&&"field"===t&&(c.operator=s(n),d=!0,h=!0),i&&"operator"===t&&(d=!0,h=!0);const p=a(c.field,c.operator)[0];(d&&c.valueSource&&p!==c.valueSource||"valueSource"===t&&n!==c.valueSource)&&(h=!!c.valueSource||!c.valueSource&&n!==p,c.valueSource=d?p:n),h&&(c.value=l(c))})}(r,e,t,n,{resetOnFieldChange:xe,resetOnOperatorChange:Se,getRuleDefaultOperator:Z,getValueSources:te,getRuleDefaultValue:re});Re({qbId:W,type:"rule or group updated",query:r,newQuery:o,prop:e,value:t,path:n}),Ge(o)},[W,Te,Ue,xe,Se,Z,te,re,Re,Ge]),Qe=(0,r.useCallback)((e,t)=>{const n=wn(W)(Te.getState());if(!n)return;if(jt(e,n)||Ue)return void Re({qbId:W,type:E,path:e,query:n});const r=Nt(e,n);if(r)if(f(r,e,n,t)){const t=(o=n,0===(i=e).length||!de(o)&&!Nt(i,o)?o:(0,v.jM)(o,e=>{const t=i.at(-1),n=Nt(Ot(i),e);if(n&&ue(n))if(!de(n)&&n.rules.length>1){const e=0===t?0:t-1;n.rules.splice(e,2)}else n.rules.splice(t,1)}));Re({qbId:W,type:"rule or group removed",query:n,newQuery:t,path:e,ruleOrGroup:r}),Ge(t)}else Re({qbId:W,type:"onRemove callback returned false",ruleOrGroup:r,path:e,query:n});var o,i},[W,Te,Ue,Re,f,Ge]),Ze=(0,r.useCallback)((e,t,n,r)=>{const o=wn(W)(Te.getState());if(!o)return;if(jt(e,o)||Ue)return void Re({qbId:W,type:E,oldPath:e,newPath:t,query:o});const i=function(e,t,n){let{clone:r=!1,combinators:o=_,idGenerator:i=Bt}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=rn(e,t,n);if(0===t.length||It(t,s)||!Nt(Ot(s),e))return e;const a=Nt(t,e);if(!a)return e;const l=r?tn(a,{idGenerator:i}):a;return(0,v.jM)(e,e=>{const n=he(e),i=Nt(Ot(t),e),a=t.at(-1),c=n&&a>0?i.rules[a-1]:null,u=n&&a<i.rules.length-1?i.rules[a+1]:null;if(!r){const e=n?Math.max(0,a-1):a,t=n?2:1;i.rules.splice(e,t)}const d=[...s],h=Pt(t,s);!r&&t.length===h.length+1&&s[h.length]>t[h.length]&&(d[h.length]-=n?2:1);const p=Ot(d),f=Nt(p,e),g=d.at(-1),m=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.rules.splice(g,0,...t)};if(0!==f.rules.length&&n)if(0===g)if(0===a&&u)m(l,u);else{const e=f.rules[1]??c??Ae(o);m(l,e)}else m(c||(f.rules[g-2]??u??Ae(o)),l);else m(l)})}(o,e,t,{clone:n,combinators:X,idGenerator:B}),s=Nt(e,o),a=ue(s),l=(a?d:u)(s,e,t,o,i,{clone:n,combinators:X},r);if(!l)return void Re({qbId:W,type:a?"onMoveGroup callback returned false":"onMoveRule callback returned false",ruleOrGroup:s,oldPath:e,newPath:t,clone:n,query:o,nextQuery:i});const c=ue(l)?l:i;Re({qbId:W,type:"rule or group moved",query:o,newQuery:c,oldPath:e,newPath:t,clone:n}),Ge(c)},[W,Te,Ue,X,B,d,u,Re,Ge]),Je=(0,r.useCallback)((e,t,n,r)=>{const o=wn(W)(Te.getState());if(!o)return;if(jt(e,o)||Ue)return void Re({qbId:W,type:E,sourcePath:e,targetPath:t,query:o});const i=function(e,t,n){let{clone:r=!1,combinators:o=_,idGenerator:i=Bt}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=rn(e,t,n);if(0===t.length||It(t,s)||!Nt(Ot(s),e))return e;const a=Nt(t,e),l=Nt(n,e);if(!a||!l)return e;const c=r?tn(a,{idGenerator:i}):a;return(0,v.jM)(e,e=>{const n=he(e),a=Nt(Ot(t),e),u=t.at(-1);if(!r){const e=n?Math.max(0,u-1):u,t=n?2:1;a.rules.splice(e,t)}const d=[...s],h=Pt(t,s);!r&&t.length===h.length+1&&s[h.length]>t[h.length]&&(d[h.length]-=n?2:1);const p=Ot(d),f=Nt(p,e),g=d.at(-1);f.rules.splice(g,1,Jt(n?{rules:[l,Ae(o),c]}:{combinator:Ae(o),rules:[l,c]},{idGenerator:i}))})}(o,e,t,{clone:n,combinators:X,idGenerator:B}),s=Nt(e,o),a=ue(s),l=(a?p:h)(s,e,t,o,i,{clone:n,combinators:X},r);if(!l)return void Re({qbId:W,type:a?"onGroupGroup callback returned false":"onGroupRule callback returned false",ruleOrGroup:s,sourcePath:e,targetPath:t,clone:n,query:o,nextQuery:i});const c=ue(l)?l:i;Re({qbId:W,type:"rule or group grouped with another",query:o,newQuery:c,sourcePath:e,targetPath:t,clone:n}),Ge(c)},[W,Te,Ue,X,B,p,h,Re,Ge]),{validationResult:et,validationMap:tt}=(0,r.useMemo)(()=>{const e="function"==typeof z&&je?z(je):Sn;return{validationResult:e,validationMap:"boolean"==typeof e?Cn:e}},[je,z]),nt=(0,r.useMemo)(()=>pe?"enabled":"disabled",[pe]),rt=(0,r.useMemo)(()=>Be||me?"enabled":"disabled",[Be,me]),ot=(0,r.useMemo)(()=>"string"==typeof je.combinator?{combinator:je.combinator}:$n,[je.combinator]),it=(0,r.useMemo)(()=>N(Ee||$.queryBuilder,N(ae.queryBuilder),Ue&&ae.disabled,"boolean"==typeof et&&et&&ae.valid,"boolean"==typeof et&&!et&&ae.invalid,Ee||{[$.disabled]:Ue,[$.valid]:"boolean"==typeof et&&et,[$.invalid]:"boolean"==typeof et&&!et}),[ae.disabled,ae.invalid,ae.queryBuilder,ae.valid,Ue,Ee,et]),st=(0,r.useMemo)(()=>({addRuleToNewGroups:ke,accessibleDescriptionGenerator:H,autoSelectField:Ce,autoSelectOperator:_e,autoSelectValue:$e,classNames:ae,combinators:X,controls:le,createRule:ie,createRuleGroup:se,disabledPaths:Ve,enableDragAndDrop:pe,fieldMap:U,fields:V,dispatchQuery:Ge,getQuery:Ie,getInputType:oe,getOperators:Q,getRuleClassname:s,getRuleGroupClassname:a,getValueEditorSeparator:i,getValueEditorType:ee,getValues:ne,getValueSources:te,independentCombinators:Be,listsAsArrays:Me,parseNumbers:P,qbId:W,showCloneButtons:be,showCombinatorsBetweenRules:me,showLockButtons:we,showNotToggle:ve,showShiftActions:ye,suppressStandardClassnames:Ee,validationMap:tt}),[H,ke,Ce,_e,$e,X,ae,le,ie,se,Ve,Ge,pe,U,V,oe,Q,Ie,s,a,i,ee,ne,te,Be,Me,P,W,be,me,we,ve,ye,Ee,tt]);return{actions:(0,r.useMemo)(()=>({moveRule:Ze,onGroupAdd:Ye,onGroupRemove:Qe,onPropChange:Xe,onRuleAdd:Ke,onRuleRemove:Qe,groupRule:Je}),[Je,Ze,Ye,Xe,Ke,Qe]),rootGroup:je,rootGroupDisabled:qe,queryDisabled:Ue,rqbContext:Fe,schema:st,translations:ge,wrapperClassName:it,dndEnabledAttr:nt,inlineCombinatorsAttr:rt,combinatorPropObject:ot}}var Tn=(e,t,n)=>{const r=Ae(e);if("between"===t.operator||"notBetween"===t.operator){const e=[r,r];return n?e:oe(e.map(e=>e??""),",")}return r},Ln=e=>{const t=te(15),{props:n}=e,i=(e=>Rn(e,(e=>{const[t]=(0,r.useState)(Bt),{fields:n,baseField:o,operators:i,baseOperator:s,combinators:a=_,baseCombinator:l,translations:c,enableMountQueryChange:u=!0,controlClassnames:d,controlElements:h,getDefaultField:p,getDefaultOperator:f,getDefaultValue:g,getOperators:m,getValueEditorType:v,getValueSources:y,getInputType:b,getValues:w,autoSelectField:x=!0,autoSelectOperator:S=!0,autoSelectValue:$=!0,addRuleToNewGroups:k=!1,enableDragAndDrop:A,listsAsArrays:M=!1,debugMode:E=!1,idGenerator:R=Bt}=e,T=i??C,[L]=(0,r.useState)(e.query??e.defaultQuery),N=bn({controlClassnames:d,controlElements:h,debugMode:E,enableDragAndDrop:A,enableMountQueryChange:u,translations:c,initialQuery:L,qbId:t,finalize:!0}),{translations:O}=N,I=(0,r.useMemo)(()=>({id:O.fields.placeholderName,name:O.fields.placeholderName,value:O.fields.placeholderName,label:O.fields.placeholderLabel}),[O.fields.placeholderLabel,O.fields.placeholderName]),D=(0,r.useMemo)(()=>n??[I],[I,n]),P=(0,r.useMemo)(()=>{const e=Array.isArray(D)?we(D,o):Kt(xe(D,o)).map(e=>({...D[e],name:e,value:e})).sort((e,t)=>e.label.localeCompare(t.label));return $e(e)?Me(x?e:[{label:O.fields.placeholderGroupLabel,options:[I]},...e]):Se(x?e:[I,...e])},[x,o,I,D,O.fields.placeholderGroupLabel]),j=(0,r.useMemo)(()=>{if(!Array.isArray(D)){const e=xe(D,o);return x?e:{...e,[O.fields.placeholderName]:I}}const e={};if($e(P))for(const t of P)for(const n of t.options)e[n.value??n.name]=be(n,o);else for(const t of P)e[t.value??t.name]=be(t,o);return e},[x,o,I,P,D,O.fields.placeholderName]),z=(0,r.useMemo)(()=>we(a,l),[l,a]),F=(0,r.useMemo)(()=>({id:O.operators.placeholderName,name:O.operators.placeholderName,value:O.operators.placeholderName,label:O.operators.placeholderLabel}),[O.operators.placeholderLabel,O.operators.placeholderName]),B=(0,r.useCallback)((e,t)=>{let{fieldData:n}=t,r=we(T,s);if(n?.operators)r=we(n.operators,s);else if(m){const t=m(e,{fieldData:n});t&&(r=we(t,s))}return S||(r=$e(r)?[{label:O.operators.placeholderGroupLabel,options:[F]},...r]:[F,...r]),$e(o=r)?Me(o):Se(o.map(e=>be(e)));var o},[S,s,F,m,T,O.operators.placeholderGroupLabel]),H=(0,r.useCallback)(e=>{const t=j[e];if(t?.defaultOperator)return t.defaultOperator;if(f)return"function"==typeof f?f(e,{fieldData:t}):f;const n=B(e,{fieldData:t})??[];return Ae(n)??""},[j,f,B]),W=(0,r.useCallback)((e,t,n)=>{let{fieldData:r}=n;return r.valueEditorType?"function"==typeof r.valueEditorType?r.valueEditorType(t):r.valueEditorType:v?.(e,t,{fieldData:r})??"text"},[v]),G=(0,r.useCallback)((e,t)=>((e,t,n)=>{const r=e?be(e):Ut;if(r.valueSources)return"function"==typeof r.valueSources?r.valueSources(t):r.valueSources;if(n){const e=n(r.value,t,{fieldData:be(r)});if(e)return e}return Vt})(j[e],t,y),[j,y]),V=(0,r.useMemo)(()=>({id:O.values.placeholderName,name:O.values.placeholderName,value:O.values.placeholderName,label:O.values.placeholderLabel}),[O.values.placeholderLabel,O.values.placeholderName]),U=(0,r.useCallback)((e,t,n)=>{let{fieldData:r}=n,o=[];return r?.values&&(o=we(r.values)),w&&(o=we(w(e,t,{fieldData:r}))),$||(o=$e(o)?[{label:O.values.placeholderGroupLabel,options:[V]},...o]:[V,...o]),o},[$,V,w,O.values.placeholderGroupLabel]),q=(0,r.useCallback)(e=>{const t=j[e.field]??{};if(void 0!==t?.defaultValue&&null!==t.defaultValue)return t.defaultValue;if(g)return g(e,{fieldData:t});let n="";const r=U(e.field,e.operator,{fieldData:t});if("field"===e.valueSource){const r=Re(t,P,e.operator);n=r.length>0?Tn(r,e,M):""}else if(r.length>0){const o=W(e.field,e.operator,{fieldData:t});"multiselect"===o?n=M?[]:"":"select"!==o&&"radio"!==o||(n=Tn(r,e,M))}else"checkbox"===W(e.field,e.operator,{fieldData:t})&&(n=!1);return n},[j,P,g,W,U,M]),K=(0,r.useCallback)((e,t,n)=>{let{fieldData:r}=n;if(b){const n=b(e,t,{fieldData:r});if(n)return n}return"text"},[b]),Y=(0,r.useCallback)(()=>{let e="";const t=P;if(t?.length>0&&t[0]){const n=Ae(t);n&&(e=n)}if(p)if("function"==typeof p){const n=p(t);n&&(e=n)}else e=p;const n=H(e),r=G(e,n)[0]??"value",o={id:R(),field:e,operator:n,valueSource:r,value:""},i=q(o);return{...o,value:i}},[P,p,H,q,G,R]),X=(0,r.useCallback)(e=>e?{id:R(),rules:k?[Y()]:[],not:!1}:{id:R(),rules:k?[Y()]:[],combinator:Ae(z)??"",not:!1},[k,z,Y,R]);return{qbId:t,rqbContext:N,fields:P,fieldMap:j,combinators:z,getOperatorsMain:B,getRuleDefaultOperator:H,getValueEditorTypeMain:W,getValueSourcesMain:G,getValuesMain:U,getRuleDefaultValue:q,getInputTypeMain:K,createRule:Y,createRuleGroup:X}})(e)))(n),s=i.schema.controls.ruleGroup,a=!!i.rootGroup.not;let l;return t[0]!==s||t[1]!==n.context||t[2]!==i.actions||t[3]!==i.combinatorPropObject||t[4]!==i.dndEnabledAttr||t[5]!==i.inlineCombinatorsAttr||t[6]!==i.queryDisabled||t[7]!==i.rootGroup||t[8]!==i.rootGroupDisabled||t[9]!==i.rqbContext||t[10]!==i.schema||t[11]!==i.translations||t[12]!==i.wrapperClassName||t[13]!==a?(l=(0,o.jsx)(y.Provider,{value:i.rqbContext,children:(0,o.jsx)("div",{role:"form",className:i.wrapperClassName,"data-dnd":i.dndEnabledAttr,"data-inlinecombinators":i.inlineCombinatorsAttr,children:(0,o.jsx)(s,{translations:i.translations,ruleGroup:i.rootGroup,rules:i.rootGroup.rules,...i.combinatorPropObject,not:a,schema:i.schema,actions:i.actions,id:i.rootGroup.id,path:T,disabled:i.rootGroupDisabled,shiftUpDisabled:!0,shiftDownDisabled:!0,parentDisabled:i.queryDisabled,context:n.context})})},i.dndEnabledAttr),t[0]=s,t[1]=n.context,t[2]=i.actions,t[3]=i.combinatorPropObject,t[4]=i.dndEnabledAttr,t[5]=i.inlineCombinatorsAttr,t[6]=i.queryDisabled,t[7]=i.rootGroup,t[8]=i.rootGroupDisabled,t[9]=i.rqbContext,t[10]=i.schema,t[11]=i.translations,t[12]=i.wrapperClassName,t[13]=a,t[14]=l):l=t[14],l}},5056(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},5072(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=o(p,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:f,references:1})}s.push(d)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var l=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},5083(e,t,n){var r=n(1882),o=n(7296),i=n(3805),s=n(7473),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:a).test(s(e))}},5087(e,t,n){var r=n(980),o=n(7381),i=n(2284),s=n(3758);e.exports=function(e){var t=i(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var a=o(n);return!!a&&e===a[0]}},5095(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}))},5128(e,t,n){var r=n(909),o=n(4894);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},5226(e,t,n){"use strict";n.d(t,{Ay:()=>s,GK:()=>i,Rw:()=>o,vr:()=>r});const r={passive:!1},o={capture:!0,passive:!1};function i(e){e.stopImmediatePropagation()}function s(e){e.preventDefault(),e.stopImmediatePropagation()}},5251(e){var t=/\{\n\/\* \[wrapped with (.+)\] \*/,n=/,? & /;e.exports=function(e){var r=e.match(t);return r?r[1].split(n):[]}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5325(e,t,n){var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5372(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(t);var r=("object"===i(n)?n.version:arguments[1])||"";return r?"4"===r.toString()?l.test(t):"6"===r.toString()&&u.test(t):e(t,{version:4})||e(t,{version:6})};var r,o=(r=n(3399))&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(s,"[.]){3}").concat(s),l=new RegExp("^".concat(a,"$")),c="(?:[0-9a-fA-F]{1,4})",u=new RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(a,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(a,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(a,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(a,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(a,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(a,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(a,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");e.exports=t.default,e.exports.default=t.default},5375(e,t,n){"use strict";var r=n(5072),o=n.n(r),i=n(7825),s=n.n(i),a=n(7659),l=n.n(a),c=n(5056),u=n.n(c),d=n(540),h=n.n(d),p=n(1113),f=n.n(p),g=n(2672),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=h(),o()(g.A,m),g.A&&g.A.locals&&g.A.locals},5378(e,t,n){var r=n(4932),o=n(5389),i=n(5128),s=n(6449);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},5389(e,t,n){var r=n(3663),o=n(7978),i=n(3488),s=n(6449),a=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):r(e):a(e)}},5434(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5438(e,t,n){"use strict";n.d(t,{H:()=>g});var r=n(1594),o=n(6100),i=n(3402),s=n(1967);function a(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function l(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function c(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function u(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function d(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const h=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:(0,o.A)(["react-flow__controls-button",t]),...n},e);h.displayName="ControlButton";const p=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),f=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:f=!0,fitViewOptions:g,onZoomIn:m,onZoomOut:v,onFitView:y,onInteractiveChange:b,className:w,children:x,position:S="bottom-left"})=>{const C=(0,s.PI)(),[_,$]=(0,r.useState)(!1),{isInteractive:k,minZoomReached:A,maxZoomReached:M}=(0,s.Pj)(p,i.x),{zoomIn:E,zoomOut:R,fitView:T}=(0,s.VH)();return(0,r.useEffect)(()=>{$(!0)},[]),_?r.createElement(s.Zk,{className:(0,o.A)(["react-flow__controls",w]),position:S,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(h,{onClick:()=>{E(),m?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:M},r.createElement(a,null)),r.createElement(h,{onClick:()=>{R(),v?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:A},r.createElement(l,null))),n&&r.createElement(h,{className:"react-flow__controls-fitview",onClick:()=>{T(g),y?.()},title:"fit view","aria-label":"fit view"},r.createElement(c,null)),f&&r.createElement(h,{className:"react-flow__controls-interactive",onClick:()=>{C.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),b?.(!k)},title:"toggle interactivity","aria-label":"toggle interactivity"},k?r.createElement(d,null):r.createElement(u,null)),x):null};f.displayName="Controls";var g=(0,r.memo)(f)},5447(e,t,n){var r=n(9325).Uint8Array;e.exports=r},5463(e){e.exports=function(e){return e!=e}},5481(e,t,n){var r=n(9325)["__core-js_shared__"];e.exports=r},5527(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5549(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(952),a=n(5556),l=n(1594),c=n(8142),u=n(5707),d=(0,u.getAceInstance)(),h=function(e){function t(t){var n=e.call(this,t)||this;return u.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=u.debounce,n}return o(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,o=t.onValidate,i=t.mode,s=t.focus,a=t.theme,l=t.fontSize,c=t.lineHeight,h=t.value,p=t.defaultValue,f=t.showGutter,g=t.wrapEnabled,m=t.showPrintMargin,v=t.scrollMargin,y=void 0===v?[0,0,0,0]:v,b=t.keyboardHandler,w=t.onLoad,x=t.commands,S=t.annotations,C=t.markers,_=t.placeholder;this.editor=d.edit(this.refEditor),r&&r(d);for(var $=Object.keys(this.props.editorProps),k=0;k<$.length;k++)this.editor[$[k]]=this.props.editorProps[$[k]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof i?"ace/mode/".concat(i):i),a&&""!==a&&this.editor.setTheme("ace/theme/".concat(a)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),c&&(this.editor.container.style.lineHeight="number"==typeof c?"".concat(c,"px"):"".concat(c),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(p||h||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(g),this.editor.setShowPrintMargin(m),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),_&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),o&&this.editor.getSession().on("changeAnnotation",function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(S||[]),C&&C.length>0&&this.handleMarkers(C);var A=this.editor.$options;u.editorOptions.forEach(function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(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(x)&&x.forEach(function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)}),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),n&&(this.refEditor.className+=" "+n),w&&w(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r<u.editorOptions.length;r++){var o=u.editorOptions[r];n[o]!==t[o]&&this.editor.setOption(o,n[o])}if(n.className!==t.className){var i=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(function(e){var t=i.indexOf(e);i.splice(t,1)}),this.refEditor.className=" "+n.className+" "+i.join(" ")}var s=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(s){this.silent=!0;var a=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(a),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight="number"==typeof n.lineHeight?"".concat(n.lineHeight,"px"):n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!s&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.editor&&this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&this.editor.getSession().removeMarker(n[r].id);for(var r in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(r)&&"ace_active-line"!==n[r].clazz&&"ace_selected-word"!==n[r].clazz&&this.editor.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,o=e.endRow,i=e.endCol,a=e.className,l=e.type,c=e.inFront,u=void 0!==c&&c,d=new s.Range(n,r,o,i);t.editor.getSession().addMarker(d,a,l,u)})},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,s=i({width:n,height:r},o);return l.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),lineHeight:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=h},5556(e,t,n){e.exports=n(2694)()},5578(e,t,n){"use strict";n.d(t,{M_:()=>b,wk:()=>_});var r={};n.r(r),n.d(r,{registerShortcut:()=>s,unregisterShortcut:()=>a});var o={};n.r(o),n.d(o,{getAllShortcutKeyCombinations:()=>m,getAllShortcutRawKeyCombinations:()=>v,getCategoryShortcuts:()=>y,getShortcutAliases:()=>g,getShortcutDescription:()=>f,getShortcutKeyCombination:()=>h,getShortcutRepresentation:()=>p});var i=n(7562);function s({name:e,category:t,description:n,keyCombination:r,aliases:o}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:r,aliases:o,description:n}}function a(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var l=n(542);const c=[],u={display:l.dz,raw:l.JF,ariaLabel:l._A};function d(e,t){return e?e.modifier?u[t][e.modifier](e.character):e.character:null}function h(e,t){return e[t]?e[t].keyCombination:null}function p(e,t,n="display"){return d(h(e,t),n)}function f(e,t){return e[t]?e[t].description:null}function g(e,t){return e[t]&&e[t].aliases?e[t].aliases:c}const m=(0,i.createSelector)((e,t)=>[h(e,t),...g(e,t)].filter(Boolean),(e,t)=>[e[t]]),v=(0,i.createSelector)((e,t)=>m(e,t).map(e=>d(e,"raw")),(e,t)=>[e[t]]),y=(0,i.createSelector)((e,t)=>Object.entries(e).filter(([,e])=>e.category===t).map(([e])=>e),e=>[e]),b=(0,i.createReduxStore)("core/keyboard-shortcuts",{reducer:function(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...r}=e;return r}return e},actions:r,selectors:o});(0,i.register)(b);var w=n(1386);const x=new Set,S=e=>{for(const t of x)t(e)},C=(0,w.createContext)({add:e=>{0===x.size&&document.addEventListener("keydown",S),x.add(e)},delete:e=>{x.delete(e),0===x.size&&document.removeEventListener("keydown",S)}});function _(e,t,{isDisabled:n=!1}={}){const r=(0,w.useContext)(C),o=function(){const{getAllShortcutKeyCombinations:e}=(0,i.useSelect)(b);return function(t,n){return e(t).some(({modifier:e,character:t})=>l.kx[e](n,t))}}(),s=(0,w.useRef)();(0,w.useEffect)(()=>{s.current=t},[t]),(0,w.useEffect)(()=>{if(!n)return r.add(t),()=>{r.delete(t)};function t(t){o(e,t)&&s.current(t)}},[e,n,r])}n(1594);const{Provider:$}=C},5580(e,t,n){var r=n(6110)(n(9325),"DataView");e.exports=r},5707(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(n.g.window={},e=n(952),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(952),e},t.debounce=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}}},5749(e,t,n){var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5812(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(4011);const o=e=>(t,n)=>{if("string"==typeof t.url){const n=(0,r.getQueryArg)(t.url,"wp_theme_preview");void 0===n?t.url=(0,r.addQueryArgs)(t.url,{wp_theme_preview:e}):""===n&&(t.url=(0,r.removeQueryArgs)(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const n=(0,r.getQueryArg)(t.path,"wp_theme_preview");void 0===n?t.path=(0,r.addQueryArgs)(t.path,{wp_theme_preview:e}):""===n&&(t.path=(0,r.removeQueryArgs)(t.path,"wp_theme_preview"))}return n(t)}},5861(e,t,n){var r=n(5580),o=n(8223),i=n(2804),s=n(6545),a=n(8303),l=n(2552),c=n(7473),u="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=c(r),m=c(o),v=c(i),y=c(s),b=c(a),w=l;(r&&w(new r(new ArrayBuffer(1)))!=f||o&&w(new o)!=u||i&&w(i.resolve())!=d||s&&w(new s)!=h||a&&w(new a)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return f;case m:return u;case v:return d;case y:return h;case b:return p}return t}),e.exports=w},5891(e,t,n){var r=n(1873),o=n(2428),i=n(6449),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(s&&e&&e[s])}},5911(e,t,n){var r=n(8859),o=n(4248),i=n(9219);e.exports=function(e,t,n,s,a,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var v=e[f],y=t[f];if(s)var b=c?s(y,v,f,t,e,l):s(v,y,f,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!o(t,function(e,t){if(!i(m,t)&&(v===e||a(v,e,n,s,l)))return m.push(t)})){g=!1;break}}else if(v!==y&&!a(v,y,n,s,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},5948(e,t,n){var r=n(3729),o=n(5325),i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return r(i,function(n){var r="_."+n[0];t&n[1]&&!o(e,r)&&e.push(r)}),e.sort()}},5950(e,t,n){var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},5970(e,t,n){var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},6009(e,t,n){e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&r.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},6017(e,t,n){var r=n(9344),o=n(4033);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},6025(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6084(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=!1===(t=t||{}).allow_leading_zeroes?s:a,i=!t.hasOwnProperty("min")||(0,o.default)(t.min)||e>=t.min,l=!t.hasOwnProperty("max")||(0,o.default)(t.max)||e<=t.max,c=!t.hasOwnProperty("lt")||(0,o.default)(t.lt)||e<t.lt,u=!t.hasOwnProperty("gt")||(0,o.default)(t.gt)||e>t.gt;return n.test(e)&&i&&l&&c&&u};var r=i(n(3399)),o=i(n(821));function i(e){return e&&e.__esModule?e:{default:e}}var s=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default},6100(e,t,n){"use strict";function r(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,o=0;o<e.length;o++)""!==(n=r(e[o]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}n.d(t,{A:()=>r})},6110(e,t,n){var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6131(e,t,n){var r=n(2523),o=n(5463),i=n(6959);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},6155(e,t,n){var r=n(4932),o=n(7422),i=n(5389),s=n(5128),a=n(3937),l=n(7301),c=n(3714),u=n(3488),d=n(6449);e.exports=function(e,t,n){t=t.length?r(t,function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e}):[u];var h=-1;t=r(t,l(i));var p=s(e,function(e,n,o){return{criteria:r(t,function(t){return t(e)}),index:++h,value:e}});return a(p,function(e,t){return c(e,t,n)})}},6184(e,t,n){"use strict";n.d(t,{XC:()=>m});var r={};n.r(r),n.d(r,{find:()=>s});var o={};function i(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function s(e,{sequential:t=!1}={}){const n=e.querySelectorAll(function(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}(t));return Array.from(n).filter(e=>{if(!i(e))return!1;const{nodeName:t}=e;return"AREA"!==t||function(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&i(n)}(e)})}function a(e){const t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function l(e){return-1!==a(e)}function c(e,t){return{element:e,index:t}}function u(e){return e.element}function d(e,t){const n=a(e.element),r=a(t.element);return n===r?e.index-t.index:n-r}function h(e){return e.filter(l).map(c).sort(d).map(u).reduce(function(){const e={};return function(t,n){const{nodeName:r,type:o,checked:i,name:s}=n;if("INPUT"!==r||"radio"!==o||!s)return t.concat(n);const a=e.hasOwnProperty(s);if(!i&&a)return t;if(a){const n=e[s];t=t.filter(e=>e!==n)}return e[s]=n,t.concat(n)}}(),[])}function p(e){return h(s(e))}function f(e){return h(s(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function g(e){return h(s(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}n.r(o),n.d(o,{find:()=>p,findNext:()=>g,findPrevious:()=>f,isTabbableIndex:()=>l});const m={focusable:r,tabbable:o}},6241(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),s=n.n(i)()(o());s.push([e.id,':root{--rqb-spacing: 0.5rem;--rqb-border-width: 1px;--rqb-branch-indent: var(--rqb-spacing);--rqb-branch-width: var(--rqb-border-width);--rqb-background-color: rgba(0, 75, 183, 0.2);--rqb-border-color: #8081a2;--rqb-border-style: solid;--rqb-border-radius: 0.25rem;--rqb-dnd-drop-indicator-color: rebeccapurple;--rqb-dnd-drop-indicator-style: dashed;--rqb-dnd-drop-indicator-width: 2px;--rqb-dnd-drop-indicator-copy-color: #693;--rqb-dnd-drop-indicator-copy-style: dashed;--rqb-dnd-drop-indicator-copy-width: 2px;--rqb-dnd-drop-indicator-group-color: #369;--rqb-dnd-drop-indicator-group-style: dashed;--rqb-dnd-drop-indicator-group-width: 2px;--rqb-branch-color: var(--rqb-border-color);--rqb-branch-radius: var(--rqb-border-radius);--rqb-branch-style: var(--rqb-border-style)}.ruleGroup{display:flex;flex-direction:column;gap:var(--rqb-spacing);padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .ruleGroup-body{display:flex;flex-direction:column;gap:var(--rqb-spacing)}.ruleGroup .ruleGroup-body:empty{display:none}.ruleGroup .ruleGroup-header,.ruleGroup .rule{display:flex;gap:var(--rqb-spacing);align-items:center}.ruleGroup .rule .rule-value:has(.rule-value-list-item){display:flex;gap:var(--rqb-spacing);align-items:baseline}.ruleGroup .betweenRules{display:flex}.ruleGroup .shiftActions{display:flex;flex-direction:column}.ruleGroup .shiftActions>*{padding:0}.dndOver.rule,.dndOver.ruleGroup-header{padding-bottom:var(--rqb-spacing)}.dndOver.betweenRules{padding-top:var(--rqb-spacing)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(.ruleGroup-header.dndOver){padding:var(--rqb-spacing)}.queryBuilder-branches .ruleGroup-body{margin-left:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches .rule,.queryBuilder-branches .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches .rule::before,.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches .rule::before,.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 0 var(--rqb-branch-width) var(--rqb-branch-width)}.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::after{top:50%;height:50%;border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches .rule:last-child::after,.queryBuilder-branches .ruleGroup .ruleGroup:last-child::after{display:none}.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches .ruleGroup .ruleGroup::after{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches .betweenRules{position:relative}.queryBuilder-branches .betweenRules::before{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 0 0 var(--rqb-branch-width)}.ruleGroup{border-color:var(--rqb-border-color);border-style:var(--rqb-border-style);border-radius:var(--rqb-border-radius);background:var(--rqb-background-color)}.ruleGroup .shiftActions>*{background-color:rgba(0,0,0,0);border:none;cursor:pointer}.dndOver.rule,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header){border-bottom-width:var(--rqb-dnd-drop-indicator-width);border-bottom-style:var(--rqb-dnd-drop-indicator-style);border-bottom-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.rule.dndCopy,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header).dndCopy{border-bottom-width:var(--rqb-dnd-drop-indicator-copy-width);border-bottom-style:var(--rqb-dnd-drop-indicator-copy-style);border-bottom-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndOver.betweenRules{border-top-width:var(--rqb-dnd-drop-indicator-width);border-top-style:var(--rqb-dnd-drop-indicator-style);border-top-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.betweenRules.dndCopy{border-top-width:var(--rqb-dnd-drop-indicator-copy-width);border-top-style:var(--rqb-dnd-drop-indicator-copy-style);border-top-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver){border-width:var(--rqb-dnd-drop-indicator-group-width);border-style:var(--rqb-dnd-drop-indicator-group-style);border-color:var(--rqb-dnd-drop-indicator-group-color);border-radius:var(--rqb-border-radius)}.dndGroup.rule.dndOver.dndCopy,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver).dndCopy{border-color:var(--rqb-dnd-drop-indicator-copy-color);border-width:var(--rqb-dnd-drop-indicator-copy-width);border-style:var(--rqb-dnd-drop-indicator-copy-style)}.ruleGroup.dndDragging,.rule.dndDragging{opacity:.5}.ruleGroup .queryBuilder-dragHandle,.rule .queryBuilder-dragHandle{cursor:move}.queryBuilder-branches .rule::before,.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}.queryBuilder-branches .rule:last-child::before,.queryBuilder-branches .ruleGroup .ruleGroup:last-child::before{border-bottom-left-radius:var(--rqb-branch-radius)}.queryBuilder-branches .betweenRules{position:relative}.queryBuilder-branches .betweenRules::before{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}\n',""]);const a=s},6255(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r;(0,o.default)(e),"object"===i(t)?(n=t.min||0,r=t.max):(n=arguments[1],r=arguments[2]);var s=encodeURI(e).split(/%..|./).length-1;return s>=n&&(void 0===r||s<=r)};var r,o=(r=n(3399))&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}e.exports=t.default,e.exports.default=t.default},6306(e){var t="__lodash_placeholder__";e.exports=function(e,n){for(var r=-1,o=e.length,i=0,s=[];++r<o;){var a=e[r];a!==n&&a!==t||(e[r]=t,s[i++]=r)}return s}},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},6321(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(1594);var o=n(1386);const i=(e,t,n)=>{let r,o,i,s,a,l=0,c=0,u=!1,d=!1,h=!0;function p(t){const n=r,s=o;return r=void 0,o=void 0,c=t,i=e.apply(s,n),i}function f(e,t){s=setTimeout(e,t)}function g(e){return e-(a||0)}function m(e){const n=g(e);return void 0===a||n>=t||n<0||d&&e-c>=l}function v(){const e=Date.now();if(m(e))return b(e);f(v,function(e){const n=g(e),r=e-c,o=t-n;return d?Math.min(o,l-r):o}(e))}function y(){s=void 0}function b(e){return y(),h&&r?p(e):(r=o=void 0,i)}function w(){return void 0!==s}function x(...e){const n=Date.now(),s=m(n);if(r=e,o=this,a=n,s){if(!w())return function(e){return c=e,f(v,t),u?p(e):i}(a);if(d)return f(v,t),p(a)}return w()||f(v,t),i}return n&&(u=!!n.leading,d="maxWait"in n,void 0!==n.maxWait&&(l=Math.max(n.maxWait,t)),h="trailing"in n?!!n.trailing:h),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,y(),r=a=o=void 0},x.flush=function(){return w()?b(Date.now()):i},x.pending=w,x};function s(e,t,n){const s=(a=()=>i(e,null!=t?t:0,n),l=[e,t,n],c=(0,r.useState)(function(){return{inputs:l,result:a()}})[0],u=(0,r.useRef)(!0),d=(0,r.useRef)(c),h=u.current||Boolean(l&&d.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(l,d.current.inputs))?d.current:{inputs:l,result:a()},(0,r.useEffect)(function(){u.current=!1,d.current=h},[h]),h.result);var a,l,c,u,d,h;return(0,o.useEffect)(()=>()=>s.cancel(),[s]),s}},6442(e,t,n){"use strict";n.d(t,{A:()=>i});const r=new Set(["PATCH","PUT","DELETE"]),o="GET",i=(e,t)=>{const{method:n=o}=e;return r.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)}},6449(e){var t=Array.isArray;e.exports=t},6541(e,t,n){"use strict";function r(e){return function(){return this.matches(e)}}function o(e){return function(t){return t.matches(e)}}n.d(t,{A:()=>r,j:()=>o})},6545(e,t,n){var r=n(6110)(n(9325),"Set");e.exports=r},6574(e,t,n){var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}},6644(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(o.wA,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}))},6645(e,t,n){var r=n(1733),o=n(5434),i=n(3222),s=n(2225);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?s(e):r(e):e.match(t)||[]}},6649(e,t,n){var r=n(3221)();e.exports=r},6655(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},6721(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},6747(e,t,n){"use strict";function r(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}n.d(t,{A:()=>r})},6757(e,t,n){var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=o(i.length-t,0),l=Array(a);++s<a;)l[s]=i[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=i[s];return c[t]=n(l),r(e,this,c)}}},6762(e,t,n){var r,o="__lodash_hash_undefined__",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f=Array.prototype,g=Function.prototype,m=Object.prototype,v=p["__core-js_shared__"],y=(r=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",b=g.toString,w=m.hasOwnProperty,x=m.toString,S=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=p.Symbol,_=f.splice,$=O(p,"Map"),k=O(Object,"create"),A=C?C.prototype:void 0,M=A?A.toString:void 0;function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e,t){for(var n=e.length;n--;)if(j(e[n][0],t))return n;return-1}function N(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function O(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!F(e)||y&&y in e)return!1;var t=function(e){var t=F(e)?x.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:u;return t.test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}E.prototype.clear=function(){this.__data__=k?k(null):{}},E.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},E.prototype.get=function(e){var t=this.__data__;if(k){var n=t[e];return n===o?void 0:n}return w.call(t,e)?t[e]:void 0},E.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:w.call(t,e)},E.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?o:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0||(n==t.length-1?t.pop():_.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return L(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new E,map:new($||R),string:new E}},T.prototype.delete=function(e){return N(this,e).delete(e)},T.prototype.get=function(e){return N(this,e).get(e)},T.prototype.has=function(e){return N(this,e).has(e)},T.prototype.set=function(e,t){return N(this,e).set(e,t),this};var I=P(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return a.test(e)&&n.push(""),e.replace(l,function(e,t,r,o){n.push(r?o.replace(c,"$1"):t||e)}),n});function D(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function P(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(P.Cache||T),n}function j(e,t){return e===t||e!=e&&t!=t}P.Cache=T;var z=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==x.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=function(e,t){if(z(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!B(e))||s.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:z(n=t)?n:I(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[D(t[r++])];return r&&r==o?e:void 0}(e,t);return void 0===r?n:r}},6861(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(e,t)=>{let n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),o=r?n+"/"+r:n),delete e.namespace,delete e.endpoint,t({...e,path:o})}},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6929(e,t,n){var r=n(6017),o=n(8816),i=n(7381),s=n(2284),a=n(6449),l=n(5087);e.exports=function(e){return o(function(t){var n=t.length,o=n,c=r.prototype.thru;for(e&&t.reverse();o--;){var u=t[o];if("function"!=typeof u)throw new TypeError("Expected a function");if(c&&!d&&"wrapper"==s(u))var d=new r([],!0)}for(o=d?o:n;++o<n;){u=t[o];var h=s(u),p="wrapper"==h?i(u):void 0;d=p&&l(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?d[s(p[0])].apply(d,p[3]):1==u.length&&l(u)?d[h]():d.thru(u)}return function(){var e=arguments,r=e[0];if(d&&1==e.length&&a(r))return d.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6959(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},6977(e,t,n){var r=n(8882),o=n(1842),i=n(7078),s=n(7471),a=n(4168),l=n(7381),c=n(3209),u=n(4641),d=n(981),h=n(1489),p=Math.max;e.exports=function(e,t,n,f,g,m,v,y){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=f?f.length:0;if(w||(t&=-97,f=g=void 0),v=void 0===v?v:p(h(v),0),y=void 0===y?y:h(y),w-=g?g.length:0,64&t){var x=f,S=g;f=g=void 0}var C=b?void 0:l(e),_=[e,t,n,f,g,x,S,m,v,y];if(C&&c(_,C),e=_[0],t=_[1],n=_[2],f=_[3],g=_[4],!(y=_[9]=void 0===_[9]?b?0:e.length:p(_[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)$=8==t||16==t?i(e,t,y):32!=t&&33!=t||g.length?s.apply(void 0,_):a(e,t,n,f);else var $=o(e,t,n);return d((C?r:u)($,_),e,t)}},7068(e,t,n){var r=n(7217),o=n(5911),i=n(1986),s=n(689),a=n(5861),l=n(6449),c=n(3656),u=n(7167),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),b=l(t),w=y?h:a(e),x=b?h:a(t),S=(w=w==d?p:w)==p,C=(x=x==d?p:x)==p,_=w==x;if(_&&c(e)){if(!c(t))return!1;y=!0,S=!1}if(_&&!S)return v||(v=new r),y||u(e)?o(e,t,n,g,m,v):i(e,t,w,n,g,m,v);if(!(1&n)){var $=S&&f.call(e,"__wrapped__"),k=C&&f.call(t,"__wrapped__");if($||k){var A=$?e.value():e,M=k?t.value():t;return v||(v=new r),m(A,M,n,g,v)}}return!!_&&(v||(v=new r),s(e,t,n,g,m,v))}},7078(e,t,n){var r=n(1033),o=n(2819),i=n(7471),s=n(8073),a=n(1287),l=n(6306),c=n(9325);e.exports=function(e,t,n){var u=o(e);return function o(){for(var d=arguments.length,h=Array(d),p=d,f=a(o);p--;)h[p]=arguments[p];var g=d<3&&h[0]!==f&&h[d-1]!==f?[]:l(h,f);return(d-=g.length)<n?s(e,t,i,o.placeholder,void 0,h,g,void 0,void 0,n-d):r(this&&this!==c&&this instanceof o?u:e,this,h)}}},7167(e,t,n){var r=n(4901),o=n(7301),i=n(6009),s=i&&i.isTypedArray,a=s?o(s):r;e.exports=a},7197(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7204(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(4011);const o=(e,t)=>("string"!=typeof e.url||(0,r.hasQueryArg)(e.url,"_locale")||(e.url=(0,r.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||(0,r.hasQueryArg)(e.path,"_locale")||(e.path=(0,r.addQueryArgs)(e.path,{_locale:"user"})),t(e))},7209(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},7217(e,t,n){var r=n(79),o=n(1420),i=n(938),s=n(3605),a=n(9817),l=n(945);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},7237(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255(e,t,n){var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7268(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(7947);function o(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),r.A.hasOwnProperty(t)?{space:r.A[t],local:e}:e}},7296(e,t,n){var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},7300(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(2470),o=n(9733);const i=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const i=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n<5?i(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject())));return t({...e,parse:!1}).catch(t=>{const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?i(n).catch(()=>!1!==e.parse?Promise.reject({code:"post_process",message:(0,r.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)):(0,o.J)(t,e.parse)}).then(t=>(0,o.f)(t,e.parse))}},7301(e){e.exports=function(e){return function(t){return e(t)}}},7309(e,t,n){var r=n(2006)(n(4713));e.exports=r},7334(e){e.exports=function(e){return function(){return e}}},7381(e,t,n){var r=n(8152),o=n(3950),i=r?function(e){return r.get(e)}:o;e.exports=i},7400(e,t,n){var r=n(9374),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},7422(e,t,n){var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},7471(e,t,n){var r=n(1596),o=n(3320),i=n(8523),s=n(2819),a=n(8073),l=n(1287),c=n(8294),u=n(6306),d=n(9325);e.exports=function e(t,n,h,p,f,g,m,v,y,b){var w=128&n,x=1&n,S=2&n,C=24&n,_=512&n,$=S?void 0:s(t);return function k(){for(var A=arguments.length,M=Array(A),E=A;E--;)M[E]=arguments[E];if(C)var R=l(k),T=i(M,R);if(p&&(M=r(M,p,f,C)),g&&(M=o(M,g,m,C)),A-=T,C&&A<b){var L=u(M,R);return a(t,n,e,k.placeholder,h,M,L,v,y,b-A)}var N=x?h:this,O=S?N[t]:t;return A=M.length,v?M=c(M,v):_&&A>1&&M.reverse(),w&&y<A&&(M.length=y),this&&this!==d&&this instanceof k&&(O=$||s(O)),O.apply(N,M)}}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7534(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7556(e,t,n){var r=n(1873),o=n(4932),i=n(6449),s=n(4394),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7612(e,t,n){var r=n(9770),o=n(6574),i=n(5389),s=n(6449);e.exports=function(e,t){return(s(e)?r:o)(e,i(t,3))}},7658(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,o.default)(t,s)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var n=e.split("."),i=n[n.length-1];if(t.require_tld){if(n.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1;if(/\s/.test(i))return!1}return!(!t.allow_numeric_tld&&/^\d+$/.test(i))&&n.every(function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})};var r=i(n(3399)),o=i(n(3610));function i(e){return e&&e.__esModule?e:{default:e}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},7659(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},7670(e,t,n){var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7677(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1386);const o=(0,r.forwardRef)(function({icon:e,size:t=24,...n},o){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o})})},7797(e,t,n){var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},7828(e,t,n){"use strict";n.d(t,{V:()=>f});var r,o=n(1594),i=n(6100),s=n(1967),a=n(3402);function l({color:e,dimensions:t,lineWidth:n}){return o.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function c({color:e,radius:t}){return o.createElement("circle",{cx:t,cy:t,r:t,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(r||(r={}));const u={[r.Dots]:"#91919a",[r.Lines]:"#eee",[r.Cross]:"#e2e2e2"},d={[r.Dots]:1,[r.Lines]:1,[r.Cross]:6},h=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function p({id:e,variant:t=r.Dots,gap:n=20,size:p,lineWidth:f=1,offset:g=2,color:m,style:v,className:y}){const b=(0,o.useRef)(null),{transform:w,patternId:x}=(0,s.Pj)(h,a.x),S=m||u[t],C=p||d[t],_=t===r.Dots,$=t===r.Cross,k=Array.isArray(n)?n:[n,n],A=[k[0]*w[2]||1,k[1]*w[2]||1],M=C*w[2],E=$?[M,M]:A,R=_?[M/g,M/g]:[E[0]/g,E[1]/g];return o.createElement("svg",{className:(0,i.A)(["react-flow__background",y]),style:{...v,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:b,"data-testid":"rf__background"},o.createElement("pattern",{id:x+e,x:w[0]%A[0],y:w[1]%A[1],width:A[0],height:A[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`},_?o.createElement(c,{color:S,radius:M/g}):o.createElement(l,{dimensions:E,color:S,lineWidth:f})),o.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${x+e})`}))}p.displayName="Background";var f=(0,o.memo)(p)},7856(e,t,n){"use strict";n.d(t,{t4:()=>s,wA:()=>i});var r=n(4164),o=n(1386);const i=e=>(0,o.createElement)("path",e),s=(0,o.forwardRef)(({className:e,isPressed:t,...n},i)=>{const s={...n,className:(0,r.A)(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,o.createElement)("svg",{...s,ref:i})});s.displayName="SVG"},7947(e,t,n){"use strict";n.d(t,{A:()=>o,g:()=>r});var r="http://www.w3.org/1999/xhtml";const o={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},7978(e,t,n){var r=n(270),o=n(8156),i=n(631),s=n(8586),a=n(756),l=n(7197),c=n(7797);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(n){var s=o(n,e);return void 0===s&&s===t?i(n,e):r(t,s,3)}}},8064(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1386);const o=new WeakMap,i=function(e,t,n){return(0,r.useMemo)(()=>{if(n)return n;const r=function(e){const t=o.get(e)||0;return o.set(e,t+1),t}(e);return t?`${t}-${r}`:r},[e,n,t])}},8073(e,t,n){var r=n(5087),o=n(4641),i=n(981);e.exports=function(e,t,n,s,a,l,c,u,d,h){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var f=[e,t,a,p?l:void 0,p?c:void 0,p?void 0:l,p?void 0:c,u,d,h],g=n.apply(void 0,f);return r(e)&&o(g,f),g.placeholder=s,i(g,e,t)}},8077(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},8090(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},8096(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8098(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(1386),o=n(542),i=n(6184);const s=function(){return function(){const e=(0,r.useRef)();return(0,r.useCallback)(t=>{t?e.current=(e=>{function t(t){const{key:n,shiftKey:r,target:o}=t;if("Tab"!==n)return;const s=r?"findPrevious":"findNext",a=i.XC.tabbable[s](o)||null;if(o.contains(a))return t.preventDefault(),void a?.focus();if(e.contains(a))return;const l=r?"append":"prepend",{ownerDocument:c}=e,u=c.createElement("div");u.tabIndex=-1,e[l](u),u.addEventListener("blur",()=>e.removeChild(u)),u.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}})(t):e.current&&e.current()},[])}()};let a=null;const l=["button","submit"];function c(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function u(e){const t=(0,r.useRef)(),n=(0,r.useRef)(!1),o=(0,r.useRef)(!1),i=(0,r.useRef)([]),s=(0,r.useRef)(e);return s.current=e,(0,r.useLayoutEffect)(()=>{!1===o.current&&!0===n.current&&e.forEach((e,n)=>{const r=i.current[n];e!==r&&(c(r,null),c(e,t.current))}),i.current=e},e),(0,r.useLayoutEffect)(()=>{o.current=!1}),(0,r.useCallback)(e=>{c(t,e),o.current=!0,n.current=null!==e;const r=e?s.current:i.current;for(const t of r)c(t,e)},[])}const d=function(e){const t=(0,r.useRef)(),{constrainTabbing:n=!1!==e.focusOnMount}=e;(0,r.useEffect)(()=>{t.current=e},Object.values(e));const c=s(),d=function(e="firstElement"){const t=(0,r.useRef)(e),n=e=>{e.focus({preventScroll:!0})},o=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),(0,r.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,r.useCallback)(e=>{var r;e&&!1!==t.current&&(e.contains(null!==(r=e.ownerDocument?.activeElement)&&void 0!==r?r:null)||("firstElement"!==t.current?n(e):o.current=setTimeout(()=>{const t=i.XC.tabbable.find(e)[0];t&&n(t)},0)))},[])}(e.focusOnMount),h=function(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(null),o=(0,r.useRef)(e);return(0,r.useEffect)(()=>{o.current=e},[e]),(0,r.useCallback)(e=>{if(e){if(t.current=e,n.current)return;n.current=e.ownerDocument.activeElement}else if(n.current){const e=t.current?.contains(t.current?.ownerDocument.activeElement);var r;if(t.current?.isConnected&&!e)return void(null!==(r=a)&&void 0!==r||(a=n.current));o.current?o.current():(n.current.isConnected?n.current:a)?.focus(),a=null}},[])}(),p=function(e){const t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]);const n=(0,r.useRef)(!1),o=(0,r.useRef)(),i=(0,r.useCallback)(()=>{clearTimeout(o.current)},[]);(0,r.useEffect)(()=>()=>i(),[]),(0,r.useEffect)(()=>{e||i()},[e,i]);const s=(0,r.useCallback)(e=>{const{type:t,target:r}=e;["mouseup","touchend"].includes(t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return l.includes(e.type)}return!1}(r)&&(n.current=!0)},[]),a=(0,r.useCallback)(e=>{if(e.persist(),n.current)return;const r=e.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");r&&e.relatedTarget?.closest(r)||(o.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:i,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:a}}(e=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",e):t.current?.onClose&&t.current.onClose()}),f=(0,r.useCallback)(e=>{e&&e.addEventListener("keydown",e=>{e.keyCode===o._f&&!e.defaultPrevented&&t.current?.onClose&&(e.preventDefault(),t.current.onClose())})},[]);return[u([n?c:null,!1!==e.focusOnMount?h:null,!1!==e.focusOnMount?d:null,f]),{...p,tabIndex:-1}]}},8142(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[i]=C[s]=C[b]=C[a]=C[w]=C[l]=C[c]=C[u]=C[d]=C[h]=C[p]=C[g]=C[m]=C[v]=C[y]=!1;var _="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,$="object"==typeof self&&self&&self.Object===Object&&self,k=_||$||Function("return this")(),A=t&&!t.nodeType&&t,M=A&&e&&!e.nodeType&&e,E=M&&M.exports===A,R=E&&_.process,T=function(){try{return R&&R.binding&&R.binding("util")}catch(e){}}(),L=T&&T.isTypedArray;function N(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function O(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function I(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var D,P,j,z=Array.prototype,F=Function.prototype,B=Object.prototype,H=k["__core-js_shared__"],W=F.toString,G=B.hasOwnProperty,V=(D=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"",U=B.toString,q=RegExp("^"+W.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=E?k.Buffer:void 0,Y=k.Symbol,X=k.Uint8Array,Q=B.propertyIsEnumerable,Z=z.splice,J=Y?Y.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,ne=(P=Object.keys,j=Object,function(e){return P(j(e))}),re=Me(k,"DataView"),oe=Me(k,"Map"),ie=Me(k,"Promise"),se=Me(k,"Set"),ae=Me(k,"WeakMap"),le=Me(Object,"create"),ce=Le(re),ue=Le(oe),de=Le(ie),he=Le(se),pe=Le(ae),fe=Y?Y.prototype:void 0,ge=fe?fe.valueOf:void 0;function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function we(e){var t=this.__data__=new ve(e);this.size=t.size}function xe(e,t){for(var n=e.length;n--;)if(Ne(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=G.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(e){}var o=U.call(e);return r&&(t?e[J]=n:delete e[J]),o}(e):function(e){return U.call(e)}(e)}function Ce(e){return Fe(e)&&Se(e)==i}function _e(e,t,n,r,o){return e===t||(null==e||null==t||!Fe(e)&&!Fe(t)?e!=e&&t!=t:function(e,t,n,r,o,u){var f=Ie(e),y=Ie(t),x=f?s:Re(e),S=y?s:Re(t),C=(x=x==i?p:x)==p,_=(S=S==i?p:S)==p,$=x==S;if($&&De(e)){if(!De(t))return!1;f=!0,C=!1}if($&&!C)return u||(u=new we),f||Be(e)?$e(e,t,n,r,o,u):function(e,t,n,r,o,i,s){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!i(new X(e),new X(t)));case a:case l:case h:return Ne(+e,+t);case c:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+"";case d:var u=O;case m:var p=1&r;if(u||(u=I),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var y=$e(u(e),u(t),r,o,i,s);return s.delete(e),y;case"[object Symbol]":if(ge)return ge.call(e)==ge.call(t)}return!1}(e,t,x,n,r,o,u);if(!(1&n)){var k=C&&G.call(e,"__wrapped__"),A=_&&G.call(t,"__wrapped__");if(k||A){var M=k?e.value():e,E=A?t.value():t;return u||(u=new we),o(M,E,n,r,u)}}return!!$&&(u||(u=new we),function(e,t,n,r,o,i){var s=1&n,a=ke(e),l=a.length;if(l!=ke(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:G.call(t,u)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var h=!0;i.set(e,t),i.set(t,e);for(var p=s;++c<l;){var f=e[u=a[c]],g=t[u];if(r)var m=s?r(g,f,u,t,e,i):r(f,g,u,e,t,i);if(!(void 0===m?f===g||o(f,g,n,r,i):m)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,u))}(e,t,n,r,_e,o))}function $e(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,d=!0,h=2&n?new be:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var p=e[u],f=t[u];if(r)var g=s?r(f,p,u,t,e,i):r(p,f,u,e,t,i);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!N(t,function(e,t){if(s=t,!h.has(s)&&(p===e||o(p,e,n,r,i)))return h.push(t);var s})){d=!1;break}}else if(p!==f&&!o(p,f,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function ke(e){return function(e,t,n){var r=t(e);return Ie(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,He,Ee)}function Ae(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ze(e)||function(e){return!!V&&V in e}(e))&&(Pe(e)?q:x).test(Le(e))}(n)?n:void 0}me.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},me.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},me.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===r?void 0:n}return G.call(t,e)?t[e]:void 0},me.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:G.call(t,e)},me.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?r:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=xe(t,e);return!(n<0||(n==t.length-1?t.pop():Z.call(t,n,1),--this.size,0))},ve.prototype.get=function(e){var t=this.__data__,n=xe(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return xe(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,r=xe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(oe||ve),string:new me}},ye.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Ae(this,e).get(e)},ye.prototype.has=function(e){return Ae(this,e).has(e)},ye.prototype.set=function(e,t){var n=Ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,r),this},be.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new ve,this.size=0},we.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(r)}return n.set(e,t),this.size=n.size,this};var Ee=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s)&&(i[o++]=s)}return i}(ee(e),function(t){return Q.call(e,t)}))}:function(){return[]},Re=Se;function Te(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function Le(e){if(null!=e){try{return W.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ne(e,t){return e===t||e!=e&&t!=t}(re&&Re(new re(new ArrayBuffer(1)))!=w||oe&&Re(new oe)!=d||ie&&Re(ie.resolve())!=f||se&&Re(new se)!=m||ae&&Re(new ae)!=y)&&(Re=function(e){var t=Se(e),n=t==p?e.constructor:void 0,r=n?Le(n):"";if(r)switch(r){case ce:return w;case ue:return d;case de:return f;case he:return m;case pe:return y}return t});var Oe=Ce(function(){return arguments}())?Ce:function(e){return Fe(e)&&G.call(e,"callee")&&!Q.call(e,"callee")},Ie=Array.isArray,De=te||function(){return!1};function Pe(e){if(!ze(e))return!1;var t=Se(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fe(e){return null!=e&&"object"==typeof e}var Be=L?function(e){return function(t){return e(t)}}(L):function(e){return Fe(e)&&je(e.length)&&!!C[Se(e)]};function He(e){return null!=(t=e)&&je(t.length)&&!Pe(t)?function(e,t){var n=Ie(e),r=!n&&Oe(e),o=!n&&!r&&De(e),i=!n&&!r&&!o&&Be(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!G.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Te(c,l))||a.push(c);return a}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||B))return ne(e);var t,n,r=[];for(var o in Object(e))G.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}e.exports=function(e,t){return _e(e,t)}},8152(e,t,n){var r=n(8303),o=r&&new r;e.exports=o},8156(e,t,n){var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},8169(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))},8223(e,t,n){var r=n(6110)(n(9325),"Map");e.exports=r},8227(e,t,n){"use strict";n.d(t,{LN:()=>ie,Ay:()=>ae,zr:()=>oe});var r=n(574),o=n(747);var i=n(6541),s=Array.prototype.find;function a(){return this.firstElementChild}var l=Array.prototype.filter;function c(){return Array.from(this.children)}function u(e){return new Array(e.length)}function d(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function h(e,t,n,r,o,i){for(var s,a=0,l=t.length,c=i.length;a<c;++a)(s=t[a])?(s.__data__=i[a],r[a]=s):n[a]=new d(e,i[a]);for(;a<l;++a)(s=t[a])&&(o[a]=s)}function p(e,t,n,r,o,i,s){var a,l,c,u=new Map,h=t.length,p=i.length,f=new Array(h);for(a=0;a<h;++a)(l=t[a])&&(f[a]=c=s.call(l,l.__data__,a,t)+"",u.has(c)?o[a]=l:u.set(c,l));for(a=0;a<p;++a)c=s.call(e,i[a],a,i)+"",(l=u.get(c))?(r[a]=l,l.__data__=i[a],u.delete(c)):n[a]=new d(e,i[a]);for(a=0;a<h;++a)(l=t[a])&&u.get(f[a])===l&&(o[a]=l)}function f(e){return e.__data__}function g(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}d.prototype={constructor:d,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var v=n(7268);function y(e){return function(){this.removeAttribute(e)}}function b(e){return function(){this.removeAttributeNS(e.space,e.local)}}function w(e,t){return function(){this.setAttribute(e,t)}}function x(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function S(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function C(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var _=n(3683);function $(e){return function(){delete this[e]}}function k(e,t){return function(){this[e]=t}}function A(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function M(e){return e.trim().split(/^|\s+/)}function E(e){return e.classList||new R(e)}function R(e){this._node=e,this._names=M(e.getAttribute("class")||"")}function T(e,t){for(var n=E(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function L(e,t){for(var n=E(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function N(e){return function(){T(this,e)}}function O(e){return function(){L(this,e)}}function I(e,t){return function(){(t.apply(this,arguments)?T:L)(this,e)}}function D(){this.textContent=""}function P(e){return function(){this.textContent=e}}function j(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function z(){this.innerHTML=""}function F(e){return function(){this.innerHTML=e}}function B(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function H(){this.nextSibling&&this.parentNode.appendChild(this)}function W(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}R.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var G=n(7947);function V(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===G.g&&t.documentElement.namespaceURI===G.g?t.createElement(e):t.createElementNS(n,e)}}function U(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function q(e){var t=(0,v.A)(e);return(t.local?U:V)(t)}function K(){return null}function Y(){var e=this.parentNode;e&&e.removeChild(this)}function X(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Q(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function J(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var s=0,a=o.length;s<a;++s)if((r=o[s]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}var ee=n(6747);function te(e,t,n){var r=(0,ee.A)(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ne(e,t){return function(){return te(this,e,t)}}function re(e,t){return function(){return te(this,e,t.apply(this,arguments))}}var oe=[null];function ie(e,t){this._groups=e,this._parents=t}function se(){return new ie([[document.documentElement]],oe)}ie.prototype=se.prototype={constructor:ie,select:function(e){"function"!=typeof e&&(e=(0,r.A)(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var s,a,l=t[i],c=l.length,u=o[i]=new Array(c),d=0;d<c;++d)(s=l[d])&&(a=e.call(s,s.__data__,d,l))&&("__data__"in s&&(a.__data__=s.__data__),u[d]=a);return new ie(o,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}(e):(0,o.A)(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a,l=t[s],c=l.length,u=0;u<c;++u)(a=l[u])&&(r.push(e.call(a,a.__data__,u,l)),i.push(a));return new ie(r,i)},selectChild:function(e){return this.select(null==e?a:function(e){return function(){return s.call(this.children,e)}}("function"==typeof e?e:(0,i.j)(e)))},selectChildren:function(e){return this.selectAll(null==e?c:function(e){return function(){return l.call(this.children,e)}}("function"==typeof e?e:(0,i.j)(e)))},filter:function(e){"function"!=typeof e&&(e=(0,i.A)(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s,a=t[o],l=a.length,c=r[o]=[],u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&c.push(s);return new ie(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,f);var n,r=t?p:h,o=this._parents,i=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var s=i.length,a=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var d=o[u],m=i[u],v=m.length,y=g(e.call(d,d&&d.__data__,u,o)),b=y.length,w=l[u]=new Array(b),x=a[u]=new Array(b);r(d,m,w,x,c[u]=new Array(v),y,t);for(var S,C,_=0,$=0;_<b;++_)if(S=w[_]){for(_>=$&&($=_+1);!(C=x[$])&&++$<b;);S._next=C||null}}return(a=new ie(a,o))._enter=l,a._exit=c,a},enter:function(){return new ie(this._enter||this._groups.map(u),this._parents)},exit:function(){return new ie(this._exit||this._groups.map(u),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c,u=n[l],d=r[l],h=u.length,p=a[l]=new Array(h),f=0;f<h;++f)(c=u[f]||d[f])&&(p[f]=c);for(;l<o;++l)a[l]=n[l];return new ie(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,s=o[i];--i>=0;)(r=o[i])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=m);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s,a=n[i],l=a.length,c=o[i]=new Array(l),u=0;u<l;++u)(s=a[u])&&(c[u]=s);c.sort(t)}return new ie(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],s=0,a=i.length;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this},attr:function(e,t){var n=(0,v.A)(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?b:y:"function"==typeof t?n.local?C:S:n.local?x:w)(n,t))},style:_.A,property:function(e,t){return arguments.length>1?this.each((null==t?$:"function"==typeof t?A:k)(e,t)):this.node()[e]},classed:function(e,t){var n=M(e+"");if(arguments.length<2){for(var r=E(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?I:t?N:O)(n,t))},text:function(e){return arguments.length?this.each(null==e?D:("function"==typeof e?j:P)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?z:("function"==typeof e?B:F)(e)):this.node().innerHTML},raise:function(){return this.each(H)},lower:function(){return this.each(W)},append:function(e){var t="function"==typeof e?e:q(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:q(e),o=null==t?K:"function"==typeof t?t:(0,r.A)(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})},remove:function(){return this.each(Y)},clone:function(e){return this.select(e?Q:X)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),s=i.length;if(!(arguments.length<2)){for(a=t?J:Z,r=0;r<s;++r)this.each(a(i[r],t,n));return this}var a=this.node().__on;if(a)for(var l,c=0,u=a.length;c<u;++c)for(r=0,l=a[c];r<s;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?re:ne)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,s=o.length;i<s;++i)(r=o[i])&&(yield r)}};const ae=se},8294(e,t,n){var r=n(3007),o=n(361),i=Math.min;e.exports=function(e,t){for(var n=e.length,s=i(t.length,n),a=r(e);s--;){var l=t[s];e[s]=o(l,n)?a[l]:void 0}return e}},8303(e,t,n){var r=n(6110)(n(9325),"WeakMap");e.exports=r},8306(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(2470),o=n(2711),i=n(2442),s=n(9093),a=n(1707),l=n(6861),c=n(6442),u=n(7204),d=n(7300),h=n(5812),p=n(9733);const f={Accept:"application/json, */*;q=0.1"},g={credentials:"include"},m=[u.A,l.A,c.A,a.A],v=e=>{if(e.status>=200&&e.status<300)return e;throw e};let y=e=>{const{url:t,path:n,data:o,parse:i=!0,...s}=e;let{body:a,headers:l}=e;return l={...f,...l},o&&(a=JSON.stringify(o),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...g,...s,body:a,headers:l}).then(e=>Promise.resolve(e).then(v).catch(e=>(0,p.J)(e,i)).then(e=>(0,p.f)(e,i)),e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:(0,r.__)("You are probably offline.")}})};function b(e){return m.reduceRight((e,t)=>n=>t(n,e),y)(e).catch(t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(b.nonceEndpoint).then(v).then(e=>e.text()).then(t=>(b.nonceMiddleware.nonce=t,b(e))))}b.use=function(e){m.unshift(e)},b.setFetchHandler=function(e){y=e},b.createNonceMiddleware=o.A,b.createPreloadingMiddleware=s.A,b.createRootURLMiddleware=i.A,b.fetchAllMiddleware=a.A,b.mediaUploadMiddleware=d.A,b.createThemePreviewMiddleware=h.A;const w=b},8329(e,t,n){var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&!1!==o(a[s],s,a););return n}}},8351(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},8523(e){e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},8586(e,t,n){var r=n(6449),o=n(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||s.test(e)||!i.test(e)||null!=t&&e in Object(t)}},8655(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8678(e,t,n){var r,o;r=function(){"use strict";Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var e={},t={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t,n){return void 0===n?e<t:e<t&&t<n},"<=":function(e,t,n){return void 0===n?e<=t:e<=t&&t<=n},"!!":function(t){return e.truthy(t)},"!":function(t){return!e.truthy(t)},"%":function(e,t){return e%t},log:function(e){return console.log(e),e},in:function(e,t){return!(!t||void 0===t.indexOf)&&-1!==t.indexOf(e)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(e,t,n){if(n<0){var r=String(e).substr(t);return r.substr(0,r.length+n)}return String(e).substr(t,n)},"+":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)+parseFloat(t,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)*parseFloat(t,10)})},"-":function(e,t){return void 0===t?-e:e-t},"/":function(e,t){return e/t},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(e,t){return e.concat(t)},[])},var:function(e,t){var n=void 0===t?null:t,r=this;if(void 0===e||""===e||null===e)return r;for(var o=String(e).split("."),i=0;i<o.length;i++){if(null==r)return n;if(void 0===(r=r[o[i]]))return n}return r},missing:function(){for(var t=[],n=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<n.length;r++){var o=n[r],i=e.apply({var:o},this);null!==i&&""!==i||t.push(o)}return t},missing_some:function(t,n){var r=e.apply({missing:n},this);return n.length-r.length>=t?[]:r}};return e.is_logic=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&1===Object.keys(e).length},e.truthy=function(e){return!(Array.isArray(e)&&0===e.length||!e)},e.get_operator=function(e){return Object.keys(e)[0]},e.get_values=function(t){return t[e.get_operator(t)]},e.apply=function(n,r){if(Array.isArray(n))return n.map(function(t){return e.apply(t,r)});if(!e.is_logic(n))return n;var o,i,s,a,l,c=e.get_operator(n),u=n[c];if(Array.isArray(u)||(u=[u]),"if"===c||"?:"==c){for(o=0;o<u.length-1;o+=2)if(e.truthy(e.apply(u[o],r)))return e.apply(u[o+1],r);return u.length===o+1?e.apply(u[o],r):null}if("and"===c){for(o=0;o<u.length;o+=1)if(i=e.apply(u[o],r),!e.truthy(i))return i;return i}if("or"===c){for(o=0;o<u.length;o+=1)if(i=e.apply(u[o],r),e.truthy(i))return i;return i}if("filter"===c)return a=e.apply(u[0],r),s=u[1],Array.isArray(a)?a.filter(function(t){return e.truthy(e.apply(s,t))}):[];if("map"===c)return a=e.apply(u[0],r),s=u[1],Array.isArray(a)?a.map(function(t){return e.apply(s,t)}):[];if("reduce"===c)return a=e.apply(u[0],r),s=u[1],l=void 0!==u[2]?e.apply(u[2],r):null,Array.isArray(a)?a.reduce(function(t,n){return e.apply(s,{current:n,accumulator:t})},l):l;if("all"===c){if(a=e.apply(u[0],r),s=u[1],!Array.isArray(a)||!a.length)return!1;for(o=0;o<a.length;o+=1)if(!e.truthy(e.apply(s,a[o])))return!1;return!0}if("none"===c){if(a=e.apply(u[0],r),s=u[1],!Array.isArray(a)||!a.length)return!0;for(o=0;o<a.length;o+=1)if(e.truthy(e.apply(s,a[o])))return!1;return!0}if("some"===c){if(a=e.apply(u[0],r),s=u[1],!Array.isArray(a)||!a.length)return!1;for(o=0;o<a.length;o+=1)if(e.truthy(e.apply(s,a[o])))return!0;return!1}if(u=u.map(function(t){return e.apply(t,r)}),t.hasOwnProperty(c)&&"function"==typeof t[c])return t[c].apply(r,u);if(c.indexOf(".")>0){var d=String(c).split("."),h=t;for(o=0;o<d.length;o++){if(!h.hasOwnProperty(d[o]))throw new Error("Unrecognized operation "+c+" (failed at "+d.slice(0,o+1).join(".")+")");h=h[d[o]]}return h.apply(r,u)}throw new Error("Unrecognized operation "+c)},e.uses_data=function(t){var n=[];if(e.is_logic(t)){var r=e.get_operator(t),o=t[r];Array.isArray(o)||(o=[o]),"var"===r?n.push(o[0]):o.forEach(function(t){n.push.apply(n,e.uses_data(t))})}return function(e){for(var t=[],n=0,r=e.length;n<r;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n)},e.add_operation=function(e,n){t[e]=n},e.rm_operation=function(e){delete t[e]},e.rule_like=function(t,n){if(n===t)return!0;if("@"===n)return!0;if("number"===n)return"number"==typeof t;if("string"===n)return"string"==typeof t;if("array"===n)return Array.isArray(t)&&!e.is_logic(t);if(e.is_logic(n)){if(e.is_logic(t)){var r=e.get_operator(n),o=e.get_operator(t);if("@"===r||r===o)return e.rule_like(e.get_values(t,!1),e.get_values(n,!1))}return!1}if(Array.isArray(n)){if(Array.isArray(t)){if(n.length!==t.length)return!1;for(var i=0;i<n.length;i+=1)if(!e.rule_like(t[i],n[i]))return!1;return!0}return!1}return!1},e},void 0===(o=r.call(t,n,t,e))||(e.exports=o)},8816(e,t,n){var r=n(5970),o=n(6757),i=n(2865);e.exports=function(e){return i(o(e,void 0,r),e+"")}},8859(e,t,n){var r=n(3661),o=n(1380),i=n(1459);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,e.exports=s},8882(e,t,n){var r=n(3488),o=n(8152),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},8939(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(){"use strict";var e,t,r,o,i,s,a,l,c="undefined"!=typeof window?window:null!=typeof n.g?n.g:this||{},u=c.cancelRequestAnimationFrame&&c.requestAnimationFrame||setTimeout,d=c.cancelRequestAnimationFrame||clearTimeout,h=[],p=0,f=!1,g=7,m=35,v=125,y=0,b=0,w=0,x={get didTimeout(){return!1},timeRemaining:function(){var e=g-(Date.now()-b);return e<0?0:e}},S=(i=function(){g=22,v=66,m=0},l=function(){var e=Date.now()-a;e<99?s=setTimeout(l,99-e):(s=null,i())},function(){a=Date.now(),s||(s=setTimeout(l,99))});function C(){125!=v&&(g=7,v=125,m=35,f&&(f&&(o&&d(o),r&&clearTimeout(r),f=!1),k())),S()}function _(){o=null,r=setTimeout(A,0)}function $(){r=null,u(_)}function k(){f||(t=v-(Date.now()-b),e=Date.now(),f=!0,m&&t<m&&(t=m),t>9?r=setTimeout($,t):(t=0,$()))}function A(){var n,o,i,s=g>9?9:1;if(b=Date.now(),f=!1,r=null,p>2||b-t-50<e)for(o=0,i=h.length;o<i&&x.timeRemaining()>s;o++)n=h.shift(),w++,n&&n(x);h.length?k():p=0}function M(e){return y++,h.push(e),k(),y}function E(e){var t=e-1-w;h[t]&&(h[t]=null)}if(c.requestIdleCallback&&c.cancelIdleCallback)try{c.requestIdleCallback(function(){},{timeout:0})}catch(e){!function(e){var t,n;if(c.requestIdleCallback=function(t,n){return n&&"number"==typeof n.timeout?e(t,n.timeout):e(t)},c.IdleCallbackDeadline&&(t=IdleCallbackDeadline.prototype)){if(!(n=Object.getOwnPropertyDescriptor(t,"timeRemaining"))||!n.configurable||!n.get)return;Object.defineProperty(t,"timeRemaining",{value:function(){return n.get.call(this)},enumerable:!0,configurable:!0})}}(c.requestIdleCallback)}else c.requestIdleCallback=M,c.cancelIdleCallback=E,c.document&&document.addEventListener&&(c.addEventListener("scroll",C,!0),c.addEventListener("resize",C),document.addEventListener("focus",C,!0),document.addEventListener("mouseover",C,!0),["click","keypress","touchstart","mousedown"].forEach(function(e){document.addEventListener(e,C,{capture:!0,passive:!0})}),c.MutationObserver&&new MutationObserver(C).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));return{request:M,cancel:E}})?r.apply(t,[]):r)||(e.exports=o)},8940(e,t,n){"use strict";var r=n(1594),o=n(9888),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var p=s(e,d[0],d[1]);return l(function(){h.hasValue=!0,h.value=p},[p]),u(p),p}},8984(e,t,n){var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9073(e,t,n){e=n.nmd(e),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.require(["ace/theme/textmate"],function(t){e&&(e.exports=t)})},9093(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4011);function o(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const i=function(e){const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[(0,r.normalizePath)(e),t]));return(e,n)=>{const{parse:i=!0}=e;let s=e.path;if(!s&&e.url){const{rest_route:t,...n}=(0,r.getQueryArgs)(e.url);"string"==typeof t&&(s=(0,r.addQueryArgs)(t,n))}if("string"!=typeof s)return n(e);const a=e.method||"GET",l=(0,r.normalizePath)(s);if("GET"===a&&t[l]){const e=t[l];return delete t[l],o(e,!!i)}if("OPTIONS"===a&&t[a]&&t[a][l]){const e=t[a][l];return delete t[a][l],o(e,!!i)}return n(e)}}},9095(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1594),o=n(7856);const i=(0,r.createElement)(o.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.wA,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}))},9181(e,t,n){var r=n(9302),o=n(6977),i=n(1287),s=n(6306),a=r(function(e,t){var n=s(t,i(a));return o(e,32,void 0,t,n)});a.placeholder={},e.exports=a},9216(e,t,n){"use strict";function r(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}n.d(t,{A:()=>r})},9219(e){e.exports=function(e,t){return e.has(t)}},9223(e,t,n){"use strict";n.d(t,{L:()=>a});var r=n(2470);function o(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}let i="";var s;function a(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t<e.length;t++)e[t].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),i===e&&(e+=" "),i=e,e}(e);const n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}s=function(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=(0,r.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;t&&t.appendChild(e)}(),null===t&&o("assertive"),null===n&&o("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",s):s())},9242(e,t,n){"use strict";e.exports=n(8940)},9274(e,t,n){"use strict";n.d(t,{A:()=>i,y:()=>s});var r=n(183),o=n(5226);function i(e){var t=e.document.documentElement,n=(0,r.A)(e).on("dragstart.drag",o.Ay,o.Rw);"onselectstart"in t?n.on("selectstart.drag",o.Ay,o.Rw):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function s(e,t){var n=e.document.documentElement,i=(0,r.A)(e).on("dragstart.drag",null);t&&(i.on("click.drag",o.Ay,o.Rw),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}},9302(e,t,n){var r=n(3488),o=n(6757),i=n(2865);e.exports=function(e,t){return i(o(e,t,r),e+"")}},9325(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},9326(e,t,n){var r=n(1769),o=n(2428),i=n(6449),s=n(361),a=n(294),l=n(7797);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&a(u)&&s(h,u)&&(i(e)||o(e))}},9344(e,t,n){var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9374(e,t,n){var r=n(4128),o=n(3805),i=n(4394),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},9407(e,t,n){"use strict";e.exports=n(124)},9482(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(1386);const o=new Map;const i={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},s={">=":"min-width","<":"max-width"},a={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},l=(0,r.createContext)(null),c=(e,t=">=")=>{const n=(0,r.useContext)(l),c=function(e){const t=(0,r.useMemo)(()=>{const t=function(e){if(!e)return null;let t=o.get(e);return t||("undefined"!=typeof window&&"function"==typeof window.matchMedia?(t=window.matchMedia(e),o.set(e,t),t):null)}(e);return{subscribe:e=>t?(t.addEventListener?.("change",e),()=>{t.removeEventListener?.("change",e)}):()=>{},getValue(){var e;return null!==(e=t?.matches)&&void 0!==e&&e}}},[e]);return(0,r.useSyncExternalStore)(t.subscribe,t.getValue,()=>!1)}(!n&&`(${s[t]}: ${i[e]}px)`||void 0);return n?a[t](i[e],n):c};c.__experimentalWidthProvider=l.Provider;const u=c},9517(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),(t=(0,l.default)(t,u)).require_display_name||t.allow_display_name){var n=e.match(d);if(n){var c=n[1];if(e=e.replace(c,"").replace(/(^<|>$)/g,""),c.endsWith(" ")&&(c=c.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(t.split('"').length!==t.split('\\"').length)return!1}return!0}(c))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var v=e.split("@"),y=v.pop(),b=y.toLowerCase();if(t.host_blacklist.length>0&&(0,o.default)(b,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,o.default)(b,t.host_whitelist))return!1;var w=v.join("@");if(t.domain_specific_validation&&("gmail.com"===b||"googlemail.com"===b)){var x=(w=w.toLowerCase()).split("+")[0];if(!(0,i.default)(x.replace(/\./g,""),{min:6,max:30}))return!1;for(var S=x.split("."),C=0;C<S.length;C++)if(!p.test(S[C]))return!1}if(!(!1!==t.ignore_max_length||(0,i.default)(w,{max:64})&&(0,i.default)(y,{max:254})))return!1;if(!(0,s.default)(y,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,a.default)(y)){if(!y.startsWith("[")||!y.endsWith("]"))return!1;var _=y.slice(1,-1);if(0===_.length||!(0,a.default)(_))return!1}}if(t.blacklisted_chars&&-1!==w.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;if('"'===w[0]&&'"'===w[w.length-1])return w=w.slice(1,w.length-1),t.allow_utf8_local_part?m.test(w):f.test(w);for(var $=t.allow_utf8_local_part?g:h,k=w.split("."),A=0;A<k.length;A++)if(!$.test(k[A]))return!1;return!0};var r=c(n(3399)),o=c(n(1572)),i=c(n(6255)),s=c(n(7658)),a=c(n(5372)),l=c(n(3610));function c(e){return e&&e.__esModule?e:{default:e}}var u={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},d=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p=/^[a-z\d]+$/,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,g=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default,e.exports.default=t.default},9570(e,t,n){var r=n(7334),o=n(3243),i=n(3488),s=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=s},9733(e,t,n){"use strict";n.d(t,{J:()=>i,f:()=>o});var r=n(2470);const o=(e,t=!0)=>Promise.resolve(((e,t=!0)=>t?204===e.status?null:e.json?e.json():Promise.reject(e):e)(e,t)).catch(e=>i(e,t));function i(e,t=!0){if(!t)throw e;return(e=>{const t={code:"invalid_json",message:(0,r.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})})(e).then(e=>{const t={code:"unknown_error",message:(0,r.__)("An unknown error occurred.")};throw e||t})}},9770(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}},9817(e){e.exports=function(e){return this.__data__.has(e)}},9852(e,t,n){"use strict";n.d(t,{oS:()=>c});var r=n(5008),o=n(2406),i=n(4848),s=n(1468),a=(0,o.U1)({...r.tN,devTools:!1}),l=e=>(0,i.jsx)(s.Kq,{context:r.Ie,store:a,children:e.children}),c=e=>(0,i.jsx)(l,{children:(0,i.jsx)(r.r6,{props:e})})},9870(e,t,n){var r=n(6929)();e.exports=r},9888(e,t,n){"use strict";e.exports=n(1063)},9905(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},9935(e){e.exports=function(){return!1}}}]);
Save File
Cancel