import{g as yt}from"./_Uint8Array.z7pli0Iv.js";var ft={exports:{}};/*!
 * jsoneditor.js
 *
 * @brief
 * JSONEditor is a web-based tool to view, edit, format, and validate JSON.
 * It has various modes such as a tree editor, a code editor, and a plain text
 * editor.
 *
 * Supported browsers: Chrome, Firefox, Safari, Edge
 *
 * @license
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy
 * of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 *
 * Copyright (c) 2011-2024 Jos de Jong, http://jsoneditoronline.org
 *
 * @author  Jos de Jong, <wjosdejong@gmail.com>
 * @version 10.1.0
 * @date    2024-06-19
 */(function(Ct,It){(function(Ye,at){Ct.exports=at()})(self,function(){return at={6545:function(le,m,Z){Z.d(m,{t:function(){return J}});var U=Z(1925),x=Z(6237),H=Z(3057);function X(F){return(X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B})(F)}function j(F,B){for(var b=0;b<B.length;b++){var C=B[b];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(F,function($){return $=function(y,f){if(X(y)!="object"||!y)return y;var d=y[Symbol.toPrimitive];if(d===void 0)return(f==="string"?String:Number)(y);if(d=d.call(y,f||"default"),X(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}($,"string"),X($)=="symbol"?$:$+""}(C.key),C)}}var J=function(){function F($,d){if(!(this instanceof F))throw new TypeError("Cannot call a class as a function");this.dom={};var f=this,h=this.dom,d=(this.anchor=void 0,this.items=$,this.eventListeners={},this.selection=void 0,this.onClose=d?d.close:void 0,this.limitHeight=!!d&&d.limitHeight,document.createElement("div")),c=(d.className="jsoneditor-contextmenu-root",h.root=d,document.createElement("div")),d=(c.className="jsoneditor-contextmenu",h.menu=c,d.appendChild(c),document.createElement("ul")),c=(d.className="jsoneditor-menu",c.appendChild(d),h.list=d,h.items=[],document.createElement("button")),h=(c.type="button",h.focusButton=c,document.createElement("li"));h.style.overflow="hidden",h.style.height="0",h.appendChild(c),d.appendChild(h),function n(o,i,s){s.forEach(function(a){var t,e,r,l,p,g;a.type==="separator"?((p=document.createElement("div")).className="jsoneditor-separator",(e=document.createElement("li")).appendChild(p),o.appendChild(e)):(t={},p=document.createElement("li"),o.appendChild(p),(e=document.createElement("button")).type="button",e.className=a.className,t.button=e,a.title&&(e.title=a.title),a.click&&(e.onclick=function(I){I.preventDefault(),f.hide(),a.click()}),p.appendChild(e),a.submenu?((l=document.createElement("div")).className="jsoneditor-icon",e.appendChild(l),(l=document.createElement("div")).className="jsoneditor-text"+(a.click?"":" jsoneditor-right-margin"),l.appendChild(document.createTextNode(a.text)),e.appendChild(l),(r=a.click?(e.className+=" jsoneditor-default",(l=document.createElement("button")).type="button",(t.buttonExpand=l).className="jsoneditor-expand",(g=document.createElement("div")).className="jsoneditor-expand",l.appendChild(g),p.appendChild(l),a.submenuTitle&&(l.title=a.submenuTitle),l):((g=document.createElement("div")).className="jsoneditor-expand",e.appendChild(g),e)).onclick=function(I){I.preventDefault(),f._onExpandItem(t),r.focus()},t.subItems=l=[],g=document.createElement("ul"),(t.ul=g).className="jsoneditor-menu",g.style.height="0",p.appendChild(g),n(g,l,a.submenu)):((p=document.createElement("div")).className="jsoneditor-icon",e.appendChild(p),(g=document.createElement("div")).className="jsoneditor-text",g.appendChild(document.createTextNode((0,H.Tl)(a.text))),e.appendChild(g)),i.push(t))})}(d,this.dom.items,$),this.maxHeight=0,$.forEach(function(n){n=24*($.length+(n.submenu?n.submenu.length:0)),f.maxHeight=Math.max(f.maxHeight,n)})}return B=F,(b=[{key:"_getVisibleButtons",value:function(){var $=[],y=this;return this.dom.items.forEach(function(f){$.push(f.button),f.buttonExpand&&$.push(f.buttonExpand),f.subItems&&f===y.expandedItem&&f.subItems.forEach(function(d){$.push(d.button),d.buttonExpand&&$.push(d.buttonExpand)})}),$}},{key:"show",value:function($,i,f){this.hide();var d=!0,h=$.parentNode,c=$.getBoundingClientRect(),h=h.getBoundingClientRect(),n=i.getBoundingClientRect(),o=this,i=(this.dom.absoluteAnchor=(0,U.p)($,i,function(){o.hide()}),c.bottom+this.maxHeight<n.bottom||c.top-this.maxHeight>n.top&&(d=!1),f?0:c.top-h.top);d?(f=$.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=i+f+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(h=d?n.bottom-c.bottom-10:c.top-n.top-10,this.dom.list.style.maxHeight=h+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,x.getSelection)(),this.anchor=$,setTimeout(function(){o.dom.focusButton.focus()},0),F.visibleMenu&&F.visibleMenu.hide(),F.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose)&&this.onClose(),F.visibleMenu===this&&(F.visibleMenu=void 0)}},{key:"_onExpandItem",value:function($){var y,f=this,d=$===this.expandedItem,c=this.expandedItem;c&&(c.ul.style.height="0",c.ul.style.padding="",setTimeout(function(){f.expandedItem!==c&&(c.ul.style.display="",x.removeClassName)(c.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),d||((y=$.ul).style.display="block",y.clientHeight,setTimeout(function(){if(f.expandedItem===$){for(var h=0,n=0;n<y.childNodes.length;n++)h+=y.childNodes[n].clientHeight;y.style.height=h+"px",y.style.padding="5px 10px"}},0),(0,x.addClassName)(y.parentNode,"jsoneditor-selected"),this.expandedItem=$)}},{key:"_onKeyDown",value:function($){var y,f,d,c,h=$.target,n=$.which,o=!1;n===27?(this.selection&&(0,x.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),o=!0):n===9?$.shiftKey?(f=(y=this._getVisibleButtons()).indexOf(h))===0&&(y[y.length-1].focus(),o=!0):(f=(y=this._getVisibleButtons()).indexOf(h))===y.length-1&&(y[0].focus(),o=!0):n===37?(h.className==="jsoneditor-expand"&&(f=(y=this._getVisibleButtons()).indexOf(h),d=y[f-1])&&d.focus(),o=!0):n===38?(f=(y=this._getVisibleButtons()).indexOf(h),(d=(d=(d=y[f-1])&&d.className==="jsoneditor-expand"?y[f-2]:d)||y[y.length-1])&&d.focus(),o=!0):n===39?(f=(y=this._getVisibleButtons()).indexOf(h),(c=y[f+1])&&c.className==="jsoneditor-expand"&&c.focus(),o=!0):n===40&&(f=(y=this._getVisibleButtons()).indexOf(h),(c=(c=(c=y[f+1])&&c.className==="jsoneditor-expand"?y[f+2]:c)||y[0])&&(c.focus(),o=!0),o=!0),o&&($.stopPropagation(),$.preventDefault())}}])&&j(B.prototype,b),C&&j(B,C),Object.defineProperty(B,"prototype",{writable:!1}),B;var B,b,C}();J.visibleMenu=void 0},2115:function(le,m,Z){function U(X){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(X)}function x(X,j){for(var J=0;J<j.length;J++){var F=j[J];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(X,function(B){return B=function(b,C){if(U(b)!="object"||!b)return b;var $=b[Symbol.toPrimitive];if($===void 0)return(C==="string"?String:Number)(b);if($=$.call(b,C||"default"),U($)!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}(B,"string"),U(B)=="symbol"?B:B+""}(F.key),F)}}Z.d(m,{N:function(){return H}});var H=function(){function X(b){if(!(this instanceof X))throw new TypeError("Cannot call a class as a function");this.errorTableVisible=b.errorTableVisible,this.onToggleVisibility=b.onToggleVisibility,this.onFocusLine=b.onFocusLine||function(){},this.onChangeHeight=b.onChangeHeight,this.dom={};var b=document.createElement("div"),C=(b.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=b,document.createElement("div")),b=(C.style.display="none",C.className="jsoneditor-additional-errors fadein",C.textContent="Scroll for more ▿",this.dom.additionalErrorsIndication=C,b.appendChild(C),document.createElement("span")),C=(b.className="jsoneditor-validation-error-icon",b.style.display="none",this.dom.validationErrorIcon=b,document.createElement("span"));C.className="jsoneditor-validation-error-count",C.style.display="none",this.dom.validationErrorCount=C,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}return j=X,(J=[{key:"getErrorTable",value:function(){return this.dom.validationErrorsContainer}},{key:"getErrorCounter",value:function(){return this.dom.validationErrorCount}},{key:"getWarningIcon",value:function(){return this.dom.validationErrorIcon}},{key:"getErrorIcon",value:function(){return this.dom.parseErrorIndication}},{key:"toggleTableVisibility",value:function(){this.errorTableVisible=!this.errorTableVisible,this.onToggleVisibility(this.errorTableVisible)}},{key:"setErrors",value:function(B,b){var C,$,y=this,f=(this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<B.length?((f=document.createElement("div")).className="jsoneditor-validation-errors",($=document.createElement("table")).className="jsoneditor-text-errors",f.appendChild($),C=document.createElement("tbody"),$.appendChild(C),B.forEach(function(d){isNaN(d.line)?d.dataPath&&(h=b.find(function(i){return i.path===d.dataPath}))&&(c=h.line+1):c=d.line;var c,h=document.createElement("tr"),n=(h.className=isNaN(c)?"":"jump-to-line",d.type==="error"?h.className+=" parse-error":h.className+=" validation-error",document.createElement("td")),o=document.createElement("button"),o=(o.className="jsoneditor-schema-error",n.appendChild(o),h.appendChild(n),document.createElement("td"));o.style="white-space: nowrap;",o.textContent=isNaN(c)?"":"Ln "+c,h.appendChild(o),typeof d=="string"?((n=document.createElement("td")).colSpan=2,(o=document.createElement("pre")).appendChild(document.createTextNode(d)),n.appendChild(o),h.appendChild(n)):((o=document.createElement("td")).appendChild(document.createTextNode(d.dataPath||"")),h.appendChild(o),n=document.createElement("td"),(o=document.createElement("pre")).appendChild(document.createTextNode(d.message.replace(/<br>/gi,`
`))),n.appendChild(o),h.appendChild(n)),h.onclick=function(){y.onFocusLine(c)},C.appendChild(h)}),this.dom.validationErrors=f,this.dom.validationErrorsContainer.appendChild(f),this.dom.additionalErrorsIndication.title=B.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){y.dom.additionalErrorsIndication.style.display=0<y.dom.validationErrorsContainer.clientHeight&&y.dom.validationErrorsContainer.scrollTop===0?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,$=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight($)):this.onChangeHeight(0),B.filter(function(d){return d.type!=="error"}).length);0<f?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=f,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=f+" schema validation error(s) found",this.dom.validationErrorIcon.onclick=this.toggleTableVisibility.bind(this)):(this.dom.validationErrorCount.style.display="none",this.dom.validationErrorIcon.style.display="none"),B.some(function(d){return d.type==="error"})?($=B[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN($)?"parse error - check that the json is valid":"parse error on line "+$,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&x(j.prototype,J),F&&x(j,F),Object.defineProperty(j,"prototype",{writable:!1}),j;var j,J,F}()},2877:function(le,m,Z){function U(X){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(X)}function x(X,j){for(var J=0;J<j.length;J++){var F=j[J];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(X,function(B){return B=function(b,C){if(U(b)!="object"||!b)return b;var $=b[Symbol.toPrimitive];if($===void 0)return(C==="string"?String:Number)(b);if($=$.call(b,C||"default"),U($)!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}(B,"string"),U(B)=="symbol"?B:B+""}(F.key),F)}}Z.d(m,{$:function(){return H}});var H=function(){function X(B){if(!(this instanceof X))throw new TypeError("Cannot call a class as a function");if(this.target=B.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus=typeof B.onFocus=="function"?B.onFocus:null,this.onBlur=typeof B.onBlur=="function"?B.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=(function(b){b.which!==9&&b.keyCode!==9||this._onEvent(b)}).bind(this),this._onBlur=this._onEvent.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp),document.addEventListener("blur",this._onBlur))}return j=X,(J=[{key:"destroy",value:function(){document.removeEventListener("click",this._onClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("blur",this._onBlur),this._onEvent({target:document.body})}},{key:"_onEvent",value:function(B){B=B.target,B=B===this.target||!(!this.target.contains(B)&&!this.target.contains(document.activeElement)),B?this.focusFlag||(this.onFocus&&this.onFocus({type:"focus",target:this.target}),this.focusFlag=!0):(this.focusFlag||this.firstEventFlag)&&(this.onBlur&&this.onBlur({type:"blur",target:this.target}),this.focusFlag=!1,this.firstEventFlag)&&(this.firstEventFlag=!1)}}])&&x(j.prototype,J),F&&x(j,F),Object.defineProperty(j,"prototype",{writable:!1}),j;var j,J,F}()},1346:function(le,m,Z){var U=Z(7413),x=Z(1746),H=Z(5633).treeModeMixins,X=Z(1948).textModeMixins,j=Z(7483).previewModeMixins,$=Z(6237),J=$.clear,F=$.extend,B=$.getInnerText,b=$.getInternetExplorerVersion,C=$.parse,$=Z(2870).tryRequireAjv,y=Z(5609).showTransformModal,f=Z(2915).showSortModal,d=$();function c(h,n,o){if(!(this instanceof c))throw new Error('JSONEditor constructor called without "new".');var i=b();if(i!==-1&&i<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");n&&(n.error&&(console.warn('Option "error" has been renamed to "onError"'),n.onError=n.error,delete n.error),n.change&&(console.warn('Option "change" has been renamed to "onChange"'),n.onChange=n.change,delete n.change),n.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),n.onEditable=n.editable,delete n.editable),n.onChangeJSON&&(n.mode==="text"||n.mode==="code"||n.modes&&(n.modes.indexOf("text")!==-1||n.modes.indexOf("code")!==-1))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),n)&&Object.keys(n).forEach(function(s){c.VALID_OPTIONS.indexOf(s)===-1&&console.warn('Unknown option "'+s+'". This option will be ignored')}),arguments.length&&this._create(h,n,o)}typeof Promise>"u"&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),c.modes={},c.prototype.DEBOUNCE_INTERVAL=150,c.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onExpand","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","onFocus","onBlur","colorPicker","onColorPicker","timestampTag","timestampFormat","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","limitDragging","maxVisibleChilds","onValidationError","modalAnchor","popupAnchor","createQuery","executeQuery","queryDescription","allowSchemaSuggestions","showErrorTable"],c.prototype._create=function(h,n,o){this.container=h,this.options=n||{},this.json=o||{},h=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(h)},c.prototype.destroy=function(){},c.prototype.set=function(h){this.json=h},c.prototype.get=function(){return this.json},c.prototype.setText=function(h){this.json=C(h)},c.prototype.getText=function(){return JSON.stringify(this.json)},c.prototype.setName=function(h){this.options||(this.options={}),this.options.name=h},c.prototype.getName=function(){return this.options&&this.options.name},c.prototype.setMode=function(h){if(h!==this.options.mode||!this.create){var n=this.container,o=F({},this.options),i=o.mode,s=(o.mode=h,c.modes[h]);if(!s)throw new Error('Unknown mode "'+o.mode+'"');var a=s.data==="text",t=this.getName(),e=this[a?"getText":"get"]();if(this.destroy(),J(this),F(this,s.mixin),this.create(n,o),this.setName(t),this[a?"setText":"set"](e),typeof s.load=="function")try{s.load.call(this)}catch(r){console.error(r)}if(typeof o.onModeChange=="function"&&h!==i)try{o.onModeChange(h,i)}catch(r){console.error(r)}}},c.prototype.getMode=function(){return this.options.mode},c.prototype._onError=function(h){this.options&&typeof this.options.onError=="function"?this.options.onError(h):window.alert(h.toString())},c.prototype.setSchema=function(h,n){if(h){var o;try{this.options.ajv?o=this.options.ajv:((o=d({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(Z(5207)),o.addMetaSchema(Z(6801)))}catch{console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(o){if(n){for(var i in n)o.removeSchema(i),n[i]&&o.addSchema(n[i],i);this.options.schemaRefs=n}this.validateSchema=o.compile(h),this.options.schema=h,this.options.schemaRefs=n,this.validate()}}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate();this.refresh(),typeof this._onSchemaChange=="function"&&this._onSchemaChange(h,n)},c.prototype.validate=function(){},c.prototype.refresh=function(){},(c.registerMode=function(h){var n;if(Array.isArray(h))for(s=0;s<h.length;s++)c.registerMode(h[s]);else{if(!("mode"in h))throw new Error('Property "mode" missing');if(!("mixin"in h))throw new Error('Property "mixin" missing');if(!("data"in h))throw new Error('Property "data" missing');var o=h.mode;if(o in c.modes)throw new Error('Mode "'+o+'" already registered');if(typeof h.mixin.create!="function")throw new Error('Required function "create" missing on mixin');for(var i=["setMode","registerMode","modes"],s=0;s<i.length;s++)if((n=i[s])in h.mixin)throw new Error('Reserved property "'+n+'" not allowed in mixin');c.modes[o]=h}})(H),c.registerMode(X),c.registerMode(j),c.ace=U,c.Ajv=d,c.VanillaPicker=x,c.showTransformModal=y,c.showSortModal=f,c.getInnerText=B,le.exports=c.default=c},1389:function(le,m,Z){Z.d(m,{n:function(){return j}});var U=Z(6545),x=Z(3057);function H(J){return(H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F})(J)}function X(J,F){for(var B=0;B<F.length;B++){var b=F[B];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(J,function(C){return C=function($,y){if(H($)!="object"||!$)return $;var f=$[Symbol.toPrimitive];if(f===void 0)return(y==="string"?String:Number)($);if(f=f.call($,y||"default"),H(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}(C,"string"),H(C)=="symbol"?C:C+""}(b.key),b)}}var j=function(){function J(C,$,y,f){if(!(this instanceof J))throw new TypeError("Cannot call a class as a function");for(var d={code:{text:(0,x.Tl)("modeCodeText"),title:(0,x.Tl)("modeCodeTitle"),click:function(){f("code")}},form:{text:(0,x.Tl)("modeFormText"),title:(0,x.Tl)("modeFormTitle"),click:function(){f("form")}},text:{text:(0,x.Tl)("modeTextText"),title:(0,x.Tl)("modeTextTitle"),click:function(){f("text")}},tree:{text:(0,x.Tl)("modeTreeText"),title:(0,x.Tl)("modeTreeTitle"),click:function(){f("tree")}},view:{text:(0,x.Tl)("modeViewText"),title:(0,x.Tl)("modeViewTitle"),click:function(){f("view")}},preview:{text:(0,x.Tl)("modePreviewText"),title:(0,x.Tl)("modePreviewTitle"),click:function(){f("preview")}}},c=[],h=0;h<$.length;h++){var n=$[h],o=d[n];if(!o)throw new Error('Unknown mode "'+n+'"');o.className="jsoneditor-type-modes"+(y===n?" jsoneditor-selected":""),c.push(o)}var s=d[y];if(!s)throw new Error('Unknown mode "'+y+'"');var s=s.text,i=document.createElement("button"),s=(i.type="button",i.className="jsoneditor-modes jsoneditor-separator",i.textContent=s+" ▾",i.title=(0,x.Tl)("modeEditorTitle"),i.onclick=function(){new U.t(c).show(i,C)},document.createElement("div"));s.className="jsoneditor-modes",s.style.position="relative",s.appendChild(i),C.appendChild(s),this.dom={container:C,box:i,frame:s}}return F=J,(B=[{key:"focus",value:function(){this.dom.box.focus()}},{key:"destroy",value:function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null}}])&&X(F.prototype,B),b&&X(F,b),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,B,b}()},7413:function(le,m,Z){var U;if(window.ace)U=window.ace;else try{U=Z(6990),Z(4221),Z(6534),Z(6489);var x=Z(5477);U.config.setModuleUrl("ace/mode/json_worker",x)}catch{}le.exports=U},9762:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(le,m,Z){m.isDark=!1,m.cssClass="ace-jsoneditor",m.cssText=`.ace-jsoneditor .ace_gutter {
background: #ebebeb;
color: #333
}

.ace-jsoneditor.ace_editor {
line-height: 1.3;
background-color: #fff;
}
.ace-jsoneditor .ace_print-margin {
width: 1px;
background: #e8e8e8
}
.ace-jsoneditor .ace_scroller {
background-color: #FFFFFF
}
.ace-jsoneditor .ace_text-layer {
color: gray
}
.ace-jsoneditor .ace_variable {
color: #1a1a1a
}
.ace-jsoneditor .ace_cursor {
border-left: 2px solid #000000
}
.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
.ace-jsoneditor .ace_marker-layer .ace_selection {
background: lightgray
}
.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px #FFFFFF;
border-radius: 2px
}
.ace-jsoneditor .ace_marker-layer .ace_step {
background: rgb(255, 255, 0)
}
.ace-jsoneditor .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #BFBFBF
}
.ace-jsoneditor .ace_marker-layer .ace_active-line {
background: #FFFBD1
}
.ace-jsoneditor .ace_gutter-active-line {
background-color : #dcdcdc
}
.ace-jsoneditor .ace_marker-layer .ace_selected-word {
border: 1px solid lightgray
}
.ace-jsoneditor .ace_invisible {
color: #BFBFBF
}
.ace-jsoneditor .ace_keyword,
.ace-jsoneditor .ace_meta,
.ace-jsoneditor .ace_support.ace_constant.ace_property-value {
color: #AF956F
}
.ace-jsoneditor .ace_keyword.ace_operator {
color: #484848
}
.ace-jsoneditor .ace_keyword.ace_other.ace_unit {
color: #96DC5F
}
.ace-jsoneditor .ace_constant.ace_language {
color: darkorange
}
.ace-jsoneditor .ace_constant.ace_numeric {
color: red
}
.ace-jsoneditor .ace_constant.ace_character.ace_entity {
color: #BF78CC
}
.ace-jsoneditor .ace_invalid {
color: #FFFFFF;
background-color: #FF002A;
}
.ace-jsoneditor .ace_fold {
background-color: #AF956F;
border-color: #000000
}
.ace-jsoneditor .ace_storage,
.ace-jsoneditor .ace_support.ace_class,
.ace-jsoneditor .ace_support.ace_function,
.ace-jsoneditor .ace_support.ace_other,
.ace-jsoneditor .ace_support.ace_type {
color: #C52727
}
.ace-jsoneditor .ace_string {
color: green
}
.ace-jsoneditor .ace_comment {
color: #BCC8BA
}
.ace-jsoneditor .ace_entity.ace_name.ace_tag,
.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {
color: #606060
}
.ace-jsoneditor .ace_markup.ace_underline {
text-decoration: underline
}
.ace-jsoneditor .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y
}`,le("../lib/dom").importCssString(m.cssText,m.cssClass)})},5736:function(le,m){(Z={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(U,x,H,X,j,J,F){var B=J.length-1;switch(j){case 1:this.$=U.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(U);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=J[B-1];case 13:this.$={};break;case 14:this.$=J[B-1];break;case 15:this.$=[J[B-2],J[B]];break;case 16:this.$={},this.$[J[B][0]]=J[B][1];break;case 17:this.$=J[B-2],J[B-2][J[B][0]]=J[B][1];break;case 18:this.$=[];break;case 19:this.$=J[B-1];break;case 20:this.$=[J[B]];break;case 21:this.$=J[B-2],J[B-2].push(J[B])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(U,x){throw new Error(U)},parse:function(U){var x=this,H=[0],X=[null],j=[],J=this.table,F="",B=0,b=0,C=0,$=(this.lexer.setInput(U),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.lexer.yylloc===void 0&&(this.lexer.yylloc={}),this.lexer.yylloc);function y(){var r=x.lexer.lex()||1;return r=typeof r!="number"&&x.symbols_[r]||r}j.push($),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);for(var f,d,c,h,n,o,i,s,a,t={};;){if(c=H[H.length-1],(h=this.defaultActions[c]||(f==null&&(f=y()),J[c]&&J[c][f]))===void 0||!h.length||!h[0]){if(!C){for(n in s=[],J[c])this.terminals_[n]&&2<n&&s.push("'"+this.terminals_[n]+"'");var e="",e=this.lexer.showPosition?"Parse error on line "+(B+1)+`:
`+this.lexer.showPosition()+`
Expecting `+s.join(", ")+", got '"+this.terminals_[f]+"'":"Parse error on line "+(B+1)+": Unexpected "+(f==1?"end of input":"'"+(this.terminals_[f]||f)+"'");this.parseError(e,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:$,expected:s})}if(C==3){if(f==1)throw new Error(e||"Parsing halted.");b=this.lexer.yyleng,F=this.lexer.yytext,B=this.lexer.yylineno,$=this.lexer.yylloc,f=y()}for(;!("2"in J[c]);){if(c==0)throw new Error(e||"Parsing halted.");a=1,H.length=H.length-2*a,X.length=X.length-a,j.length=j.length-a,c=H[H.length-1]}d=f,f=2,h=J[c=H[H.length-1]]&&J[c][2],C=3}if(h[0]instanceof Array&&1<h.length)throw new Error("Parse Error: multiple actions possible at state: "+c+", token: "+f);switch(h[0]){case 1:H.push(f),X.push(this.lexer.yytext),j.push(this.lexer.yylloc),H.push(h[1]),f=null,d?(f=d,d=null):(b=this.lexer.yyleng,F=this.lexer.yytext,B=this.lexer.yylineno,$=this.lexer.yylloc,0<C&&C--);break;case 2:if(o=this.productions_[h[1]][1],t.$=X[X.length-o],t._$={first_line:j[j.length-(o||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(o||1)].first_column,last_column:j[j.length-1].last_column},(i=this.performAction.call(t,F,b,B,this.yy,h[1],X,j))!==void 0)return i;o&&(H=H.slice(0,-1*o*2),X=X.slice(0,-1*o),j=j.slice(0,-1*o)),H.push(this.productions_[h[1]][0]),X.push(t.$),j.push(t._$),i=J[H[H.length-2]][H[H.length-1]],H.push(i);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(U,x){if(!this.yy.parseError)throw new Error(U);this.yy.parseError(U,x)},setInput:function(U){return this._input=U,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var U=this._input[0];return this.yytext+=U,this.yyleng++,this.match+=U,this.matched+=U,U.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),U},unput:function(U){return this._input=U+this._input,this},more:function(){return this._more=!0,this},less:function(U){this._input=this.match.slice(U)+this._input},pastInput:function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(20<U.length?"...":"")+U.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(20<U.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var U=this.pastInput(),x=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
`+x+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var U,x,H,X,j=this._currentRules(),J=0;J<j.length&&(!(x=this._input.match(this.rules[j[J]]))||U&&!(x[0].length>U[0].length)||(U=x,H=J,this.options.flex));J++);return U?((X=U[0].match(/\n.*/g))&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-1:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(U[0].length),this.matched+=U[0],X=this.performAction.call(this,this.yy,this,j[H],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X||void 0):this._input===""?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U!==void 0?U:this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(U){this.begin(U)},options:{},performAction:function(U,x,H,X){switch(H){case 0:break;case 1:return 6;case 2:return x.yytext=x.yytext.substr(1,x.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};var Z;m.parser=Z,m.parse=Z.parse.bind(Z)},4772:function(le){function m(){}m.prototype={on:function(B,b){this._events=this._events||{},this._events[B]=this._events[B]||[],this._events[B].push(b)},off:function(B,b){this._events=this._events||{},B in this._events&&this._events[B].splice(this._events[B].indexOf(b),1)},emit:function(B){if(this._events=this._events||{},B in this._events)for(var b=0;b<this._events[B].length;b++)this._events[B][b].apply(this,Array.prototype.slice.call(arguments,1))}},m.mixin=function(B){for(var b=["on","off","emit"],C=0;C<b.length;C++)typeof B=="function"?B.prototype[b[C]]=m.prototype[b[C]]:B[b[C]]=m.prototype[b[C]];return B};var Z={escapeRegExp:function(B){var b=/[\\^$.*+?()[\]{}|]/g,C=new RegExp(b.source);return B&&C.test(B)?B.replace(b,"\\$&"):B},extend:function(B,b){for(var C in b){var $;b.hasOwnProperty(C)&&(($=b[C])&&Object.prototype.toString.call($)==="[object Object]"?(B[C]=B[C]||{},Z.extend(B[C],$)):B[C]=$)}return B},each:function(B,b,C){if(Object.prototype.toString.call(B)==="[object Object]")for(var $ in B)Object.prototype.hasOwnProperty.call(B,$)&&b.call(C,$,B[$],B);else for(var y=0,f=B.length;y<f;y++)b.call(C,y,B[y],B)},createElement:function(B,b){var C,$=document.createElement(B);if(b&&Object.prototype.toString.call(b)==="[object Object]")for(C in b)C in $?$[C]=b[C]:C==="html"?$.innerHTML=b[C]:$.setAttribute(C,b[C]);return $},hasClass:function(B,b){if(B)return B.classList?B.classList.contains(b):!!B.className&&!!B.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))},addClass:function(B,b){Z.hasClass(B,b)||(B.classList?B.classList.add(b):B.className=B.className.trim()+" "+b)},removeClass:function(B,b){Z.hasClass(B,b)&&(B.classList?B.classList.remove(b):B.className=B.className.replace(new RegExp("(^|\\s)"+b.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(B,b){return B&&B!==document.body&&(b(B)?B:Z.closest(B.parentNode,b))},isInt:function(B){return typeof B=="number"&&isFinite(B)&&Math.floor(B)===B},debounce:function(B,b,C){var $;return function(){var y=this,f=arguments,d=C&&!$;clearTimeout($),$=setTimeout(function(){$=null,C||B.apply(y,f)},b),d&&B.apply(y,f)}},rect:function($,f){var C=window,$=$.getBoundingClientRect(),y=f?C.pageXOffset:0,f=f?C.pageYOffset:0;return{bottom:$.bottom+f,height:$.height,left:$.left+y,right:$.right+y,top:$.top+f,width:$.width}},includes:function(B,b){return-1<B.indexOf(b)},startsWith:function(B,b){return B.substr(0,b.length)===b},truncate:function(B){for(;B.firstChild;)B.removeChild(B.firstChild)}};function U(B,b){return B.hasOwnProperty(b)&&(B[b]===!0||B[b].length)}function x(B,b,C){B.parentNode?B.parentNode.parentNode||b.appendChild(B.parentNode):b.appendChild(B),Z.removeClass(B,"excluded"),C||(B.textContent=B.textContent)}function H(){var B,b;this.items.length&&(B=document.createDocumentFragment(),this.config.pagination?(b=this.pages.slice(0,this.pageIndex),Z.each(b,function(C,$){Z.each($,function(y,f){x(f,B,this.customOption)},this)},this)):Z.each(this.items,function(C,$){x($,B,this.customOption)},this),B.childElementCount&&(Z.removeClass(this.items[this.navIndex],"active"),this.navIndex=(B.querySelector(".selectr-option.selected")||B.querySelector(".selectr-option")).idx,Z.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(B))}function X(B,b){b=b||B;var C={class:"selectr-option",role:"treeitem","aria-selected":!1};return this.customOption?C.html=this.config.renderOption(b):C.textContent=B.textContent,(b=Z.createElement("li",C)).idx=B.idx,this.items.push(b),B.defaultSelected&&this.defaultSelected.push(B.idx),B.disabled&&(b.disabled=!0,Z.addClass(b,"disabled")),b}function j(){var B,b=this.tree,C=b.scrollTop;b.scrollHeight-b.offsetHeight<=C&&this.pageIndex<this.pages.length&&(B=document.createDocumentFragment(),Z.each(this.pages[this.pageIndex],function($,y){x(y,B,this.customOption)},this),b.appendChild(B),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))}function J(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&Z.removeClass(this.inputContainer,"active"),Z.hasClass(this.container,"notice")&&(Z.removeClass(this.container,"notice"),Z.addClass(this.container,"open"),this.input.focus()),Z.each(this.items,function(B,b){Z.removeClass(b,"excluded"),this.customOption||(b.textContent=b.textContent)},this))}function F(B,b){if(!B)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if(typeof(this.el=B)=="string"&&(this.el=document.querySelector(B)),this.el===null)throw new Error("The element you passed to Selectr can not be found.");if(this.el.nodeName.toLowerCase()!=="select")throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(b)}F.prototype.render=function(B){var b;this.rendered||((this.el.selectr=this).config=Z.extend({defaultSelected:!0,width:"auto",disabled:!1,disabledMobile:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,nativeKeyboard:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag...",messages:{noResults:"No results.",noOptions:"No options available.",maxSelections:"A maximum of {max} items can be selected.",tagDuplicate:"That tag is already in use.",searchPlaceholder:"Search options..."}},B),this.originalType=this.el.type,this.originalIndex=this.el.tabIndex,this.defaultSelected=[],this.originalOptionCount=this.el.options.length,(this.config.multiple||this.config.taggable)&&(this.el.multiple=!0),this.disabled=U(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,!this.config.disabledMobile&&/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&typeof this.config.renderOption=="function",this.customSelected=this.config.hasOwnProperty("renderSelection")&&typeof this.config.renderSelection=="function",this.supportsEventPassiveOption=this.detectEventPassiveOption(),m.mixin(this),(function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,U(this.config,"width")&&(Z.isInt(this.config.width)?this.width=this.config.width+"px":this.config.width==="auto"?this.width="100%":Z.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=Z.createElement("div",{class:"selectr-container"}),this.config.customClass&&Z.addClass(this.container,this.config.customClass),this.mobileDevice?Z.addClass(this.container,"selectr-mobile"):Z.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?Z.addClass(this.el,"selectr-visible"):Z.addClass(this.el,"selectr-hidden"),this.selected=Z.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=Z.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var C=Z.createElement("div",{class:"selectr-options-container"});if(this.tree=Z.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=Z.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(Z.addClass(this.label,"selectr-tags"),Z.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.config.defaultSelected?this.getSelectedProperties("value"):[],this.selectedIndexes=this.getSelectedProperties("idx")):(this.selectedValue=null,this.selectedIndex=-1),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=Z.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),Z.addClass(this.container,"clearable")),this.config.taggable){var $=Z.createElement("li",{class:"input-tag"});if(this.input=Z.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),$.appendChild(this.input),this.label.appendChild($),Z.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var y=[],f=0;f<this.tagSeperators.length;f++)y.push(Z.escapeRegExp(this.tagSeperators[f]));this.tagSeperatorsRegex=new RegExp(y.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=Z.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search",placeholder:this.config.messages.searchPlaceholder}),this.inputClear=Z.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=Z.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),C.appendChild(this.inputContainer)),C.appendChild(this.notice),C.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var d,c,h,n=!1,o=0;this.el.children.length&&Z.each(this.el.children,function(s,a){a.nodeName==="OPTGROUP"?(n=Z.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.label+"</li>"}),Z.each(a.children,function(t,e){e.idx=o,n.appendChild(X.call(this,e,n)),o++},this)):(a.idx=o,X.call(this,a),o++)},this),this.config.data&&Array.isArray(this.config.data)&&(d=!(this.data=[]),n=!1,o=0,Z.each(this.config.data,function(s,a){U(a,"children")?(d=Z.createElement("optgroup",{label:a.text}),n=Z.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.text+"</li>"}),Z.each(a.children,function(t,e){(c=new Option(e.text,e.value,!1,e.hasOwnProperty("selected")&&e.selected===!0)).disabled=U(e,"disabled"),this.options.push(c),d.appendChild(c),c.idx=o,n.appendChild(X.call(this,c,e)),this.data[o]=e,o++},this),this.el.appendChild(d)):((c=new Option(a.text,a.value,!1,a.hasOwnProperty("selected")&&a.selected===!0)).disabled=U(a,"disabled"),this.options.push(c),c.idx=o,X.call(this,c,a),this.data[o]=a,o++)},this)),this.setSelected(!0);for(var i=this.navIndex=0;i<this.items.length;i++)if(h=this.items[i],!Z.hasClass(h,"disabled")){Z.addClass(h,"active"),this.navIndex=i;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(C),this.placeEl=Z.createElement("div",{class:"selectr-placeholder"}),this.setPlaceholder(),this.selected.appendChild(this.placeEl),this.disabled&&this.disable(),this.el.parentNode.insertBefore(this.container,this.el),this.container.appendChild(this.el)}).call(this),this.bindEvents(),this.update(),this.optsRect=Z.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),b=this,setTimeout(function(){b.emit("selectr.init")},20))},F.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},F.prototype.getSelectedProperties=function(B){var b=this.getSelected();return[].slice.call(b).map(function(C){return C[B]}).filter(function(C){return C!=null})},F.prototype.detectEventPassiveOption=function(){var B=!1;try{var b=Object.defineProperty({},"passive",{get:function(){B=!0}});window.addEventListener("test",null,b)}catch{}return B},F.prototype.bindEvents=function(){var B,b=this;this.events={},this.events.dismiss=(function(C){C=C.target,this.container.contains(C)||!this.opened&&!Z.hasClass(this.container,"notice")||this.close()}).bind(this),this.events.navigate=(function(C){if(C=C||window.event,this.items.length&&this.opened&&Z.includes([13,38,40],C.which)){if(C.preventDefault(),C.which===13)return!(this.noResults||this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var $,y=this.items[this.navIndex],f=this.navIndex;switch(C.which){case 38:($=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-($=1)&&this.navIndex++}for(this.navigating=!0;Z.hasClass(this.items[this.navIndex],"disabled")||Z.hasClass(this.items[this.navIndex],"excluded");){if(!(0<this.navIndex&&this.navIndex<this.items.length-1)){this.navIndex=f;break}if($?this.navIndex++:this.navIndex--,this.searching){if(this.navIndex>this.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndex<this.tree.firstElementChild.idx){this.navIndex=this.tree.firstElementChild.idx;break}}}C=Z.rect(this.items[this.navIndex]),$?(this.navIndex===0?this.tree.scrollTop=0:C.top+C.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(C.top+C.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&j.call(this)):this.navIndex===0?this.tree.scrollTop=0:C.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(C.top-this.optsRect.top)),y&&Z.removeClass(y,"active"),Z.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}).bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",function(C){C.changedTouches[0].target===b.el&&b.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(C){C.target===b.el&&b.toggle()}),this.el.addEventListener("change",function(C){C.__selfTriggered||(b.el.multiple?(C=b.getSelectedProperties("idx"),C=function($,y){for(var f,d=[],c=$.slice(0),h=0;h<y.length;h++)-1<(f=c.indexOf(y[h]))?c.splice(f,1):d.push(y[h]);return[d,c]}(b.selectedIndexes,C),Z.each(C[0],function($,y){b.select(y)},b),Z.each(C[1],function($,y){b.deselect(y)},b)):-1<b.el.selectedIndex&&b.select(b.el.selectedIndex))})),this.config.nativeDropdown&&this.container.addEventListener("keydown",function(C){C.key==="Enter"&&b.selected===document.activeElement&&(b.toggle(),setTimeout(function(){b.el.focus()},200))}),this.selected.addEventListener("click",function(C){b.disabled||b.toggle(),C.preventDefault()}),this.config.nativeKeyboard&&(B="",this.selected.addEventListener("keydown",function(C){var $;b.disabled||b.selected!==document.activeElement||C.altKey||C.ctrlKey||C.metaKey||(C.key===" "||!b.opened&&-1<["Enter","ArrowUp","ArrowDown"].indexOf(C.key)?(b.toggle(),C.preventDefault(),C.stopPropagation()):C.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](C.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===C.key&&(b.config.multiple?(b.open(),b.config.searchable&&(b.input.value=C.key,b.input.focus(),b.search(null,!0))):(B+=C.key,($=b.search(B,!0))&&$.length&&(b.clear(),b.setValue($[0].value)),setTimeout(function(){B=""},1e3)),C.preventDefault(),C.stopPropagation()))}),this.container.addEventListener("keyup",function(C){b.opened&&C.key==="Escape"&&(b.close(),C.stopPropagation(),b.selected.focus())})),this.label.addEventListener("click",function(C){Z.hasClass(C.target,"selectr-tag-remove")&&b.deselect(C.target.parentNode.idx)}),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",function(C){C.preventDefault()}),this.tree.addEventListener("click",function(C){var $=Z.closest(C.target,function(y){return y&&Z.hasClass(y,"selectr-option")});$&&!Z.hasClass($,"disabled")&&(Z.hasClass($,"selected")?(b.el.multiple||!b.el.multiple&&b.config.allowDeselect)&&b.deselect($.idx):b.select($.idx),b.opened&&!b.el.multiple)&&b.close(),C.preventDefault(),C.stopPropagation()}),this.tree.addEventListener("mouseover",function(C){!Z.hasClass(C.target,"selectr-option")||Z.hasClass(C.target,"disabled")||(Z.removeClass(b.items[b.navIndex],"active"),Z.addClass(C.target,"active"),b.navIndex=[].slice.call(b.items).indexOf(C.target))}),this.config.searchable&&(this.input.addEventListener("focus",function(C){b.searching=!0}),this.input.addEventListener("blur",function(C){b.searching=!1}),this.input.addEventListener("keyup",function(C){b.search(),b.config.taggable||(this.value.length?Z.addClass(this.parentNode,"active"):Z.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(C){b.input.value=null,J.call(b),b.tree.childElementCount||H.call(b)})),this.config.taggable&&this.input.addEventListener("keyup",function(C){var $,y;b.search(),b.config.taggable&&this.value.length&&($=this.value.trim()).length&&(C.which===13||b.tagSeperatorsRegex.test($))&&(C=$.replace(b.tagSeperatorsRegex,""),(y=(C=(C=Z.escapeRegExp(C)).trim()).length?b.add({value:C,textContent:C,selected:!0},!0):y)?(b.close(),J.call(b)):(this.value="",b.setMessage(b.config.messages.tagDuplicate)))}),this.update=Z.debounce(function(){b.opened&&b.config.closeOnScroll&&b.close(),b.width&&(b.container.style.width=b.width),b.invert()},50),this.requiresPagination&&(this.paginateItems=Z.debounce(function(){j.call(this)},50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.on("selectr.destroy",function(){document.removeEventListener("click",this.events.dismiss),window.removeEventListener("keydown",this.events.navigate),window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update)}),this.el.form&&(this.el.form.addEventListener("reset",this.events.reset),this.on("selectr.destroy",function(){this.el.form.removeEventListener("reset",this.events.reset)}))},F.prototype.setSelected=function(B){var b;this.config.data||this.el.multiple||!this.el.options.length||(this.el.selectedIndex!==0||this.el.options[0].defaultSelected||this.config.defaultSelected||(this.el.selectedIndex=-1),this.selectedIndex=this.el.selectedIndex,-1<this.selectedIndex&&this.select(this.selectedIndex)),this.config.multiple&&this.originalType==="select-one"&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),Z.each(this.options,function(C,$){$.selected&&$.defaultSelected&&this.select($.idx)},this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data&&(!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&0<this.config.data.length&&this.select(0),b=0,Z.each(this.config.data,function(C,$){U($,"children")?Z.each($.children,function(y,f){f.hasOwnProperty("selected")&&f.selected===!0&&this.select(b),b++},this):($.hasOwnProperty("selected")&&$.selected===!0&&this.select(b),b++)},this))},F.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),this.originalType==="select-one"&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),Z.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},F.prototype.change=function(B){var b=this.items[B],C=this.options[B];C.disabled||(C.selected&&Z.hasClass(b,"selected")?this.deselect(B):this.select(B),this.opened&&!this.el.multiple&&this.close())},F.prototype.select=function(B){var b=this.items[B],C=[].slice.call(this.el.options),$=this.options[B];if(this.el.multiple){if(Z.includes(this.selectedIndexes,B))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage(this.config.messages.maxSelections.replace("{max}",this.config.maxSelections),!0),!1;this.selectedValues.push($.value),this.selectedIndexes.push(B),(function(f){var d,c=this,h=document.createDocumentFragment(),n=this.options[f.idx],o=this.data?this.data[f.idx]:n,i={class:"selectr-tag"},o=(this.customSelected?i.html=this.config.renderSelection(o):i.textContent=n.textContent,Z.createElement("li",i)),i=Z.createElement("button",{class:"selectr-tag-remove",type:"button"});o.appendChild(i),o.idx=f.idx,o.tag=n.value,this.tags.push(o),this.config.sortSelected?(i=this.tags.slice(),d=function(s,a){s.replace(/(\d+)|(\D+)/g,function(t,e,r){a.push([e||1/0,r||""])})},i.sort(function(s,a){var t,e,r=[],l=[];for(c.config.sortSelected===!0?(t=s.tag,e=a.tag):c.config.sortSelected==="text"&&(t=s.textContent,e=a.textContent),d(t,r),d(e,l);r.length&&l.length;){var g=r.shift(),p=l.shift(),g=g[0]-p[0]||g[1].localeCompare(p[1]);if(g)return g}return r.length-l.length}),Z.each(i,function(s,a){h.appendChild(a)}),this.label.innerHTML=""):h.appendChild(o),this.config.taggable?this.label.insertBefore(h,this.input.parentNode):this.label.appendChild(h)}).call(this,b)}else{var y=this.data?this.data[B]:$;this.customSelected?this.label.innerHTML=this.config.renderSelection(y):this.label.textContent=$.textContent,this.selectedValue=$.value,this.selectedIndex=B,Z.each(this.options,function(f,d){var c=this.items[f];f!==B&&(c&&Z.removeClass(c,"selected"),d.selected=!1,d.removeAttribute("selected"))},this)}Z.includes(C,$)||this.el.add($),b.setAttribute("aria-selected",!0),Z.addClass(b,"selected"),Z.addClass(this.container,"has-selected"),$.selected=!0,$.setAttribute("selected",""),this.emit("selectr.change",$),this.emit("selectr.select",$),"createEvent"in document?((y=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),y.__selfTriggered=!0,this.el.dispatchEvent(y)):this.el.fireEvent("onchange")},F.prototype.deselect=function(B,b){var C=this.items[B],$=this.options[B];if(this.el.multiple){var y=this.selectedIndexes.indexOf(B),y=(this.selectedIndexes.splice(y,1),this.selectedValues.indexOf($.value));this.selectedValues.splice(y,1),(function(f){var d=!1;Z.each(this.tags,function(c,h){h.idx===f.idx&&(d=h)},this),d&&(this.label.removeChild(d),this.tags.splice(this.tags.indexOf(d),1))}).call(this,C),this.tags.length||Z.removeClass(this.container,"has-selected")}else{if(!b&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,Z.removeClass(this.container,"has-selected")}this.items[B].setAttribute("aria-selected",!1),Z.removeClass(this.items[B],"selected"),$.selected=!1,$.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",$),"createEvent"in document?((y=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),y.__selfTriggered=!0,this.el.dispatchEvent(y)):this.el.fireEvent("onchange")},F.prototype.setValue=function(B){var b=Array.isArray(B);if(b||(B=B.toString().trim()),!this.el.multiple&&b)return!1;Z.each(this.options,function(C,$){(b&&-1<B.indexOf($.value)||$.value===B)&&this.change($.idx)},this)},F.prototype.getValue=function(B,b){var C,$;return this.el.multiple?B?this.selectedIndexes.length&&($={values:[]},Z.each(this.selectedIndexes,function(y,f){f=this.options[f],$.values[y]={value:f.value,text:f.textContent}},this)):$=this.selectedValues.slice():$=B?{value:(C=this.options[this.selectedIndex]).value,text:C.textContent}:this.selectedValue,$=B&&b?JSON.stringify($):$},F.prototype.add=function(B,b){if(B){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(B))Z.each(B,function(y,f){this.add(f,b)},this);else if(Object.prototype.toString.call(B)==="[object Object]"){if(b){var C=!1;if(Z.each(this.options,function(y,f){f.value.toLowerCase()===B.value.toLowerCase()&&(C=!0)}),C)return!1}var $=Z.createElement("option",B);return this.data.push(B),this.mobileDevice&&this.el.add($),this.options.push($),$.idx=0<this.options.length?this.options.length-1:0,X.call(this,$),B.selected&&this.select($.idx),this.setPlaceholder(),$}return this.config.pagination&&this.paginate(),!0}},F.prototype.remove=function(B){var b,C=[];Array.isArray(B)?Z.each(B,function($,y){Z.isInt(y)?C.push(this.getOptionByIndex(y)):typeof y=="string"&&C.push(this.getOptionByValue(y))},this):Z.isInt(B)?C.push(this.getOptionByIndex(B)):typeof B=="string"&&C.push(this.getOptionByValue(B)),C.length&&(Z.each(C,function($,y){b=y.idx,this.el.remove(y),this.options.splice(b,1),y=this.items[b].parentNode,y&&y.removeChild(this.items[b]),this.items.splice(b,1),Z.each(this.options,function(f,d){d.idx=f,this.items[f].idx=f},this)},this),this.setPlaceholder(),this.config.pagination)&&this.paginate()},F.prototype.removeAll=function(){this.clear(!0),Z.each(this.el.options,function(B,b){this.el.remove(b)},this),Z.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},F.prototype.search=function(B,b){var C,$,y,f,d;if(!this.navigating)return C=!1,B||(B=this.input.value,C=!0,this.removeMessage(),Z.truncate(this.tree)),$=[],y=document.createDocumentFragment(),0<(B=B.trim().toLowerCase()).length?(f=b?Z.startsWith:Z.includes,Z.each(this.options,function(c,h){var n,o,i,s,a=this.items[h.idx];f(h.textContent.trim().toLowerCase(),B)&&!h.disabled?($.push({text:h.textContent,value:h.value}),C&&(x(a,y,this.customOption),Z.removeClass(a,"excluded"),!this.customOption)&&(n=B,i=(h=h).textContent,n=new RegExp(n,"ig"),s=n.exec(i))&&(h.innerHTML="",(o=document.createElement("span")).classList.add("selectr-match"),o.textContent=s[0],h.appendChild(document.createTextNode(i.substring(0,s.index))),h.appendChild(o),h.appendChild(document.createTextNode(i.substring(n.lastIndex))))):C&&Z.addClass(a,"excluded")},this),C&&(y.childElementCount?(b=this.items[this.navIndex],d=y.querySelector(".selectr-option:not(.excluded)"),this.noResults=!1,Z.removeClass(b,"active"),this.navIndex=d.idx,Z.addClass(d,"active")):this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults)),this.tree.appendChild(y))):H.call(this),$},F.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},F.prototype.open=function(){var B=this;if(!this.options.length)return!1;this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(Z.addClass(this.container,"native-open"),this.config.data&&Z.each(this.options,function(b,C){this.el.add(C)},this)):(Z.addClass(this.container,"open"),H.call(this),this.invert(),this.tree.scrollTop=0,Z.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),this.config.searchable&&!this.config.taggable&&setTimeout(function(){B.input.focus(),B.input.tabIndex=0},10))},F.prototype.close=function(){var B;this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown?Z.removeClass(this.container,"native-open"):(B=Z.hasClass(this.container,"notice"),this.config.searchable&&!B&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),B&&(Z.removeClass(this.container,"notice"),this.notice.textContent=""),Z.removeClass(this.container,"open"),Z.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),Z.truncate(this.tree),J.call(this))},F.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&Z.each(this.tags,function(B,b){b.lastElementChild.tabIndex=0}),Z.removeClass(this.container,"selectr-disabled")},F.prototype.disable=function(B){B||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&Z.each(this.tags,function(b,C){C.lastElementChild.tabIndex=-1}),this.disabled=!0,Z.addClass(this.container,"selectr-disabled")},F.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),Z.each(this.defaultSelected,function(B,b){this.select(b)},this),this.emit("selectr.reset"))},F.prototype.clear=function(B,b){var C;this.el.multiple?this.selectedIndexes.length&&(C=this.selectedIndexes.slice(),b?this.deselect(C.slice(-1)[0]):Z.each(C,function($,y){this.deselect(y)},this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,B),this.emit("selectr.clear")},F.prototype.serialise=function(B){var b=[];return Z.each(this.options,function(C,$){var y={value:$.value,text:$.textContent};$.selected&&(y.selected=!0),$.disabled&&(y.disabled=!0),b[C]=y}),B?JSON.stringify(b):b},F.prototype.serialize=function(B){return this.serialise(B)},F.prototype.setPlaceholder=function(B){B=B||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(B=this.config.messages.noOptions),this.placeEl.innerHTML=B},F.prototype.paginate=function(){var B;if(this.items.length)return(B=this).pages=this.items.map(function(b,C){return C%B.config.pagination==0?B.items.slice(C,C+B.config.pagination):null}).filter(function(b){return b}),this.pages},F.prototype.setMessage=function(B,b){b&&this.close(),Z.addClass(this.container,"notice"),this.notice.textContent=B},F.prototype.removeMessage=function(){Z.removeClass(this.container,"notice"),this.notice.innerHTML=""},F.prototype.invert=function(){var B=Z.rect(this.selected),b=this.tree.parentNode.offsetHeight,C=window.innerHeight;B.top+B.height+b>C?(Z.addClass(this.container,"inverted"),this.isInverted=!0):(Z.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=Z.rect(this.tree)},F.prototype.getOptionByIndex=function(B){return this.options[B]},F.prototype.getOptionByValue=function(B){for(var b=!1,C=0,$=this.options.length;C<$;C++)if(this.options[C].value.trim()===B.toString().trim()){b=this.options[C];break}return b},le.exports=F},660:function(le,m,Z){Z.d(m,{Oq:function(){return x},SC:function(){return X},ai:function(){return U},hJ:function(){return H}});var U=document.body,x=10485760,H=2e4,X=2147483648},1925:function(le,m,Z){Z.d(m,{p:function(){return x}});var U=Z(6237);function x(H,X,j){var J,F=3<arguments.length&&arguments[3]!==void 0&&arguments[3],B=typeof(C=H).getRootNode=="function"?C.getRootNode():window,b={},C=H.getBoundingClientRect(),$=X.getBoundingClientRect(),y=document.createElement("div");function f(){if(y&&y.parentNode){for(var c in y.parentNode.removeChild(y),b)h=c,Object.prototype.hasOwnProperty.call(b,h)&&((h=b[c])&&(0,U.removeEventListener)(B,c,h),delete b[c]);typeof j=="function"&&j(H)}var h}function d(c){(c=c.target)===y||(0,U.isChildOf)(c,y)||f()}return y.className="jsoneditor-anchor",y.style.position="absolute",y.style.left=C.left-$.left+"px",y.style.top=C.top-$.top+"px",y.style.width=C.width-2+"px",y.style.height=C.height-2+"px",y.style.boxSizing="border-box",X.appendChild(y),b.mousedown=(0,U.addEventListener)(B,"mousedown",d),b.mousewheel=(0,U.addEventListener)(B,"mousewheel",d),F&&(J=null,y.onmouseover=function(){clearTimeout(J),J=null},y.onmouseout=function(){J=J||setTimeout(f,200)}),y.destroy=f,y}},5477:function(le){le.exports="data:application/javascript;base64,[encoded data, 69952 characters]"},3057:function(le,m,Z){Z.d(m,{AI:function(){return F},Tl:function(){return B},xC:function(){return J}}),Z(1081);var U={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:`Click to expand/collapse this field (Ctrl+E). 
Ctrl+Click to expand/collapse including all childs.`,formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' después de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregará",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el menú de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + Mayús + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:`Haga clic para expandir/contraer este campo (Ctrl + E). 
  Ctrl+Clic para expandir/contraer incluyendo todos los niños.`,formatTitle:"Formatee los datos JSON, con la sangría y los avances de línea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+Mayús+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notación JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de búsqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar más",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dirección:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la última acción (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de sí mismo.",autoType:'Tipo de campo "auto". El tipo de campo se determina automáticamente a partir del valor y puede ser una cadena, un número, un booleano o un valor nulo.',objectType:'Tipo de campo "objeto".  Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz".  Una matriz contiene una colección ordenada de valores.',stringType:'Tipo de campo "cadena".  El tipo de campo no se determina a partir del valor,  pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Código",modeCodeTitle:"Cambiar al resaltador de código",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Árbol",modeTreeTitle:"Cambiar al editor de árbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de árbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no válidas",containsInvalidItems:"Contiene ítems no válidos"},"zh-CN":{array:"数组",auto:"自动",appendText:"追加",appendTitle:"在此字段后追加一个类型为“auto”的新字段 (Ctrl+Shift+Ins)",appendSubmenuTitle:"选择要追加的字段类型",appendTitleAuto:"追加类型为“auto”的新字段 (Ctrl+Shift+Ins)",ascending:"升序",ascendingTitle:"升序排列${type}的子节点",actionsMenu:"点击打开动作菜单(Ctrl+M)",cannotParseFieldError:"无法将字段解析为JSON",cannotParseValueError:"无法将值解析为JSON",collapseAll:"缩进所有字段",compactTitle:"压缩JSON数据，删除所有空格 (Ctrl+Shift+I)",descending:"降序",descendingTitle:"降序排列${type}的子节点",drag:"拖拽移动该节点(Alt+Shift+Arrows)",duplicateKey:"重复键",duplicateText:"复制",duplicateTitle:"复制选中字段(Ctrl+D)",duplicateField:"复制该字段(Ctrl+D)",duplicateFieldError:"重复的字段名称",empty:"清空",expandAll:"展开所有字段",expandTitle:`点击 展开/收缩 该字段(Ctrl+E). 
Ctrl+Click 展开/收缩 包含所有子节点.`,formatTitle:"使用适当的缩进和换行符格式化JSON数据 (Ctrl+I)",insert:"插入",insertTitle:"在此字段前插入类型为“auto”的新字段 (Ctrl+Ins)",insertSub:"选择要插入的字段类型",object:"对象",ok:"Ok",redo:"重做 (Ctrl+Shift+Z)",removeText:"移除",removeTitle:"移除选中字段 (Ctrl+Del)",removeField:"移除该字段 (Ctrl+Del)",repairTitle:"修复JSON：修复引号和转义符，删除注释和JSONP表示法，将JavaScript对象转换为JSON。",selectNode:"选择一个节点...",showAll:"展示全部",showMore:"展示更多",showMoreStatus:"显示${totalChilds}的${visibleChilds}项目.",sort:"排序",sortTitle:"排序${type}的子节点",sortTitleShort:"内容排序",sortFieldLabel:"字段：",sortDirectionLabel:"方向：",sortFieldTitle:"选择用于对数组或对象排序的嵌套字段",sortAscending:"升序排序",sortAscendingTitle:"按照该字段升序排序",sortDescending:"降序排序",sortDescendingTitle:"按照该字段降序排序",string:"字符串",transform:"变换",transformTitle:"筛选，排序，或者转换${type}的子节点",transformTitleShort:"筛选，排序，或者转换内容",extract:"提取",extractTitle:"提取这个 ${type}",transformQueryTitle:"输入JMESPath查询",transformWizardLabel:"向导",transformWizardFilter:"筛选",transformWizardSortBy:"排序",transformWizardSelectFields:"选择字段",transformQueryLabel:"查询",transformPreviewLabel:"预览",type:"类型",typeTitle:"更改字段类型",openUrl:"Ctrl+Click 或者 Ctrl+Enter 在新窗口打开链接",undo:"撤销上次动作 (Ctrl+Z)",validationCannotMove:"无法将字段移入其子节点",autoType:'字段类型 "auto". 字段类型由值自动确定 可以为 string，number，boolean，或者 null.',objectType:'字段类型 "object". 对象包含一组无序的键/值对.',arrayType:'字段类型 "array". 数组包含值的有序集合.',stringType:'字段类型 "string". 字段类型由值自动确定，但始终作为字符串返回.',modeCodeText:"代码",modeCodeTitle:"切换至代码高亮",modeFormText:"表单",modeFormTitle:"切换至表单编辑",modeTextText:"文本",modeTextTitle:"切换至文本编辑",modeTreeText:"树",modeTreeTitle:"切换至树编辑",modeViewText:"视图",modeViewTitle:"切换至树视图",modePreviewText:"预览",modePreviewTitle:"切换至预览模式",examples:"例子",default:"缺省",containsInvalidProperties:"包含无效的属性",containsInvalidItems:"包含无效项目"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de ações (Ctrl+M)",cannotParseFieldError:"Não é possível analisar o campo no JSON",cannotParseValueError:"Não é possível analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espaços em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:`Clique para expandir/encolher este campo (Ctrl+E). 
Ctrl+Click para expandir/encolher incluindo todos os filhos.`,formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova comentários e notação JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um nódulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direção:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conteúdos",transformQueryTitle:"Insira uma expressão JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Expressão",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer último ação (Ctrl+Z)",validationCannotMove:"Não pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo é determinao automaticamente a partir do seu valor e pode ser texto, número, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto contém uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma coleção de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao é determinado através do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Contém propriedades inválidas",containsInvalidItems:"Contém itens inválidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alanın altına 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alanın tipini seç",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'ın alt tiplerini artan düzende sırala",actionsMenu:"Aksiyon menüsünü açmak için tıklayın (Ctrl+M)",collapseAll:"Tüm alanları kapat",descending:"Azalan",descendingTitle:"${type}'ın alt tiplerini azalan düzende sırala",drag:"Bu alanı taşımak için sürükleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"Aşağıya kopyala",duplicateTitle:"Seçili alanlardan bir daha oluştur (Ctrl+D)",duplicateField:"Bu alandan bir daha oluştur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayrıştırılamıyor",cannotParseValueError:"JSON'a değer ayrıştırılamıyor",empty:"boş",expandAll:"Tüm alanları aç",expandTitle:`Bu alanı açmak/kapatmak için tıkla (Ctrl+E). 
Alt alanlarda dahil tüm alanları açmak için Ctrl+Click `,insert:"Ekle",insertTitle:"Bu alanın üstüne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alanın tipini seç",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kaldır",removeTitle:"Seçilen alanları kaldır (Ctrl+Del)",removeField:"Bu alanı kaldır (Ctrl+Del)",selectNode:"Bir nesne seç...",showAll:"tümünü göster",showMore:"daha fazla göster",showMoreStatus:"${totalChilds} alanın ${visibleChilds} alt alanları gösteriliyor",sort:"Sırala",sortTitle:"${type}'ın alt alanlarını sırala",sortTitleShort:"İçerikleri sırala",sortFieldLabel:"Alan:",sortDirectionLabel:"Yön:",sortFieldTitle:"Diziyi veya nesneyi sıralamak için iç içe geçmiş alanı seçin",sortAscending:"Artan",sortAscendingTitle:"Seçili alanı artan düzende sırala",sortDescending:"Azalan",sortDescendingTitle:"Seçili alanı azalan düzende sırala",string:"Karakter Dizisi",transform:"Dönüştür",transformTitle:"${type}'ın alt alanlarını filtrele, sırala veya dönüştür",transformTitleShort:"İçerikleri filterele, sırala veya dönüştür",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"Sırala",transformWizardSelectFields:"Alanları seç",transformQueryLabel:"Sorgu",transformPreviewLabel:"Önizleme",type:"Tip",typeTitle:"Bu alanın tipini değiştir",openUrl:"URL'i yeni bir pencerede açmak için Ctrl+Click veya Ctrl+Enter",undo:"Son değişikliği geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak taşınamıyor",autoType:'Alan tipi "otomatik". Alan türü otomatik olarak değerden belirlenirve bir dize, sayı, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, sıralanmamış bir anahtar / değer çifti kümesi içerir.',arrayType:'Alan tipi "dizi". Bir dizi, düzenli değerler koleksiyonu içerir.',stringType:'Alan tipi "karakter dizisi". Alan türü değerden belirlenmez,ancak her zaman karakter dizisi olarak döndürülür.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulayıcıya geç",modeFormText:"Form",modeFormTitle:"Form düzenleyiciye geç",modeTextText:"Metin",modeTextTitle:"Düz metin düzenleyiciye geç",modeTreeText:"Ağaç",modeTreeTitle:"Ağaç düzenleyiciye geç",modeViewText:"Görünüm",modeViewTitle:"Ağaç görünümüne geç",examples:"Örnekler",default:"Varsayılan",containsInvalidProperties:"Geçersiz özellikler içeriyor",containsInvalidItems:"Geçersiz öğeler içeriyor"},ja:{array:"配列",auto:"オート",appendText:"追加",appendTitle:'次のフィールドに"オート"のフィールドを追加 (Ctrl+Shift+Ins)',appendSubmenuTitle:"追加するフィールドの型を選択してください",appendTitleAuto:'"オート"のフィールドを追加 (Ctrl+Shift+Ins)',ascending:"昇順",ascendingTitle:"${type}の子要素を昇順に並べ替え",actionsMenu:"クリックしてアクションメニューを開く (Ctrl+M)",collapseAll:"すべてを折りたたむ",descending:"降順",descendingTitle:"${type}の子要素を降順に並べ替え",drag:"ドラッグして選択中のフィールドを移動 (Alt+Shift+Arrows)",duplicateKey:"複製キー",duplicateText:"複製",duplicateTitle:"選択中のフィールドを複製 (Ctrl+D)",duplicateField:"選択中のフィールドを複製 (Ctrl+D)",duplicateFieldError:"フィールド名が重複しています",cannotParseFieldError:"JSONのフィールドを解析できません",cannotParseValueError:"JSONの値を解析できません",empty:"空",expandAll:"すべてを展開",expandTitle:`クリックしてフィールドを展開/折りたたむ (Ctrl+E). 
Ctrl+Click ですべての子要素を展開/折りたたむ`,insert:"挿入",insertTitle:"選択中のフィールドの前に新しいフィールドを挿入 (Ctrl+Ins)",insertSub:"挿入するフィールドの型を選択",object:"オブジェクト",ok:"実行",redo:"やり直す (Ctrl+Shift+Z)",removeText:"削除",removeTitle:"選択中のフィールドを削除 (Ctrl+Del)",removeField:"選択中のフィールドを削除 (Ctrl+Del)",selectNode:"ノードを選択...",showAll:"すべてを表示",showMore:"もっと見る",showMoreStatus:"${totalChilds}個のアイテムのうち ${visibleChilds}個を表示しています。",sort:"並べ替え",sortTitle:"${type}の子要素を並べ替え",sortTitleShort:"並べ替え",sortFieldLabel:"フィールド:",sortDirectionLabel:"順序:",sortFieldTitle:"配列またはオブジェクトを並び替えるためのフィールドを選択",sortAscending:"昇順",sortAscendingTitle:"選択中のフィールドを昇順に並び替え",sortDescending:"降順",sortDescendingTitle:"選択中のフィールドを降順に並び替え",string:"文字列",transform:"変換",transformTitle:"${type}の子要素をフィルター・並び替え・変換する",transformTitleShort:"内容をフィルター・並び替え・変換する",extract:"抽出",extractTitle:"${type}を抽出",transformQueryTitle:"JMESPathクエリを入力",transformWizardLabel:"ウィザード",transformWizardFilter:"フィルター",transformWizardSortBy:"並び替え",transformWizardSelectFields:"フィールドを選択",transformQueryLabel:"クエリ",transformPreviewLabel:"プレビュー",type:"型",typeTitle:"選択中のフィールドの型を変更",openUrl:"Ctrl+Click または Ctrl+Enter で 新規ウィンドウでURLを開く",undo:"元に戻す (Ctrl+Z)",validationCannotMove:"子要素に移動できません ",autoType:"オート： フィールドの型は値から自動的に決定されます。 (文字列・数値・ブール・null)",objectType:"オブジェクト： オブジェクトは順序が決まっていないキーと値のペア組み合わせです。",arrayType:"配列： 配列は順序が決まっている値の集合体です。",stringType:"文字列： フィールド型は値から決定されませんが、常に文字列として返されます。",modeCodeText:"コードモード",modeCodeTitle:"ハイライトモードに切り替え",modeFormText:"フォームモード",modeFormTitle:"フォームモードに切り替え",modeTextText:"テキストモード",modeTextTitle:"テキストモードに切り替え",modeTreeText:"ツリーモード",modeTreeTitle:"ツリーモードに切り替え",modeViewText:"ビューモード",modeViewTitle:"ビューモードに切り替え",modePreviewText:"プレビュー",modePreviewTitle:"プレビューに切り替え",examples:"例",default:"デフォルト",containsInvalidProperties:"無効なプロパティが含まれています",containsInvalidItems:"無効なアイテムが含まれています"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' après ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"Sélectionner le type du champ à ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"Déplacer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la clé",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs sélectionnés (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible à parser en JSON",cannotParseValueError:"Valeur impossible à parser en JSON",empty:"vide",expandAll:"Étendre",expandTitle:`Étendre/regrouper ce champ (Ctrl+E). 
Ctrl+Click pour étendre/regrouper avec tous les champs.`,insert:"Insérer",insertTitle:"Insérer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"Sélectionner le type de champ à insérer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs sélectionnés (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"Résultat suivant (Enter)",searchPreviousResultTitle:"Résultat précédent (Shift + Enter)",selectNode:"Sélectionner un nœud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} éléments affichés de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"Sélectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs sélectionnés par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs sélectionnés par ordre descendant",string:"Chaîne",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requête JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"Sélectionner les champs",transformQueryLabel:"Requête",transformPreviewLabel:"Prévisualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fenêtre",undo:"Annuler la dernière action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement déterminé en fonction de la valeur et peut être de type "chaîne", "nombre", "booléen" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonné de paires clé/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonnée de valeurs.',stringType:`Champ de type "chaîne". Ce type de champ n'est pas déterminé en fonction de la valeur, mais retourne systématiquement une chaîne de caractères.`,modeEditorTitle:"Changer mode d'édition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer éditeur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer éditeur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Prévisualisation",modePreviewTitle:"Activer mode prévisualiser",examples:"Exemples",default:"Défaut",containsInvalidProperties:"Contient des propriétés non valides",containsInvalidItems:"Contient des éléments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anhängen",appendTitle:"Fügen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"Wählen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzufügen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum Öffnen des Aktionsmenüs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schlüssel",duplicateText:"Duplikat",duplicateTitle:"Ausgewählte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:`Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E). 
Strg+Klicken Sie, um dieses Feld einschließlich aller Elemente zu erweitern/zu kollabieren.`,formatTitle:"JSON-Daten mit korrekter Einrückung und Zeilenvorschüben formatieren (Strg+\\)",insert:"einfügen",insertTitle:"Fügen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"Wählen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgewählte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anführungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"Nächstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"Wählen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"Wählen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgewählte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgewählte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder auswählen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie  ein.",typeTitle:"Ändern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu öffnen",undo:"Letzte Aktion rückgängig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enthält eine ungeordnete Menge von Schlüssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enthält eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zurückgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor für einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardmäßig",containsInvalidProperties:"Enthält ungültige Eigenschaften",containsInvalidItems:"Enthält ungültige Elemente"},ru:{array:"Массив",auto:"Авто",appendText:"Добавить",appendTitle:"Добавить новое поле с типом 'авто' после этого поля (Ctrl+Shift+Ins)",appendSubmenuTitle:"Выбрать тип поля для добавления",appendTitleAuto:"Добавить новое поле с типом 'авто' (Ctrl+Shift+Ins)",ascending:"По возрастанию",ascendingTitle:"Сортировать ${type} по возрастанию",actionsMenu:"Нажмите для открытия меню действий (Ctrl+M)",cannotParseFieldError:"Невозможно преобразовать поле в JSON",cannotParseValueError:"Невозможно преобразовать значение в JSON",collapseAll:"Свернуть все",compactTitle:"Минификация JSON (Ctrl+Shift+I)",descending:"По убыванию",descendingTitle:"Сортировать ${type} по убыванию",drag:"Потяните для перемещения этого поля (Alt+Shift+Arrows)",duplicateKey:"повторяющийся ключ",duplicateText:"Дублировать",duplicateTitle:"Дублирование полей (Ctrl+D)",duplicateField:"Дублировать поле (Ctrl+D)",duplicateFieldError:"Дублирование названия поля",empty:"пустой",expandAll:"Развернуть все",expandTitle:`Нажмите для раскрытия/скрытия поля (Ctrl+E)
или Ctrl+Click для раскрытия/скрытия всех потомков.`,formatTitle:"Форматирование JSON (Ctrl+I)",insert:"Вставить",insertTitle:"Вставить новое поле с типом 'авто' перед этим полем (Ctrl+Ins)",insertSub:"Выбрать тип поля для вставки",object:"Объект",ok:"ОК",redo:"Повторить (Ctrl+Shift+Z)",removeText:"Удалить",removeTitle:"Удалить выбранные поля (Ctrl+Del)",removeField:"Удалить поле (Ctrl+Del)",repairTitle:"Восстановите JSON: исправьте кавычки и escape-символы, удалите комментарии и нотацию JSONP, модифицируйте объекты JavaScript в JSON.",searchTitle:"Поиск",searchNextResultTitle:"Следующий результат (Enter)",searchPreviousResultTitle:"Предыдущий результат (Shift + Enter)",selectNode:"Выбор узла...",showAll:"показать все",showMore:"больше",showMoreStatus:"${visibleChilds} из ${totalChilds}",sort:"Сортировка",sortTitle:"Сортировка потомков типа ${type}",sortTitleShort:"Сортировка содержимого",sortFieldLabel:"Поле:",sortDirectionLabel:"Направление:",sortFieldTitle:"Выберите поле для сортировки массива или объекта",sortAscending:"По возрастанию",sortAscendingTitle:"Сортировка выбранного поря по возрастанию",sortDescending:"По убыванию",sortDescendingTitle:"Сортировка выбранного поря по убыванию",string:"Строка",transform:"Модификация",transformTitle:"Фильтрация, сортировка или модификация данных типа ${type}",transformTitleShort:"Фильтрация, сортировка или модификация данных",extract:"Извлечение",extractTitle:"Извлечь тип ${type}",transformQueryTitle:"Введите JMESpath запрос",transformWizardLabel:"Мастер",transformWizardFilter:"Фильтр",transformWizardSortBy:"Сортировка",transformWizardSelectFields:"Поля",transformQueryLabel:"Запрос",transformPreviewLabel:"Просмотр",type:"Тип",typeTitle:"Изменить тип этого поля",openUrl:"Ctrl+Click или Ctrl+Enter для открытия url в новом окне",undo:"Отменить (Ctrl+Z)",validationCannotMove:"Поле не может быть перемещено в потомка",autoType:"Тип поля автоматически определяется по значению и может быть строкой, числом, логическим значением или null.",objectType:"Объект содержит неупорядоченный набор пар ключ/значение.",arrayType:"Массив содержит упорядоченный набор значений.",stringType:"Тип поля не определяется из значения, но всегда возвращается как строка.",modeEditorTitle:"Переключение режима редактора",modeCodeText:"Код",modeCodeTitle:"Переключить в режим редактора кода",modeFormText:"Форма",modeFormTitle:"Переключить в режим формы",modeTextText:"Текст",modeTextTitle:"Переключить в режим редактора текста",modeTreeText:"Дерево",modeTreeTitle:"Переключить в режим редактора дерева",modeViewText:"Просмотр дерева",modeViewTitle:"Переключить в режим просмотра дерева",modePreviewText:"Просмотр",modePreviewTitle:"Переключить в режим просмотра",examples:"Примеры",default:"По умолчанию",containsInvalidProperties:"Содержит недопустимые свойства",containsInvalidItems:"Содержит недопустимые элементы"},ko:{array:"배열",auto:"자동",appendText:"추가",appendTitle:'선택한 요소 아래에 "자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',appendSubmenuTitle:"추가할 요소의 유형을 선택해주세요.",appendTitleAuto:'"자동" 요소를 추가합니다. (Ctrl + Shift + Ins)',ascending:"오름차순",ascendingTitle:"선택한 ${type}의 하위 요소를 오름차순 정렬합니다.",actionsMenu:"메뉴 열기 (Ctrl + M)",cannotParseFieldError:"JSON의 요소를 해석할 수 없습니다.",cannotParseValueError:"JSON의 값을 해석할 수 없습니다.",collapseAll:"모두 접기",compactTitle:"모든 공백을 제거하여 JSON 데이터를 작게 만듭니다. (Ctrl + Shift + I)",descending:"내림차순",descendingTitle:"선택한 ${type}의 하위 요소를 내림차순으로 정렬",drag:"드래그하여 요소를 이동합니다. (Alt + Shift + Arrows)",duplicateKey:"복제키",duplicateText:"복제",duplicateTitle:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateField:"선택한 요소를 복제합니다. (Ctrl + D)",duplicateFieldError:"요소 이름이 중복되었습니다.",empty:"비어있음",expandAll:"모두 열기",expandTitle:`클릭하여 요소를 열거나 닫습니다. (Ctrl + E) 
Ctrl + Click으로 모든 하위 요소를 열거나 닫습니다.`,formatTitle:"적절한 들여쓰기 및 줄바꿈으로 JSON 데이터를 정형화합니다. (Ctrl + I)",insert:"삽입",insertTitle:"선택한 요소 위에 새요소를 삽입합니다. (Ctrl + Ins)",insertSub:"삽입할 요소의 유형을 선택해주세요.",object:"객체",ok:"확인",redo:"다시 실행 (Ctrl + Shift + Z)",removeText:"삭제",removeTitle:"선택한 요소를 삭제합니다. (Ctrl + Del)",removeField:"선택한 요소를 삭제합니다. (Ctrl + Del)",repairTitle:"JSON 교정: JSON 내의 주석과 JSONP 표기법을 지우고 따옴표와 이스케이프 문자를 수정합니다.",searchTitle:"요소 또는 값 찾기",searchNextResultTitle:"다음으로 찾기 (Enter)",searchPreviousResultTitle:"이전으로 찾기 (Shift + Enter)",selectNode:"요소를 선택해주세요...",showAll:"모두보기",showMore:"더보기",showMoreStatus:"${totalChilds} 개의 항목 중 ${visibleChilds} 개를 표시합니다.",sort:"정렬",sortTitle:"선택한 ${type}의 하위 요소를 정렬합니다.",sortTitleShort:"정렬",sortFieldLabel:"요소:",sortDirectionLabel:"순서:",sortFieldTitle:"배열이나 객체를 정렬하는 요소를 선택해주세요.",sortAscending:"오름차순",sortAscendingTitle:"선택한 요소를 오름차순으로 정렬합니다.",sortDescending:"내림차순",sortDescendingTitle:"선택한 요소를 내림차순으로 정렬합니다.",string:"문자",transform:"변환",transformTitle:"선택한 ${type}의 하위 요소를 필터하거나 정렬 또는 변환합니다.",transformTitleShort:"내용을 필터하거나 정렬 또는 변환합니다.",extract:"추출",extractTitle:"선택한 ${type}의 값을 최상위에 위치시킵니다.",transformQueryTitle:"JMESPath 쿼리를 입력해주세요.",transformWizardLabel:"마법사",transformWizardFilter:"필터",transformWizardSortBy:"정렬",transformWizardSelectFields:"요소를 선택해주세요.",transformQueryLabel:"쿼리",transformPreviewLabel:"미리보기",type:"유형",typeTitle:"선택한 요소의 유형을 변경합니다.",openUrl:"Ctrl + Click 또는 Ctrl + Enter로 새 창에서 URL 열기",undo:"실행 취소 (Ctrl + Z)",validationCannotMove:"하위 요소로 이동할 수 없습니다.",autoType:"자동: 요소의 형식이 값의 유형으로 결정됩니다. 문자, 숫자, 부울, 또는 null만 허용됩니다.",objectType:"객체: 순서대로 나열되지 않은 이름/값 쌍으로 이루어진 집합입니다.",arrayType:"배열: 순서대로 나열된 값의 집합입니다.",stringType:"문자: 요소의 유형이 값에서 결정되지 않지만 항상 문자로 반환됩니다.",modeEditorTitle:"편집기 유형 변경",modeCodeText:"코드",modeCodeTitle:"형식 교정을 도와주는 기능이 포함된 문자 편집기",modeFormText:"입력 양식",modeFormTitle:"정해진 요소에 값을 입력하는 편집기",modeTextText:"문자",modeTextTitle:"단순 문자 편집기",modeTreeText:"트리",modeTreeTitle:"트리 구조로 표시되는 편집기",modeViewText:"보기",modeViewTitle:"읽기전용 트리 구조로 JSON을 표시",modePreviewText:"미리보기",modePreviewTitle:"읽기전용 문자로 JSON을 표시",examples:"예제",default:"기본값",containsInvalidProperties:"잘못된 속성이 포함되어 있습니다.",containsInvalidItems:"잘못된 항목이 포함되어 있습니다"}},x=Object.keys(U),H="en",X=typeof navigator<"u"?navigator.language||navigator.userLanguage:void 0,j=x.find(function(b){return b===X})||H;function J(b){var C;b&&((C=x.find(function($){return $===b}))?j=C:console.error("Language not found"))}function F(b){if(b)for(var C in b)(function($){x.find(function(y){return y===$})||x.push($),U[$]=Object.assign({},U[H],U[$],b[$])})(C)}function B(b,C,$){var y=U[$=$||j][b]||U[H][b]||b;if(C)for(var f in C)y=y.replace("${"+f+"}",C[f]);return y}},359:function(le,U,Z){Z.d(U,{V:function(){return X},e:function(){return j}});var U=Z(9151),x=Z.n(U),H=Z(6237);function X(J,$){var B,b=$.sort,C=$.filter,$=$.projection,y="";return C?(B=C.field!=="@"?["0"].concat((0,H.parsePath)("."+C.field)):["0"],B=typeof(0,H.get)(J,B)=="string"?C.value:(0,H.parseString)(C.value),y+="[? "+C.field+" "+C.relation+" `"+JSON.stringify(B)+"`]"):y+=Array.isArray(J)?"[*]":"@",b&&(b.direction==="desc"?y+=" | reverse(sort_by(@, &"+b.field+"))":y+=" | sort_by(@, &"+b.field+")"),$&&(y[y.length-1]!=="]"&&(y+=" | [*]"),$.fields.length===1?y+="."+$.fields[0]:1<$.fields.length&&(y+=".{"+$.fields.map(function(f){var d=f.split(".");return d[d.length-1]+": "+f}).join(", ")+"}")),y}function j(J,F){return x().search(J,F)}},1081:function(){function le(m){m===void 0||"remove"in m||Object.defineProperty(m,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode!==void 0&&this.parentNode.removeChild(this)}})}typeof Element<"u"&&(window.Element!==void 0&&le(window.Element.prototype),window.CharacterData!==void 0&&le(window.CharacterData.prototype),window.DocumentType!==void 0)&&le(window.DocumentType.prototype),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(m){for(var Z=0;Z<this.length;Z++){var U=this[Z];if(m.call(this,U,Z,this))return Z}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(m){return m=this.findIndex(m),this[m]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},7483:function(le,c,d){d.r(c),d.d(c,{previewModeMixins:function(){return h}});var U=d(9857),x=d(660),H=d(2115),X=d(2877);function j(n){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(n)}function J(n,o){for(var i=0;i<o.length;i++){var s=o[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,function(a){return a=function(t,e){if(j(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r===void 0)return(e==="string"?String:Number)(t);if(r=r.call(t,e||"default"),j(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(a,"string"),j(a)=="symbol"?a:a+""}(s.key),s)}}var F=function(){function n(a,t,e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.onChange=a,this.calculateItemSize=t||function(){return 1},this.limit=e,this.items=[],this.index=-1}return o=n,(i=[{key:"add",value:function(a){for(;this._calculateHistorySize()>this.limit&&1<this.items.length;)this.items.shift(),this.index--;this.items=this.items.slice(0,this.index+1),this.items.push(a),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var a=this.calculateItemSize,t=0;return this.items.forEach(function(e){t+=a(e)}),t}},{key:"undo",value:function(){if(this.canUndo())return this.index--,this.onChange(),this.items[this.index]}},{key:"redo",value:function(){if(this.canRedo())return this.index++,this.onChange(),this.items[this.index]}},{key:"canUndo",value:function(){return 0<this.index}},{key:"canRedo",value:function(){return this.index<this.items.length-1}},{key:"clear",value:function(){this.items=[],this.index=-1,this.onChange()}}])&&J(o.prototype,i),s&&J(o,s),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,s}(),B=d(3057),b=d(359),C=d(1389),$=d(2915),y=d(5609),c=d(1948),f=d(6237),d=c.textModeMixins[0].mixin,c={create:function(s){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},i=(o.statusBar===void 0&&(o.statusBar=!0),o.mainMenuBar=o.mainMenuBar!==!1,o.enableSort=o.enableSort!==!1,o.enableTransform=o.enableTransform!==!1,o.createQuery=o.createQuery||b.V,o.executeQuery=o.executeQuery||b.e,typeof(this.options=o).indentation=="number"?this.indentation=Number(o.indentation):this.indentation=2,(0,B.AI)(this.options.languages),(0,B.xC)(this.options.language),this.mode="preview",this),s=(this.container=s,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,f.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=s.clientWidth,this.height=s.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(a){a.preventDefault()},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),s=(this.frameFocusTracker=new X.$(s),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.dom.busy=document.createElement("div"),this.dom.busy.className="jsoneditor-busy",this.dom.busyContent=document.createElement("span"),this.dom.busyContent.textContent="busy...",this.dom.busy.appendChild(this.dom.busyContent),this.content.appendChild(this.dom.busy),this.dom.previewContent=document.createElement("pre"),this.dom.previewContent.className="jsoneditor-preview",this.dom.previewText=document.createTextNode(""),this.dom.previewContent.appendChild(this.dom.previewText),this.content.appendChild(this.dom.previewContent),this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(s=document.createElement("button")).type="button",s.className="jsoneditor-format",s.title=(0,B.Tl)("formatTitle"),this.menu.appendChild(s),s.onclick=function(){i.executeWithBusyMessage(function(){try{i.format()}catch(a){i._onError(a)}},"formatting...")},(s=document.createElement("button")).type="button",s.className="jsoneditor-compact",s.title=(0,B.Tl)("compactTitle"),this.menu.appendChild(s),s.onclick=function(){i.executeWithBusyMessage(function(){try{i.compact()}catch(a){i._onError(a)}},"compacting...")},this.options.enableSort&&((s=document.createElement("button")).type="button",s.className="jsoneditor-sort",s.title=(0,B.Tl)("sortTitleShort"),s.onclick=function(){i._showSortModal()},this.menu.appendChild(s)),this.options.enableTransform&&((s=document.createElement("button")).type="button",s.title=(0,B.Tl)("transformTitleShort"),s.className="jsoneditor-transform",s.onclick=function(){i._showTransformModal()},this.dom.transform=s,this.menu.appendChild(s)),(s=document.createElement("button")).type="button",s.className="jsoneditor-repair",s.title=(0,B.Tl)("repairTitle"),this.menu.appendChild(s),!(s.onclick=function(){i.json===void 0&&i.executeWithBusyMessage(function(){try{i.repair()}catch(a){i._onError(a)}},"repairing...")})!==this.options.history&&(this.history=new F(function(){i.dom.undo.disabled=!i.history.canUndo(),i.dom.redo.disabled=!i.history.canRedo()},function(a){return 2*a.text.length},x.SC),(s=document.createElement("button")).type="button",s.className="jsoneditor-undo jsoneditor-separator",s.title=(0,B.Tl)("undo"),s.onclick=function(){var a=i.history.undo();a&&i._applyHistory(a)},this.menu.appendChild(s),this.dom.undo=s,(s=document.createElement("button")).type="button",s.className="jsoneditor-redo",s.title=(0,B.Tl)("redo"),s.onclick=function(){var a=i.history.redo();a&&i._applyHistory(a)},this.menu.appendChild(s),this.dom.redo=s,this.history.onChange()),this.options)&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new C.n(this.menu,this.options.modes,this.options.mode,function(a){try{i.setMode(a),i.modeSwitcher.focus()}catch(t){i._onError(t)}})),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new H.N({errorTableVisible:s,onToggleVisibility:function(){i.validate()},onFocusLine:null,onChangeHeight:function(a){a=a+(i.dom.statusBar?i.dom.statusBar.clientHeight:0)+1,i.content.style.marginBottom=-a+"px",i.content.style.paddingBottom=a+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),o.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),s=document.createElement("div"),(this.dom.statusBar=s).className="jsoneditor-statusbar",this.frame.appendChild(s),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",s.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",s.appendChild(this.dom.arrayInfo),s.appendChild(this.errorTable.getErrorCounter()),s.appendChild(this.errorTable.getWarningIcon()),s.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var n=this.getText();this.dom.previewText.nodeValue=(0,f.limitCharacters)(n,x.hJ),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,f.formatSize)(n.length)),this.dom.arrayInfo&&(Array.isArray(this.json)?this.dom.arrayInfo.innerText="Array: "+this.json.length+" items":this.dom.arrayInfo.innerText="")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(n){console.error("Error in onChange callback: ",n)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(n){console.error("Error in onChangeJSON callback: ",n)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(n){console.error("Error in onChangeText callback: ",n)}}},h=(c._showSortModal=function(){var n=this;this.executeWithBusyMessage(function(){var o=n.options.modalAnchor||x.ai,i=n.get();n._renderPreview(),(0,$.showSortModal)(o,i,function(s){n.executeWithBusyMessage(function(){var a,t,e;a=i,t=s,Array.isArray(a)&&(e=(0,f.sort)(a,t.path,t.direction),n.sortedBy=t,n._setAndFireOnChange(e)),(0,f.isObject)(a)&&(e=(0,f.sortObjectKeys)(a,t.direction),n.sortedBy=t,n._setAndFireOnChange(e))},"sorting...")},n.sortedBy)},"parsing...")},c._showTransformModal=function(){var n=this;this.executeWithBusyMessage(function(){var a=n.options,o=a.createQuery,i=a.executeQuery,s=a.modalAnchor,a=a.queryDescription,t=n.get();n._renderPreview(),(0,y.showTransformModal)({container:s||x.ai,json:t,queryDescription:a,createQuery:o,executeQuery:i,onTransform:function(e){n.executeWithBusyMessage(function(){var r=i(t,e);n._setAndFireOnChange(r)},"transforming...")}})},"parsing...")},c.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this._debouncedValidate=null,this.history&&(this.history.clear(),this.history=null),this.frameFocusTracker.destroy()},c.compact=function(){var n=this.get(),o=JSON.stringify(n);this._setTextAndFireOnChange(o,n)},c.format=function(){var n=this.get(),o=JSON.stringify(n,null,this.indentation);this._setTextAndFireOnChange(o,n)},c.repair=function(){var n=this.getText();try{var o=(0,U.m)(n);this._setTextAndFireOnChange(o)}catch{}},c.focus=function(){this.dom.transform.focus()},c.set=function(n){this.history&&this.history.clear(),this._set(n)},c.update=function(n){this._set(n)},c._set=function(n){this.text=void 0,this.json=n,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},c._setAndFireOnChange=function(n){this._set(n),this._onChange()},c.get=function(){var n;return this.json===void 0&&(n=this.getText(),this.json=(0,f.parse)(n)),this.json},c.getText=function(){return this.text===void 0&&(this.text=JSON.stringify(this.json,null,this.indentation),this.options.escapeUnicode===!0)&&(this.text=(0,f.escapeUnicodeChars)(this.text)),this.text},c.setText=function(n){this.history&&this.history.clear(),this._setText(n)},c.updateText=function(n){this.getText()!==n&&this._setText(n)},c._setText=function(n,o){var i;this.options.escapeUnicode===!0?this.text=(0,f.escapeUnicodeChars)(n):this.text=n,this.json=o,this._renderPreview(),this.json===void 0?(i=this).executeWithBusyMessage(function(){try{i.json=i.get(),i._renderPreview(),i._pushHistory()}catch{}},"parsing..."):this._pushHistory(),this._debouncedValidate()},c._setTextAndFireOnChange=function(n,o){this._setText(n,o),this._onChange()},c._applyHistory=function(n){this.json=n.json,this.text=n.text,this._renderPreview(),this._debouncedValidate()},c._pushHistory=function(){var n;this.history&&(n={text:this.text,json:this.json},this.history.add(n))},c.executeWithBusyMessage=function(n,o){var i;this.getText().length>x.Oq?((0,f.addClassName)((i=this).frame,"busy"),i.dom.busyContent.innerText=o,setTimeout(function(){n(),(0,f.removeClassName)(i.frame,"busy"),i.dom.busyContent.innerText=""},100)):n()},c.validate=d.validate,c._renderErrors=d._renderErrors,[{mode:"preview",mixin:c,data:"json"}])},2915:function(le,U,Z){Z.r(U),Z.d(U,{showSortModal:function(){return j}});var U=Z(8340),x=Z.n(U),H=Z(3057),X=Z(6237);function j(J,f,B,b){var C=Array.isArray(f)?(0,X.getChildPaths)(f):[""],$=b&&b.path&&(0,X.contains)(C,b.path)?b.path:C[0],y=b&&b.direction||"asc",f='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,H.Tl)("sort")+"</div><form><table><tbody><tr>  <td>"+(0,H.Tl)("sortFieldLabel")+' </td>  <td class="jsoneditor-modal-input">  <div class="jsoneditor-select-wrapper">    <select id="field" title="'+(0,H.Tl)("sortFieldTitle")+'">    </select>  </div>  </td></tr><tr>  <td>'+(0,H.Tl)("sortDirectionLabel")+' </td>  <td class="jsoneditor-modal-input">  <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,H.Tl)("sortAscending")+'" title="'+(0,H.Tl)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,H.Tl)("sortDescending")+'" title="'+(0,H.Tl)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/>  </div>  </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions">  <input type="submit" id="ok" value="'+(0,H.Tl)("ok")+'" /></td></tr></tbody></table></form></div>';x()({parent:J,content:f,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(d){var c=d.modalElem().querySelector("form"),h=d.modalElem().querySelector("#ok"),n=d.modalElem().querySelector("#field"),o=d.modalElem().querySelector("#direction");function i(s){o.value=s,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}C.forEach(function(s){var a,t=document.createElement("option");t.text=(a=s)===""?"@":a[0]==="."?a.slice(1):a,t.value=s,n.appendChild(t)}),n.value=$||C[0],i(y||"asc"),o.onclick=function(s){i(s.target.getAttribute("data-value"))},h.onclick=function(s){s.preventDefault(),s.stopPropagation(),d.close(),B({path:n.value,direction:o.value})},c&&(c.onsubmit=h.onclick)}).afterClose(function(d){d.destroy()}).show()}},5609:function(le,x,Z){Z.r(x),Z.d(x,{showTransformModal:function(){return $}});var x=Z(8340),U=Z.n(x),x=Z(4772),H=Z.n(x),X=Z(3057);function j(y){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(y)}function J(y,f,d,c){if(typeof y=="boolean"||y instanceof Boolean||y===null||typeof y=="number"||y instanceof Number||typeof y=="string"||y instanceof String||y instanceof Date)return JSON.stringify(y);if(Array.isArray(y)){for(var h=y,n=f,o=d,i=c,s=n?o+n:void 0,a=n?`[
`:"[",t=0;t<h.length;t++){var e=h[t];if(n&&(a+=s),a+=e!==void 0&&typeof e!="function"?J(e,n,s,i):"null",t<h.length-1&&(a+=n?`,
`:","),a.length>i)return a+"..."}return a+=n?`
`+o+"]":"]"}if(y&&j(y)==="object"){var r,l=y,p=f,o=d,g=c,I=p?o+p:void 0,A=!0,N=p?`{
`:"{";if(typeof l.toJSON=="function")return J(l.toJSON(),p,o,g);for(r in l)if(function(S,_){return Object.prototype.hasOwnProperty.call(S,_)}(l,r)){var M=l[r];if(A?A=!1:N+=p?`,
`:",",(N=(N+=p?I+'"'+r+'": ':'"'+r+'":')+J(M,p,I,g)).length>g)return N+"..."}return N+=p?`
`+o+"}":"}"}}function F(y,f){for(var d="";0<f--;)d+=y;return d}var B=Z(6237),b=Z(660),C='Enter a <a href="http://jmespath.org" target="_blank">JMESPath</a> query to filter, sort, or transform the JSON data.<br/>To learn JMESPath, go to <a href="http://jmespath.org/tutorial.html" target="_blank">the interactive tutorial</a>.';function $(s){var f=s.container,d=s.json,c=s.queryDescription,c=c===void 0?C:c,h=s.createQuery,n=s.executeQuery,o=s.onTransform,i=d,s='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,X.Tl)("transform")+"</div><p>"+c+'</p><div class="jsoneditor-jmespath-label">'+(0,X.Tl)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard">  <table class="jsoneditor-jmespath-wizard-table">    <tbody>      <tr>        <th>'+(0,X.Tl)("transformWizardFilter")+'</th>        <td class="jsoneditor-jmespath-filter">          <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" >            <select id="filterField">            </select>          </div>          <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" >            <select id="filterRelation">              <option value="==">==</option>              <option value="!=">!=</option>              <option value="<">&lt;</option>              <option value="<=">&lt;=</option>              <option value=">">&gt;</option>              <option value=">=">&gt;=</option>            </select>          </div>          <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" >            <input type="text" class="value" placeholder="value..." id="filterValue" />          </div>        </td>      </tr>      <tr>        <th>'+(0,X.Tl)("transformWizardSortBy")+'</th>        <td class="jsoneditor-jmespath-filter">          <div class="jsoneditor-inline jsoneditor-jmespath-sort-field">            <select id="sortField">            </select>          </div>          <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" >            <select id="sortOrder">              <option value="asc">Ascending</option>              <option value="desc">Descending</option>            </select>          </div>        </td>      </tr>      <tr id="selectFieldsPart">        <th>'+(0,X.Tl)("transformWizardSelectFields")+'</th>        <td class="jsoneditor-jmespath-filter">          <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select>        </td>      </tr>    </tbody>  </table></div><div class="jsoneditor-jmespath-label">'+(0,X.Tl)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block">  <textarea id="query"             rows="4"             autocomplete="off"             autocorrect="off"             autocapitalize="off"             spellcheck="false"            title="'+(0,X.Tl)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,X.Tl)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block">  <textarea id="preview"       class="jsoneditor-transform-preview"      readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions">  <input type="submit" id="ok" value="'+(0,X.Tl)("ok")+'" autofocus /></div></div>';U()({parent:f,content:s,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(a){var t=a.modalElem(),R=t.querySelector("#wizard"),e=t.querySelector("#ok"),r=t.querySelector("#filterField"),l=t.querySelector("#filterRelation"),p=t.querySelector("#filterValue"),g=t.querySelector("#sortField"),I=t.querySelector("#sortOrder"),A=t.querySelector("#selectFields"),N=t.querySelector("#query"),M=t.querySelector("#preview");Array.isArray(i)||(R.style.fontStyle="italic",R.textContent="(wizard not available for objects, only for arrays)"),(0,B.getChildPaths)(d).forEach(function(Q){var Q=v(Q),K=document.createElement("option"),K=(K.text=Q,K.value=Q,r.appendChild(K),document.createElement("option"));K.text=Q,K.value=Q,g.appendChild(K)});var R=(0,B.getChildPaths)(d,!0).filter(function(Y){return Y!==""}),R=(0<R.length?R.forEach(function(Q){var Q=v(Q),K=document.createElement("option");K.text=Q,K.value=Q,A.appendChild(K)}):(R=t.querySelector("#selectFieldsPart"))&&(R.style.display="none"),new(H())(r,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."})),S=new(H())(l,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),_=new(H())(g,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),u=new(H())(I,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),E=new(H())(A,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function v(Y){return Y===""?"@":Y[0]==="."?Y.slice(1):Y}R.on("selectr.change",P),S.on("selectr.change",P),p.oninput=P,_.on("selectr.change",P),u.on("selectr.change",P),E.on("selectr.change",P),t.querySelector(".pico-modal-contents").onclick=function(Y){Y.target.nodeName!=="A"&&Y.preventDefault()};var L=(0,B.debounce)(function(){try{var Y=n(i,N.value);M.className="jsoneditor-transform-preview",M.value=(Q=Y,K=2,te=b.hJ,typeof K=="number"?10<K?T=F(" ",10):1<=K&&(T=F(" ",K)):typeof K=="string"&&K!==""&&(T=K),(K=J(Q,T,"",te)).length>te?(Q=K,(typeof(T=te)=="number"?Q.slice(0,T):Q)+"..."):K),e.disabled=!1}catch(O){M.className="jsoneditor-transform-preview jsoneditor-error",M.value=O.toString(),e.disabled=!0}var Q,K,te,T},300);function G(Y,Q){try{N.value=h(Y,Q),e.disabled=!1,L()}catch(K){Y='Error: an error happened when executing "createQuery": '+(K.message||K.toString()),N.value="",e.disabled=!0,M.className="jsoneditor-transform-preview jsoneditor-error",M.value=Y}}function P(){var Y={};if(r.value&&l.value&&p.value&&(Y.filter={field:r.value,relation:l.value,value:p.value}),g.value&&I.value&&(Y.sort={field:g.value,direction:I.value}),A.value){for(var Q,K=[],te=0;te<A.options.length;te++)A.options[te].selected&&(Q=A.options[te].value,K.push(Q));Y.projection={fields:K}}G(d,Y)}N.oninput=L,e.onclick=function(Y){Y.preventDefault(),Y.stopPropagation(),a.close(),o(N.value)},G(d,{}),setTimeout(function(){N.select(),N.focus(),N.selectionStart=3,N.selectionEnd=3})}).afterClose(function(a){a.destroy()}).show()}},1948:function(le,o,Z){Z.r(o),Z.d(o,{textModeMixins:function(){return a}});var U=Z(9857),o=Z(7413),x=Z.n(o),H=Z(660),X=Z(2115),j=Z(2877),J=Z(3057),F=Z(359),B=Z(1389),b=Z(2915),C=Z(5609),$=Z(5467),y=Z(3094),f=Z(6237);function d(t){return(d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function c(t,e){for(var r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,function(p){return p=function(g,I){if(d(g)!="object"||!g)return g;var A=g[Symbol.toPrimitive];if(A===void 0)return(I==="string"?String:Number)(g);if(A=A.call(g,I||"default"),d(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}(p,"string"),d(p)=="symbol"?p:p+""}(l.key),l)}}var h=function(){function t(p,g){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.schema=p,this.schemaRefs=g||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}return e=t,(r=[{key:"_buildSuggestions",value:function(){for(var p in this._handleSchemaEntry("",this.schema,this.suggestions),this.schemaRefs)this.suggestionsRefs[p]={},this._handleSchemaEntry("",this.schemaRefs[p],this.suggestionsRefs[p])}},{key:"_handleRef",value:function(p,g,I){I[p]=I[p]||{},I[p].refs=I[p].refs||[],I[p].refs=(0,f.uniqueMergeArrays)(I[p].refs,[g])}},{key:"_handleSchemaEntry",value:function(p,g,I){if(g)if(g.$ref)this._handleRef(p,g.$ref,I);else{var A=this._checkOfConditon(g);if(A)this._handleOfCondition(p,g[A],I);else switch(g.type){case"object":this._handleObject(p,g,I);break;case"string":case"number":case"integer":this._handlePrimitive(p,g,I);break;case"boolean":this._handleBoolean(p,g,I);break;case"array":this._handleArray(p,g,I)}}else console.error("SchemaTextCompleter: schema node is missing for path",p)}},{key:"_handleObject",value:function(p,g,I){var A,N=this;(0,f.isObject)(g.properties)&&(A=Object.keys(g.properties),I[p]=I[p]||{},I[p].props=I[p].props||[],I[p].props=(0,f.uniqueMergeArrays)(I[p].props,A),A.forEach(function(M){(0,f.asyncExec)(function(){N._handleSchemaEntry("".concat(p,"/").concat(M),g.properties[M],I)})}))}},{key:"_handlePrimitive",value:function(p,g,I){I[p]=I[p]||{},(0,f.isArray)(g.examples)&&(I[p].examples=I[p].examples||[],I[p].examples=(0,f.uniqueMergeArrays)(I[p].examples,g.examples)),(0,f.isArray)(g.enum)&&(I[p].enum=I[p].enum||[],I[p].enum=(0,f.uniqueMergeArrays)(I[p].enum,g.enum))}},{key:"_handleBoolean",value:function(p,g,I){I[p]||(I[p]={bool:[!0,!1]})}},{key:"_handleArray",value:function(p,g,I){var A=this;g.items&&(0,f.asyncExec)(function(){A._handleSchemaEntry("".concat(p,"/\\d+"),g.items,I)})}},{key:"_handleOfCondition",value:function(p,g,I){var A=this;g&&g.length&&g.forEach(function(N){(0,f.asyncExec)(function(){A._handleSchemaEntry(p,N,I)})})}},{key:"_checkOfConditon",value:function(p){if(p)return p.oneOf?"oneOf":p.anyOf?"anyOf":p.allOf?"allOf":void 0}},{key:"getCompletions",value:function(p,g,I,A,N){var M=this;try{var R=y.parse(g.getValue()).pointers||{},S=function(_){function u(L){var G,P={props:"property",enum:"enum",bool:"boolean",examples:"examples"};_&&(G=_[L])!=null&&G.length&&(E=E.concat(_[L].map(function(Y){return{caption:Y+"",meta:"schema [".concat(P[L],"]"),score:v++,value:Y+""}})))}var E=[],v=0;u("props"),u("enum"),u("bool"),u("examples"),E.length&&N(null,E)};Object.keys(R).forEach(function(_){(0,f.asyncExec)(function(){function u(L,G,P){var Y,Q=Object.keys(G).reduce(function(O,V){return new RegExp("^".concat(P).concat(V)).test(L)&&(!O||O.length<V.length)?V:O},null);if(typeof Q=="string"){if((Y=G[Q])!=null&&(Y=Y.refs)!=null&&Y.length){var K,te={};for(K in G[Q].refs){var T=G[Q].refs[K];M.suggestionsRefs[T]&&((T=u(L,M.suggestionsRefs[T],"".concat(P).concat(Q)))!=null&&T.enum&&(te.enum=(0,f.uniqueMergeArrays)(te.enum,T.enum)),T!=null&&T.examples&&(te.examples=(0,f.uniqueMergeArrays)(te.examples,T.examples)),T!=null&&T.bool&&(te.bool=(0,f.uniqueMergeArrays)(te.bool,T.bool)),T!=null)&&T.props&&(te.props=(0,f.uniqueMergeArrays)(te.props,T.props))}return te}if(new RegExp("^".concat(P).concat(Q,"$")).test(L))return G[Q]}}var E,v;((v=R[_].key)==null?void 0:v.line)===I.row&&I.column>=R[_].key.column&&I.column<=R[_].keyEnd.column&&(E=_.slice(0,_.lastIndexOf("/"))),(E=((v=R[_].value)==null?void 0:v.line)===I.row&&((v=R[_].value)==null?void 0:v.line)===((v=R[_].valueEnd)==null?void 0:v.line)&&I.column>=R[_].value.column&&I.column<=R[_].valueEnd.column?_:E)&&(v=u(E,M.suggestions,""),S(v))})})}catch{}}}])&&c(e.prototype,r),l&&c(e,l),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,l}();function n(t){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var o={},i="ace/theme/jsoneditor";function s(){try{this.format()}catch{}}o.create=function(A){var e,r,l,p=this,g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},N=(g.statusBar===void 0&&(g.statusBar=!0),g.mainMenuBar=g.mainMenuBar!==!1,g.enableSort=g.enableSort!==!1,g.enableTransform=g.enableTransform!==!1,g.createQuery=g.createQuery||F.V,g.executeQuery=g.executeQuery||F.e,g.showErrorTable=g.showErrorTable!==void 0?g.showErrorTable:["text","preview"],typeof(this.options=g).indentation=="number"?this.indentation=Number(g.indentation):this.indentation=2,(0,J.AI)(this.options.languages),(0,J.xC)(this.options.language),g.ace||x()),I=(this.mode=g.mode==="code"?"code":"text",this.mode==="code"&&N===void 0&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=g.theme||i,this.theme===i&&N&&(0,$.J)(),g.onTextSelectionChange&&this.onTextSelectionChange(g.onTextSelectionChange),this),A=(this.container=A,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,f.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=A.clientWidth,this.height=A.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(M){M.preventDefault()},this.frame.onkeydown=function(M){I._onKeyDown(M)},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),A=(this.frameFocusTracker=new j.$(A),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(A=document.createElement("button")).type="button",A.className="jsoneditor-format",A.title=(0,J.Tl)("formatTitle"),this.menu.appendChild(A),A.onclick=function(){try{I.format(),I._onChange()}catch(M){I._onError(M)}},(A=document.createElement("button")).type="button",A.className="jsoneditor-compact",A.title=(0,J.Tl)("compactTitle"),this.menu.appendChild(A),A.onclick=function(){try{I.compact(),I._onChange()}catch(M){I._onError(M)}},this.options.enableSort&&((A=document.createElement("button")).type="button",A.className="jsoneditor-sort",A.title=(0,J.Tl)("sortTitleShort"),A.onclick=function(){I._showSortModal()},this.menu.appendChild(A)),this.options.enableTransform&&((A=document.createElement("button")).type="button",A.title=(0,J.Tl)("transformTitleShort"),A.className="jsoneditor-transform",A.onclick=function(){I._showTransformModal()},this.menu.appendChild(A)),(A=document.createElement("button")).type="button",A.className="jsoneditor-repair",A.title=(0,J.Tl)("repairTitle"),this.menu.appendChild(A),A.onclick=function(){try{I.repair(),I._onChange()}catch(M){I._onError(M)}},this.mode==="code"&&((A=document.createElement("button")).type="button",A.className="jsoneditor-undo jsoneditor-separator",A.title=(0,J.Tl)("undo"),A.onclick=function(){p.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(A),this.dom.undo=A,(A=document.createElement("button")).type="button",A.className="jsoneditor-redo",A.title=(0,J.Tl)("redo"),A.onclick=function(){p.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(A),this.dom.redo=A),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new B.n(this.menu,this.options.modes,this.options.mode,function(M){try{I.setMode(M),I.modeSwitcher.focus()}catch(R){I._onError(R)}})),this.mode==="code")&&((e=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),e.href="https://ace.c9.io/",e.target="_blank",e.className="jsoneditor-poweredBy",e.onclick=function(){window.open(e.href,e.target,"noreferrer")},this.menu.appendChild(e)),this.options.onEditable&&n(this.options.onEditable==="function")&&!this.options.onEditable({})),N=(this.frame.appendChild(this.content),this.container.appendChild(this.frame),this.mode==="code"?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),l=(N=N.edit(this.editorDom)).getSession(),N.$blockScrolling=1/0,N.setTheme(this.theme),N.setOptions({readOnly:A}),N.setShowPrintMargin(!1),N.setFontSize("14px"),l.setMode("ace/mode/json"),l.setTabSize(this.indentation),l.setUseSoftTabs(!0),l.setUseWrapMode(!0),r=l.setAnnotations,l.setAnnotations=function(M){r.call(this,M&&M.length?M:I.annotations)},N.commands.bindKey("Ctrl-L",null),N.commands.bindKey("Command-L",null),N.commands.bindKey("Ctrl-\\",null),N.commands.bindKey("Command-\\",null),N.commands.bindKey("Ctrl-Shift-\\",null),N.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=N).on("change",this._onChange.bind(this)),N.on("changeSelection",this._onSelect.bind(this))):((l=document.createElement("textarea")).className="jsoneditor-text",l.spellcheck=!1,this.content.appendChild(l),this.textarea=l,this.textarea.readOnly=A,this.textarea.oninput===null?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),l.onselect=this._onSelect.bind(this),l.onmousedown=this._onMouseDown.bind(this),l.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new X.N({errorTableVisible:N,onToggleVisibility:function(){I._validateAndCatch()},onFocusLine:function(M){I.isFocused=!0,isNaN(M)||I.setTextSelection({row:M,column:1},{row:M,column:1e3})},onChangeHeight:function(M){M=M+(I.dom.statusBar?I.dom.statusBar.clientHeight:0)+1,I.content.style.marginBottom=-M+"px",I.content.style.paddingBottom=M+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),g.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},A=document.createElement("div"),(this.dom.statusBar=A).className="jsoneditor-statusbar",this.frame.appendChild(A),(l=document.createElement("span")).className="jsoneditor-curserinfo-label",l.innerText="Ln:",(N=document.createElement("span")).className="jsoneditor-curserinfo-val",N.innerText="1",A.appendChild(l),A.appendChild(N),(g=document.createElement("span")).className="jsoneditor-curserinfo-label",g.innerText="Col:",(l=document.createElement("span")).className="jsoneditor-curserinfo-val",l.innerText="1",A.appendChild(g),A.appendChild(l),this.curserInfoElements.colVal=l,this.curserInfoElements.lnVal=N,(g=document.createElement("span")).className="jsoneditor-curserinfo-label",g.innerText="characters selected",g.style.display="none",(l=document.createElement("span")).className="jsoneditor-curserinfo-count",l.innerText="0",l.style.display="none",this.curserInfoElements.countLabel=g,this.curserInfoElements.countVal=l,A.appendChild(l),A.appendChild(g),A.appendChild(this.errorTable.getErrorCounter()),A.appendChild(this.errorTable.getWarningIcon()),A.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},o._onSchemaChange=function(t,e){this.aceEditor&&(this.options.allowSchemaSuggestions&&t?(this.aceEditor.setOption("enableBasicAutocompletion",[new h(t,e)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},o._onChange=function(){var t=this;if(!this.onChangeDisabled){if(setTimeout(function(){t._updateHistoryButtons&&t._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},o._updateHistoryButtons=function(){var t;this.aceEditor&&this.dom.undo&&this.dom.redo&&(t=this.aceEditor.getSession().getUndoManager())&&t.hasUndo&&t.hasRedo&&(this.dom.undo.disabled=!t.hasUndo(),this.dom.redo.disabled=!t.hasRedo())},o._showSortModal=function(){try{var t=this,e=this.options.modalAnchor||H.ai,r=this.get();(0,b.showSortModal)(e,r,function(l){var p;Array.isArray(r)&&(p=(0,f.sort)(r,l.path,l.direction),t.sortedBy=l,t.update(p)),(0,f.isObject)(r)&&(p=(0,f.sortObjectKeys)(r,l.direction),t.sortedBy=l,t.update(p))},t.sortedBy)}catch(l){this._onError(l)}},o._showTransformModal=function(){var t=this;try{var e=this.options,r=e.modalAnchor,l=e.createQuery,p=e.executeQuery,g=e.queryDescription,I=this.get();(0,C.showTransformModal)({container:r||H.ai,json:I,queryDescription:g,createQuery:l,executeQuery:p,onTransform:function(A){A=p(I,A),t.update(A)}})}catch(A){this._onError(A)}},o._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},o._onKeyDown=function(t){var e=!1;(t.which||t.keyCode)===73&&t.ctrlKey&&(t.shiftKey?this.compact():this.format(),this._onChange(),e=!0),e&&(t.preventDefault(),t.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},o._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},o._onBlur=function(){var t=this;setTimeout(function(){t.isFocused||(t._updateCursorInfo(),t._emitSelectionChange()),t.isFocused=!1})},o._updateCursorInfo=function(){var t,e,r,l,p,g=this;function I(){g.curserInfoElements.countVal.innerText!==p&&(g.curserInfoElements.countVal.innerText=p,g.curserInfoElements.countVal.style.display=p?"inline":"none",g.curserInfoElements.countLabel.style.display=p?"inline":"none"),g.curserInfoElements.lnVal.innerText=r,g.curserInfoElements.colVal.innerText=l}this.textarea?setTimeout(function(){var A=(0,f.getInputSelection)(g.textarea);A.startIndex!==A.endIndex&&(p=A.endIndex-A.startIndex),l=(p&&g.cursorInfo&&g.cursorInfo.line===A.end.row&&g.cursorInfo.column===A.end.column?(r=A.start.row,A.start):(r=A.end.row,A.end)).column,g.cursorInfo={line:r,column:l,count:p},g.options.statusBar&&I()},0):this.aceEditor&&this.curserInfoElements&&(t=this.aceEditor.getCursorPosition(),e=this.aceEditor.getSelectedText(),r=t.row+1,l=t.column+1,p=e.length,g.cursorInfo={line:r,column:l,count:p},this.options.statusBar)&&I()},o._emitSelectionChange=function(){var t;this._selectionChangedHandler&&(t=this.getTextSelection(),this._selectionChangedHandler(t.start,t.end,t.text))},o._refreshAnnotations=function(){var t,e=this.aceEditor&&this.aceEditor.getSession();e&&(t=e.getAnnotations().filter(function(r){return r.type==="error"}),e.setAnnotations(t))},o.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null,this.frameFocusTracker.destroy()},o.compact=function(){var t=this.get(),t=JSON.stringify(t);this.updateText(t)},o.format=function(){var t=this.get(),t=JSON.stringify(t,null,this.indentation);this.updateText(t)},o.repair=function(){var t=this.getText();try{var e=(0,U.m)(t);this.updateText(e)}catch{}},o.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},o.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},o.set=function(t){this.setText(JSON.stringify(t,null,this.indentation))},o.update=function(t){this.updateText(JSON.stringify(t,null,this.indentation))},o.get=function(){var t=this.getText();return(0,f.parse)(t)},o.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},o._setText=function(p,e){var r,l=this,p=this.options.escapeUnicode===!0?(0,f.escapeUnicodeChars)(p):p;this.textarea&&(this.textarea.value=p),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(p,-1),this.onChangeDisabled=!1,e&&(r=this,setTimeout(function(){r.aceEditor&&r.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){l._updateHistoryButtons&&l._updateHistoryButtons()})),this._debouncedValidate()},o.setText=function(t){this._setText(t,!0)},o.updateText=function(t){this.getText()!==t&&this._setText(t,!1)},o.validate=function(){var t,e=this,r=[],l=[];try{var p=this.get(),g=(this.validateSchema&&!this.validateSchema(p)&&(r=this.validateSchema.errors.map(function(A){return A.type="validation",(0,f.improveSchemaError)(A)})),this.validationSequence=(this.validationSequence||0)+1,this),I=this.validationSequence;return function(A,N){if(!N)return Promise.resolve([]);try{var M=N(A);return((0,f.isPromise)(M)?M:Promise.resolve(M)).then(function(R){return Array.isArray(R)?R.filter(function(S){var _=(0,f.isValidValidationError)(S);return _||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',S),_}).map(function(S){return{dataPath:(0,f.stringifyPath)(S.path),message:S.message,type:"customValidation"}}):[]})}catch(R){return Promise.reject(R)}}(p,this.options.onValidate).then(function(A){return I===g.validationSequence&&(A=r.concat(l).concat(A),g._renderErrors(A),typeof e.options.onValidationError=="function"&&(0,f.isValidationErrorChanged)(A,e.lastSchemaErrors)&&e.options.onValidationError.call(e,A),e.lastSchemaErrors=A),e.lastSchemaErrors})}catch(A){return this.getText()&&((p=/\w*line\s*(\d+)\w*/g.exec(A.message))&&(t=+p[1]),l=[{type:"error",message:A.message.replace(/\n/g,"<br>"),line:t}]),this._renderErrors(l),typeof this.options.onValidationError=="function"&&(0,f.isValidationErrorChanged)(l,this.lastSchemaErrors)&&this.options.onValidationError.call(this,l),this.lastSchemaErrors=l,Promise.resolve(this.lastSchemaErrors)}},o._validateAndCatch=function(){this.validate().catch(function(t){console.error("Error running validation:",t)})},o._renderErrors=function(t){var r=this.getText(),e=[],r=(t.reduce(function(l,p){return typeof p.dataPath=="string"&&l.indexOf(p.dataPath)===-1&&l.push(p.dataPath),l},e),(0,f.getPositionForPath)(r,e));this.aceEditor&&(this.annotations=r.map(function(l){var p=t.filter(function(I){return I.dataPath===l.path}),g=p.map(function(I){return I.message}).join(`
`);return g?{row:l.line,column:l.column,text:"Schema validation error"+(p.length!==1?"s":"")+`: 
`+g,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(t,r),this.aceEditor&&this.aceEditor.resize(!1)},o.getTextSelection=function(){var t,e,r,l={};return this.textarea?(r=(0,f.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===r.end.row&&this.cursorInfo.column===r.end.column?(l.start=r.end,l.end=r.start):l=r,{start:l.start,end:l.end,text:this.textarea.value.substring(r.startIndex,r.endIndex)}):this.aceEditor?(r=this.aceEditor.getSelection(),t=this.aceEditor.getSelectedText(),e=r.getRange(),(r=r.getSelectionLead()).row===e.end.row&&r.column===e.end.column?l=e:(l.start=e.end,l.end=e.start),{start:{row:l.start.row+1,column:l.start.column+1},end:{row:l.end.row+1,column:l.end.column+1},text:t}):void 0},o.onTextSelectionChange=function(t){typeof t=="function"&&(this._selectionChangedHandler=(0,f.debounce)(t,this.DEBOUNCE_INTERVAL))},o.setTextSelection=function(t,e){var r,l,p;t&&e&&(this.textarea?(r=(0,f.getIndexForPosition)(this.textarea,t.row,t.column),p=(0,f.getIndexForPosition)(this.textarea,e.row,e.column),-1<r&&-1<p&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(r,p)):this.textarea.createTextRange&&((l=this.textarea.createTextRange()).collapse(!0),l.moveEnd("character",p),l.moveStart("character",r),l.select()),p=(this.textarea.value.match(/\n/g)||[]).length+1,r=this.textarea.scrollHeight/p,l=t.row*r,this.textarea.scrollTop=l>this.textarea.clientHeight?l-this.textarea.clientHeight/2:0)):this.aceEditor&&(p={start:{row:t.row-1,column:t.column-1},end:{row:e.row-1,column:e.column-1}},this.aceEditor.selection.setRange(p),this.aceEditor.scrollToLine(t.row-1,!0)))};var a=[{mode:"text",mixin:o,data:"text",load:s},{mode:"code",mixin:o,data:"text",load:s}]},5633:function(le,Y,K){K.r(Y),K.d(Y,{treeModeMixins:function(){return te}});var U={start:function(T,O,V){return O.indexOf(T)===0},contain:function(T,O,V){return-1<O.indexOf(T)}},x=K(6545),H=K(2877);function X(T){return(X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(T)}function j(T,O){for(var V=0;V<O.length;V++){var z=O[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,function(w){return w=function(k,W){if(X(k)!="object"||!k)return k;var D=k[Symbol.toPrimitive];if(D===void 0)return(W==="string"?String:Number)(k);if(D=D.call(k,W||"default"),X(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}(w,"string"),X(w)=="symbol"?w:w+""}(z.key),z)}}var J=function(){function T(){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");this.locked=!1}return O=T,(V=[{key:"highlight",value:function(w){this.locked||(this.node!==w&&(this.node&&this.node.setHighlight(!1),this.node=w,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var w;this.locked||(w=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){w.node.setHighlight(!1),w.node=void 0,w.unhighlightTimer=void 0},0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&j(O.prototype,V),z&&j(O,z),Object.defineProperty(O,"prototype",{writable:!1}),O;var O,V,z}(),F=K(3057),B=K(359),b=K(1389),Y=K(1342),C=K.n(Y),$=K(1925),y=K(6237),f=K(2915),d=K(5609),c=K(660);function h(T){return function(O){if(Array.isArray(O))return s(O)}(T)||function(O){if(typeof Symbol<"u"&&O[Symbol.iterator]!=null||O["@@iterator"]!=null)return Array.from(O)}(T)||i(T)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function n(T,O){return function(V){if(Array.isArray(V))return V}(T)||function(V,z){var w=V==null?null:typeof Symbol<"u"&&V[Symbol.iterator]||V["@@iterator"];if(w!=null){var k,W,D,q,ae=[],me=!0,ye=!1;try{if(D=(w=w.call(V)).next,z!==0)for(;!(me=(k=D.call(w)).done)&&(ae.push(k.value),ae.length!==z);me=!0);}catch(ke){ye=!0,W=ke}finally{try{if(!me&&w.return!=null&&(q=w.return(),Object(q)!==q))return}finally{if(ye)throw W}}return ae}}(T,O)||i(T,O)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(T,O){var V,z,w,k,W=typeof Symbol<"u"&&T[Symbol.iterator]||T["@@iterator"];if(W)return w=!(z=!0),{s:function(){W=W.call(T)},n:function(){var D=W.next();return z=D.done,D},e:function(D){w=!0,V=D},f:function(){try{z||W.return==null||W.return()}finally{if(w)throw V}}};if(Array.isArray(T)||(W=i(T))||O&&T&&typeof T.length=="number")return W&&(T=W),k=0,{s:O=function(){},n:function(){return k>=T.length?{done:!0}:{done:!1,value:T[k++]}},e:function(D){throw D},f:O};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(T,O){var V;if(T)return typeof T=="string"?s(T,O):(V=(V={}.toString.call(T).slice(8,-1))==="Object"&&T.constructor?T.constructor.name:V)==="Map"||V==="Set"?Array.from(T):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?s(T,O):void 0}function s(T,O){(O==null||O>T.length)&&(O=T.length);for(var V=0,z=Array(O);V<O;V++)z[V]=T[V];return z}function a(T){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(T)}function t(T,O){for(var V=0;V<O.length;V++){var z=O[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,function(w){return w=function(k,W){if(a(k)!="object"||!k)return k;var D=k[Symbol.toPrimitive];if(D===void 0)return(W==="string"?String:Number)(k);if(D=D.call(k,W||"default"),a(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}(w,"string"),a(w)=="symbol"?w:w+""}(z.key),z)}}var e=function(){function T(w,k){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");this.editor=w,this.dom={},this.expanded=!1,k&&k instanceof Object?(this.setField(k.field,k.fieldEditable),"value"in k&&this.setValue(k.value,k.type),"internalValue"in k&&this.setInternalValue(k.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,y.debounce)(this._onChangeValue.bind(this),T.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,y.debounce)(this._onChangeField.bind(this),T.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}return O=T,(V=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:r}},{key:"_updateEditability",value:function(){var w,k;this.editable={field:!0,value:!0},this.editor&&(this.editable.field=this.editor.options.mode==="tree",this.editable.value=this.editor.options.mode!=="view",this.editor.options.mode!=="tree"&&this.editor.options.mode!=="form"||typeof this.editor.options.onEditable!="function"||(w=this.getValue.bind(this),typeof(k=this.editor.options.onEditable({field:this.field,get value(){return w()},path:this.getPath()}))=="boolean"?(this.editable.field=k,this.editable.value=k):a(k)==="object"&&k!==null?(typeof k.field=="boolean"&&(this.editable.field=k.field),typeof k.value=="boolean"&&(this.editable.value=k.value)):(console.error("Invalid return value for function onEditable.","Actual value:",k,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var w=this,k=[];w;){var W=w.getName();W!==void 0&&k.unshift(W),w=w.parent}return k}},{key:"getInternalPath",value:function(){for(var w=this,k=[];w;)w.parent&&k.unshift(w.getIndex()),w=w.parent;return k}},{key:"getName",value:function(){return this.parent?this.parent.type!=="array"?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(w){if(w){if(w.length===0)return this;if(w.length&&this.childs&&this.childs.length){for(var k=0;k<this.childs.length;++k)if(""+w[0]==""+this.childs[k].getName())return this.childs[k].findNodeByPath(w.slice(1))}}}},{key:"findNodeByInternalPath",value:function(w){if(w){for(var D=this,k=0;k<w.length&&D;k++)var W=w[k],D=D.childs[W];return D}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(w){for(var k=(0,y.parsePath)(w),W=this;W&&0<k.length;)(function(){var D=k.shift();if(typeof D=="number"){if(W.type!=="array")throw new Error("Cannot get child node at index "+D+": node is no array");W=W.childs[D]}else{if(W.type!=="object")throw new Error("Cannot get child node "+D+": node is no object");W=W.childs.filter(function(q){return q.field===D})[0]}})();return W}},{key:"findParents",value:function(){for(var w=[],k=this.parent;k;)w.unshift(k),k=k.parent;return w}},{key:"setError",value:function(w,k){this.error=w,this.errorChild=k,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var w=this,k=this.fieldError||this.valueError||this.error,W=this.dom.tdError;if(k&&this.dom&&this.dom.tr){(0,y.addClassName)(this.dom.tr,"jsoneditor-validation-error"),W||(W=document.createElement("td"),this.dom.tdError=W,this.dom.tdValue.parentNode.appendChild(W));var D=document.createElement("button"),q=(D.type="button",D.className="jsoneditor-button jsoneditor-schema-error",function(){w.dom.popupAnchor&&w.dom.popupAnchor.destroy()}),ae=function(){delete w.dom.popupAnchor},me=function(Re){var xe=w.editor.frame,Re=(w.dom.popupAnchor=(0,$.p)(D,w.editor.getPopupAnchor(),ae,Re),D.getBoundingClientRect()),xe=120<xe.getBoundingClientRect().width-Re.x?"jsoneditor-above":"jsoneditor-left",Re=document.createElement("div");Re.className="jsoneditor-popover "+xe,Re.appendChild(document.createTextNode(k.message)),w.dom.popupAnchor.appendChild(Re)},ye=(D.onmouseover=function(){w.dom.popupAnchor||me(!0)},D.onfocus=function(){q(),me(!1)},D.onblur=function(){q()},this.errorChild);for(ye&&(D.onclick=function(){ye.findParents().forEach(function(ke){ke.expand(!1)}),ye.scrollTo(function(){ye.focus()})});W.firstChild;)W.removeChild(W.firstChild);W.appendChild(D)}else this.dom.tr&&(0,y.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),W&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var w;return this.parent?(w=this.parent.childs.indexOf(this))!==-1?w:null:-1}},{key:"setParent",value:function(w){this.parent=w}},{key:"setField",value:function(w,k){this.field=w,this.previousField=w,this.fieldEditable=k===!0}},{key:"getField",value:function(){return this.field===void 0&&this._getDomField(),this.field}},{key:"setValue",value:function(w,k){var W,D,q,ae,me,ye,ke=this.childs;if(this.type=this._getType(w),k&&k!==this.type){if(k!=="string"||this.type!=="auto")throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+k+'"');this.type=k}if(this.type==="array"){for(this.childs||(this.childs=[]),W=0;W<w.length;W++)(me=w[W])===void 0||me instanceof Function||(W<this.childs.length?((q=this.childs[W]).fieldEditable=!1,q.index=W,q.setValue(me)):(q=new T(this.editor,{value:me}),ae=W<this.getMaxVisibleChilds(),this.appendChild(q,ae,!1)));for(D=this.childs.length;D>=w.length;D--)this.removeChild(this.childs[D],!1)}else if(this.type==="object"){for(this.childs||(this.childs=[]),D=this.childs.length-1;0<=D;D--)g(w,this.childs[D].field)||this.removeChild(this.childs[D],!1);for(var xe in W=0,w)g(w,xe)&&((me=w[xe])===void 0||me instanceof Function||((ye=this.findChildByProperty(xe))?(ye.setField(xe,!0),ye.setValue(me)):(ye=new T(this.editor,{field:xe,value:me}),xe=W<this.getMaxVisibleChilds(),this.appendChild(ye,xe,!1))),W++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=w;Array.isArray(ke)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(w){var k,W,D,q,ae,me=this.childs;if(this.type=w.type,w.type==="array"){for(this.childs||(this.childs=[]),q=0;q<w.childs.length;q++)(k=w.childs[q])===void 0||k instanceof Function||(q<this.childs.length?((W=this.childs[q]).fieldEditable=!1,W.index=q,W.setInternalValue(k)):(W=new T(this.editor,{internalValue:k}),D=q<this.getMaxVisibleChilds(),this.appendChild(W,D,!1)));for(ae=this.childs.length;ae>=w.childs.length;ae--)this.removeChild(this.childs[ae],!1)}else if(w.type==="object"){for(this.childs||(this.childs=[]),q=0;q<w.childs.length;q++)(k=w.childs[q])===void 0||k instanceof Function||(q<this.childs.length?(delete(W=this.childs[q]).index,W.setField(k.field,!0),W.setInternalValue(k.value)):(W=new T(this.editor,{field:k.field,internalValue:k.value}),D=q<this.getMaxVisibleChilds(),this.appendChild(W,D,!1)));for(ae=this.childs.length;ae>=w.childs.length;ae--)this.removeChild(this.childs[ae],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=w.value;Array.isArray(me)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var w;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(w=this._detachFromDom(),this.clearDom(),this._attachToDom(w)):this.clearDom()}},{key:"getValue",value:function(){var w,k;return this.type==="array"?(w=[],this.childs.forEach(function(W){w.push(W.getValue())}),w):this.type==="object"?(k={},this.childs.forEach(function(W){k[W.getField()]=W.getValue()}),k):(this.value===void 0&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return this.type==="array"?{type:this.type,childs:this.childs.map(function(w){return w.getInternalValue()})}:this.type==="object"?{type:this.type,childs:this.childs.map(function(w){return{field:w.getField(),value:w.getInternalValue()}})}:(this.value===void 0&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var w=this.parent?this.parent.getNodePath():[];return w.push(this),w}},{key:"clone",value:function(){var w,k;return(w=new T(this.editor)).type=this.type,w.field=this.field,w.fieldInnerText=this.fieldInnerText,w.fieldEditable=this.fieldEditable,w.previousField=this.previousField,w.value=this.value,w.valueInnerText=this.valueInnerText,w.previousValue=this.previousValue,w.expanded=this.expanded,w.visibleChilds=this.visibleChilds,this.childs?(k=[],this.childs.forEach(function(W){W=W.clone(),W.setParent(w),k.push(W)}),w.childs=k):w.childs=void 0,w}},{key:"expand",value:function(w){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),w!==!1&&this.childs.forEach(function(k){k.expand(w)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(w){this.childs&&(this.hideChilds(),w!==!1&&this.childs.forEach(function(k){k.collapse(w)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var w=this.childs;if(w&&this.expanded){var w=this.dom.tr,k=w?w.parentNode:void 0;if(k){for(var W=this.getAppendDom(),D=(W.parentNode||((q=w.nextSibling)?k.insertBefore(W,q):k.appendChild(W)),Math.min(this.childs.length,this.visibleChilds)),q=this._getNextTr(),ae=0;ae<D;ae++){var me=this.childs[ae];me.getDom().parentNode||k.insertBefore(me.getDom(),q),me.showChilds()}w=this.getShowMoreDom(),q=this._getNextTr(),w.parentNode||k.insertBefore(w,q),this.showMore.updateDom()}}}},{key:"_getNextTr",value:function(){return this.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void 0}},{key:"hide",value:function(w){var k=this.dom.tr,W=k?k.parentNode:void 0;W&&W.removeChild(k),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(w)}},{key:"hideChilds",value:function(w){var k;this.childs&&this.expanded&&((k=this.getAppendDom()).parentNode&&k.parentNode.removeChild(k),this.childs.forEach(function(W){W.hide()}),(k=this.getShowMoreDom()).parentNode&&k.parentNode.removeChild(k),w&&!w.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var w,k;this.dom.field&&this.editor&&this.editor.options&&typeof this.editor.options.onClassName=="function"&&this.dom.tree&&((0,y.removeAllClassNames)(this.dom.tree),w=this.getValue.bind(this),k=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return w()}})||"",(0,y.addClassName)(this.dom.tree,"jsoneditor-values "+k))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var w=0;w<this.childs.length;w++)this.childs[w].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var w=this.parent;w;)w.expanded||w.expand(),w=w.parent}},{key:"appendChild",value:function(w,k,W){var D,q;this._hasChilds()&&(w.setParent(this),w.fieldEditable=this.type==="object",this.type==="array"&&(w.index=this.childs.length),this.type==="object"&&w.field===void 0&&w.setField(""),this.childs.push(w),this.expanded&&k!==!1&&(k=w.getDom(),q=(D=this._getNextTr())?D.parentNode:void 0,D&&q&&q.insertBefore(k,D),w.showChilds(),this.visibleChilds++),W!==!1)&&(this.updateDom({updateIndexes:!0}),w.updateDom({recurse:!0}))}},{key:"moveBefore",value:function(w,k,W){var D,q,ae;this._hasChilds()&&((D=this.dom.tr?this.dom.tr.parentNode:void 0)&&((q=document.createElement("tr")).style.height=D.clientHeight+"px",D.appendChild(q)),w.parent&&w.parent.removeChild(w),k instanceof I||!k?this.childs.length+1>this.visibleChilds?(ae=this.childs[this.visibleChilds-1],this.insertBefore(w,ae,W)):this.appendChild(w,!0,W):this.insertBefore(w,k,W),D)&&q&&D.removeChild(q)}},{key:"insertBefore",value:function(w,k,W){if(this._hasChilds()){if(this.visibleChilds++,this.type==="object"&&w.field===void 0&&w.setField(""),k===this.append)w.setParent(this),w.fieldEditable=this.type==="object",this.childs.push(w);else{var D=this.childs.indexOf(k);if(D===-1)throw new Error("Node not found");w.setParent(this),w.fieldEditable=this.type==="object",this.childs.splice(D,0,w)}var q;this.expanded&&(D=w.getDom(),q=(k=k.getDom())?k.parentNode:void 0,k&&q&&q.insertBefore(D,k),w.showChilds(),this.showChilds()),W!==!1&&(this.updateDom({updateIndexes:!0}),w.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(w,k){this._hasChilds()&&(k=this.childs.indexOf(k),(k=this.childs[k+1])?this.insertBefore(w,k):this.appendChild(w))}},{key:"search",value:function(w,k){Array.isArray(k)||(k=[]);var W=w?w.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,this.field!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.field).toLowerCase().indexOf(W)!==-1&&(this.searchField=!0,k.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(D){D.search(w,k)}):this.value!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.value).toLowerCase().indexOf(W)!==-1&&(this.searchValue=!0,k.push({node:this,elem:"value"})),this._updateDomValue()),k}},{key:"scrollTo",value:function(w){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,w)}},{key:"expandPathToNode",value:function(){for(var w=this;w&&w.parent;){for(var k=w.parent.type==="array"?w.index:w.parent.childs.indexOf(w);w.parent.visibleChilds<k+1;)w.parent.visibleChilds+=this.getMaxVisibleChilds();w.parent.expand(!1),w=w.parent}}},{key:"focus",value:function(w){if(T.focusElement=w,this.dom.tr&&this.dom.tr.parentNode){var k=this.dom;switch(w){case"drag":(k.drag||k.menu).focus();break;case"menu":k.menu.focus();break;case"expand":this._hasChilds()?k.expand.focus():k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):k.menu.focus();break;case"field":k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):(this._hasChilds()?k.expand:k.menu).focus();break;default:k.select?k.select.focus():k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):(this._hasChilds()?k.expand:k.menu).focus()}}}},{key:"containsNode",value:function(w){if(this===w)return!0;var k=this.childs;if(k){for(var W=0,D=k.length;W<D;W++)if(k[W].containsNode(w))return!0}return!1}},{key:"removeChild",value:function(w,k){if(this.childs){var W=this.childs.indexOf(w);if(W!==-1)return W<this.visibleChilds&&this.expanded&&this.visibleChilds--,w.hide(),delete w.searchField,delete w.searchValue,(w=this.childs.splice(W,1)[0]).parent=null,k!==!1&&this.updateDom({updateIndexes:!0}),w}}},{key:"_remove",value:function(w){this.removeChild(w)}},{key:"changeType",value:function(w){var k,W=this.type;W!==w&&(w!=="string"&&w!=="auto"||W!=="string"&&W!=="auto"?(k=this._detachFromDom(),this.clearDom(),(this.type=w)==="object"?(this.childs||(this.childs=[]),this.childs.forEach(function(D){D.clearDom(),delete D.index,D.fieldEditable=!0,D.field===void 0&&(D.field="")}),W!=="string"&&W!=="auto"||(this.expanded=!0)):w==="array"?(this.childs||(this.childs=[]),this.childs.forEach(function(D,q){D.clearDom(),D.fieldEditable=!1,D.index=q}),W!=="string"&&W!=="auto"||(this.expanded=!0)):this.expanded=!1,this._attachToDom(k)):this.type=w,w!=="auto"&&w!=="string"||(this.value=w==="string"?String(this.value):(0,y.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(w){var k;if(this.type==="array"){if(!Array.isArray(w)||this.childs.length!==w.length)return!1;for(k=0;k<this.childs.length;k++)if(!this.childs[k].deepEqual(w[k]))return!1}else if(this.type==="object"){if(a(w)!=="object"||!w)return!1;var W=Object.keys(w);if(this.childs.length!==W.length)return!1;for(k=0;k<W.length;k++){var D=this.childs[k];if(D.field!==W[k]||!D.deepEqual(w[D.field]))return!1}}else if(this.value!==w)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&this.type!=="array"&&this.type!=="object"&&(this.valueInnerText=(0,y.getInnerText)(this.dom.value),this.valueInnerText==="")&&this.dom.value.innerHTML!==""&&(this.dom.value.textContent=""),this.valueInnerText!==void 0)try{var w,k;(k=this.type==="string"?this._unescapeHTML(this.valueInnerText):(w=this._unescapeHTML(this.valueInnerText),(0,y.parseString)(w)))!==this.value&&(this.value=k,this._debouncedOnChangeValue())}catch{this._setValueError((0,F.Tl)("cannotParseValueError"))}}},{key:"_setValueError",value:function(w){this.valueError={message:w},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(w){this.fieldError={message:w},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var w,k=this.editor.getDomSelection(),W=(k.range&&(W=(0,y.textDiff)(String(this.value),String(this.previousValue)),k.range.startOffset=W.start,k.range.endOffset=W.end),this.editor.getDomSelection());W.range&&(w=(0,y.textDiff)(String(this.previousValue),String(this.value)),W.range.startOffset=w.start,W.range.endOffset=w.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:k,newSelection:W}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var w=this.editor.getDomSelection(),k=this.previousField||"",W=(w.range&&(W=(0,y.textDiff)(this.field,k),w.range.startOffset=W.start,w.range.endOffset=W.end),this.editor.getDomSelection());W.range&&(k=(0,y.textDiff)(k,this.field),W.range.startOffset=k.start,W.range.endOffset=k.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:w,newSelection:W}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var w=this.dom.value;if(w){var k=["jsoneditor-value"],W=this.value,D=this.type==="auto"?(0,y.getType)(W):this.type,q=D==="string"&&(0,y.isUrl)(W);if(k.push("jsoneditor-"+D),q&&k.push("jsoneditor-url"),String(this.value)===""&&this.type!=="array"&&this.type!=="object"&&k.push("jsoneditor-empty"),this.searchValueActive&&k.push("jsoneditor-highlight-active"),this.searchValue&&k.push("jsoneditor-highlight"),w.className=k.join(" "),D==="array"||D==="object"?(k=this.childs?this.childs.length:0,w.title=this.type+" containing "+k+" items"):q&&this.editable.value?w.title=(0,F.Tl)("openUrl"):w.title="",D==="boolean"&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value?(this.dom.select||(this.dom.select=document.createElement("select"),this.id=this.field+"_"+new Date().getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,(k=document.createElement("option")).value="",k.textContent="--",this.dom.select.appendChild(k),this._updateEnumOptions(),this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)),this.dom.select.value=this.enum.indexOf(this.value)!==-1?this.value:"",!this.schema||g(this.schema,"oneOf")||g(this.schema,"anyOf")||g(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")):this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML,this.dom.tdValue.appendChild(this.dom.value)),this.editor.options.colorPicker&&typeof W=="string"&&(0,y.isValidColor)(W)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,y.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?y.removeClassName:y.addClassName)(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=W):this._deleteDomColor(),this._showTimestampTag()){if(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),q=null,q=typeof this.editor.options.timestampFormat=="function"?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):q){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(q))}else this.dom.date.textContent=new Date(W).toISOString();this.dom.date.title=new Date(W).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,y.stripFormatting)(w),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var w=0;w<this.enum.length;w++){var k=document.createElement("option");k.value=this.enum[w],k.textContent=this.enum[w],this.dom.select.appendChild(k)}}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,y.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var w,k=this.dom.field;k&&((w=(0,y.makeFieldTooltip)(this.schema,this.editor.options.language))&&(k.title=w),(String(this.field)===""&&this.parent&&this.parent.type!=="array"?y.addClassName:y.removeClassName)(k,"jsoneditor-empty"),(this.searchFieldActive?y.addClassName:y.removeClassName)(k,"jsoneditor-highlight-active"),(this.searchField?y.addClassName:y.removeClassName)(k,"jsoneditor-highlight"),(0,y.stripFormatting)(k))}},{key:"_getDomField",value:function(w){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,y.getInnerText)(this.dom.field),this.fieldInnerText==="")&&this.dom.field.innerHTML!==""&&(this.dom.field.textContent=""),this.fieldInnerText!==void 0)try{var k=this._unescapeHTML(this.fieldInnerText),W=this.parent.getFieldNames(this);W.indexOf(k)!==-1?w?(k=(0,y.findUniqueName)(k,W))!==this.field&&(this.field=k,this._debouncedOnChangeField()):this._setFieldError((0,F.Tl)("duplicateFieldError")):k!==this.field&&(this.field=k,this._debouncedOnChangeField())}catch{this._setFieldError((0,F.Tl)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var w;this.schema&&this.schema.default!==void 0&&!this._hasChilds()&&(w=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(w.title=(0,F.Tl)("default"),(0,y.addClassName)(w,"jsoneditor-is-default"),y.removeClassName):(w.removeAttribute("title"),(0,y.removeClassName)(w,"jsoneditor-is-default"),y.addClassName))(w,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var w,k;return typeof this.value=="number"&&(typeof(w=this.editor.options.timestampTag)=="function"?typeof(k=w({field:this.field,value:this.value,path:this.getPath()}))=="boolean"?k:(0,y.isTimestamp)(this.field,this.value):w===!0&&(0,y.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var w,k,W=this.dom;return W.tr||(this._updateEditability(),W.tr=document.createElement("tr"),(W.tr.node=this).editor.options.mode==="tree"&&(k=document.createElement("td"),this.editable.field&&this.parent&&((w=document.createElement("button")).type="button",(W.drag=w).className="jsoneditor-button jsoneditor-dragarea",w.title=(0,F.Tl)("drag"),k.appendChild(w)),W.tr.appendChild(k),w=document.createElement("td"),(k=document.createElement("button")).type="button",(W.menu=k).className="jsoneditor-button jsoneditor-contextmenu-button",k.title=(0,F.Tl)("actionsMenu"),w.appendChild(W.menu),W.tr.appendChild(w)),k=document.createElement("td"),W.tr.appendChild(k),W.tree=this._createDomTree(),k.appendChild(W.tree),this.updateDom({updateIndexes:!0})),W.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(w){for(var k=this.parent;k;){if(k===w)return!0;k=k.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(w){this.dom.tr&&((w?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(w),this.childs)&&this.childs.forEach(function(k){k.setHighlight(w)})}},{key:"setSelected",value:function(w,k){this.selected=w,this.dom.tr&&((w?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-selected"),(k?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(w),this.showMore&&this.showMore.setSelected(w),this.childs)&&this.childs.forEach(function(W){W.setSelected(w)})}},{key:"updateValue",value:function(w){this.value=w,this.previousValue=w,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(w){this.field=w,this.previousField=w,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(w){var k,W=this.dom.tree,W=(W&&(W.style.marginLeft=24*this.getLevel()+"px"),this.dom.field),W=(W&&(this.fieldEditable?(W.contentEditable=this.editable.field,W.spellcheck=!1,W.className="jsoneditor-field"):(W.contentEditable=!1,W.className="jsoneditor-readonly"),k=this.index!==void 0?this.index:this.field!==void 0?this.field:(k=this.editor.options.schema?T._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&k.title?k.title:this._hasChilds()?this.type:"",k=this._escapeHTML(k),document.activeElement!==W&&k!==this._unescapeHTML((0,y.getInnerText)(W))&&(W.innerHTML=k),this._updateSchema(),this._updateEnumOptions()),this.dom.value),W=(W&&(this.type==="array"||this.type==="object"?this.updateNodeName():(k=this._escapeHTML(this.value),document.activeElement!==W&&k!==this._unescapeHTML((0,y.getInnerText)(W))&&(W.innerHTML=k))),this.dom.tr);W&&(this.type==="array"||this.type==="object"?((0,y.addClassName)(W,"jsoneditor-expandable"),this.expanded?((0,y.addClassName)(W,"jsoneditor-expanded"),(0,y.removeClassName)(W,"jsoneditor-collapsed")):((0,y.addClassName)(W,"jsoneditor-collapsed"),(0,y.removeClassName)(W,"jsoneditor-expanded"))):((0,y.removeClassName)(W,"jsoneditor-expandable"),(0,y.removeClassName)(W,"jsoneditor-expanded"),(0,y.removeClassName)(W,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),w&&w.updateIndexes===!0&&this._updateDomIndexes(),w&&w.recurse===!0&&this.childs&&this.childs.forEach(function(D){D.updateDom(w)}),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?T._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=T._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var w=this.dom.value,k=this.childs;w&&k&&(this.type==="array"?k.forEach(function(W,D){W.index=D,W=W.dom.field,W&&(W.textContent=D)}):this.type==="object"&&k.forEach(function(W){W.index!==void 0&&(delete W.index,W.field===void 0)&&(W.field="")}))}},{key:"_createDomValue",value:function(){var w;return this.type==="array"?(w=document.createElement("div")).textContent="[...]":this.type==="object"?(w=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,y.isUrl)(this.value)?(w=document.createElement("a")).href=this.value:((w=document.createElement("div")).contentEditable=this.editable.value,w.spellcheck=!1),w.innerHTML=this._escapeHTML(this.value)),w}},{key:"_createDomExpandButton",value:function(){var w=document.createElement("button");return w.type="button",this._hasChilds()?(w.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",w.title=(0,F.Tl)("expandTitle")):(w.className="jsoneditor-button jsoneditor-invisible",w.title=""),w}},{key:"_createDomTree",value:function(){var w=this.dom,k=document.createElement("table"),D=document.createElement("tbody"),W=(k.style.borderCollapse="collapse",k.className="jsoneditor-values",k.appendChild(D),document.createElement("tr")),D=(D.appendChild(W),document.createElement("td")),D=(D.className="jsoneditor-tree",W.appendChild(D),w.expand=this._createDomExpandButton(),D.appendChild(w.expand),w.tdExpand=D,document.createElement("td")),D=(D.className="jsoneditor-tree",W.appendChild(D),w.field=this._createDomField(),D.appendChild(w.field),w.tdField=D,document.createElement("td")),D=(D.className="jsoneditor-tree",W.appendChild(D),this.type!=="object"&&this.type!=="array"&&(D.appendChild(document.createTextNode(":")),D.className="jsoneditor-separator"),w.tdSeparator=D,document.createElement("td"));return D.className="jsoneditor-tree",W.appendChild(D),w.value=this._createDomValue(),D.appendChild(w.value),w.tdValue=D,k}},{key:"onEvent",value:function(w){var k,W=w.type,D=w.target||w.srcElement,q=this.dom,ae=this,me=this._hasChilds(),ye=(D!==q.drag&&D!==q.menu||(W==="mouseover"?this.editor.highlighter.highlight(this):W==="mouseout"&&this.editor.highlighter.unhighlight()),W==="click"&&D===q.menu&&((k=ae.editor.highlighter).highlight(ae),k.lock(),(0,y.addClassName)(q.menu,"jsoneditor-selected"),this.showContextMenu(q.menu,function(){(0,y.removeClassName)(q.menu,"jsoneditor-selected"),k.unlock(),k.unhighlight()})),W==="click"&&D===q.expand&&me&&(Se=w.ctrlKey,this._onExpand(Se)),W!=="click"||w.target!==ae.dom.tdColor&&w.target!==ae.dom.color||!this.editable.value||this._showColorPicker(),W==="change"&&D===q.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),W==="change"&&D===q.select&&(this.dom.value.innerHTML=this._escapeHTML(q.select.value),this._getDomValue(),this._updateDomValue()),q.value);if(D===ye)switch(W){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var ke=this._escapeHTML(this.value);ke!==this._unescapeHTML((0,y.getInnerText)(ye))&&(ye.innerHTML=ke);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":w.ctrlKey&&this.editable.value&&(0,y.isUrl)(this.value)&&(w.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){ae._getDomValue(),ae._updateDomValue()},1)}var xe=q.field;if(D===xe)switch(W){case"blur":this._getDomField(!0),this._updateDomField();var Re=this._escapeHTML(this.field);Re!==this._unescapeHTML((0,y.getInnerText)(xe))&&(xe.innerHTML=Re);break;case"input":this._getDomField(),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"keyup":this._getDomField(),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){ae._getDomField(),ae._updateDomField()},1)}var Se=q.tree;Se&&D===Se.parentNode&&W==="click"&&!w.hasMoved&&((w.offsetX!==void 0?w.offsetX<24*(this.getLevel()+1):w.pageX<(0,y.getAbsoluteLeft)(q.tdSeparator))||me?xe&&((0,y.setEndOfContentEditable)(xe),xe.focus()):ye&&!this.enum&&((0,y.setEndOfContentEditable)(ye),ye.focus())),(D!==q.tdExpand||me)&&D!==q.tdField&&D!==q.tdSeparator||W!=="click"||w.hasMoved||xe&&((0,y.setEndOfContentEditable)(xe),xe.focus()),W==="keydown"&&this.onKeyDown(w),typeof this.editor.options.onEvent=="function"&&this._onEvent(w)}},{key:"_onEvent",value:function(w){var W=w.target,k=W===this.dom.field,W=W===this.dom.value||W===this.dom.checkbox||W===this.dom.select;(k||W)&&(k={field:this.getField(),path:this.getPath()},W&&!this._hasChilds()&&(k.value=this.getValue()),this.editor.options.onEvent(k,w))}},{key:"onKeyDown",value:function(w){var k,W,D,q,ae,me,ye,ke,xe,Re,Se,ce,oe,fe,Ee=w.which||w.keyCode,Ne=w.target||w.srcElement,He=w.ctrlKey,de=w.shiftKey,pe=w.altKey,Ce=!1,we=this.editor.options.mode==="tree",Ae=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],Te=Ae[0],Me=Ae[Ae.length-1];Ee===13?Ne===this.dom.value?this.editable.value&&!w.ctrlKey||(0,y.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),Ce=!0):Ne===this.dom.expand&&this._hasChilds()&&(oe=w.ctrlKey,this._onExpand(oe),Ne.focus(),Ce=!0):Ee===68?He&&we&&(T.onDuplicate(Ae),Ce=!0):Ee===69?He&&(this._onExpand(de),Ne.focus(),Ce=!0):Ee===77&&we?He&&(this.showContextMenu(Ne),Ce=!0):Ee===46&&we?He&&(T.onRemove(Ae),Ce=!0):Ee===45&&we?He&&!de?(this._onInsertBefore(),Ce=!0):He&&de&&(this._onInsertAfter(),Ce=!0):Ee===35?pe&&((oe=this._lastNode())&&oe.focus(T.focusElement||this._getElementName(Ne)),Ce=!0):Ee===36?pe&&((oe=this._firstNode())&&oe.focus(T.focusElement||this._getElementName(Ne)),Ce=!0):Ee===37?pe&&!de?((oe=this._previousElement(Ne))&&this.focus(this._getElementName(oe)),Ce=!0):pe&&de&&we&&(oe=Me.expanded?(oe=Me.getAppendDom())?oe.nextSibling:void 0:Me.getDom().nextSibling)&&(Se=T.getNodeFromTarget(oe),oe=oe.nextSibling,ce=T.getNodeFromTarget(oe),Se)&&Se instanceof I&&Me.parent.childs.length!==1&&ce&&ce.parent&&(W=this.editor.getDomSelection(),D=(q=Te.parent).childs[Me.getIndex()+1]||q.append,ae=Te.getIndex(),me=ce.getIndex(),ye=q.getInternalPath(),ke=ce.parent.getInternalPath(),Ae.forEach(function(ee){ce.parent.moveBefore(ee,ce)}),this.focus(T.focusElement||this._getElementName(Ne)),this.editor._onAction("moveNodes",{count:Ae.length,fieldNames:Ae.map(p),oldParentPath:q.getInternalPath(),newParentPath:Te.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:Te.getIndex(),oldIndexRedo:ae,newIndexRedo:me,oldParentPathRedo:ye,newParentPathRedo:ke,oldSelection:W,newSelection:this.editor.getDomSelection()})):Ee===38?pe&&!de?((k=this._previousNode())&&(this.editor.deselect(!0),k.focus(T.focusElement||this._getElementName(Ne))),Ce=!0):!pe&&He&&de&&we?((k=this._previousNode())&&((Re=this.editor.multiselection).start=Re.start||this,Re.end=k,xe=this.editor._findTopLevelNodes(Re.start,Re.end),this.editor.select(xe),k.focus("field")),Ce=!0):pe&&de&&we&&((k=Te._previousNode())&&k.parent&&(W=this.editor.getDomSelection(),D=(q=Te.parent).childs[Me.getIndex()+1]||q.append,ae=Te.getIndex(),me=k.getIndex(),ye=q.getInternalPath(),ke=k.parent.getInternalPath(),Ae.forEach(function(ee){k.parent.moveBefore(ee,k)}),this.focus(T.focusElement||this._getElementName(Ne)),this.editor._onAction("moveNodes",{count:Ae.length,fieldNames:Ae.map(p),oldParentPath:q.getInternalPath(),newParentPath:Te.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:Te.getIndex(),oldIndexRedo:ae,newIndexRedo:me,oldParentPathRedo:ye,newParentPathRedo:ke,oldSelection:W,newSelection:this.editor.getDomSelection()})),Ce=!0):Ee===39?pe&&!de?((oe=this._nextElement(Ne))&&this.focus(this._getElementName(oe)),Ce=!0):pe&&de&&we&&(oe=Te.getDom().previousSibling)&&(k=T.getNodeFromTarget(oe))&&k.parent&&!k.isVisible()&&(W=this.editor.getDomSelection(),D=(q=Te.parent).childs[Me.getIndex()+1]||q.append,ae=Te.getIndex(),me=k.getIndex(),ye=q.getInternalPath(),ke=k.parent.getInternalPath(),Ae.forEach(function(ee){k.parent.moveBefore(ee,k)}),this.focus(T.focusElement||this._getElementName(Ne)),this.editor._onAction("moveNodes",{count:Ae.length,fieldNames:Ae.map(p),oldParentPath:q.getInternalPath(),newParentPath:Te.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:Te.getIndex(),oldIndexRedo:ae,newIndexRedo:me,oldParentPathRedo:ye,newParentPathRedo:ke,oldSelection:W,newSelection:this.editor.getDomSelection()})):Ee===40&&(pe&&!de?((Se=this._nextNode())&&(this.editor.deselect(!0),Se.focus(T.focusElement||this._getElementName(Ne))),Ce=!0):!pe&&He&&de&&we?((Se=this._nextNode())&&((Re=this.editor.multiselection).start=Re.start||this,Re.end=Se,xe=this.editor._findTopLevelNodes(Re.start,Re.end),this.editor.select(xe),Se.focus("field")),Ce=!0):pe&&de&&we&&((fe=(Se=(Se=(Se=Me.expanded?Me.append?Me.append._nextNode():void 0:Me._nextNode())&&!Se.isVisible()?Se.parent.showMore:Se)&&Se instanceof I?Me:Se)&&(Se._nextNode()||Se.parent.append))&&fe.parent&&(W=this.editor.getDomSelection(),D=(q=Te.parent).childs[Me.getIndex()+1]||q.append,ae=Te.getIndex(),me=fe.getIndex(),ye=q.getInternalPath(),ke=fe.parent.getInternalPath(),Ae.forEach(function(ee){fe.parent.moveBefore(ee,fe)}),this.focus(T.focusElement||this._getElementName(Ne)),this.editor._onAction("moveNodes",{count:Ae.length,fieldNames:Ae.map(p),oldParentPath:q.getInternalPath(),newParentPath:Te.parent.getInternalPath(),oldParentPathRedo:ye,newParentPathRedo:ke,oldIndexRedo:ae,newIndexRedo:me,oldIndex:D.getIndex(),newIndex:Te.getIndex(),oldSelection:W,newSelection:this.editor.getDomSelection()})),Ce=!0)),Ce&&(w.preventDefault(),w.stopPropagation())}},{key:"_onExpand",value:function(w){var k,W,D;w&&(D=(W=(k=this.dom.tr.parentNode).parentNode).scrollTop,W.removeChild(k)),this.expanded?this.collapse(w):this.expand(w),w&&(W.appendChild(k),W.scrollTop=D),typeof this.editor.options.onExpand=="function"&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:w})}},{key:"_showColorPicker",value:function(){var w,k;typeof this.editor.options.onColorPicker=="function"&&this.dom.color&&((w=this)._deleteDomColor(),w.updateDom(),k=(0,$.p)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(k,this.value,function(W){typeof W=="string"&&W!==w.value&&(w._deleteDomColor(),w.value=W,w.updateDom(),w._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(w){return this.type==="object"?this.childs.filter(function(k){return k!==w}).map(function(k){return k.field}):[]}},{key:"_onInsertBefore",value:function(q,ae,me){var D=this.editor.getDomSelection(),q=new T(this.editor,{field:q!==void 0?q:"",value:ae!==void 0?ae:"",type:me}),ae=(q.expand(!0),this.getInternalPath()),me=(this.parent.insertBefore(q,this),this.editor.highlighter.unhighlight(),q.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertBeforeNodes",{nodes:[q],paths:[q.getInternalPath()],beforePath:ae,parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:me})}},{key:"_onInsertAfter",value:function(q,ae,W){var D=this.editor.getDomSelection(),q=new T(this.editor,{field:q!==void 0?q:"",value:ae!==void 0?ae:"",type:W}),ae=(q.expand(!0),this.parent.insertAfter(q,this),this.editor.highlighter.unhighlight(),q.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertAfterNodes",{nodes:[q],paths:[q.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:ae})}},{key:"_onAppend",value:function(q,ae,W){var D=this.editor.getDomSelection(),q=new T(this.editor,{field:q!==void 0?q:"",value:ae!==void 0?ae:"",type:W}),ae=(q.expand(!0),this.parent.appendChild(q),this.editor.highlighter.unhighlight(),q.focus("field"),this.editor.getDomSelection());this.editor._onAction("appendNodes",{nodes:[q],paths:[q.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:ae})}},{key:"_onChangeType",value:function(w){var k,W,D=this.type;w!==D&&(k=this.editor.getDomSelection(),this.changeType(w),W=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:D,newType:w,oldSelection:k,newSelection:W}))}},{key:"sort",value:function(w,k){var W,D,q=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];typeof w=="string"&&(w=(0,y.parsePath)(w)),this._hasChilds()&&(this.hideChilds(),W=this.childs,this.childs=this.childs.concat(),D=k==="desc"?-1:1,this.type==="object"?this.childs.sort(function(ae,me){return D*C()(ae.field,me.field)}):this.childs.sort(function(ye,ke){var ye=ye.getNestedChild(w),ke=ke.getNestedChild(w);return ye?ke?(ye=ye.value,ke=ke.value,typeof ye!="string"&&typeof ke!="string"?ke<ye?D:ye<ke?-D:0:D*C()(ye,ke)):-D:D}),this._updateDomIndexes(),this.showChilds(),q===!0)&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:W,newChilds:this.childs})}},{key:"update",value:function(w){var k=this.getInternalValue();this.setValue(w),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var w=this.dom.tr?this.dom.tr.parentNode:void 0,k=this.expanded?this.getAppendDom():this.getDom(),k=k&&k.parentNode?k.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:w,nextTr:k}}},{key:"_attachToDom",value:function(w){w.table&&(w.nextTr?w.table.insertBefore(this.getDom(),w.nextTr):w.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(w){if(this._hasChilds()){this.hideChilds();try{var k=this.getInternalValue(),W=this.getValue(),D=this.editor.options.executeQuery(W,w),q=(this.setValue(D),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:q}),this.showChilds()}catch(ae){this.showChilds(),this.editor._onError(ae)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var w=this.editor.node.getInternalValue(),k=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:w,newValue:k})}catch(W){this.editor._onError(W)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(w){for(var k=0,W=this;W&&k<w.length;)W=W.findChildByProperty(w[k]),k++;return W}},{key:"findChildByProperty",value:function(w){if(this.type==="object")return this.childs.find(function(k){return k.field===w})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new I(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new N(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var w=this.parent.childs.indexOf(this);return this.parent.childs[w+1]||this.parent.append}},{key:"_previousNode",value:function(){var w=null,k=this.getDom();if(k&&k.parentNode)for(var W=k;W=W.previousSibling,w=T.getNodeFromTarget(W),W&&w&&w instanceof I&&!w.isVisible(););return w}},{key:"_nextNode",value:function(){var w=null,k=this.getDom();if(k&&k.parentNode)for(var W=k;W=W.nextSibling,w=T.getNodeFromTarget(W),W&&w&&w instanceof I&&!w.isVisible(););return w}},{key:"_firstNode",value:function(){var w=null,k=this.getDom();return k&&k.parentNode&&(k=k.parentNode.firstChild,w=T.getNodeFromTarget(k)),w}},{key:"_lastNode",value:function(){var w=null,k=this.getDom();if(k&&k.parentNode)for(var W=k.parentNode.lastChild,w=T.getNodeFromTarget(W);W&&w&&!w.isVisible();)W=W.previousSibling,w=T.getNodeFromTarget(W);return w}},{key:"_previousElement",value:function(w){var k=this.dom;switch(w){case k.value:if(this.fieldEditable)return k.field;case k.field:if(this._hasChilds())return k.expand;case k.expand:return k.menu;case k.menu:if(k.drag)return k.drag;default:return null}}},{key:"_nextElement",value:function(w){var k=this.dom;switch(w){case k.drag:return k.menu;case k.menu:if(this._hasChilds())return k.expand;case k.expand:if(this.fieldEditable)return k.field;case k.field:if(!this._hasChilds())return k.value;default:return null}}},{key:"_getElementName",value:function(w){var k=this;return Object.keys(this.dom).find(function(W){return k.dom[W]===w})}},{key:"_hasChilds",value:function(){return this.type==="array"||this.type==="object"}},{key:"addTemplates",value:function(w,k){var W=this,D=W.editor.options.templates;D!=null&&(D.length&&w.push({type:"separator"}),D.forEach(function(q){w.push({text:q.text,className:q.className||"jsoneditor-type-object",title:q.title,click:(k?function(ae,me){W._onAppend(ae,me)}:function(ae,me){W._onInsertBefore(ae,me)}).bind(this,q.field,q.value)})}))}},{key:"showContextMenu",value:function(w,k){var W,D=this,q=[];this.editable.value&&q.push({text:(0,F.Tl)("type"),title:(0,F.Tl)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,F.Tl)("auto"),className:"jsoneditor-type-auto"+(this.type==="auto"?" jsoneditor-selected":""),title:(0,F.Tl)("autoType"),click:function(){D._onChangeType("auto")}},{text:(0,F.Tl)("array"),className:"jsoneditor-type-array"+(this.type==="array"?" jsoneditor-selected":""),title:(0,F.Tl)("arrayType"),click:function(){D._onChangeType("array")}},{text:(0,F.Tl)("object"),className:"jsoneditor-type-object"+(this.type==="object"?" jsoneditor-selected":""),title:(0,F.Tl)("objectType"),click:function(){D._onChangeType("object")}},{text:(0,F.Tl)("string"),className:"jsoneditor-type-string"+(this.type==="string"?" jsoneditor-selected":""),title:(0,F.Tl)("stringType"),click:function(){D._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&q.push({text:(0,F.Tl)("sort"),title:(0,F.Tl)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){D.showSortModal()}}),this.editor.options.enableTransform&&q.push({text:(0,F.Tl)("transform"),title:(0,F.Tl)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){D.showTransformModal()}}),this.parent)&&q.push({text:(0,F.Tl)("extract"),title:(0,F.Tl)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){D.extract()}}),this.parent&&this.parent._hasChilds()&&(q.length&&q.push({type:"separator"}),W=D.parent.childs,D===W[W.length-1]&&(W=[{text:(0,F.Tl)("auto"),className:"jsoneditor-type-auto",title:(0,F.Tl)("autoType"),click:function(){D._onAppend("","","auto")}},{text:(0,F.Tl)("array"),className:"jsoneditor-type-array",title:(0,F.Tl)("arrayType"),click:function(){D._onAppend("",[])}},{text:(0,F.Tl)("object"),className:"jsoneditor-type-object",title:(0,F.Tl)("objectType"),click:function(){D._onAppend("",{})}},{text:(0,F.Tl)("string"),className:"jsoneditor-type-string",title:(0,F.Tl)("stringType"),click:function(){D._onAppend("","","string")}}],D.addTemplates(W,!0),q.push({text:(0,F.Tl)("appendText"),title:(0,F.Tl)("appendTitle"),submenuTitle:(0,F.Tl)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){D._onAppend("","","auto")},submenu:W})),W=[{text:(0,F.Tl)("auto"),className:"jsoneditor-type-auto",title:(0,F.Tl)("autoType"),click:function(){D._onInsertBefore("","","auto")}},{text:(0,F.Tl)("array"),className:"jsoneditor-type-array",title:(0,F.Tl)("arrayType"),click:function(){D._onInsertBefore("",[])}},{text:(0,F.Tl)("object"),className:"jsoneditor-type-object",title:(0,F.Tl)("objectType"),click:function(){D._onInsertBefore("",{})}},{text:(0,F.Tl)("string"),className:"jsoneditor-type-string",title:(0,F.Tl)("stringType"),click:function(){D._onInsertBefore("","","string")}}],D.addTemplates(W,!1),q.push({text:(0,F.Tl)("insert"),title:(0,F.Tl)("insertTitle"),submenuTitle:(0,F.Tl)("insertSub"),className:"jsoneditor-insert",click:function(){D._onInsertBefore("","","auto")},submenu:W}),this.editable.field)&&(q.push({text:(0,F.Tl)("duplicateText"),title:(0,F.Tl)("duplicateField"),className:"jsoneditor-duplicate",click:function(){T.onDuplicate(D)}}),q.push({text:(0,F.Tl)("removeText"),title:(0,F.Tl)("removeField"),className:"jsoneditor-remove",click:function(){T.onRemove(D)}})),this.editor.options.onCreateMenu&&(W=D.getPath(),q=this.editor.options.onCreateMenu(q,{type:"single",path:W,paths:[W]})),new x.t(q,{close:k}).show(w,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var w=this,k=this.editor.options.modalAnchor||c.ai,W=this.getValue();(0,f.showSortModal)(k,W,function(D){var q=D.path,q=(0,y.parsePath)(q);w.sortedBy=D,w.sort(q,D.direction)},w.sortedBy)}},{key:"showTransformModal",value:function(){var w=this,q=this.editor.options,k=q.modalAnchor,W=q.createQuery,D=q.executeQuery,q=q.queryDescription,ae=this.getValue();(0,d.showTransformModal)({container:k||c.ai,json:ae,queryDescription:q,createQuery:W,executeQuery:D,onTransform:function(me){w.transform(me)}})}},{key:"_getType",value:function(w){return w instanceof Array?"array":w instanceof Object?"object":typeof w=="string"&&typeof(0,y.parseString)(w)!="string"?"string":"auto"}},{key:"_escapeHTML",value:function(w){return typeof w!="string"?String(w):(w=String(w).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ {2}/g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),w=(w=JSON.stringify(w)).substring(1,w.length-1),this.editor.options.escapeUnicode===!0?(0,y.escapeUnicodeChars)(w):w)}},{key:"_unescapeHTML",value:function(w){return w='"'+this._escapeJSON(w)+'"',(0,y.parse)(w).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")}},{key:"_escapeJSON",value:function(w){for(var k="",W=0;W<w.length;){var D=w.charAt(W);D===`
`?k+="\\n":D==="\\"?(k+=D,W++,(D=w.charAt(W))!==""&&'"\\/bfnrtu'.indexOf(D)!==-1||(k+="\\"),k+=D):k+=D==='"'?'\\"':D,W++}return k}},{key:"updateNodeName",value:function(){var w=this.childs?this.childs.length:0;if(this.type==="object"||this.type==="array"){if(this.editor.options.onNodeName)try{var k=this.getValue.bind(this),W=this.editor.options.onNodeName({path:this.getPath(),size:w,type:this.type,get value(){return k()}})}catch(D){console.error("Error in onNodeName callback: ",D)}this.dom.value.textContent=this.type==="object"?"{"+(W||w)+"}":"["+(W||w)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),this.childs!=="undefined"))for(var w in this.childs)this.childs[w].recursivelyUpdateNodeName()}}])&&t(O.prototype,V),z&&t(O,z),Object.defineProperty(O,"prototype",{writable:!1}),O;var O,V,z}(),r=(e.prototype.DEBOUNCE_INTERVAL=150,e.prototype.MAX_SEARCH_RESULTS=999,100);function l(T){return T.getInternalPath()}function p(T){return T.getField()}function g(T,O){return Object.prototype.hasOwnProperty.call(T,O)}e.focusElement=void 0,e.select=function(T){setTimeout(function(){(0,y.selectContentEditable)(T)},0)},e.onDragStart=function(T,O){if(!Array.isArray(T))return e.onDragStart([T],O);var V,z,w,k,W;T.length!==0&&(V=T[0],z=T[T.length-1],w=V.parent,W=e.getNodeFromTarget(O.target),k=V.editor,W=(0,y.getAbsoluteTop)(W.dom.tr)-(0,y.getAbsoluteTop)(V.dom.tr),k.mousemove||(k.mousemove=(0,y.addEventListener)(O.view,"mousemove",function(D){e.onDrag(T,D)})),k.mouseup||(k.mouseup=(0,y.addEventListener)(O.view,"mouseup",function(D){e.onDragEnd(T,D)})),k.highlighter.lock(),k.drag={oldCursor:document.body.style.cursor,oldSelection:k.getDomSelection(),oldPaths:T.map(l),oldParent:w,oldNextNode:w.childs[z.getIndex()+1]||w.append,oldParentPathRedo:w.getInternalPath(),oldIndexRedo:V.getIndex(),mouseX:O.pageX,offsetY:W,level:V.getLevel()},document.body.style.cursor="move",O.preventDefault())},e.onDrag=function(T,O){if(!Array.isArray(T))return e.onDrag([T],O);if(T.length!==0){var V,z,w,k,W,D=T[0].editor,q=O.pageY-D.drag.offsetY,ae=O.pageX,me=!1,ye=T[0],ke=ye.dom.tr,xe=(0,y.getAbsoluteTop)(ke),Re=ke.offsetHeight;if(q<xe){for(fe=ke;fe=fe.previousSibling,Ee=e.getNodeFromTarget(fe),w=fe?(0,y.getAbsoluteTop)(fe):0,fe&&q<w;);(Ee=Ee&&!Ee.parent?void 0:Ee)||(fe=(ke=ke.parentNode.firstChild)?ke.nextSibling:void 0,(Ee=e.getNodeFromTarget(fe))===ye&&(Ee=void 0)),!(Ee=Ee&&Ee.isVisible()&&(w=(fe=Ee.dom.tr)?(0,y.getAbsoluteTop)(fe):0)+Re<q?void 0:Ee)||D.options.limitDragging!==!1&&Ee.parent!==T[0].parent||(T.forEach(function(He){Ee.parent.moveBefore(He,Ee)}),me=!0)}else{var Se=T[T.length-1];if(Re=(ke=Se.expanded&&Se.append?Se.append.getDom():Se.dom.tr)?ke.nextSibling:void 0){for(k=(0,y.getAbsoluteTop)(Re),V=Re;z=e.getNodeFromTarget(V),V&&(W=V.nextSibling?(0,y.getAbsoluteTop)(V.nextSibling):0,W=V?W-k:0,z&&z.parent.childs.length===T.length&&z.parent.childs[T.length-1]===Se&&(xe+=27),V=V.nextSibling),V&&xe+W<q;);if(z&&z.parent){for(var Re=ae-D.drag.mouseX,Re=Math.round(Re/24/2),ce=D.drag.level+Re,oe=z.getLevel(),fe=z.dom.tr&&z.dom.tr.previousSibling;oe<ce&&fe;){var Ee=e.getNodeFromTarget(fe),Ne=T.some(function(de){return de===Ee||Ee.isDescendantOf(de)});if(!Ne){if(!(Ee instanceof I)||(Ne=Ee.parent.childs,Ne.length===T.length&&Ne[T.length-1]===Se))break;oe=(z=e.getNodeFromTarget(fe)).getLevel()}fe=fe.previousSibling}(z=z instanceof I&&!z.isVisible()&&z.parent.showMore.isVisible()?z._nextNode():z)&&(D.options.limitDragging===!1||z.parent===T[0].parent)&&z.dom.tr&&z.dom.tr!==ke.nextSibling&&(T.forEach(function(He){z.parent.moveBefore(He,z)}),me=!0)}}}me&&(D.drag.mouseX=ae,D.drag.level=ye.getLevel()),D.startAutoScroll(q),O.preventDefault()}},e.onDragEnd=function(T,O){if(!Array.isArray(T))return e.onDrag([T],O);var V,z,w,k,W,D,q,ae,me;T.length!==0&&(D=T[0],V=D.editor,D&&D.dom.menu&&D.dom.menu.focus(),z=V.drag.oldParent.getInternalPath(),w=D.parent.getInternalPath(),k=V.drag.oldParent===D.parent,W=V.drag.oldNextNode.getIndex(),D=D.getIndex(),q=V.drag.oldParentPathRedo,ae=V.drag.oldIndexRedo,me=k&&ae<D?D+T.length:D,k&&ae===D||V._onAction("moveNodes",{count:T.length,fieldNames:T.map(p),oldParentPath:z,newParentPath:w,oldIndex:W,newIndex:D,oldIndexRedo:ae,newIndexRedo:me,oldParentPathRedo:q,newParentPathRedo:null,oldSelection:V.drag.oldSelection,newSelection:V.getDomSelection()}),document.body.style.cursor=V.drag.oldCursor,V.highlighter.unlock(),T.forEach(function(ye){ye.updateDom(),O.target!==ye.dom.drag&&O.target!==ye.dom.menu&&V.highlighter.unhighlight()}),delete V.drag,V.mousemove&&((0,y.removeEventListener)(O.view,"mousemove",V.mousemove),delete V.mousemove),V.mouseup&&((0,y.removeEventListener)(O.view,"mouseup",V.mouseup),delete V.mouseup),V.stopAutoScroll(),O.preventDefault())},e._findEnum=function(T){return T.enum?T.enum:(T=T.oneOf||T.anyOf||T.allOf,T&&(T=T.filter(function(O){return O.enum}),0<T.length)?T[0].enum:null)},e._findSchema=function(T,O,V){for(var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:T,w=V.slice(1,V.length),k=V[0],W=[z],D=0,q=[z.oneOf,z.anyOf,z.allOf];D<q.length;D++){var ae=q[D];Array.isArray(ae)&&(W=W.concat(ae))}var me,ye=o(W);try{for(ye.s();!(me=ye.n()).done;){if("$ref"in(z=me.value)&&typeof z.$ref=="string"){var ke,xe=z.$ref;if(xe in O)z=O[xe];else{if(!xe.startsWith("#/")){if(((ke=xe.match(/#\//g))==null?void 0:ke.length)===1){var Re,Se,ce,oe=n(xe.split("#/"),2),fe=oe[0],Ee=oe[1];if(fe in O)return Re=O[fe],Se={$ref:"#/".concat(Ee)},(ce=[]).push(k),0<w.length&&ce.push.apply(ce,h(w)),e._findSchema(Re,O,ce,Se)}throw Error("Unable to resolve reference ".concat(xe))}var Ne,He=xe.substring(2).split("/"),z=T,de=o(He);try{for(de.s();!(Ne=de.n()).done;){var pe=Ne.value;if(!(pe in z))throw Error("Unable to resolve reference ".concat(xe));z=z[pe]}}catch(Ae){de.e(Ae)}finally{de.f()}}}if(k===void 0)return z;if(typeof k=="string"){if(a(z.properties)==="object"&&z.properties!==null&&k in z.properties)return z=z.properties[k],e._findSchema(T,O,w,z);if(a(z.patternProperties)==="object"&&z.patternProperties!==null){for(var Ce in z.patternProperties)if(k.match(Ce))return z=z.patternProperties[Ce],e._findSchema(T,O,w,z)}if(a(z.additionalProperties)==="object")return z=z.additionalProperties,e._findSchema(T,O,w,z)}else if(typeof k=="number"&&a(z.items)==="object"&&z.items!==null)return z=z.items,e._findSchema(T,O,w,z)}}catch(we){ye.e(we)}finally{ye.f()}return null},e.onRemove=function(T){if(!Array.isArray(T))return e.onRemove([T]);var O,V,z,w,k,W;T&&0<T.length&&(O=(z=T[0]).parent,V=z.editor,z=z.getIndex(),V.highlighter.unhighlight(),w=V.getDomSelection(),e.blurNodes(T),k=V.getDomSelection(),W=T.map(l),T.forEach(function(D){D.parent._remove(D)}),V._onAction("removeNodes",{nodes:T,paths:W,parentPath:O.getInternalPath(),index:z,oldSelection:w,newSelection:k}))},e.onDuplicate=function(T){if(!Array.isArray(T))return e.onDuplicate([T]);var O,V,z,w,k,W,D;T&&0<T.length&&(O=T[T.length-1],V=O.parent,(z=O.editor).deselect(z.multiselection.nodes),w=z.getDomSelection(),k=O,W=T.map(function(q){var ae,me=q.clone();return q.parent.type==="object"&&(ae=q.parent.getFieldNames(),me.field=(0,y.findUniqueName)(q.field,ae)),V.insertAfter(me,k),k=me}),T.length===1?W[0].parent.type==="object"?(W[0].dom.field.innerHTML=T[0]._escapeHTML(T[0].field),W[0].focus("field")):W[0].focus():z.select(W),D=z.getDomSelection(),z._onAction("duplicateNodes",{paths:T.map(l),clonePaths:W.map(l),afterPath:O.getInternalPath(),parentPath:V.getInternalPath(),oldSelection:w,newSelection:D}))},e.getNodeFromTarget=function(T){for(;T;){if(T.node)return T.node;T=T.parentNode}},e.targetIsColorPicker=function(T){var O=e.getNodeFromTarget(T);if(O)for(var V=T&&T.parentNode;V;){if(V===O.dom.color)return!0;V=V.parentNode}return!1},e.blurNodes=function(T){var O,V;Array.isArray(T)?(O=(V=T[0]).parent,V=V.getIndex(),(O.childs[V+T.length]?O.childs[V+T.length]:O.childs[V-1]||O).focus()):e.blurNodes([T])},(A.prototype=new e).getDom=function(){var T=this.dom;if(T.tr)return T.tr;this._updateEditability();var O=document.createElement("tr"),V=(O.className="jsoneditor-append",O.node=this,T.tr=O,this.editor.options.mode==="tree"&&(T.tdDrag=document.createElement("td"),z=document.createElement("td"),T.tdMenu=z,(V=document.createElement("button")).type="button",V.className="jsoneditor-button jsoneditor-contextmenu-button",V.title="Click to open the actions menu (Ctrl+M)",T.menu=V,z.appendChild(T.menu)),document.createElement("td")),z=document.createElement("div");return z.appendChild(document.createTextNode("("+(0,F.Tl)("empty")+")")),z.className="jsoneditor-readonly",V.appendChild(z),T.td=V,T.text=z,this.updateDom(),O},A.prototype.getPath=function(){return null},A.prototype.getIndex=function(){return null},A.prototype.updateDom=function(T){var O=this.dom,V=O.td,z=(V&&(V.style.paddingLeft=24*this.getLevel()+26+"px"),O.text),z=(z&&(z.firstChild.nodeValue="("+(0,F.Tl)("empty")+" "+this.parent.type+")"),O.tr);this.isVisible()?O.tr.firstChild||(O.tdDrag&&z.appendChild(O.tdDrag),O.tdMenu&&z.appendChild(O.tdMenu),z.appendChild(V)):O.tr.firstChild&&(O.tdDrag&&z.removeChild(O.tdDrag),O.tdMenu&&z.removeChild(O.tdMenu),z.removeChild(V))},A.prototype.isVisible=function(){return this.parent.childs.length===0},A.prototype.showContextMenu=function(T,O){var V,z=this,w=[{text:(0,F.Tl)("auto"),className:"jsoneditor-type-auto",title:(0,F.Tl)("autoType"),click:function(){z._onAppend("","","auto")}},{text:(0,F.Tl)("array"),className:"jsoneditor-type-array",title:(0,F.Tl)("arrayType"),click:function(){z._onAppend("",[])}},{text:(0,F.Tl)("object"),className:"jsoneditor-type-object",title:(0,F.Tl)("objectType"),click:function(){z._onAppend("",{})}},{text:(0,F.Tl)("string"),className:"jsoneditor-type-string",title:(0,F.Tl)("stringType"),click:function(){z._onAppend("","","string")}}],w=(z.addTemplates(w,!0),[{text:(0,F.Tl)("appendText"),title:(0,F.Tl)("appendTitleAuto"),submenuTitle:(0,F.Tl)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){z._onAppend("","","auto")},submenu:w}]);this.editor.options.onCreateMenu&&(V=z.parent.getPath(),w=this.editor.options.onCreateMenu(w,{type:"append",path:V,paths:[V]})),new x.t(w,{close:O}).show(T,this.editor.getPopupAnchor())},A.prototype.onEvent=function(T){var O,V=T.type,z=T.target||T.srcElement,w=this.dom;z===w.menu&&(V==="mouseover"?this.editor.highlighter.highlight(this.parent):V==="mouseout"&&this.editor.highlighter.unhighlight()),V==="click"&&z===w.menu&&((O=this.editor.highlighter).highlight(this.parent),O.lock(),(0,y.addClassName)(w.menu,"jsoneditor-selected"),this.showContextMenu(w.menu,function(){(0,y.removeClassName)(w.menu,"jsoneditor-selected"),O.unlock(),O.unhighlight()})),V==="keydown"&&this.onKeyDown(T)};var I=A;function A(T){this.editor=T,this.dom={}}(M.prototype=new e).getDom=function(){var T,O,V,z,w,k;return this.dom.tr||(this._updateEditability(),this.dom.tr||(O=(T=this).parent,(w=document.createElement("a")).appendChild(document.createTextNode((0,F.Tl)("showMore"))),w.href="#",w.onclick=function(W){return O.visibleChilds=Math.floor(O.visibleChilds/O.getMaxVisibleChilds()+1)*O.getMaxVisibleChilds(),T.updateDom(),O.showChilds(),W.preventDefault(),!1},(k=document.createElement("a")).appendChild(document.createTextNode((0,F.Tl)("showAll"))),k.href="#",k.onclick=function(W){return O.visibleChilds=1/0,T.updateDom(),O.showChilds(),W.preventDefault(),!1},V=document.createElement("div"),z=document.createTextNode(this._getShowMoreText()),V.className="jsoneditor-show-more",V.appendChild(z),V.appendChild(w),V.appendChild(document.createTextNode(". ")),V.appendChild(k),V.appendChild(document.createTextNode(". ")),(w=document.createElement("td")).appendChild(V),k=document.createElement("tr"),this.editor.options.mode==="tree"&&(k.appendChild(document.createElement("td")),k.appendChild(document.createElement("td"))),k.appendChild(w),k.className="jsoneditor-show-more",this.dom.tr=k,this.dom.moreContents=V,this.dom.moreText=z),this.updateDom()),this.dom.tr},M.prototype.updateDom=function(T){var O;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(O=this.parent._getNextTr())&&O.parentNode.insertBefore(this.dom.tr,O),this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"):this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},M.prototype._getShowMoreText=function(){return(0,F.Tl)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},M.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},M.prototype.onEvent=function(T){T.type==="keydown"&&this.onKeyDown(T)};var N=M;function M(T,O){this.editor=T,this.parent=O,this.dom={}}function R(T){return(R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(T)}function S(T,O){for(var V=0;V<O.length;V++){var z=O[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,function(w){return w=function(k,W){if(R(k)!="object"||!k)return k;var D=k[Symbol.toPrimitive];if(D===void 0)return(W==="string"?String:Number)(k);if(D=D.call(k,W||"default"),R(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}(w,"string"),R(w)=="symbol"?w:w+""}(z.key),z)}}var _=function(){function T(w){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");function k(W){return w.node.findNodeByInternalPath(W)}this.editor=w,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(W){k(W.parentPath).childs[W.index].updateField(W.oldValue)},redo:function(W){k(W.parentPath).childs[W.index].updateField(W.newValue)}},editValue:{undo:function(W){k(W.path).updateValue(W.oldValue)},redo:function(W){k(W.path).updateValue(W.newValue)}},changeType:{undo:function(W){k(W.path).changeType(W.oldType)},redo:function(W){k(W.path).changeType(W.newType)}},appendNodes:{undo:function(W){var D=k(W.parentPath);W.paths.map(k).forEach(function(q){D.removeChild(q)})},redo:function(W){var D=k(W.parentPath);W.nodes.forEach(function(q){D.appendChild(q)})}},insertBeforeNodes:{undo:function(W){var D=k(W.parentPath);W.paths.map(k).forEach(function(q){D.removeChild(q)})},redo:function(W){var D=k(W.parentPath),q=k(W.beforePath);W.nodes.forEach(function(ae){D.insertBefore(ae,q)})}},insertAfterNodes:{undo:function(W){var D=k(W.parentPath);W.paths.map(k).forEach(function(q){D.removeChild(q)})},redo:function(W){var D=k(W.parentPath),q=k(W.afterPath);W.nodes.forEach(function(ae){D.insertAfter(ae,q),q=ae})}},removeNodes:{undo:function(W){var D=k(W.parentPath),q=D.childs[W.index]||D.append;W.nodes.forEach(function(ae){D.insertBefore(ae,q)})},redo:function(W){var D=k(W.parentPath);W.paths.map(k).forEach(function(q){D.removeChild(q)})}},duplicateNodes:{undo:function(W){var D=k(W.parentPath);W.clonePaths.map(k).forEach(function(q){D.removeChild(q)})},redo:function(W){var D=k(W.parentPath),q=k(W.afterPath);W.paths.map(k).forEach(function(ae){var me,ye=ae.clone();D.type==="object"&&(me=D.getFieldNames(),ye.field=(0,y.findUniqueName)(ae.field,me)),D.insertAfter(ye,q),q=ye})}},moveNodes:{undo:function(W){var D=k(W.oldParentPath),q=k(W.newParentPath),ae=D.childs[W.oldIndex]||D.append;q.childs.slice(W.newIndex,W.newIndex+W.count).forEach(function(me,ye){me.field=W.fieldNames[ye],D.moveBefore(me,ae)}),W.newParentPathRedo===null&&(W.newParentPathRedo=q.getInternalPath())},redo:function(W){var D=k(W.oldParentPathRedo),q=k(W.newParentPathRedo),ae=q.childs[W.newIndexRedo]||q.append;D.childs.slice(W.oldIndexRedo,W.oldIndexRedo+W.count).forEach(function(me,ye){me.field=W.fieldNames[ye],q.moveBefore(me,ae)})}},sort:{undo:function(W){var D=k(W.path);D.hideChilds(),D.childs=W.oldChilds,D.updateDom({updateIndexes:!0}),D.showChilds()},redo:function(W){var D=k(W.path);D.hideChilds(),D.childs=W.newChilds,D.updateDom({updateIndexes:!0}),D.showChilds()}},transform:{undo:function(W){k(W.path).setInternalValue(W.oldValue)},redo:function(W){k(W.path).setInternalValue(W.newValue)}}}}return O=T,(V=[{key:"onChange",value:function(){}},{key:"add",value:function(w,k){this.index++,this.history[this.index]={action:w,params:k,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var w=this.history[this.index];if(w){var k=this.actions[w.action];if(k&&k.undo){if(k.undo(w.params),w.params.oldSelection)try{this.editor.setDomSelection(w.params.oldSelection)}catch(W){console.error(W)}}else console.error(new Error('unknown action "'+w.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var w=this.history[this.index];if(w){var k=this.actions[w.action];if(k&&k.redo){if(k.redo(w.params),w.params.newSelection)try{this.editor.setDomSelection(w.params.newSelection)}catch(W){console.error(W)}}else console.error(new Error('unknown action "'+w.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&S(O.prototype,V),z&&S(O,z),Object.defineProperty(O,"prototype",{writable:!1}),O;var O,V,z}();function u(T){return(u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(T)}function E(T,O){for(var V=0;V<O.length;V++){var z=O[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,function(w){return w=function(k,W){if(u(k)!="object"||!k)return k;var D=k[Symbol.toPrimitive];if(D===void 0)return(W==="string"?String:Number)(k);if(D=D.call(k,W||"default"),u(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}(w,"string"),u(w)=="symbol"?w:w+""}(z.key),z)}}var v=function(){function T(ae,D){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");var W=this,ae=(this.editor=ae,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=D,document.createElement("div")),D=((this.dom.wrapper=ae).className="jsoneditor-search",D.appendChild(ae),document.createElement("div")),D=((this.dom.results=D).className="jsoneditor-results",ae.appendChild(D),document.createElement("div")),ae=((this.dom.input=D).className="jsoneditor-frame",D.title=(0,F.Tl)("searchTitle"),ae.appendChild(D),document.createElement("button")),q=(ae.type="button",ae.className="jsoneditor-refresh",D.appendChild(ae),document.createElement("input")),ae=(q.type="text",(this.dom.search=q).oninput=function(me){W._onDelayedSearch(me)},q.onchange=function(me){W._onSearch()},q.onkeydown=function(me){W._onKeyDown(me)},q.onkeyup=function(me){W._onKeyUp(me)},ae.onclick=function(me){q.select()},D.appendChild(q),document.createElement("button")),ae=(ae.type="button",ae.title=(0,F.Tl)("searchNextResultTitle"),ae.className="jsoneditor-next",ae.onclick=function(){W.next()},D.appendChild(ae),document.createElement("button"));ae.type="button",ae.title=(0,F.Tl)("searchPreviousResultTitle"),ae.className="jsoneditor-previous",ae.onclick=function(){W.previous()},D.appendChild(ae)}return O=T,(V=[{key:"next",value:function(w){var k;this.results&&((k=this.resultIndex!==null?this.resultIndex+1:0)>this.results.length-1&&(k=0),this._setActiveResult(k,w))}},{key:"previous",value:function(w){var k,W;this.results&&(k=this.results.length-1,W=this.resultIndex!==null?this.resultIndex-1:k,this._setActiveResult(W=W<0?k:W,w))}},{key:"_setActiveResult",value:function(w,k){var W,D,q;this.activeResult&&(W=this.activeResult.node,this.activeResult.elem==="field"?delete W.searchFieldActive:delete W.searchValueActive,W.updateDom()),this.results&&this.results[w]?(this.resultIndex=w,D=this.results[this.resultIndex].node,(q=this.results[this.resultIndex].elem)==="field"?D.searchFieldActive=!0:D.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],D.updateDom(),D.scrollTo(function(){k&&D.focus(q)})):(this.resultIndex=void 0,this.activeResult=void 0)}},{key:"_clearDelay",value:function(){this.timeout!==void 0&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(w){this._clearDelay();var k=this;this.timeout=setTimeout(function(W){k._onSearch()},this.delay)}},{key:"_onSearch",value:function(w){this._clearDelay();var k=this.dom.search.value,k=0<k.length?k:void 0;if(k!==this.lastText||w){this.lastText=k,this.results=this.editor.search(k);var w=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,W=0;if(this.activeResult){for(var D=0;D<this.results.length;D++)if(this.results[D].node===this.activeResult.node){W=D;break}}this._setActiveResult(W,!1),k!==void 0?(k=this.results.length,this.dom.results.textContent=k===0?"no results":k===1?"1 result":w<k?w+"+ results":k+" results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(w){var k=w.which;k===27?(this.dom.search.value="",this._onSearch(),w.preventDefault(),w.stopPropagation()):k===13&&(w.ctrlKey?this._onSearch(!0):w.shiftKey?this.previous():this.next(),w.preventDefault(),w.stopPropagation())}},{key:"_onKeyUp",value:function(w){var k=w.keyCode;k!==27&&k!==13&&this._onDelayedSearch(w)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return this.dom.search.value===""}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&E(O.prototype,V),z&&E(O,z),Object.defineProperty(O,"prototype",{writable:!1}),O;var O,V,z}();function L(T){return(L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(T)}function G(T,O){for(var V=0;V<O.length;V++){var z=O[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,function(w){return w=function(k,W){if(L(k)!="object"||!k)return k;var D=k[Symbol.toPrimitive];if(D===void 0)return(W==="string"?String:Number)(k);if(D=D.call(k,W||"default"),L(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}(w,"string"),L(w)=="symbol"?w:w+""}(z.key),z)}}var P=function(){function T(w,k){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");w&&(this.root=k,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,w.appendChild(this.path),this.reset())}return O=T,(V=[{key:"reset",value:function(){this.path.textContent=(0,F.Tl)("selectNode")}},{key:"setPath",value:function(w){var k=this;this.path.textContent="",w&&w.length&&w.forEach(function(W,D){var q,ae=document.createElement("span");ae.className="jsoneditor-treepath-element",ae.innerText=W.name,ae.onclick=(function(me){this.selectionCallback&&this.selectionCallback(me)}).bind(k,W),k.path.appendChild(ae),W.children.length&&((q=document.createElement("span")).className="jsoneditor-treepath-seperator",q.textContent="►",q.onclick=function(){k.contentMenuClicked=!0;var me=[];W.children.forEach(function(ye){me.push({text:ye.name,className:"jsoneditor-type-modes"+(w[D+1]+1&&w[D+1].name===ye.name?" jsoneditor-selected":""),click:(function(ke,xe){this.contextMenuCallback&&this.contextMenuCallback(ke,xe)}).bind(k,W,ye.name)})}),new x.t(me,{limitHeight:!0}).show(q,k.root,!0)},k.path.appendChild(q)),D===w.length-1&&(ae=(q||ae).getBoundingClientRect().right,k.path.offsetWidth<ae&&(k.path.scrollLeft=ae),k.path.scrollLeft)&&((ae=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",ae.title="show all path",ae.textContent="...",ae.onclick=(function(me){(k.contentMenuClicked=!1,y.addClassName)(k.path,"show-all"),k.path.style.width=k.path.parentNode.getBoundingClientRect().width-10+"px",k.path.onblur=function(){k.contentMenuClicked?(k.contentMenuClicked=!1,k.path.focus()):((0,y.removeClassName)(k.path,"show-all"),k.path.onblur=void 0,k.path.style.width="",k.setPath(me))}}).bind(k,w),k.path.insertBefore(ae,k.path.firstChild))})}},{key:"onSectionSelected",value:function(w){typeof w=="function"&&(this.selectionCallback=w)}},{key:"onContextMenuItemSelected",value:function(w){typeof w=="function"&&(this.contextMenuCallback=w)}}])&&G(O.prototype,V),z&&G(O,z),Object.defineProperty(O,"prototype",{writable:!1}),O;var O,V,z}(),Y=K(1746),Q=K.n(Y),K={},te=(K.create=function(T,O){if(!T)throw new Error("No container element provided.");function V(pe){var Ce,we;document.createRange?((Ce=document.createRange()).selectNodeContents(pe),Ce.collapse(!1),(we=window.getSelection()).removeAllRanges(),we.addRange(Ce)):document.selection&&((Ce=document.body.createTextRange()).moveToElementText(pe),Ce.collapse(!1),Ce.select())}function z(pe){return q===void 0&&((q=document.createElement("span")).style.visibility="hidden",q.style.position="fixed",q.style.outline="0",q.style.margin="0",q.style.padding="0",q.style.border="0",q.style.left="0",q.style.whiteSpace="pre",q.style.fontSize=me,q.style.fontFamily=ye,q.style.fontWeight="normal",document.body.appendChild(q)),q.textContent=pe,q.getBoundingClientRect().right}function w(){this.style.backgroundColor="#ddd"}function k(){this.style.backgroundColor=""}function W(){fe.hide(),fe.onmouseselection(this.__hint,fe.rs)}var D,q,ae,me,ye,ke,xe,Re,Se,ce,oe,fe,Ee,Ne,He,de;this.container=T,this.dom={},this.highlighter=new J,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.lastSchemaErrors=void 0,this.node=null,this.focusTarget=null,this._setOptions(O),O.autocomplete&&(this.autocomplete=((D=(D=O.autocomplete)||{}).filter=D.filter||"start",D.trigger=D.trigger||"keydown",D.confirmKeys=D.confirmKeys||[39,35,9],D.caseSensitive=D.caseSensitive||!1,ye=me="",(ke=document.createElement("div")).style.position="relative",ke.style.outline="0",ke.style.border="0",ke.style.margin="0",ke.style.padding="0",(xe=document.createElement("div")).className="autocomplete dropdown",xe.style.position="absolute",xe.style.visibility="hidden",Re=xe,Se=[],oe=-1,Ne=fe={rs:Ee={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:ce=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:ke,show:function(pe,Ce,we){var Ae=this;this.startFrom=Ce,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),me===""&&(me=window.getComputedStyle(pe).getPropertyValue("font-size")),ye===""&&(ye=window.getComputedStyle(pe).getPropertyValue("font-family")),xe.style.marginLeft="0",xe.style.marginTop=pe.getBoundingClientRect().height+"px",this.options=we.map(String),this.element!==pe&&(this.element=pe,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=pe.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){Ae.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",He),this.element.addEventListener("keydown",He,!1),this.element.removeEventListener("blur",de),this.element.addEventListener("blur",de,!1)),ke.appendChild(this.elementHint),ke.appendChild(xe),pe.parentElement.appendChild(ke),this.repaint(pe)},setText:function(pe){this.element.innerText=pe},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,Ne.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(Ce){var Ce=(Ce=Ce.innerText).replace(`
`,""),we=this.options.length,Ae=Ce.substring(this.startFrom);ae=Ce.substring(0,this.startFrom);for(var Te=0;Te<we;Te++){var Me=this.options[Te];if(!D.caseSensitive&&Me.toLowerCase().indexOf(Ae.toLowerCase())===0||D.caseSensitive&&Me.indexOf(Ae)===0){this.elementHint.innerText=ae+Ae+Me.substring(Ae.length),this.elementHint.realInnerText=ae+Me;break}}xe.style.left=z(ae)+"px",Ne.refresh(Ae,this.options),this.elementHint.style.width=z(this.elementHint.innerText)+10+"px",xe.style.visibility!=="hidden"&&(this.elementHint.style.width=z(this.elementHint.innerText)+xe.clientWidth+"px")}},hide:function(){Re.style.visibility="hidden"},refresh:function(pe,Ce){Re.style.visibility="hidden",ce=0,Re.textContent="";var Ae=window.innerHeight||document.documentElement.clientHeight,Me=Re.parentNode.getBoundingClientRect(),we=Me.top-6,Ae=Ae-Me.bottom-6,Te=(Se=[],typeof D.filter=="function"?D.filter:U[D.filter]),Me=Te?Ce.filter(function(ee){return Te(D.caseSensitive?pe:pe.toLowerCase(),D.caseSensitive?ee:ee.toLowerCase(),D)}):[];(Se=Me.map(function(ee){var re=document.createElement("div"),he=(re.className="item",re.onmouseover=w,re.onmouseout=k,re.onmousedown=W,re.__hint=ee,re.textContent="",re.appendChild(document.createTextNode(ee.substring(0,pe.length))),document.createElement("b"));return he.appendChild(document.createTextNode(ee.substring(pe.length))),re.appendChild(he),Re.appendChild(re),re})).length===0||Se.length===1&&(pe.toLowerCase()===Se[0].__hint.toLowerCase()&&!D.caseSensitive||pe===Se[0].__hint&&D.caseSensitive)||Se.length<2||(fe.highlight(0),3*Ae<we?(Re.style.maxHeight=we+"px",Re.style.top="",Re.style.bottom="100%"):(Re.style.top="100%",Re.style.bottom="",Re.style.maxHeight=Ae+"px"),Re.style.visibility="visible")},highlight:function(pe){oe!==-1&&Se[oe]&&(Se[oe].className="item"),Se[pe].className="item hover",oe=pe},move:function(pe){return Re.style.visibility==="hidden"?"":(ce+pe!==-1&&ce+pe!==Se.length&&(ce+=pe,fe.highlight(ce)),Se[ce].__hint)},onmouseselection:function(){}},He=(function(pe){var Ce=(pe=pe||window.event).keyCode;if(this.elementHint!=null&&Ce!==33&&Ce!==34)if(Ce===27)Ee.hideDropDown(),Ee.element.focus(),pe.preventDefault(),pe.stopPropagation();else{var we,Ae=(Ae=this.element.innerText).replace(`
`,"");if(0<=D.confirmKeys.indexOf(Ce))Ce===9&&this.elementHint.innerText.length===0&&Ee.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,Ee.hideDropDown(),V(this.element),Ce===9)&&(Ee.element.focus(),pe.preventDefault(),pe.stopPropagation());else if(Ce===13)if(this.elementHint.innerText.length===0)Ee.onEnter();else{var Te=xe.style.visibility==="hidden";if(Ne.hide(),Te)return Ee.hideDropDown(),Ee.element.focus(),void Ee.onEnter();this.element.innerText=this.elementHint.realInnerText,Ee.hideDropDown(),V(this.element),pe.preventDefault(),pe.stopPropagation()}else Ce===40?(Te=Ae.substring(this.startFrom),(we=Ne.move(1))===""&&Ee.onArrowDown(),this.elementHint.innerText=ae+Te+we.substring(Te.length),this.elementHint.realInnerText=ae+we,pe.preventDefault(),pe.stopPropagation()):Ce===38&&(Te=Ae.substring(this.startFrom),(we=Ne.move(-1))===""&&Ee.onArrowUp(),this.elementHint.innerText=ae+Te+we.substring(Te.length),this.elementHint.realInnerText=ae+we,pe.preventDefault(),pe.stopPropagation())}}).bind(Ee),de=function(pe){Ee.hideDropDown()},Ne.onmouseselection=function(pe,Ce){Ce.element.innerText=Ce.elementHint.innerText=ae+pe,Ce.hideDropDown(),window.setTimeout(function(){Ce.element.focus(),V(Ce.element)},1)},Ee)),this.options.history&&this.options.mode!=="view"&&(this.history=new _(this)),this._createFrame(),this._createTable()},K.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.frameFocusTracker.destroy()},K._setOptions=function(T){var O=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,limitDragging:!1,onSelectionChange:null,colorPicker:!0,onColorPicker:function(V,z,w){var k;Q()?(k=V.getBoundingClientRect().top,k=(0,y.getWindow)(V).innerHeight-k<300&&300<k,new(Q())({parent:V,color:z,popup:k?"top":"bottom",onDone:function(W){W=W.rgba[3]===1?W.hex.substr(0,7):W.hex,w(W)}}).show()):console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,timestampFormat:null,createQuery:B.V,executeQuery:B.e,onEvent:null,enableSort:!0,enableTransform:!0},T&&(Object.keys(T).forEach(function(V){O.options[V]=T[V]}),T.limitDragging==null)&&T.schema!=null&&(this.options.limitDragging=!0),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,y.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),T.onSelectionChange&&this.onSelectionChange(T.onSelectionChange),(0,F.AI)(this.options.languages),(0,F.xC)(this.options.language)},K.set=function(T){T instanceof Function||T===void 0?this.clear():(this.content.removeChild(this.table),T={field:this.options.name,value:T},T=new e(this,T),this._setRoot(T),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},K.update=function(T){var O,V;this.node.deepEqual(T)||(O=this.getSelection(),this.onChangeDisabled=!0,this.node.update(T),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),O&&O.start&&O.end&&(T=this.node.findNodeByPath(O.start.path),V=this.node.findNodeByPath(O.end.path),T)&&V?this.setSelection(O.start,O.end):this.setSelection({},{}))},K.get=function(){if(this.node)return this.node.getValue()},K.getText=function(){return JSON.stringify(this.get())},K.setText=function(T){try{this.set((0,y.parse)(T))}catch{T=(0,y.tryJsonRepair)(T),this.set((0,y.parse)(T))}},K.updateText=function(T){try{this.update((0,y.parse)(T))}catch{T=(0,y.tryJsonRepair)(T),this.update((0,y.parse)(T))}},K.setName=function(T){this.options.name=T,this.node&&this.node.updateField(this.options.name)},K.getName=function(){return this.options.name},K.focus=function(){var T=this.scrollableContent.querySelector("[contenteditable=true]");T?T.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(T=this.frame.querySelector("button"))&&T.focus()},K.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},K._setRoot=function(T){this.clear(),(this.node=T).setParent(null),T.setField(this.getName(),!1),delete T.index,this.tbody.appendChild(T.getDom())},K.search=function(T){var O;return this.node?(this.content.removeChild(this.table),O=this.node.search(T),this.content.appendChild(this.table)):O=[],O},K.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},K.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},K.expand=function(T){var O;T&&(O=this.node?this.node.findNodeByPath(T.path):null)&&(T.isExpand?O.expand(T.recursive):O.collapse(T.recursive))},K._onAction=function(T,O){this.history&&this.history.add(T,O),this._onChange()},K._onChange=function(){if(!this.onChangeDisabled){var T;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((T=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(T.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(O){console.error("Error in onChange callback: ",O)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(O){console.error("Error in onChangeJSON callback: ",O)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(O){console.error("Error in onChangeText callback: ",O)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(O){console.error("Error in onNodeName callback: ",O)}}},K.validate=function(){var T=this,O=this.node;if(O){var V=O.getValue(),z=[];this.validateSchema&&!this.validateSchema(V)&&(z=this.validateSchema.errors.map(function(W){return(0,y.improveSchemaError)(W)}).map(function(W){return{node:O.findNode(W.dataPath),error:W,type:"validation"}}).filter(function(W){return W.node!=null}));try{this.validationSequence++;var w=this,k=this.validationSequence;return this._validateCustom(V).then(function(W){return k===w.validationSequence&&(W=[].concat(z,W||[]),w._renderValidationErrors(W),typeof T.options.onValidationError=="function"&&(0,y.isValidationErrorChanged)(W,T.lastSchemaErrors)&&T.options.onValidationError.call(T,W),T.lastSchemaErrors=W),T.lastSchemaErrors})}catch(W){return Promise.reject(W)}}},K._validateAndCatch=function(){this.validate().catch(function(T){console.error("Error running validation:",T)})},K._renderValidationErrors=function(T){this.errorNodes&&this.errorNodes.forEach(function(V){V.setError(null)});var O=T.reduce(function(V,z){return z.node.findParents().filter(function(w){return!V.some(function(k){return k[0]===w})}).map(function(w){return[w,z.node]}).concat(V)},[]);this.errorNodes=O.map(function(V){return{node:V[0],child:V[1],error:{message:V[0].type==="object"?(0,F.Tl)("containsInvalidProperties"):(0,F.Tl)("containsInvalidItems")}}}).concat(T).map(function(V){return V.node.setError(V.error,V.child),V.node})},K._validateCustom=function(T){try{var O,V;if(this.options.onValidate)return O=this.node,V=this.options.onValidate(T),((0,y.isPromise)(V)?V:Promise.resolve(V)).then(function(z){return Array.isArray(z)?z.filter(function(w){var k=(0,y.isValidValidationError)(w);return k||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',w),k}).map(function(w){var k;try{k=w&&w.path?O.findNodeByPath(w.path):null}catch{}return k||console.warn("Ignoring validation error: node not found. Path:",w.path,"Error:",w),{node:k,error:w,type:"customValidation"}}).filter(function(w){return w&&w.node&&w.error&&w.error.message}):null})}catch(z){return Promise.reject(z)}return Promise.resolve(null)},K.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},K.startAutoScroll=function(T){var O=this,V=this.scrollableContent,z=(0,y.getAbsoluteTop)(V),w=V.clientHeight,k=z+w;T<z+24&&0<V.scrollTop?this.autoScrollStep=(z+24-T)/3:k-24<T&&w+V.scrollTop<V.scrollHeight?this.autoScrollStep=(k-24-T)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){O.autoScrollStep?V.scrollTop-=O.autoScrollStep:O.stopAutoScroll()},50)):this.stopAutoScroll()},K.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},K.setDomSelection=function(T){var O,V,z;T&&("scrollTop"in T&&this.scrollableContent&&(this.scrollableContent.scrollTop=T.scrollTop),T.paths?(O=this,V=T.paths.map(function(w){return O.node.findNodeByInternalPath(w)}),this.select(V)):(z=(V=T.path?this.node.findNodeByInternalPath(T.path):null)&&T.domName?V.dom[T.domName]:null,T.range&&z?(T=Object.assign({},T.range,{container:z}),(0,y.setSelectionOffset)(T)):V&&V.focus()))},K.getDomSelection=function(){var T=e.getNodeFromTarget(this.focusTarget),O=this.focusTarget,V=T?Object.keys(T.dom).find(function(w){return T.dom[w]===O}):null,z=(0,y.getSelectionOffset)();return(z=(z=z&&z.container.nodeName!=="DIV"?null:z)&&z.container!==O?null:z)&&delete z.container,{path:T?T.getInternalPath():null,domName:V,range:z,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(w){return w.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},K.scrollTo=function(T,O){var V,z,w,k,W=this.scrollableContent;W?((V=this).animateTimeout&&(clearTimeout(V.animateTimeout),delete V.animateTimeout),V.animateCallback&&(V.animateCallback(!1),delete V.animateCallback),z=W.clientHeight,w=W.scrollHeight-z,k=Math.min(Math.max(T-z/4,0),w),function D(){var q=W.scrollTop,q=k-q;3<Math.abs(q)?(W.scrollTop+=q/3,V.animateCallback=O,V.animateTimeout=setTimeout(D,50)):(O&&O(!0),W.scrollTop=k,delete V.animateTimeout,delete V.animateCallback)}()):O&&O(!1)},K._createFrame=function(){var T=this,O=(this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame),this.contentOuter=document.createElement("div"),this.contentOuter.className="jsoneditor-outer",this);function V(D){O._onEvent&&O._onEvent(D)}var z,w,k,W={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new H.$(W),this.frame.onclick=function(D){var q=D.target;V(D),q.nodeName==="BUTTON"&&D.preventDefault()},this.frame.oninput=V,this.frame.onchange=V,this.frame.onkeydown=V,this.frame.onkeyup=V,this.frame.oncut=V,this.frame.onpaste=V,this.frame.onmousedown=V,this.frame.onmouseup=V,this.frame.onmouseover=V,this.frame.onmouseout=V,(0,y.addEventListener)(this.frame,"focus",V,!0),(0,y.addEventListener)(this.frame,"blur",V,!0),this.frame.onfocusin=V,this.frame.onfocusout=V,this.options.mainMenuBar&&((0,y.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(W=document.createElement("button")).type="button",W.className="jsoneditor-expand-all",W.title=(0,F.Tl)("expandAll"),W.onclick=function(){O.expandAll(),typeof T.options.onExpand=="function"&&T.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(W),(W=document.createElement("button")).type="button",W.title=(0,F.Tl)("collapseAll"),W.className="jsoneditor-collapse-all",W.onclick=function(){O.collapseAll(),typeof T.options.onExpand=="function"&&T.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(W),this.options.enableSort&&((W=document.createElement("button")).type="button",W.className="jsoneditor-sort",W.title=(0,F.Tl)("sortTitleShort"),W.onclick=function(){O.node.showSortModal()},this.menu.appendChild(W)),this.options.enableTransform&&((W=document.createElement("button")).type="button",W.title=(0,F.Tl)("transformTitleShort"),W.className="jsoneditor-transform",W.onclick=function(){O.node.showTransformModal()},this.menu.appendChild(W)),this.history&&((z=document.createElement("button")).type="button",z.className="jsoneditor-undo jsoneditor-separator",z.title=(0,F.Tl)("undo"),z.onclick=function(){O._onUndo()},this.menu.appendChild(z),this.dom.undo=z,(w=document.createElement("button")).type="button",w.className="jsoneditor-redo",w.title=(0,F.Tl)("redo"),w.onclick=function(){O._onRedo()},this.menu.appendChild(w),this.dom.redo=w,this.history.onChange=function(){z.disabled=!O.history.canUndo(),w.disabled=!O.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((k=this).modeSwitcher=new b.n(this.menu,this.options.modes,this.options.mode,function(D){try{k.setMode(D),k.modeSwitcher.focus()}catch(q){k._onError(q)}})),this.options.search)&&(this.searchBox=new v(this,this.menu)),this.options.navigationBar&&(this.navBar=document.createElement("div"),this.navBar.className="jsoneditor-navigation-bar nav-bar-empty",this.frame.appendChild(this.navBar),this.treePath=new P(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},K._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},K._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},K._onEvent=function(T){if(!e.targetIsColorPicker(T.target)){var O,V=e.getNodeFromTarget(T.target);if(T.type==="keydown"&&this._onKeyDown(T),V&&T.type==="focus"&&(this.focusTarget=T.target,this.options.autocomplete)&&this.options.autocomplete.trigger==="focus"&&this._showAutoComplete(T.target),T.type==="mousedown"&&this._startDragDistance(T),T.type!=="mousemove"&&T.type!=="mouseup"&&T.type!=="click"||this._updateDragDistance(T),V&&this.options&&this.options.navigationBar&&V&&(T.type==="keydown"||T.type==="mousedown")&&(O=this,setTimeout(function(){O._updateTreePath(V.getNodePath())})),V&&V.selected){if(T.type==="click"){if(T.target===V.dom.menu)return void this.showContextMenu(T.target);T.hasMoved||this.deselect()}T.type==="mousedown"&&e.onDragStart(this.multiselection.nodes,T)}else T.type==="mousedown"&&(0,y.hasParentNode)(T.target,this.content)&&(this.deselect(),V&&T.target===V.dom.drag?e.onDragStart(V,T):V&&(T.target===V.dom.field||T.target===V.dom.value||T.target===V.dom.select)||this._onMultiSelectStart(T));V&&V.onEvent(T)}},K._updateTreePath=function(T){var O;function V(z){return z.parent?z.parent.type==="array"?z.index:z.field:z.field||z.type}T&&T.length?((0,y.removeClassName)(this.navBar,"nav-bar-empty"),O=[],T.forEach(function(z){var w={name:V(z),node:z,children:[]};z.childs&&z.childs.length&&z.childs.forEach(function(k){w.children.push({name:V(k),node:k})}),O.push(w)}),this.treePath.setPath(O)):(0,y.addClassName)(this.navBar,"nav-bar-empty")},K._onTreePathSectionSelected=function(T){T&&T.node&&(T.node.expandTo(),T.node.focus())},K._onTreePathMenuItemSelected=function(T,O){T&&T.children.length&&(T=T.children.find(function(V){return V.name===O}))&&T.node&&(this._updateTreePath(T.node.getNodePath()),T.node.expandTo(),T.node.focus())},K._startDragDistance=function(T){this.dragDistanceEvent={initialTarget:T.target,initialPageX:T.pageX,initialPageY:T.pageY,dragDistance:0,hasMoved:!1}},K._updateDragDistance=function(T){this.dragDistanceEvent||this._startDragDistance(T);var O=T.pageX-this.dragDistanceEvent.initialPageX,V=T.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(O*O+V*V),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,T.dragDistance=this.dragDistanceEvent.dragDistance,T.hasMoved=this.dragDistanceEvent.hasMoved,T.dragDistance},K._onMultiSelectStart=function(T){var O,V=e.getNodeFromTarget(T.target);this.options.mode==="tree"&&this.options.onEditable===void 0&&(this.multiselection={start:V||null,end:null,nodes:[]},this._startDragDistance(T),(O=this).mousemove||(this.mousemove=(0,y.addEventListener)(T.view,"mousemove",function(z){O._onMultiSelect(z)})),this.mouseup||(this.mouseup=(0,y.addEventListener)(T.view,"mouseup",function(z){O._onMultiSelectEnd(z)})),T.preventDefault())},K._onMultiSelect=function(T){var O;T.preventDefault(),this._updateDragDistance(T),T.hasMoved&&((T=e.getNodeFromTarget(T.target))&&(this.multiselection.start==null&&(this.multiselection.start=T),this.multiselection.end=T),this.deselect(),T=this.multiselection.start,O=this.multiselection.end||this.multiselection.start,T)&&O&&(this.multiselection.nodes=this._findTopLevelNodes(T,O),this.multiselection.nodes&&this.multiselection.nodes.length&&(T=this.multiselection.nodes[0],this.multiselection.start===T||this.multiselection.start.isDescendantOf(T)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes))},K._onMultiSelectEnd=function(T){var O=this.multiselection.nodes[0];O&&O.dom.menu&&O.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,y.removeEventListener)(T.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,y.removeEventListener)(T.view,"mouseup",this.mouseup),delete this.mouseup)},K.deselect=function(T){var O=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(V){V.setSelected(!1)}),this.multiselection.nodes=[],T&&(this.multiselection.start=null,this.multiselection.end=null),O&&this._selectionChangedHandler&&this._selectionChangedHandler()},K.select=function(T){if(!Array.isArray(T))return this.select([T]);var O;T&&(this.deselect(),this.multiselection.nodes=T.slice(0),O=T[0],T.forEach(function(V){V.expandPathToNode(),V.setSelected(!0,V===O)}),this._selectionChangedHandler)&&(T=this.getSelection(),this._selectionChangedHandler(T.start,T.end))},K._findTopLevelNodes=function(W,D){for(var V=W.getNodePath(),z=D.getNodePath(),w=0;w<V.length&&V[w]===z[w];)w++;var k,W=V[w-1],D=V[w],q=z[w];return D&&q||(W.parent?W=(q=D=W).parent:(D=W.childs[0],q=W.childs[W.childs.length-1])),W&&D&&q?(D=W.childs.indexOf(D),q=W.childs.indexOf(q),k=Math.min(D,q),D=Math.max(D,q),W.childs.slice(k,D+1)):[]},K._showAutoComplete=function(T){var O,V=e.getNodeFromTarget(T),z="";0<=T.className.indexOf("jsoneditor-value")&&(z="value"),(z=0<=T.className.indexOf("jsoneditor-field")?"field":z)!==""&&(O=this,setTimeout(function(){var w;!V||!(O.options.autocomplete.trigger==="focus"||0<T.innerText.length)||(w=O.options.autocomplete.getOptions(T.innerText,V.getPath(),z,V.editor))===null?O.autocomplete.hideDropDown():typeof w.then=="function"?w.then(function(k){k===null?O.autocomplete.hideDropDown():k.options?O.autocomplete.show(T,k.startFrom,k.options):O.autocomplete.show(T,0,k)}).catch(function(k){console.error(k)}):w.options?O.autocomplete.show(T,w.startFrom,w.options):O.autocomplete.show(T,0,w)},50))},K._onKeyDown=function(T){var O,V=T.which||T.keyCode,z=T.altKey,w=T.ctrlKey,k=T.metaKey,W=T.shiftKey,D=!1,q=this.focusTarget;V===9&&(O=this,setTimeout(function(){O.focusTarget!==q&&(0,y.selectContentEditable)(O.focusTarget)},0)),this.searchBox&&(w&&V===70?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),D=!0):(V===114||w&&V===71)&&(W?this.searchBox.previous(!0):this.searchBox.next(!0),D=!0)),this.history&&(w&&!W&&V===90?(this._onUndo(),D=!0):w&&W&&V===90&&(this._onRedo(),D=!0)),!this.options.autocomplete||D||w||z||k||T.key.length!==1&&V!==8&&V!==46||(D=!1,this._showAutoComplete(T.target)),D&&(T.preventDefault(),T.stopPropagation())},K._createTable=function(){var T;this.options.navigationBar&&(0,y.addClassName)(this.contentOuter,"has-nav-bar"),this.scrollableContent=document.createElement("div"),this.scrollableContent.className="jsoneditor-tree",this.contentOuter.appendChild(this.scrollableContent),this.content=document.createElement("div"),this.content.className="jsoneditor-tree-inner",this.scrollableContent.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),this.options.mode==="tree"&&((T=document.createElement("col")).width="24px",this.colgroupContent.appendChild(T)),(T=document.createElement("col")).width="24px",this.colgroupContent.appendChild(T),T=document.createElement("col"),this.colgroupContent.appendChild(T),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},K.showContextMenu=function(T,O){var V,z=[],w=this.multiselection.nodes.slice();z.push({text:(0,F.Tl)("duplicateText"),title:(0,F.Tl)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){e.onDuplicate(w)}}),z.push({text:(0,F.Tl)("remove"),title:(0,F.Tl)("removeTitle"),className:"jsoneditor-remove",click:function(){e.onRemove(w)}}),this.options.onCreateMenu&&(V=w.map(function(k){return k.getPath()}),z=this.options.onCreateMenu(z,{type:"multiple",path:V[0],paths:V})),new x.t(z,{close:O}).show(T,this.getPopupAnchor())},K.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},K.getSelection=function(){var T,O,V={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(T=this.multiselection.nodes[0],O=this.multiselection.nodes[this.multiselection.nodes.length-1],this.multiselection.direction==="down"?(V.start=T.serialize(),V.end=O.serialize()):(V.start=O.serialize(),V.end=T.serialize())),V},K.onSelectionChange=function(T){typeof T=="function"&&(this._selectionChangedHandler=(0,y.debounce)(T,this.DEBOUNCE_INTERVAL))},K.setSelection=function(T,O){T&&T.dom&&T.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(T)),T=this._getNodeInstancesByRange(T,O),T.forEach(function(V){V.expandTo()}),this.select(T)},K._getNodeInstancesByRange=function(T,O){T&&T.path&&(V=this.node.findNodeByPath(T.path),O)&&O.path&&(z=this.node.findNodeByPath(O.path));var V,z,w=[];if(V instanceof e)if(z instanceof e&&z!==V)if(V.parent===z.parent){O=V.getIndex()<z.getIndex()?(T=V,z):(T=z,V);var k=T;for(w.push(k);k=k.nextSibling(),w.push(k),k&&k!==O;);}else w=this._findTopLevelNodes(V,z);else w.push(V);return w},K.getNodesByRange=function(V,O){var V=this._getNodeInstancesByRange(V,O),z=[];return V.forEach(function(w){z.push(w.serialize())}),z},[{mode:"tree",mixin:K,data:"json"},{mode:"view",mixin:K,data:"json"},{mode:"form",mixin:K,data:"json"}])},2870:function(le,m,Z){m.tryRequireAjv=function(){try{return Z(2229)}catch{}}},5467:function(le,m,Z){m.J=function(){try{Z(9762)}catch(U){console.error(U)}}},6237:function(le,U,Z){Z.r(U),Z.d(U,{addClassName:function(){return l},addEventListener:function(){return Y},asyncExec:function(){return Te},clear:function(){return n},compileJSONPointer:function(){return me},contains:function(){return Ce},debounce:function(){return k},escapeUnicodeChars:function(){return d},extend:function(){return h},findUniqueName:function(){return Se},formatSize:function(){return He},get:function(){return Re},getAbsoluteLeft:function(){return e},getAbsoluteTop:function(){return r},getChildPaths:function(){return ce},getColorCSS:function(){return ye},getIndexForPosition:function(){return q},getInnerText:function(){return u},getInputSelection:function(){return D},getInternetExplorerVersion:function(){return L},getPositionForPath:function(){return ae},getSelection:function(){return M},getSelectionOffset:function(){return S},getType:function(){return o},getWindow:function(){return t},hasParentNode:function(){return v},improveSchemaError:function(){return O},insideRect:function(){return w},isArray:function(){return a},isChildOf:function(){return K},isFirefox:function(){return P},isObject:function(){return pe},isPromise:function(){return V},isTimestamp:function(){return Ne},isUrl:function(){return s},isValidColor:function(){return ke},isValidValidationError:function(){return z},isValidationErrorChanged:function(){return we},limitCharacters:function(){return de},makeFieldTooltip:function(){return xe},parse:function(){return y},parsePath:function(){return te},parseString:function(){return Ee},removeAllClassNames:function(){return p},removeClassName:function(){return g},removeEventListener:function(){return Q},removeReturnsAndSurroundingWhitespace:function(){return E},selectContentEditable:function(){return N},setEndOfContentEditable:function(){return A},setSelection:function(){return R},setSelectionOffset:function(){return _},sort:function(){return oe},sortObjectKeys:function(){return fe},stringifyPath:function(){return T},stripFormatting:function(){return I},textDiff:function(){return W},tryJsonRepair:function(){return f},uniqueMergeArrays:function(){return Ae},validate:function(){return c}}),Z(1081);var U=Z(1342),x=Z.n(U),H=Z(9857),X=Z(5736),j=Z(3094),J=Z(3057);function F(ee){return function(re){if(Array.isArray(re))return B(re)}(ee)||function(re){if(typeof Symbol<"u"&&re[Symbol.iterator]!=null||re["@@iterator"]!=null)return Array.from(re)}(ee)||function(re,he){{var ve;if(re)return typeof re=="string"?B(re,he):(ve=(ve={}.toString.call(re).slice(8,-1))==="Object"&&re.constructor?re.constructor.name:ve)==="Map"||ve==="Set"?Array.from(re):ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve)?B(re,he):void 0}}(ee)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function B(ee,re){(re==null||re>ee.length)&&(re=ee.length);for(var he=0,ve=Array(re);he<re;he++)ve[he]=ee[he];return ve}function b(ee){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re})(ee)}var C=1e4,$=9466848e5;function y(ee){try{return JSON.parse(ee)}catch(re){throw c(ee),re}}function f(ee){try{return(0,H.m)(ee)}catch{return ee}}function d(ee){return ee.replace(/[\u007F-\uFFFF]/g,function(re){return"\\u"+("0000"+re.charCodeAt(0).toString(16)).slice(-4)})}function c(ee){(X!==void 0?X:JSON).parse(ee)}function h(ee,re){for(var he in re)Me(re,he)&&(ee[he]=re[he]);return ee}function n(ee){for(var re in ee)Me(ee,re)&&delete ee[re];return ee}function o(ee){return ee===null?"null":ee===void 0?"undefined":ee instanceof Number||typeof ee=="number"?"number":ee instanceof String||typeof ee=="string"?"string":ee instanceof Boolean||typeof ee=="boolean"?"boolean":ee instanceof RegExp?"regexp":a(ee)?"array":"object"}var i=/^https?:\/\/\S+$/;function s(ee){return(typeof ee=="string"||ee instanceof String)&&i.test(ee)}function a(ee){return Object.prototype.toString.call(ee)==="[object Array]"}function t(ee){return ee.ownerDocument.defaultView}function e(ee){return ee.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function r(ee){return ee.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function l(ee,re){var he=ee.className.split(" ");he.indexOf(re)===-1&&(he.push(re),ee.className=he.join(" "))}function p(ee){ee.className=""}function g(ee,ve){var he=ee.className.split(" "),ve=he.indexOf(ve);ve!==-1&&(he.splice(ve,1),ee.className=he.join(" "))}function I(ee){for(var re=ee.childNodes,he=0,ve=re.length;he<ve;he++){var $e=re[he],Ie=($e.style&&$e.removeAttribute("style"),$e.attributes);if(Ie)for(var be=Ie.length-1;0<=be;be--){var We=Ie[be];We.specified===!0&&$e.removeAttribute(We.name)}I($e)}}function A(ee){var re;document.createRange&&((re=document.createRange()).selectNodeContents(ee),re.collapse(!1),(ee=window.getSelection()).removeAllRanges(),ee.addRange(re))}function N(ee){var re;ee&&ee.nodeName==="DIV"&&window.getSelection&&document.createRange&&((re=document.createRange()).selectNodeContents(ee),(ee=window.getSelection()).removeAllRanges(),ee.addRange(re))}function M(){if(window.getSelection){var ee=window.getSelection();if(ee.getRangeAt&&ee.rangeCount)return ee.getRangeAt(0)}return null}function R(ee){var re;ee&&window.getSelection&&((re=window.getSelection()).removeAllRanges(),re.addRange(ee))}function S(){var ee=M();return ee&&"startOffset"in ee&&"endOffset"in ee&&ee.startContainer&&ee.startContainer===ee.endContainer?{startOffset:ee.startOffset,endOffset:ee.endOffset,container:ee.startContainer.parentNode}:null}function _(ee){var re;document.createRange&&window.getSelection&&window.getSelection()&&(re=document.createRange(),ee.container.firstChild||ee.container.appendChild(document.createTextNode("")),re.setStart(ee.container.firstChild,ee.startOffset),re.setEnd(ee.container.firstChild,ee.endOffset),R(re))}function u(ee,re){var he;if(re===void 0&&(re={_text:"",flush:function(){var Xe=this._text;return this._text="",Xe},set:function(Xe){this._text=Xe}}),ee.nodeValue)return(he=E(ee.nodeValue))!==""?re.flush()+he:"";if(ee.hasChildNodes()){for(var ve=ee.childNodes,$e="",Ie=0,be=ve.length;Ie<be;Ie++){var We,Ve=ve[Ie];Ve.nodeName==="DIV"||Ve.nodeName==="P"?((We=(We=ve[Ie-1])?We.nodeName:void 0)&&We!=="DIV"&&We!=="P"&&We!=="BR"&&($e!==""&&($e+=`
`),re.flush()),$e+=u(Ve,re),re.set(`
`)):Ve.nodeName==="BR"?($e+=re.flush(),re.set(`
`)):$e+=u(Ve,re)}return $e}return""}function E(ee){return ee.replace(/(\b|^)\s*(\b|$)/g,function(re){return/\n/.exec(re)?"":re})}function v(ee,re){for(var he=ee?ee.parentNode:void 0;he;){if(he===re)return!0;he=he.parentNode}return!1}function L(){var ee;return G===-1&&(ee=-1,typeof navigator<"u"&&navigator.appName==="Microsoft Internet Explorer"&&/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)!=null&&(ee=parseFloat(RegExp.$1)),G=ee),G}var G=-1;function P(){return typeof navigator<"u"&&navigator.userAgent.indexOf("Firefox")!==-1}function Y(ee,re,he,ve){return ee.addEventListener?(ve===void 0&&(ve=!1),re==="mousewheel"&&P()&&(re="DOMMouseScroll"),ee.addEventListener(re,he,ve),he):ee.attachEvent?(ee.attachEvent("on"+re,ve=function(){return he.call(ee,window.event)}),ve):void 0}function Q(ee,re,he,ve){ee.removeEventListener?(ve===void 0&&(ve=!1),re==="mousewheel"&&P()&&(re="DOMMouseScroll"),ee.removeEventListener(re,he,ve)):ee.detachEvent&&ee.detachEvent("on"+re,he)}function K(ee,re){for(var he=ee.parentNode;he;){if(he===re)return!0;he=he.parentNode}return!1}function te(ee){var re=[],he=0;function ve(Ie){for(var be="";ee[he]!==void 0&&ee[he]!==Ie;)be+=ee[he],he++;if(ee[he]!==Ie)throw new Error("Invalid JSON path: unexpected end, character "+Ie+" expected");return be}for(;ee[he]!==void 0;)if(ee[he]===".")he++,re.push(function(){for(var Ie="";ee[he]!==void 0&&/[\w$]/.test(ee[he]);)Ie+=ee[he],he++;if(Ie==="")throw new Error("Invalid JSON path: property name expected at index "+he);return Ie}());else{if(ee[he]!=="[")throw new Error('Invalid JSON path: unexpected character "'+ee[he]+'" at index '+he);if(ee[++he]==="'"||ee[he]==='"'){var $e=ee[he];if(he++,re.push(ve($e)),ee[he]!==$e)throw new Error("Invalid JSON path: closing quote ' expected at index "+he);he++}else{if($e=ve("]").trim(),$e.length===0)throw new Error("Invalid JSON path: array value expected at index "+he);$e=$e==="*"?$e:JSON.parse($e),re.push($e)}if(ee[he]!=="]")throw new Error("Invalid JSON path: closing bracket ] expected at index "+he);he++}return re}function T(ee){return ee.map(function(re){return typeof re=="number"?"["+re+"]":typeof re=="string"&&re.match(/^[A-Za-z0-9_$]+$/)?"."+re:'["'+re+'"]'}).join("")}function O(ee){var re,he;return ee.keyword==="enum"&&Array.isArray(ee.schema)&&(he=ee.schema)&&(5<(he=he.map(function(ve){return JSON.stringify(ve)})).length&&(re=["("+(he.length-5)+" more...)"],(he=he.slice(0,5)).push(re)),ee.message="should be equal to one of: "+he.join(", ")),ee.keyword==="additionalProperties"&&(ee.message="should NOT have additional property: "+ee.params.additionalProperty),ee}function V(ee){return ee&&typeof ee.then=="function"&&typeof ee.catch=="function"}function z(ee){return b(ee)==="object"&&Array.isArray(ee.path)&&typeof ee.message=="string"}function w(ee,re,he){return he=he!==void 0?he:0,re.left-he>=ee.left&&re.right+he<=ee.right&&re.top-he>=ee.top&&re.bottom+he<=ee.bottom}function k(ee,re,he){var ve;return function(){var $e=this,Ie=arguments,be=he&&!ve;clearTimeout(ve),ve=setTimeout(function(){ve=null,he||ee.apply($e,Ie)},re),be&&ee.apply($e,Ie)}}function W(ee,re){for(var he=re.length,ve=0,$e=ee.length,Ie=re.length;re.charAt(ve)===ee.charAt(ve)&&ve<he;)ve++;for(;re.charAt(Ie-1)===ee.charAt($e-1)&&ve<Ie&&0<$e;)Ie--,$e--;return{start:ve,end:Ie}}function D(ee){var re,he,ve,$e,Ie=0,be=0;return typeof ee.selectionStart=="number"&&typeof ee.selectionEnd=="number"?(Ie=ee.selectionStart,be=ee.selectionEnd):($e=document.selection.createRange())&&$e.parentElement()===ee&&(ve=ee.value.length,re=ee.value.replace(/\r\n/g,`
`),(he=ee.createTextRange()).moveToBookmark($e.getBookmark()),($e=ee.createTextRange()).collapse(!1),-1<he.compareEndPoints("StartToEnd",$e)?Ie=be=ve:(Ie=-he.moveStart("character",-ve),Ie+=re.slice(0,Ie).split(`
`).length-1,-1<he.compareEndPoints("EndToEnd",$e)?be=ve:(be=-he.moveEnd("character",-ve),be+=re.slice(0,be).split(`
`).length-1))),{startIndex:Ie,endIndex:be,start:We(Ie),end:We(be)};function We(Ve){return Ve=ee.value.substring(0,Ve),{row:(Ve.match(/\n/g)||[]).length+1,column:Ve.length-Ve.lastIndexOf(`
`)}}}function q(ve,re,he){var ve=ve.value||"";return 0<re&&0<he?(ve=ve.split(`
`,re),re=Math.min(ve.length,re),he=Math.min(ve[re-1].length,he-1),he=re===1?he:he+1,ve.slice(0,re-1).join(`
`).length+he):-1}function ae(ee,re){var he,ve=[];if(re&&re.length){try{he=j.parse(ee)}catch{return ve}re.forEach(function($e){var Ie=me(te($e)),Ie=he.pointers[Ie];Ie&&ve.push({path:$e,line:Ie.key?Ie.key.line:Ie.value?Ie.value.line:0,column:Ie.key?Ie.key.column:Ie.value?Ie.value.column:0})})}return ve}function me(ee){return ee.map(function(re){return"/"+String(re).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function ye(ee){var re=document.createElement("div");return re.style.color=ee,re.style.color.split(/\s+/).join("").toLowerCase()||null}function ke(ee){return!!ye(ee)}function xe(ee,re){var he;return ee?(he="",ee.title&&(he+=ee.title),ee.description&&(0<he.length&&(he+=`
`),he+=ee.description),ee.default&&(0<he.length&&(he+=`

`),he=(he+=(0,J.Tl)("default",void 0,re)+`
`)+JSON.stringify(ee.default,null,2)),Array.isArray(ee.examples)&&0<ee.examples.length&&(0<he.length&&(he+=`

`),he+=(0,J.Tl)("examples",void 0,re)+`
`,ee.examples.forEach(function(ve,$e){he+=JSON.stringify(ve,null,2),$e!==ee.examples.length-1&&(he+=`
`)})),he):""}function Re(ee,re){for(var he=ee,ve=0;ve<re.length&&he!=null;ve++)he=he[re[ve]];return he}function Se(ee,re){for(var he=ee.replace(/ \(copy( \d+)?\)$/,""),ve=he,$e=1;re.indexOf(ve)!==-1;)ve=he+" ("+("copy"+(1<$e?" "+$e:""))+")",$e++;return ve}function ce(ee,re){var he={};if(Array.isArray(ee))for(var ve=Math.min(ee.length,C),$e=0;$e<ve;$e++)(function Ie(be,We,Ve,Xe){(Array.isArray(be)||pe(be))&&!Xe||(We[Ve||""]=!0),pe(be)&&Object.keys(be).forEach(function(ie){Ie(be[ie],We,Ve+"."+ie,Xe)})})(ee[$e],he,"",re);else he[""]=!0;return Object.keys(he).sort()}function oe(ee,Ie,he){var ve=Ie&&Ie!=="."?te(Ie):[],$e=he==="desc"?-1:1,Ie=ee.slice();return Ie.sort(function(be,We){return be=Re(be,ve),We=Re(We,ve),$e*(We<be?1:be<We?-1:0)}),Ie}function fe(ee,ve){var he=ve==="desc"?-1:1,ve=Object.keys(ee).sort(function(Ie,be){return he*x()(Ie,be)}),$e={};return ve.forEach(function(Ie){$e[Ie]=ee[Ie]}),$e}function Ee(ee){var re,he;return ee===""?"":(re=ee.toLowerCase())==="null"?null:re==="true"||re!=="false"&&(/^0\d+$/.test(ee)||/^0[xbo]/i.test(ee)||(re=Number(ee),he=parseFloat(ee),isNaN(re))||isNaN(he)?ee:re)}function Ne(ee,re){return typeof re=="number"&&$<re&&isFinite(re)&&Math.floor(re)===re&&!isNaN(new Date(re).valueOf())}function He(ee){return ee<900?ee.toFixed()+" B":(ee=ee/1e3)<900?ee.toFixed(1)+" KB":(ee=ee/1e3)<900?ee.toFixed(1)+" MB":(ee=ee/1e3)<900?ee.toFixed(1)+" GB":(ee/1e3).toFixed(1)+" TB"}function de(ee,re){return ee.length<=re?ee:ee.slice(0,re)+"..."}function pe(ee){return b(ee)==="object"&&ee!==null&&!Array.isArray(ee)}function Ce(ee,re){return ee.indexOf(re)!==-1}function we(ee,re){if(re||ee){if(re&&!ee||!re&&ee||re.length!==ee.length)return!0;for(var he,ve=0;ve<ee.length;++ve)if(he=function($e){var Ie=ee[$e].type==="error"?re.find(function(be){return be.line===ee[$e].line}):re.find(function(be){return be.dataPath===ee[$e].dataPath&&be.schemaPath===ee[$e].schemaPath});if(!Ie)return{v:!0}}(ve))return he.v}return!1}function Ae(ee,re){return ee=ee!=null&&ee.length?ee:[],re=re!=null&&re.length?re:[],F(new Set(ee.concat(re)))}function Te(ee){setTimeout(ee)}function Me(ee,re){return Object.prototype.hasOwnProperty.call(ee,re)}},1746:function(le,m,Z){var U;if(window.Picker)U=window.Picker;else try{U=Z(7598)}catch{}le.exports=U},6990:function(le,m,Z){var U,x,H,X,j,J,F,B;le=Z.nmd(le),(H=function(){return this}())||typeof window>"u"||(H=window),(X=function(b,C,$){typeof b!="string"?X.original?X.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(arguments.length==2&&($=C),X.modules[b]||(X.payloads[b]=$,X.modules[b]=null))}).modules={},X.payloads={},j=function(b,C,$){if(typeof C=="string"){var y=B(b,C);if(y!=null)return $&&$(),y}else if(Object.prototype.toString.call(C)==="[object Array]"){for(var f=[],d=0,c=C.length;d<c;++d){var h=B(b,C[d]);if(h==null&&J.original)return;f.push(h)}return $&&$.apply(null,f)||!0}},J=function(b,C){return b=j("",b,C),b==null&&J.original?J.original.apply(this,arguments):b},F=function(b,C){var $;if(C.indexOf("!")!==-1)return $=C.split("!"),F(b,$[0])+"!"+F(b,$[1]);if(C.charAt(0)==".")for(C=b.split("/").slice(0,-1).join("/")+"/"+C;C.indexOf(".")!==-1&&y!=C;){var y=C;C=C.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return C},B=function(f,C){C=F(f,C);var $,y,f=X.modules[C];return f||(typeof(f=X.payloads[C])=="function"&&($={id:C,uri:"",exports:y={},packaged:!0},y=f(function(d,c){return j(C,d,c)},y,$)||$.exports,X.modules[C]=y,delete X.payloads[C]),f=X.modules[C]=y||f),f},x=H,(U="ace")&&(H[U]||(H[U]={}),x=H[U]),x.define&&x.define.packaged||(X.original=x.define,x.define=X,x.define.packaged=!0),x.require&&x.require.packaged||(J.original=x.require,x.require=J,x.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],function(b,C,$){function y(f,d,c){Object.defineProperty(f,d,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||y(String.prototype,"startsWith",function(f,d){return this.lastIndexOf(f,d=d||0)===d}),String.prototype.endsWith||y(String.prototype,"endsWith",function(f,d){return(d===void 0||d>this.length)&&(d=this.length),d-=f.length,f=this.indexOf(f,d),f!==-1&&f===d}),String.prototype.repeat||y(String.prototype,"repeat",function(f){for(var d="",c=this;0<f;)1&f&&(d+=c),(f>>=1)&&(c+=c);return d}),String.prototype.includes||y(String.prototype,"includes",function(f,d){return this.indexOf(f,d)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(f),c=1;c<arguments.length;c++){var h=arguments[c];h!=null&&Object.keys(h).forEach(function(n){d[n]=h[n]})}return d}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(d){return f[d]})}),Array.prototype.find||y(Array.prototype,"find",function(f){for(var d=this.length,c=arguments[1],h=0;h<d;h++){var n=this[h];if(f.call(c,n,h,this))return n}}),Array.prototype.findIndex||y(Array.prototype,"findIndex",function(f){for(var d=this.length,c=arguments[1],h=0;h<d;h++){var n=this[h];if(f.call(c,n,h,this))return h}}),Array.prototype.includes||y(Array.prototype,"includes",function(f,d){return this.indexOf(f,d)!=-1}),Array.prototype.fill||y(Array.prototype,"fill",function(f){for(var d=this.length>>>0,h=arguments[1]>>0,c=h<0?Math.max(d+h,0):Math.min(h,d),h=arguments[2],h=h===void 0?d:h>>0,n=h<0?Math.max(d+h,0):Math.min(h,d);c<n;)this[c]=f,c++;return this}),Array.of||y(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(b,C,$){b("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(b,C,$){C.deepCopy=function y(f){if(typeof f!="object"||!f)return f;if(Array.isArray(f))for(var d=[],c=0;c<f.length;c++)d[c]=y(f[c]);else{if(Object.prototype.toString.call(f)!=="[object Object]")return f;for(var c in d={},f)d[c]=y(f[c])}return d}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(b,C,$){C.last=function(d){return d[d.length-1]},C.stringReverse=function(d){return d.split("").reverse().join("")},C.stringRepeat=function(d,c){for(var h="";0<c;)1&c&&(h+=d),(c>>=1)&&(d+=d);return h};var y=/^\s\s*/,f=/\s\s*$/;C.stringTrimLeft=function(d){return d.replace(y,"")},C.stringTrimRight=function(d){return d.replace(f,"")},C.copyObject=function(d){var c,h={};for(c in d)h[c]=d[c];return h},C.copyArray=function(d){for(var c=[],h=0,n=d.length;h<n;h++)d[h]&&typeof d[h]=="object"?c[h]=this.copyObject(d[h]):c[h]=d[h];return c},C.deepCopy=b("./deep_copy").deepCopy,C.arrayToMap=function(d){for(var c={},h=0;h<d.length;h++)c[d[h]]=1;return c},C.createMap=function(d){var c,h=Object.create(null);for(c in d)h[c]=d[c];return h},C.arrayRemove=function(d,c){for(var h=0;h<=d.length;h++)c===d[h]&&d.splice(h,1)},C.escapeRegExp=function(d){return d.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},C.escapeHTML=function(d){return(""+d).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},C.getMatchOffsets=function(d,c){var h=[];return d.replace(c,function(n){h.push({offset:arguments[arguments.length-2],length:n.length})}),h},C.deferredCall=function(d){function c(){n=null,d()}function h(o){return h.cancel(),n=setTimeout(c,o||0),h}var n=null;return(h.schedule=h).call=function(){return this.cancel(),d(),h},h.cancel=function(){return clearTimeout(n),n=null,h},h.isPending=function(){return n},h},C.delayedCall=function(d,c){function h(){o=null,d()}function n(i){o==null&&(o=setTimeout(h,i||c))}var o=null;return n.delay=function(i){o&&clearTimeout(o),o=setTimeout(h,i||c)},(n.schedule=n).call=function(){this.cancel(),d()},n.cancel=function(){o&&clearTimeout(o),o=null},n.isPending=function(){return o},n},C.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},C.skipEmptyMatch=function(d,c,h){return h&&65535<d.codePointAt(c)?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(b,C,$){C.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},C.getOS=function(){return C.isMac?C.OS.MAC:C.isLinux?C.OS.LINUX:C.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),f=d.userAgent||"",d=d.appName||"";C.isWin=y=="win",C.isMac=y=="mac",C.isLinux=y=="linux",C.isIE=d=="Microsoft Internet Explorer"||0<=d.indexOf("MSAppHost")?parseFloat((f.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((f.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),C.isOldIE=C.isIE&&C.isIE<9,C.isGecko=C.isMozilla=f.match(/ Gecko\/\d+/),C.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",C.isWebKit=parseFloat(f.split("WebKit/")[1])||void 0,C.isChrome=parseFloat(f.split(" Chrome/")[1])||void 0,C.isSafari=parseFloat(f.split(" Safari/")[1])&&!C.isChrome||void 0,C.isEdge=parseFloat(f.split(" Edge/")[1])||void 0,C.isAIR=0<=f.indexOf("AdobeAIR"),C.isAndroid=0<=f.indexOf("Android"),C.isChromeOS=0<=f.indexOf(" CrOS "),C.isIOS=/iPad|iPhone|iPod/.test(f)&&!window.MSStream,C.isIOS&&(C.isMac=!0),C.isMobile=C.isIOS||C.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(d,C,$){var y,f,d=d("./useragent"),c=(C.buildDom=function o(i,s,a){if(typeof i=="string"&&i)return g=document.createTextNode(i),s&&s.appendChild(g),g;if(!Array.isArray(i))return i&&i.appendChild&&s&&s.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var t=[],e=0;e<i.length;e++){var r=o(i[e],s,a);r&&t.push(r)}return t}for(var l=document.createElement(i[0]),p=i[1],g=1,e=g=p&&typeof p=="object"&&!Array.isArray(p)?2:g;e<i.length;e++)o(i[e],l,a);return g==2&&Object.keys(p).forEach(function(I){var A=p[I];I==="class"?l.className=Array.isArray(A)?A.join(" "):A:typeof A=="function"||I=="value"||I[0]=="$"?l[I]=A:I==="ref"?a&&(a[A]=l):I==="style"?typeof A=="string"&&(l.style.cssText=A):A!=null&&l.setAttribute(I,A)}),s&&s.appendChild(l),l},C.getDocumentHead=function(o){return(o=o||document).head||o.getElementsByTagName("head")[0]||o.documentElement},C.createElement=function(o,i){return document.createElementNS?document.createElementNS(i||"http://www.w3.org/1999/xhtml",o):document.createElement(o)},C.removeChildren=function(o){o.innerHTML=""},C.createTextNode=function(o,i){return(i?i.ownerDocument:document).createTextNode(o)},C.createFragment=function(o){return(o?o.ownerDocument:document).createDocumentFragment()},C.hasCssClass=function(o,i){return(o.className+"").split(/\s+/g).indexOf(i)!==-1},C.addCssClass=function(o,i){C.hasCssClass(o,i)||(o.className+=" "+i)},C.removeCssClass=function(o,i){for(var s=o.className.split(/\s+/g);;){var a=s.indexOf(i);if(a==-1)break;s.splice(a,1)}o.className=s.join(" ")},C.toggleCssClass=function(o,i){for(var s=o.className.split(/\s+/g),a=!0;;){var t=s.indexOf(i);if(t==-1)break;a=!1,s.splice(t,1)}return a&&s.push(i),o.className=s.join(" "),a},C.setCssClass=function(o,i,s){s?C.addCssClass(o,i):C.removeCssClass(o,i)},C.hasCssString=function(o,i){var s,a=0;if(s=(i=i||document).querySelectorAll("style")){for(;a<s.length;)if(s[a++].id===o)return!0}},C.removeElementById=function(o,i){(i=i||document).getElementById(o)&&i.getElementById(o).remove()},[]);function h(){var o=c;c=null,o&&o.forEach(function(i){n(i[0],i[1])})}function n(o,i,s){if(typeof document<"u"){if(c){if(s)h();else if(s===!1)return c.push([o,i])}if(!y){var a=s,s=(a=s&&s.getRootNode&&(a=s.getRootNode())&&a!=s?a:document).ownerDocument||a;if(i&&C.hasCssString(i,a))return null;i&&(o+=`
/*# sourceURL=ace/css/`+i+" */");var t=C.createElement("style");t.appendChild(s.createTextNode(o)),i&&(t.id=i),(a=a==s?C.getDocumentHead(s):a).insertBefore(t,a.firstChild)}}}C.useStrictCSP=function(o){(y=o)==0?h():c=c||[]},C.importCssString=n,C.importCssStylsheet=function(o,i){C.buildDom(["link",{rel:"stylesheet",href:o}],C.getDocumentHead(i))},C.scrollbarWidth=function(a){var i=C.createElement("ace_inner"),s=(i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block",C.createElement("ace_outer")),e=s.style,a=(e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",e.display="block",s.appendChild(i),a&&a.documentElement||document&&document.documentElement);if(!a)return 0;a.appendChild(s);var t=i.offsetWidth,e=(e.overflow="scroll",i.offsetWidth);return t===e&&(e=s.clientWidth),a.removeChild(s),t-e},C.computedStyle=function(o,i){return window.getComputedStyle(o,"")||{}},C.setStyle=function(o,i,s){o[i]!==s&&(o[i]=s)},C.HAS_CSS_ANIMATION=!1,C.HAS_CSS_TRANSFORMS=!1,C.HI_DPI=!d.isWin||typeof window<"u"&&1.5<=window.devicePixelRatio,d.isChromeOS&&(C.HI_DPI=!1),typeof document<"u"&&(f=document.createElement("div"),C.HI_DPI&&f.style.transform!==void 0&&(C.HAS_CSS_TRANSFORMS=!0),d.isEdge||f.style.animationName===void 0||(C.HAS_CSS_ANIMATION=!0),f=null),C.HAS_CSS_TRANSFORMS?C.translate=function(o,i,s){o.style.transform="translate("+Math.round(i)+"px, "+Math.round(s)+"px)"}:C.translate=function(o,i,s){o.style.top=Math.round(s)+"px",o.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(b,C,$){var y=b("./dom");C.get=function(f,d){var c=new XMLHttpRequest;c.open("GET",f,!0),c.onreadystatechange=function(){c.readyState===4&&d(c.responseText)},c.send(null)},C.loadScript=function(f,d){var c=y.getDocumentHead(),h=document.createElement("script");h.src=f,c.appendChild(h),h.onload=h.onreadystatechange=function(n,o){!o&&h.readyState&&h.readyState!="loaded"&&h.readyState!="complete"||(h=h.onload=h.onreadystatechange=null,o)||d()}},C.qualifyURL=function(f){var d=document.createElement("a");return d.href=f,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(b,C,$){C.inherits=function(y,f){y.super_=f,y.prototype=Object.create(f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}})},C.mixin=function(y,f){for(var d in f)y[d]=f[d];return y},C.implement=function(y,f){C.mixin(y,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(b,C,$){function y(){this.propagationStopped=!0}function f(){this.defaultPrevented=!0}var d={};d._emit=d._dispatchEvent=function(c,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(n.length||o){(h=typeof h=="object"&&h?h:{}).type||(h.type=c),h.stopPropagation||(h.stopPropagation=y),h.preventDefault||(h.preventDefault=f);for(var n=n.slice(),i=0;i<n.length&&(n[i](h,this),!h.propagationStopped);i++);return o&&!h.defaultPrevented?o(h,this):void 0}},d._signal=function(c,h){if(n=(this._eventRegistry||{})[c])for(var n=n.slice(),o=0;o<n.length;o++)n[o](h,this)},d.once=function(c,h){var n=this;if(this.on(c,function o(){n.off(c,o),h.apply(null,arguments)}),!h)return new Promise(function(o){h=o})},d.setDefaultHandler=function(c,h){var n,o,i=this._defaultHandlers;(i=i||(this._defaultHandlers={_disabled_:{}}))[c]&&(o=i[c],(n=i._disabled_[c])||(i._disabled_[c]=n=[]),n.push(o),(o=n.indexOf(h))!=-1)&&n.splice(o,1),i[c]=h},d.removeDefaultHandler=function(c,h){var n,o=this._defaultHandlers;o&&(n=o._disabled_[c],o[c]==h?n&&this.setDefaultHandler(c,n.pop()):n&&(o=n.indexOf(h))!=-1&&n.splice(o,1))},d.on=d.addEventListener=function(c,h,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return(o=o||(this._eventRegistry[c]=[])).indexOf(h)==-1&&o[n?"unshift":"push"](h),h},d.off=d.removeListener=d.removeEventListener=function(c,h){this._eventRegistry=this._eventRegistry||{},c=this._eventRegistry[c],c&&(h=c.indexOf(h))!==-1&&c.splice(h,1)},d.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},C.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(b,C,$){C.reportError=function(y,f){var d=new Error(y);d.data=f,typeof console=="object"&&console.error&&console.error(d),setTimeout(function(){throw d})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(b,C,$){C.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"}}),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(b,C,$){var y,f,d=b("./oop"),c=b("./event_emitter").EventEmitter,h=b("./report_error").reportError,n=b("./default_english_messages").defaultEnglishMessages,o={setOptions:function(a){Object.keys(a).forEach(function(t){this.setOption(t,a[t])},this)},getOptions:function(a){var t,e={};return a?Array.isArray(a)||(e=a,a=Object.keys(e)):(t=this.$options,a=Object.keys(t).filter(function(r){return!t[r].hidden})),a.forEach(function(r){e[r]=this.getOption(r)},this),e},setOption:function(a,t){var e;if(this["$"+a]!==t)return(e=this.$options[a])?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].setOption(a,t):(e.handlesSet||(this["$"+a]=t),void(e&&e.set&&e.set.call(this,t))):i('misspelled option "'+a+'"')},getOption:function(a){var t=this.$options[a];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(a):t&&t.get?t.get.call(this):this["$"+a]:i('misspelled option "'+a+'"')}};function i(a){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}s.prototype.defineOptions=function(a,t,e){return a.$options||(this.$defaultOptions[t]=a.$options={}),Object.keys(e).forEach(function(r){var l=e[r];(l=typeof l=="string"?{forwardTo:l}:l).name||(l.name=r),"initialValue"in(a.$options[l.name]=l)&&(a["$"+l.name]=l.initialValue)}),d.implement(a,o),this},s.prototype.resetOptions=function(a){Object.keys(a.$options).forEach(function(t){var e=a.$options[t];"value"in e&&a.setOption(t,e.value)})},s.prototype.setDefaultValue=function(a,t,e){if(!a){for(a in this.$defaultOptions)if(this.$defaultOptions[a][t])break;if(!this.$defaultOptions[a][t])return!1}var r=this.$defaultOptions[a]||(this.$defaultOptions[a]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,e):r[t].value=e)},s.prototype.setDefaultValues=function(a,t){Object.keys(t).forEach(function(e){this.setDefaultValue(a,e,t[e])},this)},s.prototype.setMessages=function(a,t){y=a,t&&t.placeholders&&(f=t.placeholders)},s.prototype.nls=function(a,t,e){return y[a]||(i("No message found for the key '"+a+"' in the provided messages, trying to find a translation for the default string '"+t+"'."),y[t])||i("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."),a=y[a]||y[t]||t,a=e&&(f==="dollarSigns"&&(a=a.replace(/\$(\$|[\d]+)/g,function(r,l){return l=="$"?"$":e[l]})),f==="curlyBrackets")?a.replace(/\{([^\}]+)\}/g,function(r,l){return e[l]}):a},b=s;function s(){this.$defaultOptions={},y=n,f="dollarSigns"}b.prototype.warn=i,b.prototype.reportError=h,d.implement(b.prototype,c),C.AppConfig=b}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(b,C,$){$.exports=`.ace-tm .ace_gutter {
  background: #f0f0f0;
  color: #333;
}

.ace-tm .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-tm .ace_fold {
    background-color: #6B72E6;
}

.ace-tm {
  background-color: #FFFFFF;
  color: black;
}

.ace-tm .ace_cursor {
  color: black;
}
        
.ace-tm .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-tm .ace_storage,
.ace-tm .ace_keyword {
  color: blue;
}

.ace-tm .ace_constant {
  color: rgb(197, 6, 11);
}

.ace-tm .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-tm .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-tm .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_invalid {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.ace-tm .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-tm .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
  color: rgb(109, 121, 222);
}

.ace-tm .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-tm .ace_string {
  color: rgb(3, 106, 7);
}

.ace-tm .ace_comment {
  color: rgb(76, 136, 107);
}

.ace-tm .ace_comment.ace_doc {
  color: rgb(0, 102, 255);
}

.ace-tm .ace_comment.ace_doc.ace_tag {
  color: rgb(128, 159, 191);
}

.ace-tm .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-tm .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-tm .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-tm .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-tm .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-tm .ace_list {
  color:rgb(185, 6, 144);
}

.ace-tm .ace_meta.ace_tag {
  color:rgb(0, 22, 142);
}

.ace-tm .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-tm .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-tm .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-tm .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-tm .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-tm .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-tm .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-tm .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-tm .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(b,C,$){C.isDark=!1,C.cssClass="ace-tm",C.cssText=b("./textmate-css"),C.$id="ace/theme/textmate",b("../lib/dom").importCssString(C.cssText,C.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(b,C,$){var y,f=b("./lib/lang"),d=b("./lib/net"),c=b("./lib/dom"),h=b("./lib/app_config").AppConfig,n=($.exports=C=new h,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),o=(C.get=function(i){if(n.hasOwnProperty(i))return n[i];throw new Error("Unknown config key: "+i)},C.set=function(i,s){if(n.hasOwnProperty(i))n[i]=s;else if(this.setDefaultValue("",i,s)==0)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&c.useStrictCSP(s)},C.all=function(){return f.copyObject(n)},C.$modes={},C.moduleUrl=function(i,s){var a,t,e;return n.$moduleUrls[i]||(i=i.split("/"),a=(s=s||i[i.length-2]||"")=="snippets"?"/":"-",t=i[i.length-1],s=="worker"&&a=="-"&&(e=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g"),t=t.replace(e,"")),(!t||t==s)&&1<i.length&&(t=i[i.length-2]),(e=n[s+"Path"])==null?e=n.basePath:a=="/"&&(s=a=""),e&&e.slice(-1)!="/"&&(e+="/"),e+s+a+t+this.get("suffix"))},C.setModuleUrl=function(i,s){return n.$moduleUrls[i]=s},C.setLoader=function(i){y=i},C.dynamicModules=Object.create(null),C.$loading={},C.$loaded={},C.loadModule=function(i,s){function a(l){if(l&&!C.$loading[r])return s&&s(l);if(C.$loading[r]||(C.$loading[r]=[]),C.$loading[r].push(s),!(1<C.$loading[r].length)){if(l=function(){var p,g;g=function(I,A){A&&(C.$loaded[r]=A),C._emit("load.module",{name:r,module:A});var N=C.$loading[r];C.$loading[r]=null,N.forEach(function(M){M&&M(A)})},(p=r)==="ace/theme/textmate"||p==="./theme/textmate"?g(null,b("./theme/textmate")):y?y(p,g):console.error("loader is not configured")},!C.get("packaged"))return l();d.loadScript(C.moduleUrl(r,e),l),o()}}var t,e,r;if(Array.isArray(i)?(e=i[0],r=i[1]):typeof i=="string"&&(r=i),C.dynamicModules[r])C.dynamicModules[r]().then(function(l){l.default?a(l.default):a(l)});else{try{t=this.$require(r)}catch{}a(t||C.$loaded[r])}},C.$require=function(i){if(typeof $.require=="function")return $.require(i)},C.setModuleLoader=function(i,s){C.dynamicModules[i]=s},function(){n.basePath||n.workerPath||n.modePath||n.themePath||Object.keys(n.$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"),o=function(){})});C.version="1.35.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(b,C,$){b("./lib/fixoldbrowsers");var y=b("./config"),f=(y.setLoader(function(c,h){b([c],function(n){h(null,n)})}),function(){return this||typeof window<"u"&&window}());function d(c){if(f&&f.document){y.set("packaged",c||b.packaged||$.packaged||f.define&&Z.amdD.packaged);for(var h,n={},o="",c=document.currentScript||document._currentScript,i=c&&c.ownerDocument||document,s=(c&&c.src&&(o=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||""),i.getElementsByTagName("script")),a=0;a<s.length;a++){var t=s[a],e=t.src||t.getAttribute("src");if(e){for(var r=t.attributes,l=0,p=r.length;l<p;l++){var g=r[l];g.name.indexOf("data-ace-")===0&&(n[g.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(A,N){return N.toUpperCase()})]=g.value)}t=e.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/),t&&(o=t[1])}}for(h in o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base,n)n[h]!==void 0&&y.set(h,n[h])}}$.exports=function(c){y.init=d,y.$require=b,c.require=b,c.define=Z.amdD},d(!0)}),ace.define("ace/range",["require","exports","module"],function(b,C,$){f.prototype.isEqual=function(d){return this.start.row===d.start.row&&this.end.row===d.end.row&&this.start.column===d.start.column&&this.end.column===d.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(d,c){return this.compare(d,c)==0},f.prototype.compareRange=function(c){var h=c.end,c=c.start,h=this.compare(h.row,h.column);return h==1?(h=this.compare(c.row,c.column))==1?2:h==0?1:0:h==-1?-2:(h=this.compare(c.row,c.column))==-1?-1:h==1?42:0},f.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},f.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},f.prototype.intersects=function(d){return d=this.compareRange(d),d==-1||d==0||d==1},f.prototype.isEnd=function(d,c){return this.end.row==d&&this.end.column==c},f.prototype.isStart=function(d,c){return this.start.row==d&&this.start.column==c},f.prototype.setStart=function(d,c){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=c)},f.prototype.setEnd=function(d,c){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=c)},f.prototype.inside=function(d,c){return this.compare(d,c)==0&&!this.isEnd(d,c)&&!this.isStart(d,c)},f.prototype.insideStart=function(d,c){return this.compare(d,c)==0&&!this.isEnd(d,c)},f.prototype.insideEnd=function(d,c){return this.compare(d,c)==0&&!this.isStart(d,c)},f.prototype.compare=function(d,c){return this.isMultiLine()||d!==this.start.row?d<this.start.row?-1:d>this.end.row?1:this.start.row===d?c>=this.start.column?0:-1:this.end.row!==d||c<=this.end.column?0:1:c<this.start.column?-1:c>this.end.column?1:0},f.prototype.compareStart=function(d,c){return this.start.row==d&&this.start.column==c?-1:this.compare(d,c)},f.prototype.compareEnd=function(d,c){return this.end.row==d&&this.end.column==c?1:this.compare(d,c)},f.prototype.compareInside=function(d,c){return this.end.row==d&&this.end.column==c?1:this.start.row==d&&this.start.column==c?-1:this.compare(d,c)},f.prototype.clipRows=function(d,c){var h,n;return this.end.row>c?h={row:c+1,column:0}:this.end.row<d&&(h={row:d,column:0}),this.start.row>c?n={row:c+1,column:0}:this.start.row<d&&(n={row:d,column:0}),f.fromPoints(n||this.start,h||this.end)},f.prototype.extend=function(d,c){var h,n,o=this.compare(d,c);return o==0?this:(o==-1?h={row:d,column:c}:n={row:d,column:c},f.fromPoints(h||this.start,n||this.end))},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(h){var c=h.documentToScreenPosition(this.start),h=h.documentToScreenPosition(this.end);return new f(c.row,c.column,h.row,h.column)},f.prototype.moveBy=function(d,c){this.start.row+=d,this.start.column+=c,this.end.row+=d,this.end.column+=c};var y=f;function f(d,c,h,n){this.start={row:d,column:c},this.end={row:h,column:n}}y.fromPoints=function(d,c){return new y(d.row,d.column,c.row,c.column)},y.comparePoints=function(d,c){return d.row-c.row||d.column-c.column},C.Range=y}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(b,C,$){for(var b=b("./oop"),y={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:"*"}},f={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},d=0;d<10;d++)f["Digit"+d]=48+d,f["Numpad"+d]=96+d,y.PRINTABLE_KEYS[48+d]=""+d,y.FUNCTION_KEYS[96+d]="Numpad"+d;for(d=65;d<91;d++){var c=String.fromCharCode(d+32);f["Key"+c.toUpperCase()]=d,y.PRINTABLE_KEYS[d]=c}for(d=1;d<13;d++)f["F"+d]=111+d,y.FUNCTION_KEYS[111+d]="F"+d;var h,n,o={Shift:16,Control:17,Alt:18,Meta:224};for(h in o)f[h]=f[h+"Left"]=f[h+"Right"]=o[h];for(n in C.$codeToKeyCode=f,y.PRINTABLE_KEYS[173]="-",y.FUNCTION_KEYS){var i=y.FUNCTION_KEYS[n].toLowerCase();y[i]=parseInt(n,10)}for(n in y.PRINTABLE_KEYS)i=y.PRINTABLE_KEYS[n].toLowerCase(),y[i]=parseInt(n,10);b.mixin(y,y.MODIFIER_KEYS),b.mixin(y,y.PRINTABLE_KEYS),b.mixin(y,y.FUNCTION_KEYS),y.enter=y.return,y.escape=y.esc,y.del=y.delete;for(var s=["cmd","ctrl","alt","shift"],a=Math.pow(2,s.length);a--;)y.KEY_MODS[a]=s.filter(function(t){return a&y.KEY_MODS[t]}).join("-")+"-";y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",b.mixin(C,y),(C.default=C).keyCodeToString=function(t){var e=y[t];return(e=typeof e!="string"?String.fromCharCode(t):e).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(b,C,$){var y,f=b("./keys"),d=b("./useragent"),c=null,h=0;function n(){if(y==null){y=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return y={passive:!1},!0}})}catch{}}return y}function o(r,l,p){this.elem=r,this.type=l,this.callback=p}o.prototype.destroy=function(){a(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i,s=C.addListener=function(r,l,p,g){r.addEventListener(l,p,n()),g&&g.$toDestroy.push(new o(r,l,p))},a=C.removeListener=function(r,l,p){r.removeEventListener(l,p,n())};function t(r){return 0|(r.ctrlKey?1:0)|(r.altKey?2:0)|(r.shiftKey?4:0)|(r.metaKey?8:0)}function e(){c=Object.create(null)}C.stopEvent=function(r){return C.stopPropagation(r),C.preventDefault(r),!1},C.stopPropagation=function(r){r.stopPropagation&&r.stopPropagation()},C.preventDefault=function(r){r.preventDefault&&r.preventDefault()},C.getButton=function(r){return r.type=="dblclick"?0:r.type=="contextmenu"||d.isMac&&r.ctrlKey&&!r.altKey&&!r.shiftKey?2:r.button},C.capture=function(r,l,p){var g=r&&r.ownerDocument||document;function I(A){l&&l(A),p&&p(A),a(g,"mousemove",l),a(g,"mouseup",I),a(g,"dragstart",I)}return s(g,"mousemove",l),s(g,"mouseup",I),s(g,"dragstart",I),I},C.addMouseWheelListener=function(r,l,p){s(r,"wheel",function(g){var I=g.deltaX||0,A=g.deltaY||0;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=.15*I,g.wheelY=.15*A;break;case g.DOM_DELTA_LINE:g.wheelX=15*I,g.wheelY=15*A;break;case g.DOM_DELTA_PAGE:g.wheelX=150*I,g.wheelY=150*A}l(g)},p)},C.addMultiMouseDownListener=function(r,l,p,g,I){var A,N,M,R=0,S={2:"dblclick",3:"tripleclick",4:"quadclick"};function _(u){var E;if(C.getButton(u)!==0?R=0:1<u.detail&&!(4<++R)||(R=1),d.isIE&&(E=5<Math.abs(u.clientX-A)||5<Math.abs(u.clientY-N),M&&!E||(R=1),M&&clearTimeout(M),M=setTimeout(function(){M=null},l[R-1]||600),R==1)&&(A=u.clientX,N=u.clientY),u._clicks=R,p[g]("mousedown",u),4<R)R=0;else if(1<R)return p[g](S[R],u)}(r=Array.isArray(r)?r:[r]).forEach(function(u){s(u,"mousedown",_,I)})},C.getModifierString=function(r){return f.KEY_MODS[t(r)]},C.addCommandKeyListener=function(r,l,p){var g=null;s(r,"keydown",function(I){c[I.keyCode]=(c[I.keyCode]||0)+1;var A=function(N,M,R){var S,_=t(M);if(!R&&M.code&&(R=f.$codeToKeyCode[M.code]||R),!d.isMac&&c){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(_|=8),c.altGr){if((3&_)==3)return;c.altGr=0}R!==18&&R!==17||(S=M.location,R===17&&S===1?c[R]==1&&(h=M.timeStamp):R===18&&_===3&&S===2&&M.timeStamp-h<50&&(c.altGr=!0))}if(R in f.MODIFIER_KEYS&&(R=-1),_||R!==13||M.location!==3||(N(M,_,-R),!M.defaultPrevented)){if(d.isChromeOS&&8&_){if(N(M,_,R),M.defaultPrevented)return;_&=-9}return _||R in f.FUNCTION_KEYS||R in f.PRINTABLE_KEYS?N(M,_,R):!1}}(l,I,I.keyCode);return g=I.defaultPrevented,A},p),s(r,"keypress",function(I){g&&(I.ctrlKey||I.altKey||I.shiftKey||I.metaKey)&&(C.stopEvent(I),g=null)},p),s(r,"keyup",function(I){c[I.keyCode]=null},p),c||(e(),s(window,"focus",e))},typeof window=="object"&&window.postMessage&&!d.isOldIE&&(i=1,C.nextTick=function(r,l){l=l||window;function p(I){I.data==g&&(C.stopPropagation(I),a(l,"message",p),r())}var g="zero-timeout-message-"+i++;s(l,"message",p),l.postMessage(g,"*")}),C.$idleBlocked=!1,C.onIdle=function(r,l){return setTimeout(function p(){C.$idleBlocked?setTimeout(p,100):r()},l)},C.$idleBlockId=null,C.blockIdle=function(r){C.$idleBlockId&&clearTimeout(C.$idleBlockId),C.$idleBlocked=!0,C.$idleBlockId=setTimeout(function(){C.$idleBlocked=!1},r||100)},C.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),C.nextFrame?C.nextFrame=C.nextFrame.bind(window):C.nextFrame=function(r){setTimeout(r,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(b,C,$){var y;$.exports={lineMode:!1,pasteCancelled:function(){return!!(y&&y>Date.now()-50)||(y=!1)},cancel:function(){y=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(b,C,$){var y=b("../lib/event"),f=b("../config").nls,d=b("../lib/useragent"),c=b("../lib/dom"),h=b("../lib/lang"),n=b("../clipboard"),o=d.isChrome<18,i=d.isIE,s=63<d.isChrome,a=b("../lib/keys"),t=a.KEY_MODS,e=d.isIOS,r=e?/\s/:/\n/,l=d.isMobile;C.TextInput=function(p,g){var I=c.createElement("textarea"),A=(I.className="ace_text-input",I.setAttribute("wrap","off"),I.setAttribute("autocorrect","off"),I.setAttribute("autocapitalize","off"),I.setAttribute("spellcheck","false"),I.style.opacity="0",p.insertBefore(I,p.firstChild),!1),N=!1,M=!1,R=!1,S="",_=(l||(I.style.fontSize="1px"),!1),u=!1,E="",v=0,L=0,G=0,P=Number.MAX_SAFE_INTEGER,Y=Number.MIN_SAFE_INTEGER,Q=0;try{var K=document.activeElement===I}catch{}this.setNumberOfExtraLines=function(de){P=Number.MAX_SAFE_INTEGER,Y=Number.MIN_SAFE_INTEGER,Q=de<0?0:de},this.setAriaOptions=function(de){var pe;de.activeDescendant?(I.setAttribute("aria-haspopup","true"),I.setAttribute("aria-autocomplete",de.inline?"both":"list"),I.setAttribute("aria-activedescendant",de.activeDescendant)):(I.setAttribute("aria-haspopup","false"),I.setAttribute("aria-autocomplete","both"),I.removeAttribute("aria-activedescendant")),de.role&&I.setAttribute("role",de.role),de.setLabel&&(I.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor")),de="",g.$textInputAriaLabel&&(de+="".concat(g.$textInputAriaLabel,", ")),g.session&&(pe=g.session.selection.cursor.row,de+=f("text-input.aria-label","Cursor at row $0",[pe+1])),I.setAttribute("aria-label",de))},this.setAriaOptions({role:"textbox"}),y.addListener(I,"blur",function(de){u||(g.onBlur(de),K=!1)},g),y.addListener(I,"focus",function(de){if(!u){if(K=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(de),d.isEdge?setTimeout(z):z()}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),S||s||this.$focusScroll=="browser")return I.focus({preventScroll:!0});var de=I.style.top;I.style.position="fixed",I.style.top="0px";try{var pe=I.getBoundingClientRect().top!=0}catch{return}var Ce=[];if(pe)for(var we=I.parentElement;we&&we.nodeType==1;)Ce.push(we),we.setAttribute("ace_nocontext","true"),we=!we.parentElement&&we.getRootNode?we.getRootNode().host:we.parentElement;I.focus({preventScroll:!0}),pe&&Ce.forEach(function(Ae){Ae.removeAttribute("ace_nocontext")}),setTimeout(function(){I.style.position="",I.style.top=="0px"&&(I.style.top=de)},0)},this.blur=function(){I.blur()},this.isFocused=function(){return K},g.on("beforeEndOperation",function(){var de=g.curOp,pe=de&&de.command&&de.command.name;pe!="insertstring"&&(pe=pe&&(de.docChanged||de.selectionChanged),M&&pe&&(E=I.value="",ke()),z())});function te(de,pe){for(var Ce=pe,we=1;we<=de-P&&we<2*Q+1;we++)Ce+=g.session.getLine(de-we).length+1;return Ce}function T(de){me(de,!0)}function O(de){me(de,!1)}function V(de){var pe=ae(de);n.pasteCancelled()||(typeof pe=="string"?(pe&&g.onPaste(pe,de),d.isIE&&setTimeout(z),y.preventDefault(de)):(I.value="",N=!0))}var z=e?function(de){var pe;!K||A&&!de||R||((pe=`
 ab`+(de=de||"")+`cde fg
`)!=I.value&&(I.value=E=pe),pe=4+(de.length||(g.selection.isEmpty()?0:1)),v==4&&L==pe||I.setSelectionRange(4,pe),v=4,L=pe)}:function(){if(!M&&!R&&(K||W)){M=!0;var de=0,pe=0,Ce="";if(g.session){for(var we,Te=g.selection,Ae=Te.getRange(),Te=Te.cursor.row,Me=(Te===Y+1?Y=(P=Y+1)+2*Q:Te===P-1?P=(Y=P-1)-2*Q:(Te<P-1||Y+1<Te)&&(P=Q<Te?Te-Q:0,Y=Q<Te?Te+Q:2*Q),[]),ee=P;ee<=Y;ee++)Me.push(g.session.getLine(ee));Ce=Me.join(`
`),de=te(Ae.start.row,Ae.start.column),pe=te(Ae.end.row,Ae.end.column),Ae.start.row<P?(we=g.session.getLine(P-1),de=Ae.start.row<P-1?0:de,pe+=we.length+1,Ce=we+`
`+Ce):Ae.end.row>Y?(we=g.session.getLine(Y+1),pe=Ae.end.row>Y+1?we.length:Ae.end.column,pe+=Ce.length+1,Ce=Ce+`
`+we):l&&0<Te&&(Ce=`
`+Ce,pe+=1,de+=1),400<Ce.length&&(de<400&&pe<400?Ce=Ce.slice(0,400):(Ce=`
`,de==pe?de=pe=0:(de=0,pe=1))),Ae=Ce+`

`,Ae!=E&&(I.value=E=Ae,v=L=Ae.length)}if(W&&(v=I.selectionStart,L=I.selectionEnd),L!=pe||v!=de||I.selectionEnd!=L)try{I.setSelectionRange(de,pe),v=de,L=pe}catch{}M=!1}},w=(this.resetSelection=z,K&&g.onFocus(),function(de){return de.selectionStart===0&&de.selectionEnd>=E.length&&de.value===E&&E&&de.selectionEnd!==L}),k=null,W=(this.setInputHandler=function(de){k=de},!(this.getInputHandler=function(){return k})),D=function(de,pe){if(W=W&&!1,N)return z(),de&&g.onPaste(de),N=!1,"";for(var Ce=I.selectionStart,we=I.selectionEnd,Ae=v,Te=E.length-L,Me=de,ee=de.length-Ce,re=de.length-we,he=0;0<Ae&&E[he]==de[he];)he++,Ae--;for(Me=Me.slice(he),he=1;0<Te&&E.length-he>v-1&&E[E.length-he]==de[de.length-he];)he++,Te--;ee-=he-1,re-=he-1;var ve=Me.length-he+1;return ve<0&&(Ae=-ve,ve=0),Me=Me.slice(0,ve),pe||Me||ee||Ae||Te||re?(ve=!(R=!0),d.isAndroid&&Me==". "&&(Me="  ",ve=!0),Me&&!Ae&&!Te&&!ee&&!re||_?g.onTextInput(Me):g.onTextInput(Me,{extendLeft:Ae,extendRight:Te,restoreStart:ee,restoreEnd:re}),R=!1,E=de,v=Ce,L=we,G=re,ve?`
`:Me):""},q=function(pe){if(M)return ye();if(pe&&pe.inputType){if(pe.inputType=="historyUndo")return g.execCommand("undo");if(pe.inputType=="historyRedo")return g.execCommand("redo")}var pe=I.value,Ce=D(pe,!0);(500<pe.length||r.test(Ce)||l&&v<1&&v==L)&&z()},ae=function(de,pe,Ce){var we=de.clipboardData||window.clipboardData;if(we&&!o){var Ae=i||Ce?"Text":"text/plain";try{return pe?we.setData(Ae,pe)!==!1:we.getData(Ae)}catch(Te){if(!Ce)return ae(Te,pe,!0)}}},me=function(de,pe){var Ce=g.getCopyText();if(!Ce)return y.preventDefault(de);ae(de,Ce)?(e&&(z(Ce),A=Ce,setTimeout(function(){A=!1},10)),pe?g.onCut():g.onCopy(),y.preventDefault(de)):(A=!0,I.value=Ce,I.select(),setTimeout(function(){A=!1,z(),pe?g.onCut():g.onCopy()}))},ye=(y.addCommandKeyListener(I,function(de,pe,Ce){if(!M)return g.onCommandKey(de,pe,Ce)},g),y.addListener(I,"select",function(de){M||(A?A=!1:w(I)?(g.selectAll(),z()):l&&I.selectionStart!=v&&z())},g),y.addListener(I,"input",q,g),y.addListener(I,"cut",T,g),y.addListener(I,"copy",O,g),y.addListener(I,"paste",V,g),"oncut"in I&&"oncopy"in I&&"onpaste"in I||y.addListener(p,"keydown",function(de){if((!d.isMac||de.metaKey)&&de.ctrlKey)switch(de.keyCode){case 67:O(de);break;case 86:V(de);break;case 88:T(de)}},g),function(){var de;if(M&&g.onCompositionUpdate&&!g.$readOnly)return _?xe():void(M.useTextareaForIME?g.onCompositionUpdate(I.value):(de=I.value,D(de),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+L-M.selectionStart+G)))}),ke=function(de){g.onCompositionEnd&&!g.$readOnly&&(M=!1,g.onCompositionEnd(),g.off("mousedown",xe),de)&&q()};function xe(){u=!0,I.blur(),I.focus(),u=!1}var Re,Se=h.delayedCall(ye,50).schedule.bind(null,null);function ce(){clearTimeout(Re),Re=setTimeout(function(){S&&(I.style.cssText=S,S=""),g.renderer.$isMousePressed=!1,g.renderer.$keepTextAreaAtCursor&&g.renderer.$moveTextAreaToCursor()},0)}y.addListener(I,"compositionstart",function(de){M||!g.onCompositionStart||g.$readOnly||(M={},_)||(de.data&&(M.useTextareaForIME=!1),setTimeout(ye,0),g._signal("compositionStart"),g.on("mousedown",xe),(de=g.getSelectionRange()).end.row=de.start.row,de.end.column=de.start.column,M.markerRange=de,M.selectionStart=v,g.onCompositionStart(M),M.useTextareaForIME?(E=I.value="",L=v=0):(I.msGetInputContext&&(M.context=I.msGetInputContext()),I.getInputContext&&(M.context=I.getInputContext())))},g),y.addListener(I,"compositionupdate",ye,g),y.addListener(I,"keyup",function(de){de.keyCode==27&&I.value.length<I.selectionStart&&(M||(E=I.value),v=L=-1,z()),Se()},g),y.addListener(I,"keydown",Se,g),y.addListener(I,"compositionend",ke,g),this.getElement=function(){return I},this.setCommandMode=function(de){_=de,I.readOnly=!1},this.setReadOnly=function(de){_||(I.readOnly=de)},this.setCopyWithEmptySelection=function(de){},this.onContextMenu=function(de){W=!0,z(),g._emit("nativecontextmenu",{target:g,domEvent:de}),this.moveToMouse(de,!0)},this.moveToMouse=function(de,we){S=S||I.style.cssText,I.style.cssText=(we?"z-index:100000;":"")+(d.isIE?"opacity:0.1;":"")+"text-indent: -"+(v+L)*g.renderer.characterWidth*.5+"px;";function Ce(re){c.translate(I,re.clientX-Me-2,Math.min(re.clientY-Te-2,ee))}var we=g.container.getBoundingClientRect(),Ae=c.computedStyle(g.container),Te=we.top+(parseInt(Ae.borderTopWidth)||0),Me=we.left+(parseInt(we.borderLeftWidth)||0),ee=we.bottom-Te-I.clientHeight-2;Ce(de),de.type=="mousedown"&&(g.renderer.$isMousePressed=!0,clearTimeout(Re),d.isWin)&&y.capture(g.container,Ce,ce)},this.onContextMenuClose=ce;function oe(de){g.textInput.onContextMenu(de),ce()}if(y.addListener(I,"mouseup",oe,g),y.addListener(I,"mousedown",function(de){de.preventDefault(),ce()},g),y.addListener(g.renderer.scroller,"contextmenu",oe,g),y.addListener(I,"contextmenu",oe,g),e){let de=function(pe){var Ce,we,Ae,Te;document.activeElement!==Ee||He||M||fe.$mouseHandler.isMousePressed||A||(Ce=Ee.selectionStart,we=Ee.selectionEnd,Ae=null,(Te=0)==Ce?Ae=a.up:Ce==1?Ae=a.home:L<we&&E[we]==`
`?Ae=a.end:Ce<v&&E[Ce-1]==" "?(Ae=a.left,Te=t.option):Ce<v||Ce==v&&L!=v&&Ce==we?Ae=a.left:L<we&&2<E.slice(0,we).split(`
`).length?Ae=a.down:L<we&&E[we-1]==" "?(Ae=a.right,Te=t.option):(L<we||we==L&&L!=v&&Ce==we)&&(Ae=a.right),Ce!==we&&(Te|=t.shift),Ae&&(!fe.onCommandKey({},Te,Ae)&&fe.commands&&(Ae=a.keyCodeToString(Ae),Te=fe.commands.findKeyCommand(Te,Ae))&&fe.execCommand(Te),v=Ce,L=we,z("")))};var fe=g,Ee=I,Ne=null,He=!1;Ee.addEventListener("keydown",function(pe){Ne&&clearTimeout(Ne),He=!0},!0),Ee.addEventListener("keyup",function(pe){Ne=setTimeout(function(){He=!1},100)},!0),document.addEventListener("selectionchange",de),fe.on("destroy",function(){document.removeEventListener("selectionchange",de)})}this.destroy=function(){I.parentElement&&I.parentElement.removeChild(I)}},C.$setUserAgentForTests=function(p,g){l=p,e=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(f,C,$){var y=f("../lib/useragent"),f=(d.prototype.onMouseDown=function(h){var n=h.inSelection(),o=h.getDocumentPosition(),i=(this.mousedownEvent=h,this.editor),s=h.getButton();if(s!==0)!i.getSelectionRange().isEmpty()&&s!=1||i.selection.moveToPosition(o),s==2&&(i.textInput.onContextMenu(h.domEvent),y.isMozilla||h.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!n||i.isFocused()||(i.focus(),!this.$focusTimeout)||this.$clickSelection||i.inMultiSelectMode)return this.captureMouse(h),this.startSelect(o,1<h.domEvent._clicks),h.preventDefault();this.setState("focusWait"),this.captureMouse(h)}},d.prototype.startSelect=function(h,n){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(h):n||o.selection.moveToPosition(h),n||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var h,n=this.editor,o=n.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(h=(h=this.$clickSelection.comparePoint(o))==-1?this.$clickSelection.end:h==1?this.$clickSelection.start:(o=(h=c(this.$clickSelection,o)).cursor,h.anchor),n.selection.setSelectionAnchor(h.row,h.column)),n.selection.selectToPosition(o),n.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(t){var n,o,i,s=this.editor,a=s.renderer.screenToTextCoordinates(this.x,this.y),t=s.selection[t](a.row,a.column);this.$clickSelection&&(o=this.$clickSelection.comparePoint(t.start),n=this.$clickSelection.comparePoint(t.end),o==-1&&n<=0?(i=this.$clickSelection.end,t.end.row==a.row&&t.end.column==a.column||(a=t.start)):n==1&&0<=o?(i=this.$clickSelection.start,t.start.row==a.row&&t.start.column==a.column||(a=t.end)):i=o==-1&&n==1?(a=t.end,t.start):(a=(o=c(this.$clickSelection,a)).cursor,o.anchor),s.selection.setSelectionAnchor(i.row,i.column)),s.selection.selectToPosition(a),s.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){i=this.mousedownEvent.x,h=this.mousedownEvent.y,o=this.x,n=this.y;var h,n,o=Math.sqrt(Math.pow(o-i,2)+Math.pow(n-h,2)),i=Date.now();(0<o||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(n){var n=n.getDocumentPosition(),o=this.editor,i=o.session.getBracketRange(n);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=o.selection.getWordRange(n.row,n.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},d.prototype.onTripleClick=function(n){var n=n.getDocumentPosition(),o=this.editor,i=(this.setState("selectByLines"),o.getSelectionRange());i.isMultiLine()&&i.contains(n.row,n.column)?(this.$clickSelection=o.selection.getLineRange(i.start.row),this.$clickSelection.end=o.selection.getLineRange(i.end.row).end):this.$clickSelection=o.selection.getLineRange(n.row),this.select()},d.prototype.onQuadClick=function(h){var n=this.editor;n.selectAll(),this.$clickSelection=n.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(h){var n,o,i,s,a,t,e;if(!h.getAccelKey())return h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0),n=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),o=this.$lastScroll,s=(e=(i=h.domEvent.timeStamp)-o.t)?h.wheelX/e:o.vx,a=e?h.wheelY/e:o.vy,e<550&&(s=(s+o.vx)/2,a=(a+o.vy)/2),e=!1,1<=(t=Math.abs(s/a))&&n.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(e=!0),(e=t<=1&&n.renderer.isScrollableBy(0,h.wheelY*h.speed)?!0:e)?o.allowed=i:i-o.allowed<550&&(Math.abs(s)<=1.5*Math.abs(o.vx)&&Math.abs(a)<=1.5*Math.abs(o.vy)?(e=!0,o.allowed=i):o.allowed=0),o.t=i,o.vx=s,o.vy=a,e?(n.renderer.scrollBy(h.wheelX*h.speed,h.wheelY*h.speed),h.stop()):void 0},d);function d(h){h.$clickSelection=null;var n=h.editor;n.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),n.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),n.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),n.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),n.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(o){h[o]=this[o]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}function c(h,n){return(h.start.row==h.end.row?2*n.column-h.start.column-h.end.column:h.start.row!=h.end.row-1||h.start.column||h.end.column?2*n.row-h.start.row-h.end.row:n.column-4)<0?{cursor:h.start,anchor:h.end}:{cursor:h.end,anchor:h.start}}f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,C.DefaultHandlers=f}),ace.define("ace/lib/scroll",["require","exports","module"],function(b,C,$){C.preventParentScroll=function(y){y.stopPropagation();var f=y.currentTarget;f.scrollHeight>f.clientHeight||y.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(o,C,$){var y,e=this&&this.__extends||(y=function(l,p){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(g,I){g.__proto__=I}:function(g,I){for(var A in I)Object.prototype.hasOwnProperty.call(I,A)&&(g[A]=I[A])}))(l,p)},function(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=l}y(l,p),l.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}),f=this&&this.__values||function(l){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&l[p],I=0;if(g)return g.call(l);if(l&&typeof l.length=="number")return{next:function(){return{value:(l=l&&I>=l.length?void 0:l)&&l[I++],done:!l}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=o("./lib/dom"),c=(o("./lib/event"),o("./range").Range),h=o("./lib/scroll").preventParentScroll,n="ace_tooltip",o=(i.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(l){this.getElement().textContent=l},i.prototype.setHtml=function(l){this.getElement().innerHTML=l},i.prototype.setPosition=function(l,p){this.getElement().style.left=l+"px",this.getElement().style.top=p+"px"},i.prototype.setClassName=function(l){d.addCssClass(this.getElement(),l)},i.prototype.setTheme=function(l){this.$element.className=n+" "+(l.isDark?"ace_dark ":"")+(l.cssClass||"")},i.prototype.show=function(l,p,g){l!=null&&this.setText(l),p!=null&&g!=null&&this.setPosition(p,g),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(l){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i);function i(l){this.isOpen=!1,this.$element=null,this.$parentNode=l}function s(){this.popups=[]}s.prototype.addPopup=function(l){this.popups.push(l),this.updatePopups()},s.prototype.removePopup=function(l){l=this.popups.indexOf(l),l!==-1&&(this.popups.splice(l,1),this.updatePopups())},s.prototype.updatePopups=function(){this.popups.sort(function(v,L){return L.priority-v.priority});var l,p,g,I,A=[];try{for(var N=f(this.popups),M=N.next();!M.done;M=N.next()){var R=M.value,S=!0;try{g=void 0;for(var _=f(A),u=_.next();!u.done;u=_.next()){var E=u.value;if(this.doPopupsOverlap(E,R)){S=!1;break}}}catch(v){g={error:v}}finally{try{u&&!u.done&&(I=_.return)&&I.call(_)}finally{if(g)throw g.error}}S?A.push(R):R.hide()}}catch(v){l={error:v}}finally{try{M&&!M.done&&(p=N.return)&&p.call(N)}finally{if(l)throw l.error}}},s.prototype.doPopupsOverlap=function(l,p){return l=l.getElement().getBoundingClientRect(),p=p.getElement().getBoundingClientRect(),l.left<p.right&&l.right>p.left&&l.top<p.bottom&&l.bottom>p.top};var a,t=new s,e=(C.popupManager=t,C.Tooltip=o,e(r,a=o),r.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide),l.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},r.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide),l.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},r.prototype.onMouseMove=function(l,I){this.lastEvent=l,this.lastT=Date.now();var g,I=I.$mouseHandler.isMousePressed;this.isOpen&&(g=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(g.row,g.column)&&!I&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||I||(this.lastEvent=l,this.timeout=setTimeout(this.waitForHover,this.idleTime))},r.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var l=Date.now()-this.lastT;10<this.idleTime-l?this.timeout=setTimeout(this.waitForHover,this.idleTime-l):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},r.prototype.isOutsideOfText=function(l){var p=l.editor,g=l.getDocumentPosition(),I=p.session.getLine(g.row);return g.column==I.length&&(I=p.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),l=p.session.documentToScreenPosition(g.row,g.column),l.column!=I.column||l.row!=I.row)},r.prototype.setDataProvider=function(l){this.$gatherData=l},r.prototype.showForRange=function(l,p,g,I){var A,N,M;I&&I!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement()||(I=l.renderer,this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(I.theme)),this.isOpen=!0,this.addMarker(p,l.session),this.range=c.fromPoints(p.start,p.end),l=I.textToScreenCoordinates(p.start.row,p.start.column),p=I.scroller.getBoundingClientRect(),l.pageX<p.left&&(l.pageX=p.left),(p=this.getElement()).innerHTML="",p.appendChild(g),p.style.maxHeight="",p.style.display="block",g=p.clientHeight,A=p.clientWidth,N=window.innerHeight-l.pageY-I.lineHeight,M=!0,l.pageY-g<0&&l.pageY<N&&(M=!1),p.style.maxHeight=(M?l.pageY:N)-10+"px",p.style.top=M?"":l.pageY+I.lineHeight+"px",p.style.bottom=M?window.innerHeight-l.pageY+"px":"",p.style.left=Math.min(l.pageX,window.innerWidth-A-10)+"px")},r.prototype.addMarker=function(l,p){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=p,this.marker=p&&p.addMarker(l,"ace_highlight-marker","text")},r.prototype.hide=function(l){!l&&document.activeElement==this.getElement()||l&&l.target&&(l.type!="keydown"||l.ctrlKey||l.metaKey)&&this.$element.contains(l.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,t.removePopup(this)))},r.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},r.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},r.prototype.onMouseOut=function(l){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,!this.isOpen||!l.relatedTarget||this.getElement().contains(l.relatedTarget)||l&&l.currentTarget.contains(l.relatedTarget)||l.relatedTarget.classList.contains("ace_content")||this.hide()},r);function r(p){p===void 0&&(p=document.body);var p=a.call(this,p)||this,g=(p.timeout=void 0,p.lastT=0,p.idleTime=350,p.lastEvent=void 0,p.onMouseOut=p.onMouseOut.bind(p),p.onMouseMove=p.onMouseMove.bind(p),p.waitForHover=p.waitForHover.bind(p),p.hide=p.hide.bind(p),p.getElement());return g.style.whiteSpace="pre-wrap",g.style.pointerEvents="auto",g.addEventListener("mouseout",p.onMouseOut),g.tabIndex=-1,g.addEventListener("blur",(function(){g.contains(document.activeElement)||this.hide()}).bind(p)),g.addEventListener("wheel",h),p}C.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(b,C,$){var y,f=this&&this.__extends||(y=function(t,e){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,l){r.__proto__=l}:function(r,l){for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(r[p]=l[p])}))(t,e)},function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}y(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}),d=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],l=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return{value:(t=t&&l>=t.length?void 0:t)&&t[l++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=b("../lib/dom"),h=b("../lib/event"),n=b("../tooltip").Tooltip,o=b("../config").nls;C.GutterHandler=function(t){var e,r,l=t.editor,p=l.renderer.$gutterLayer,g=new s(l);function I(){e=e&&clearTimeout(e),g.isOpen&&(g.hideTooltip(),l.off("mousewheel",I))}function A(N){g.setPosition(N.x,N.y)}t.editor.setDefaultHandler("guttermousedown",function(N){if(l.isFocused()&&N.getButton()==0){var M=p.getRegion(N);if(M!="foldWidgets"){var M=N.getDocumentPosition().row,R=l.session.selection;if(N.getShiftKey())R.selectTo(M,0);else{if(N.domEvent.detail==2)return l.selectAll(),N.preventDefault();t.$clickSelection=l.selection.getLineRange(M)}return t.setState("selectByLines"),t.captureMouse(N),N.preventDefault()}}}),t.editor.setDefaultHandler("guttermousemove",function(N){var M=N.domEvent.target||N.domEvent.srcElement;if(c.hasCssClass(M,"ace_fold-widget"))return I();g.isOpen&&t.$tooltipFollowsMouse&&A(N),r=N,e=e||setTimeout(function(){if(e=null,r&&!t.isMousePressed){var R=r.getDocumentPosition().row;if(R==l.session.getLength()){var S=l.renderer.pixelToScreenCoordinates(0,r.y).row,_=r.$pos;if(S>l.session.documentToScreenRow(_.row,_.column))return void I()}g.showTooltip(R),g.isOpen&&(l.on("mousewheel",I),!t.$tooltipFollowsMouse&&(S=r.getGutterRow(),_=p.$lines.get(S))?(R=_.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),(S=g.getElement().style).left=R.right+"px",S.top=R.bottom+"px"):A(r))}else I()},50)}),h.addListener(l.renderer.$gutter,"mouseout",function(N){r=null,g.isOpen&&(e=e||setTimeout(function(){e=null,I()},50))},l),l.on("changeSession",I),l.on("input",I)},f(a,i=n),a.prototype.setPosition=function(t,e){var r=window.innerWidth||document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight,p=this.getWidth(),g=this.getHeight();r<(t+=15)+p&&(t-=t+p-r),l<(e+=15)+g&&(e-=20+g),n.prototype.setPosition.call(this,t,e)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(t){var e=this.editor.renderer.$gutterLayer,r=e.$annotations[t],l=r?{text:Array.from(r.text),type:Array.from(r.type)}:{text:[],type:[]},p=e.session.getFoldLine(t);if(p&&e.$showFoldedAnnotations){for(var g,I={error:[],warning:[],info:[]},A=t+1;A<=p.end.row;A++)if(e.$annotations[A])for(var N=0;N<e.$annotations[A].text.length;N++){var M=e.$annotations[A].type[N];I[M].push(e.$annotations[A].text[N]),M==="error"?g="error_fold":M==="warning"&&(g="warning_fold")}g!=="error_fold"&&g!=="warning_fold"||(r="".concat(a.annotationsToSummaryString(I)," in folded code."),l.text.push(r),l.type.push(g))}if(l.text.length===0)return this.hide();for(var R={error:[],warning:[],info:[]},S=e.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",A=0;A<l.text.length;A++){var _="<span class='ace_".concat(l.type[A]," ").concat(S,"' aria-label='").concat(a.annotationLabels[l.type[A].replace("_fold","")].singular,"' role=img> </span> ").concat(l.text[A]);R[l.type[A].replace("_fold","")].push(_)}t=[].concat(R.error,R.warning,R.info).join("<br>"),this.setHtml(t),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},a.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},a.annotationsToSummaryString=function(t){var e,r,l=[];try{for(var p=d(["error","warning","info"]),g=p.next();!g.done;g=p.next()){var I,A=g.value;t[A].length&&(I=t[A].length===1?a.annotationLabels[A].singular:a.annotationLabels[A].plural,l.push("".concat(t[A].length," ").concat(I)))}}catch(N){e={error:N}}finally{try{g&&!g.done&&(r=p.return)&&r.call(p)}finally{if(e)throw e.error}}return l.join(", ")};var i,s=a;function a(t){var e=i.call(this,t.container)||this;return e.editor=t,e}C.GutterTooltip=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(b,C,$){var y=b("../lib/event"),f=b("../lib/useragent");function d(c,h){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=h,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}d.prototype.stopPropagation=function(){y.stopPropagation(this.domEvent),this.propagationStopped=!0},d.prototype.preventDefault=function(){y.preventDefault(this.domEvent),this.defaultPrevented=!0},d.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},d.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},d.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(c,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},d.prototype.inSelection=function(){var c,h;return this.$inSelection===null&&((c=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(h=this.getDocumentPosition(),this.$inSelection=c.contains(h.row,h.column))),this.$inSelection},d.prototype.getButton=function(){return y.getButton(this.domEvent)},d.prototype.getShiftKey=function(){return this.domEvent.shiftKey},d.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},C.MouseEvent=d}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(b,C,$){var y=b("../lib/dom"),f=b("../lib/event"),d=b("../lib/useragent");function c(n){var o,i,s,a,t,e,r,l,p,g,I,A=n.editor,N=y.createElement("div"),M=(N.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",N.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(P){n[P]=this[P]},this),A.on("mousedown",this.onMouseDown.bind(n)),A.container),R=0;function S(){var P,Y,Q,K,te,T,O,V,z=e;e=A.renderer.screenToTextCoordinates(i,s),Q=e,Y=z,K=Date.now(),P=!Y||Q.row!=Y.row,Y=!Y||Q.column!=Y.column,!g||P||Y?(A.moveCursorToPosition(Q),g=K,I={x:i,y:s}):5<h(I.x,I.y,i,s)?g=null:200<=K-g&&(A.renderer.scrollCursorIntoView(),g=null),P=e,Y=z,Q=Date.now(),K=A.renderer.layerConfig.lineHeight,z=A.renderer.layerConfig.characterWidth,te=A.renderer.scroller.getBoundingClientRect(),te={x:{left:i-te.left,right:te.right-i},y:{top:s-te.top,bottom:te.bottom-s}},T=Math.min(te.x.left,te.x.right),O=Math.min(te.y.top,te.y.bottom),V={row:P.row,column:P.column},T/z<=2&&(V.column+=te.x.left<te.x.right?-3:2),O/K<=1&&(V.row+=te.y.top<te.y.bottom?-1:1),T=P.row!=V.row,z=P.column!=V.column,O=!Y||P.row!=Y.row,T||z&&!O?p?200<=Q-p&&A.renderer.scrollCursorIntoView(V):p=Q:p=null}function _(){t=A.selection.toOrientedRange(),o=A.session.addMarker(t,"ace_selection",A.getSelectionStyle()),A.clearSelection(),A.isFocused()&&A.renderer.$cursorLayer.setBlinking(!1),clearInterval(a),S(),a=setInterval(S,20),R=0,f.addListener(document,"mousemove",v)}function u(){clearInterval(a),A.session.removeMarker(o),o=null,A.selection.fromOrientedRange(t),A.isFocused()&&!l&&A.$resetCursorStyle(),R=0,g=p=e=t=null,f.removeListener(document,"mousemove",v)}this.onDragStart=function(P){var Y;if(this.cancelDrag||!M.draggable)return Y=this,setTimeout(function(){Y.startSelect(),Y.captureMouse(P)},0),P.preventDefault();t=A.getSelectionRange();var Q=P.dataTransfer;Q.effectAllowed=A.getReadOnly()?"copy":"copyMove",A.container.appendChild(N),Q.setDragImage&&Q.setDragImage(N,0,0),setTimeout(function(){A.container.removeChild(N)}),Q.clearData(),Q.setData("Text",A.session.getTextRange()),l=!0,this.setState("drag")},this.onDragEnd=function(P){M.draggable=!1,l=!1,this.setState(null),A.getReadOnly()||(P=P.dataTransfer.dropEffect,r||P!="move"||A.session.remove(A.getSelectionRange()),A.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(P){if(!A.getReadOnly()&&L(P.dataTransfer))return i=P.clientX,s=P.clientY,o||_(),R++,P.dataTransfer.dropEffect=r=G(P),f.preventDefault(P)},this.onDragOver=function(P){if(!A.getReadOnly()&&L(P.dataTransfer))return i=P.clientX,s=P.clientY,o||(_(),R++),E!==null&&(E=null),P.dataTransfer.dropEffect=r=G(P),f.preventDefault(P)},this.onDragLeave=function(P){if(--R<=0&&o)return u(),r=null,f.preventDefault(P)},this.onDrop=function(P){if(e){var Y=P.dataTransfer;if(l)switch(r){case"move":t=t.contains(e.row,e.column)?{start:e,end:e}:A.moveText(t,e);break;case"copy":t=A.moveText(t,e,!0)}else Y=Y.getData("Text"),t={start:e,end:A.session.insert(e,Y)},A.focus(),r=null;return u(),f.preventDefault(P)}},f.addListener(M,"dragstart",this.onDragStart.bind(n),A),f.addListener(M,"dragend",this.onDragEnd.bind(n),A),f.addListener(M,"dragenter",this.onDragEnter.bind(n),A),f.addListener(M,"dragover",this.onDragOver.bind(n),A),f.addListener(M,"dragleave",this.onDragLeave.bind(n),A),f.addListener(M,"drop",this.onDrop.bind(n),A);var E=null;function v(){E==null&&(E=setTimeout(function(){E!=null&&o&&u()},20))}function L(P){return P=P.types,!P||Array.prototype.some.call(P,function(Y){return Y=="text/plain"||Y=="Text"})}function G(P){var Y=["copy","copymove","all","uninitialized"],Q=d.isMac?P.altKey:P.ctrlKey,K="uninitialized";try{K=P.dataTransfer.effectAllowed.toLowerCase()}catch{}var te="none";return Q&&0<=Y.indexOf(K)?te="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(K)?te="move":0<=Y.indexOf(K)&&(te="copy"),te}}function h(n,o,i,s){return Math.sqrt(Math.pow(i-n,2)+Math.pow(s-o,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor,o=(n.container.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging"),d.isWin?"default":"move");n.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(n){var o=this.editor.container;d.isIE&&this.state=="dragReady"&&3<h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&o.dragDrop(),this.state==="dragWait"&&0<h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(n){var o,i,s;this.$dragEnabled&&(this.mousedownEvent=n,o=this.editor,i=n.inSelection(),s=n.getButton(),(n.domEvent.detail||1)!==1||s!==0||!i||n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(s=n.domEvent.target||n.domEvent.srcElement)&&(s.unselectable="on"),o.getDragDelay()?(d.isWebKit&&(this.cancelDrag=!0,o.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0))}}).call(c.prototype),C.DragdropHandler=c}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(b,C,$){var y=b("./mouse_event").MouseEvent,f=b("../lib/event"),d=b("../lib/dom");C.addTouchListeners=function(c,h){var n,o,i,s,a,t,e,r,l,p="scroll",g=0,I=0,A=0,N=0;function M(){function u(L){var G,P=L.target.getAttribute("action");P!="more"&&v?(P=="paste"?E.readText().then(function(Y){h.execCommand(P,Y)}):P&&(P!="cut"&&P!="copy"||(E?E.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(P)),l.firstChild.style.display="none",v=!1,P!="openCommandPalette"&&h.focus()):(v=!v,L=h.getCopyText(),G=h.session.getUndoManager().hasUndo(),l.replaceChild(d.buildDom(v?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],G&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),l.firstChild))}var E=window.navigator&&window.navigator.clipboard,v=!1;l=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){p="menu",L.stopPropagation(),L.preventDefault(),h.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),u(L)},onclick:u},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function R(){l||M();var u=h.selection.cursor,u=h.renderer.textToScreenCoordinates(u.row,u.column),E=h.renderer.textToScreenCoordinates(0,0).pageX,v=h.renderer.scrollLeft,L=h.container.getBoundingClientRect();l.style.top=u.pageY-L.top-3+"px",u.pageX-L.left<L.width-70?(l.style.left="",l.style.right="10px"):(l.style.right="",l.style.left=E+v-L.left+"px"),l.style.display="",l.firstChild.style.display="none",h.on("input",S)}function S(u){l&&(l.style.display="none"),h.off("input",S)}function _(){a=null,clearTimeout(a);var u=h.selection.getRange(),E=u.contains(e.row,e.column);!u.isEmpty()&&E||(h.selection.moveToPosition(e),h.selection.selectWord()),p="wait",R()}f.addListener(c,"contextmenu",function(u){r&&h.textInput.getElement().focus()},h),f.addListener(c,"touchstart",function(u){var E=u.touches;if(a||1<E.length)clearTimeout(a),a=null,i=-1,p="zoom";else{r=h.$mouseHandler.isMousePressed=!0;var v=h.renderer.layerConfig.lineHeight,L=h.renderer.layerConfig.lineHeight,G=u.timeStamp,P=(s=G,E[0]),Y=P.clientX,P=P.clientY,Y=(Math.abs(n-Y)+Math.abs(o-P)>v&&(i=-1),n=u.clientX=Y,o=u.clientY=P,A=N=0,new y(u,h));if(e=Y.getDocumentPosition(),G-i<500&&E.length==1&&!g)I++,u.preventDefault(),u.button=0,a=null,clearTimeout(a),h.selection.moveToPosition(e),(P=2<=I?h.selection.getLineRange(e.row):h.session.getBracketRange(e))&&!P.isEmpty()?h.selection.setRange(P):h.selection.selectWord(),p="wait";else{I=0;var Y=h.selection.cursor,E=h.selection.isEmpty()?Y:h.selection.anchor,P=h.renderer.$cursorLayer.getPixelPosition(Y,!0),Y=h.renderer.$cursorLayer.getPixelPosition(E,!0),E=h.renderer.scroller.getBoundingClientRect(),Q=h.renderer.layerConfig.offset,K=h.renderer.scrollLeft,te=function(z,w){return(z/=L)*z+(w=w/v-.75)*w};if(u.clientX<E.left)return void(p="zoom");P=te(u.clientX-E.left-P.left+K,u.clientY-E.top-P.top+Q),te=te(u.clientX-E.left-Y.left+K,u.clientY-E.top-Y.top+Q),P<3.5&&te<3.5&&(p=te<P?"cursor":"anchor"),p=te<3.5?"anchor":P<3.5?"cursor":"scroll",a=setTimeout(_,450)}i=G}},h),f.addListener(c,"touchend",function(u){r=h.$mouseHandler.isMousePressed=!1,t&&clearInterval(t),p=="zoom"?(p="",g=0):(a?(h.selection.moveToPosition(e),g=0,R):p=="scroll"?(g+=60,t=setInterval(function(){g--<=0&&(clearInterval(t),t=null),Math.abs(A)<.01&&(A=0),Math.abs(N)<.01&&(N=0),g<20&&(A*=.9),g<20&&(N*=.9);var E=h.session.getScrollTop();h.renderer.scrollBy(10*A,10*N),E==h.session.getScrollTop()&&(g=0)},10),S):R)(),clearTimeout(a),a=null},h),f.addListener(c,"touchmove",function(u){a&&(clearTimeout(a),a=null);var E=u.touches;if(!(1<E.length||p=="zoom")){var E=E[0],v=n-E.clientX,L=o-E.clientY;if(p=="wait"){if(!(4<v*v+L*L))return u.preventDefault();p="cursor"}n=E.clientX,o=E.clientY,u.clientX=E.clientX,u.clientY=E.clientY;var E=u.timeStamp,G=E-s;s=E,p=="scroll"?((E=new y(u,h)).speed=1,E.wheelX=v,E.wheelY=L,10*Math.abs(v)<Math.abs(L)&&(v=0),10*Math.abs(L)<Math.abs(v)&&(L=0),G!=0&&(A=v/G,N=L/G),h._emit("mousewheel",E),E.propagationStopped||(A=N=0)):(v=new y(u,h).getDocumentPosition(),p=="cursor"?h.selection.moveCursorToPosition(v):p=="anchor"&&h.selection.setSelectionAnchor(v.row,v.column),h.renderer.scrollCursorIntoView(v),u.preventDefault())}},h)}}),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(i,C,$){var y=i("../lib/event"),f=i("../lib/useragent"),d=i("./default_handlers").DefaultHandlers,c=i("./default_gutter_handler").GutterHandler,h=i("./mouse_event").MouseEvent,n=i("./dragdrop_handler").DragdropHandler,o=i("./touch_handler").addTouchListeners,i=i("../config"),s=(a.prototype.onMouseEvent=function(t,e){this.editor.session&&this.editor._emit(t,new h(e,this.editor))},a.prototype.onMouseMove=function(t,e){var r=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;r&&r.length&&this.editor._emit(t,new h(e,this.editor))},a.prototype.onMouseWheel=function(t,e){var r=new h(e,this.editor);r.speed=2*this.$scrollSpeed,r.wheelX=e.wheelX,r.wheelY=e.wheelY,this.editor._emit(t,r)},a.prototype.setState=function(t){this.state=t},a.prototype.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;function r(R){if(R){if(f.isWebKit&&!R.which&&A.releaseMouse)return A.releaseMouse();A.x=R.clientX,A.y=R.clientY,e&&e(R),A.mouseEvent=new h(R,A.editor),A.$mouseMoved=!0}}function l(R){g.off("beforeEndOperation",N),clearInterval(M),g.session&&p(),A[A.state+"End"]&&A[A.state+"End"](R),A.state="",A.isMousePressed=I.$isMousePressed=!1,I.$keepTextAreaAtCursor&&I.$moveTextAreaToCursor(),A.$onCaptureMouseMove=A.releaseMouse=null,R&&A.onMouseEvent("mouseup",R),g.endOperation()}function p(){A[A.state]&&A[A.state](),A.$mouseMoved=!1}var g=this.editor,I=this.editor.renderer,A=(I.$isMousePressed=!0,this);if(f.isOldIE&&t.domEvent.type=="dblclick")return setTimeout(function(){l(t)});var N=function(R){A.releaseMouse&&g.curOp.command.name&&g.curOp.selectionChanged&&(A[A.state+"End"]&&A[A.state+"End"](),A.state="",A.releaseMouse())},M=(g.on("beforeEndOperation",N),g.startOperation({command:{name:"mouse"}}),A.$onCaptureMouseMove=r,A.releaseMouse=y.capture(this.editor.container,r,l),setInterval(p,20))},a.prototype.cancelContextMenu=function(){var t=(function(e){e&&e.domEvent&&e.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&y.stopEvent(e.domEvent))}).bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},a.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},a);function a(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;function e(g){document.hasFocus&&document.hasFocus()&&(t.isFocused()||document.activeElement!=(t.textInput&&t.textInput.getElement()))||window.focus(),t.focus(),setTimeout(function(){t.isFocused()||t.focus()})}var r=this,l=(this.editor=t,new d(this),new c(this),new n(this),t.renderer.getMouseEventTarget()),p=(y.addListener(l,"click",this.onMouseEvent.bind(this,"click"),t),y.addListener(l,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),y.addMultiMouseDownListener([l,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),y.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),o(t.container,t),t.renderer.$gutter);y.addListener(p,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),y.addListener(p,"click",this.onMouseEvent.bind(this,"gutterclick"),t),y.addListener(p,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),y.addListener(p,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),y.addListener(l,"mousedown",e,t),y.addListener(p,"mousedown",e,t),f.isIE&&t.renderer.scrollBarV&&(y.addListener(t.renderer.scrollBarV.element,"mousedown",e,t),y.addListener(t.renderer.scrollBarH.element,"mousedown",e,t)),t.on("mousemove",function(g){var I,A;r.state||r.$dragDelay||!r.$dragEnabled||(g=t.renderer.screenToTextCoordinates(g.x,g.y),I=t.session.selection.getRange(),A=t.renderer,!I.isEmpty()&&I.insideStart(g.row,g.column)?A.setCursorStyle("default"):A.setCursorStyle(""))},t)}s.prototype.releaseMouse=null,i.defineOptions(s.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),C.MouseHandler=s}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(b,C,$){var y=b("../lib/dom");C.FoldHandler=function(f){f.on("click",function(d){var h=d.getDocumentPosition(),c=f.session,h=c.getFoldAt(h.row,h.column,1),h=(h&&(d.getAccelKey()?c.removeFold(h):c.expandFold(h),d.stop()),d.domEvent&&d.domEvent.target);h&&y.hasCssClass(h,"ace_inline_button")&&y.hasCssClass(h,"ace_toggle_wrap")&&(c.setOption("wrap",!c.getUseWrapMode()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(d){var c,h;f.renderer.$gutterLayer.getRegion(d)=="foldWidgets"&&(c=d.getDocumentPosition().row,(h=f.session).foldWidgets&&h.foldWidgets[c]&&f.session.onFoldWidgetClick(c,d),f.isFocused()||f.focus(),d.stop())}),f.on("gutterdblclick",function(d){var c,h,n;f.renderer.$gutterLayer.getRegion(d)=="foldWidgets"&&(n=d.getDocumentPosition().row,(h=(h=(c=f.session).getParentFoldRangeData(n,!0)).range||h.firstRange)&&(n=h.start.row,(n=c.getFoldAt(n,c.getLine(n).length,1))?c.removeFold(n):(c.addFold("...",h),f.renderer.scrollCursorIntoView({row:h.start.row,column:0}))),d.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(b,C,$){var y=b("../lib/keys"),f=b("../lib/event");function d(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}d.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},d.prototype.setKeyboardHandler=function(c){var h=this.$handlers;if(h[h.length-1]!=c){for(;h[h.length-1]&&h[h.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(h[h.length-1]);this.addKeyboardHandler(c,1)}},d.prototype.addKeyboardHandler=function(c,h){var n;c&&(typeof c!="function"||c.handleKeyboard||(c.handleKeyboard=c),(n=this.$handlers.indexOf(c))!=-1&&this.$handlers.splice(n,1),h==null?this.$handlers.push(c):this.$handlers.splice(h,0,c),n==-1)&&c.attach&&c.attach(this.$editor)},d.prototype.removeKeyboardHandler=function(c){var h=this.$handlers.indexOf(c);return h!=-1&&(this.$handlers.splice(h,1),c.detach&&c.detach(this.$editor),!0)},d.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},d.prototype.getStatusText=function(){var c=this.$data,h=c.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(h,c)||""}).filter(Boolean).join(" ")},d.prototype.$callKeyboardHandlers=function(c,h,n,o){for(var i,s=!1,a=this.$editor.commands,t=this.$handlers.length;t--&&!((i=this.$handlers[t].handleKeyboard(this.$data,c,h,n,o))&&i.command&&((s=i.command=="null"||a.exec(i.command,this.$editor,i.args,o))&&o&&c!=-1&&i.passEvent!=1&&i.command.passEvent!=1&&f.stopEvent(o),s)););return s||c!=-1||(i={command:"insertstring"},s=a.exec("insertstring",this.$editor,h)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),s},d.prototype.onCommandKey=function(c,h,n){var o=y.keyCodeToString(n);return this.$callKeyboardHandlers(h,o,n,c)},d.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},C.KeyBinding=d}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(b,C,$){var y=0,f=0,d=!1,c=!1,h=!1,n=[[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]],o=[[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]],i=0,s=1,a=2,t=3,e=4,r=5,l=6,p=7,g=8,I=9,A=10,N=11,M=12,R=13,S=14,_=15,u=16,E=17,v=18,L=[v,v,v,v,v,v,v,v,v,l,r,l,g,r,v,v,v,v,v,v,v,v,v,v,v,v,v,v,r,r,r,l,g,e,e,N,N,N,e,e,e,e,e,A,I,A,I,I,a,a,a,a,a,a,a,a,a,a,I,e,e,e,e,e,e,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,e,e,e,e,e,e,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,e,e,e,e,v,v,v,v,v,v,r,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,I,e,N,N,N,N,e,e,e,e,i,e,e,v,e,e,N,N,a,a,e,i,e,e,e,a,i,e,e,e,e,e],G=[g,g,g,g,g,g,g,g,g,g,g,v,v,v,i,s,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,r,R,S,_,u,E,I,N,N,N,N,N,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,I,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g];function P(K,te,T,O){var V,z,w,k=y?o:n,W=0,D=-1,q=null,ae=null,me=[];if(!O)for(q=0,O=[];q<T;q++)O[q]=Q(K[q]);for(f=y,h=c=d=!1,ae=0;ae<T;ae++){if(w=W,me[ae]=V=function(ke,xe,Re,Se){var ce,oe,fe,Ee=xe[Se];switch(Ee){case i:case s:d=!1;case e:case t:return Ee;case a:return d?t:a;case p:return d=!0,s;case g:return e;case I:return Se<1||Se+1>=xe.length||(ce=Re[Se-1])!=a&&ce!=t||(Ne=xe[Se+1])!=a&&Ne!=t?e:(Ne=d?t:Ne)==ce?Ne:e;case A:return(ce=0<Se?Re[Se-1]:r)==a&&Se+1<xe.length&&xe[Se+1]==a?a:e;case N:if(0<Se&&Re[Se-1]==a)return a;if(d)return e;for(fe=Se+1,oe=xe.length;fe<oe&&xe[fe]==N;)fe++;return fe<oe&&xe[fe]==a?a:e;case M:for(oe=xe.length,fe=Se+1;fe<oe&&xe[fe]==M;)fe++;if(fe<oe){var Ne=ke[Se],Ne=1425<=Ne&&Ne<=2303||Ne==64286;if(ce=xe[fe],Ne&&(ce==s||ce==p))return s}return Se<1||(ce=xe[Se-1])==r?e:Re[Se-1];case r:return c=!(d=!1),y;case l:return h=!0,e;case R:case S:case u:case E:case _:d=!1;case v:return e}}(K,O,me,ae),w=240&(W=k[w][V]),W&=15,te[ae]=z=k[W][5],0<w){if(w==16)for(q=D;q<ae;q++)te[q]=1;D=-1}if(k[W][6])D==-1&&(D=ae);else if(-1<D){for(q=D;q<ae;q++)te[q]=z;D=-1}O[ae]==r&&(te[ae]=0),f|=z}if(h){for(q=0;q<T;q++)if(O[q]==l){te[q]=y;for(var ye=q-1;0<=ye&&O[ye]==g;ye--)te[ye]=y}}}function Y(K,te,T){if(!(f<K))if(K!=1||y!=1||c)for(var O,V,z,w,k=T.length,W=0;W<k;){if(te[W]>=K){for(O=W+1;O<k&&te[O]>=K;)O++;for(V=W,z=O-1;V<z;V++,z--)w=T[V],T[V]=T[z],T[z]=w;W=O}W++}else T.reverse()}function Q(K){var te=K.charCodeAt(0),T=te>>8;return T==0?191<te?i:L[te]:T==5?/[\u0591-\u05f4]/.test(K)?s:i:T==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(K)?M:/[\u0660-\u0669\u066b-\u066c]/.test(K)?t:te==1642?N:/[\u06f0-\u06f9]/.test(K)?a:p:T==32&&te<=8287?G[255&te]:T==254&&65136<=te?p:e}C.L=i,C.R=s,C.EN=a,C.ON_R=3,C.AN=4,C.R_H=5,C.B=6,C.RLE=7,C.DOT="·",C.doBidiReorder=function(K,te,T){if(K.length<2)return{};var O=K.split(""),V=new Array(O.length),z=new Array(O.length),w=[];y=T?1:0,P(O,w,O.length,te);for(var k=0;k<V.length;V[k]=k,k++);for(Y(2,w,V),Y(1,w,V),k=0;k<V.length-1;k++)te[k]===t?w[k]=C.AN:w[k]===s&&(te[k]>p&&te[k]<R||te[k]===e||te[k]===v)?w[k]=C.ON_R:0<k&&O[k-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(O[k])&&(w[k-1]=w[k]=C.R_H,k++);for(O[O.length-1]===C.DOT&&(w[O.length-1]=C.B),O[0]==="‫"&&(w[0]=C.RLE),k=0;k<V.length;k++)z[k]=w[V[k]];return{logicalFromVisual:V,bidiLevels:z}},C.hasBidiCharacters=function(K,te){for(var T=!1,O=0;O<K.length;O++)te[O]=Q(K.charAt(O)),T||te[O]!=s&&te[O]!=p&&te[O]!=t||(T=!0);return T},C.getVisualFromLogicalIdx=function(K,te){for(var T=0;T<te.logicalFromVisual.length;T++)if(te.logicalFromVisual[T]==K)return T;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(b,C,$){var y=b("./lib/bidiutil"),f=b("./lib/lang"),d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;function c(h){this.session=h,this.bidiMap={},this.currentRow=null,this.bidiUtil=y,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=d.test(h.getValue())}c.prototype.isBidiRow=function(h,n,o){return!!this.seenBidi&&(h!==this.currentRow&&(this.currentRow=h,this.updateRowLine(n,o),this.updateBidiMap()),this.bidiMap.bidiLevels)},c.prototype.onChange=function(h){this.seenBidi?this.currentRow=null:h.action=="insert"&&d.test(h.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var h=0,n=this.session.$screenRowCache;return h=n.length&&0<=(n=this.session.$getRowCacheIndex(n,this.currentRow))?this.session.$docRowCache[n]:h},c.prototype.getSplitIndex=function(){var h=0,n=this.session.$screenRowCache;if(n.length)for(var o,i=this.session.$getRowCacheIndex(n,this.currentRow);0<this.currentRow-h&&(o=this.session.$getRowCacheIndex(n,this.currentRow-h-1))===i;)i=o,h++;else h=this.currentRow;return h},c.prototype.updateRowLine=function(h,n){var o,i=(h=h===void 0?this.getDocumentRow():h)===this.session.getLength()-1?this.EOF:this.EOL,s=(this.wrapIndent=0,this.line=this.session.getLine(h),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,(!this.session.$useWrapMode||(h=this.session.$wrapData[h])&&(0<(n=n===void 0?this.getSplitIndex():n)&&h.length?(this.wrapIndent=h.indent,this.wrapOffset=this.wrapIndent*this.charWidths[y.L],this.line=n<h.length?this.line.substring(h[n-1],h[n]):this.line.substring(h[h.length-1])):this.line=this.line.substring(0,h[n]),n==h.length))&&(this.line+=this.showInvisibles?i:y.DOT),this.session),a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(t,e){return t==="	"||s.isFullWidth(t.charCodeAt(0))?(o=t==="	"?s.getScreenTabSize(e+a):2,a+=o-1,f.stringRepeat(y.DOT,o)):t}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==y.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var h=[];y.hasBidiCharacters(this.line,h)||this.isRtlDir?this.bidiMap=y.doBidiReorder(this.line,h,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(h){var n;this.characterWidth!==h.$characterSize.width&&(this.fontMetrics=h,n=this.characterWidth=h.$characterSize.width,h=h.$measureCharWidth("ה"),this.charWidths[y.L]=this.charWidths[y.EN]=this.charWidths[y.ON_R]=n,this.charWidths[y.R]=this.charWidths[y.AN]=h,this.charWidths[y.R_H]=.45*h,this.charWidths[y.B]=this.charWidths[y.RLE]=0,this.currentRow=null)},c.prototype.setShowInvisibles=function(h){this.showInvisibles=h,this.currentRow=null},c.prototype.setEolChar=function(h){this.EOL=h},c.prototype.setContentWidth=function(h){this.contentWidth=h},c.prototype.isRtlLine=function(h){return!!this.$isRtl||(h!=null?this.session.getLine(h).charAt(0)==this.RLE:this.isRtlDir)},c.prototype.setRtlDirection=function(h,n){for(var o=h.getCursorPosition(),i=h.selection.getSelectionAnchor().row;i<=o.row;i++)n||h.session.getLine(i).charAt(0)!==h.session.$bidiHandler.RLE?n&&h.session.getLine(i).charAt(0)!==h.session.$bidiHandler.RLE&&h.session.doc.insert({column:0,row:i},h.session.$bidiHandler.RLE):h.session.doc.removeInLine(i,0,1)},c.prototype.getPosLeft=function(h){h-=this.wrapIndent;var n=this.line.charAt(0)===this.RLE?1:0,o=n<h?this.session.getOverwrite()?h:h-1:n,i=y.getVisualFromLogicalIdx(o,this.bidiMap),s=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&h<=n&&s[i]%2!=0&&i++;for(var t=0;t<i;t++)a+=this.charWidths[s[t]];return!this.session.getOverwrite()&&n<h&&s[i]%2==0&&(a+=this.charWidths[s[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},c.prototype.getSelections=function(h,n){var o,i=this.bidiMap,s=i.bidiLevels,a=[],t=0,e=Math.min(h,n)-this.wrapIndent,r=Math.max(h,n)-this.wrapIndent,l=!1,p=!1,g=0;this.wrapIndent&&(t+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var I,A=0;A<s.length;A++)I=i.logicalFromVisual[A],o=s[A],(l=e<=I&&I<r)&&!p?g=t:!l&&p&&a.push({left:g,width:t-g}),t+=this.charWidths[o],p=l;if(l&&A===s.length&&a.push({left:g,width:t-g}),this.isRtlDir)for(var N=0;N<a.length;N++)a[N].left+=this.rtlLineOffset;return a},c.prototype.offsetToCol=function(o){this.isRtlDir&&(o-=this.rtlLineOffset);var n=0,o=Math.max(o,0),i=0,s=0,a=this.bidiMap.bidiLevels,t=this.charWidths[a[s]];for(this.wrapIndent&&(o-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i+t/2<o;){if(i+=t,s===a.length-1){t=0;break}t=this.charWidths[a[++s]]}return(n=0<s&&a[s-1]%2!=0&&a[s]%2==0?(o<i&&s--,this.bidiMap.logicalFromVisual[s]):0<s&&a[s-1]%2==0&&a[s]%2!=0?1+(i<o?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===a.length-1&&t===0&&a[s-1]%2==0||!this.isRtlDir&&s===0&&a[s]%2!=0?1+this.bidiMap.logicalFromVisual[s]:(0<s&&a[s-1]%2!=0&&t!==0&&s--,this.bidiMap.logicalFromVisual[s]))===0&&this.isRtlDir&&n++,n+this.wrapIndent},C.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(h,C,$){var y=h("./lib/oop"),f=h("./lib/lang"),d=h("./lib/event_emitter").EventEmitter,c=h("./range").Range,h=(n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(o,i){this.$isEmpty=!1,this.anchor.setPosition(o,i)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var o=this.anchor,i=this.lead;return o.row>i.row||o.row==i.row&&o.column>i.column},n.prototype.getRange=function(){var o=this.anchor,i=this.lead;return this.$isEmpty?c.fromPoints(i,i):this.isBackwards()?c.fromPoints(i,o):c.fromPoints(o,i)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(o,a){var s=a?o.end:o.start,a=a?o.start:o.end;this.$setSelection(s.row,s.column,a.row,a.column)},n.prototype.$setSelection=function(o,i,s,a){var t,e;!this.$silent&&(t=this.$isEmpty,e=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,i),this.cursor.setPosition(s,a),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||t!=this.$isEmpty||e)&&this._emit("changeSelection")},n.prototype.$moveSelection=function(o){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),o.call(this)},n.prototype.selectTo=function(o,i){this.$moveSelection(function(){this.moveCursorTo(o,i)})},n.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},n.prototype.moveTo=function(o,i){this.clearSelection(),this.moveCursorTo(o,i)},n.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(o,i){var s;return i===void 0&&(o=(s=o||this.lead).row,i=s.column),this.session.getWordRange(o,i)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var o=this.getCursor(),o=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(o)},n.prototype.getLineRange=function(s,i){var s=typeof s=="number"?s:this.lead.row,a=this.session.getFoldLine(s),a=a?(s=a.start.row,a.end.row):s;return i===!0?new c(s,0,a,this.session.getLine(a).length):new c(s,0,a+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(o,i,s){var a=o.column,t=o.column+i;return s<0&&(a=o.column-i,t=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(a,t).split(" ").length-1==i},n.prototype.moveCursorLeft=function(){var o,i=this.lead.getPosition();(o=this.session.getFoldAt(i.row,i.column,-1))?this.moveCursorTo(o.start.row,o.start.column):i.column===0?0<i.row&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length):(o=this.session.getTabSize(),this.wouldMoveIntoSoftTab(i,o,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-o):this.moveCursorBy(0,-1))},n.prototype.moveCursorRight=function(){var o,i=this.lead.getPosition();(o=this.session.getFoldAt(i.row,i.column,1))?this.moveCursorTo(o.end.row,o.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(o=this.session.getTabSize(),i=this.lead,this.wouldMoveIntoSoftTab(i,o,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,o):this.moveCursorBy(0,1))},n.prototype.moveCursorLineStart=function(){var s=this.lead.row,o=this.lead.column,i=this.session.documentToScreenRow(s,o),i=this.session.screenToDocumentPosition(i,0),s=this.session.getDisplayLine(s,null,i.row,i.column).match(/^\s*/);s[0].length==o||this.session.$useEmacsStyleLineStart||(i.column+=s[0].length),this.moveCursorToPosition(i)},n.prototype.moveCursorLineEnd=function(){var o,i=this.lead,i=this.session.getDocumentLastRowColumnPosition(i.row,i.column);this.lead.column==i.column&&(o=this.session.getLine(i.row),i.column==o.length)&&0<(o=o.search(/\s+$/))&&(i.column=o),this.moveCursorTo(i.row,i.column)},n.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,i=this.doc.getLine(o).length;this.moveCursorTo(o,i)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,i=this.lead.column,s=this.doc.getLine(o),a=s.substring(i),t=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(o,i,1));t?this.moveCursorTo(t.end.row,t.end.column):(this.session.nonTokenRe.exec(a)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,a=s.substring(i)),i>=s.length?(this.moveCursorTo(o,s.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(a)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,i)))},n.prototype.moveCursorLongWordLeft=function(){var o,i=this.lead.row,s=this.lead.column;(o=this.session.getFoldAt(i,s,-1))?this.moveCursorTo(o.start.row,o.start.column):((o=this.session.getFoldStringAt(i,s,-1))==null&&(o=this.doc.getLine(i).substring(0,s)),o=f.stringReverse(o),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(s-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),s<=0?(this.moveCursorTo(i,0),this.moveCursorLeft(),0<i&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(o)&&(s-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,s)))},n.prototype.$shortWordEndIndex=function(o){var i,s=0,a=/\s/,t=this.session.tokenRe;if(t.lastIndex=0,this.session.tokenRe.exec(o))s=this.session.tokenRe.lastIndex;else{for(;(i=o[s])&&a.test(i);)s++;if(s<1){for(t.lastIndex=0;(i=o[s])&&!t.test(i);)if(t.lastIndex=0,s++,a.test(i)){if(2<s){s--;break}for(;(i=o[s])&&a.test(i);)s++;if(2<s)break}}}return t.lastIndex=0,s},n.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,i=this.lead.column,s=this.doc.getLine(o),a=s.substring(i),t=this.session.getFoldAt(o,i,1);if(t)return this.moveCursorTo(t.end.row,t.end.column);if(i==s.length){for(var e=this.doc.getLength();a=this.doc.getLine(++o),o<e&&/^\s*$/.test(a););/^\s+/.test(a)||(a=""),i=0}t=this.$shortWordEndIndex(a),this.moveCursorTo(o,i+t)},n.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,i=this.lead.column;if(a=this.session.getFoldAt(o,i,-1))return this.moveCursorTo(a.start.row,a.start.column);var s=this.session.getLine(o).substring(0,i);if(i===0){for(;s=this.doc.getLine(--o),0<o&&/^\s*$/.test(s););i=s.length,/\s+$/.test(s)||(s="")}var a=f.stringReverse(s),a=this.$shortWordEndIndex(a);return this.moveCursorTo(o,i-a)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(o,i){var s,a=this.session.documentToScreenPosition(this.lead.row,this.lead.column),t=(i===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(a.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(a.column),a.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=a.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?a.column=this.$desiredColumn:this.$desiredColumn=a.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(t=this.session.lineWidgets[this.lead.row],o<0?o-=t.rowsAbove||0:0<o&&(o+=t.rowCount-(t.rowsAbove||0))),this.session.screenToDocumentPosition(a.row+o,a.column,s));o!==0&&i===0&&t.row===this.lead.row&&(t.column,this.lead.column),this.moveCursorTo(t.row,t.column+i,i===0)},n.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},n.prototype.moveCursorTo=function(o,i,s){var a=this.session.getFoldAt(o,i,1),a=(a&&(o=a.start.row,i=a.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(o));/[\uDC00-\uDFFF]/.test(a.charAt(i))&&a.charAt(i-1)&&(this.lead.row==o&&this.lead.column==i+1?i-=1:i+=1),this.lead.setPosition(o,i),this.$keepDesiredColumnOnChange=!1,s||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(o,i,s){o=this.session.screenToDocumentPosition(o,i),this.moveCursorTo(o.row,o.column,s)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(o){var i=this.getRange();return o?(o.start.column=i.start.column,o.start.row=i.start.row,o.end.column=i.end.column,o.end.row=i.end.row):o=i,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},n.prototype.getRangeOfMovements=function(o){var i=this.getCursor();try{o(this);var s=this.getCursor();return c.fromPoints(i,s)}catch{return c.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},n.prototype.toJSON=function(){var o;return this.rangeCount?o=this.ranges.map(function(i){var s=i.clone();return s.isBackwards=i.cursor==i.start,s}):(o=this.getRange()).isBackwards=this.isBackwards(),o},n.prototype.fromJSON=function(o){if(o.start==null){if(this.rangeList&&1<o.length){this.toSingleRange(o[0]);for(var i=o.length;i--;){var s=c.fromPoints(o[i].start,o[i].end);o[i].isBackwards&&(s.cursor=s.start),this.addRange(s,!0)}return}o=o[0]}this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},n.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(o[i]))return!1;return!0},n);function n(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(s){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),i.$isEmpty||i.$silent||i._emit("changeSelection"),i.$keepDesiredColumnOnChange||s.old.column==s.value.column||(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,i.$isEmpty||i.$silent||i._emit("changeSelection")})}h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,y.implement(h.prototype,d),C.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(y,C,$){var y=y("./lib/report_error").reportError,f=2e3,d=(c.prototype.$setMaxTokenCount=function(h){f=0|h},c.prototype.$applyToken=function(h){var n=this.splitRegex.exec(h).slice(1),o=this.token.apply(this,n);if(typeof o=="string")return[{type:o,value:h}];for(var i=[],s=0,a=o.length;s<a;s++)n[s]&&(i[i.length]={type:o[s],value:n[s]});return i},c.prototype.$arrayTokens=function(h){if(!h)return[];var n=this.splitRegex.exec(h);if(!n)return"text";for(var o=[],i=this.tokenArray,s=0,a=i.length;s<a;s++)n[s+1]&&(o[o.length]={type:i[s],value:n[s+1]});return o},c.prototype.removeCapturingGroups=function(h){return h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,o){return o?"(?:":n})},c.prototype.createSplitterRegexp=function(h,n){var o,i,s;return(h=(h=h.indexOf("(?=")!=-1&&(o=0,i=!1,s={},h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,t,e,r,l,p){return i?i=l!="]":l?i=!0:r?(o==s.stack&&(s.end=p+1,s.stack=-1),o--):e&&(o++,e.length!=1)&&(s.stack=o,s.start=p),a}),s.end!=null)&&/^\)*$/.test(h.substr(s.end))?h.substring(0,s.start)+h.substr(s.end):h).charAt(0)!="^"?"^"+h:h).charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(n||"").replace("g",""))},c.prototype.getLineTokens=function(h,n){n&&typeof n!="string"?(n=(o=n.slice(0))[0])==="#tmp"&&(o.shift(),n=o.shift()):o=[];for(var o,i,s=n||"start",a=(a=this.states[s])||this.states[s="start"],t=this.matchMappings[s],e=this.regExps[s],r=[],l=e.lastIndex=0,p=0,g={type:null,value:""};i=e.exec(h);){var I,A=t.defaultToken,N=null,M=i[0],R=e.lastIndex;R-M.length>l&&(I=h.substring(l,R-M.length),g.type==A?g.value+=I:(g.type&&r.push(g),g={type:A,value:I}));for(var S=0;S<i.length-2;S++)if(i[S+1]!==void 0){A=(N=a[t[S]]).onMatch?N.onMatch(M,s,o,h):N.token,N.next&&(s=typeof N.next=="string"?N.next:N.next(s,o),(a=this.states[s])||(this.reportError("state doesn't exist",s),a=this.states[s="start"]),t=this.matchMappings[s],(e=this.regExps[s]).lastIndex=l=R),N.consumeLineEnd&&(l=R);break}if(M){if(typeof A=="string")N&&N.merge===!1||g.type!==A?(g.type&&r.push(g),g={type:A,value:M}):g.value+=M;else if(A)for(g.type&&r.push(g),g={type:null,value:""},S=0;S<A.length;S++)r.push(A[S])}if(l==h.length)break;if(l=R,p++>f){for(p>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:h});l<h.length;)g.type&&r.push(g),g={value:h.substring(l,l+=500),type:"overflow"};s="start",o=[];break}}return g.type&&r.push(g),1<o.length&&o[0]!==s&&o.unshift("#tmp",s),{tokens:r,state:o.length?o:s}},c);function c(h){for(var n in this.splitRegex,this.states=h,this.regExps={},this.matchMappings={},this.states){for(var o=this.states[n],i=[],s=0,a=this.matchMappings[n]={defaultToken:"text"},t="g",e=[],r=0;r<o.length;r++){var l,p,g=o[r];g.defaultToken&&(a.defaultToken=g.defaultToken),g.caseInsensitive&&t.indexOf("i")===-1&&(t+="i"),g.unicode&&t.indexOf("u")===-1&&(t+="u"),g.regex==null||(g.regex instanceof RegExp&&(g.regex=g.regex.toString().slice(1,-1)),l=g.regex,p=new RegExp("(?:("+l+")|(.))").exec("a").length-2,Array.isArray(g.token)?g.token.length==1||p==1?g.token=g.token[0]:p-1!=g.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:g,groupCount:p-1}),g.token=g.token[0]):(g.tokenArray=g.token,g.token=null,g.onMatch=this.$arrayTokens):typeof g.token!="function"||g.onMatch||(g.onMatch=1<p?this.$applyToken:g.token),1<p&&(l=/\\\d/.test(g.regex)?g.regex.replace(/\\([0-9]+)/g,function(I,A){return"\\"+(parseInt(A,10)+s+1)}):(p=1,this.removeCapturingGroups(g.regex)),g.splitRegex||typeof g.token=="string"||e.push(g)),a[s]=r,s+=p,i.push(l),g.onMatch)||(g.onMatch=null)}i.length||(a[0]=0,i.push("$")),e.forEach(function(I){I.splitRegex=this.createSplitterRegexp(I.regex,t)},this),this.regExps[n]=new RegExp("("+i.join(")|(")+")|($)",t)}}d.prototype.reportError=y,C.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(f,C,$){var y=f("../lib/deep_copy").deepCopy,f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(h,n){if(n)for(var o in h){for(var i=h[o],s=0;s<i.length;s++){var a=i[s];(a.next||a.onMatch)&&(typeof a.next=="string"&&a.next.indexOf(n)!==0&&(a.next=n+a.next),a.nextState)&&a.nextState.indexOf(n)!==0&&(a.nextState=n+a.nextState)}this.$rules[n+o]=i}else for(var o in h)this.$rules[o]=h[o]},this.getRules=function(){return this.$rules},this.embedRules=function(h,n,o,i,s){if(h=typeof h=="function"?new h().getRules():h,i)for(var a=0;a<i.length;a++)i[a]=n+i[a];else for(var t in i=[],h)i.push(n+t);if(this.addRules(h,n),o)for(var e=Array.prototype[s?"push":"unshift"],a=0;a<i.length;a++)e.apply(this.$rules[i[a]],y(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};function d(h,n){return h=="start"&&!n.length||n.unshift(this.nextState,h),this.nextState}function c(h,n){return n.shift(),n.shift()||"start"}this.normalizeRules=function(){var h=0,n=this.$rules;Object.keys(n).forEach(function o(i){var s=n[i];s.processed=!0;for(var a=0;a<s.length;a++){var t=s[a],e=null,r=(Array.isArray(t)&&(e=t,t={}),!t.regex&&t.start&&(t.regex=t.start,t.next||(t.next=[]),t.next.push({defaultToken:t.token},{token:t.token+".end",regex:t.end||t.start,next:"pop"}),t.token=t.token+".start",t.push=!0),t.next||t.push);if(r&&Array.isArray(r)?((p=t.stateName)||(typeof(p=t.token)!="string"&&(p=p[0]||""),n[p]&&(p+=h++)),n[p]=r,o(t.next=p)):r=="pop"&&(t.next=c),t.push&&(t.nextState=t.next||t.push,t.next=d,delete t.push),t.rules)for(var l in t.rules)n[l]?n[l].push&&n[l].push.apply(n[l],t.rules[l]):n[l]=t.rules[l];var p=typeof t=="string"?t:t.include;p&&(p==="$self"&&(p="start"),e=Array.isArray(p)?p.map(function(g){return n[g]}):n[p]),e&&(r=[a,1].concat(e),t.noEscape&&(r=r.filter(function(g){return!g.next})),s.splice.apply(s,r),a--),t.keywordMap&&(t.token=this.createKeywordMapper(t.keywordMap,t.defaultToken||"text",t.caseInsensitive),delete t.defaultToken)}},this)},this.createKeywordMapper=function(h,n,o,i){var s=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(a){for(var t=h[a].split(i||"|"),e=t.length;e--;){var r=t[e];this.$keywordList.push(r),o&&(r=r.toLowerCase()),s[r]=a}},this),h=null,o?function(a){return s[a.toLowerCase()]||n}:function(a){return s[a]||n}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),C.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(b,C,$){var y=function(){this.$behaviours={}};(function(){this.add=function(f,d,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][d]=c},this.addBehaviours=function(f){for(var d in f)for(var c in f[d])this.add(d,c,f[d][c])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,d){f=(typeof f=="function"?new f:f).getBehaviours(d),this.addBehaviours(f)},this.getBehaviours=function(f){if(f){for(var d={},c=0;c<f.length;c++)this.$behaviours[f[c]]&&(d[f[c]]=this.$behaviours[f[c]]);return d}return this.$behaviours}}).call(y.prototype),C.Behaviour=y}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(b,C,$){var y=b("./range").Range;function f(d,c,h){this.$session=d,this.$row=c,this.$rowTokens=d.getTokens(c),d=d.getTokenAt(c,h),this.$tokenIndex=d?d.index:-1}f.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,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]},f.prototype.stepForward=function(){var d;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,d=d||this.$session.getLength(),this.$row>=d)return this.$row=d-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentTokenRow=function(){return this.$row},f.prototype.getCurrentTokenColumn=function(){var d=this.$rowTokens,c=this.$tokenIndex,h=d[c].start;if(h===void 0)for(h=0;0<c;)h+=d[--c].value.length;return h},f.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},f.prototype.getCurrentTokenRange=function(){var d=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new y(this.$row,c,this.$row,c+d.value.length)},C.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(b,C,$){function y(r){var l=-1;if((a=r.multiSelect&&(l=r.selection.index,a.rangeCount!=r.multiSelect.rangeCount)?{rangeCount:r.multiSelect.rangeCount}:a)[l])return d=a[l];d=a[l]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function f(r,l,p,g){var I=r.end.row-r.start.row;return{text:p+l+g,selection:[0,r.start.column+1,I,r.end.column+(I?0:1)]}}var d,c=b("../../lib/oop"),h=b("../behaviour").Behaviour,n=b("../../token_iterator").TokenIterator,o=b("../../lib/lang"),i=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a={},t={'"':'"',"'":"'"},e=function(r){r=r||{},this.add("braces","insertion",function(l,p,g,I,A){var N=g.getCursorPosition(),M=I.doc.getLine(N.row);if(A=="{"){y(g);var R=g.getSelectionRange(),S=I.doc.getTextRange(R),_=I.getTokenAt(N.row,N.column);if(S!==""&&S!=="{"&&g.getWrapBehavioursEnabled())return f(R,S,"{","}");if(_&&/(?:string)\.quasi|\.xml/.test(_.type)){if(!([/tag\-(?:open|name)/,/attribute\-name/].some(function(v){return v.test(_.type)})||/(string)\.quasi/.test(_.type)&&_.value[N.column-_.start-1]!=="$"))return e.recordAutoInsert(g,I,"}"),{text:"{}",selection:[1,1]}}else if(e.isSaneInsertion(g,I))return/[\]\}\)]/.test(M[N.column])||g.inMultiSelectMode||r.braces?(e.recordAutoInsert(g,I,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(g,I,"{"),{text:"{",selection:[1,1]})}else if(A=="}"){y(g);var u=M.substring(N.column,N.column+1);if(u=="}"&&I.$findOpeningBracket("}",{column:N.column+1,row:N.row})!==null&&e.isAutoInsertedClosing(N,M,A))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if(A==`
`||A==`\r
`){if(y(g),R="",e.isMaybeInsertedClosing(N,M)&&(R=o.stringRepeat("}",d.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),(u=M.substring(N.column,N.column+1))==="}"){if(S=I.findMatchingBracket({row:N.row,column:N.column+1},"}"),!S)return null;var E=this.$getIndent(I.getLine(S.row))}else{if(!R)return void e.clearMaybeInsertedClosing();E=this.$getIndent(M)}return A=E+I.getTabString(),{text:`
`+A+`
`+E+R,selection:[1,A.length,1,A.length]}}e.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(l,p,g,I,A){var N=I.doc.getTextRange(A);if(!A.isMultiLine()&&N=="{"){if(y(g),I.doc.getLine(A.start.row).substring(A.end.column,A.end.column+1)=="}")return A.end.column++,A;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(l,p,g,I,A){if(A=="(")return y(g),N=g.getSelectionRange(),(M=I.doc.getTextRange(N))!==""&&g.getWrapBehavioursEnabled()?f(N,M,"(",")"):e.isSaneInsertion(g,I)?(e.recordAutoInsert(g,I,")"),{text:"()",selection:[1,1]}):void 0;if(A==")"){y(g);var N=g.getCursorPosition(),M=I.doc.getLine(N.row),g=M.substring(N.column,N.column+1);if(g==")"&&I.$findOpeningBracket(")",{column:N.column+1,row:N.row})!==null&&e.isAutoInsertedClosing(N,M,A))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(l,p,g,I,A){var N=I.doc.getTextRange(A);if(!A.isMultiLine()&&N=="("&&(y(g),I.doc.getLine(A.start.row).substring(A.start.column+1,A.start.column+2)==")"))return A.end.column++,A}),this.add("brackets","insertion",function(l,p,g,I,A){if(A=="[")return y(g),N=g.getSelectionRange(),(M=I.doc.getTextRange(N))!==""&&g.getWrapBehavioursEnabled()?f(N,M,"[","]"):e.isSaneInsertion(g,I)?(e.recordAutoInsert(g,I,"]"),{text:"[]",selection:[1,1]}):void 0;if(A=="]"){y(g);var N=g.getCursorPosition(),M=I.doc.getLine(N.row),g=M.substring(N.column,N.column+1);if(g=="]"&&I.$findOpeningBracket("]",{column:N.column+1,row:N.row})!==null&&e.isAutoInsertedClosing(N,M,A))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(l,p,g,I,A){var N=I.doc.getTextRange(A);if(!A.isMultiLine()&&N=="["&&(y(g),I.doc.getLine(A.start.row).substring(A.start.column+1,A.start.column+2)=="]"))return A.end.column++,A}),this.add("string_dquotes","insertion",function(l,p,g,I,A){var N=I.$mode.$quotes||t;if(A.length==1&&N[A]&&(!this.lineCommentStart||this.lineCommentStart.indexOf(A)==-1)){y(g);var M=g.getSelectionRange(),R=I.doc.getTextRange(M);if(!(R===""||R.length==1&&N[R])&&g.getWrapBehavioursEnabled())return f(M,R,A,A);if(!R){var N=g.getCursorPosition(),M=I.doc.getLine(N.row),R=M.substring(N.column-1,N.column),g=M.substring(N.column,N.column+1),u=I.getTokenAt(N.row,N.column),S=I.getTokenAt(N.row,N.column+1);if(R=="\\"&&u&&/escape/.test(u.type))return null;var _,u=u&&/string|escape/.test(u.type),E=!S||/string|escape/.test(S.type);if(g==A)(_=u!==E)&&/string\.end/.test(S.type)&&(_=!1);else{if(u&&!E||u&&E||(S=I.$mode.tokenRe,u=(S.lastIndex=0,S.test(R)),E=(S.lastIndex=0,S.test(g)),I=I.$mode.$pairQuotesAfter,!(I&&I[A]&&I[A].test(R))&&u||E)||g&&!/[\s;,.})\]\\]/.test(g)||(I=M[N.column-2],R==A&&(I==A||S.test(I))))return null;_=!0}return{text:_?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(l,p,g,I,A){var N=I.$mode.$quotes||t,M=I.doc.getTextRange(A);if(!A.isMultiLine()&&N.hasOwnProperty(M)&&(y(g),I.doc.getLine(A.start.row).substring(A.start.column+1,A.start.column+2)==M))return A.end.column++,A}),r.closeDocComment!==!1&&this.add("doc comment end","insertion",function(l,p,g,I,A){var N;if(l==="doc-start"&&(A===`
`||A===`\r
`)&&g.selection.isEmpty())return l=g.getCursorPosition(),g=I.doc.getLine(l.row),I=I.doc.getLine(l.row+1),N=this.$getIndent(g),/\s*\*/.test(I)?/^\s*\*/.test(g)?{text:A+N+"* ",selection:[1,3+N.length,1,3+N.length]}:{text:A+N+" * ",selection:[1,3+N.length,1,3+N.length]}:/\/\*\*/.test(g.substring(0,l.column))?{text:A+N+" * "+A+" "+N+"*/",selection:[1,4+N.length,1,4+N.length]}:void 0})};e.isSaneInsertion=function(r,l){var p=r.getCursorPosition(),g=new n(l,p.row,p.column);if(!this.$matchTokenType(g.getCurrentToken()||"text",i)){if(/[)}\]]/.test(r.session.getLine(p.row)[p.column]))return!0;if(r=new n(l,p.row,p.column+1),!this.$matchTokenType(r.getCurrentToken()||"text",i))return!1}return g.stepForward(),g.getCurrentTokenRow()!==p.row||this.$matchTokenType(g.getCurrentToken()||"text",s)},e.$matchTokenType=function(r,l){return-1<l.indexOf(r.type||r)},e.recordAutoInsert=function(r,l,p){r=r.getCursorPosition(),l=l.doc.getLine(r.row),this.isAutoInsertedClosing(r,l,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=r.row,d.autoInsertedLineEnd=p+l.substr(r.column),d.autoInsertedBrackets++},e.recordMaybeInsert=function(r,l,p){r=r.getCursorPosition(),l=l.doc.getLine(r.row),this.isMaybeInsertedClosing(r,l)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=r.row,d.maybeInsertedLineStart=l.substr(0,r.column)+p,d.maybeInsertedLineEnd=l.substr(r.column),d.maybeInsertedBrackets++},e.isAutoInsertedClosing=function(r,l,p){return 0<d.autoInsertedBrackets&&r.row===d.autoInsertedRow&&p===d.autoInsertedLineEnd[0]&&l.substr(r.column)===d.autoInsertedLineEnd},e.isMaybeInsertedClosing=function(r,l){return 0<d.maybeInsertedBrackets&&r.row===d.maybeInsertedRow&&l.substr(r.column)===d.maybeInsertedLineEnd&&l.substr(0,r.column)==d.maybeInsertedLineStart},e.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},e.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},c.inherits(e,h),C.CstyleBehaviour=e}),ace.define("ace/unicode",["require","exports","module"],function(b,C,$){for(var y=[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],f=0,d=[],c=0;c<y.length;c+=2)d.push(f+=y[c]),y[c+1]&&d.push(45,f+=y[c+1]);C.wordChars=String.fromCharCode.apply(null,d)}),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(s,C,$){var y=s("../config"),f=s("../tokenizer").Tokenizer,d=s("./text_highlight_rules").TextHighlightRules,c=s("./behaviour/cstyle").CstyleBehaviour,h=s("../unicode"),n=s("../lib/lang"),o=s("../token_iterator").TokenIterator,i=s("../range").Range,s=function(){this.HighlightRules=d};(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,t,e,r){var l=t.doc,p=!0,g=!0,I=1/0,A=t.getTabSize(),N=!1;if(this.lineCommentStart){E=Array.isArray(this.lineCommentStart)?(L=this.lineCommentStart.map(n.escapeRegExp).join("|"),this.lineCommentStart[0]):(L=n.escapeRegExp(this.lineCommentStart),this.lineCommentStart),L=new RegExp("^(\\s*)(?:"+L+") ?"),N=t.getUseSoftTabs();var M=function(Q,K){var te,T,O=Q.match(L);O&&(te=O[1].length,T=O[0].length,u(Q,te,T)||O[0][T-1]!=" "||T--,l.removeInLine(K,te,T))},R=E+" ",S=function(Q,K){p&&!/\S/.test(Q)||(u(Q,I,I)?l.insertInLine({row:K,column:I},R):l.insertInLine({row:K,column:I},E))},_=function(Q,K){return L.test(Q)},u=function(Q,K,te){for(var T=0;K--&&Q.charAt(K)==" ";)T++;if(T%A!=0)return!1;for(T=0;Q.charAt(te++)==" ";)T++;return 2<A?T%A!=A-1:T%A==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,v=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+n.escapeRegExp(E)+")"),G=new RegExp("(?:"+n.escapeRegExp(v)+")\\s*$"),S=function(T,O){_(T,O)||p&&!/\S/.test(T)||(l.insertInLine({row:O,column:T.length},v),l.insertInLine({row:O,column:I},E))},M=function(T,O){var V;(V=T.match(G))&&l.removeInLine(O,T.length-V[0].length,T.length),(V=T.match(L))&&l.removeInLine(O,V[1].length,V[0].length)},_=function(T,O){if(L.test(T))return!0;for(var V=t.getTokens(O),z=0;z<V.length;z++)if(V[z].type==="comment")return!0}}function P(Q){for(var K=e;K<=r;K++)Q(l.getLine(K),K)}var Y=1/0;P(function(Q,K){var te=Q.search(/\S/);te!==-1?(te<I&&(I=te),g&&!_(Q,K)&&(g=!1)):Y>Q.length&&(Y=Q.length)}),I==1/0&&(I=Y,g=p=!1),N&&I%A!=0&&(I=Math.floor(I/A)*A),P(g?M:S)},this.toggleBlockComment=function(a,t,e,r){var l=this.blockComment;if(l){!l.start&&l[0]&&(l=l[0]);var p,g,I=(S=new o(t,r.row,r.column)).getCurrentToken(),A=(t.selection,t.selection.toOrientedRange());if(I&&/comment/.test(I.type)){for(;I&&/comment/.test(I.type);){if((_=I.value.indexOf(l.start))!=-1){var N=S.getCurrentTokenRow(),M=S.getCurrentTokenColumn()+_,R=new i(N,M,N,M+l.start.length);break}I=S.stepBackward()}for(var S,_,I=(S=new o(t,r.row,r.column)).getCurrentToken();I&&/comment/.test(I.type);){if((_=I.value.indexOf(l.end))!=-1){var N=S.getCurrentTokenRow(),M=S.getCurrentTokenColumn()+_,u=new i(N,M,N,M+l.end.length);break}I=S.stepForward()}u&&t.remove(u),R&&(t.remove(R),p=R.start.row,g=-l.start.length)}else g=l.start.length,p=e.start.row,t.insert(e.end,l.end),t.insert(e.start,l.start);A.start.row==p&&(A.start.column+=g),A.end.row==p&&(A.end.column+=g),t.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(a,t,e){return this.$getIndent(t)},this.checkOutdent=function(a,t,e){return!1},this.autoOutdent=function(a,t,e){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){for(var t in this.$embeds=[],this.$modes={},a){var e,r,l;a[t]&&(r=(e=a[t]).prototype.$id,(l=y.$modes[r])||(y.$modes[r]=l=new e),y.$modes[t]||(y.$modes[t]=l),this.$embeds.push(t),this.$modes[t]=l)}for(var p=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=this,t=0;t<p.length;t++)(function(A){var N,M;N=p[A],M=g[N],g[p[A]]=function(){return this.$delegator(N,arguments,M)}})(t)},this.$delegator=function(a,t,e){var r=t[0]||"start";if(typeof r!="string"){if(Array.isArray(r[2])){var l=r[2][r[2].length-1];if(g=this.$modes[l])return g[a].apply(g,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var p=0;p<this.$embeds.length;p++)if(this.$modes[this.$embeds[p]]){var g,I=r.split(this.$embeds[p]);if(!I[0]&&I[1])return t[0]=I[1],(g=this.$modes[this.$embeds[p]])[a].apply(g,t)}return l=e.apply(this,t),e?l:void 0},this.transformAction=function(a,t,e,r,l){if(this.$behaviour){var p,g=this.$behaviour.getBehaviours();for(p in g)if(g[p][t]){var I=g[p][t].apply(this,arguments);if(I)return I}}},this.getKeywords=function(a){if(!this.completionKeywords){var t=this.$tokenizer.rules,e=[];for(g in t)for(var r=t[g],l=0,p=r.length;l<p;l++)if(typeof r[l].token=="string")/keyword|support|storage/.test(r[l].token)&&e.push(r[l].regex);else if(typeof r[l].token=="object")for(var g,I=0,A=r[l].token.length;I<A;I++)/keyword|support|storage/.test(r[l].token[I])&&(g=r[l].regex.match(/\(.+?\)/g)[I],e.push(g.substr(1,g.length-2)));this.completionKeywords=e}return a?e.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(a,t,e,r){return(this.$keywordList||this.$createKeywordList()).map(function(l){return{name:l,value:l,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(s.prototype),C.Mode=s}),ace.define("ace/apply_delta",["require","exports","module"],function(b,C,$){C.applyDelta=function(y,f,d){var c=f.start.row,h=f.start.column,n=y[c]||"";switch(f.action){case"insert":f.lines.length===1?y[c]=n.substring(0,h)+f.lines[0]+n.substring(h):(o=[c,1].concat(f.lines),y.splice.apply(y,o),y[c]=n.substring(0,h)+y[c],y[c+f.lines.length-1]+=n.substring(h));break;case"remove":var o=f.end.column,i=f.end.row;c===i?y[c]=n.substring(0,h)+n.substring(o):y.splice(c,i-c+1,n.substring(0,h)+y[i].substring(o))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,C,$){var y=f("./lib/oop"),f=f("./lib/event_emitter").EventEmitter,d=(c.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},c.prototype.getDocument=function(){return this.document},c.prototype.onChange=function(n){n.start.row==n.end.row&&n.start.row!=this.row||n.start.row>this.row||(n=function(o,i,s){var r=o.action=="insert",a=(r?1:-1)*(o.end.row-o.start.row),t=(r?1:-1)*(o.end.column-o.start.column),e=o.start,r=r?e:o.end;return h(i,e,s)?{row:i.row,column:i.column}:h(r,i,!s)?{row:i.row+a,column:i.column+(i.row==r.row?t:0)}:{row:e.row,column:e.column}}(n,{row:this.row,column:this.column},this.$insertRight),this.setPosition(n.row,n.column,!0))},c.prototype.setPosition=function(n,o,i){i=i?{row:n,column:o}:this.$clipPositionToDocument(n,o),this.row==i.row&&this.column==i.column||(n={row:this.row,column:this.column},this.row=i.row,this.column=i.column,this._signal("change",{old:n,value:i}))},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(n,o){var i={};return n>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):n<0?(i.row=0,i.column=0):(i.row=n,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,o))),o<0&&(i.column=0),i},c);function c(n,o,i){this.$onChange=this.onChange.bind(this),this.attach(n),typeof o!="number"?this.setPosition(o.row,o.column):this.setPosition(o,i)}function h(n,o,i){return i=i?n.column<=o.column:n.column<o.column,n.row<o.row||n.row==o.row&&i}d.prototype.$insertRight=!1,y.implement(d.prototype,f),C.Anchor=d}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,C,$){var y=n("./lib/oop"),f=n("./apply_delta").applyDelta,d=n("./lib/event_emitter").EventEmitter,c=n("./range").Range,h=n("./anchor").Anchor,n=(o.prototype.setValue=function(i){var s=this.getLength()-1;this.remove(new c(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},i||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(i,s){return new h(this,i,s)},o.prototype.$detectNewLine=function(i){i=i.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=i?i[1]:`
`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},o.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(i){return i==`\r
`||i=="\r"||i==`
`},o.prototype.getLine=function(i){return this.$lines[i]||""},o.prototype.getLines=function(i,s){return this.$lines.slice(i,s+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(i){var s,a;return i.start.row===i.end.row?s=[this.getLine(i.start.row).substring(i.start.column,i.end.column)]:((s=this.getLines(i.start.row,i.end.row))[0]=(s[0]||"").substring(i.start.column),a=s.length-1,i.end.row-i.start.row==a&&(s[a]=s[a].substring(0,i.end.column))),s},o.prototype.insertLines=function(i,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,s)},o.prototype.removeLines=function(i,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,s)},o.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},o.prototype.insert=function(i,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(i,this.$split(s))},o.prototype.insertInLine=function(t,s){var a=this.clippedPos(t.row,t.column),t=this.pos(t.row,t.column+s.length);return this.applyDelta({start:a,end:t,action:"insert",lines:[s]},!0),this.clonePos(t)},o.prototype.clippedPos=function(i,s){var a=this.getLength(),a=(i===void 0?i=a:i<0?i=0:a<=i&&(i=a-1,s=void 0),this.getLine(i));return s==null&&(s=a.length),{row:i,column:s=Math.min(Math.max(s,0),a.length)}},o.prototype.clonePos=function(i){return{row:i.row,column:i.column}},o.prototype.pos=function(i,s){return{row:i,column:s}},o.prototype.$clipPosition=function(i){var s=this.getLength();return i.row>=s?(i.row=Math.max(0,s-1),i.column=this.getLine(s-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},o.prototype.insertFullLines=function(i,s){var a=0,a=(i=Math.min(Math.max(i,0),this.getLength()))<this.getLength()?(s=s.concat([""]),0):(s=[""].concat(s),this.$lines[--i].length);this.insertMergedLines({row:i,column:a},s)},o.prototype.insertMergedLines=function(a,s){var a=this.clippedPos(a.row,a.column),t={row:a.row+s.length-1,column:(s.length==1?a.column:0)+s[s.length-1].length};return this.applyDelta({start:a,end:t,action:"insert",lines:s}),this.clonePos(t)},o.prototype.remove=function(a){var s=this.clippedPos(a.start.row,a.start.column),a=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:s,end:a,action:"remove",lines:this.getLinesForRange({start:s,end:a})}),this.clonePos(s)},o.prototype.removeInLine=function(i,s,a){return s=this.clippedPos(i,s),i=this.clippedPos(i,a),this.applyDelta({start:s,end:i,action:"remove",lines:this.getLinesForRange({start:s,end:i})},!0),this.clonePos(s)},o.prototype.removeFullLines=function(i,s){i=Math.min(Math.max(0,i),this.getLength()-1);var r=(s=Math.min(Math.max(0,s),this.getLength()-1))==this.getLength()-1&&0<i,t=s<this.getLength()-1,e=r?i-1:i,r=r?this.getLine(e).length:0,a=t?s+1:s,t=t?0:this.getLine(a).length,e=new c(e,r,a,t),r=this.$lines.slice(i,s+1);return this.applyDelta({start:e.start,end:e.end,action:"remove",lines:this.getLinesForRange(e)}),r},o.prototype.removeNewLine=function(i){i<this.getLength()-1&&0<=i&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(i,s){return i instanceof c||(i=c.fromPoints(i.start,i.end)),s.length===0&&i.isEmpty()?i.start:s==this.getTextRange(i)?i.end:(this.remove(i),s?this.insert(i.start,s):i.start)},o.prototype.applyDeltas=function(i){for(var s=0;s<i.length;s++)this.applyDelta(i[s])},o.prototype.revertDeltas=function(i){for(var s=i.length-1;0<=s;s--)this.revertDelta(i[s])},o.prototype.applyDelta=function(i,s){var a=i.action=="insert";(a?i.lines.length<=1&&!i.lines[0]:!c.comparePoints(i.start,i.end))||(a&&2e4<i.lines.length?this.$splitAndapplyLargeDelta(i,2e4):(f(this.$lines,i,s),this._signal("change",i)))},o.prototype.$safeApplyDelta=function(i){var s=this.$lines.length;(i.action=="remove"&&i.start.row<s&&i.end.row<s||i.action=="insert"&&i.start.row<=s)&&this.applyDelta(i)},o.prototype.$splitAndapplyLargeDelta=function(i,s){for(var a=i.lines,t=a.length-s+1,e=i.start.row,r=i.start.column,l=0,p=0;l<t;l=p){p+=s-1;var g=a.slice(l,p);g.push(""),this.applyDelta({start:this.pos(e+l,r),end:this.pos(e+p,r=0),action:i.action,lines:g},!0)}i.lines=a.slice(l),i.start.row=e+l,i.start.column=r,this.applyDelta(i,!0)},o.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},o.prototype.indexToPosition=function(i,s){for(var a=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,e=s||0,r=a.length;e<r;e++)if((i-=a[e].length+t)<0)return{row:e,column:i+a[e].length+t};return{row:r-1,column:i+a[r-1].length+t}},o.prototype.positionToIndex=function(i,s){for(var a=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,e=0,r=Math.min(i.row,a.length),l=s||0;l<r;++l)e+=a[l].length+t;return e+i.column},o.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},o);function o(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",y.implement(n.prototype,d),C.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,C,$){var y=f("./lib/oop"),f=f("./lib/event_emitter").EventEmitter,d=(c.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(h,n){this._signal("update",{data:{first:h,last:n}})},c.prototype.start=function(h){this.currentLine=Math.min(h||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)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(h){var n=h.start.row,o=h.end.row-n;o==0?this.lines[n]=null:h.action=="remove"?(this.lines.splice(n,1+o,null),this.states.splice(n,1+o,null)):((h=Array(1+o)).unshift(n,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)),this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},c.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},c.prototype.$tokenizeRow=function(h){var o=this.doc.getLine(h),n=this.states[h-1],o=this.tokenizer.getLineTokens(o,n,h);return this.states[h]+""!=o.state+""?(this.states[h]=o.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=o.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c);function c(h,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var o=this;this.$worker=function(){if(o.running){for(var i=new Date,s=o.currentLine,a=-1,t=o.doc,e=s;o.lines[s];)s++;var r=t.getLength(),l=0;for(o.running=!1;s<r;){for(o.$tokenizeRow(s),a=s;s++,o.lines[s];);if(++l%5==0&&20<new Date-i){o.running=setTimeout(o.$worker,20);break}}o.currentLine=s,e<=(a=a==-1?s:a)&&o.fireUpdateEvent(e,a)}}}y.implement(d.prototype,f),C.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(d,C,$){var y=d("./lib/lang"),f=d("./range").Range,d=(c.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},c.prototype.update=function(h,n,o,i){if(this.regExp)for(var s=i.firstRow,a=i.lastRow,t={},e=s;e<=a;e++){var r=this.cache[e];r==null&&(r=(r=(r=y.getMatchOffsets(o.getLine(e),this.regExp)).length>this.MAX_RANGES?r.slice(0,this.MAX_RANGES):r).map(function(I){return new f(e,I.offset,e,I.offset+I.length)}),this.cache[e]=r.length?r:"");for(var l=r.length;l--;){var p=r[l].toScreenRange(o),g=p.toString();t[g]||(t[g]=!0,n.drawSingleLineMarker(h,p,this.clazz,i))}}},c);function c(h,n,o){o===void 0&&(o="text"),this.setRegexp(h),this.clazz=n,this.type=o}d.prototype.MAX_RANGES=500,C.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(b,C,$){f.prototype.addSession=function(e){this.$session=e},f.prototype.add=function(e,r,l){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),r!==!1&&this.lastDeltas||(this.lastDeltas=[],(r=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),e.action!="remove"&&e.action!="insert"||(this.$lastDelta=e),this.lastDeltas.push(e))},f.prototype.addSelection=function(e,r){this.selections.push({value:e,rev:r||this.$rev})},f.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},f.prototype.markIgnored=function(e,r){r==null&&(r=this.$rev+1);for(var l=this.$undoStack,p=l.length;p--;){var g=l[p][0];if(g.id<=e)break;g.id<r&&(g.ignore=!0)}this.lastDeltas=null},f.prototype.getSelection=function(e,r){for(var l=this.selections,p=l.length;p--;){var g=l[p];if(g.rev<e)return g=r?l[p+1]:g}},f.prototype.getRevision=function(){return this.$rev},f.prototype.getDeltas=function(e,r){r==null&&(r=this.$rev+1);for(var l=this.$undoStack,p=null,g=0,I=l.length;I--;){var A=l[I][0];if(A.id<r&&!p&&(p=I+1),A.id<=e){g=I+1;break}}return l.slice(g,p)},f.prototype.getChangedRanges=function(e,r){r==null&&this.$rev},f.prototype.getChangedLines=function(e,r){r==null&&this.$rev},f.prototype.undo=function(e,r){this.lastDeltas=null;var l,p=this.$undoStack;if(function(g,I){for(var A=I;A--;){var N=g[A];if(N&&!N[0].ignore){for(;A<I-1;){var M=function(R,S){for(var _=R.length;_--;)for(var u=0;u<S.length;u++)if(!i(R[_],S[u])){for(;_<R.length;){for(;u--;)i(S[u],R[_]);u=S.length,_++}return[R,S]}return R.selectionBefore=S.selectionBefore=R.selectionAfter=S.selectionAfter=null,[S,R]}(g[A],g[A+1]);g[A]=M[0],g[A+1]=M[1],A++}return 1}}}(p,p.length))return e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,l=null,(p=p.pop())&&(l=e.undoChanges(p,r),this.$redoStack.push(p),this.$syncRev()),this.$fromUndo=!1,l},f.prototype.redo=function(e,r){if(this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var E=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),l=this.$redoStack,p=E,g=0;g<p.length;g++)for(var I=p[g],A=0;A<I.length;A++){N=void 0,M=void 0,R=void 0,S=void 0,_=void 0,u=void 0;var N=l,M=I[A];M=function(G){return{start:h(G.start),end:h(G.end),action:G.action,lines:G.lines.slice()}}(M);for(var R=N.length;R--;){for(var S=N[R],_=0;_<S.length;_++){var u=function(G,P){var Y,Q,K=G.action=="insert",te=P.action=="insert";if(K&&te)c(G.start,P.start)<0?s(P,G,1):s(G,P,1);else if(K&&!te)0<=c(G.start,P.end)?s(G,P,-1):(c(G.start,P.start)<=0||s(G,d.fromPoints(P.start,G.start),-1),s(P,G,1));else if(!K&&te)0<=c(P.start,G.end)?s(P,G,-1):(c(P.start,G.start)<=0||s(P,d.fromPoints(G.start,P.start),-1),s(G,P,1));else if(!K&&!te)if(0<=c(P.start,G.end))s(P,G,-1);else{if(!(c(P.end,G.start)<=0))return c(G.start,P.start)<0&&(G=t(Y=G,P.start)),0<c(G.end,P.end)&&(Q=t(G,P.end)),a(P.end,G.start,G.end,-1),Q&&!Y&&(G.lines=Q.lines,G.start=Q.start,G.end=Q.end,Q=G),[P,Y,Q].filter(Boolean);s(G,P,-1)}return[P,G]}(S[_],M);M=u[0],u.length!=2&&(u[2]?(S.splice(_+1,1,u[1],u[2]),_++):u[1]||(S.splice(_,1),_--))}S.length||N.splice(R,1)}}this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(L){L[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),v=null;return E&&(v=e.redoChanges(E,r),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,v},f.prototype.$syncRev=function(){var e=this.$undoStack,e=e[e.length-1],e=e&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},f.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=[]},f.prototype.canUndo=function(){return 0<this.$undoStack.length},f.prototype.canRedo=function(){return 0<this.$redoStack.length},f.prototype.bookmark=function(e){e==null&&(e=this.$rev),this.mark=e},f.prototype.isAtBookmark=function(){return this.$rev===this.mark},f.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},f.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},f.prototype.$prettyPrint=function(e){return e?n(e):n(this.$undoStack)+`
---
`+n(this.$redoStack)};var y=f;function f(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}y.prototype.hasUndo=y.prototype.canUndo,y.prototype.hasRedo=y.prototype.canRedo,y.prototype.isClean=y.prototype.isAtBookmark,y.prototype.markClean=y.prototype.bookmark;var d=b("./range").Range,c=d.comparePoints;d.comparePoints;function h(e){return{row:e.row,column:e.column}}function n(e){var r;return e=e||this,Array.isArray(e)?e.map(n).join(`
`):(r="",e.action?(r=e.action=="insert"?"+":"-",r+="["+e.lines+"]"):e.value&&(r=Array.isArray(e.value)?e.value.map(o).join(`
`):o(e.value)),e.start&&(r+=o(e)),(e.id||e.rev)&&(r+="	("+(e.id||e.rev)+")"),r)}function o(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function i(e,r){var l=e.action=="insert",p=r.action=="insert";if(l&&p)if(0<=c(r.start,e.end))s(r,e,-1);else{if(!(c(r.start,e.start)<=0))return;s(e,r,1)}else if(l&&!p)if(0<=c(r.start,e.end))s(r,e,-1);else{if(!(c(r.end,e.start)<=0))return;s(e,r,-1)}else if(!l&&p)if(0<=c(r.start,e.start))s(r,e,1);else{if(!(c(r.start,e.start)<=0))return;s(e,r,1)}else if(!l&&!p)if(0<=c(r.start,e.start))s(r,e,1);else{if(!(c(r.end,e.start)<=0))return;s(e,r,-1)}return 1}function s(e,r,l){a(e.start,r.start,r.end,l),a(e.end,r.start,r.end,l)}function a(e,r,l,p){e.row==(p==1?r:l).row&&(e.column+=p*(l.column-r.column)),e.row+=p*(l.row-r.row)}function t(e,r){var l=e.lines,p=e.end,I=(e.end=h(r),e.end.row-e.start.row),g=l.splice(I,l.length),I=I?r.column:r.column-e.start.column;return l.push(g[0].substring(0,I)),g[0]=g[0].substr(I),{start:h(r),end:p,lines:g,action:e.action}}C.UndoManager=y}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(b,C,$){var y=b("../range").Range;function f(d,c){this.foldData=d,Array.isArray(c)?this.folds=c:c=this.folds=[c],d=c[c.length-1],this.range=new y(c[0].start.row,c[0].start.column,d.end.row,d.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(h){h.setFoldLine(this)},this)}f.prototype.shiftRow=function(d){this.start.row+=d,this.end.row+=d,this.folds.forEach(function(c){c.start.row+=d,c.end.row+=d})},f.prototype.addFold=function(d){if(d.sameRow){if(d.start.row<this.startRow||d.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(d),this.folds.sort(function(c,h){return-c.range.compareEnd(h.start.row,h.start.column)}),0<this.range.compareEnd(d.start.row,d.start.column)?(this.end.row=d.end.row,this.end.column=d.end.column):this.range.compareStart(d.end.row,d.end.column)<0&&(this.start.row=d.start.row,this.start.column=d.start.column)}else if(d.start.row==this.end.row)this.folds.push(d),this.end.row=d.end.row,this.end.column=d.end.column;else{if(d.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(d),this.start.row=d.start.row,this.start.column=d.start.column}d.foldLine=this},f.prototype.containsRow=function(d){return d>=this.start.row&&d<=this.end.row},f.prototype.walk=function(d,c,h){var n,o,i=0,s=this.folds,a=!0;c==null&&(c=this.end.row,h=this.end.column);for(var t=0;t<s.length;t++){if((o=(n=s[t]).range.compareStart(c,h))==-1)return void d(null,c,h,i,a);if(!d(null,n.start.row,n.start.column,i,a)&&d(n.placeholder,n.start.row,n.start.column,i)||o===0)return;a=!n.sameRow,i=n.end.column}d(null,c,h,i,a)},f.prototype.getNextFoldTo=function(d,c){for(var h,n,o=0;o<this.folds.length;o++){if((n=(h=this.folds[o]).range.compareEnd(d,c))==-1)return{fold:h,kind:"after"};if(n===0)return{fold:h,kind:"inside"}}return null},f.prototype.addRemoveChars=function(d,c,h){var n,o=this.getNextFoldTo(d,c);if(o){if(n=o.fold,o.kind=="inside"&&n.start.column!=c&&n.start.row!=d)window.console&&window.console.log(d,c,n);else if(n.start.row==d){var i,s=(i=this.folds).indexOf(n);for(s===0&&(this.start.column+=h);s<i.length;s++){if((n=i[s]).start.column+=h,!n.sameRow)return;n.end.column+=h}this.end.column+=h}}},f.prototype.split=function(o,c){var h,n,o=this.getNextFoldTo(o,c);return o&&o.kind!="inside"?(c=o.fold,o=this.folds,h=this.foldData,c=o.indexOf(c),n=o[c-1],this.end.row=n.end.row,this.end.column=n.end.column,n=new f(h,o=o.splice(c,o.length-c)),h.splice(h.indexOf(this)+1,0,n),n):null},f.prototype.merge=function(d){for(var c=d.folds,h=0;h<c.length;h++)this.addFold(c[h]);var n=this.foldData;n.splice(n.indexOf(d),1)},f.prototype.toString=function(){var d=[this.range.toString()+": ["];return this.folds.forEach(function(c){d.push("  "+c.toString())}),d.push("]"),d.join(`
`)},f.prototype.idxToPosition=function(d){for(var c=0,h=0;h<this.folds.length;h++){var n=this.folds[h];if((d-=n.start.column-c)<0)return{row:n.start.row,column:n.start.column+d};if((d-=n.placeholder.length)<0)return n.start;c=n.end.column}return{row:this.end.row,column:this.end.column+d}},C.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(f,C,$){var y=f("./range").Range.comparePoints,f=(d.prototype.pointIndex=function(c,h,n){for(var o=this.ranges,i=n||0;i<o.length;i++){var s=o[i],a=y(c,s.end);if(!(0<a))return s=y(c,s.start),a===0?h&&s!==0?-i-2:i:0<s||s===0&&!h?i:-i-1}return-i-1},d.prototype.add=function(c){var n=!c.isEmpty(),h=this.pointIndex(c.start,n),n=this.pointIndex(c.end,n,h=h<0?-h-1:h);return n<0?n=-n-1:n++,this.ranges.splice(h,n-h,c)},d.prototype.addList=function(c){for(var h=[],n=c.length;n--;)h.push.apply(h,this.add(c[n]));return h},d.prototype.substractPoint=function(c){if(c=this.pointIndex(c),0<=c)return this.ranges.splice(c,1)},d.prototype.merge=function(){for(var c=[],h=this.ranges,n=(h=h.sort(function(a,t){return y(a.start,t.start)}))[0],o=1;o<h.length;o++){var i=n,n=h[o],s=y(i.end,n.start);s<0||(s!=0||i.isEmpty()||n.isEmpty())&&(y(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),h.splice(o,1),c.push(n),n=i,o--)}return this.ranges=h,c},d.prototype.contains=function(c,h){return 0<=this.pointIndex({row:c,column:h})},d.prototype.containsPoint=function(c){return 0<=this.pointIndex(c)},d.prototype.rangeAtPoint=function(c){if(c=this.pointIndex(c),0<=c)return this.ranges[c]},d.prototype.clipRows=function(c,h){var n=this.ranges;if(n[0].start.row>h||n[n.length-1].start.row<c)return[];for(var c=this.pointIndex({row:c,column:0}),o=this.pointIndex({row:h,column:0},c=c<0?-c-1:c),i=(o<0&&(o=-o-1),[]),s=c;s<o;s++)i.push(n[s]);return i},d.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},d.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},d.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},d.prototype.$onChange=function(c){for(var h=c.start,n=c.end,o=h.row,i=n.row,s=this.ranges,a=0,t=s.length;a<t&&!((l=s[a]).end.row>=o);a++);if(c.action=="insert")for(var e=i-o,r=-h.column+n.column;a<t&&!((l=s[a]).start.row>o);a++)l.start.row==o&&l.start.column>=h.column&&(l.start.column==h.column&&this.$bias<=0||(l.start.column+=r,l.start.row+=e)),l.end.row==o&&l.end.column>=h.column&&(l.end.column==h.column&&this.$bias<0||(l.end.column==h.column&&0<r&&a<t-1&&l.end.column>l.start.column&&l.end.column==s[a+1].start.column&&(l.end.column-=r),l.end.column+=r,l.end.row+=e));else for(var l,e=o-i,r=h.column-n.column;a<t&&!((l=s[a]).start.row>i);a++)l.end.row<i&&(o<l.end.row||o==l.end.row&&h.column<l.end.column)?(l.end.row=o,l.end.column=h.column):l.end.row==i?l.end.column<=n.column?(e||l.end.column>h.column)&&(l.end.column=h.column,l.end.row=h.row):(l.end.column+=r,l.end.row+=e):l.end.row>i&&(l.end.row+=e),l.start.row<i&&(o<l.start.row||o==l.start.row&&h.column<l.start.column)?(l.start.row=o,l.start.column=h.column):l.start.row==i?l.start.column<=n.column?(e||l.start.column>h.column)&&(l.start.column=h.column,l.start.row=h.row):(l.start.column+=r,l.start.row+=e):l.start.row>i&&(l.start.row+=e);if(e!=0&&a<t)for(;a<t;a++)(l=s[a]).start.row+=e,l.end.row+=e},d);function d(){this.ranges=[],this.$bias=1}f.prototype.comparePoints=y,C.RangeList=f}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(d,C,$){var y,f,c=this&&this.__extends||(y=function(i,s){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(a,t){a.__proto__=t}:function(a,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}))(i,s)},function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=i}y(i,s),i.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)}),d=d("../range_list").RangeList,c=(c(h,f=d),h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(s){s.setFoldLine(i)})},h.prototype.clone=function(){var i=new h(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(s){i.subFolds.push(s.clone())}),i.collapseChildren=this.collapseChildren,i},h.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){r=i,l=this.start,n(r.start,l),n(r.end,l);for(var s=i.start.row,a=i.start.column,t=0,e=-1;t<this.subFolds.length&&(e=this.subFolds[t].range.compare(s,a))==1;t++);var r=this.subFolds[t],l=0;if(e==0){if(r.range.containsRange(i))return r.addSubFold(i);l=1}for(var s=i.range.end.row,a=i.range.end.column,p=t,e=-1;p<this.subFolds.length&&(e=this.subFolds[p].range.compare(s,a))==1;p++);e==0&&p++;for(var g=this.subFolds.splice(t,p-t,i),I=e==0?g.length-1:g.length,A=l;A<I;A++)i.addSubFold(g[A]);return i.setFoldLine(this.foldLine),i}},h.prototype.restoreRange=function(i){return i=i,s=this.start,o(i.start,s),void o(i.end,s);var s},h);function h(i,s){var a=f.call(this)||this;return a.foldLine=null,a.placeholder=s,a.range=i,a.start=i.start,a.end=i.end,a.sameRow=i.start.row==i.end.row,a.subFolds=a.ranges=[],a}function n(i,s){i.row-=s.row,i.row==0&&(i.column-=s.column)}function o(i,s){i.row==0&&(i.column+=s.column),i.row+=s.row}C.Fold=c}),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(b,C,$){var y=b("../range").Range,f=b("./fold_line").FoldLine,d=b("./fold").Fold,c=b("../token_iterator").TokenIterator,h=b("../mouse/mouse_event").MouseEvent;C.Folding=function(){this.getFoldAt=function(n,o,i){var s=this.getFoldLine(n);if(!s)return null;for(var a=s.folds,t=0;t<a.length;t++){var e=a[t].range;if(e.contains(n,o)&&(i!=1||!e.isEnd(n,o)||e.isEmpty())&&(i!=-1||!e.isStart(n,o)||e.isEmpty()))return a[t]}},this.getFoldsInRange=function(n){var o=n.start,i=n.end,s=this.$foldData,a=[];o.column+=1,--i.column;for(var t=0;t<s.length;t++){var e=s[t].range.compareRange(n);if(e!=2){if(e==-2)break;for(var r=s[t].folds,l=0;l<r.length;l++){var p=r[l];if((e=p.range.compareRange(n))==-2)break;if(e!=2){if(e==42)break;a.push(p)}}}}return--o.column,i.column+=1,a},this.getFoldsInRangeList=function(n){var o;return Array.isArray(n)?(o=[],n.forEach(function(i){o=o.concat(this.getFoldsInRange(i))},this)):o=this.getFoldsInRange(n),o},this.getAllFolds=function(){for(var n=[],o=this.$foldData,i=0;i<o.length;i++)for(var s=0;s<o[i].folds.length;s++)n.push(o[i].folds[s]);return n},this.getFoldStringAt=function(n,o,i,s){if(!(s=s||this.getFoldLine(n)))return null;for(var a,t={end:{column:0}},e=0;e<s.folds.length;e++){var r,l=(r=s.folds[e]).range.compareEnd(n,o);if(l==-1){a=this.getLine(r.start.row).substring(t.end.column,r.start.column);break}if(l===0)return null;t=r}return a=a||this.getLine(r.start.row).substring(t.end.column),i==-1?a.substring(0,o-t.end.column):i==1?a.substring(o-t.end.column):a},this.getFoldLine=function(n,o){var i=this.$foldData,s=0;for((s=o?i.indexOf(o):s)==-1&&(s=0);s<i.length;s++){var a=i[s];if(a.start.row<=n&&a.end.row>=n)return a;if(a.end.row>n)return null}return null},this.getNextFoldLine=function(n,o){var i=this.$foldData,s=0;for((s=o?i.indexOf(o):s)==-1&&(s=0);s<i.length;s++){var a=i[s];if(a.end.row>=n)return a}return null},this.getFoldedRowCount=function(n,o){for(var i=this.$foldData,s=o-n+1,a=0;a<i.length;a++){var e=i[a],t=e.end.row,e=e.start.row;if(o<=t){e<o&&(n<=e?s-=o-e:s=0);break}n<=t&&(s-=n<=e?t-e:t-n+1)}return s},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(o,i){return o.start.row-i.start.row}),n},this.addFold=function(e,l){var i,s=this.$foldData,a=!1,t=(e instanceof d?i=e:(i=new d(l,e)).collapseChildren=l.collapseChildren,this.$clipRangeToDocument(i.range),i.start.row),e=i.start.column,r=i.end.row,l=i.end.column,p=this.getFoldAt(t,e,1),g=this.getFoldAt(r,l,-1);if(p&&g==p)return p.addSubFold(i);p&&!p.range.isStart(t,e)&&this.removeFold(p),g&&!g.range.isEnd(r,l)&&this.removeFold(g),e=this.getFoldsInRange(i.range),0<e.length&&(this.removeFolds(e),i.collapseChildren||e.forEach(function(M){i.addSubFold(M)}));for(var I=0;I<s.length;I++){var A=s[I];if(r==A.start.row){A.addFold(i),a=!0;break}if(t==A.end.row){if(A.addFold(i),a=!0,!i.sameRow){var N=s[I+1];if(N&&N.start.row==r){A.merge(N);break}}break}if(r<=A.start.row)break}return a||(A=this.$addFoldLine(new f(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(A.start.row,A.start.row):this.$updateRowLengthCache(A.start.row,A.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(n){n.forEach(function(o){this.addFold(o)},this)},this.removeFold=function(n){var o=n.foldLine,i=o.start.row,s=o.end.row,a=this.$foldData,t=o.folds;t.length==1?a.splice(a.indexOf(o),1):o.range.isEnd(n.end.row,n.end.column)?(t.pop(),o.end.row=t[t.length-1].end.row,o.end.column=t[t.length-1].end.column):o.range.isStart(n.start.row,n.start.column)?(t.shift(),o.start.row=t[0].start.row,o.start.column=t[0].start.column):n.sameRow?t.splice(t.indexOf(n),1):((t=(a=o.split(n.start.row,n.start.column)).folds).shift(),a.start.row=t[0].start.row,a.start.column=t[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s)),this.$modified=!0,this._signal("changeFold",{data:n,action:"remove"})},this.removeFolds=function(n){for(var o=[],i=0;i<n.length;i++)o.push(n[i]);o.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(n){this.removeFold(n),n.subFolds.forEach(function(o){n.restoreRange(o),this.addFold(o)},this),0<n.collapseChildren&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach(function(o){this.expandFold(o)},this)},this.unfold=function(n,o){var i;if(n==null)i=new y(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof n=="number")i=new y(n,0,n,this.getLine(n).length);else if("row"in n)i=y.fromPoints(n,n);else{if(Array.isArray(n))return s=[],n.forEach(function(a){s=s.concat(this.unfold(a))},this),s;i=n}for(var s,n=s=this.getFoldsInRangeList(i);s.length==1&&y.comparePoints(s[0].start,i.start)<0&&0<y.comparePoints(s[0].end,i.end);)this.expandFolds(s),s=this.getFoldsInRangeList(i);if(o!=0?this.removeFolds(s):this.expandFolds(s),n.length)return n},this.isRowFolded=function(n,o){return!!this.getFoldLine(n,o)},this.getRowFoldEnd=function(n,o){return o=this.getFoldLine(n,o),o?o.end.row:n},this.getRowFoldStart=function(n,o){return o=this.getFoldLine(n,o),o?o.start.row:n},this.getFoldDisplayLine=function(n,o,i,s,a){s==null&&(s=n.start.row),a==null&&(a=0),o==null&&(o=n.end.row),i==null&&(i=this.getLine(o).length);var t=this.doc,e="";return n.walk(function(r,l,p,g){if(!(l<s)){if(l==s){if(p<a)return;g=Math.max(a,g)}e+=r??t.getLine(l).substring(g,p)}},o,i),e},this.getDisplayLine=function(n,o,i,s){var a=this.getFoldLine(n);return a?this.getFoldDisplayLine(a,n,o,i,s):(a=this.doc.getLine(n)).substring(s||0,o||a.length)},this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(o){return o=o.folds.map(function(i){return i.clone()}),new f(n,o)})},this.toggleFold=function(n){var o=this.selection.getRange();if(o.isEmpty()){var i,s=o.start;if(i=this.getFoldAt(s.row,s.column))return void this.expandFold(i);(a=this.findMatchingBracket(s))?o.comparePoint(a)==1?o.end=a:(o.start=a,o.start.column++,o.end.column--):(a=this.findMatchingBracket({row:s.row,column:s.column+1}))?(o.comparePoint(a)==1?o.end=a:o.start=a,o.start.column++):o=this.getCommentFoldRange(s.row,s.column)||o}else{var a=this.getFoldsInRange(o);if(n&&a.length)return void this.expandFolds(a);a.length==1&&(i=a[0])}if((i=i||this.getFoldAt(o.start.row,o.start.column))&&i.range.toString()==o.toString())this.expandFold(i);else{if(s="...",!o.isMultiLine()){if((s=this.getTextRange(o)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,o)}},this.getCommentFoldRange=function(n,o,i){var s=(e=new c(this,n,o)).getCurrentToken(),a=s&&s.type;if(s&&/^comment|string/.test(a)){(a=a.match(/comment|string/)[0])=="comment"&&(a+="|doc-start|\\.doc");var t=new RegExp(a),a=new y;if(i!=1){for(;(s=e.stepBackward())&&t.test(s.type););s=e.stepForward()}a.start.row=e.getCurrentTokenRow(),a.start.column=e.getCurrentTokenColumn()+s.value.length;var e=new c(this,n,o),r=this.getState(e.$row);if(i!=-1){var l=-1;do if(s=e.stepForward(),l==-1){var p=this.getState(e.$row);r.toString()!==p.toString()&&(l=e.$row)}else if(e.$row>l)break;while(s&&t.test(s.type));s=e.stepBackward()}else s=e.getCurrentToken();return a.end.row=e.getCurrentTokenRow(),a.end.column=e.getCurrentTokenColumn(),a}},this.foldAll=function(n,o,i,s){i==null&&(i=1e5);var a=this.foldWidgets;if(a){o=o||this.getLength();for(var t,e=n=n||0;e<o;e++)a[e]==null&&(a[e]=this.getFoldWidget(e)),a[e]!="start"||s&&!s(e)||(t=this.getFoldWidgetRange(e))&&t.isMultiLine()&&t.end.row<=o&&t.start.row>=n&&(e=t.end.row,t.collapseChildren=i,this.addFold("...",t))}},this.foldToLevel=function(n){for(this.foldAll();0<n--;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,function(o){for(var i=n.getTokens(o),s=0;s<i.length;s++){var a=i[s];if(a.type!="text"||!/^\s+$/.test(a.value))return!!/comment/.test(a.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(n){if(!this.$foldStyles[n])throw new Error("invalid fold style: "+n+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=n&&((this.$foldStyle=n)=="manual"&&this.unfold(),n=this.$foldMode,this.$setFolding(null),this.$setFolding(n))},this.$setFolding=function(n){this.$foldMode!=n&&(this.$foldMode=n,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),n&&this.$foldStyle!="manual"?(this.foldWidgets=[],this.getFoldWidget=n.getFoldWidget.bind(n,this,this.$foldStyle),this.getFoldWidgetRange=n.getFoldWidgetRange.bind(n,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(n,o){var i=this.foldWidgets;if(!i||o&&i[n])return{};for(var s=n-1;0<=s;){var a=i[s];if((a=a??(i[s]=this.getFoldWidget(s)))=="start"){var t=this.getFoldWidgetRange(s),e=e||t;if(t&&t.end.row>=n)break}s--}return{range:s!==-1&&t,firstRange:e}},this.onFoldWidgetClick=function(n,o){var i={children:(o=o instanceof h?o.domEvent:o).shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey};this.$toggleFoldWidget(n,i)||(n=o.target||o.srcElement)&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")},this.$toggleFoldWidget=function(n,o){var i,s,a,t;if(this.getFoldWidget)return i=this.getFoldWidget(n),s=this.getLine(n),(s=this.getFoldAt(n,(i=i==="end"?-1:1)==-1?0:s.length,i))?(o.children||o.all?this.removeFold(s):this.expandFold(s),s):(i=this.getFoldWidgetRange(n,!0))&&!i.isMultiLine()&&(s=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(s.range)?(this.removeFold(s),s):(o.siblings?((s=this.getParentFoldRangeData(n)).range&&(a=s.range.start.row+1,t=s.range.end.row),this.foldAll(a,t,o.all?1e4:0)):o.children?(t=i?i.end.row:this.getLength(),this.foldAll(n+1,t,o.all?1e4:0)):i&&(o.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)},this.toggleFoldWidget=function(n){var o,i=this.selection.getCursor().row;i=this.getRowFoldStart(i),!this.$toggleFoldWidget(i,{})&&(o=(o=this.getParentFoldRangeData(i,!0)).range||o.firstRange)&&(i=o.start.row,(i=this.getFoldAt(i,this.getLine(i).length,1))?this.removeFold(i):this.addFold("...",o))},this.updateFoldWidgets=function(n){var o=n.start.row,i=n.end.row-o;i==0?this.foldWidgets[o]=null:n.action=="remove"?this.foldWidgets.splice(o,1+i,null):((n=Array(1+i)).unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,n))},this.tokenizerUpdateFoldWidgets=function(n){n=n.data,n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(b,C,$){var y=b("../token_iterator").TokenIterator,f=b("../range").Range;C.BracketMatch=function(){this.findMatchingBracket=function(d,c){return d.column!=0&&(c=c||this.getLine(d.row).charAt(d.column-1))!=""&&(c=c.match(/([\(\[\{])|([\)\]\}])/))?c[1]?this.$findClosingBracket(c[1],d):this.$findOpeningBracket(c[2],d):null},this.getBracketRange=function(d){var c,h,n=this.getLine(d.row),o=!0,i=n.charAt(d.column-1),s=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(s||(i=n.charAt(d.column),d={row:d.row,column:d.column+1},s=i&&i.match(/([\(\[\{])|([\)\]\}])/),o=!1),!s)return null;if(s[1]){if(!(h=this.$findClosingBracket(s[1],d)))return null;c=f.fromPoints(d,h),o||(c.end.column++,c.start.column--),c.cursor=c.end}else{if(!(h=this.$findOpeningBracket(s[2],d)))return null;c=f.fromPoints(h,d),o||(c.start.column++,c.end.column--),c.cursor=c.start}return c},this.getMatchingBracketRanges=function(d,c){var h=this.getLine(d.row),n=/([\(\[\{])|([\)\]\}])/,o=!c&&h.charAt(d.column-1),i=o&&o.match(n);return i||(o=(c===void 0||c)&&h.charAt(d.column),d={row:d.row,column:d.column+1},i=o&&o.match(n)),i?(c=new f(d.row,d.column-1,d.row,d.column),(h=i[1]?this.$findClosingBracket(i[1],d):this.$findOpeningBracket(i[2],d))?[c,new f(h.row,h.column,h.row,h.column+1)]:[c]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(d,c,h){var n=this.$brackets[d],o=1,i=new y(this,c.row,c.column),s=i.getCurrentToken();if(s=s||i.stepForward()){h=h||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var a=c.column-i.getCurrentTokenColumn()-2,t=s.value;;){for(;0<=a;){var e=t.charAt(a);if(e==n){if(--o==0)return{row:i.getCurrentTokenRow(),column:a+i.getCurrentTokenColumn()}}else e==d&&(o+=1);--a}for(;(s=i.stepBackward())&&!h.test(s.type););if(s==null)break;a=(t=s.value).length-1}return null}},this.$findClosingBracket=function(d,c,h){var n=this.$brackets[d],o=1,i=new y(this,c.row,c.column),s=i.getCurrentToken();if(s=s||i.stepForward()){h=h||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var a=c.column-i.getCurrentTokenColumn();;){for(var t=s.value,e=t.length;a<e;){var r=t.charAt(a);if(r==n){if(--o==0)return{row:i.getCurrentTokenRow(),column:a+i.getCurrentTokenColumn()}}else r==d&&(o+=1);a+=1}for(;(s=i.stepForward())&&!h.test(s.type););if(s==null)break;a=0}return null}},this.getMatchingTags=function(c){var c=new y(this,c.row,c.column),h=this.$findTagName(c);if(h)return c.stepBackward().value==="<"?this.$findClosingTag(c,h):this.$findOpeningTag(c,h)},this.$findTagName=function(d){var c=d.getCurrentToken(),h=!1,n=!1;if(c&&c.type.indexOf("tag-name")===-1)for(;(c=n?d.stepBackward():d.stepForward())&&(c.value==="/>"?n=!0:c.type.indexOf("tag-name")!==-1&&(h=!0)),c&&!h;);return c},this.$findClosingTag=function(d,c){var h=c.value,n=c.value,o=0,i=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1),s=(c=d.stepForward(),new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+c.value.length)),a=!1;do{var t,e=c;if(e.type.indexOf("tag-close")===-1||a||(t=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1),a=!0),c=d.stepForward())if(c.value!==">"||a||(t=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1),a=!0),c.type.indexOf("tag-name")!==-1){if(n===(h=c.value)){if(e.value==="<")o++;else if(e.value==="</"&&--o<0){d.stepBackward();var r=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+2),l=(c=d.stepForward(),new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+c.value.length));if(!(c=c.type.indexOf("tag-close")===-1?d.stepForward():c)||c.value!==">")return;var p=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1)}}}else n===h&&c.value==="/>"&&--o<0&&(p=l=r=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+2),t=new f(s.end.row,s.end.column,s.end.row,s.end.column+1))}while(c&&0<=o);if(i&&t&&r&&p&&s&&l)return{openTag:new f(i.start.row,i.start.column,t.end.row,t.end.column),closeTag:new f(r.start.row,r.start.column,p.end.row,p.end.column),openTagName:s,closeTagName:l}},this.$findOpeningTag=function(d,c){var h,n=d.getCurrentToken(),o=c.value,i=0,s=d.getCurrentTokenRow(),a=d.getCurrentTokenColumn(),t=new f(s,a,s,a+2),e=(d.stepForward(),new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+c.value.length));if((c=c.type.indexOf("tag-close")===-1?d.stepForward():c)&&c.value===">"){var r=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);d.stepBackward(),d.stepBackward();do if(c=n,s=d.getCurrentTokenRow(),h=(a=d.getCurrentTokenColumn())+c.value.length,n=d.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(o===c.value)if(n.value==="<"){if(0<++i){for(var l=new f(s,a,s,h),p=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);(c=d.stepForward())&&c.value!==">";);var g=new f(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1)}}else n.value==="</"&&i--}else if(c.value==="/>"){for(var I=0,A=n;A;){if(A.type.indexOf("tag-name")!==-1&&A.value===o){i--;break}if(A.value==="<")break;A=d.stepBackward(),I++}for(var N=0;N<I;N++)d.stepForward()}}while(n&&i<=0);return p&&g&&t&&r&&l&&e?{openTag:new f(p.start.row,p.start.column,g.end.row,g.end.column),closeTag:new f(t.start.row,t.start.column,r.end.row,r.end.column),openTagName:l,closeTagName:e}: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/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(b,C,$){var y=b("./lib/oop"),f=b("./lib/lang"),d=b("./bidihandler").BidiHandler,c=b("./config"),h=b("./lib/event_emitter").EventEmitter,n=b("./selection").Selection,o=b("./mode/text").Mode,i=b("./range").Range,s=b("./document").Document,a=b("./background_tokenizer").BackgroundTokenizer,t=b("./search_highlight").SearchHighlight,e=b("./undomanager").UndoManager,r=(l.prototype.setDocument=function(u){this.doc&&this.doc.off("change",this.$onChange),(this.doc=u).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},l.prototype.getDocument=function(){return this.doc},l.prototype.$resetRowCache=function(u){var E;u?(E=this.$docRowCache.length,(u=this.$getRowCacheIndex(this.$docRowCache,u)+1)<E&&(this.$docRowCache.splice(u,E),this.$screenRowCache.splice(u,E))):(this.$docRowCache=[],this.$screenRowCache=[])},l.prototype.$getRowCacheIndex=function(u,E){for(var v=0,L=u.length-1;v<=L;){var G=v+L>>1,P=u[G];if(P<E)v=1+G;else{if(!(E<P))return G;L=G-1}}return v-1},l.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},l.prototype.onChangeFold=function(u){u=u.data,this.$resetRowCache(u.start.row)},l.prototype.onChange=function(u){this.$modified=!0,this.$bidiHandler.onChange(u),this.$resetRowCache(u.start.row);var E=this.$updateInternalDataOnChange(u);!this.$fromUndo&&this.$undoManager&&(E&&E.length&&(this.$undoManager.add({action:"removeFolds",folds:E},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(u,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(u),this._signal("change",u)},l.prototype.setValue=function(u){this.doc.setValue(u),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},l.fromJSON=function(u){typeof u=="string"&&(u=JSON.parse(u));var E=new e,v=(E.$undoStack=u.history.undo,E.$redoStack=u.history.redo,E.mark=u.history.mark,E.$rev=u.history.rev,new l(u.value));return u.folds.forEach(function(L){v.addFold("...",i.fromPoints(L.start,L.end))}),v.setAnnotations(u.annotations),v.setBreakpoints(u.breakpoints),v.setMode(u.mode),v.setScrollLeft(u.scrollLeft),v.setScrollTop(u.scrollTop),v.setUndoManager(E),v.selection.fromJSON(u.selection),v},l.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(u){return u.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},l.prototype.toString=function(){return this.doc.getValue()},l.prototype.getSelection=function(){return this.selection},l.prototype.getState=function(u){return this.bgTokenizer.getState(u)},l.prototype.getTokens=function(u){return this.bgTokenizer.getTokens(u)},l.prototype.getTokenAt=function(u,E){var v=this.bgTokenizer.getTokens(u),G=0;if(E==null)var L=v.length-1,G=this.getLine(u).length;else for(L=0;L<v.length&&!(E<=(G+=v[L].value.length));L++);return(u=v[L])?(u.index=L,u.start=G-u.value.length,u):null},l.prototype.setUndoManager=function(u){var E;this.$undoManager=u,this.$informUndoManager&&this.$informUndoManager.cancel(),u?(u.addSession(E=this),this.$syncInformUndoManager=function(){E.$informUndoManager.cancel(),E.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},l.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},l.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},l.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):"	"},l.prototype.setUseSoftTabs=function(u){this.setOption("useSoftTabs",u)},l.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},l.prototype.setTabSize=function(u){this.setOption("tabSize",u)},l.prototype.getTabSize=function(){return this.$tabSize},l.prototype.isTabStop=function(u){return this.$useSoftTabs&&u.column%this.$tabSize==0},l.prototype.setNavigateWithinSoftTabs=function(u){this.setOption("navigateWithinSoftTabs",u)},l.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},l.prototype.setOverwrite=function(u){this.setOption("overwrite",u)},l.prototype.getOverwrite=function(){return this.$overwrite},l.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},l.prototype.addGutterDecoration=function(u,E){this.$decorations[u]||(this.$decorations[u]=""),this.$decorations[u]+=" "+E,this._signal("changeBreakpoint",{})},l.prototype.removeGutterDecoration=function(u,E){this.$decorations[u]=(this.$decorations[u]||"").replace(" "+E,""),this._signal("changeBreakpoint",{})},l.prototype.getBreakpoints=function(){return this.$breakpoints},l.prototype.setBreakpoints=function(u){this.$breakpoints=[];for(var E=0;E<u.length;E++)this.$breakpoints[u[E]]="ace_breakpoint";this._signal("changeBreakpoint",{})},l.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},l.prototype.setBreakpoint=function(u,E){(E=E===void 0?"ace_breakpoint":E)?this.$breakpoints[u]=E:delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},l.prototype.clearBreakpoint=function(u){delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},l.prototype.addMarker=function(P,E,v,L){var G=this.$markerId++,P={range:P,type:v||"line",renderer:typeof v=="function"?v:null,clazz:E,inFront:!!L,id:G};return L?(this.$frontMarkers[G]=P,this._signal("changeFrontMarker")):(this.$backMarkers[G]=P,this._signal("changeBackMarker")),G},l.prototype.addDynamicMarker=function(u,E){var v;if(u.update)return v=this.$markerId++,u.id=v,u.inFront=!!E,E?(this.$frontMarkers[v]=u,this._signal("changeFrontMarker")):(this.$backMarkers[v]=u,this._signal("changeBackMarker")),u},l.prototype.removeMarker=function(u){var E=this.$frontMarkers[u]||this.$backMarkers[u];E&&(delete(E.inFront?this.$frontMarkers:this.$backMarkers)[u],this._signal(E.inFront?"changeFrontMarker":"changeBackMarker"))},l.prototype.getMarkers=function(u){return u?this.$frontMarkers:this.$backMarkers},l.prototype.highlight=function(u){var E;this.$searchHighlight||(E=new t(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(E)),this.$searchHighlight.setRegexp(u)},l.prototype.highlightLines=function(u,E,v,L){return typeof E!="number"&&(v=E,E=u),v=v||"ace_step",u=new i(u,0,E,1/0),u.id=this.addMarker(u,v,"fullLine",L),u},l.prototype.setAnnotations=function(u){this.$annotations=u,this._signal("changeAnnotation",{})},l.prototype.getAnnotations=function(){return this.$annotations||[]},l.prototype.clearAnnotations=function(){this.setAnnotations([])},l.prototype.$detectNewLine=function(u){u=u.match(/^.*?(\r?\n)/m),this.$autoNewLine=u?u[1]:`
`},l.prototype.getWordRange=function(u,E){var v,L=this.getLine(u),G=!1,P=(v=(G=(G=0<E?!!L.charAt(E-1).match(this.tokenRe):G)||!!L.charAt(E).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(L.slice(E-1,E+1))?/\s/:this.nonTokenRe,E);if(0<P){for(;0<=--P&&L.charAt(P).match(v););P++}for(var Y=E;Y<L.length&&L.charAt(Y).match(v);)Y++;return new i(u,P,u,Y)},l.prototype.getAWordRange=function(u,E){for(var v=this.getWordRange(u,E),L=this.getLine(v.end.row);L.charAt(v.end.column).match(/[ \t]/);)v.end.column+=1;return v},l.prototype.setNewLineMode=function(u){this.doc.setNewLineMode(u)},l.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},l.prototype.setUseWorker=function(u){this.setOption("useWorker",u)},l.prototype.getUseWorker=function(){return this.$useWorker},l.prototype.onReloadTokenizer=function(u){var E=u.data;this.bgTokenizer.start(E.first),this._signal("tokenizerUpdate",u)},l.prototype.setMode=function(u,E){if(u&&typeof u=="object"){if(u.getTokenizer)return this.$onChangeMode(u);var v=u,L=v.path}else L=u||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[L]&&!v?(this.$onChangeMode(this.$modes[L]),E&&E()):(this.$modeId=L,c.loadModule(["mode",L],(function(G){if(this.$modeId!==L)return E&&E();this.$modes[L]&&!v?this.$onChangeMode(this.$modes[L]):G&&G.Mode&&(G=new G.Mode(v),v||((this.$modes[L]=G).$id=L),this.$onChangeMode(G)),E&&E()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},l.prototype.$onChangeMode=function(u,E){var v,L,G;E||(this.$modeId=u.$id),this.$mode===u||(v=this.$mode,this.$mode=u,this.$stopWorker(),this.$useWorker&&this.$startWorker(),(L=u.getTokenizer()).on!==void 0&&(G=this.onReloadTokenizer.bind(this),L.on("update",G)),this.bgTokenizer.setTokenizer(L),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=u.tokenRe,this.nonTokenRe=u.nonTokenRe,E)||(u.attachToSession&&u.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(u.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:v,mode:u}))},l.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},l.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(u){c.warn("Could not load worker",u),this.$worker=null}},l.prototype.getMode=function(){return this.$mode},l.prototype.setScrollTop=function(u){this.$scrollTop===u||isNaN(u)||(this.$scrollTop=u,this._signal("changeScrollTop",u))},l.prototype.getScrollTop=function(){return this.$scrollTop},l.prototype.setScrollLeft=function(u){this.$scrollLeft===u||isNaN(u)||(this.$scrollLeft=u,this._signal("changeScrollLeft",u))},l.prototype.getScrollLeft=function(){return this.$scrollLeft},l.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},l.prototype.getLineWidgetMaxWidth=function(){var u;return this.lineWidgetsWidth!=null?this.lineWidgetsWidth:(u=0,this.lineWidgets.forEach(function(E){E&&E.screenWidth>u&&(u=E.screenWidth)}),this.lineWidgetWidth=u)},l.prototype.$computeWidth=function(u){if(this.$modified||u){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var E=this.doc.getAllLines(),v=this.$rowLengthCache,L=0,G=0,P=this.$foldData[G],Y=P?P.start.row:1/0,Q=E.length,K=0;K<Q;K++){if(Y<K){if(Q<=(K=P.end.row+1))break;Y=(P=this.$foldData[G++])?P.start.row:1/0}v[K]==null&&(v[K]=this.$getStringScreenWidth(E[K])[0]),v[K]>L&&(L=v[K])}this.screenWidth=L}},l.prototype.getLine=function(u){return this.doc.getLine(u)},l.prototype.getLines=function(u,E){return this.doc.getLines(u,E)},l.prototype.getLength=function(){return this.doc.getLength()},l.prototype.getTextRange=function(u){return this.doc.getTextRange(u||this.selection.getRange())},l.prototype.insert=function(u,E){return this.doc.insert(u,E)},l.prototype.remove=function(u){return this.doc.remove(u)},l.prototype.removeFullLines=function(u,E){return this.doc.removeFullLines(u,E)},l.prototype.undoChanges=function(u,E){if(u.length){this.$fromUndo=!0;for(var v=u.length-1;v!=-1;v--){var L=u[v];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!E&&this.$undoSelect&&(u.selectionBefore?this.selection.fromJSON(u.selectionBefore):this.selection.setRange(this.$getUndoSelection(u,!0))),this.$fromUndo=!1}},l.prototype.redoChanges=function(u,E){if(u.length){this.$fromUndo=!0;for(var v=0;v<u.length;v++){var L=u[v];L.action!="insert"&&L.action!="remove"||this.doc.$safeApplyDelta(L)}!E&&this.$undoSelect&&(u.selectionAfter?this.selection.fromJSON(u.selectionAfter):this.selection.setRange(this.$getUndoSelection(u,!1))),this.$fromUndo=!1}},l.prototype.setUndoSelect=function(u){this.$undoSelect=u},l.prototype.$getUndoSelection=function(u,E){function v(Q){return E?Q.action!=="insert":Q.action==="insert"}for(var L,G,P=0;P<u.length;P++){var Y=u[P];Y.start&&(L?v(Y)?(G=Y.start,L.compare(G.row,G.column)==-1&&L.setStart(G),G=Y.end,L.compare(G.row,G.column)==1&&L.setEnd(G)):(G=Y.start,L.compare(G.row,G.column)==-1&&(L=i.fromPoints(Y.start,Y.start))):L=v(Y)?i.fromPoints(Y.start,Y.end):i.fromPoints(Y.start,Y.start))}return L},l.prototype.replace=function(u,E){return this.doc.replace(u,E)},l.prototype.moveText=function(u,K,v){var L,G,P,Y=this.getTextRange(u),Q=this.getFoldsInRange(u),K=i.fromPoints(K,K);return v||(this.remove(u),G=u.start.row-u.end.row,(P=G?-u.end.column:u.start.column-u.end.column)&&(K.start.row==u.end.row&&K.start.column>u.end.column&&(K.start.column+=P),K.end.row==u.end.row)&&K.end.column>u.end.column&&(K.end.column+=P),G&&K.start.row>=u.end.row&&(K.start.row+=G,K.end.row+=G)),K.end=this.insert(K.start,Y),Q.length&&(L=u.start,v=K.start,G=v.row-L.row,P=v.column-L.column,this.addFolds(Q.map(function(te){return(te=te.clone()).start.row==L.row&&(te.start.column+=P),te.end.row==L.row&&(te.end.column+=P),te.start.row+=G,te.end.row+=G,te}))),K},l.prototype.indentRows=function(u,E,v){v=v.replace(/\t/g,this.getTabString());for(var L=u;L<=E;L++)this.doc.insertInLine({row:L,column:0},v)},l.prototype.outdentRows=function(u){for(var E=u.collapseRows(),v=new i(0,0,0,0),L=this.getTabSize(),G=E.start.row;G<=E.end.row;++G){var P=this.getLine(G);v.start.row=G,v.end.row=G;for(var Y=0;Y<L&&P.charAt(Y)==" ";++Y);Y<L&&P.charAt(Y)=="	"?(v.start.column=Y,v.end.column=Y+1):(v.start.column=0,v.end.column=Y),this.remove(v)}},l.prototype.$moveLines=function(u,E,P){if(u=this.getRowFoldStart(u),E=this.getRowFoldEnd(E),P<0){if((G=this.getRowFoldStart(u+P))<0)return 0;var L=G-u}else if(0<P){if((G=this.getRowFoldEnd(E+P))>this.doc.getLength()-1)return 0;L=G-E}else u=this.$clipRowToDocument(u),L=(E=this.$clipRowToDocument(E))-u+1;var G=new i(u,0,E,Number.MAX_VALUE),G=this.getFoldsInRange(G).map(function(Y){return(Y=Y.clone()).start.row+=L,Y.end.row+=L,Y}),P=P==0?this.doc.getLines(u,E):this.doc.removeFullLines(u,E);return this.doc.insertFullLines(u+L,P),G.length&&this.addFolds(G),L},l.prototype.moveLinesUp=function(u,E){return this.$moveLines(u,E,-1)},l.prototype.moveLinesDown=function(u,E){return this.$moveLines(u,E,1)},l.prototype.duplicateLines=function(u,E){return this.$moveLines(u,E,0)},l.prototype.$clipRowToDocument=function(u){return Math.max(0,Math.min(u,this.doc.getLength()-1))},l.prototype.$clipColumnToRow=function(u,E){return E<0?0:Math.min(this.doc.getLine(u).length,E)},l.prototype.$clipPositionToDocument=function(u,E){var v;return E=Math.max(0,E),E=u<0?u=0:(v=this.doc.getLength())<=u?this.doc.getLine(u=v-1).length:Math.min(this.doc.getLine(u).length,E),{row:u,column:E}},l.prototype.$clipRangeToDocument=function(u){u.start.row<0?(u.start.row=0,u.start.column=0):u.start.column=this.$clipColumnToRow(u.start.row,u.start.column);var E=this.doc.getLength()-1;return u.end.row>E?(u.end.row=E,u.end.column=this.doc.getLine(E).length):u.end.column=this.$clipColumnToRow(u.end.row,u.end.column),u},l.prototype.setUseWrapMode=function(u){u!=this.$useWrapMode&&(this.$useWrapMode=u,this.$modified=!0,this.$resetRowCache(0),u&&(u=this.getLength(),this.$wrapData=Array(u),this.$updateWrapData(0,u-1)),this._signal("changeWrapMode"))},l.prototype.getUseWrapMode=function(){return this.$useWrapMode},l.prototype.setWrapLimitRange=function(u,E){this.$wrapLimitRange.min===u&&this.$wrapLimitRange.max===E||(this.$wrapLimitRange={min:u,max:E},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},l.prototype.adjustWrapLimit=function(u,L){var v=this.$wrapLimitRange,L=(v.max<0&&(v={min:L,max:L}),this.$constrainWrapLimit(u,v.min,v.max));return L!=this.$wrapLimit&&1<L&&(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},l.prototype.$constrainWrapLimit=function(u,E,v){return E&&(u=Math.max(E,u)),u=v?Math.min(v,u):u},l.prototype.getWrapLimit=function(){return this.$wrapLimit},l.prototype.setWrapLimit=function(u){this.setWrapLimitRange(u,u)},l.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},l.prototype.$updateInternalDataOnChange=function(u){var E=this.$useWrapMode,v=u.action,L=u.start,G=u.end,P=L.row,Y=G.row,Q=Y-P,K=null;if(this.$updating=!0,Q!=0)if(v==="remove"){this[E?"$wrapData":"$rowLengthCache"].splice(P,Q);var te=this.$foldData,K=this.getFoldsInRange(u);this.removeFolds(K);var T=0;for((z=this.getFoldLine(G.row))&&(z.addRemoveChars(G.row,G.column,L.column-G.column),z.shiftRow(-Q),(O=this.getFoldLine(P))&&O!==z&&(O.merge(z),z=O),T=te.indexOf(z)+1);T<te.length;T++)(z=te[T]).start.row>=G.row&&z.shiftRow(-Q);Y=P}else{var O=Array(Q),V=(O.unshift(P,0),E?this.$wrapData:this.$rowLengthCache),te=(V.splice.apply(V,O),this.$foldData),T=0;for((z=this.getFoldLine(P))&&((V=z.range.compareInside(L.row,L.column))==0?(z=z.split(L.row,L.column))&&(z.shiftRow(Q),z.addRemoveChars(Y,0,G.column-L.column)):V==-1&&(z.addRemoveChars(P,0,G.column-L.column),z.shiftRow(Q)),T=te.indexOf(z)+1);T<te.length;T++)(z=te[T]).start.row>=P&&z.shiftRow(Q)}else{var z,Q=Math.abs(u.start.column-u.end.column);v==="remove"&&(K=this.getFoldsInRange(u),this.removeFolds(K),Q=-Q),(z=this.getFoldLine(P))&&z.addRemoveChars(P,L.column,Q)}return E&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,E?this.$updateWrapData(P,Y):this.$updateRowLengthCache(P,Y),K},l.prototype.$updateRowLengthCache=function(u,E){this.$rowLengthCache[u]=null,this.$rowLengthCache[E]=null},l.prototype.$updateWrapData=function(u,E){var v,L,G=this.doc.getAllLines(),P=this.getTabSize(),Y=this.$wrapData,Q=this.$wrapLimit,K=u;for(E=Math.min(E,G.length-1);K<=E;)(L=this.getFoldLine(K,L))?(v=[],L.walk((function(te,T,O,V){var z;if(te!=null){(z=this.$getDisplayTokens(te,v.length))[0]=I;for(var w=1;w<z.length;w++)z[w]=A}else z=this.$getDisplayTokens(G[T].substring(V,O),v.length);v=v.concat(z)}).bind(this),L.end.row,G[L.end.row].length+1),Y[L.start.row]=this.$computeWrapSplits(v,Q,P),K=L.end.row+1):(v=this.$getDisplayTokens(G[K]),Y[K]=this.$computeWrapSplits(v,Q,P),K++)},l.prototype.$computeWrapSplits=function(u,E,v){if(u.length==0)return[];var L=[],G=u.length,P=0,Y=0,Q=this.$wrapAsCode,K=this.$indentedSoftWrap,te=E<=Math.max(2*v,8)||K===!1?0:Math.floor(E/2);function T(w){for(var k=w-P,W=P;W<w;W++){var D=u[W];D!==12&&D!==2||--k}L.length||(O=function(){var q=0;if(te===0)return q;if(K)for(var ae=0;ae<u.length;ae++){var me=u[ae];if(me==M)q+=1;else if(me==R)q+=v;else if(me!=S)break}return Q&&K!==!1&&(q+=v),Math.min(q,te)}(),L.indent=O),Y+=k,L.push(Y),P=w}for(var O=0;E-O<G-P;){var V=P+E-O;if(u[V-1]>=M&&u[V]>=M)T(V);else if(u[V]==I||u[V]==A){for(;V!=P-1&&u[V]!=I;V--);if(!(P<V)){for(V=P+E;V<u.length&&u[V]==A;V++);if(V==u.length)break}T(V)}else{for(var z=Math.max(V-(E-(E>>2)),P-1);z<V&&u[V]<I;)V--;if(Q){for(;z<V&&u[V]<I;)V--;for(;z<V&&u[V]==N;)V--}else for(;z<V&&u[V]<M;)V--;z<V?T(++V):(u[V=P+E]==g&&V--,T(V-O))}}return L},l.prototype.$getDisplayTokens=function(u,E){var v,L=[];E=E||0;for(var G=0;G<u.length;G++){var P=u.charCodeAt(G);if(P==9){v=this.getScreenTabSize(L.length+E),L.push(R);for(var Y=1;Y<v;Y++)L.push(S)}else P==32?L.push(M):39<P&&P<48||57<P&&P<64?L.push(N):4352<=P&&_(P)?L.push(p,g):L.push(p)}return L},l.prototype.$getStringScreenWidth=function(u,E,v){if(E==0)return[0,0];var L,G;for(E==null&&(E=1/0),v=v||0,G=0;G<u.length&&((L=u.charCodeAt(G))==9?v+=this.getScreenTabSize(v):4352<=L&&_(L)?v+=2:v+=1,!(E<v));G++);return[v,G]},l.prototype.getRowLength=function(u){var E=1;return this.lineWidgets&&(E+=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0),this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+E:E},l.prototype.getRowLineCount=function(u){return this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+1:1},l.prototype.getRowWrapIndent=function(u){var E;return this.$useWrapMode&&(u=this.screenToDocumentPosition(u,Number.MAX_VALUE),(E=this.$wrapData[u.row]).length)&&E[0]<u.column?E.indent:0},l.prototype.getScreenLastRowColumn=function(u){return u=this.screenToDocumentPosition(u,Number.MAX_VALUE),this.documentToScreenColumn(u.row,u.column)},l.prototype.getDocumentLastRowColumn=function(u,E){return u=this.documentToScreenRow(u,E),this.getScreenLastRowColumn(u)},l.prototype.getDocumentLastRowColumnPosition=function(u,E){return u=this.documentToScreenRow(u,E),this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},l.prototype.getRowSplitData=function(u){if(this.$useWrapMode)return this.$wrapData[u]},l.prototype.getScreenTabSize=function(u){return this.$tabSize-(u%this.$tabSize|0)},l.prototype.screenToDocumentRow=function(u,E){return this.screenToDocumentPosition(u,E).row},l.prototype.screenToDocumentColumn=function(u,E){return this.screenToDocumentPosition(u,E).column},l.prototype.screenToDocumentPosition=function(u,E,v){if(u<0)return{row:0,column:0};for(var L,G,P,Y=0,Q=0,K=0,te=0,T=this.$screenRowCache,O=this.$getRowCacheIndex(T,u),V=T.length,z=(P=V&&0<=O?(K=T[O],Y=this.$docRowCache[O],u>T[V-1]):!V,this.getLength()-1),w=this.getNextFoldLine(Y),k=w?w.start.row:1/0;K<=u&&!(u<K+(te=this.getRowLength(Y))||z<=Y);)K+=te,k<++Y&&(Y=w.end.row+1,k=(w=this.getNextFoldLine(Y,w))?w.start.row:1/0),P&&(this.$docRowCache.push(Y),this.$screenRowCache.push(K));if(w&&w.start.row<=Y)L=this.getFoldDisplayLine(w),Y=w.start.row;else{if(K+te<=u||z<Y)return{row:z,column:this.getLine(z).length};L=this.getLine(Y),w=null}return O=0,T=Math.floor(u-K),this.$useWrapMode&&(V=this.$wrapData[Y])&&(G=V[T],0<T)&&V.length&&(O=V.indent,Q=V[T-1]||V[V.length-1],L=L.substring(Q)),v!==void 0&&this.$bidiHandler.isBidiRow(K+T,Y,T)&&(E=this.$bidiHandler.offsetToCol(v)),Q+=this.$getStringScreenWidth(L,E-O)[1],this.$useWrapMode&&G<=Q&&(Q=G-1),w?w.idxToPosition(Q):{row:Y,column:Q}},l.prototype.documentToScreenPosition=function(u,E){var O=E===void 0?this.$clipPositionToDocument(u.row,u.column):this.$clipPositionToDocument(u,E),v=(u=O.row,E=O.column,0),O=null;(Y=this.getFoldAt(u,E,1))&&(u=Y.start.row,E=Y.start.column);for(var L,G,P=0,Y=this.$docRowCache,V=this.$getRowCacheIndex(Y,u),Q=Y.length,K=(G=Q&&0<=V?(P=Y[V],v=this.$screenRowCache[V],u>Y[Q-1]):!Q,this.getNextFoldLine(P)),te=K?K.start.row:1/0;P<u;){if(te<=P){if(u<(L=K.end.row+1))break;te=(K=this.getNextFoldLine(L,K))?K.start.row:1/0}else L=P+1;v+=this.getRowLength(P),P=L,G&&(this.$docRowCache.push(P),this.$screenRowCache.push(v))}var T="",O=K&&te<=P?(T=this.getFoldDisplayLine(K,u,E),K.start.row):(T=this.getLine(u).substring(0,E),u),V=0;if(this.$useWrapMode){var z=this.$wrapData[O];if(z){for(var w=0;T.length>=z[w];)v++,w++;T=T.substring(z[w-1]||0,T.length),V=0<w?z.indent:0}}return this.lineWidgets&&this.lineWidgets[P]&&this.lineWidgets[P].rowsAbove&&(v+=this.lineWidgets[P].rowsAbove),{row:v,column:V+this.$getStringScreenWidth(T)[0]}},l.prototype.documentToScreenColumn=function(u,E){return this.documentToScreenPosition(u,E).column},l.prototype.documentToScreenRow=function(u,E){return this.documentToScreenPosition(u,E).row},l.prototype.getScreenLength=function(){var u=0,E=null;if(this.$useWrapMode)for(var v=this.$wrapData.length,L=0,G=0,P=(E=this.$foldData[G++])?E.start.row:1/0;L<v;){var Y=this.$wrapData[L];u+=Y?Y.length+1:1,P<++L&&(L=E.end.row+1,P=(E=this.$foldData[G++])?E.start.row:1/0)}else for(var u=this.getLength(),Q=this.$foldData,G=0;G<Q.length;G++)u-=(E=Q[G]).end.row-E.start.row;return this.lineWidgets&&(u+=this.$getWidgetScreenLength()),u},l.prototype.$setFontMetrics=function(u){this.$enableVarChar&&(this.$getStringScreenWidth=function(E,v,L){if(v===0)return[0,0];var G,P;for(v=v||1/0,L=L||0,P=0;P<E.length&&!(v<(L+=(G=E.charAt(P))==="	"?this.getScreenTabSize(L):u.getCharacterWidth(G)));P++);return[L,P]})},l.prototype.getPrecedingCharacter=function(){var u=this.selection.getCursor();return u.column===0?u.row===0?"":this.doc.getNewLineCharacter():this.getLine(u.row)[u.column-1]},l.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},l);function l(u,E){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++l.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new a(new o().getTokenizer(),this);var v=this;this.bgTokenizer.on("update",function(L){v._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),typeof u=="object"&&u.getLine||(u=new s(u)),this.setDocument(u),this.selection=new n(this),this.$bidiHandler=new d(this),c.resetOptions(this),this.setMode(E),c._signal("session",this),this.destroyed=!1}r.$uid=0,r.prototype.$modes=c.$modes,r.prototype.getValue=r.prototype.toString,r.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},r.prototype.$overwrite=!1,r.prototype.$mode=null,r.prototype.$modeId=null,r.prototype.$scrollTop=0,r.prototype.$scrollLeft=0,r.prototype.$wrapLimit=80,r.prototype.$useWrapMode=!1,r.prototype.$wrapLimitRange={min:null,max:null},r.prototype.lineWidgets=null,r.prototype.isFullWidth=_,y.implement(r.prototype,h);var p=1,g=2,I=3,A=4,N=9,M=10,R=11,S=12;function _(u){return!(u<4352)&&(4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12288<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510)}b("./edit_session/folding").Folding.call(r.prototype),b("./edit_session/bracket_match").BracketMatch.call(r.prototype),c.defineOptions(r.prototype,"session",{wrap:{set:function(u){u&&u!="off"?u=="free"?u=!0:u=="printMargin"?u=-1:typeof u=="string"&&(u=parseInt(u,10)||!1):u=!1,this.$wrap!=u&&((this.$wrap=u)?(this.setWrapLimitRange(u=typeof u=="number"?u:null,u),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(u){(u=u=="auto"?this.$mode.type!="text":u!="text")!=this.$wrapAsCode&&(this.$wrapAsCode=u,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(u){this.$useWorker=u,this.$stopWorker(),u&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(u){0<(u=parseInt(u))&&this.$tabSize!==u&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=u,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(u){this.setFoldStyle(u)},handlesSet:!0},overwrite:{set:function(u){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(u){this.doc.setNewLineMode(u)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(u){this.setMode(u)},get:function(){return this.$modeId},handlesSet:!0}}),C.EditSession=r}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(b,C,$){var y=b("./lib/lang"),f=b("./lib/oop"),d=b("./range").Range;function c(){this.$options={}}c.prototype.set=function(h){return f.mixin(this.$options,h),this},c.prototype.getOptions=function(){return y.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(i){var n,o=this.$options,i=this.$matchIterator(i,o);return!!i&&(n=null,i.forEach(function(s,a,t,e){return n=new d(s,a,t,e),!(a==e&&o.start&&o.start.start&&o.skipCurrent!=0&&n.isEqual(o.start)&&(n=null,1))}),n)},c.prototype.findAll=function(h){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var o=n.range,i=o?h.getLines(o.start.row,o.end.row):h.doc.getAllLines(),s=[],a=n.re;if(n.$isMultiLine){var t,e=a.length,r=i.length-e;e:for(var l=a.offset||0;l<=r;l++){for(var p=0;p<e;p++)if(i[l+p].search(a[p])==-1)continue e;var g=i[l],I=i[l+e-1],g=g.length-g.match(a[0])[0].length,I=I.match(a[e-1])[0].length;t&&t.end.row===l&&t.end.column>g||(s.push(t=new d(l,g,l+e-1,I)),2<e&&(l=l+e-2))}}else for(var A=0;A<i.length;A++)for(var N=y.getMatchOffsets(i[A],a),p=0;p<N.length;p++){var M=N[p];s.push(new d(A,M.offset,A,M.offset+M.length))}if(o){for(var R=o.start.column,S=o.end.column,A=0,p=s.length-1;A<p&&s[A].start.column<R&&s[A].start.row==0;)A++;for(var _=o.end.row-o.start.row;A<p&&s[p].end.column>S&&s[p].end.row==_;)p--;for(s=s.slice(A,p+1),A=0,p=s.length;A<p;A++)s[A].start.row+=o.start.row,s[A].end.row+=o.start.row}return s},c.prototype.replace=function(h,n){var o=this.$options,i=this.$assembleRegExp(o);if(o.$isMultiLine)return n;if(i){var s=i.exec(h);if(!s||s[0].length!=h.length)return null;if(o.regExp||(n=n.replace(/\$/g,"$$$$")),n=h.replace(i,n),o.preserveCase){n=n.split("");for(var a=Math.min(h.length,h.length);a--;){var t=h[a];t&&t.toLowerCase()!=t?n[a]=n[a].toUpperCase():n[a]=n[a].toLowerCase()}n=n.join("")}return n}},c.prototype.$assembleRegExp=function(h,n){if(h.needle instanceof RegExp)return h.re=h.needle;var o=h.needle;if(!h.needle)return h.re=!1;h.regExp||(o=y.escapeRegExp(o));var i,s,a,t,e,r=h.caseSensitive?"gm":"gmi";try{new RegExp(o,"u"),h.$supportsUnicodeFlag=!0,r+="u"}catch{h.$supportsUnicodeFlag=!1}function l(g,I){return I===void 0&&(I=!0),(a&&s.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(g)||s.regExp?a&&s.$supportsUnicodeFlag?I?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}if(h.wholeWord&&(i=o,s=h,a=y.supportsLookbehind(),t=Array.from(i),e=t[0],t=t[t.length-1],o=l(e)+i+l(t,!1)),h.$isMultiLine=!n&&/[\n\r]/.test(o),h.$isMultiLine)return h.re=this.$assembleMultilineRegExp(o,r);try{var p=new RegExp(o,r)}catch{p=!1}return h.re=p},c.prototype.$assembleMultilineRegExp=function(h,n){for(var o=h.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),i=[],s=0;s<o.length;s++)try{i.push(new RegExp(o[s],n))}catch{return!1}return i},c.prototype.$matchIterator=function(h,n){var o,i,s,a,t,e,r,l,p,g=this.$assembleRegExp(n);return!!g&&(o=n.backwards==1,i=n.skipCurrent!=0,s=g.unicode,a=n.range,(t=(t=n.start)||(a?a[o?"end":"start"]:h.selection.getRange())).start&&(t=t[i!=o?"end":"start"]),e=a?a.start.row:0,r=a?a.end.row:h.getLength()-1,p=n.$isMultiLine?(l=g.length,function(I,A,N){var M=o?I-l+1:I;if(!(M<0||M+l>h.getLength())){var R=h.getLine(M),I=R.search(g[0]);if(!(!o&&I<A||I===-1)){for(var S=1;S<l;S++)if((R=h.getLine(M+S)).search(g[S])==-1)return;var _=R.match(g[l-1])[0].length;if(!(o&&A<_))return!!N(M,I,M+l-1,_)||void 0}}}):o?function(I,A,N){var M,R=h.getLine(I),S=[];for(g.lastIndex=0;M=g.exec(R);){var _=M[0].length,u=M.index;if(!_){if(u>=R.length)break;g.lastIndex=u+=y.skipEmptyMatch(R,u,s)}if(M.index+_>A)break;S.push(M.index,_)}for(var E=S.length-1;0<=E;E-=2){var v=S[E-1];if(N(I,v,I,v+(_=S[E])))return!0}}:function(I,A,N){var M=h.getLine(I);for(g.lastIndex=A;R=g.exec(M);){var R,S=R[0].length;if(N(I,R=R.index,I,R+S))return!0;if(!S&&(g.lastIndex=R+=y.skipEmptyMatch(M,R,s),R>=M.length))return!1}},{forEach:o?function(I){var A=t.row;if(!p(A,t.column,I)){for(A--;e<=A;A--)if(p(A,Number.MAX_VALUE,I))return;if(n.wrap!=0){for(A=r,e=t.row;e<=A;A--)if(p(A,Number.MAX_VALUE,I))return}}}:function(I){var A=t.row;if(!p(A,t.column,I)){for(A+=1;A<=r;A++)if(p(A,0,I))return;if(n.wrap!=0){for(A=e,r=t.row;A<=r;A++)if(p(A,0,I))return}}}})},C.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,C,$){var y,f=this&&this.__extends||(y=function(e,r){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,p){l.__proto__=p}:function(l,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(l[g]=p[g])}))(e,r)},function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function l(){this.constructor=e}y(e,r),e.prototype=r===null?Object.create(r):(l.prototype=r.prototype,new l)}),d=a("../lib/keys"),c=a("../lib/useragent"),h=d.KEY_MODS,n=(o.prototype.$init=function(e,r,l){this.platform=r||(c.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=l},o.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},o.prototype.removeCommand=function(e,r){var l,p=e&&(typeof e=="string"?e:e.name),g=(e=this.commands[p],r||delete this.commands[p],this.commandKeyBinding);for(l in g){var I,A=g[l];A==e?delete g[l]:Array.isArray(A)&&(I=A.indexOf(e))!=-1&&(A.splice(I,1),A.length==1)&&(g[l]=A[0])}},o.prototype.bindKey=function(e,r,l){if(typeof e=="object"&&e&&(l==null&&(l=e.position),e=e[this.platform]),e)return typeof r=="function"?this.addCommand({exec:r,bindKey:e,name:r.name||e}):void e.split("|").forEach(function(A){var g="",I=(A.indexOf(" ")!=-1&&(A=(I=A.split(/\s+/)).pop(),I.forEach(function(N){N=this.parseKeys(N),N=h[N.hashId]+N.key,g+=(g?" ":"")+N,this._addCommandToBinding(g,"chainKeys")},this),g+=" "),this.parseKeys(A)),A=h[I.hashId]+I.key;this._addCommandToBinding(g+A,r,l)},this)},o.prototype._addCommandToBinding=function(e,r,l){var p=this.commandKeyBinding;if(r)if(!p[e]||this.$singleCommand)p[e]=r;else{Array.isArray(p[e])?(I=p[e].indexOf(r))!=-1&&p[e].splice(I,1):p[e]=[p[e]],typeof l!="number"&&(l=i(r));for(var g=p[e],I=0;I<g.length&&!(l<i(g[I]));I++);g.splice(I,0,r)}else delete p[e]},o.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(r){var l=e[r];if(l){if(typeof l=="string")return this.bindKey(l,r);typeof(l=typeof l=="function"?{exec:l}:l)=="object"&&(l.name||(l.name=r),this.addCommand(l))}},this)},o.prototype.removeCommands=function(e){Object.keys(e).forEach(function(r){this.removeCommand(e[r])},this)},o.prototype.bindKeys=function(e){Object.keys(e).forEach(function(r){this.bindKey(r,e[r])},this)},o.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},o.prototype.parseKeys=function(e){var r=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(N){return N}),l=r.pop(),p=d[l];if(d.FUNCTION_KEYS[p])l=d.FUNCTION_KEYS[p].toLowerCase();else{if(!r.length)return{key:l,hashId:-1};if(r.length==1&&r[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}for(var g=0,I=r.length;I--;){var A=d.KEY_MODS[r[I]];if(A==null)return typeof console<"u"&&console.error("invalid modifier "+r[I]+" in "+e),!1;g|=A}return{key:l,hashId:g}},o.prototype.findKeyCommand=function(e,r){return e=h[e]+r,this.commandKeyBinding[e]},o.prototype.handleKeyboard=function(e,r,l,p){var g,I;if(!(p<0))return g=h[r]+l,I=this.commandKeyBinding[g],e.$keyChain&&(e.$keyChain+=" "+g,I=this.commandKeyBinding[e.$keyChain]||I),!I||I!="chainKeys"&&I[I.length-1]!="chainKeys"?(e.$keyChain&&(r&&r!=4||l.length!=1?(r==-1||0<p)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-g.length-1)),{command:I}):(e.$keyChain=e.$keyChain||g,{command:"null"})},o.prototype.getStatusText=function(e,r){return r.$keyChain||""},o);function o(e,r){this.$init(e,r,!1)}function i(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}f(t,s=n);var s,a=t;function t(e,r){return e=s.call(this,e,r)||this,e.$singleCommand=!0,e}a.call=function(e,r,l){n.prototype.$init.call(e,r,l,!0)},n.call=function(e,r,l){n.prototype.$init.call(e,r,l,!1)},C.HashHandler=a,C.MultiHashHandler=n}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(h,C,$){var y,f,n=this&&this.__extends||(y=function(i,s){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(a,t){a.__proto__=t}:function(a,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}))(i,s)},function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=i}y(i,s),i.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)}),d=h("../lib/oop"),c=h("../keyboard/hash_handler").MultiHashHandler,h=h("../lib/event_emitter").EventEmitter,n=(n(o,f=c),o.prototype.exec=function(i,s,a){if(Array.isArray(i)){for(var t=i.length;t--;)if(this.exec(i[t],s,a))return!0;return!1}var e;return!!(i=typeof i=="string"?this.commands[i]:i)&&!(s&&s.$readOnly&&!i.readOnly||this.$checkCommandState!=0&&i.isAvailable&&!i.isAvailable(s)||((e={editor:s,command:i,args:a}).returnValue=this._emit("exec",e),this._signal("afterExec",e),e.returnValue===!1))},o.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._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(s){this.macro.push([s.command,s.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(i){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(s){typeof s=="string"?this.exec(s,i):this.exec(s[0],i,s[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(i){return i.map(function(s){return typeof s[0]!="string"&&(s[0]=s[0].name),s=s[1]?s:s[0]})},o);function o(i,s){return s=f.call(this,s,i)||this,s.byName=s.commands,s.setDefaultHandler("exec",function(a){return a.args?a.command.exec(a.editor,a.args,a.event,!1):a.command.exec(a.editor,{},a.event,!0)}),s}d.implement(n.prototype,h),C.CommandManager=n}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(b,C,$){var y=b("../lib/lang"),f=b("../config"),d=b("../range").Range;function c(n,o){return{win:n,mac:o}}C.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(n){f.loadModule("ace/ext/settings_menu",function(o){o.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(n){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(n){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(n,o){typeof o!="number"||isNaN(o)||n.gotoLine(o),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(n){f.loadModule("ace/ext/searchbox",function(o){o.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(n,o){n.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(n,o){n.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(n,o){n.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(n,o){n.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var o=n.$copyWithEmptySelection&&n.selection.isEmpty()?n.selection.getLineRange():n.selection.getRange();n._emit("cut",o),o.isEmpty()||n.session.remove(o),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,o){n.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(n){f.loadModule("ace/ext/searchbox",function(o){o.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(n){if(!n.selection.isEmpty())return!1;n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(n){var o=n.selection.getRange();o.start.column=0,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(n){var o=n.selection.getRange();o.end.column=Number.MAX_VALUE,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,o){n.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,o){n.insert(y.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var o=n.selection.getRange();o.start.column=o.end.column=0,o.end.row++,n.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(n){for(var s=n.selection.isBackwards(),o=s?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),i=s?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),s=n.session.doc.getLine(o.row).length,a=n.session.doc.getTextRange(n.selection.getRange()).replace(/\n\s*/," ").length,t=n.session.doc.getLine(o.row),e=o.row+1;e<=i.row+1;e++){var r=y.stringTrimLeft(y.stringTrimRight(n.session.doc.getLine(e)));t+=r=r.length!==0?" "+r:r}i.row+1<n.session.doc.getLength()-1&&(t+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new d(o.row,0,i.row+2,0),t),0<a?(n.selection.moveCursorTo(o.row,o.column),n.selection.selectTo(o.row,o.column+a)):(s=n.session.doc.getLine(o.row).length>s?s+1:s,n.selection.moveCursorTo(o.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(n){var o=n.session.doc.getLength()-1,i=n.session.doc.getLine(o).length,s=n.selection.rangeList.ranges,a=[];s.length<1&&(s=[n.selection.getRange()]);for(var t=0;t<s.length;t++)t!=s.length-1||s[t].end.row===o&&s[t].end.column===i||a.push(new d(s[t].end.row,s[t].end.column,o,i)),t===0?s[t].start.row===0&&s[t].start.column===0||a.push(new d(0,0,s[t].start.row,s[t].start.column)):a.push(new d(s[t-1].end.row,s[t-1].end.column,s[t].start.row,s[t].start.column));for(n.exitMultiSelectMode(),n.clearSelection(),t=0;t<a.length;t++)n.selection.addRange(a[t],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var o=n.getCursorPosition();n.selection.moveTo(o.row-1,Number.MAX_VALUE),n.insert(`
`),o.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)C.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(b,C,$){var y=b("./lib/dom");function f(d){this.session=d,(this.session.widgetManager=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)}f.prototype.getRowLength=function(d){var c=this.lineWidgets&&this.lineWidgets[d]&&this.lineWidgets[d].rowCount||0;return this.$useWrapMode&&this.$wrapData[d]?this.$wrapData[d].length+1+c:1+c},f.prototype.$getWidgetScreenLength=function(){var d=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(d+=c.rowCount)}),d},f.prototype.$onChangeEditor=function(d){this.attach(d.editor)},f.prototype.attach=function(d){d&&d.widgetManager&&d.widgetManager!=this&&d.widgetManager.detach(),this.editor!=d&&(this.detach(),this.editor=d)&&(d.widgetManager=this,d.renderer.on("beforeRender",this.measureWidgets),d.renderer.on("afterRender",this.renderWidgets))},f.prototype.detach=function(d){var c=this.editor;c&&(this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets),c=this.session.lineWidgets)&&c.forEach(function(h){h&&h.el&&h.el.parentNode&&(h._inDocument=!1,h.el.parentNode.removeChild(h.el))})},f.prototype.updateOnFold=function(d,c){var h=c.lineWidgets;if(h&&d.action){for(var c=d.data,n=c.start.row,o=c.end.row,i=d.action=="add",s=n+1;s<o;s++)h[s]&&(h[s].hidden=i);h[o]&&(i?h[n]?h[o].hidden=i:h[n]=h[o]:(h[n]==h[o]&&(h[n]=void 0),h[o].hidden=i))}},f.prototype.updateOnChange=function(d){var c,h,n,o=this.session.lineWidgets;o&&(c=d.start.row,(h=d.end.row-c)!=0)&&(d.action=="remove"?(n=o.splice(c+1,h),!o[c]&&n[n.length-1]&&(o[c]=n.pop()),n.forEach(function(i){i&&this.removeLineWidget(i)},this)):(n=new Array(h),o[c]&&o[c].column!=null&&d.start.column>o[c].column&&c++,n.unshift(c,0),o.splice.apply(o,n)),this.$updateRows())},f.prototype.$updateRows=function(){var d,c=this.session.lineWidgets;c&&(d=!0,c.forEach(function(h,n){if(h)for(d=!1,h.row=n;h.$oldWidget;)h.$oldWidget.row=n,h=h.$oldWidget}),d)&&(this.session.lineWidgets=null)},f.prototype.$registerLineWidget=function(d){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[d.row];return c&&(d.$oldWidget=c).el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1),this.session.lineWidgets[d.row]=d},f.prototype.addLineWidget=function(d){var c,h,n;return this.$registerLineWidget(d),d.session=this.session,this.editor&&(c=this.editor.renderer,d.html&&!d.el&&(d.el=y.createElement("div"),d.el.innerHTML=d.html),d.text&&!d.el&&(d.el=y.createElement("div"),d.el.textContent=d.text),d.el&&(y.addCssClass(d.el,"ace_lineWidgetContainer"),d.className&&y.addCssClass(d.el,d.className),d.el.style.position="absolute",d.el.style.zIndex="5",c.container.appendChild(d.el),d._inDocument=!0,d.coverGutter||(d.el.style.zIndex="3"),d.pixelHeight==null)&&(d.pixelHeight=d.el.offsetHeight),d.rowCount==null&&(d.rowCount=d.pixelHeight/c.layerConfig.lineHeight),h=this.session.getFoldAt(d.row,0),(d.$fold=h)&&(n=this.session.lineWidgets,d.row!=h.end.row||n[h.start.row]?d.hidden=!0:n[h.start.row]=d),this.session._emit("changeFold",{data:{start:{row:d.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(d)),d},f.prototype.removeLineWidget=function(d){if(d._inDocument=!1,d.session=null,d.el&&d.el.parentNode&&d.el.parentNode.removeChild(d.el),d.editor&&d.editor.destroy)try{d.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[d.row];if(c==d)this.session.lineWidgets[d.row]=d.$oldWidget,d.$oldWidget&&this.onWidgetChanged(d.$oldWidget);else for(;c;){if(c.$oldWidget==d){c.$oldWidget=d.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:d.row}}}),this.$updateRows()},f.prototype.getWidgetsAtRow=function(d){for(var c=this.session.lineWidgets,h=c&&c[d],n=[];h;)n.push(h),h=h.$oldWidget;return n},f.prototype.onWidgetChanged=function(d){this.session._changedWidgets.push(d),this.editor&&this.editor.renderer.updateFull()},f.prototype.measureWidgets=function(d,c){var h=this.session._changedWidgets,n=c.layerConfig;if(h&&h.length){for(var o=1/0,i=0;i<h.length;i++){var s=h[i];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,c.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/n.characterWidth));var a=s.h/n.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=[]}},f.prototype.renderWidgets=function(d,c){var h=c.layerConfig,n=this.session.lineWidgets;if(n){for(var o=Math.min(this.firstRow,h.firstRow),i=Math.max(this.lastRow,h.lastRow,n.length);0<o&&!n[o];)o--;this.firstRow=h.firstRow,this.lastRow=h.lastRow,c.$cursorLayer.config=h;for(var s=o;s<=i;s++){var a,t=n[s];t&&t.el&&(t.hidden?t.el.style.top=-100-(t.pixelHeight||0)+"px":(t._inDocument||(t._inDocument=!0,c.container.appendChild(t.el)),a=c.$cursorLayer.getPixelPosition({row:s,column:0},!0).top,t.coverLine||(a+=h.lineHeight*this.session.getRowLineCount(t.row)),t.el.style.top=a-h.offset+"px",a=t.coverGutter?0:c.gutterWidth,t.fixedWidth||(a-=c.scrollLeft),t.el.style.left=a+"px",t.fullWidth&&t.screenWidth&&(t.el.style.minWidth=h.width+2*h.padding+"px"),t.fixedWidth?t.el.style.right=c.scrollBar.getWidth()+"px":t.el.style.right=""))}}},C.LineWidgets=f}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(b,C,$){var y=b("../lib/keys"),f=b("../mouse/default_gutter_handler").GutterTooltip;function d(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(this.editor)}d.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))},d.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))},d.prototype.$onGutterKeyDown=function(n){var o;this.annotationTooltip.isOpen?(n.preventDefault(),n.keyCode===y.escape&&this.annotationTooltip.hideTooltip()):n.target===this.element?n.keyCode==y.enter&&(n.preventDefault(),o=this.editor.getCursorPosition().row,this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldWidget(i),a=this.$findNearestAnnotation(i);s===null&&a===null||(s===null&&a!==null||(s===null||a!==null)&&Math.abs(a-i)<Math.abs(s-i)?(this.activeRowIndex=a,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex)))}).bind(this),10)):(this.$handleGutterKeyboardInteraction(n),setTimeout((function(){this.editor._signal("gutterkeydown",new c(n,this))}).bind(this),10))},d.prototype.$handleGutterKeyboardInteraction=function(n){if(n.keyCode===y.tab)n.preventDefault();else if(n.keyCode===y.escape)n.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;else if(n.keyCode===y.up)switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}else if(n.keyCode===y.down)switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else if(n.keyCode===y.left)n.preventDefault(),this.$switchLane("annotation");else if(n.keyCode===y.right)n.preventDefault(),this.$switchLane("fold");else if(n.keyCode===y.enter||n.keyCode===y.space)switch(n.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var o=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),n),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),s=this.annotationTooltip.getElement().style;s.left=i.right+"px",s.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}},d.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},d.prototype.$isFoldWidgetVisible=function(i){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),i=this.$getFoldWidget(i).style.display!=="none";return o&&i},d.prototype.$isAnnotationVisible=function(i){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),i=this.$getAnnotation(i).style.display!=="none";return o&&i},d.prototype.$getFoldWidget=function(n){return this.lines.get(n).element.childNodes[1]},d.prototype.$getAnnotation=function(n){return this.lines.get(n).element.childNodes[2]},d.prototype.$findNearestFoldWidget=function(n){if(this.$isFoldWidgetVisible(n))return n;for(var o=0;0<n-o||n+o<this.lines.getLength()-1;){if(0<=n-++o&&this.$isFoldWidgetVisible(n-o))return n-o;if(n+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+o))return n+o}return null},d.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var o=0;0<n-o||n+o<this.lines.getLength()-1;){if(0<=n-++o&&this.$isAnnotationVisible(n-o))return n-o;if(n+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+o))return n+o}return null},d.prototype.$focusFoldWidget=function(n){n!=null&&((n=this.$getFoldWidget(n)).classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())},d.prototype.$focusAnnotation=function(n){n!=null&&((n=this.$getAnnotation(n)).classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())},d.prototype.$blurFoldWidget=function(n){n=this.$getFoldWidget(n),n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},d.prototype.$blurAnnotation=function(n){n=this.$getAnnotation(n),n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},d.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;0<n;)if(this.$isFoldWidgetVisible(--n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},d.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(this.$isFoldWidgetVisible(++n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},d.prototype.$moveAnnotationUp=function(){for(var n=this.activeRowIndex;0<n;)if(this.$isAnnotationVisible(--n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},d.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(this.$isAnnotationVisible(++n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},d.prototype.$switchLane=function(n){switch(n){case"annotation":this.activeLane!=="annotation"&&(o=this.$findNearestAnnotation(this.activeRowIndex))!=null&&(this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex));break;case"fold":var o;this.activeLane!=="fold"&&(o=this.$findNearestFoldWidget(this.activeRowIndex))!=null&&(this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex))}},d.prototype.$rowIndexToRow=function(n){return n=this.lines.get(n),n?n.row:null},d.prototype.$rowToRowIndex=function(n){for(var o=0;o<this.lines.getLength();o++)if(this.lines.get(o).row==n)return o;return null},C.GutterKeyboardHandler=d,h.prototype.getKey=function(){return y.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"};var c=h;function h(n,o){this.gutterKeyboardHandler=o,this.domEvent=n}C.GutterKeyboardEvent=c}),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/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(_,C,$){var y=this&&this.__values||function(v){var L=typeof Symbol=="function"&&Symbol.iterator,G=L&&v[L],P=0;if(G)return G.call(v);if(v&&typeof v.length=="number")return{next:function(){return{value:(v=v&&P>=v.length?void 0:v)&&v[P++],done:!v}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")},f=_("./lib/oop"),d=_("./lib/dom"),c=_("./lib/lang"),h=_("./lib/useragent"),n=_("./keyboard/textinput").TextInput,o=_("./mouse/mouse_handler").MouseHandler,i=_("./mouse/fold_handler").FoldHandler,s=_("./keyboard/keybinding").KeyBinding,a=_("./edit_session").EditSession,t=_("./search").Search,e=_("./range").Range,r=_("./lib/event_emitter").EventEmitter,l=_("./commands/command_manager").CommandManager,p=_("./commands/default_commands").commands,g=_("./config"),I=_("./token_iterator").TokenIterator,A=_("./line_widgets").LineWidgets,N=_("./keyboard/gutter_handler").GutterKeyboardHandler,M=_("./config").nls,R=_("./clipboard"),S=_("./lib/keys"),_=(u.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=c.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},u.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(this.previousCommand=null,v={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:v.command||{},args:v.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},u.prototype.endOperation=function(v){if(this.curOp&&this.session){if(v&&v.returnValue===!1||!this.session)return this.curOp=null;if((v!=1||!this.curOp.command||this.curOp.command.name!="mouse")&&(this._signal("beforeEndOperation"),this.curOp)){var v=this.curOp.command,L=v&&v.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var G=this.selection.getRange(),P=this.renderer.layerConfig;(G.start.row>=P.lastRow||G.end.row<=P.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}v=this.selection.toJSON(),this.curOp.selectionAfter=v,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(v),this.prevOp=this.curOp,this.curOp=null}}},u.prototype.$historyTracker=function(v){var L,G,P,Y;this.$mergeUndoDeltas&&(L=this.prevOp,G=this.$mergeableCommands,P=L.command&&v.command.name==L.command.name,v.command.name=="insertstring"?(Y=v.args,this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),P=P&&this.mergeNextCommand&&(!/\s/.test(Y)||/\s/.test(L.args)),this.mergeNextCommand=!0):P=P&&G.indexOf(v.command.name)!==-1,(P=this.$mergeUndoDeltas!="always"&&2e3<Date.now()-this.sequenceStartTime?!1:P)?this.session.mergeUndoDeltas=!0:G.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now()))},u.prototype.setKeyboardHandler=function(v,L){var G;v&&typeof v=="string"&&v!="ace"?(this.$keybindingId=v,G=this,g.loadModule(["keybinding",v],function(P){G.$keybindingId==v&&G.keyBinding.setKeyboardHandler(P&&P.handler),L&&L()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),L&&L())},u.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},u.prototype.setSession=function(v){var L,G;this.session!=v&&(this.curOp&&this.endOperation(),this.curOp={},(L=this.session)&&(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),(G=this.session.getSelection()).off("changeCursor",this.$onCursorChange),G.off("changeSelection",this.$onSelectionChange)),(this.session=v)?(this.$onDocumentChange=this.onDocumentChange.bind(this),v.on("change",this.$onDocumentChange),this.renderer.setSession(v),this.$onChangeMode=this.onChangeMode.bind(this),v.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),v.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),v.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),v.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),v.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),v.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=v.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(v)),this._signal("changeSession",{session:v,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),v&&v._signal("changeEditor",{editor:this}),v)&&!v.destroyed&&v.bgTokenizer.scheduleStart()},u.prototype.getSession=function(){return this.session},u.prototype.setValue=function(v,L){return this.session.doc.setValue(v),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),v},u.prototype.getValue=function(){return this.session.getValue()},u.prototype.getSelection=function(){return this.selection},u.prototype.resize=function(v){this.renderer.onResize(v)},u.prototype.setTheme=function(v,L){this.renderer.setTheme(v,L)},u.prototype.getTheme=function(){return this.renderer.getTheme()},u.prototype.setStyle=function(v){this.renderer.setStyle(v)},u.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},u.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},u.prototype.setFontSize=function(v){this.setOption("fontSize",v)},u.prototype.$highlightBrackets=function(){var v;this.$highlightPending||((v=this).$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var L,G,P,Y,Q=v.session;Q&&!Q.destroyed&&(Q.$bracketHighlight&&(Q.$bracketHighlight.markerIds.forEach(function(K){Q.removeMarker(K)}),Q.$bracketHighlight=null),L=v.getCursorPosition(),G=(G=v.getKeyboardHandler())&&G.$getDirectionForHighlight&&G.$getDirectionForHighlight(v),(G=Q.getMatchingBracketRanges(L,G))||(P=new I(Q,L.row,L.column).getCurrentToken())&&/\b(?:tag-open|tag-name)/.test(P.type)&&(P=Q.getMatchingTags(L))&&(G=[P.openTagName.isEmpty()?P.openTag:P.openTagName,P.closeTagName.isEmpty()?P.closeTag:P.closeTagName]),(G=!G&&Q.$mode.getMatching?Q.$mode.getMatching(v.session):G)&&(Y="ace_bracket",Array.isArray(G)?G.length==1&&(Y="ace_error_bracket"):G=[G],G.length==2&&(e.comparePoints(G[0].end,G[1].start)==0?G=[e.fromPoints(G[0].start,G[1].end)]:e.comparePoints(G[0].start,G[1].end)==0&&(G=[e.fromPoints(G[1].start,G[0].end)])),Q.$bracketHighlight={ranges:G,markerIds:G.map(function(K){return Q.addMarker(K,Y,"text")})}),v.getHighlightIndentGuides())&&v.renderer.$textLayer.$highlightIndentGuide()},50))},u.prototype.focus=function(){this.textInput.focus()},u.prototype.isFocused=function(){return this.textInput.isFocused()},u.prototype.blur=function(){this.textInput.blur()},u.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},u.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},u.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},u.prototype.onDocumentChange=function(v){var L=this.session.$useWrapMode,G=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,G,L),this._signal("change",v),this.$cursorChange()},u.prototype.onTokenizerUpdate=function(v){v=v.data,this.renderer.updateLines(v.first,v.last)},u.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},u.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},u.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},u.prototype.$updateHighlightActiveLine=function(){var v,L,G=this.getSession();this.$highlightActiveLine&&(this.$selectionStyle=="line"&&this.selection.isMultiLine()||(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),!this.renderer.$maxLines||this.session.getLength()!==1||1<this.renderer.$minLines||(v=!1)),G.$highlightLineMarker&&!v?(G.removeMarker(G.$highlightLineMarker.id),G.$highlightLineMarker=null):!G.$highlightLineMarker&&v?((L=new e(v.row,v.column,v.row,1/0)).id=G.addMarker(L,"ace_active-line","screenLine"),G.$highlightLineMarker=L):v&&(G.$highlightLineMarker.start.row=v.row,G.$highlightLineMarker.end.row=v.row,G.$highlightLineMarker.start.column=v.column,G._signal("changeBackMarker"))},u.prototype.onSelectionChange=function(v){var L,G,P=this.session,P=(P.$selectionMarker&&P.removeMarker(P.$selectionMarker),P.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(L=this.selection.getRange(),G=this.getSelectionStyle(),P.$selectionMarker=P.addMarker(L,"ace_selection",G)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(P),this._signal("changeSelection")},u.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,L=this.getSelectionRange();if(!L.isEmpty()&&!L.isMultiLine()){var G=L.start.column,P=L.end.column,v=v.getLine(L.start.row),L=v.substring(G,P);if(!(5e3<L.length)&&/[\w\d]/.test(L)&&(L=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:L}),v=v.substring(G-1,P+1),L.test(v)))return L}},u.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},u.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},u.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},u.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},u.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},u.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},u.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},u.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},u.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},u.prototype.getCopyText=function(){var v=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),G=!1;if(!v&&this.$copyWithEmptySelection)for(var G=!0,P=this.selection.getAllRanges(),Y=0;Y<P.length;Y++){var Q=P[Y];Y&&P[Y-1].start.row==Q.start.row||(v+=this.session.getLine(Q.start.row)+L)}var K={text:v};return this._signal("copy",K),R.lineMode=!!G&&K.text,K.text},u.prototype.onCopy=function(){this.commands.exec("copy",this)},u.prototype.onCut=function(){this.commands.exec("cut",this)},u.prototype.onPaste=function(v,L){this.commands.exec("paste",this,{text:v,event:L})},u.prototype.$handlePaste=function(G){this._signal("paste",G=typeof G=="string"?{text:G}:G);var L=G.text,G=L===R.lineMode,P=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)G?P.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(G)this.selection.rangeList.ranges.forEach(function(T){P.insert({row:T.start.row,column:0},L)});else{var Y=L.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,G=!(Y.length!=2||Y[0]&&Y[1]);if(Y.length!=Q.length||G)return this.commands.exec("insertstring",this,L);for(var K=Q.length;K--;){var te=Q[K];te.isEmpty()||P.remove(te),P.insert(te.start,Y[K])}}},u.prototype.execCommand=function(v,L){return this.commands.exec(v,this,L)},u.prototype.insert=function(v,te){var G,P=this.session,Y=P.getMode(),Q=this.getCursorPosition(),K=(this.getBehavioursEnabled()&&!te&&(G=Y.transformAction(P.getState(Q.row),"insertion",this,P,v))&&(v===G.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),v=G.text),v=="	"&&(v=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&v.indexOf(`
`)==-1&&((K=e.fromPoints(Q,Q)).end.column+=v.length,this.session.remove(K)):(K=this.getSelectionRange(),Q=this.session.remove(K),this.clearSelection()),v!=`
`&&v!=`\r
`||(T=P.getLine(Q.row),Q.column>T.search(/\S|$/)&&(te=T.substr(Q.column).search(/\S|$/),P.doc.removeInLine(Q.row,Q.column,Q.column+te))),this.clearSelection(),Q.column),te=P.getState(Q.row),T=P.getLine(Q.row),O=Y.checkOutdent(te,T,v);P.insert(Q,v),G&&G.selection&&(G.selection.length==2?this.selection.setSelectionRange(new e(Q.row,K+G.selection[0],Q.row,K+G.selection[1])):this.selection.setSelectionRange(new e(Q.row+G.selection[0],G.selection[1],Q.row+G.selection[2],G.selection[3]))),this.$enableAutoIndent&&(P.getDocument().isNewLine(v)&&(K=Y.getNextLineIndent(te,T.slice(0,Q.column),P.getTabString()),P.insert({row:Q.row+1,column:0},K)),O)&&Y.autoOutdent(te,P,Q.row)},u.prototype.autoIndent=function(){for(var v=this.session,L=v.getMode(),G=this.selection.isEmpty()?[new e(0,0,v.doc.getLength()-1,0)]:this.selection.getAllRanges(),P="",Y="",Q=v.getTabString(),K=0;K<G.length;K++)for(var te=G[K].start.row,T=G[K].end.row,O=te;O<=T;O++){0<O&&(P=v.getState(O-1),V=v.getLine(O-1),Y=L.getNextLineIndent(P,V,Q));var V=v.getLine(O),z=L.$getIndent(V);Y!==z&&(0<z.length&&(z=new e(O,0,O,z.length),v.remove(z)),0<Y.length)&&v.insert({row:O,column:0},Y),L.autoOutdent(P,v,O)}},u.prototype.onTextInput=function(v,L){if(!L)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}}),v=this.applyComposition.bind(this,v,L),this.selection.rangeCount?this.forEachSelection(v):v(),this.endOperation()},u.prototype.applyComposition=function(v,L){var G;(L.extendLeft||L.extendRight)&&((G=this.selection.getRange()).start.column-=L.extendLeft,G.end.column+=L.extendRight,G.start.column<0&&(G.start.row--,G.start.column+=this.session.getLine(G.start.row).length+1),this.selection.setRange(G),v||G.isEmpty()||this.remove()),!v&&this.selection.isEmpty()||this.insert(v,!0),(L.restoreStart||L.restoreEnd)&&((G=this.selection.getRange()).start.column-=L.restoreStart,G.end.column-=L.restoreEnd,this.selection.setRange(G))},u.prototype.onCommandKey=function(v,L,G){return this.keyBinding.onCommandKey(v,L,G)},u.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},u.prototype.getOverwrite=function(){return this.session.getOverwrite()},u.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},u.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},u.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},u.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},u.prototype.getDragDelay=function(){return this.getOption("dragDelay")},u.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},u.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},u.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},u.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},u.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},u.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},u.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},u.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},u.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},u.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},u.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},u.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},u.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},u.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},u.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},u.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},u.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},u.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},u.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},u.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},u.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},u.prototype.getReadOnly=function(){return this.getOption("readOnly")},u.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},u.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},u.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},u.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},u.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},u.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},u.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},u.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},u.prototype.remove=function(Y){this.selection.isEmpty()&&(Y=="left"?this.selection.selectLeft():this.selection.selectRight());var L,G,P,Y=this.getSelectionRange();this.getBehavioursEnabled()&&(G=(L=this.session).getState(Y.start.row),G=L.getMode().transformAction(G,"deletion",this,L,Y),Y.end.column===0&&(P=L.getTextRange(Y))[P.length-1]==`
`&&(P=L.getLine(Y.end.row),/^\s+$/.test(P))&&(Y.end.column=P.length),G)&&(Y=G),this.session.remove(Y),this.clearSelection()},u.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var v=this.getSelectionRange();v.start.column==v.end.column&&v.start.row==v.end.row&&(v.end.column=0,v.end.row++),this.session.remove(v),this.clearSelection()},u.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(v)},u.prototype.setGhostText=function(v,L){this.session.widgetManager||(this.session.widgetManager=new A(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(v,L)},u.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},u.prototype.transposeLetters=function(){var v,L,G,P;this.selection.isEmpty()&&(L=(v=this.getCursorPosition()).column)!==0&&(P=L<(P=this.session.getLine(v.row)).length?(G=P.charAt(L)+P.charAt(L-1),new e(v.row,L-1,v.row,L+1)):(G=P.charAt(L-1)+P.charAt(L-2),new e(v.row,L-2,v.row,L)),this.session.replace(P,G),this.session.selection.moveToPosition(P.end))},u.prototype.toLowerCase=function(){var v=this.getSelectionRange(),L=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),G=this.session.getTextRange(L);this.session.replace(L,G.toLowerCase()),this.selection.setSelectionRange(v)},u.prototype.toUpperCase=function(){var v=this.getSelectionRange(),L=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),G=this.session.getTextRange(L);this.session.replace(L,G.toUpperCase()),this.selection.setSelectionRange(v)},u.prototype.indent=function(){var v=this.session,L=this.getSelectionRange();if(!(L.start.row<L.end.row)){if(L.start.column<L.end.column){var G,Q=v.getTextRange(L);if(!/^\s+$/.test(Q))return G=this.$getSelectedRows(),void v.indentRows(G.first,G.last,"	")}var P=v.getLine(L.start.row),Q=L.start,Y=v.getTabSize(),Q=v.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var K=Y-Q%Y,te=c.stringRepeat(" ",K);else{for(K=Q%Y;P[L.start.column-1]==" "&&K;)L.start.column--,K--;this.selection.setSelectionRange(L),te="	"}return this.insert(te)}G=this.$getSelectedRows(),v.indentRows(G.first,G.last,"	")},u.prototype.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last,"	")},u.prototype.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},u.prototype.sortLines=function(){for(var v=this.$getSelectedRows(),L=this.session,G=[],P=v.first;P<=v.last;P++)G.push(L.getLine(P));G.sort(function(K,te){return K.toLowerCase()<te.toLowerCase()?-1:K.toLowerCase()>te.toLowerCase()?1:0});for(var Y=new e(0,0,0,0),P=v.first;P<=v.last;P++){var Q=L.getLine(P);Y.start.row=P,Y.end.row=P,Y.end.column=Q.length,L.replace(Y,G[P-v.first])}},u.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,L.first,L.last)},u.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),L=this.session.getState(v.row),G=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,G,v)},u.prototype.getNumberAt=function(v,L){for(var G=/[\-]?[0-9]+(?:\.[0-9]+)?/g,P=(G.lastIndex=0,this.session.getLine(v));G.lastIndex<L;){var Y=G.exec(P);if(Y.index<=L&&Y.index+Y[0].length>=L)return{value:Y[0],start:Y.index,end:Y.index+Y[0].length}}return null},u.prototype.modifyNumber=function(v){var L,G,P,Y=this.selection.getCursor().row,Q=this.selection.getCursor().column,K=new e(Y,Q-1,Y,Q),K=this.session.getTextRange(K);!isNaN(parseFloat(K))&&isFinite(K)?(K=this.getNumberAt(Y,Q))&&(P=0<=K.value.indexOf(".")?K.start+K.value.indexOf(".")+1:K.end,L=K.start+K.value.length-P,G=parseFloat(K.value),G*=Math.pow(10,L),P!==K.end&&Q<P?v*=Math.pow(10,K.end-Q-1):v*=Math.pow(10,K.end-Q),P=(G=(G+=v)/Math.pow(10,L)).toFixed(L),v=new e(Y,K.start,Y,K.end),this.session.replace(v,P),this.moveCursorTo(Y,Math.max(K.start+1,Q+P.length-K.value.length))):this.toggleWord()},u.prototype.toggleWord=function(){for(var v,L=this.selection.getCursor().row,G=this.selection.getCursor().column,P=(this.selection.selectWord(),this.getSelectedText()),Y=this.selection.getWordRange().start.column,Q=P.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),K=G-Y-1,te=(K<0&&(K=0),0),T=this,O=(P.match(/[A-Za-z0-9_]+/)&&Q.forEach(function(D,q){v=te+D.length,te<=K&&K<=v&&(P=D,T.selection.clearSelection(),T.moveCursorTo(L,te+Y),T.selection.selectTo(L,v+Y)),te=v}),this.$toggleWordPairs),V=0;V<O.length;V++)for(var z=O[V],w=0;w<=1;w++){var k=+!w,W=P.match(new RegExp("^\\s?_?("+c.escapeRegExp(z[w])+")\\s?$","i"));W&&P.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(W[1])+")($|\\s)","g"))&&(W=P.replace(new RegExp(c.escapeRegExp(z[w]),"i"),function(D){var q=z[k];return D.toUpperCase()==D?q=q.toUpperCase():D.charAt(0).toUpperCase()==D.charAt(0)&&(q=q.substr(0,0)+z[k].charAt(0).toUpperCase()+q.substr(1)),q}),this.insert(W))}},u.prototype.findLinkAt=function(Q,L){var G,P,Y,Q=this.session.getLine(Q).split(/((?:https?|ftp):\/\/[\S]+)/),K=L,te=(K<0&&(K=0),0);try{for(var T=y(Q),O=T.next();!O.done;O=T.next()){var V=O.value,z=te+V.length;if(te<=K&&K<=z&&V.match(/((?:https?|ftp):\/\/[\S]+)/)){Y=V.replace(/[\s:.,'";}\]]+$/,"");break}te=z}}catch(w){G={error:w}}finally{try{O&&!O.done&&(P=T.return)&&P.call(T)}finally{if(G)throw G.error}}return Y},u.prototype.openLink=function(){var v=this.selection.getCursor(),v=this.findLinkAt(v.row,v.column);return v&&window.open(v,"_blank"),v!=null},u.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},u.prototype.duplicateSelection=function(){var v,L=this.selection,G=this.session,P=L.getRange(),Y=L.isBackwards();P.isEmpty()?(v=P.start.row,G.duplicateLines(v,v)):(v=Y?P.start:P.end,G=G.insert(v,G.getTextRange(P)),P.start=v,P.end=G,L.setSelectionRange(P,Y))},u.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},u.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},u.prototype.moveText=function(v,L,G){return this.session.moveText(v,L,G)},u.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},u.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},u.prototype.$moveLines=function(v,L){var G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var P=G.toOrientedRange(),Y=this.$getSelectedRows(P),Q=this.session.$moveLines(Y.first,Y.last,L?0:v);P.moveBy(Q=L&&v==-1?0:Q,0),G.fromOrientedRange(P)}else{for(var K=G.rangeList.ranges,te=(G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),T=0,O=K.length,V=0;V<O;V++){for(var z=V,w=(K[V].moveBy(te,0),(Y=this.$getSelectedRows(K[V])).first),k=Y.last;++V<O;){T&&K[V].moveBy(T,0);var W=this.$getSelectedRows(K[V]);if(L&&W.first!=k||!L&&W.first>k+1)break;k=W.last}for(V--,te=this.session.$moveLines(w,k,L?0:v),L&&v==-1&&(z=V+1);z<=V;)K[z].moveBy(te,0),z++;T+=te=L?te:0}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},u.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},u.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},u.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},u.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},u.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},u.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},u.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},u.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},u.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},u.prototype.$moveByPage=function(Q,L){var G=this.renderer,P=this.renderer.layerConfig,Y=Q*Math.floor(P.height/P.lineHeight),Q=(L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Y,0)}):L===!1&&(this.selection.moveCursorBy(Y,0),this.selection.clearSelection()),G.scrollTop);G.scrollBy(0,Y*P.lineHeight),L!=null&&G.scrollCursorIntoView(null,.5),G.animateScrolling(Q)},u.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},u.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},u.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},u.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},u.prototype.scrollPageDown=function(){this.$moveByPage(1)},u.prototype.scrollPageUp=function(){this.$moveByPage(-1)},u.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},u.prototype.scrollToLine=function(v,L,G,P){this.renderer.scrollToLine(v,L,G,P)},u.prototype.centerSelection=function(){var v=this.getSelectionRange(),v={row:Math.floor(v.start.row+(v.end.row-v.start.row)/2),column:Math.floor(v.start.column+(v.end.column-v.start.column)/2)};this.renderer.alignCursor(v,.5)},u.prototype.getCursorPosition=function(){return this.selection.getCursor()},u.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},u.prototype.getSelectionRange=function(){return this.selection.getRange()},u.prototype.selectAll=function(){this.selection.selectAll()},u.prototype.clearSelection=function(){this.selection.clearSelection()},u.prototype.moveCursorTo=function(v,L){this.selection.moveCursorTo(v,L)},u.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},u.prototype.jumpToMatching=function(v,L){var G=this.getCursorPosition(),P=new I(this.session,G.row,G.column),Y=P.getCurrentToken(),Q=0,K=(Y=Y&&Y.type.indexOf("tag-name")!==-1?P.stepBackward():Y)||P.stepForward();if(K){var te,T,O=!1,V={},z=G.column-K.start,w={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do if(K.value.match(/[{}()\[\]]/g)){for(;z<K.value.length&&!O;z++)if(w[K.value[z]])switch(T=w[K.value[z]]+"."+K.type.replace("rparen","lparen"),isNaN(V[T])&&(V[T]=0),K.value[z]){case"(":case"[":case"{":V[T]++;break;case")":case"]":case"}":V[T]--,V[T]===-1&&(te="bracket",O=!0)}}else K.type.indexOf("tag-name")!==-1&&(isNaN(V[K.value])&&(V[K.value]=0),Y.value==="<"&&1<Q?V[K.value]++:Y.value==="</"&&V[K.value]--,V[K.value]===-1)&&(te="tag",O=!0);while(O||(Y=K,Q++,K=P.stepForward(),z=0),K&&!O);if(te){if(te==="bracket")!(W=this.session.getBracketRange(G))&&(D=(W=new e(P.getCurrentTokenRow(),P.getCurrentTokenColumn()+z-1,P.getCurrentTokenRow(),P.getCurrentTokenColumn()+z-1)).start,L||D.row===G.row&&Math.abs(D.column-G.column)<2)&&(W=this.session.getBracketRange(D));else if(te==="tag"){if(!K||K.type.indexOf("tag-name")===-1)return;var k,W,D=(D=(W=new e(P.getCurrentTokenRow(),P.getCurrentTokenColumn()-2,P.getCurrentTokenRow(),P.getCurrentTokenColumn()-2)).compare(G.row,G.column)===0&&(k=this.session.getMatchingTags(G))?k.openTag.contains(G.row,G.column)?(W=k.closeTag).start:(W=k.openTag,k.closeTag.start.row===G.row&&k.closeTag.start.column===G.column?W.end:W.start):D)||W.start}(D=W&&W.cursor||D)&&(v?W&&L?this.selection.setRange(W):W&&W.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(D.row,D.column):this.selection.moveTo(D.row,D.column))}}},u.prototype.gotoLine=function(v,L,G){this.selection.clearSelection(),this.session.unfold({row:v-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,L||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,G)},u.prototype.navigateTo=function(v,L){this.selection.moveTo(v,L)},u.prototype.navigateUp=function(v){var L;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return L=this.selection.anchor.getPosition(),this.moveCursorToPosition(L);this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},u.prototype.navigateDown=function(v){var L;if(this.selection.isMultiLine()&&this.selection.isBackwards())return L=this.selection.anchor.getPosition(),this.moveCursorToPosition(L);this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},u.prototype.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},u.prototype.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},u.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},u.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},u.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},u.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},u.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},u.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},u.prototype.replace=function(v,G){G&&this.$search.set(G);var G=this.$search.find(this.session),P=0;return G&&(this.$tryReplace(G,v)&&(P=1),this.selection.setSelectionRange(G),this.renderer.scrollSelectionIntoView(G.start,G.end)),P},u.prototype.replaceAll=function(v,L){L&&this.$search.set(L);var G=this.$search.findAll(this.session),P=0;if(G.length){L=this.getSelectionRange(),this.selection.moveTo(0,0);for(var Y=G.length-1;0<=Y;--Y)this.$tryReplace(G[Y],v)&&P++;this.selection.setSelectionRange(L)}return P},u.prototype.$tryReplace=function(v,L){var G=this.session.getTextRange(v);return(L=this.$search.replace(G,L))!==null?(v.end=this.session.replace(v,L),v):null},u.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},u.prototype.find=function(Y,L,G){L=L||{},typeof Y=="string"||Y instanceof RegExp?L.needle=Y:typeof Y=="object"&&f.mixin(L,Y);var P=this.selection.getRange(),Y=(L.needle==null&&((Y=this.session.getTextRange(P)||this.$search.$options.needle)||(P=this.session.getWordRange(P.start.row,P.start.column),Y=this.session.getTextRange(P)),this.$search.set({needle:Y})),this.$search.set(L),L.start||this.$search.set({start:P}),this.$search.find(this.session));return L.preventScroll?Y:Y?(this.revealRange(Y,G),Y):(L.backwards?P.start=P.end:P.end=P.start,void this.selection.setRange(P))},u.prototype.findNext=function(v,L){this.find({skipCurrent:!0,backwards:!1},v,L)},u.prototype.findPrevious=function(v,L){this.find(v,{skipCurrent:!0,backwards:!0},L)},u.prototype.revealRange=function(v,L){this.session.unfold(v),this.selection.setSelectionRange(v);var G=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),L!==!1&&this.renderer.animateScrolling(G)},u.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},u.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},u.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.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()},u.prototype.setAutoScrollEditorIntoView=function(v){var L,G,P,Y,Q,K,te;v&&(P=!1,(G=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(Y=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(Y,this.container.firstChild),Q=this.on("changeSelection",function(){P=!0}),K=this.renderer.on("beforeRender",function(){P&&(L=G.renderer.container.getBoundingClientRect())}),te=this.renderer.on("afterRender",function(){var T,O,V;P&&L&&(G.isFocused()||G.searchBox&&G.searchBox.isFocused())&&(T=(O=G.renderer).$cursorLayer.$pixelPos,O=O.layerConfig,V=T.top-O.offset,(P=0<=T.top&&V+L.top<0||!(T.top<O.height&&T.top+L.top+O.lineHeight>window.innerHeight)&&null)!=null&&(Y.style.top=V+"px",Y.style.left=T.left+"px",Y.style.height=O.lineHeight+"px",Y.scrollIntoView(P)),P=L=null)}),this.setAutoScrollEditorIntoView=function(T){T||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",te),this.renderer.off("beforeRender",K))})},u.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(v)),L.isBlinking=!this.$readOnly&&v!="wide",d.setCssClass(L.element,"ace_slim-cursors",/slim/.test(v)))},u.prototype.prompt=function(v,L,G){var P=this;g.loadModule("ace/ext/prompt",function(Y){Y.prompt(P,v,L,G)})},u);function u(v,L,G){this.session,this.$toDestroy=[];var P=v.getContainerElement();this.container=P,this.renderer=v,this.id="editor"+ ++u.$uid,this.commands=new l(h.isMac?"mac":"win",p),typeof document=="object"&&(this.textInput=new n(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new i(this)),this.keyBinding=new s(this),this.$search=new t().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Y,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(L||G&&G.session||new a("")),g.resetOptions(this),G&&this.setOptions(G),g._signal("editor",this)}_.$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"],["&&","||"],["==","!="]],f.implement(_.prototype,r),g.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(v){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:v})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(v){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(v){this.textInput.setReadOnly(v),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(v){this.textInput.setCopyWithEmptySelection(v)},initialValue:!1},cursorStyle:{set:function(v){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(v){this.setAutoScrollEditorIntoView(v)}},keyboardHandler:{set:function(v){this.setKeyboardHandler(v)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(v){this.session.setValue(v)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(v){this.setSession(v)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(v){this.renderer.$gutterLayer.setShowLineNumbers(v),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),v&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(v){this.$showLineNumbers&&v?E.attach(this):E.detach(this)}},placeholder:{set:function(v){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var L=this.session&&(this.renderer.$composition||1<this.session.getLength()||0<this.session.getLine(0).length);L&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):L||this.renderer.placeholderNode?!L&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder"),(L=d.createElement("div")).className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode))}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(v){function L(Y){Y.target==this.renderer.scroller&&Y.keyCode===S.enter&&(Y.preventDefault(),Y=this.getCursorPosition().row,this.isRowVisible(Y)||this.scrollToLine(Y,!0,!0),this.focus())}var G,P={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(Y){Y.blur(),Y.renderer.scroller.focus()},readOnly:!0};v?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",M("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(P),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",M("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",M("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),(G=G||new N(this)).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",L.bind(this)),this.commands.removeCommand(P),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),G&&G.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(v){this.$textInputAriaLabel=v},initialValue:""},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 E={getText:function(v,L){return(Math.abs(v.selection.lead.row-L)||L+1+(L<9?"·":""))+""},getWidth:function(v,L,G){return Math.max(L.toString().length,(G.lastRow+1).toString().length,2)*G.characterWidth},update:function(v,L){L.renderer.$loop.schedule(L.renderer.CHANGE_GUTTER)},attach:function(v){v.renderer.$gutterLayer.$renderer=this,v.on("changeSelection",this.update),this.update(null,v)},detach:function(v){v.renderer.$gutterLayer.$renderer==this&&(v.renderer.$gutterLayer.$renderer=null),v.off("changeSelection",this.update),this.update(null,v)}};C.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(b,C,$){var y=b("../lib/dom");function f(d,c){this.element=d,this.canvasHeight=c||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}f.prototype.moveContainer=function(d){y.translate(this.element,0,-(d.firstRowScreen*d.lineHeight%this.canvasHeight)-d.offset*this.$offsetCoefficient)},f.prototype.pageChanged=function(d,c){return Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},f.prototype.computeLineTop=function(d,c,h){var n=c.firstRowScreen*c.lineHeight,n=Math.floor(n/this.canvasHeight);return h.documentToScreenRow(d,0)*c.lineHeight-n*this.canvasHeight},f.prototype.computeLineHeight=function(d,c,h){return c.lineHeight*h.getRowLineCount(d)},f.prototype.getLength=function(){return this.cells.length},f.prototype.get=function(d){return this.cells[d]},f.prototype.shift=function(){this.$cacheCell(this.cells.shift())},f.prototype.pop=function(){this.$cacheCell(this.cells.pop())},f.prototype.push=function(d){if(Array.isArray(d)){this.cells.push.apply(this.cells,d);for(var c=y.createFragment(this.element),h=0;h<d.length;h++)c.appendChild(d[h].element);this.element.appendChild(c)}else this.cells.push(d),this.element.appendChild(d.element)},f.prototype.unshift=function(d){if(Array.isArray(d)){this.cells.unshift.apply(this.cells,d);for(var c=y.createFragment(this.element),h=0;h<d.length;h++)c.appendChild(d[h].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(d),this.element.insertAdjacentElement("afterbegin",d.element)},f.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},f.prototype.$cacheCell=function(d){d&&(d.element.remove(),this.cellCache.push(d))},f.prototype.createCell=function(d,c,h,n){var o,i=this.cellCache.pop();return i||(o=y.createElement("div"),n&&n(o),this.element.appendChild(o),i={element:o,text:"",row:d}),i.row=d,i},C.Lines=f}),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(o,C,$){var y=o("../lib/dom"),f=o("../lib/oop"),d=o("../lib/lang"),c=o("../lib/event_emitter").EventEmitter,h=o("./lines").Lines,n=o("../config").nls,o=(i.prototype.setSession=function(a){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=a)&&a.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(a,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,t)},i.prototype.removeGutterDecoration=function(a,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,t)},i.prototype.setAnnotations=function(a){this.$annotations=[];for(var t=0;t<a.length;t++){var e=a[t],p=e.row,r=(r=this.$annotations[p])||(this.$annotations[p]={text:[],type:[]}),p=e.text,l=e.type,p=p?d.escapeHTML(p):e.html||"",p=(r.text.indexOf(p)===-1&&(r.text.push(p),r.type.push(l)),e.className);p?r.className=p:l=="error"?r.className=" ace_error":l=="warning"&&r.className!=" ace_error"?r.className=" ace_warning":l!="info"||r.className||(r.className=" ace_info")}},i.prototype.$updateAnnotations=function(a){var t,e;this.$annotations.length&&(t=a.start.row,(e=a.end.row-t)!=0)&&(a.action=="remove"?this.$annotations.splice(t,1+e,null):((a=new Array(1+e)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,a)))},i.prototype.update=function(a){this.config=a;for(var t=this.session,e=a.firstRow,r=Math.min(a.lastRow+a.gutterOffset,t.getLength()-1),l=(this.oldLastRow=r,this.config=a,this.$lines.moveContainer(a),this.$updateCursorRow(),t.getNextFoldLine(e)),p=l?l.start.row:1/0,g=null,I=-1,A=e;;){if(p<A&&(A=l.end.row+1,p=(l=t.getNextFoldLine(A,l))?l.start.row:1/0),r<A){for(;this.$lines.getLength()>I+1;)this.$lines.pop();break}(g=this.$lines.get(++I))?g.row=A:(g=this.$lines.createCell(A,a,this.session,s),this.$lines.push(g)),this.$renderCell(g,a,l,A),A++}this._signal("afterRender"),this.$updateGutterWidth(a)},i.prototype.$updateGutterWidth=function(a){var t=this.session,l=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,e=this.$lines.last()?this.$lines.last().text:"",r=((this.$fixedWidth||t.$useWrapMode)&&(e=t.getLength()+r-1),l?l.getWidth(t,e,a):e.toString().length*a.characterWidth),l=this.$padding||this.$computePadding();(r+=l.left+l.right)===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},i.prototype.$updateCursorRow=function(){var a;this.$highlightGutterLine&&(a=this.session.selection.getCursor(),this.$cursorRow!==a.row)&&(this.$cursorRow=a.row)},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var a=this.session.selection.cursor.row;if(this.$cursorRow=a,!this.$cursorCell||this.$cursorCell.row!=a){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 e=0;e<t.length;e++){var r=t[e];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var l=this.session.getFoldLine(this.$cursorRow);if(!(0<e&&l&&l.start.row==t[e-1].row))break;r=t[e-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},i.prototype.scrollLines=function(a){var t=this.config;if(this.config=a,this.$updateCursorRow(),this.$lines.pageChanged(t,a))return this.update(a);this.$lines.moveContainer(a);var e=Math.min(a.lastRow+a.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=e,!t||r<a.firstRow)return this.update(a);if(e<t.firstRow)return this.update(a);if(t.firstRow<a.firstRow)for(var l=this.session.getFoldedRowCount(t.firstRow,a.firstRow-1);0<l;l--)this.$lines.shift();if(e<r)for(l=this.session.getFoldedRowCount(e+1,r);0<l;l--)this.$lines.pop();a.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(a,a.firstRow,t.firstRow-1)),r<e&&this.$lines.push(this.$renderLines(a,r+1,e)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(a)},i.prototype.$renderLines=function(a,t,e){for(var r=[],l=t,p=this.session.getNextFoldLine(l),g=p?p.start.row:1/0;g<l&&(l=p.end.row+1,g=(p=this.session.getNextFoldLine(l,p))?p.start.row:1/0),!(e<l);){var I=this.$lines.createCell(l,a,this.session,s);this.$renderCell(I,a,p,l),r.push(I),l++}return r},i.prototype.$renderCell=function(a,t,e,r){var l,p,g=a.element,I=this.session,A=g.childNodes[0],N=g.childNodes[1],M=g.childNodes[2],R=M.firstChild,S=I.$firstLineNumber,_=I.$breakpoints,u=I.$decorations,E=I.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&I.foldWidgets,L=e?e.start.row:Number.MAX_VALUE,G=t.lineHeight+"px",P=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",Y=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Q=(E?E.getText(I,r):r+S).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||e&&r<this.$cursorRow&&L<=r&&this.$cursorRow<=e.end.row)&&(P+="ace_gutter-active-line ",this.$cursorCell!=a)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=a),_[r]&&(P+=_[r]),u[r]&&(P+=u[r]),this.$annotations[r]&&r!==L&&(P+=this.$annotations[r].className),l=v&&(l=v[r])==null?v[r]=I.getFoldWidget(r):l){if(E="ace_fold-widget ace_"+l,S=l=="start"&&r==L&&r<e.end.row,S){E+=" ace_closed";for(var K="",te=!1,T=r+1;T<=e.end.row;T++)if(this.$annotations[T]){if(this.$annotations[T].className===" ace_error"){te=!0,K=" ace_error_fold";break}this.$annotations[T].className===" ace_warning"&&(te=!0,K=" ace_warning_fold")}P+=K}else E+=" ace_open";N.className!=E&&(N.className=E),y.setStyle(N.style,"height",G),y.setStyle(N.style,"display","inline-block"),N.setAttribute("role","button"),N.setAttribute("tabindex","-1"),_=I.getFoldWidgetRange(r),_?N.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[_.start.row+1,_.end.row+1])):e?N.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[e.start.row+1,e.end.row+1])):N.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[r+1])),S?(N.setAttribute("aria-expanded","false"),N.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(N.setAttribute("aria-expanded","true"),N.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else N&&(y.setStyle(N.style,"display","none"),N.setAttribute("tabindex","0"),N.removeAttribute("role"),N.removeAttribute("aria-label"));if(te&&this.$showFoldedAnnotations){switch(M.className="ace_gutter_annotation",R.className=Y,R.className+=K,y.setStyle(R.style,"height",G),y.setStyle(M.style,"display","block"),y.setStyle(M.style,"height",G),K){case" ace_error_fold":p=n("gutter.annotation.aria-label.error","Read annotations row $0",[Q]);break;case" ace_warning_fold":p=n("gutter.annotation.aria-label.warning","Read annotations row $0",[Q])}M.setAttribute("aria-label",p),M.setAttribute("tabindex","-1"),M.setAttribute("role","button")}else if(this.$annotations[r]){switch(M.className="ace_gutter_annotation",R.className=Y,this.$useSvgGutterIcons?R.className+=this.$annotations[r].className:g.classList.add(this.$annotations[r].className.replace(" ","")),y.setStyle(R.style,"height",G),y.setStyle(M.style,"display","block"),y.setStyle(M.style,"height",G),this.$annotations[r].className){case" ace_error":p=n("gutter.annotation.aria-label.error","Read annotations row $0",[Q]);break;case" ace_warning":p=n("gutter.annotation.aria-label.warning","Read annotations row $0",[Q]);break;case" ace_info":p=n("gutter.annotation.aria-label.info","Read annotations row $0",[Q])}M.setAttribute("aria-label",p),M.setAttribute("tabindex","-1"),M.setAttribute("role","button")}else y.setStyle(M.style,"display","none"),M.removeAttribute("aria-label"),M.removeAttribute("role"),M.setAttribute("tabindex","0");return Q!==A.data&&(A.data=Q),g.className!=P&&(g.className=P),y.setStyle(a.element.style,"height",this.$lines.computeLineHeight(r,t,I)+"px"),y.setStyle(a.element.style,"top",this.$lines.computeLineTop(r,t,I)+"px"),a.text=Q,M.style.display==="none"&&N.style.display==="none"?a.element.setAttribute("aria-hidden",!0):a.element.setAttribute("aria-hidden",!1),a},i.prototype.setHighlightGutterLine=function(a){this.$highlightGutterLine=a},i.prototype.setShowLineNumbers=function(a){this.$renderer=!a&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(a){a?y.addCssClass(this.element,"ace_folding-enabled"):y.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$computePadding=function(){var a;return this.element.firstChild?(a=y.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(a.borderLeftWidth)||0)+(parseInt(a.paddingLeft)||0)+1,this.$padding.right=(parseInt(a.borderRightWidth)||0)+(parseInt(a.paddingRight)||0),this.$padding):{left:0,right:0}},i.prototype.getRegion=function(a){var t=this.$padding||this.$computePadding(),e=this.element.getBoundingClientRect();return a.x<t.left+e.left?"markers":this.$showFoldWidgets&&a.x>e.right-t.right?"foldWidgets":void 0},i);function i(a){this.element=y.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}function s(a){var t=document.createTextNode(""),t=(a.appendChild(t),y.createElement("span")),t=(a.appendChild(t),y.createElement("span")),e=(a.appendChild(t),y.createElement("span"));return t.appendChild(e),a}o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,f.implement(o.prototype,c),C.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(d,C,$){var y=d("../range").Range,f=d("../lib/dom"),d=(c.prototype.setPadding=function(h){this.$padding=h},c.prototype.setSession=function(h){this.session=h},c.prototype.setMarkers=function(h){this.markers=h},c.prototype.elt=function(h,n){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=n,o.className=h},c.prototype.update=function(h){if(h){var n,o;for(o in this.config=h,this.i=0,this.markers){var i,s,a,t=this.markers[o];t.range?(a=t.range.clipRows(h.firstRow,h.lastRow)).isEmpty()||(a=a.toScreenRange(this.session),t.renderer?(i=this.$getTop(a.start.row,h),s=this.$padding+a.start.column*h.characterWidth,t.renderer(n,a,s,i,h)):t.type=="fullLine"?this.drawFullLineMarker(n,a,t.clazz,h):t.type=="screenLine"?this.drawScreenLineMarker(n,a,t.clazz,h):a.isMultiLine()?t.type=="text"?this.drawTextMarker(n,a,t.clazz,h):this.drawMultiLineMarker(n,a,t.clazz,h):this.drawSingleLineMarker(n,a,t.clazz+" ace_start ace_br15",h)):t.update(n,this,this.session,h)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(h,n){return(h-n.firstRowScreen)*n.lineHeight},c.prototype.drawTextMarker=function(h,n,o,i,s){for(var a,t=this.session,e=n.start.row,r=n.end.row,l=e,p=0,g=t.getScreenLastRowColumn(l),I=new y(l,n.start.column,l,p);l<=r;l++)I.start.row=I.end.row=l,I.start.column=l==e?n.start.column:t.getRowWrapIndent(l),I.end.column=g,a=p,p=g,g=l+1<r?t.getScreenLastRowColumn(l+1):l==r?0:n.end.column,this.drawSingleLineMarker(h,I,o+(l==e?" ace_start":"")+" ace_br"+((l==e||l==e+1&&n.start.column?1:0)|(a<p?2:0)|(g<p?4:0)|(l==r?8:0)),i,l==r?0:1,s)},c.prototype.drawMultiLineMarker=function(h,n,o,i,s){var a,t=this.$padding,e=i.lineHeight,r=this.$getTop(n.start.row,i),l=t+n.start.column*i.characterWidth;s=s||"",this.session.$bidiHandler.isBidiRow(n.start.row)?((a=n.clone()).end.row=a.start.row,a.end.column=this.session.getLine(a.start.row).length,this.drawBidiSingleLineMarker(h,a,o+" ace_br1 ace_start",i,null,s)):this.elt(o+" ace_br1 ace_start","height:"+e+"px;right:0;top:"+r+"px;left:"+l+"px;"+(s||"")),this.session.$bidiHandler.isBidiRow(n.end.row)?((a=n.clone()).start.row=a.end.row,a.start.column=0,this.drawBidiSingleLineMarker(h,a,o+" ace_br12",i,null,s)):(r=this.$getTop(n.end.row,i),l=n.end.column*i.characterWidth,this.elt(o+" ace_br12","height:"+e+"px;width:"+l+"px;top:"+r+"px;left:"+t+"px;"+(s||""))),(e=(n.end.row-n.start.row-1)*i.lineHeight)<=0||(r=this.$getTop(n.start.row+1,i),h=(n.start.column?1:0)|(n.end.column?0:8),this.elt(o+(h?" ace_br"+h:""),"height:"+e+"px;right:0;top:"+r+"px;left:"+t+"px;"+(s||"")))},c.prototype.drawSingleLineMarker=function(t,l,o,i,e,a){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(t,l,o,i,e,a);var t=i.lineHeight,e=(l.end.column+(e||0)-l.start.column)*i.characterWidth,r=this.$getTop(l.start.row,i),l=this.$padding+l.start.column*i.characterWidth;this.elt(o,"height:"+t+"px;width:"+e+"px;top:"+r+"px;left:"+l+"px;"+(a||""))},c.prototype.drawBidiSingleLineMarker=function(h,n,o,i,s,a){var t=i.lineHeight,e=this.$getTop(n.start.row,i),r=this.$padding;this.session.$bidiHandler.getSelections(n.start.column,n.end.column).forEach(function(l){this.elt(o,"height:"+t+"px;width:"+(l.width+(s||0))+"px;top:"+e+"px;left:"+(r+l.left)+"px;"+(a||""))},this)},c.prototype.drawFullLineMarker=function(h,n,o,i,s){var a=this.$getTop(n.start.row,i),t=i.lineHeight;n.start.row!=n.end.row&&(t+=this.$getTop(n.end.row,i)-a),this.elt(o,"height:"+t+"px;top:"+a+"px;left:0;right:0;"+(s||""))},c.prototype.drawScreenLineMarker=function(h,n,o,i,s){n=this.$getTop(n.start.row,i),i=i.lineHeight,this.elt(o,"height:"+i+"px;top:"+n+"px;left:0;right:0;"+(s||""))},c);function c(h){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",h.appendChild(this.element)}d.prototype.$padding=0,C.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(b,C,$){var y=new Set(["text","rparen","lparen"]);C.isTextToken=function(f){return y.has(f)}}),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(i,C,$){var y=i("../lib/oop"),f=i("../lib/dom"),d=i("../lib/lang"),c=i("./lines").Lines,h=i("../lib/event_emitter").EventEmitter,n=i("../config").nls,o=i("./text_util").isTextToken,i=(s.prototype.$updateEolChar=function(){var a=this.session.doc,a=a.getNewLineCharacter()==`
`&&a.getNewLineMode()!="windows"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},s.prototype.setPadding=function(a){this.$padding=a,this.element.style.margin="0 "+a+"px"},s.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},s.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},s.prototype.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},s.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},s.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},s.prototype.setSession=function(a){(this.session=a)&&this.$computeTabString()},s.prototype.setShowInvisibles=function(a){return this.showInvisibles!=a&&(typeof(this.showInvisibles=a)=="string"?(this.showSpaces=/tab/i.test(a),this.showTabs=/space/i.test(a),this.showEOL=/eol/i.test(a)):this.showSpaces=this.showTabs=this.showEOL=a,this.$computeTabString(),!0)},s.prototype.setDisplayIndentGuides=function(a){return this.displayIndentGuides!=a&&(this.displayIndentGuides=a,this.$computeTabString(),!0)},s.prototype.setHighlightIndentGuides=function(a){return this.$highlightIndentGuides!==a&&(this.$highlightIndentGuides=a)},s.prototype.$computeTabString=function(){for(var a,t,e,r,l,p,g=this.session.getTabSize(),I=(this.tabSize=g,this.$tabStrings=[0]),A=1;A<g+1;A++)this.showTabs?((p=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",p.textContent=d.stringRepeat(this.TAB_CHAR,A),I.push(p)):I.push(this.dom.createTextNode(d.stringRepeat(" ",A),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,a="ace_indent-guide",t=this.showSpaces?" ace_invisible ace_invisible_space":"",e=this.showSpaces?d.stringRepeat(this.SPACE_CHAR,this.tabSize):d.stringRepeat(" ",this.tabSize),r=this.showTabs?" ace_invisible ace_invisible_tab":"",l=this.showTabs?d.stringRepeat(this.TAB_CHAR,this.tabSize):e,(p=this.dom.createElement("span")).className=a+t,p.textContent=e,this.$tabStrings[" "]=p,(p=this.dom.createElement("span")).className=a+r,p.textContent=l,this.$tabStrings["	"]=p)},s.prototype.updateLines=function(a,t,e){if(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)return this.update(a);this.config=a;for(var r=Math.max(t,a.firstRow),l=Math.min(e,a.lastRow),p=this.element.childNodes,g=0,I=a.firstRow;I<r;I++){if(A=this.session.getFoldLine(I)){if(A.containsRow(r)){r=A.start.row;break}I=A.end.row}g++}for(var A,N=!1,I=r,M=(A=this.session.getNextFoldLine(I))?A.start.row:1/0;M<I&&(I=A.end.row+1,M=(A=this.session.getNextFoldLine(I,A))?A.start.row:1/0),!(l<I);){var R,S=p[g++];S&&(this.dom.removeChildren(S),this.$renderLine(S,I,I==M&&A),N&&(S.style.top=this.$lines.computeLineTop(I,a,this.session)+"px"),R=a.lineHeight*this.session.getRowLength(I)+"px",S.style.height!=R)&&(N=!0,S.style.height=R),I++}if(N)for(;g<this.$lines.cells.length;){var _=this.$lines.cells[g++];_.element.style.top=this.$lines.computeLineTop(_.row,a,this.session)+"px"}},s.prototype.scrollLines=function(a){var t=this.config;if(this.config=a,this.$lines.pageChanged(t,a))return this.update(a);this.$lines.moveContainer(a);var e=a.lastRow,r=t?t.lastRow:-1;if(!t||r<a.firstRow)return this.update(a);if(e<t.firstRow)return this.update(a);if(!t||t.lastRow<a.firstRow)return this.update(a);if(a.lastRow<t.firstRow)return this.update(a);if(t.firstRow<a.firstRow)for(var l=this.session.getFoldedRowCount(t.firstRow,a.firstRow-1);0<l;l--)this.$lines.shift();if(t.lastRow>a.lastRow)for(l=this.session.getFoldedRowCount(a.lastRow+1,t.lastRow);0<l;l--)this.$lines.pop();a.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(a,a.firstRow,t.firstRow-1)),a.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(a,t.lastRow+1,a.lastRow)),this.$highlightIndentGuide()},s.prototype.$renderLinesFragment=function(a,t,e){for(var r=[],l=t,p=this.session.getNextFoldLine(l),g=p?p.start.row:1/0;g<l&&(l=p.end.row+1,g=(p=this.session.getNextFoldLine(l,p))?p.start.row:1/0),!(e<l);){var I=this.$lines.createCell(l,a,this.session),A=I.element;this.dom.removeChildren(A),f.setStyle(A.style,"height",this.$lines.computeLineHeight(l,a,this.session)+"px"),f.setStyle(A.style,"top",this.$lines.computeLineTop(l,a,this.session)+"px"),this.$renderLine(A,l,l==g&&p),this.$useLineGroups()?A.className="ace_line_group":A.className="ace_line",r.push(I),l++}return r},s.prototype.update=function(a){this.$lines.moveContainer(a);for(var t=(this.config=a).firstRow,e=a.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(a,t,e))},s.prototype.$renderToken=function(a,t,e,r){for(var l,p,g=this,I=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,A=this.dom.createFragment(this.element),N=0;l=I.exec(r);){var M,R,S=l[1],_=l[2],u=l[3],E=l[4],v=l[5];!g.showSpaces&&_||(M=N!=l.index?r.slice(N,l.index):"",N=l.index+l[0].length,M&&A.appendChild(this.dom.createTextNode(M,this.element)),S?(M=g.session.getScreenTabSize(t+l.index),A.appendChild(g.$tabStrings[M].cloneNode(!0)),t+=M-1):_?g.showSpaces?((R=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",R.textContent=d.stringRepeat(g.SPACE_CHAR,_.length),A.appendChild(R)):A.appendChild(this.dom.createTextNode(_,this.element)):u?((R=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",R.textContent=d.stringRepeat(g.SPACE_CHAR,u.length),A.appendChild(R)):E?(t+=1,(R=this.dom.createElement("span")).style.width=2*g.config.characterWidth+"px",R.className=g.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",R.textContent=g.showSpaces?g.SPACE_CHAR:E,A.appendChild(R)):v&&(t+=1,(R=this.dom.createElement("span")).style.width=2*g.config.characterWidth+"px",R.className="ace_cjk",R.textContent=v,A.appendChild(R)))}return A.appendChild(this.dom.createTextNode(N?r.slice(N):r,this.element)),o(e.type)?a.appendChild(A):(p="ace_"+e.type.replace(/\./g," ace_"),R=this.dom.createElement("span"),e.type=="fold"&&(R.style.width=e.value.length*this.config.characterWidth+"px",R.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),R.className=p,R.appendChild(A),a.appendChild(R)),t+r.length},s.prototype.renderIndentGuide=function(a,t,e){var r=t.search(this.$indentGuideRe);if(!(r<=0||e<=r)){if(t[0]==" "){for(var l=(r-=r%this.tabSize)/this.tabSize,p=0;p<l;p++)a.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if(t[0]=="	"){for(p=0;p<r;p++)a.appendChild(this.$tabStrings["	"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}this.$highlightIndentGuide()}return t},s.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var a=this.session.doc.$lines;if(a){var t=this.session.selection.getCursor(),e=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(e/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight){for(var l=this.session.$bracketHighlight.ranges,p=0;p<l.length;p++)if(t.row!==l[p].start.row){this.$highlightIndentGuideMarker.end=l[p].start.row,t.row>l[p].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&a[t.row]!==""&&t.column===a[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,p=t.row+1;p<a.length;p++){var g=a[p],I=/^\s*/.exec(g)[0].length;if(g!==""&&(this.$highlightIndentGuideMarker.end=p,I<=e))break}this.$renderHighlightIndentGuide()}}},s.prototype.$clearActiveIndentGuide=function(){for(var a=this.$lines.cells,t=0;t<a.length;t++){var e=a[t].element.childNodes;if(0<e.length){for(var r=0;r<e.length;r++)if(e[r].classList&&e[r].classList.contains("ace_indent-guide-active")){e[r].classList.remove("ace_indent-guide-active");break}}}},s.prototype.$setIndentGuideActive=function(a,t){this.session.doc.getLine(a.row)!==""&&(a=a.element.childNodes)&&(a=a[t-1])&&a.classList&&a.classList.contains("ace_indent-guide")&&a.classList.add("ace_indent-guide-active")},s.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var a=this.$lines.cells,t=(this.$clearActiveIndentGuide(),this.$highlightIndentGuideMarker.indentLevel);if(t!==0){if(this.$highlightIndentGuideMarker.dir===1)for(var e=0;e<a.length;e++){var r=a[e];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(e=a.length-1;0<=e;e--)if(r=a[e],this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}}},s.prototype.$createLineElement=function(a){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},s.prototype.$renderWrappedLine=function(a,t,e){var r=0,l=0,p=e[0],g=0,I=this.$createLineElement();a.appendChild(I);for(var A=0;A<t.length;A++){var N=t[A],M=N.value;if(A==0&&this.displayIndentGuides){if(r=M.length,!(M=this.renderIndentGuide(I,M,p)))continue;r-=M.length}if(r+M.length<p)g=this.$renderToken(I,g,N,M),r+=M.length;else{for(;r+M.length>=p;)g=this.$renderToken(I,g,N,M.substring(0,p-r)),M=M.substring(p-r),r=p,I=this.$createLineElement(),a.appendChild(I),I.appendChild(this.dom.createTextNode(d.stringRepeat(" ",e.indent),this.element)),g=0,p=e[++l]||Number.MAX_VALUE;M.length!=0&&(r+=M.length,g=this.$renderToken(I,g,N,M))}}e[e.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(I,g,null,"",!0)},s.prototype.$renderSimpleLine=function(a,t){for(var e=0,r=0;r<t.length;r++){var l=t[r],p=l.value;if(r!=0||!this.displayIndentGuides||(p=this.renderIndentGuide(a,p))){if(e+p.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(a,e,l,p);e=this.$renderToken(a,e,l,p)}}},s.prototype.$renderOverflowMessage=function(a,t,e,r,l){e&&this.$renderToken(a,t,e,r.slice(0,this.MAX_LINE_LENGTH-t)),e=this.dom.createElement("span"),e.className="ace_inline_button ace_keyword ace_toggle_wrap",e.textContent=l?"<hide>":"<click to see more...>",a.appendChild(e)},s.prototype.$renderLine=function(a,t,e){var r,l,p=a;(r=(e=e||e==0?e:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,e):this.session.getTokens(t)).length?(l=this.session.getRowSplitData(t))&&l.length?(this.$renderWrappedLine(a,r,l),p=a.lastChild):(p=a,this.$useLineGroups()&&(p=this.$createLineElement(),a.appendChild(p)),this.$renderSimpleLine(p,r)):this.$useLineGroups()&&(p=this.$createLineElement(),a.appendChild(p)),this.showEOL&&p&&(e&&(t=e.end.row),(l=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",l.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,p.appendChild(l))},s.prototype.$getFoldLineTokens=function(a,t){var e=this.session,r=[],l=e.getTokens(a);return t.walk(function(p,g,I,A,N){if(p!=null)r.push({type:"fold",value:p});else if((l=N?e.getTokens(g):l).length){for(var M,R=l,S=A,_=I,u=0,E=0;E+R[u].value.length<S;)if(E+=R[u].value.length,++u==R.length)return;for(E!=S&&((M=R[u].value.substring(S-E)).length>_-S&&(M=M.substring(0,_-S)),r.push({type:R[u].type,value:M}),E=S+M.length,u+=1);E<_&&u<R.length;)(M=R[u].value).length+E>_?r.push({type:R[u].type,value:M.substring(0,_-E)}):r.push(R[u]),E+=M.length,u+=1}},t.end.row,this.session.getLine(t.end.row).length),r},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s);function s(a){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}i.prototype.EOF_CHAR="¶",i.prototype.EOL_CHAR_LF="¬",i.prototype.EOL_CHAR_CRLF="¤",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="—",i.prototype.SPACE_CHAR="·",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,y.implement(i.prototype,h),C.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(f,C,$){var y=f("../lib/dom"),f=(d.prototype.$updateOpacity=function(c){for(var h=this.cursors,n=h.length;n--;)y.setStyle(h[n].style,"opacity",c?"":"0")},d.prototype.$startCssAnimation=function(){for(var c=this.cursors,h=c.length;h--;)c[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&y.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,y.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(c){this.$padding=c},d.prototype.setSession=function(c){this.session=c},d.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},d.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},d.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,y.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var c=y.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},d.prototype.removeCursor=function(){var c;if(1<this.cursors.length)return(c=this.cursors.pop()).parentNode.removeChild(c),c},d.prototype.hideCursor=function(){this.isVisible=!1,y.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,y.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var c,h=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,y.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&y.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),y.HAS_CSS_ANIMATION?this.$startCssAnimation():(c=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this),this.intervalId=setInterval(function(){h(!0),c()},this.blinkInterval),c())):this.$stopCssAnimation()},d.prototype.getPixelPosition=function(c,h){if(!this.config||!this.session)return{left:0,top:0};c=c||this.session.selection.getCursor();var n=this.session.documentToScreenPosition(c);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,c.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight}},d.prototype.isCursorInView=function(c,h){return 0<=c.top&&c.top<h.maxHeight},d.prototype.update=function(c){this.config=c;for(var h=this.session.$selectionMarkers,o=0,n=0,o=0,i=(h=h!==void 0&&h.length!==0?h:[{cursor:null}]).length;o<i;o++){var s,a,t=this.getPixelPosition(h[o].cursor,!0);(t.top>c.height+c.offset||t.top<0)&&1<o||(a=(s=this.cursors[n++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,t,c,h[o],this.session):this.isCursorInView(t,c)?(y.setStyle(a,"display","block"),y.translate(s,t.left,t.top),y.setStyle(a,"width",Math.round(c.characterWidth)+"px"),y.setStyle(a,"height",c.lineHeight+"px")):y.setStyle(a,"display","none"))}for(;this.cursors.length>n;)this.removeCursor();var e=this.session.getOverwrite();this.$setOverwrite(e),this.$pixelPos=t,this.restartTimer()},d.prototype.$setOverwrite=function(c){c!=this.overwrite&&((this.overwrite=c)?y.addCssClass(this.element,"ace_overwrite-cursors"):y.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d);function d(c){this.element=y.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),y.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}f.prototype.$padding=0,f.prototype.drawCursor=null,C.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,C,$){var y,f=this&&this.__extends||(y=function(r,l){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(p,g){p.__proto__=g}:function(p,g){for(var I in g)Object.prototype.hasOwnProperty.call(g,I)&&(p[I]=g[I])}))(r,l)},function(r,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function p(){this.constructor=r}y(r,l),r.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)}),i=t("./lib/oop"),d=t("./lib/dom"),c=t("./lib/event"),t=t("./lib/event_emitter").EventEmitter,h=(n.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},n);function n(r,l){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+l,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}i.implement(h.prototype,t),f(s,o=h),s.prototype.onScroll=function(){var r;this.skipEvent||(this.scrollTop=this.element.scrollTop,this.coeff!=1&&(r=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-r)/(this.coeff-r)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(r){this.element.style.height=r+"px"},s.prototype.setScrollHeight=function(r){32768<(this.scrollHeight=r)?(this.coeff=32768/r,r=32768):this.coeff!=1&&(this.coeff=1),this.inner.style.height=r+"px"},s.prototype.setScrollTop=function(r){this.scrollTop!=r&&(this.skipEvent=!0,this.scrollTop=r,this.element.scrollTop=r*this.coeff)};var o,i=s;function s(r,l){var p=o.call(this,r,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,l.$scrollbarWidth=p.width=d.scrollbarWidth(r.ownerDocument),p.inner.style.width=p.element.style.width=(p.width||15)+5+"px",p.$minWidth=0,p}i.prototype.setInnerHeight=i.prototype.setScrollHeight,f(e,a=h),e.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.setWidth=function(r){this.element.style.width=r+"px"},e.prototype.setInnerWidth=function(r){this.inner.style.width=r+"px"},e.prototype.setScrollWidth=function(r){this.inner.style.width=r+"px"},e.prototype.setScrollLeft=function(r){this.scrollLeft!=r&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=r)};var a,t=e;function e(r,l){return r=a.call(this,r,"-h")||this,r.scrollLeft=0,r.height=l.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}C.ScrollBar=i,C.ScrollBarV=i,C.ScrollBarH=t,C.VScrollBar=i,C.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,C,$){var y,f=this&&this.__extends||(y=function(r,l){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(p,g){p.__proto__=g}:function(p,g){for(var I in g)Object.prototype.hasOwnProperty.call(g,I)&&(p[I]=g[I])}))(r,l)},function(r,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function p(){this.constructor=r}y(r,l),r.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)}),i=t("./lib/oop"),d=t("./lib/dom"),c=t("./lib/event"),t=t("./lib/event_emitter").EventEmitter,h=(d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
  position: absolute;
  background: rgba(128, 128, 128, 0.6);
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 2px;
  z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
  position: absolute;
  z-index: 6;
  background: none;
  overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
  z-index: 6;
  right: 0;
  top: 0;
  width: 12px;
}
.ace_editor>.ace_sb-v div {
  z-index: 8;
  right: 0;
  width: 100%;
}
.ace_editor>.ace_sb-h {
  bottom: 0;
  left: 0;
  height: 12px;
}
.ace_editor>.ace_sb-h div {
  bottom: 0;
  height: 100%;
}
.ace_editor>.ace_sb_grabbed {
  z-index: 8;
  background: #000;
}`,"ace_scrollbar.css",!1),n.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},n);function n(r,l){this.element=d.createElement("div"),this.element.className="ace_sb"+l,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}i.implement(h.prototype,t),f(s,o=h),s.prototype.onMouseDown=function(r,l){var p,g,I,A,N;if(r==="mousedown"&&c.getButton(l)===0&&l.detail!==2)return l.target===this.inner?(p=this,g=l.clientY,I=l.clientY,A=this.thumbTop,c.capture(this.inner,function(M){g=M.clientY},function(){clearInterval(N)}),N=setInterval(function(){var M;g!==void 0&&(M=p.scrollTopFromThumbTop(A+g-I))!==p.scrollTop&&p._emit("scroll",{data:M})},20)):(r=l.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2,this._emit("scroll",{data:this.scrollTopFromThumbTop(r)})),c.preventDefault(l)},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(r){return r=r*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight),(r>>=0)<0?r=0:r>this.pageHeight-this.viewHeight&&(r=this.pageHeight-this.viewHeight),r},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(r){this.height=Math.max(0,r),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(r,l){(this.pageHeight!==r||l)&&(this.pageHeight=r,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}))},s.prototype.setScrollTop=function(r){this.scrollTop=r,this.thumbTop=(r=r<0?0:r)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"};var o,i=s;function s(r,l){var p=o.call(this,r,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,p.parent=r,p.width=p.VScrollWidth,p.renderer=l,p.inner.style.width=p.element.style.width=(p.width||15)+"px",p.$minWidth=0,p}i.prototype.setInnerHeight=i.prototype.setScrollHeight,f(e,a=h),e.prototype.onMouseDown=function(r,l){var p,g,I,A,N;if(r==="mousedown"&&c.getButton(l)===0&&l.detail!==2)return l.target===this.inner?(p=this,g=l.clientX,I=l.clientX,A=this.thumbLeft,c.capture(this.inner,function(M){g=M.clientX},function(){clearInterval(N)}),N=setInterval(function(){var M;g!==void 0&&(M=p.scrollLeftFromThumbLeft(A+g-I))!==p.scrollLeft&&p._emit("scroll",{data:M})},20)):(r=l.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2,this._emit("scroll",{data:this.scrollLeftFromThumbLeft(r)})),c.preventDefault(l)},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(r){return r=r*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth),(r>>=0)<0?r=0:r>this.pageWidth-this.viewWidth&&(r=this.pageWidth-this.viewWidth),r},e.prototype.setWidth=function(r){this.width=Math.max(0,r),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(r,l){(this.pageWidth!==r||l)&&(this.pageWidth=r,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}))},e.prototype.setScrollLeft=function(r){this.scrollLeft=r,this.thumbLeft=(r=r<0?0:r)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"};var a,t=e;function e(r,l){return r=a.call(this,r,"-h")||this,r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=l,r}t.prototype.setInnerWidth=t.prototype.setScrollWidth,C.ScrollBar=i,C.ScrollBarV=i,C.ScrollBarH=t,C.VScrollBar=i,C.HScrollBar=t}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(b,C,$){var y=b("./lib/event");function f(d,c){this.onRender=d,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var h=this;this._flush=function(n){h.pending=!1;var o=h.changes;o&&(y.blockIdle(100),h.changes=0,h.onRender(o)),h.changes?h.$recursionLimit--<0||h.schedule():h.$recursionLimit=2}}f.prototype.schedule=function(d){this.changes=this.changes|d,this.changes&&!this.pending&&(y.nextFrame(this._flush),this.pending=!0)},f.prototype.clear=function(d){var c=this.changes;return this.changes=0,c},C.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,C,$){var y=n("../lib/oop"),f=n("../lib/dom"),d=n("../lib/lang"),c=n("../lib/event"),h=n("../lib/useragent"),n=n("../lib/event_emitter").EventEmitter,o=typeof ResizeObserver=="function",i=(s.prototype.$setMeasureNodeStyles=function(a,t){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",h.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=t?"hidden":"visible"},s.prototype.checkForSizeChanges=function(a){var t;!(a=a===void 0?this.$measureSizes():a)||this.$characterSize.width===a.width&&this.$characterSize.height===a.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===a.width&&t.height===a.height,this._emit("changeCharacterSize",{data:a}))},s.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(t){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){var a;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(a=this).$pollSizeChangesTimer=c.onIdle(function t(){a.checkForSizeChanges(),c.onIdle(t,500)},500)},s.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(a){return a={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/512},a.width===0||a.height===0?null:a},s.prototype.$measureCharWidth=function(a){return this.$main.textContent=d.stringRepeat(a,512),this.$main.getBoundingClientRect().width/512},s.prototype.getCharacterWidth=function(a){var t=this.charSizes[a];return t=t===void 0?this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width:t},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(a){return a&&a.parentElement?(window.getComputedStyle(a).zoom||1)*this.$getZoom(a.parentElement):1},s.prototype.$initTransformMeasureNodes=function(){function a(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]}this.els=f.buildDom([a(0,0),a(200,0),a(0,200),a(200,200)],this.el)},s.prototype.transformCoordinates=function(a,t){function e(S,_,u){var E=S[1]*_[0]-S[0]*_[1];return[(-_[1]*u[0]+_[0]*u[1])/E,(+S[1]*u[0]-S[0]*u[1])/E]}function r(S,_){return[S[0]-_[0],S[1]-_[1]]}function l(S,_){return[S[0]+_[0],S[1]+_[1]]}function p(S,_){return[S*_[0],S*_[1]]}function g(S){return S=S.getBoundingClientRect(),[S.left,S.top]}a=a&&p(1/this.$getZoom(this.el),a),this.els||this.$initTransformMeasureNodes();var I,A=g(this.els[0]),M=g(this.els[1]),R=g(this.els[2]),N=g(this.els[3]),N=e(r(N,M),r(N,R),r(l(M,R),l(N,A))),M=p(1+N[0],r(M,A)),R=p(1+N[1],r(R,A));return t?(I=N[0]*t[0]/200+N[1]*t[1]/200+1,t=l(p(t[0],M),p(t[1],R)),l(p(1/I/200,t),A)):(I=r(a,A),t=e(r(M,p(N[0],I)),r(R,p(N[1],I)),I),p(200,t))},s);function s(a){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",512),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}i.prototype.$characterSize={width:0,height:0},y.implement(i.prototype,n),C.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(b,C,$){$.exports=`
.ace_br1 {border-top-left-radius    : 3px;}
.ace_br2 {border-top-right-radius   : 3px;}
.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}
.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}
.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}


.ace_editor {
    position: relative;
    overflow: hidden;
    padding: 0;
    font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
    direction: ltr;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.ace_scroller {
    position: absolute;
    overflow: hidden;
    top: 0;
    bottom: 0;
    background-color: inherit;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: text;
}

.ace_content {
    position: absolute;
    box-sizing: border-box;
    min-width: 100%;
    contain: style size layout;
    font-variant-ligatures: no-common-ligatures;
}

.ace_keyboard-focus:focus {
    box-shadow: inset 0 0 0 2px #5E9ED6;
    outline: none;
}

.ace_dragging .ace_scroller:before{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: rgba(250, 250, 250, 0.01);
    z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
    background: rgba(0, 0, 0, 0.01);
}

.ace_gutter {
    position: absolute;
    overflow : hidden;
    width: auto;
    top: 0;
    bottom: 0;
    left: 0;
    cursor: default;
    z-index: 4;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    contain: style size layout;
}

.ace_gutter-active-line {
    position: absolute;
    left: 0;
    right: 0;
}

.ace_scroller.ace_scroll-left:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
    pointer-events: none;
}

.ace_gutter-cell, .ace_gutter-cell_svg-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-left: 19px;
    padding-right: 6px;
    background-repeat: no-repeat;
}

.ace_gutter-cell_svg-icons .ace_gutter_annotation {
    margin-left: -14px;
    float: left;
}

.ace_gutter-cell .ace_gutter_annotation {
    margin-left: -19px;
    float: left;
}

.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_info, .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
    background-repeat: no-repeat;
    background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}

.ace_icon_svg.ace_error {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
    background-color: crimson;
}
.ace_icon_svg.ace_warning {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: darkorange;
}
.ace_icon_svg.ace_info {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: royalblue;
}

.ace_icon_svg.ace_error_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
    background-color: crimson;
}
.ace_icon_svg.ace_warning_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
    background-color: darkorange;
}

.ace_scrollbar {
    contain: strict;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 6;
}

.ace_scrollbar-inner {
    position: absolute;
    cursor: text;
    left: 0;
    top: 0;
}

.ace_scrollbar-v{
    overflow-x: hidden;
    overflow-y: scroll;
    top: 0;
}

.ace_scrollbar-h {
    overflow-x: scroll;
    overflow-y: hidden;
    left: 0;
}

.ace_print-margin {
    position: absolute;
    height: 100%;
}

.ace_text-input {
    position: absolute;
    z-index: 0;
    width: 0.5em;
    height: 1em;
    opacity: 0;
    background: transparent;
    -moz-appearance: none;
    appearance: none;
    border: none;
    resize: none;
    outline: none;
    overflow: hidden;
    font: inherit;
    padding: 0 1px;
    margin: 0 -1px;
    contain: strict;
    -ms-user-select: text;
    -moz-user-select: text;
    -webkit-user-select: text;
    user-select: text;
    /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
    white-space: pre!important;
}
.ace_text-input.ace_composition {
    background: transparent;
    color: inherit;
    z-index: 1000;
    opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker { 
    border-bottom: 1px solid;
    position: absolute;
    border-radius: 0;
    margin-top: 1px;
}

[ace_nocontext=true] {
    transform: none!important;
    filter: none!important;
    clip-path: none!important;
    mask : none!important;
    contain: none!important;
    perspective: none!important;
    mix-blend-mode: initial!important;
    z-index: auto;
}

.ace_layer {
    z-index: 1;
    position: absolute;
    overflow: hidden;
    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
    word-wrap: normal;
    white-space: pre;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    /* setting pointer-events: auto; on node under the mouse, which changes
        during scroll, will break mouse wheel scrolling in Safari */
    pointer-events: none;
}

.ace_gutter-layer {
    position: relative;
    width: auto;
    text-align: right;
    pointer-events: auto;
    height: 1000000px;
    contain: style size layout;
}

.ace_text-layer {
    font: inherit !important;
    position: absolute;
    height: 1000000px;
    width: 1000000px;
    contain: style size layout;
}

.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
    contain: style size layout;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
    contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line, 
.ace_hidpi .ace_text-layer > .ace_line_group {
    contain: strict;
}

.ace_cjk {
    display: inline-block;
    text-align: center;
}

.ace_cursor-layer {
    z-index: 4;
}

.ace_cursor {
    z-index: 4;
    position: absolute;
    box-sizing: border-box;
    border-left: 2px solid;
    /* workaround for smooth cursor repaintng whole screen in chrome */
    transform: translatez(0);
}

.ace_multiselect .ace_cursor {
    border-left-width: 1px;
}

.ace_slim-cursors .ace_cursor {
    border-left-width: 1px;
}

.ace_overwrite-cursors .ace_cursor {
    border-left-width: 0;
    border-bottom: 1px solid;
}

.ace_hidden-cursors .ace_cursor {
    opacity: 0.2;
}

.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
    opacity: 0;
}

.ace_smooth-blinking .ace_cursor {
    transition: opacity 0.18s;
}

.ace_animate-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: step-end;
    animation-name: blink-ace-animate;
    animation-iteration-count: infinite;
}

.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: ease-in-out;
    animation-name: blink-ace-animate-smooth;
}
    
@keyframes blink-ace-animate {
    from, to { opacity: 1; }
    60% { opacity: 0; }
}

@keyframes blink-ace-animate-smooth {
    from, to { opacity: 1; }
    45% { opacity: 1; }
    60% { opacity: 0; }
    85% { opacity: 0; }
}

.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
    position: absolute;
    z-index: 3;
}

.ace_marker-layer .ace_selection {
    position: absolute;
    z-index: 5;
}

.ace_marker-layer .ace_bracket {
    position: absolute;
    z-index: 6;
}

.ace_marker-layer .ace_error_bracket {
    position: absolute;
    border-bottom: 1px solid #DE5555;
    border-radius: 0;
}

.ace_marker-layer .ace_active-line {
    position: absolute;
    z-index: 2;
}

.ace_marker-layer .ace_selected-word {
    position: absolute;
    z-index: 4;
    box-sizing: border-box;
}

.ace_line .ace_fold {
    box-sizing: border-box;

    display: inline-block;
    height: 11px;
    margin-top: -2px;
    vertical-align: middle;

    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
    background-repeat: no-repeat, repeat-x;
    background-position: center center, top left;
    color: transparent;

    border: 1px solid black;
    border-radius: 2px;

    cursor: pointer;
    pointer-events: auto;
}

.ace_dark .ace_fold {
}

.ace_fold:hover{
    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}

.ace_tooltip {
    background-color: #f5f5f5;
    border: 1px solid gray;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: black;
    max-width: 100%;
    padding: 3px 4px;
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    cursor: default;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: normal;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    pointer-events: none;
    overflow: auto;
    max-width: min(60em, 66vw);
    overscroll-behavior: contain;
}
.ace_tooltip pre {
    white-space: pre-wrap;
}

.ace_tooltip.ace_dark {
    background-color: #636363;
    color: #fff;
}

.ace_tooltip:focus {
    outline: 1px solid #5E9ED6;
}

.ace_icon {
    display: inline-block;
    width: 18px;
    vertical-align: top;
}

.ace_icon_svg {
    display: inline-block;
    width: 12px;
    vertical-align: top;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 12px;
    -webkit-mask-position: center;
}

.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
    padding-right: 13px;
}

.ace_fold-widget {
    box-sizing: border-box;

    margin: 0 -12px 0 1px;
    display: none;
    width: 11px;
    vertical-align: top;

    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: center;

    border-radius: 3px;
    
    border: 1px solid transparent;
    cursor: pointer;
}

.ace_folding-enabled .ace_fold-widget {
    display: inline-block;   
}

.ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}

.ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}

.ace_fold-widget:hover {
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.ace_fold-widget:active {
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
 * Dark version for fold widgets
 */
.ace_dark .ace_fold-widget {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.ace_inline_button {
    border: 1px solid lightgray;
    display: inline-block;
    margin: -1px 8px;
    padding: 0 5px;
    pointer-events: auto;
    cursor: pointer;
}
.ace_inline_button:hover {
    border-color: gray;
    background: rgba(200,200,200,0.2);
    display: inline-block;
    pointer-events: auto;
}

.ace_fold-widget.ace_invalid {
    background-color: #FFB4B4;
    border-color: #DE5555;
}

.ace_fade-fold-widgets .ace_fold-widget {
    transition: opacity 0.4s ease 0.05s;
    opacity: 0;
}

.ace_fade-fold-widgets:hover .ace_fold-widget {
    transition: opacity 0.05s ease 0.05s;
    opacity:1;
}

.ace_underline {
    text-decoration: underline;
}

.ace_bold {
    font-weight: bold;
}

.ace_nobold .ace_bold {
    font-weight: normal;
}

.ace_italic {
    font-style: italic;
}


.ace_error-marker {
    background-color: rgba(255, 0, 0,0.2);
    position: absolute;
    z-index: 9;
}

.ace_highlight-marker {
    background-color: rgba(255, 255, 0,0.2);
    position: absolute;
    z-index: 8;
}

.ace_mobile-menu {
    position: absolute;
    line-height: 1.5;
    border-radius: 4px;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    background: white;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #dcdcdc;
    color: black;
}
.ace_dark > .ace_mobile-menu {
    background: #333;
    color: #ccc;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #444;

}
.ace_mobile-button {
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
}
.ace_mobile-button:hover {
    background-color: #eee;
    opacity:1;
}
.ace_mobile-button:active {
    background-color: #ddd;
}

.ace_placeholder {
    font-family: arial;
    transform: scale(0.9);
    transform-origin: left;
    white-space: pre;
    opacity: 0.7;
    margin: 0 10px;
}

.ace_ghost_text {
    opacity: 0.5;
    font-style: italic;
}

.ace_ghost_text > div {
    white-space: pre;
}

.ghost_text_line_wrapped::after {
    content: "↩";
    position: absolute;
}

.ace_lineWidgetContainer.ace_ghost_text {
    margin: 0px 4px
}

.ace_screenreader-only {
    position:absolute;
    left:-10000px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(d,C,$){var y=d("../lib/dom"),f=d("../lib/oop"),d=d("../lib/event_emitter").EventEmitter,c=(h.prototype.$updateDecorators=function(n){var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light,i=(n&&(this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,(n.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight),this.canvas.getContext("2d")),s=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),s)for(var a={info:1,warning:2,error:3},t=(s.forEach(function(A){A.priority=a[A.type]||null}),s=s.sort(function(A,N){return A.priority<N.priority?-1:A.priority>N.priority?1:0}),this.renderer.session.$foldData),e=0;e<s.length;e++){var r,I=s[e].row,l=this.compensateFoldRows(I,t),p=Math.round((I-l)*this.lineHeight*this.heightRatio),g=Math.round((I-l)*this.lineHeight*this.heightRatio),I=Math.round(((I-l)*this.lineHeight+this.lineHeight)*this.heightRatio);I-g<this.minDecorationHeight&&((r=(g+I)/2|0)<this.halfMinDecorationHeight?r=this.halfMinDecorationHeight:r+this.halfMinDecorationHeight>this.canvasHeight&&(r=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(r-this.halfMinDecorationHeight),I=Math.round(r+this.halfMinDecorationHeight)),i.fillStyle=o[s[e].type]||null,i.fillRect(0,p,this.canvasWidth,I-g)}n=this.renderer.session.selection.getCursor(),n&&(l=this.compensateFoldRows(n.row,t),p=Math.round((n.row-l)*this.lineHeight*this.heightRatio),i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,p,this.canvasWidth,2))},h.prototype.compensateFoldRows=function(n,o){var i=0;if(o&&0<o.length)for(var s=0;s<o.length;s++)n>o[s].start.row&&n<o[s].end.row?i+=n-o[s].start.row:n>=o[s].end.row&&(i+=o[s].end.row-o[s].start.row);return i},h);function h(n,o){this.canvas=y.createElement("canvas"),this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas)}f.implement(c.prototype,d),C.Decorator=c}),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"],function(N,C,$){var y=N("./lib/oop"),f=N("./lib/dom"),d=N("./lib/lang"),c=N("./config"),h=N("./layer/gutter").Gutter,n=N("./layer/marker").Marker,o=N("./layer/text").Text,i=N("./layer/cursor").Cursor,s=N("./scrollbar").HScrollBar,a=N("./scrollbar").VScrollBar,t=N("./scrollbar_custom").HScrollBar,e=N("./scrollbar_custom").VScrollBar,r=N("./renderloop").RenderLoop,l=N("./layer/font_metrics").FontMetrics,p=N("./lib/event_emitter").EventEmitter,g=N("./css/editor-css"),I=N("./layer/decorators").Decorator,A=N("./lib/useragent"),N=(f.importCssString(g,"ace_editor.css",!1),M.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(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},M.prototype.setSession=function(R){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=R)&&this.scrollMargin.top&&R.getScrollTop()<=0&&R.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(R),this.$markerBack.setSession(R),this.$markerFront.setSession(R),this.$gutterLayer.setSession(R),this.$textLayer.setSession(R),R&&(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))},M.prototype.updateLines=function(R,S,_){if(S===void 0&&(S=1/0),this.$changedLines?(this.$changedLines.firstRow>R&&(this.$changedLines.firstRow=R),this.$changedLines.lastRow<S&&(this.$changedLines.lastRow=S)):this.$changedLines={firstRow:R,lastRow:S},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!_)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},M.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},M.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},M.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},M.prototype.updateFull=function(R){R?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},M.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},M.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},M.prototype.onResize=function(R,S,_,u){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=R?1:0;var E=this.container,E=(!(u=u||E.clientHeight||E.scrollHeight)&&this.$maxLines&&1<this.lineHeight&&(E.style.height&&E.style.height!="0px"||(E.style.height="1px",u=E.clientHeight||E.scrollHeight)),_=_||E.clientWidth||E.scrollWidth,this.$updateCachedSize(R,S,_,u));if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!u)return this.resizing=0;R&&(this.$gutterLayer.$padding=null),R?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},M.prototype.$updateCachedSize=function(R,S,_,u){u-=this.$extraHeight||0;var E=0,v=this.$size,L={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};return u&&(R||v.height!=u)&&(v.height=u,E|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",E|=this.CHANGE_SCROLL),_&&(R||v.width!=_)&&(E|=this.CHANGE_SIZE,v.width=_,S==null&&(S=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=S,f.setStyle(this.scrollBarH.element.style,"left",S+"px"),f.setStyle(this.scroller.style,"left",S+this.margin.left+"px"),v.scrollerWidth=Math.max(0,_-S-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px"),S=this.scrollBarV.getWidth()+"px",f.setStyle(this.scrollBarH.element.style,"right",S),f.setStyle(this.scroller.style,"right",S),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||R)&&(E|=this.CHANGE_FULL),v.$dirty=!_||!u,E&&this._signal("resize",L),E},M.prototype.onGutterResize=function(R){R=this.$showGutter?R:0,R!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,R,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},M.prototype.adjustWrapLimit=function(){var R=this.$size.scrollerWidth-2*this.$padding,R=Math.floor(R/this.characterWidth);return this.session.adjustWrapLimit(R,this.$showPrintMargin&&this.$printMarginColumn)},M.prototype.setAnimatedScroll=function(R){this.setOption("animatedScroll",R)},M.prototype.getAnimatedScroll=function(){return this.$animatedScroll},M.prototype.setShowInvisibles=function(R){this.setOption("showInvisibles",R),this.session.$bidiHandler.setShowInvisibles(R)},M.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},M.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},M.prototype.setDisplayIndentGuides=function(R){this.setOption("displayIndentGuides",R)},M.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},M.prototype.setHighlightIndentGuides=function(R){this.setOption("highlightIndentGuides",R)},M.prototype.setShowPrintMargin=function(R){this.setOption("showPrintMargin",R)},M.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},M.prototype.setPrintMarginColumn=function(R){this.setOption("printMarginColumn",R)},M.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},M.prototype.getShowGutter=function(){return this.getOption("showGutter")},M.prototype.setShowGutter=function(R){return this.setOption("showGutter",R)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.setFadeFoldWidgets=function(R){this.setOption("fadeFoldWidgets",R)},M.prototype.setHighlightGutterLine=function(R){this.setOption("highlightGutterLine",R)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.$updatePrintMargin=function(){var R;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((R=f.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",R.appendChild(this.$printMarginEl),this.content.insertBefore(R,this.content.firstChild)),(R=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",R.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&this.session.$wrap==-1&&this.adjustWrapLimit()},M.prototype.getContainerElement=function(){return this.container},M.prototype.getMouseEventTarget=function(){return this.scroller},M.prototype.getTextAreaContainer=function(){return this.container},M.prototype.$moveTextAreaToCursor=function(){var R,S,_,u,E,v,L;this.$isMousePressed||(R=this.textarea.style,v=this.$composition,this.$keepTextAreaAtCursor||v?(_=this.$cursorLayer.$pixelPos)&&(v&&v.markerRange&&(_=this.$cursorLayer.getPixelPosition(v.markerRange.start,!0)),L=this.layerConfig,S=_.top,_=_.left,S-=L.offset,u=v&&v.useTextareaForIME||A.isMobile?this.lineHeight:1,S<0||S>L.height-u?f.translate(this.textarea,0,0):(L=1,E=this.$size.height-u,v?v.useTextareaForIME?(v=this.textarea.value,L=this.characterWidth*this.session.$getStringScreenWidth(v)[0]):S+=this.lineHeight+2:S+=this.lineHeight,(_-=this.scrollLeft)>this.$size.scrollerWidth-L&&(_=this.$size.scrollerWidth-L),_+=this.gutterWidth+this.margin.left,f.setStyle(R,"height",u+"px"),f.setStyle(R,"width",L+"px"),f.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-L),Math.min(S,E)))):f.translate(this.textarea,-100,0))},M.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},M.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},M.prototype.getLastFullyVisibleRow=function(){var R=this.layerConfig,S=R.lastRow;return this.session.documentToScreenRow(S,0)*R.lineHeight-this.session.getScrollTop()>R.height-R.lineHeight?S-1:S},M.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},M.prototype.setPadding=function(R){this.$padding=R,this.$textLayer.setPadding(R),this.$cursorLayer.setPadding(R),this.$markerFront.setPadding(R),this.$markerBack.setPadding(R),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},M.prototype.setScrollMargin=function(R,S,_,u){var E=this.scrollMargin;E.top=0|R,E.bottom=0|S,E.right=0|u,E.left=0|_,E.v=E.top+E.bottom,E.h=E.left+E.right,E.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-E.top),this.updateFull()},M.prototype.setMargin=function(R,S,_,u){var E=this.margin;E.top=0|R,E.bottom=0|S,E.right=0|u,E.left=0|_,E.v=E.top+E.bottom,E.h=E.left+E.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},M.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},M.prototype.setHScrollBarAlwaysVisible=function(R){this.setOption("hScrollBarAlwaysVisible",R)},M.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},M.prototype.setVScrollBarAlwaysVisible=function(R){this.setOption("vScrollBarAlwaysVisible",R)},M.prototype.$updateScrollBarV=function(){var R=this.layerConfig.maxHeight,S=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(R-=(S-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>R-S)&&(R=this.scrollTop+S,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(R+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},M.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},M.prototype.freeze=function(){this.$frozen=!0},M.prototype.unfreeze=function(){this.$frozen=!1},M.prototype.$renderChanges=function(R,S){if(this.$changes&&(R|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(R||S)){if(this.$size.$dirty)return this.$changes|=R,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",R),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _,u,S=this.layerConfig;(R&this.CHANGE_FULL||R&this.CHANGE_SIZE||R&this.CHANGE_TEXT||R&this.CHANGE_LINES||R&this.CHANGE_SCROLL||R&this.CHANGE_H_SCROLL)&&(R|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen&&0<(_=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=_,R=(R|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),S=this.layerConfig,this.$updateScrollBarV(),R&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-S.offset),_=S.width+2*this.$padding+"px",u=S.minHeight+"px",f.setStyle(this.content.style,"width",_),f.setStyle(this.content.style,"height",u)),R&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility)&&(this.scroller.className+=this.keyboardFocusClassName),R&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor()):R&this.CHANGE_SCROLL?(this.$changedLines=null,R&this.CHANGE_TEXT||R&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&(R&this.CHANGE_GUTTER||R&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor()):(R&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):R&this.CHANGE_LINES?((this.$updateLines()||R&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):R&this.CHANGE_TEXT||R&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):R&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar)&&this.$scrollDecorator.$updateDecorators(S),R&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S)),this._signal("afterRender",R)}else this.$changes|=R},M.prototype.$autosize=function(){var R=this.session.getScreenLength()*this.lineHeight,S=this.$maxLines*this.lineHeight,_=Math.min(S,Math.max((this.$minLines||1)*this.lineHeight,R))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),S=!((_=this.$maxPixelHeight&&_>this.$maxPixelHeight?this.$maxPixelHeight:_)<=2*this.lineHeight)&&S<R,_==this.desiredHeight&&this.$size.height==this.desiredHeight&&S==this.$vScroll||(S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S)),R=this.container.clientWidth,this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,R,_),this.desiredHeight=_,this._signal("autosize"))},M.prototype.$computeLayerConfig=function(){var R,te=this.session,S=this.$size,Q=S.height<=2*this.lineHeight,_=this.session.getScreenLength()*this.lineHeight,u=this.$getLongestLine(),P=!Q&&(this.$hScrollBarAlwaysVisible||S.scrollerWidth-u-2*this.$padding<0),E=this.$horizScroll!==P,P=(E&&(this.$horizScroll=P,this.scrollBarH.setVisible(P)),this.$vScroll),v=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),S.scrollerHeight+this.lineHeight),L=!this.$maxLines&&this.$scrollPastEnd?(S.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,G=(_+=L,this.scrollMargin),Q=(this.session.setScrollTop(Math.max(-G.top,Math.min(this.scrollTop,_-S.scrollerHeight+G.bottom))),this.session.setScrollLeft(Math.max(-G.left,Math.min(this.scrollLeft,u+2*this.$padding-S.scrollerWidth+G.right))),!Q&&(this.$vScrollBarAlwaysVisible||S.scrollerHeight-_+L<0||this.scrollTop>G.top)),L=P!==Q,G=(L&&(this.$vScroll=Q,this.scrollBarV.setVisible(Q)),this.scrollTop%this.lineHeight),P=Math.ceil(v/this.lineHeight)-1,P=(Q=Math.max(0,Math.round((this.scrollTop-G)/this.lineHeight)))+P,Y=this.lineHeight,Q=te.screenToDocumentRow(Q,0),K=te.getFoldLine(Q),te=(K&&(Q=K.start.row),K=te.documentToScreenRow(Q,0),R=te.getRowLength(Q)*Y,P=Math.min(te.screenToDocumentRow(P,0),te.getLength()-1),v=S.scrollerHeight+te.getRowLength(P)*Y+R,G=this.scrollTop-K*Y,0);return this.layerConfig.width==u&&!E||(te=this.CHANGE_H_SCROLL),(E||L)&&(te|=this.$updateCachedSize(!0,this.gutterWidth,S.width,S.height),this._signal("scrollbarVisibilityChanged"),L)&&(u=this.$getLongestLine()),this.layerConfig={width:u,padding:this.$padding,firstRow:Q,firstRowScreen:K,lastRow:P,lineHeight:Y,characterWidth:this.characterWidth,minHeight:v,maxHeight:_,offset:G,gutterOffset:Y?Math.max(0,Math.ceil((G+S.height-S.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),te},M.prototype.$updateLines=function(){if(this.$changedLines){var R=this.$changedLines.firstRow,S=this.$changedLines.lastRow,_=(this.$changedLines=null,this.layerConfig);if(!(R>_.lastRow+1||S<_.firstRow)){if(S!==1/0)return this.$textLayer.updateLines(_,R,S),!0;this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_)}}},M.prototype.$getLongestLine=function(){var R=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(R+=1),this.$textLayer&&R>this.$textLayer.MAX_LINE_LENGTH&&(R=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(R*this.characterWidth))},M.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},M.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},M.prototype.addGutterDecoration=function(R,S){this.$gutterLayer.addGutterDecoration(R,S)},M.prototype.removeGutterDecoration=function(R,S){this.$gutterLayer.removeGutterDecoration(R,S)},M.prototype.updateBreakpoints=function(R){this._rows=R,this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.setAnnotations=function(R){this.$gutterLayer.setAnnotations(R),this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},M.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},M.prototype.showCursor=function(){this.$cursorLayer.showCursor()},M.prototype.scrollSelectionIntoView=function(R,S,_){this.scrollCursorIntoView(R,_),this.scrollCursorIntoView(S,_)},M.prototype.scrollCursorIntoView=function(R,S,_){var u,E,v;this.$size.scrollerHeight!==0&&(u=(R=this.$cursorLayer.getPixelPosition(R)).left,R=R.top,E=_&&_.top||0,_=_&&_.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),R<(v=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+E?(S&&v+E>R+this.lineHeight&&(R-=S*this.$size.scrollerHeight),R===0&&(R=-this.scrollMargin.top),this.session.setScrollTop(R)):v+this.$size.scrollerHeight-_<R+this.lineHeight&&(S&&v+this.$size.scrollerHeight-_<R-this.lineHeight&&(R+=S*this.$size.scrollerHeight),this.session.setScrollTop(R+this.lineHeight+_-this.$size.scrollerHeight)),E=this.scrollLeft,u-(v=2*this.layerConfig.characterWidth)<E?((u-=v)<this.$padding+v&&(u=-this.scrollMargin.left),this.session.setScrollLeft(u)):E+this.$size.scrollerWidth<(u+=v)+this.characterWidth?this.session.setScrollLeft(Math.round(u+this.characterWidth-this.$size.scrollerWidth)):E<=this.$padding&&u-E<this.characterWidth&&this.session.setScrollLeft(0))},M.prototype.getScrollTop=function(){return this.session.getScrollTop()},M.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},M.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},M.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},M.prototype.scrollToRow=function(R){this.session.setScrollTop(R*this.lineHeight)},M.prototype.alignCursor=function(u,S){var u=this.$cursorLayer.getPixelPosition(u=typeof u=="number"?{row:u,column:0}:u),_=this.$size.scrollerHeight-this.lineHeight,u=u.top-_*(S||0);return this.session.setScrollTop(u),u},M.prototype.$calcSteps=function(R,S){for(var _,u,L=0,E=this.STEPS,v=[],L=0;L<E;++L)v.push((_=L/this.STEPS,(S-(u=R))*(Math.pow(_-1,3)+1)+u));return v},M.prototype.scrollToLine=function(R,S,_,u){R=this.$cursorLayer.getPixelPosition({row:R,column:0}).top,S&&(R-=this.$size.scrollerHeight/2),S=this.scrollTop,this.session.setScrollTop(R),_!==!1&&this.animateScrolling(S,u)},M.prototype.animateScrolling=function(R,S){var _=this.scrollTop;if(this.$animatedScroll){var u=this;if(R!=_){if(this.$scrollAnimation){var E=this.$scrollAnimation.steps;if(E.length&&(R=E[0])==_)return}var v=u.$calcSteps(R,_);this.$scrollAnimation={from:R,to:_,steps:v},clearInterval(this.$timer),u.session.setScrollTop(v.shift()),u.session.$scrollTop=_,this.$timer=setInterval(function(){if(!u.$stopAnimation)return u.session?void(v.length?(u.session.setScrollTop(v.shift()),u.session.$scrollTop=_):_!=null?(u.session.$scrollTop=-1,u.session.setScrollTop(_),_=null):L()):clearInterval(u.$timer);L()},10)}}function L(){u.$timer=clearInterval(u.$timer),u.$scrollAnimation=null,u.$stopAnimation=!1,S&&S()}},M.prototype.scrollToY=function(R){this.scrollTop!==R&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=R)},M.prototype.scrollToX=function(R){this.scrollLeft!==R&&(this.scrollLeft=R),this.$loop.schedule(this.CHANGE_H_SCROLL)},M.prototype.scrollTo=function(R,S){this.session.setScrollTop(S),this.session.setScrollLeft(R)},M.prototype.scrollBy=function(R,S){S&&this.session.setScrollTop(this.session.getScrollTop()+S),R&&this.session.setScrollLeft(this.session.getScrollLeft()+R)},M.prototype.isScrollableBy=function(R,S){return S<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<S&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||R<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<R&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},M.prototype.pixelToScreenCoordinates=function(u,E){this.$hasCssTransforms?(v={top:0,left:0},u=(_=this.$fontMetrics.transformCoordinates([u,E]))[1]-this.gutterWidth-this.margin.left,E=_[0]):v=this.scroller.getBoundingClientRect();var _=u+this.scrollLeft-v.left-this.$padding,u=_/this.characterWidth,E=Math.floor((E+this.scrollTop-v.top)/this.lineHeight),v=this.$blockCursor?Math.floor(u):Math.round(u);return{row:E,column:v,side:0<u-v?1:-1,offsetX:_}},M.prototype.screenToTextCoordinates=function(E,v){this.$hasCssTransforms?(_={top:0,left:0},E=(u=this.$fontMetrics.transformCoordinates([E,v]))[1]-this.gutterWidth-this.margin.left,v=u[0]):_=this.scroller.getBoundingClientRect();var _,u=E+this.scrollLeft-_.left-this.$padding,E=u/this.characterWidth,E=this.$blockCursor?Math.floor(E):Math.round(E),v=Math.floor((v+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(v,Math.max(E,0),u)},M.prototype.textToScreenCoordinates=function(u,E){var _=this.scroller.getBoundingClientRect(),E=this.session.documentToScreenPosition(u,E),u=this.$padding+(this.session.$bidiHandler.isBidiRow(E.row,u)?this.session.$bidiHandler.getPosLeft(E.column):Math.round(E.column*this.characterWidth)),E=E.row*this.lineHeight;return{pageX:_.left+u-this.scrollLeft,pageY:_.top+E-this.scrollTop}},M.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},M.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},M.prototype.showComposition=function(R){(this.$composition=R).cssText||(R.cssText=this.textarea.style.cssText),R.useTextareaForIME==null&&(R.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):R.markerId=this.session.addMarker(R.markerRange,"ace_composition_marker","text")},M.prototype.setCompositionText=function(R){var S=this.session.selection.cursor;this.addToken(R,"composition_placeholder",S.row,S.column),this.$moveTextAreaToCursor()},M.prototype.hideComposition=function(){var R;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,R=this.session.selection.cursor,this.removeExtraToken(R.row,R.column),this.$composition=null,this.$cursorLayer.element.style.display="")},M.prototype.setGhostText=function(R,E){var _,u,v=this.session.selection.cursor,E=E||{row:v.row,column:v.column},v=(this.removeGhostText(),this.$calculateWrappedTextChunks(R,E));this.addToken(v[0].text,"ghost_text",E.row,E.column),this.$ghostText={text:R,position:{row:E.row,column:E.column}},1<v.length&&(R=v.slice(1).map(function(L){return"<div".concat(L.wrapped?' class="ghost_text_line_wrapped"':"",">").concat(L.text,"</div>")}),this.$ghostTextWidget={html:R.join(""),row:E.row,column:E.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget),R=this.$cursorLayer.getPixelPosition(E,!0),_=this.container.getBoundingClientRect().height,(u=v.length*this.lineHeight)<_-R.top||(u<_?this.scrollBy(0,(v.length-1)*this.lineHeight):this.scrollToRow(E.row)))},M.prototype.$calculateWrappedTextChunks=function(R,S){for(var _=this.$size.scrollerWidth-2*this.$padding,u=(u=Math.floor(_/this.characterWidth)-2)<=0?60:u,E=R.split(/\r?\n/),v=[],L=0;L<E.length;L++){var G=this.session.$getDisplayTokens(E[L],S.column),P=this.session.$computeWrapSplits(G,u,this.session.$tabSize);if(0<P.length){var Y=0;P.push(E[L].length);for(var Q=0;Q<P.length;Q++){var K=E[L].slice(Y,P[Q]);v.push({text:K,wrapped:!0}),Y=P[Q]}}else v.push({text:E[L],wrapped:!1})}return v},M.prototype.removeGhostText=function(){var R;this.$ghostText&&(R=this.$ghostText.position,this.removeExtraToken(R.row,R.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null)},M.prototype.addToken=function(R,S,_,u){var E=this.session,v=(E.bgTokenizer.lines[_]=null,{type:S,value:R}),L=E.getTokens(_);if(u!=null&&L.length)for(var G=0,P=0;P<L.length;P++){var Y=L[P];if(u<=(G+=Y.value.length)){var K=Y.value.length-(G-u),Q=Y.value.slice(0,K),K=Y.value.slice(K);L.splice(P,1,{type:Y.type,value:Q},v,{type:Y.type,value:K});break}}else L.push(v);this.updateLines(_,_)},M.prototype.removeExtraToken=function(R,S){this.session.bgTokenizer.lines[R]=null,this.updateLines(R,R)},M.prototype.setTheme=function(R,S){var _,u=this;function E(v){if(u.$themeId!=R)return S&&S();if(!v||!v.cssClass)throw new Error("couldn't load module "+R+" or it didn't call define");v.$id&&(u.$themeId=v.$id),f.importCssString(v.cssText,v.cssClass,u.container),u.theme&&f.removeCssClass(u.container,u.theme.cssClass);var L="padding"in v?v.padding:"padding"in(u.theme||{})?4:u.$padding;u.$padding&&L!=u.$padding&&u.setPadding(L),u.$theme=v.cssClass,u.theme=v,f.addCssClass(u.container,v.cssClass),f.setCssClass(u.container,"ace_dark",v.isDark),u.$size&&(u.$size.width=0,u.$updateSizeAsync()),u._dispatchEvent("themeLoaded",{theme:v}),S&&S()}this.$themeId=R,u._dispatchEvent("themeChange",{theme:R}),R&&typeof R!="string"?E(R):(_=R||this.$options.theme.initialValue,c.loadModule(["theme",_],E))},M.prototype.getTheme=function(){return this.$themeId},M.prototype.setStyle=function(R,S){f.setCssClass(this.container,R,S!==!1)},M.prototype.unsetStyle=function(R){f.removeCssClass(this.container,R)},M.prototype.setCursorStyle=function(R){f.setStyle(this.scroller.style,"cursor",R)},M.prototype.setMouseCursor=function(R){f.setStyle(this.scroller.style,"cursor",R)},M.prototype.attachToShadowRoot=function(){f.importCssString(g,"ace_editor.css",this.container)},M.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},M.prototype.$updateCustomScrollbar=function(R){var S=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,R===!0?(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(_){S.$scrollAnimation||S.session.setScrollTop(_.data-S.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(_){S.$scrollAnimation||S.session.setScrollLeft(_.data-S.scrollMargin.left)}),this.$scrollDecorator=new I(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new a(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.addEventListener("scroll",function(_){S.$scrollAnimation||S.session.setScrollTop(_.data-S.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(_){S.$scrollAnimation||S.session.setScrollLeft(_.data-S.scrollMargin.left)}))},M.prototype.$addResizeObserver=function(){var R;window.ResizeObserver&&!this.$resizeObserver&&((R=this).$resizeTimer=d.delayedCall(function(){R.destroyed||R.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(u){var _=u[0].contentRect.width,u=u[0].contentRect.height;1<Math.abs(R.$size.width-_)||1<Math.abs(R.$size.height-u)?R.$resizeTimer.delay():R.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container))},M);function M(u,S){var _=this,u=(this.container=u||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(S),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content),this.$textLayer=new o(this.content));this.canvas=u.element,this.$markerFront=new n(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new a(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.on("scroll",function(E){_.$scrollAnimation||_.session.setScrollTop(E.data-_.scrollMargin.top)}),this.scrollBarH.on("scroll",function(E){_.$scrollAnimation||_.session.setScrollLeft(E.data-_.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new l(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(E){_.updateCharacterSize(),_.onResize(!0,_.gutterWidth,_.$size.width,_.$size.height),_._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=!A.isIOS,this.$loop=new r(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}N.prototype.CHANGE_CURSOR=1,N.prototype.CHANGE_MARKER=2,N.prototype.CHANGE_GUTTER=4,N.prototype.CHANGE_SCROLL=8,N.prototype.CHANGE_LINES=16,N.prototype.CHANGE_TEXT=32,N.prototype.CHANGE_SIZE=64,N.prototype.CHANGE_MARKER_BACK=128,N.prototype.CHANGE_MARKER_FRONT=256,N.prototype.CHANGE_FULL=512,N.prototype.CHANGE_H_SCROLL=1024,N.prototype.$changes=0,N.prototype.$padding=null,N.prototype.$frozen=!1,N.prototype.STEPS=8,y.implement(N.prototype,p),c.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(R){!R&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):R&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(R){this.$textLayer.setShowInvisibles(R)&&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(R){typeof R=="number"&&(this.$printMarginColumn=R),this.$showPrintMargin=!!R,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(R){this.$gutter.style.display=R?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(R){this.$gutterLayer.$useSvgGutterIcons=R},initialValue:!1},showFoldedAnnotations:{set:function(R){this.$gutterLayer.$showFoldedAnnotations=R},initialValue:!1},fadeFoldWidgets:{set:function(R){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",R)},initialValue:!1},showFoldWidgets:{set:function(R){this.$gutterLayer.setShowFoldWidgets(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(R){this.$textLayer.setDisplayIndentGuides(R)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(R){this.$textLayer.setHighlightIndentGuides(R)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(R){this.$gutterLayer.setHighlightGutterLine(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(R){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(R){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(R){typeof R=="number"&&(R+="px"),this.container.style.fontSize=R,this.updateFontSize()},initialValue:12},fontFamily:{set:function(R){this.container.style.fontFamily=R,this.updateFontSize()}},maxLines:{set:function(R){this.updateFull()}},minLines:{set:function(R){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(R){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(R){this.$scrollPastEnd!=(R=+R||0)&&(this.$scrollPastEnd=R,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(R){this.$gutterLayer.$fixedWidth=!!R,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(R){this.$updateCustomScrollbar(R)},initialValue:!1},theme:{set:function(R){this.setTheme(R)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!A.isMobile&&!A.isIE}}),C.VirtualRenderer=N}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(b,C,$){var y=b("../lib/oop"),f=b("../lib/net"),d=b("../lib/event_emitter").EventEmitter,c=b("../config");function h(o){var i;return typeof Worker>"u"?{postMessage:function(){},terminate:function(){}}:c.get("loadWorkerFromBlob")?(i=function(s){s="importScripts('"+f.qualifyURL(s)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(s),a.getBlob("application/javascript")}}(o),i=(window.URL||window.webkitURL).createObjectURL(i),new Worker(i)):new Worker(o)}function n(o){o.postMessage||(o=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=o,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(){y.implement(this,d),this.$createWorkerFromOldConfig=function(o,i,s,a,t){var e,r;return b.nameToUrl&&!b.toUrl&&(b.toUrl=b.nameToUrl),c.get("packaged")||!b.toUrl?a=a||c.moduleUrl(i,"worker"):(e=this.$normalizePath,a=a||e(b.toUrl("ace/worker/worker.js",null,"_")),r={},o.forEach(function(l){r[l]=e(b.toUrl(l,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=h(a),t&&this.send("importScripts",t),this.$worker.postMessage({init:!0,tlns:r,module:i,classname:s}),this.$worker},this.onMessage=function(o){var i=o.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var s=this.callbacks[i.id];s&&(s(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data)}},this.reportError=function(o){window.console&&console.error&&console.error(o)},this.$normalizePath=function(o){return f.qualifyURL(o)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(o){o.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(o,i){this.$worker.postMessage({command:o,args:i})},this.call=function(o,i,s){var a;s&&(a=this.callbackId++,this.callbacks[a]=s,i.push(a)),this.send(o,i)},this.emit=function(o,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:o,data:{data:i.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(o){this.$doc&&this.terminate(),this.$doc=o,this.call("setValue",[o.getValue()]),o.on("change",this.changeListener,!0)},this.changeListener=function(o){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),o.action=="insert"?this.deltaQueue.push(o.start,o.lines):this.deltaQueue.push(o.start,o.end)},this.$sendDeltaQueue=function(){var o=this.deltaQueue;o&&(this.deltaQueue=null,50<o.length&&o.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:o}))}}).call(n.prototype),C.UIWorkerClient=function(o,i,s){var a=null,t=!1,e=Object.create(d),r=[],l=new n({messageBuffer:r,terminate:function(){},postMessage:function(g){r.push(g),a&&(t?setTimeout(p):p())}}),p=(l.setEmitSync=function(g){t=g},function(){var g=r.shift();g.command?a[g.command].apply(a,g.args):g.event&&e._signal(g.event,g.data)});return e.postMessage=function(g){l.onMessage({data:g})},e.callback=function(g,I){this.postMessage({type:"call",id:I,data:g})},e.emit=function(g,I){this.postMessage({type:"event",name:g,data:I})},c.loadModule(["worker",i],function(g){for(a=new g[s](e);r.length;)p()}),l},C.WorkerClient=n,C.createWorker=h}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(d,C,$){var y=d("./range").Range,f=d("./lib/event_emitter").EventEmitter,d=d("./lib/oop"),c=(h.prototype.setup=function(){var n=this,o=this.doc,i=this.session,s=(this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column),this.pos);s.$insertRight=!0,s.detach(),s.markerId=i.addMarker(new y(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(a){a=o.createAnchor(a.row,a.column),a.$insertRight=!0,a.detach(),n.others.push(a)}),i.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){var n,o;this.othersActive||(n=this.session,(o=this).othersActive=!0,this.others.forEach(function(i){i.markerId=n.addMarker(new y(i.row,i.column,i.row,i.column+o.length),o.othersClass,null,!1)}))},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},h.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var o=n;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var i=n.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,s=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,a=o.start.column-this.pos.column;if(this.updateAnchors(n),s&&(this.length+=i),s&&!this.session.$fromUndo){if(n.action==="insert")for(var t=this.others.length-1;0<=t;t--){var e={row:(r=this.others[t]).row,column:r.column+a};this.doc.insertMergedLines(e,n.lines)}else if(n.action==="remove")for(t=this.others.length-1;0<=t;t--){var r,e={row:(r=this.others[t]).row,column:r.column+a};this.doc.remove(new y(e.row,e.column,e.row,e.column-i))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var o=this.others.length;o--;)this.others[o].onChange(n);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var n=this,o=this.session,i=function(a,t){o.removeMarker(a.markerId),a.markerId=o.addMarker(new y(a.row,a.column,a.row,a.column+n.length),t,null,!1)};i(this.pos,this.mainClass);for(var s=this.others.length;s--;)i(this.others[s],this.othersClass)}},h.prototype.onCursorChange=function(n){var o;!this.$updating&&this.session&&((o=this.session.selection.getCursor()).row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n)))},h.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},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),o=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,i=0;i<o;i++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h);function h(n,r,i,s,a,t){var e=this,r=(this.length=r,this.session=n,this.doc=n.getDocument(),this.mainClass=a,this.othersClass=t,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=s,this.$onCursorChange=function(){setTimeout(function(){e.onCursorChange()})},this.$pos=i,n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=r.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}d.implement(c.prototype,f),C.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(b,C,$){var y=b("../lib/event"),f=b("../lib/useragent");function d(c,h){return c.row==h.row&&c.column==h.column}C.onMouseDown=function(c){var h=c.domEvent,n=h.altKey,o=h.shiftKey,i=h.ctrlKey,s=c.getAccelKey(),a=c.getButton();if(i&&f.isMac&&(a=h.button),c.editor.inMultiSelectMode&&a==2)c.editor.textInput.onContextMenu(c.domEvent);else if(i||n||s){if(a===0){var t,e,r,l,p,g,I,A,N=c.editor,M=N.selection,R=N.inMultiSelectMode,S=c.getDocumentPosition(),_=M.getCursor(),_=c.inSelection()||M.isEmpty()&&d(S,_),u=c.x,E=c.y,v=N.session,L=N.renderer.pixelToScreenCoordinates(u,E),G=L;if(N.$mouseHandler.$enableJumpToDef)i&&n||s&&n?t=o?"block":"add":n&&N.$blockSelectEnabled&&(t="block");else if(s&&!n){if(t="add",!R&&o)return}else n&&N.$blockSelectEnabled&&(t="block");if(t&&f.isMac&&h.ctrlKey&&N.$mouseHandler.cancelContextMenu(),t=="add")!R&&_||(R||(e=M.toOrientedRange(),N.addSelectionMarker(e)),r=M.rangeList.rangeAtPoint(S),N.inVirtualSelectionMode=!0,o&&(r=null,e=M.ranges[0]||e,N.removeSelectionMarker(e)),N.once("mouseup",function(){var P=M.toOrientedRange();r&&P.isEmpty()&&d(r.cursor,P.cursor)?M.substractPoint(P.cursor):(o?M.substractPoint(e.cursor):e&&(N.removeSelectionMarker(e),M.addRange(e)),M.addRange(P)),N.inVirtualSelectionMode=!1}));else if(t=="block")return c.stop(),N.inVirtualSelectionMode=!0,p=[],g=function(){var P=N.renderer.pixelToScreenCoordinates(u,E),Y=v.screenToDocumentPosition(P.row,P.column,P.offsetX);d(G,P)&&d(Y,M.lead)||(G=P,N.selection.moveToPosition(Y),N.renderer.scrollCursorIntoView(),N.removeSelectionMarkers(p),p=M.rectangularRangeBlock(G,L),N.$mouseHandler.$clickSelection&&p.length==1&&p[0].isEmpty()&&(p[0]=N.$mouseHandler.$clickSelection.clone()),p.forEach(N.addSelectionMarker,N),N.updateSelectionMarkers())},R&&!s?M.toSingleRange():!R&&s&&(l=M.toOrientedRange(),N.addSelectionMarker(l)),o?L=v.documentToScreenPosition(M.lead):M.moveToPosition(S),G={row:-1,column:-1},I=g,y.capture(N.container,function(P){u=P.clientX,E=P.clientY},function(P){g(),clearInterval(A),N.removeSelectionMarkers(p),p.length||(p=[M.toOrientedRange()]),l&&(N.removeSelectionMarker(l),M.toSingleRange(l));for(var Y=0;Y<p.length;Y++)M.addRange(p[Y]);N.inVirtualSelectionMode=!1,N.$mouseHandler.$clickSelection=null}),A=setInterval(function(){I()},20),c.preventDefault()}}else a===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(b,C,$){C.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(y){y.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(y){y.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(y){y.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(y){y.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(y){y.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(y){y.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(y){y.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(y){y.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(y){1<y.multiSelect.rangeCount?y.multiSelect.joinSelections():y.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(y){y.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(y){y.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(y){y.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],C.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(y){y.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(y){return y&&y.inMultiSelectMode}}],b=b("../keyboard/hash_handler").HashHandler,C.keyboardHandler=new b(C.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(b,C,$){var y=b("./range_list").RangeList,f=b("./range").Range,d=b("./selection").Selection,c=b("./mouse/multi_select_handler").onMouseDown,h=b("./lib/event"),n=b("./lib/lang"),o=b("./commands/multi_select_commands");C.commands=o.defaultCommands.concat(o.multiSelectCommands);var i=new(b("./search")).Search,s=b("./edit_session").EditSession,s=((function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&this.rangeCount===0){var r=this.toOrientedRange();if(this.rangeList.add(r),this.rangeList.add(t),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(r),this.$onAddRange(r)}return t.cursor||(t.cursor=t.end),r=this.rangeList.add(t),this.$onAddRange(t),r.length&&this.$onRemoveRange(r),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){if(t=this.rangeList.substractPoint(t),t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){var e;this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode&&(e=this.rangeList.ranges.pop(),t.push(e),this.rangeCount=0);for(var r=t.length;r--;){var l=this.ranges.indexOf(t[r]);this.ranges.splice(l,1)}this._signal("removeRange",{ranges:t}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(e=e||this.ranges[0])&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new y,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],r=0;r<t.length;r++){var l=t[r],p=l.start.row,g=l.end.row;if(p===g)e.push(l.clone());else{for(e.push(new f(p,l.start.column,p,this.session.getLine(p).length));++p<g;)e.push(this.getLineRange(p,!0));e.push(new f(g,0,g,l.end.column))}r!=0||this.isBackwards()||(e=e.reverse())}for(this.toSingleRange(),r=e.length;r--;)this.addRange(e[r])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],e=f.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)},this.toggleBlockSelection=function(){var t,e;1<this.rangeCount?(e=(t=this.rangeList.ranges)[t.length-1],t=f.fromPoints(t[0].start,e.end),this.toSingleRange(),this.setSelectionRange(t,e.cursor==e.start)):(t=this.session.documentToScreenPosition(this.cursor),e=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(t,e).forEach(this.addRange,this))},this.rectangularRangeBlock=function(t,e,r){var l,p,g,I,A,N,M,R=[],S=t.column<e.column,_=(I=(S?(l=t.column,p=e.column,g=t.offsetX,e):(l=e.column,p=t.column,g=e.offsetX,t)).offsetX,t.row<e.row);N=(_?(A=t.row,e):(A=e.row,t)).row,l<0&&(l=0),(A=A<0?0:A)==N&&(r=!0);for(var u,E,v=A;v<=N;v++){var L=f.fromPoints(this.session.screenToDocumentPosition(v,l,g),this.session.screenToDocumentPosition(v,p,I));if(L.isEmpty()){if(M&&(u=L.end,E=M,u.row==E.row)&&u.column==E.column)break;M=L.end}L.cursor=S?L.start:L.end,R.push(L)}if(_&&R.reverse(),!r){for(var G=R.length-1;R[G].isEmpty()&&0<G;)G--;if(0<G)for(var P=0;R[P].isEmpty();)P++;for(var Y=G;P<=Y;Y--)R[Y].isEmpty()&&R.splice(Y,1)}return R}}).call(d.prototype),b("./editor").Editor);function a(t){var e,r;function l(p){r&&(e.renderer.setMouseCursor(""),r=!1)}t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=C.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",c),t.commands.addCommands(o.defaultCommands),(e=t).textInput&&(t=e.textInput.getElement(),r=!1,h.addListener(t,"keydown",function(p){p=p.keyCode==18&&!(p.ctrlKey||p.shiftKey||p.metaKey),e.$blockSelectEnabled&&p?r||(e.renderer.setMouseCursor("crosshair"),r=!0):r&&l()},e),h.addListener(t,"keyup",l,e),h.addListener(t,"blur",l,e)))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){t.marker&&(this.session.removeMarker(t.marker),(t=this.session.$selectionMarkers.indexOf(t))!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,r=t.length;r--;){var l=t[r];l.marker&&(this.session.removeMarker(l.marker),(l=e.indexOf(l))!=-1)&&e.splice(l,1)}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e,r=t.command,l=t.editor;if(l.multiSelect)return r.multiSelectAction?e=r.multiSelectAction=="forEach"?l.forEachSelection(r,t.args):r.multiSelectAction=="forEachLine"?l.forEachSelection(r,t.args,!0):r.multiSelectAction=="single"?(l.exitMultiSelectMode(),r.exec(l,t.args||{})):r.multiSelectAction(l,t.args||{}):(e=r.exec(l,t.args||{}),l.multiSelect.addRange(l.multiSelect.toOrientedRange()),l.multiSelect.mergeOverlappingRanges()),e},this.forEachSelection=function(t,e,r){if(!this.inVirtualSelectionMode){var l,N=r&&r.keepOrder,p=r==1||r&&r.$byLines,g=this.session,r=this.selection,I=r.rangeList,A=(N?r:I).ranges;if(!A.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var N=r._eventRegistry,M=(r._eventRegistry={},new d(g));this.inVirtualSelectionMode=!0;for(var R=A.length;R--;){if(p)for(;0<R&&A[R].start.row==A[R-1].end.row;)R--;M.fromOrientedRange(A[R]),M.index=R,this.selection=g.selection=M;var S=t.exec?t.exec(this,e||{}):t(this,e||{});l||S===void 0||(l=S),M.toOrientedRange(A[R])}return M.detach(),this.selection=g.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=N,r.mergeOverlappingRanges(),r.ranges[0]&&r.fromOrientedRange(r.ranges[0]),I=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),l}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,r=[],l=0;l<e.length;l++)r.push(this.session.getTextRange(e[l]));var p=this.session.getDocument().getNewLineCharacter();(t=r.join(p)).length==(r.length-1)*p.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,e){var r;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(r=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&e==this.multiSelect.anchor||((r=e==this.multiSelect.anchor?r.cursor==r.start?r.end:r.start:r.cursor).row!=e.row||this.session.$clipPositionToDocument(r.row,r.column).column!=e.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(t,e,r){(e=e||{}).needle=t||e.needle,e.needle==null&&(l=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),e.needle=this.session.getTextRange(l)),this.$search.set(e);var l,p=this.$search.findAll(this.session);if(!p.length)return 0;var g=this.multiSelect;r||g.toSingleRange(p[0]);for(var I=p.length;I--;)g.addRange(p[I],!0);return l&&g.rangeList.rangeAtPoint(l.start)&&g.addRange(l,!0),p.length},this.selectMoreLines=function(t,e){var r,l,p,g=this.selection.toOrientedRange(),I=g.cursor==g.end,A=this.session.documentToScreenPosition(g.cursor),N=(this.selection.$desiredColumn&&(A.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(A.row+t,A.column));t=g.isEmpty()?N:(r=this.session.documentToScreenPosition(I?g.end:g.start),this.session.screenToDocumentPosition(r.row+t,r.column)),I?(l=f.fromPoints(N,t)).cursor=l.start:(l=f.fromPoints(t,N)).cursor=l.end,l.desiredColumn=A.column,this.selection.inMultiSelectMode?e&&(p=g.cursor):this.selection.addRange(g),this.selection.addRange(l),p&&this.selection.substractPoint(p)},this.transposeSelections=function(t){for(var e,r=this.session,l=r.multiSelect,p=l.ranges,g=p.length;g--;)(A=p[g]).isEmpty()&&(e=r.getWordRange(A.start.row,A.start.column),A.start.row=e.start.row,A.start.column=e.start.column,A.end.row=e.end.row,A.end.column=e.end.column);l.mergeOverlappingRanges();for(var I=[],g=p.length;g--;){var A=p[g];I.unshift(r.getTextRange(A))}for(t<0?I.unshift(I.pop()):I.push(I.shift()),g=p.length;g--;){var N=(A=p[g]).clone();r.replace(A,I[g]),A.start.row=N.start.row,A.start.column=N.start.column}l.fromOrientedRange(l.ranges[0])},this.selectMore=function(t,e,r){var l,p=this.session,g=p.multiSelect.toOrientedRange();g.isEmpty()&&((g=p.getWordRange(g.start.row,g.start.column)).cursor=t==-1?g.start:g.end,this.multiSelect.addRange(g),r)||(r=p.getTextRange(g),p=p,r=r,l=t,i.$options.wrap=!0,i.$options.needle=r,i.$options.backwards=l==-1,(r=i.find(p))&&(r.cursor=t==-1?r.start:r.end,this.session.unfold(r),this.multiSelect.addRange(r),this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(g.cursor))},this.alignCursors=function(){var t=this.session,e=t.multiSelect,r=e.ranges,l=-1,p=r.filter(function(u){if(u.cursor.row==l)return!0;l=u.cursor.row});if(r.length&&p.length!=r.length-1){p.forEach(function(u){e.substractPoint(u.cursor)});var g=0,I=1/0,A=r.map(function(E){var E=E.cursor,v=t.getLine(E.row).substr(E.column).search(/\S/g);return E.column>g&&(g=E.column),(v=v==-1?0:v)<I&&(I=v),v});r.forEach(function(u,G){var v=u.cursor,L=g-v.column,G=A[G]-I;G<L?t.insert(v,n.stringRepeat(" ",L-G)):t.remove(new f(v.row,v.column,v.row,v.column-L+G)),u.start.column=u.end.column=g,u.start.row=u.end.row=v.row,u.cursor=u.end}),e.fromOrientedRange(r[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var p=this.selection.getRange(),N=p.start.row,M=p.end.row,r=N==M;if(r){for(var R,S=this.session.getLength();R=this.session.getLine(M),/[=:]/.test(R)&&++M<S;);for(;R=this.session.getLine(N),/[=:]/.test(R)&&0<--N;);N<0&&(N=0),S<=M&&(M=S-1)}var _=this.session.removeFullLines(N,M),_=this.$reAlignText(_,r);this.session.insert({row:N,column:0},_.join(`
`)+`
`),r||(p.start.column=0,p.end.column=_[_.length-1].length),this.selection.setRange(p)}},this.$reAlignText=function(t,e){var r,l,p,g=!0,I=!0;return t.map(function(M){var R=M.match(/(\s*)(.*?)(\s*)([=:].*)/);return R?(r==null?(r=R[1].length,l=R[2].length,p=R[3].length):(r+l+p!=R[1].length+R[2].length+R[3].length&&(I=!1),r!=R[1].length&&(g=!1),r>R[1].length&&(r=R[1].length),l<R[2].length&&(l=R[2].length),p>R[3].length&&(p=R[3].length)),R):[M]}).map(e?N:g?I?function(M){return M[2]?A(r+l-M[2].length)+M[2]+A(p)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}:N:function(M){return M[2]?A(r)+M[2]+A(p)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]});function A(M){return n.stringRepeat(" ",M)}function N(M){return M[2]?A(r)+M[2]+A(l-M[2].length+p)+M[4].replace(/^([=:])\s+/,"$1 "):M[0]}}}).call(s.prototype),C.onSessionChange=function(r){var e=r.session,r=(e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect,r.oldSession);r&&(r.multiSelect.off("addRange",this.$onAddRange),r.multiSelect.off("removeRange",this.$onRemoveRange),r.multiSelect.off("multiSelect",this.$onMultiSelect),r.multiSelect.off("singleSelect",this.$onSingleSelect),r.multiSelect.lead.off("change",this.$checkMultiselectChange),r.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},C.MultiSelect=a,b("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(t){a(this),t?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(f,C,$){var y=f("../../range").Range,f=C.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,c,h){return d=d.getLine(h),this.foldingStartMarker.test(d)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(d,c,h){return null},this.indentationBlock=function(d,c,h){var n=/\S/,o=d.getLine(c),i=o.search(n);if(i!=-1){for(var s,h=h||o.length,a=d.getLength(),o=c,t=c;++c<a;){var e=d.getLine(c).search(n);if(e!=-1){if(e<=i&&(e=d.getTokenAt(c,0),!e||e.type!=="string"))break;t=c}}return o<t?(s=d.getLine(t).length,new y(o,h,t,s)):void 0}},this.openingBracketBlock=function(d,c,h,n,o){if(h={row:h,column:n+1},n=d.$findClosingBracket(c,h,o),n)return(c=(c=d.foldWidgets[n.row])==null?d.getFoldWidget(n.row):c)=="start"&&n.row>h.row&&(n.row--,n.column=d.getLine(n.row).length),y.fromPoints(h,n)},this.closingBracketBlock=function(d,c,h,n,o){if(h={row:h,column:n},n=d.$findOpeningBracket(c,h),n)return n.column++,h.column--,y.fromPoints(n,h)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(b,C,$){var y=b("../line_widgets").LineWidgets,f=b("../lib/dom"),d=b("../range").Range,c=b("../config").nls;function h(n,o,i){var s=n.getAnnotations().sort(d.comparePoints);if(s.length){var a=function(r,l,p){for(var g=0,I=r.length-1;g<=I;){var A=g+I>>1,N=p(l,r[A]);if(0<N)g=1+A;else{if(!(N<0))return A;I=A-1}}return-(g+1)}(s,{row:o,column:-1},d.comparePoints),t=((a=a<0?-a-1:a)>=s.length?a=0<i?0:s.length-1:a===0&&i<0&&(a=s.length-1),s[a]);if(t&&i){if(t.row===o){for(;(t=s[a+=i])&&t.row===o;);if(!t)return s.slice()}var e=[];for(o=t.row;e[i<0?"unshift":"push"](t),(t=s[a+=i])&&t.row==o;);return e.length&&e}}}C.showErrorMarker=function(n,l){var i,s=n.session,a=(s.widgetManager||(s.widgetManager=new y(s),s.widgetManager.attach(n)),n.getCursorPosition()),r=a.row,p=s.widgetManager.getWidgetsAtRow(r).filter(function(g){return g.type=="errorMarker"})[0],r=(p?p.destroy():r-=l,h(s,r,l));if(r)l=r[0],a.column=(l.pos&&typeof l.column!="number"?l.pos.sc:l.column)||0,a.row=l.row,i=n.renderer.$gutterLayer.$annotations[a.row];else{if(p)return;i={text:[c("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(a.row),n.selection.moveToPosition(a);function t(g,I,A){if(I===0&&(A==="esc"||A==="return"))return e.destroy(),{command:"null"}}var e={row:a.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},r=e.el.appendChild(f.createElement("div")),l=e.el.appendChild(f.createElement("div")),p=(l.className="error_widget_arrow "+i.className,n.renderer.$cursorLayer.getPixelPosition(a).left);l.style.left=p+n.renderer.gutterWidth-5+"px",e.el.className="error_widget_wrapper",r.className="error_widget "+i.className,r.innerHTML=i.text.join("<br>"),r.appendChild(f.createElement("div")),e.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(t),s.widgetManager.removeLineWidget(e),n.off("changeSelection",e.destroy),n.off("changeSession",e.destroy),n.off("mouseup",e.destroy),n.off("change",e.destroy))},n.keyBinding.addKeyboardHandler(t),n.on("changeSelection",e.destroy),n.on("changeSession",e.destroy),n.on("mouseup",e.destroy),n.on("change",e.destroy),n.session.widgetManager.addLineWidget(e),e.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:e.el.offsetHeight})},f.importCssString(`
    .error_widget_wrapper {
        background: inherit;
        color: inherit;
        border:none
    }
    .error_widget {
        border-top: solid 2px;
        border-bottom: solid 2px;
        margin: 5px 0;
        padding: 10px 40px;
        white-space: pre-wrap;
    }
    .error_widget.ace_error, .error_widget_arrow.ace_error{
        border-color: #ff5a5a
    }
    .error_widget.ace_warning, .error_widget_arrow.ace_warning{
        border-color: #F1D817
    }
    .error_widget.ace_info, .error_widget_arrow.ace_info{
        border-color: #5a5a5a
    }
    .error_widget.ace_ok, .error_widget_arrow.ace_ok{
        border-color: #5aaa5a
    }
    .error_widget_arrow {
        position: absolute;
        border: solid 5px;
        border-top-color: transparent!important;
        border-right-color: transparent!important;
        border-left-color: transparent!important;
        top: -5px;
    }
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/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(b,C,$){b("./loader_build")(C);var y=b("./lib/dom"),f=b("./range").Range,d=b("./editor").Editor,c=b("./edit_session").EditSession,h=b("./undomanager").UndoManager,n=b("./virtual_renderer").VirtualRenderer;b("./worker/worker_client"),b("./keyboard/hash_handler"),b("./placeholder"),b("./multi_select"),b("./mode/folding/fold_mode"),b("./theme/textmate"),b("./ext/error_marker"),C.config=b("./config"),C.edit=function(o,i){if(typeof o=="string"){var s=o;if(!(o=document.getElementById(s)))throw new Error("ace.edit can't find div #"+s)}var a,t;return o&&o.env&&o.env.editor instanceof d?o.env.editor:(s="",o&&/input|textarea/i.test(o.tagName)?(s=(a=o).value,o=y.createElement("pre"),a.parentNode.replaceChild(o,a)):o&&(s=o.textContent,o.innerHTML=""),s=C.createEditSession(s),o=new d(new n(o),s,i),t={document:s,editor:o,onResize:o.resize.bind(o,null)},a&&(t.textarea=a),o.on("destroy",function(){t.editor.container.env=null}),o.container.env=o.env=t,o)},C.createEditSession=function(o,i){return o=new c(o,i),o.setUndoManager(new h),o},C.Range=f,C.Editor=d,C.EditSession=c,C.UndoManager=h,C.VirtualRenderer=n,C.version=C.config.version}),ace.require(["ace/ace"],function(b){b&&(b.config.init(!0),b.define=ace.define);var C,$=function(){return this}();for(C in($=($=$||typeof window>"u"?$:window)||typeof self>"u"?$:self).ace||($.ace=b),b)b.hasOwnProperty(C)&&($.ace[C]=b[C]);$.ace.default=$.ace,le&&(le.exports=$.ace)})},6489:function(le,m,Z){le=Z.nmd(le),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(U,x,H){var X=U("./lib/dom"),a=U("./lib/oop"),j=U("./lib/event_emitter").EventEmitter,J=U("./lib/lang"),F=U("./range").Range,B=U("./range_list").RangeList,b=U("./keyboard/hash_handler").HashHandler,C=U("./tokenizer").Tokenizer,$=U("./clipboard"),y={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,r){return t=t.session.getTextRange(),r?t.replace(/\n\r?([ \t]*\S)/g,`
`+r+"$1"):t},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return $.getText&&$.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){return t=t.session.$mode||{},t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(t){return t=t.session.$mode||{},t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(t){return(t.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};function f(t){return t=new Date().toLocaleString("en-us",t),t.length==1?"0"+t:t}y.SELECTED_TEXT=y.SELECTION,c.prototype.getTokenizer=function(){return c.$tokenizer||this.createTokenizer()},c.prototype.createTokenizer=function(){function t(l){return l=l.substr(1),/^\d+$/.test(l)?[{tabstopId:parseInt(l,10)}]:[{text:l}]}function e(l){return"(?:[^\\\\"+l+"]|\\\\.)"}var r={regex:"/("+e("/")+"+)/",onMatch:function(l,p,g){return g=g[0],g.fmtString=!0,g.guard=l.slice(1,-1),g.flag=""},next:"formatString"};return c.$tokenizer=new C({start:[{regex:/\\./,onMatch:function(l,p,g){var I=l[1];return[l=I=="}"&&g.length||"`$\\".indexOf(I)!=-1?I:l]}},{regex:/}/,onMatch:function(l,p,g){return[g.length?g.shift():l]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(l,p,g){return l=t(l.substr(1)),g.unshift(l[0]),l},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(l,p,g){return l=l.slice(1,-1).replace(/\\[,|\\]|,/g,function(I){return I.length==2?I[1]:"\0"}).split("\0").map(function(I){return{value:I}}),[(g[0].choices=l)[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(l,p,g){return g.length&&g[0].expectElse?(g[0].expectElse=!1,g[0].ifEnd={elseEnd:g[0]},[g[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(l,p,g){var I=l[1];return I=="}"&&g.length||"`$\\".indexOf(I)!=-1?l=I:I=="n"?l=`
`:I=="t"?l="	":"ulULE".indexOf(I)!=-1&&(l={changeCase:I,local:"a"<I}),[l]}},{regex:"/\\w*}",onMatch:function(l,p,g){return g=g.shift(),g&&(g.flag=l.slice(1,-1)),this.next=g&&g.tabstopId?"start":"",[g||l]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(l,p,g){return[{text:l.slice(1)}]}},{regex:/\${\w+/,onMatch:function(l,p,g){return l={text:l.slice(2)},g.unshift(l),[l]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(l,p,g){return g=g.shift(),this.next=g&&g.tabstopId?"start":"",[g||l]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(l,p,g){return g[0].formatFunction=l.slice(2,-1),[g.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(l,p,g){l[1]=="+"&&(g[0].ifEnd=g[0]),l[1]=="?"&&(g[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},c.prototype.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map(function(r){return r.value||r})},c.prototype.getVariableValue=function(t,e,r){var l;return/^\d+$/.test(e)?(this.variables.__||{})[e]||"":/^[A-Z]\d+$/.test(e)?(this.variables[e[0]+"__"]||{})[e.substr(1)]||"":(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e)||(l=typeof(l=this.variables[e])=="function"?this.variables[e](t,e,r):l)==null?"":l)},c.prototype.tmStrFormat=function(t,e,r){var l,p,g,I;return e.fmt?(l=e.flag||"",p=e.guard,p=new RegExp(p,l.replace(/[^gim]/g,"")),g=typeof e.fmt=="string"?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,I=this,t.replace(p,function(){for(var A=I.variables.__,N=(I.variables.__=[].slice.call(arguments),I.resolveVariables(g,r)),M="E",R=0;R<N.length;R++){var S,_=N[R];typeof _=="object"?(N[R]="",_.changeCase&&_.local?(S=N[R+1])&&typeof S=="string"&&(_.changeCase=="u"?N[R]=S[0].toUpperCase():N[R]=S[0].toLowerCase(),N[R+1]=S.substr(1)):_.changeCase&&(M=_.changeCase)):M=="U"?N[R]=_.toUpperCase():M=="L"&&(N[R]=_.toLowerCase())}return I.variables.__=A,N.join("")})):t},c.prototype.tmFormatFunction=function(t,e,r){return e.formatFunction=="upcase"?t.toUpperCase():e.formatFunction=="downcase"?t.toLowerCase():t},c.prototype.resolveVariables=function(t,e){for(var r=[],l="",p=!0,g=0;g<t.length;g++){var I,A=t[g];typeof A=="string"?(r.push(A),A==`
`?(p=!0,l=""):p&&(l=/^\t*/.exec(A)[0],p=/\S/.test(A))):A&&(p=!1,A.fmtString&&((I=t.indexOf(A,g+1))==-1&&(I=t.length),A.fmt=t.slice(g+1,I),g=I),A.text?(I=this.getVariableValue(e,A.text,l)+"",A.fmtString&&(I=this.tmStrFormat(I,A,e)),(I=A.formatFunction?this.tmFormatFunction(I,A,e):I)&&!A.ifEnd?(r.push(I),N(A)):!I&&A.ifEnd&&N(A.ifEnd)):A.elseEnd?N(A.elseEnd):A.tabstopId==null&&A.changeCase==null||r.push(A))}function N(M){M=t.indexOf(M,g+1),M!=-1&&(g=M)}return r},c.prototype.getDisplayTextForSnippet=function(t,e){return h.call(this,t,e).text},c.prototype.insertSnippetForSelection=function(A,l,p){var l=h.call(this,A,l,p=p===void 0?{}:p),p=A.getSelectionRange(),g=A.session.replace(p,l.text),I=new n(A),A=A.inVirtualSelectionMode&&A.selection.index;I.addTabstops(l.tabstops,p.start,g,A)},c.prototype.insertSnippet=function(t,e,r){r===void 0&&(r={});var l=this;if(t.inVirtualSelectionMode)return l.insertSnippetForSelection(t,e,r);t.forEachSelection(function(){l.insertSnippetForSelection(t,e,r)},null,{keepOrder:!0}),t.tabstopManager&&t.tabstopManager.tabNext()},c.prototype.$getScope=function(t){var e,r=t.session.$mode.$id||"";return(r=r.split("/").pop())!=="html"&&r!=="php"||(r!=="php"||t.session.$mode.inlinePhp||(r="html"),e=t.getCursorPosition(),(t=typeof(t=t.session.getState(e.row))=="object"?t[0]:t).substring&&(t.substring(0,3)=="js-"?r="javascript":t.substring(0,4)=="css-"?r="css":t.substring(0,4)=="php-"&&(r="php"))),r},c.prototype.getActiveScopes=function(e){var e=this.$getScope(e),r=[e],l=this.snippetMap;return l[e]&&l[e].includeScopes&&r.push.apply(r,l[e].includeScopes),r.push("_"),r},c.prototype.expandWithTab=function(t,e){var r=this,l=t.forEachSelection(function(){return r.expandSnippetForSelection(t,e)},null,{keepOrder:!0});return l&&t.tabstopManager&&t.tabstopManager.tabNext(),l},c.prototype.expandSnippetForSelection=function(t,e){var r,l=t.getCursorPosition(),p=t.session.getLine(l.row),g=p.substring(0,l.column),I=p.substr(l.column),A=this.snippetMap;return this.getActiveScopes(t).some(function(N){return N=A[N],!!(r=N?this.findMatchingSnippet(N,g,I):r)},this),!!r&&(e&&e.dryRun||(t.session.doc.removeInLine(l.row,l.column-r.replaceBefore.length,l.column+r.replaceAfter.length),this.variables.M__=r.matchBefore,this.variables.T__=r.matchAfter,this.insertSnippetForSelection(t,r.content),this.variables.M__=this.variables.T__=null),!0)},c.prototype.findMatchingSnippet=function(t,e,r){for(var l=t.length;l--;){var p=t[l];if((!p.startRe||p.startRe.test(e))&&(!p.endRe||p.endRe.test(r))&&(p.startRe||p.endRe))return p.matchBefore=p.startRe?p.startRe.exec(e):[""],p.matchAfter=p.endRe?p.endRe.exec(r):[""],p.replaceBefore=p.triggerRe?p.triggerRe.exec(e)[0]:"",p.replaceAfter=p.endTriggerRe?p.endTriggerRe.exec(r)[0]:"",p}},c.prototype.register=function(t,e){var r=this.snippetMap,l=this.snippetNameMap,p=this;function g(N){return(N=N&&!/^\^?\(.*\)\$?$|^\\b$/.test(N)?"(?:"+N+")":N)||""}function I(N,M,R){return N=g(N),M=g(M),(N=M+N)&&N[N.length-1]!="$"&&(N+="$"),new RegExp(N)}function A(N){N.scope||(N.scope=e||"_"),e=N.scope,r[e]||(r[e]=[],l[e]={});var M,R=l[e];N.name&&((M=R[N.name])&&p.unregister(M),R[N.name]=N),r[e].push(N),N.prefix&&(N.tabTrigger=N.prefix),!N.content&&N.body&&(N.content=Array.isArray(N.body)?N.body.join(`
`):N.body),N.tabTrigger&&!N.trigger&&(!N.guard&&/^\w/.test(N.tabTrigger)&&(N.guard="\\b"),N.trigger=J.escapeRegExp(N.tabTrigger)),(N.trigger||N.guard||N.endTrigger||N.endGuard)&&(N.startRe=I(N.trigger,N.guard),N.triggerRe=new RegExp(N.trigger),N.endRe=I(N.endTrigger,N.endGuard),N.endTriggerRe=new RegExp(N.endTrigger))}t=t||[],Array.isArray(t)?t.forEach(A):Object.keys(t).forEach(function(N){A(t[N])}),this._signal("registerSnippets",{scope:e})},c.prototype.unregister=function(t,e){var r=this.snippetMap,l=this.snippetNameMap;function p(g){var I=l[g.scope||e];I&&I[g.name]&&(delete I[g.name],0<=(g=(I=r[g.scope||e])&&I.indexOf(g)))&&I.splice(g,1)}t.content?p(t):Array.isArray(t)&&t.forEach(p)},c.prototype.parseSnippetFile=function(t){t=t.replace(/\r/g,"");for(var e,r,l,p=[],g={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;r=I.exec(t);){if(r[1])try{g=JSON.parse(r[1]),p.push(g)}catch{}r[4]?(g.content=r[4].replace(/^\t/gm,""),p.push(g),g={}):(e=r[2],r=r[3],e=="regex"?(g.guard=(l=/\/((?:[^\/\\]|\\.)*)|$/g).exec(r)[1],g.trigger=l.exec(r)[1],g.endTrigger=l.exec(r)[1],g.endGuard=l.exec(r)[1]):e=="snippet"?(g.tabTrigger=r.match(/^\S*/)[0],g.name||(g.name=r)):e&&(g[e]=r))}return p},c.prototype.getSnippetByName=function(t,e){var r,l=this.snippetNameMap;return this.getActiveScopes(e).some(function(p){return p=l[p],!!(r=p?p[t]:r)},this),r};var d=c;function c(){this.snippetMap={},this.snippetNameMap={},this.variables=y}a.implement(d.prototype,j);var h=function(t,e,r){r===void 0&&(r={});for(var l=t.getCursorPosition(),p=t.session.getLine(l.row),g=t.session.getTabString(),I=p.match(/^\s*/)[0],A=(l.column<I.length&&(I=I.slice(0,l.column)),e=e.replace(/\r/g,""),this.tokenizeTmSnippet(e)),N=(A=(A=this.resolveVariables(A,t)).map(function(P){return P!=`
`||r.excludeExtraIndent?typeof P=="string"?P.replace(/\t/g,g):P:P+I}),[]),M=(A.forEach(function(P,Y){var Q,K,te;typeof P=="object"&&(te=P.tabstopId,(Q=N[te])||((Q=N[te]=[]).index=te,Q.value="",Q.parents={}),Q.indexOf(P)===-1)&&(P.choices&&!Q.choices&&(Q.choices=P.choices),Q.push(P),(K=A.indexOf(P,Y+1))!==-1)&&((te=A.slice(Y+1,K)).some(function(T){return typeof T=="object"})&&!Q.value?Q.value=te:!te.length||Q.value&&typeof Q.value=="string"||(Q.value=te.join("")))}),N.forEach(function(P){P.length=0}),{}),R=0;R<A.length;R++){var S,_,u,E=A[R];typeof E=="object"&&(u=E.tabstopId,S=N[u],_=A.indexOf(E,R+1),M[u]?M[u]===E&&(delete M[u],Object.keys(M).forEach(function(P){S.parents[P]=!0})):(M[u]=E,typeof(u=S.value)!="string"?u=function(P){for(var Y=[],Q=0;Q<P.length;Q++){if(typeof(K=P[Q])=="object"){if(M[K.tabstopId])continue;var K=Y[P.lastIndexOf(K,Q-1)]||{tabstopId:K.tabstopId}}Y[Q]=K}return Y}(u):E.fmt&&(u=this.tmStrFormat(u,E,t)),A.splice.apply(A,[R+1,Math.max(0,_-R)].concat(u,E)),S.indexOf(E)===-1&&S.push(E)))}var v=0,L=0,G="";return A.forEach(function(P){var Y;typeof P=="string"?(1<(Y=P.split(`
`)).length?(L=Y[Y.length-1].length,v+=Y.length-1):L+=P.length,G+=P):P&&(P.start?P.end={row:v,column:L}:P.start={row:v,column:L})}),{text:G,tabstops:N,tokens:A}},n=(o.prototype.attach=function(t){this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.session=t.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)},o.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},o.prototype.onChange=function(t){for(var e=t.action[0]=="r",r=this.selectedTabstop||{},l=r.parents||{},p=this.tabstops.slice(),g=0;g<p.length;g++){var I=p[g],A=I==r||l[I.index];if(I.rangeList.$bias=A?0:1,t.action=="remove"&&I!==r)for(var A=I.parents&&I.parents[r.index],N=(N=I.rangeList.pointIndex(t.start,A))<0?-N-1:N+1,A=I.rangeList.pointIndex(t.end,A),M=I.rangeList.ranges.slice(N,A<0?-A-1:A-1),R=0;R<M.length;R++)this.removeRange(M[R]);I.rangeList.$onChange(t)}var S=this.session;this.$inChange||!e||S.getLength()!=1||S.getValue()||this.detach()},o.prototype.updateLinkedFields=function(){var t=this.selectedTabstop;if(t&&t.hasLinkedRanges&&t.firstNonLinked){this.$inChange=!0;for(var e=this.session,r=e.getTextRange(t.firstNonLinked),l=0;l<t.length;l++){var p,g=t[l];g.linked&&(p=g.original,p=x.snippetManager.tmStrFormat(r,p,this.editor),e.replace(g,p))}this.$inChange=!1}},o.prototype.onAfterExec=function(t){t.command&&!t.command.readOnly&&this.updateLinkedFields()},o.prototype.onChangeSelection=function(){if(this.editor){for(var t=this.editor.selection.lead,e=this.editor.selection.anchor,r=this.editor.selection.isEmpty(),l=0;l<this.ranges.length;l++)if(!this.ranges[l].linked){var p=this.ranges[l].contains(t.row,t.column),g=r||this.ranges[l].contains(e.row,e.column);if(p&&g)return}this.detach()}},o.prototype.onChangeSession=function(){this.detach()},o.prototype.tabNext=function(r){var e=this.tabstops.length,r=this.index+(r||1),r=Math.min(Math.max(r,1),e);this.selectTabstop(r=r==e?0:r),this.updateTabstopMarkers(),r===0&&this.detach()},o.prototype.selectTabstop=function(t){this.$openTabstops=null;var e=this.tabstops[this.index];if(e&&this.addTabstopMarkers(e),this.index=t,(e=this.tabstops[this.index])&&e.length){if(t=(this.selectedTabstop=e).firstNonLinked||e,e.choices&&(t.cursor=t.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(t);else{var r=this.editor.multiSelect;r.toSingleRange(t);for(var l=0;l<e.length;l++)e.hasLinkedRanges&&e[l].linked||r.addRange(e[l].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},o.prototype.addTabstops=function(t,e,r){var l=this.useLink||!this.editor.getOption("enableMultiselect");this.$openTabstops||(this.$openTabstops=[]),t[0]||(r=F.fromPoints(r,r),s(r.start,e),s(r.end,e),t[0]=[r],t[0].index=0);var p=[this.index+1,0],g=this.ranges,I=this.snippetId=(this.snippetId||0)+1;t.forEach(function(A,N){var M=this.$openTabstops[N]||A;M.snippetId=I;for(var R=0;R<A.length;R++){var S=A[R],_=F.fromPoints(S.start,S.end||S.start);i(_.start,e),i(_.end,e),_.original=S,_.tabstop=M,g.push(_),M!=A?M.unshift(_):M[R]=_,S.fmtString||M.firstNonLinked&&l?(_.linked=!0,M.hasLinkedRanges=!0):M.firstNonLinked||(M.firstNonLinked=_)}M.firstNonLinked||(M.hasLinkedRanges=!1),M===A&&(p.push(M),this.$openTabstops[N]=M),this.addTabstopMarkers(M),M.rangeList=M.rangeList||new B,M.rangeList.$bias=0,M.rangeList.addList(M)},this),2<p.length&&(this.tabstops.length&&p.push(p.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,p))},o.prototype.addTabstopMarkers=function(t){var e=this.session;t.forEach(function(r){r.markerId||(r.markerId=e.addMarker(r,"ace_snippet-marker","text"))})},o.prototype.removeTabstopMarkers=function(t){var e=this.session;t.forEach(function(r){e.removeMarker(r.markerId),r.markerId=null})},o.prototype.updateTabstopMarkers=function(){var t;this.selectedTabstop&&(t=this.selectedTabstop.snippetId,this.selectedTabstop.index===0&&t--,this.tabstops.forEach(function(e){e.snippetId===t?this.addTabstopMarkers(e):this.removeTabstopMarkers(e)},this))},o.prototype.removeRange=function(t){var e=t.tabstop.indexOf(t);e!=-1&&t.tabstop.splice(e,1),(e=this.ranges.indexOf(t))!=-1&&this.ranges.splice(e,1),(e=t.tabstop.rangeList.ranges.indexOf(t))!=-1&&t.tabstop.splice(e,1),this.session.removeMarker(t.markerId),t.tabstop.length||((e=this.tabstops.indexOf(t.tabstop))!=-1&&this.tabstops.splice(e,1),this.tabstops.length)||this.detach()},o);function o(t){if(this.index=0,this.ranges=[],this.tabstops=[],t.tabstopManager)return t.tabstopManager;(t.tabstopManager=this).$onChange=this.onChange.bind(this),this.$onChangeSelection=J.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)}n.prototype.keyboardHandler=new b,n.prototype.keyboardHandler.bindKeys({Tab:function(t){x.snippetManager&&x.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}});var i=function(t,e){t.row==0&&(t.column+=e.column),t.row+=e.row},s=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row},a=(X.importCssString(`
.ace_snippet-marker {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background: rgba(194, 193, 208, 0.09);
    border: 1px dotted rgba(211, 208, 235, 0.62);
    position: absolute;
}`,"snippets.css",!1),x.snippetManager=new d,U("./editor").Editor);(function(){this.insertSnippet=function(t,e){return x.snippetManager.insertSnippet(this,t,e)},this.expandSnippet=function(t){return x.snippetManager.expandWithTab(this,t)}}).call(a.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(d,x,H){function X(o){return"suggest-aria-id:".concat(o)}function j(o){return(o=new F(o)).$maxLines=4,(o=new B(o)).setHighlightActiveLine(!1),o.setShowPrintMargin(!1),o.renderer.setShowGutter(!1),o.renderer.setHighlightGutterLine(!1),o.$mouseHandler.$focusTimeout=0,o.$highlightTagPending=!0,o}function J(o){function i(){}function s(){p(-1)}var a,t=y.createElement("div"),e=j(t),r=(o&&o.appendChild(t),t.style.display="none",e.renderer.content.style.cursor="default",e.renderer.setStyle("ace_autocomplete"),e.renderer.$textLayer.element.setAttribute("role",c),e.renderer.$textLayer.element.setAttribute("aria-roledescription",f("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),e.renderer.$textLayer.element.setAttribute("aria-label",f("autocomplete.popup.aria-label","Autocomplete suggestions")),e.renderer.textarea.setAttribute("aria-hidden","true"),e.setOption("displayIndentGuides",!1),e.setOption("dragDelay",150),e.focus=i,e.$isFocused=!0,e.renderer.$cursorLayer.restartTimer=i,e.renderer.$cursorLayer.element.style.opacity="0",e.renderer.$maxLines=8,e.renderer.$keepTextAreaAtCursor=!1,e.setHighlightActiveLine(!1),e.session.highlight(""),e.session.$searchHighlight.clazz="ace_highlight-marker",e.on("mousedown",function(g){var I=g.getDocumentPosition();e.selection.moveToPosition(I),l.start.row=l.end.row=I.row,g.stop()}),new b(-1,0,-1,1/0)),l=new b(-1,0,-1,1/0),p=(l.id=e.session.addMarker(l,"ace_active-line","fullLine"),e.setSelectOnHover=function(g){g?r.id&&(e.session.removeMarker(r.id),r.id=null):r.id=e.session.addMarker(r,"ace_line-hover","fullLine")},e.setSelectOnHover(!1),e.on("mousemove",function(g){var I;a?a.x==g.x&&a.y==g.y||((a=g).scrollTop=e.renderer.scrollTop,e.isMouseOver=!0,I=a.getDocumentPosition().row,r.start.row!=I&&(r.id||e.setRow(I),p(I))):a=g}),e.renderer.on("beforeRender",function(){var g;a&&r.start.row!=-1&&(a.$pos=null,g=a.getDocumentPosition().row,r.id||e.setRow(g),p(g,!0))}),e.renderer.on("afterRender",function(){var g,I=e.getRow(),A=e.renderer.$textLayer,N=A.element.childNodes[I-A.config.firstRow],M=document.activeElement;N!==e.selectedNode&&e.selectedNode&&(y.removeCssClass(e.selectedNode,"ace_selected"),M.removeAttribute("aria-activedescendant"),e.selectedNode.removeAttribute(n),e.selectedNode.removeAttribute("id")),(e.selectedNode=N)&&(y.addCssClass(N,"ace_selected"),g=X(I),N.id=g,A.element.setAttribute("aria-activedescendant",g),M.setAttribute("aria-activedescendant",g),N.setAttribute("role",h),N.setAttribute("aria-roledescription",f("autocomplete.popup.item.aria-roledescription","item")),N.setAttribute("aria-label",e.getData(I).caption||e.getData(I).value),N.setAttribute("aria-setsize",e.data.length),N.setAttribute("aria-posinset",I+1),N.setAttribute("aria-describedby","doc-tooltip"),N.setAttribute(n,"true"))}),function(g,I){g!==r.start.row&&(r.start.row=r.end.row=g,I||e.session._emit("changeBackMarker"),e._emit("changeHoverMarker"))});return e.getHoveredRow=function(){return r.start.row},C.addListener(e.container,"mouseout",function(){e.isMouseOver=!1,s()}),e.on("hide",s),e.on("changeSelection",s),e.session.doc.getLength=function(){return e.data.length},e.session.doc.getLine=function(g){return g=e.data[g],typeof g=="string"?g:g&&g.value||""},(o=e.session.bgTokenizer).$tokenizeRow=function(g){var I=e.data[g],A=[];if(I){for(var N,M,R=(I=typeof I=="string"?{value:I}:I).caption||I.value||I.name,S=R.toLowerCase(),_=(e.filterText||"").toLowerCase(),u=0,E=0,v=0;v<=_.length;v++)v!=E&&(I.matchMask&1<<v||v==_.length)&&(N=_.slice(E,v),E=v,(M=S.indexOf(N,u))!=-1)&&(L(R.slice(u,M),""),u=M+N.length,L(R.slice(M,u),"completion-highlight"));L(R.slice(u,R.length),""),A.push({type:"completion-spacer",value:" "}),I.meta&&A.push({type:"completion-meta",value:I.meta}),I.message&&A.push({type:"completion-message",value:I.message})}return A;function L(G,P){G&&A.push({type:(I.className||"")+(P||""),value:G})}},o.$updateOnChange=i,o.start=i,e.session.$computeWidth=function(){return this.screenWidth=0},e.isOpen=!1,e.isTopdown=!1,e.autoSelect=!0,e.filterText="",e.isMouseOver=!1,e.data=[],e.setData=function(g,I){e.filterText=I||"",e.setValue($.stringRepeat(`
`,g.length),-1),e.data=g||[],e.setRow(0)},e.getData=function(g){return e.data[g]},e.getRow=function(){return l.start.row},e.setRow=function(g){g=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,g)),l.start.row!=g&&(e.selection.clearSelection(),l.start.row=l.end.row=g||0,e.session._emit("changeBackMarker"),e.moveCursorTo(g||0,0),e.isOpen)&&e._signal("select")},e.on("changeSelection",function(){e.isOpen&&e.setRow(e.selection.lead.row),e.renderer.scrollCursorIntoView()}),e.hide=function(){this.container.style.display="none",e.anchorPos=null,e.anchor=null,e.isOpen&&(e.isOpen=!1,this._signal("hide"))},e.tryShow=function(g,I,A,N){if(N||!e.isOpen||!e.anchorPos||!e.anchor||e.anchorPos.top!==g.top||e.anchorPos.left!==g.left||e.anchor!==A){var M=this.container,R=window.innerHeight,S=window.innerWidth,_=this.renderer,u=_.$maxLines*I*1.4,E={top:0,bottom:0,left:0},v=R-g.top-3*this.$borderSize-I,L=g.top-3*this.$borderSize,I=((A=A||(L<=v||u<=v?"bottom":"top"))==="top"?(E.bottom=g.top-this.$borderSize,E.top=E.bottom-u):A==="bottom"&&(E.top=g.top+I+this.$borderSize,E.bottom=E.top+u),0<=E.top&&E.bottom<=R);if(!N&&!I)return!1;_.$maxPixelHeight=I?null:A==="top"?L:v,A==="top"?(M.style.top="",M.style.bottom=R-E.bottom+"px",e.isTopdown=!1):(M.style.top=E.top+"px",M.style.bottom="",e.isTopdown=!0),M.style.display="",u=g.left,u+M.offsetWidth>S&&(u=S-M.offsetWidth),M.style.left=u+"px",M.style.right="",e.isOpen||(e.isOpen=!0,this._signal("show"),a=null),e.anchorPos=g,e.anchor=A}return!0},e.show=function(g,I,A){this.tryShow(g,I,A?"bottom":void 0,!0)},e.goTo=function(g){var I=this.getRow(),A=this.session.getLength()-1;switch(g){case"up":I=I<=0?A:I-1;break;case"down":I=A<=I?-1:I+1;break;case"start":I=0;break;case"end":I=A}this.setRow(I)},e.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},e.$imageSize=0,e.$borderSize=1,e}var F=d("../virtual_renderer").VirtualRenderer,B=d("../editor").Editor,b=d("../range").Range,C=d("../lib/event"),$=d("../lib/lang"),y=d("../lib/dom"),f=d("../config").nls,d=d("./../lib/useragent"),c=d.isSafari?"menu":"listbox",h=d.isSafari?"menuitem":"option",n=d.isSafari?"aria-current":"aria-selected";y.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
    background-color: #CAD6FA;
    z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
    background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
    border: 1px solid #abbffe;
    margin-top: -1px;
    background: rgba(233,233,253,0.4);
    position: absolute;
    z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
    border: 1px solid rgba(109, 150, 13, 0.8);
    background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
    opacity: 0.5;
    margin-left: 0.9em;
}
.ace_completion-message {
    margin-left: 0.9em;
    color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
    color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
    color: #93ca12;
}
.ace_editor.ace_autocomplete {
    width: 300px;
    z-index: 200000;
    border: 1px lightgray solid;
    position: fixed;
    box-shadow: 2px 3px 5px rgba(0,0,0,.2);
    line-height: 1.4;
    background: #fefefe;
    color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
    border: 1px #484747 solid;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
    line-height: 1.4;
    background: #25282c;
    color: #c1c1c1;
}
.ace_autocomplete .ace_text-layer  {
    width: calc(100% - 8px);
}
.ace_autocomplete .ace_line {
    display: flex;
    align-items: center;
}
.ace_autocomplete .ace_line > * {
    min-width: 0;
    flex: 0 0 auto;
}
.ace_autocomplete .ace_line .ace_ {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ace_autocomplete .ace_completion-spacer {
    flex: 1;
}
.ace_autocomplete.ace_loading:after  {
    content: "";
    position: absolute;
    top: 0px;
    height: 2px;
    width: 8%;
    background: blue;
    z-index: 100;
    animation: ace_progress 3s infinite linear;
    animation-delay: 300ms;
    transform: translateX(-100%) scaleX(1);
}
@keyframes ace_progress {
    0% { transform: translateX(-100%) scaleX(1) }
    50% { transform: translateX(625%) scaleX(2) } 
    100% { transform: translateX(1500%) scaleX(3) } 
}
@media (prefers-reduced-motion) {
    .ace_autocomplete.ace_loading:after {
        transform: translateX(625%) scaleX(2);
        animation: none;
     }
}
`,"autocompletion.css",!1),x.AcePopup=J,x.$singleLineEditor=j,x.getAriaId=X}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(U,x,H){function X(j){this.editor=j,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}X.prototype.setScreenReaderContent=function(j){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var F=this.popup.getRow(),J=this.popup.renderer.$textLayer,F=J.element.childNodes[F-J.config.firstRow];if(F){for(var B="doc-tooltip ",b=0;b<this._lines.length;b++)B+="ace-inline-screenreader-line-".concat(b," ");F.setAttribute("aria-describedby",B)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=j.split(/\r\n|\r|\n/),j=this.createCodeBlock(),this.screenReaderDiv.appendChild(j)},X.prototype.destroy=function(){this.screenReaderDiv.remove()},X.prototype.createCodeBlock=function(){var j=document.createElement("pre");j.setAttribute("id","ace-inline-screenreader");for(var J=0;J<this._lines.length;J++){var F=document.createElement("code"),B=(F.setAttribute("id","ace-inline-screenreader-line-".concat(J)),document.createTextNode(this._lines[J]));F.appendChild(B),j.appendChild(F)}return j},x.AceInlineScreenReader=X}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(U,x,H){var X=U("../snippets").snippetManager,j=U("./inline_screenreader").AceInlineScreenReader;function J(){this.editor=null}J.prototype.show=function(F,B,b){if(b=b||"",F&&this.editor&&this.editor!==F&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!F||!B)return!1;this.inlineScreenReader||(this.inlineScreenReader=new j(F));var C=B.snippet?X.getDisplayTextForSnippet(F,B.snippet):B.value;return!(B.hideInlinePreview||!C||!C.startsWith(b)||(this.editor=F,this.inlineScreenReader.setScreenReaderContent(C),(C=C.slice(b.length))===""?F.removeGhostText():F.setGhostText(C),0))},J.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},J.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},J.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},x.AceInline=J}),ace.define("ace/autocomplete/util",["require","exports","module"],function(U,x,H){x.parForEach=function(j,J,F){var B=0,b=j.length;b===0&&F();for(var C=0;C<b;C++)J(j[C],function($,y){++B===b&&F($,y)})};var X=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;x.retrievePrecedingIdentifier=function(j,J,F){F=F||X;for(var B=[],b=J-1;0<=b&&F.test(j[b]);b--)B.push(j[b]);return B.reverse().join("")},x.retrieveFollowingIdentifier=function(j,J,F){F=F||X;for(var B=[],b=J;b<j.length&&F.test(j[b]);b++)B.push(j[b]);return B},x.getCompletionPrefix=function(j){var J,F=j.getCursorPosition(),B=j.session.getLine(F.row);return j.completers.forEach((function(b){b.identifierRegexps&&b.identifierRegexps.forEach((function(C){!J&&C&&(J=this.retrievePrecedingIdentifier(B,F.column,C))}).bind(this))}).bind(this)),J||this.retrievePrecedingIdentifier(B,F.column)},x.triggerAutocomplete=function(j,J){return J=J??j.session.getPrecedingCharacter(),j.completers.some(function(F){if(F.triggerCharacters&&Array.isArray(F.triggerCharacters))return F.triggerCharacters.includes(J)})}}),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(U,x,H){function X(t,e){e.completer&&e.completer.destroy()}var j=U("./keyboard/hash_handler").HashHandler,J=U("./autocomplete/popup").AcePopup,F=U("./autocomplete/inline").AceInline,B=U("./autocomplete/popup").getAriaId,b=U("./autocomplete/util"),C=U("./lib/lang"),$=U("./lib/dom"),y=U("./snippets").snippetManager,f=U("./config"),d=U("./lib/event"),c=U("./lib/scroll").preventParentScroll,h=(Object.defineProperty(n,"completionsForLoading",{get:function(){return[{caption:f.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),n.prototype.$init=function(){return this.popup=new J(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(t){this.insertMatch(),t.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)),d.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},n.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new F,this.inlineRenderer},n.prototype.getPopup=function(){return this.popup||this.$init()},n.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},n.prototype.$seen=function(t){!this.hasSeen.has(t)&&t&&t.completer&&t.completer.onSeen&&typeof t.completer.onSeen=="function"&&(t.completer.onSeen(this.editor,t),this.hasSeen.add(t))},n.prototype.$onPopupChange=function(t){this.inlineRenderer&&this.inlineEnabled?(t=t?null:this.popup.getData(this.popup.getRow()),this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover?this.tooltipTimer.call(null,null):(this.popupTimer.schedule(),this.tooltipTimer.schedule())):(this.popupTimer.call(null,null),this.tooltipTimer.call(null,null))},n.prototype.$updateGhostText=function(t){var l=this.base.row,e=this.base.column,r=this.editor.getCursorPosition().column,l=this.editor.session.getLine(l).slice(e,r);this.inlineRenderer.show(this.editor,t,l)?this.$seen(t):this.inlineRenderer.hide()},n.prototype.$onPopupRender=function(){var t=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&0<this.completions.filtered.length)for(var e=this.popup.getFirstVisibleRow();e<=this.popup.getLastVisibleRow();e++){var r=this.popup.getData(e);!r||t&&!r.hideInlinePreview||this.$seen(r)}},n.prototype.$onPopupShow=function(t){this.$onPopupChange(t),this.stickySelection=!1,0<=this.stickySelectionDelay&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},n.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var t=this.editor.container.parentNode,e=[];t;)e.push(t),t.addEventListener("scroll",this.onLayoutChange,{passive:!0}),t=t.parentNode;this.$elements=e}},n.prototype.unObserveLayoutChanges=function(){var t=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(e){e.removeEventListener("scroll",t.onLayoutChange,{passive:!0})}),this.$elements=null},n.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},n.prototype.$updatePopupPosition=function(){var t=this.editor,p=t.renderer,e=p.layerConfig.lineHeight,r=p.$cursorLayer.getPixelPosition(this.base,!0),l=(r.left-=this.popup.getTextLeftOffset(),t.container.getBoundingClientRect()),l=(r.top+=l.top-p.layerConfig.offset,r.left+=l.left-t.renderer.scrollLeft,r.left+=p.gutterWidth,{top:r.top,left:r.left}),p=(p.$ghostText&&p.$ghostTextWidget&&this.base.row===p.$ghostText.position.row&&(l.top+=p.$ghostTextWidget.el.offsetHeight),t.container.getBoundingClientRect().bottom-e);this.popup.tryShow(p<l.top?{top:p,left:l.left}:l,e,"bottom")||this.popup.tryShow(r,e,"top")||this.popup.show(r,e)},n.prototype.openPopup=function(t,e,r){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var l,p=this.popup.getRow(),g=this.popup.data[p],g=(this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:B(this.popup.getRow()),inline:this.inlineEnabled}),t.keyBinding.addKeyboardHandler(this.keyboardHandler),(l=this.stickySelection?this.popup.data.indexOf(g):l)&&l!==-1||(l=0),this.popup.setRow(this.autoSelect?l:-1),l===p&&g!==this.completions.filtered[l]&&this.$onPopupChange(),this.inlineRenderer&&this.inlineEnabled);l===p&&g&&(l=this.popup.getData(this.popup.getRow()),this.$updateGhostText(l)),r||(this.popup.setTheme(t.getTheme()),this.popup.setFontSize(t.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},n.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()},n.prototype.changeListener=function(t){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},n.prototype.blurListener=function(t){var e=document.activeElement,r=this.editor.textInput.getElement(),l=t.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(t.relatedTarget),p=this.popup&&this.popup.container;e==r||e.parentNode==p||l||e==this.tooltipNode||t.relatedTarget==r||this.detach()},n.prototype.mousedownListener=function(t){this.detach()},n.prototype.mousewheelListener=function(t){this.popup&&!this.popup.isMouseOver&&this.detach()},n.prototype.mouseOutListener=function(t){this.popup.isOpen&&this.$updatePopupPosition()},n.prototype.goTo=function(t){this.popup.goTo(t)},n.prototype.insertMatch=function(t,e){var r;return!!(t=t||this.popup.getData(this.popup.getRow()))&&(t.value===""?this.detach():(r=this.completions,t=this.getCompletionProvider().insertMatch(this.editor,t,r.filterText,e),this.completions==r&&this.detach(),t))},n.prototype.showPopup=function(t,e){this.editor&&this.detach(),this.activated=!0,(this.editor=t).completer!=this&&(t.completer&&t.completer.detach(),t.completer=this),t.on("changeSelection",this.changeListener),t.on("blur",this.blurListener),t.on("mousedown",this.mousedownListener),t.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,e)},n.prototype.getCompletionProvider=function(t){return this.completionProvider||(this.completionProvider=new o(t)),this.completionProvider},n.prototype.gatherCompletions=function(t,e){return this.getCompletionProvider().gatherCompletions(t,e)},n.prototype.updateCompletions=function(t,e){var r,l;return t&&this.base&&this.completions?(r=this.editor.getCursorPosition(),(l=this.editor.session.getTextRange({start:this.base,end:r}))==this.completions.filterText?void 0:(this.completions.setFilter(l),this.completions.filtered.length&&(this.completions.filtered.length!=1||this.completions.filtered[0].value!=l||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,l,t):this.detach())):e&&e.matches?(r=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new s(e.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t)):(e=this.editor.getSession(),r=this.editor.getCursorPosition(),l=b.getCompletionPrefix(this.editor),this.base=e.doc.createAnchor(r.row,r.column-l.length),this.base.$insertRight=!0,e={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption},this.getCompletionProvider({prefix:l,pos:r}).provideCompletions(this.editor,e,(function(p,g,I){var A,N=g.filtered,M=b.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),I){if(!N.length)return(A=typeof(A=!this.autoShown&&this.emptyMessage)=="function"?this.emptyMessage(M):A)?(this.completions=new s([{caption:A,value:""}]),this.openPopup(this.editor,M,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)):this.detach();if(N.length==1&&N[0].value==M&&!N[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&N.length==1)return this.insertMatch(N[0])}this.completions=!I&&this.showLoadingState?new s(n.completionsForLoading.concat(N),g.filterText):g,this.openPopup(this.editor,M,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!I)}).bind(this)),void(!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)))},n.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},n.prototype.updateDocTooltip=function(){var t=this.popup,e=this.completions.filtered,r=e&&(e[t.getHoveredRow()]||e[t.getRow()]),l=null;if(!r||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var p=this.editor.completers.length,g=0;g<p;g++){var I=this.editor.completers[g];if(I.getDocTooltip&&r.completerId===I.id){l=I.getDocTooltip(r);break}}if(!(l=typeof(l=l||typeof r=="string"?l:r)=="string"?{docText:l}:l)||!l.docHTML&&!l.docText)return this.hideDocTooltip();this.showDocTooltip(l)},n.prototype.showDocTooltip=function(r){this.tooltipNode||(this.tooltipNode=$.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",c));var e=this.editor.renderer.theme,e=(this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(e.isDark?"ace_dark ":"")+(e.cssClass||""),this.tooltipNode),r=(r.docHTML?e.innerHTML=r.docHTML:r.docText&&(e.textContent=r.docText),e.parentNode||this.popup.container.appendChild(this.tooltipNode),this.popup),l=r.container.getBoundingClientRect();e.style.top=r.container.style.top,e.style.bottom=r.container.style.bottom,e.style.display="block",window.innerWidth-l.right<320?l.left<320?(r.isTopdown?e.style.top=l.bottom+"px":e.style.top=r.container.offsetTop-e.offsetHeight+"px",e.style.left=l.left+"px",e.style.right="",e.style.bottom=""):(e.style.right=window.innerWidth-l.left+"px",e.style.left=""):(e.style.left=l.right+1+"px",e.style.right="")},n.prototype.hideDocTooltip=function(){var t;this.tooltipTimer.cancel(),this.tooltipNode&&(t=this.tooltipNode,this.editor.isFocused()||document.activeElement!=t||this.editor.focus(),this.tooltipNode=null,t.parentNode)&&t.parentNode.removeChild(t)},n.prototype.onTooltipClick=function(t){for(var e=t.target;e&&e!=this.tooltipNode;){if(e.nodeName=="A"&&e.href){e.rel="noreferrer",e.target="_blank";break}e=e.parentNode}},n.prototype.destroy=function(){var t;this.detach(),this.popup&&(this.popup.destroy(),t=this.popup.container)&&t.parentNode&&t.parentNode.removeChild(t),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",X),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},n);function n(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new j,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=C.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=C.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=C.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=C.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=C.delayedCall((function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new s(n.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}h.prototype.commands={Up:function(t){t.completer.goTo("up")},Down:function(t){t.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(t){t.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(t){t.completer.goTo("end")},Esc:function(t){t.completer.detach()},Return:function(t){return t.completer.insertMatch()},"Shift-Return":function(t){t.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(t){var e=t.completer.insertMatch();if(e||t.tabstopManager)return e;t.completer.goTo("down")},Backspace:function(t){t.execCommand("backspace"),!b.getCompletionPrefix(t)&&t.completer&&t.completer.detach()},PageUp:function(t){t.completer.popup.gotoPageUp()},PageDown:function(t){t.completer.popup.gotoPageDown()}},h.for=function(t){return t.completer instanceof h||(t.completer&&(t.completer.destroy(),t.completer=null),f.get("sharedPopups")?(h.$sharedInstance||(h.$sharedInstance=new h),t.completer=h.$sharedInstance):(t.completer=new h,t.once("destroy",X))),t.completer},h.startCommand={name:"startAutocomplete",exec:function(t,e){var r=h.for(t);r.autoInsert=!1,r.autoSelect=!0,r.autoShown=!1,r.showPopup(t,e),r.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"},i.prototype.insertByIndex=function(t,e,r){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(t,this.completions.filtered[e],r)},i.prototype.insertMatch=function(t,e,r){if(!e)return!1;if(t.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(t,e);else{if(!this.completions)return!1;var l=this.completions.filterText.length,p=0;if(e.range&&e.range.start.row===e.range.end.row&&(l=(l-=this.initialPosition.prefix.length)+(this.initialPosition.pos.column-e.range.start.column),p+=e.range.end.column-this.initialPosition.pos.column),l||p)for(var g,I=t.selection.getAllRanges?t.selection.getAllRanges():[t.getSelectionRange()],A=0;g=I[A];A++)g.start.column-=l,g.end.column+=p,t.session.remove(g);e.snippet?y.insertSnippet(t,e.snippet):this.$insertString(t,e),e.completer&&e.completer.onInsert&&typeof e.completer.onInsert=="function"&&e.completer.onInsert(t,e),e.command&&e.command==="startAutocomplete"&&t.execCommand(e.command)}return t.endOperation(),!0},i.prototype.$insertString=function(t,e){e=e.value||e,t.execCommand("insertstring",e)},i.prototype.gatherCompletions=function(t,e){var r=t.getSession(),l=t.getCursorPosition(),p=b.getCompletionPrefix(t),g=[],I=(this.completers=t.completers,t.completers.length);return t.completers.forEach(function(A,N){A.getCompletions(t,r,l,p,function(M,R){A.hideInlinePreview&&(R=R.map(function(S){return Object.assign(S,{hideInlinePreview:A.hideInlinePreview})})),!M&&R&&(g=g.concat(R)),e(null,{prefix:b.getCompletionPrefix(t),matches:g,finished:--I==0})})}),!0},i.prototype.provideCompletions=function(t,e,r){var l=(function(I){var A=I.prefix,N=I.matches;this.completions=new s(N),e.exactMatch&&(this.completions.exactMatch=!0),e.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(A),(I.finished||this.completions.filtered.length)&&r(null,this.completions,I.finished)}).bind(this),p=!0,g=null;this.gatherCompletions(t,(function(I,A){this.active&&(I&&(r(I,[],!0),this.detach()),A.prefix.indexOf(A.prefix)===0)&&(p?g=A:l(A))}).bind(this)),p=!1,g&&(t=g,g=null,l(t))},i.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(t){typeof t.cancel=="function"&&t.cancel()})};var o=i;function i(t){this.initialPosition=t,this.active=!0}a.prototype.setFilter=function(t){e=t.length>this.filterText&&t.lastIndexOf(this.filterText,0)===0?this.filtered:this.all,this.filterText=t,e=(e=this.filterCompletions(e,this.filterText)).sort(function(l,p){return p.exactMatch-l.exactMatch||p.$score-l.$score||(l.caption||l.value).localeCompare(p.caption||p.value)});var e,r=null;e=e.filter(function(l){return l=l.snippet||l.caption||l.value,l!==r&&(r=l,!0)}),this.filtered=e},a.prototype.filterCompletions=function(t,e){var r=[],l=e.toUpperCase(),p=e.toLowerCase();e:for(var g,I=0;g=t[I];I++){var A=!this.ignoreCaption&&g.caption||g.value||g.snippet;if(A){var N=-1,M=0,R=0;if(this.exactMatch){if(e!==A.substr(0,e.length))continue}else{var S=A.toLowerCase().indexOf(p);if(-1<S)R=S;else for(var _=0;_<e.length;_++){var u=A.indexOf(p[_],N+1),E=A.indexOf(l[_],N+1);if((u=0<=u&&(E<0||u<E)?u:E)<0)continue e;0<(E=u-N-1)&&(N===-1&&(R+=10),R+=E,M|=1<<_),N=u}}g.matchMask=M,g.exactMatch=R?0:1,g.$score=(g.score||0)-R,r.push(g)}}return r};var s=a;function a(t,e){this.all=t,this.filtered=t,this.filterText=e||"",this.exactMatch=!1,this.ignoreCaption=!1}x.Autocomplete=h,x.CompletionProvider=o,x.FilteredList=s}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(U,x,H){var X=U("../range").Range,j=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function J(F,B){var b=F.getTextRange(X.fromPoints({row:0,column:0},B)).split(j).length-1,C=F.getValue().split(j),$=Object.create(null),y=C[b];return C.forEach(function(f,d){f&&f!==y&&(d=Math.abs(b-d),d=C.length-d,$[f]?$[f]=Math.max(d,$[f]):$[f]=d)}),$}x.getCompletions=function(F,B,b,C,$){var y=J(B,b);$(null,Object.keys(y).map(function(f){return{caption:f,value:f,score:y[f],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(U,x,H){function X(a,t){h(t.session.$mode)}function j(a){var t=a.editor,e=t.completer&&t.completer.activated;a.command.name==="backspace"?e&&!$.getCompletionPrefix(t)&&t.completer.detach():a.command.name!=="insertstring"||e||((t=(J=a).editor.$liveAutocompletionDelay)?o.delay(t):i(a))}var J,F=U("../snippets").snippetManager,B=U("../autocomplete").Autocomplete,b=U("../config"),C=U("../lib/lang"),$=U("../autocomplete/util"),s=U("../autocomplete/text_completer"),y={getCompletions:function(a,t,e,r,l){if(t.$mode.completer)return t.$mode.completer.getCompletions(a,t,e,r,l);a=a.session.getState(e.row),l(null,t.$mode.getCompletions(a,t,e,r).map(function(p){return p.completerId=y.id,p}))},id:"keywordCompleter"},f={getCompletions:function(a,g,e,r,l){var p=[],g=g.getTokenAt(e.row,e.column),I=(g&&g.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?p.push("html-tag"):p=F.getActiveScopes(a),F.snippetMap),A=[];p.forEach(function(N){for(var M=I[N]||[],R=M.length;R--;){var S=M[R],_=S.name||S.tabTrigger;_&&A.push({caption:_,snippet:S.content,meta:S.tabTrigger&&!S.name?S.tabTrigger+"⇥ ":"snippet",completerId:f.id})}},this),l(null,A)},getDocTooltip:function(a){var t;a.snippet&&!a.docHTML&&(a.docHTML=["<b>",C.escapeHTML(a.caption),"</b>","<hr></hr>",C.escapeHTML((a=a.snippet,t={},a.replace(/\${(\d+)(:(.*?))?}/g,function(e,r,l,p){return t[r]=p||""}).replace(/\$(\d+?)/g,function(e,r){return t[r]})))].join(""))},id:"snippetCompleter"},d=[f,s,y],c=(x.setCompleters=function(a){d.length=0,a&&d.push.apply(d,a)},x.addCompleter=function(a){d.push(a)},x.textCompleter=s,x.keyWordCompleter=y,x.snippetCompleter=f,{name:"expandSnippet",exec:function(a){return F.expandWithTab(a)},bindKey:"Tab"}),h=function(a){(a=typeof a=="string"?b.$modes[a]:a)&&(F.files||(F.files={}),n(a.$id,a.snippetFileId),a.modes)&&a.modes.forEach(h)},n=function(a,t){t&&a&&!F.files[a]&&(F.files[a]={},b.loadModule(t,function(e){e&&(!(F.files[a]=e).snippets&&e.snippetText&&(e.snippets=F.parseSnippetFile(e.snippetText)),F.register(e.snippets||[],e.scope),e.includeScopes)&&(F.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach(function(r){h("ace/mode/"+r)}))}))},o=C.delayedCall(function(){i(J)},0),i=function(r){var t=r.editor,e=$.getCompletionPrefix(t),r=r.args,r=$.triggerAutocomplete(t,r);(e&&e.length>=t.$liveAutocompletionThreshold||r)&&((e=B.for(t)).autoShown=!0,e.showPopup(t))},s=U("../editor").Editor;U("../config").defineOptions(s.prototype,"editor",{enableBasicAutocompletion:{set:function(a){a?(this.completers||(this.completers=Array.isArray(a)?a:d),this.commands.addCommand(B.startCommand)):this.commands.removeCommand(B.startCommand)},value:!1},enableLiveAutocompletion:{set:function(a){a?(this.completers||(this.completers=Array.isArray(a)?a:d),this.commands.on("afterExec",j)):this.commands.off("afterExec",j)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(a){a?(this.commands.addCommand(c),this.on("changeMode",X),X(0,this)):(this.commands.removeCommand(c),this.off("changeMode",X))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(U){le&&(le.exports=U)})},6534:function(le,m,Z){le=Z.nmd(le),ace.define("ace/ext/searchbox-css",["require","exports","module"],function(U,x,H){H.exports=`

/* ------------------------------------------------------------------------------------------
 * Editor Search Form
 * --------------------------------------------------------------------------------------- */
.ace_search {
    background-color: #ddd;
    color: #666;
    border: 1px solid #cbcbcb;
    border-top: 0 none;
    overflow: hidden;
    margin: 0;
    padding: 4px 6px 0 4px;
    position: absolute;
    top: 0;
    z-index: 99;
    white-space: normal;
}
.ace_search.left {
    border-left: 0 none;
    border-radius: 0px 0px 5px 0px;
    left: 0;
}
.ace_search.right {
    border-radius: 0px 0px 0px 5px;
    border-right: 0 none;
    right: 0;
}

.ace_search_form, .ace_replace_form {
    margin: 0 20px 4px 0;
    overflow: hidden;
    line-height: 1.9;
}
.ace_replace_form {
    margin-right: 0;
}
.ace_search_form.ace_nomatch {
    outline: 1px solid red;
}

.ace_search_field {
    border-radius: 3px 0 0 3px;
    background-color: white;
    color: black;
    border: 1px solid #cbcbcb;
    border-right: 0 none;
    outline: 0;
    padding: 0;
    font-size: inherit;
    margin: 0;
    line-height: inherit;
    padding: 0 6px;
    min-width: 17em;
    vertical-align: top;
    min-height: 1.8em;
    box-sizing: content-box;
}
.ace_searchbtn {
    border: 1px solid #cbcbcb;
    line-height: inherit;
    display: inline-block;
    padding: 0 6px;
    background: #fff;
    border-right: 0 none;
    border-left: 1px solid #dcdcdc;
    cursor: pointer;
    margin: 0;
    position: relative;
    color: #666;
}
.ace_searchbtn:last-child {
    border-radius: 0 3px 3px 0;
    border-right: 1px solid #cbcbcb;
}
.ace_searchbtn:disabled {
    background: none;
    cursor: default;
}
.ace_searchbtn:hover {
    background-color: #eef1f6;
}
.ace_searchbtn.prev, .ace_searchbtn.next {
     padding: 0px 0.7em
}
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
     content: "";
     border: solid 2px #888;
     width: 0.5em;
     height: 0.5em;
     border-width:  2px 0 0 2px;
     display:inline-block;
     transform: rotate(-45deg);
}
.ace_searchbtn.next:after {
     border-width: 0 2px 2px 0 ;
}
.ace_searchbtn_close {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
    border-radius: 50%;
    border: 0 none;
    color: #656565;
    cursor: pointer;
    font: 16px/16px Arial;
    padding: 0;
    height: 14px;
    width: 14px;
    top: 9px;
    right: 7px;
    position: absolute;
}
.ace_searchbtn_close:hover {
    background-color: #656565;
    background-position: 50% 100%;
    color: white;
}

.ace_button {
    margin-left: 2px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
    opacity: 0.7;
    border: 1px solid rgba(100,100,100,0.23);
    padding: 1px;
    box-sizing:    border-box!important;
    color: black;
}

.ace_button:hover {
    background-color: #eee;
    opacity:1;
}
.ace_button:active {
    background-color: #ddd;
}

.ace_button.checked {
    border-color: #3399ff;
    opacity:1;
}

.ace_search_options{
    margin-bottom: 3px;
    text-align: right;
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    -ms-user-select: none;
    user-select: none;
    clear: both;
}

.ace_search_counter {
    float: left;
    font-family: arial;
    padding: 0 8px;
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(U,x,H){var X=U("../lib/dom"),j=U("../lib/lang"),J=U("../lib/event"),F=U("./searchbox-css"),B=U("../keyboard/hash_handler").HashHandler,b=U("../lib/keys"),C=U("../config").nls,$=(X.importCssString(F,"ace_searchbox",!1),y.prototype.setEditor=function(f){f.searchBox=this,f.renderer.scroller.appendChild(this.element),this.editor=f},y.prototype.setSession=function(f){this.searchRange=null,this.$syncOptions(!0)},y.prototype.$initElements=function(f){this.searchBox=f.querySelector(".ace_search_form"),this.replaceBox=f.querySelector(".ace_replace_form"),this.searchOption=f.querySelector("[action=searchInSelection]"),this.replaceOption=f.querySelector("[action=toggleReplace]"),this.regExpOption=f.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=f.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=f.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=f.querySelector(".ace_search_counter")},y.prototype.$init=function(){var f=this.element,d=(this.$initElements(f),this);J.addListener(f,"mousedown",function(c){setTimeout(function(){d.activeInput.focus()},0),J.stopPropagation(c)}),J.addListener(f,"click",function(c){var h=(c.target||c.srcElement).getAttribute("action");h&&d[h]?d[h]():d.$searchBarKb.commands[h]&&d.$searchBarKb.commands[h].exec(d),J.stopPropagation(c)}),J.addCommandKeyListener(f,function(c,h,n){n=b.keyCodeToString(n),h=d.$searchBarKb.findKeyCommand(h,n),h&&h.exec&&(h.exec(d),J.stopEvent(c))}),this.$onChange=j.delayedCall(function(){d.find(!1,!1)}),J.addListener(this.searchInput,"input",function(){d.$onChange.schedule(20)}),J.addListener(this.searchInput,"focus",function(){d.activeInput=d.searchInput,d.searchInput.value&&d.highlight()}),J.addListener(this.replaceInput,"focus",function(){d.activeInput=d.replaceInput,d.searchInput.value&&d.highlight()})},y.prototype.setSearchRange=function(f){(this.searchRange=f)?this.searchRangeMarker=this.editor.session.addMarker(f,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},y.prototype.$syncOptions=function(f){X.setCssClass(this.replaceOption,"checked",this.searchRange),X.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",X.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),X.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),X.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var d=this.editor.getReadOnly();this.replaceOption.style.display=d?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!d?"":"none",this.find(!1,!1,f)},y.prototype.highlight=function(f){this.editor.session.highlight(f||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},y.prototype.find=function(f,d,c){f=!this.editor.find(this.searchInput.value,{skipCurrent:f,backwards:d,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:c,range:this.searchRange})&&this.searchInput.value,X.setCssClass(this.searchBox,"ace_nomatch",f),this.editor._emit("findSearchBox",{match:!f}),this.highlight(),this.updateCounter()},y.prototype.updateCounter=function(){var f=this.editor,d=f.$search.$options.re,c=d.unicode,h=0,n=0;if(d){var o,i,s=this.searchRange?f.session.getTextRange(this.searchRange):f.getValue(),a=f.session.doc.positionToIndex(f.selection.anchor);for(this.searchRange&&(a-=f.session.doc.positionToIndex(this.searchRange.start)),d.lastIndex=0;(i=d.exec(s))&&((o=i.index)<=a&&n++,!(999<++h))&&(i[0]||(d.lastIndex=o+=j.skipEmptyMatch(s,o,c),!(o>=s.length))););}this.searchCounter.textContent=C("search-box.search-counter","$0 of $1",[n,999<h?"999+":h])},y.prototype.findNext=function(){this.find(!0,!1)},y.prototype.findPrev=function(){this.find(!0,!0)},y.prototype.findAll=function(){var f=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;X.setCssClass(this.searchBox,"ace_nomatch",f),this.editor._emit("findSearchBox",{match:!f}),this.highlight(),this.hide()},y.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},y.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},y.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},y.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},y.prototype.show=function(f,d){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=d,f&&(this.searchInput.value=f),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},y.prototype.isFocused=function(){var f=document.activeElement;return f==this.searchInput||f==this.replaceInput},y);function y(f,d,c){this.activeInput;var h=X.createElement("div");X.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:C("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},C("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:C("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},C("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},C("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:C("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:C("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:C("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:C("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:C("search-box.toggle-in-selection.title","Search In Selection")},"S"]]],h),this.element=h.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(f),X.importCssString(F,"ace_searchbox",f.container)}U=new B,U.bindKeys({"Ctrl-f|Command-f":function(f){var d=f.isReplace=!f.isReplace;f.replaceBox.style.display=d?"":"none",f.replaceOption.checked=!1,f.$syncOptions(),f.searchInput.focus()},"Ctrl-H|Command-Option-F":function(f){f.editor.getReadOnly()||(f.replaceOption.checked=!0,f.$syncOptions(),f.replaceInput.focus())},"Ctrl-G|Command-G":function(f){f.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(f){f.findPrev()},esc:function(f){setTimeout(function(){f.hide()})},Return:function(f){f.activeInput==f.replaceInput&&f.replace(),f.findNext()},"Shift-Return":function(f){f.activeInput==f.replaceInput&&f.replace(),f.findPrev()},"Alt-Return":function(f){f.activeInput==f.replaceInput&&f.replaceAll(),f.findAll()},Tab:function(f){(f.activeInput==f.replaceInput?f.searchInput:f.replaceInput).focus()}}),U.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(f){f.regExpOption.checked=!f.regExpOption.checked,f.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(f){f.caseSensitiveOption.checked=!f.caseSensitiveOption.checked,f.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(f){f.wholeWordOption.checked=!f.wholeWordOption.checked,f.$syncOptions()}},{name:"toggleReplace",exec:function(f){f.replaceOption.checked=!f.replaceOption.checked,f.$syncOptions()}},{name:"searchInSelection",exec:function(f){f.searchOption.checked=!f.searchRange,f.setSearchRange(f.searchOption.checked&&f.editor.getSelectionRange()),f.$syncOptions()}}]),B=new B([{bindKey:"Esc",name:"closeSearchBar",exec:function(f){f.searchBox.hide()}}]),$.prototype.$searchBarKb=U,$.prototype.$closeSearchBarKb=B,x.SearchBox=$,x.Search=function(f,d){(f.searchBox||new $(f)).show(f.session.getTextRange(),d)}}),ace.require(["ace/ext/searchbox"],function(U){le&&(le.exports=U)})},4221:function(le,m,Z){le=Z.nmd(le),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(J,x,H){function X(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}}var j=J("../lib/oop"),J=J("./text_highlight_rules").TextHighlightRules;j.inherits(X,J),x.JsonHighlightRules=X}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(U,x,H){function X(){}var j=U("../range").Range;(function(){this.checkOutdent=function(J,F){return!!/^\s+$/.test(J)&&/^\s*\}/.test(F)},this.autoOutdent=function(J,F){var B,b=J.getLine(F).match(/^(\s*\})/);return b&&(b=b[1].length,B=J.findMatchingBracket({row:F,column:b}))&&B.row!=F?(B=this.$getIndent(J.getLine(B.row)),void J.replace(new j(F,0,F,b-1),B)):0},this.$getIndent=function(J){return J.match(/^\s*/)[0]}}).call(X.prototype),x.MatchingBraceOutdent=X}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(J,F,H){var X=J("../../lib/oop"),j=J("../../range").Range,J=J("./fold_mode").FoldMode,F=F.FoldMode=function(B){B&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+B.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+B.end)))};X.inherits(F,J),(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(B,b,C){var $=B.getLine(C);return!this.singleLineBlockCommentRe.test($)||this.startRegionRe.test($)||this.tripleStarBlockCommentRe.test($)?!(B=this._getFoldWidgetBase(B,b,C))&&this.startRegionRe.test($)?"start":B:""},this.getFoldWidgetRange=function(B,b,C,$){var y,f,d,c=B.getLine(C);return this.startRegionRe.test(c)?this.getCommentRegionBlock(B,c,C):(f=c.match(this.foldingStartMarker))?(d=f.index,f[1]?this.openingBracketBlock(B,f[1],C,d):((y=B.getCommentFoldRange(C,d+f[0].length,1))&&!y.isMultiLine()&&($?y=this.getSectionRange(B,C):b!="all"&&(y=null)),y)):b!=="markbegin"&&(f=c.match(this.foldingStopMarker))?(d=f.index+f[0].length,f[1]?this.closingBracketBlock(B,f[1],C,d):B.getCommentFoldRange(C,d,-1)):void 0},this.getSectionRange=function(B,b){for(var C=(c=B.getLine(b)).search(/\S/),$=b,y=c.length,f=b+=1,d=B.getLength();++b<d;){var c,h=(c=B.getLine(b)).search(/\S/);if(h!==-1){if(h<C)break;var n=this.getFoldWidgetRange(B,"all",b);if(n){if(n.start.row<=$)break;if(n.isMultiLine())b=n.end.row;else if(C==h)break}f=b}}return new j($,y,f,B.getLine(f).length)},this.getCommentRegionBlock=function(B,b,C){for(var $=b.search(/\s*$/),y=B.getLength(),f=C,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++C<y;){b=B.getLine(C);var h=d.exec(b);if(h&&(h[1]?c--:c++,!c))break}if(f<C)return new j(f,$,C,b.length)}}).call(F.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(U,x,H){function X(){this.HighlightRules=F,this.$outdent=new B,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new b}var j=U("../lib/oop"),J=U("./text").Mode,F=U("./json_highlight_rules").JsonHighlightRules,B=U("./matching_brace_outdent").MatchingBraceOutdent,b=U("./folding/cstyle").FoldMode,C=U("../worker/worker_client").WorkerClient;j.inherits(X,J),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function($,y,f){var d=this.$getIndent(y);return $=="start"&&y.match(/^.*[\{\(\[]\s*$/)&&(d+=f),d},this.checkOutdent=function($,y,f){return this.$outdent.checkOutdent(y,f)},this.autoOutdent=function($,y,f){this.$outdent.autoOutdent(y,f)},this.createWorker=function($){var y=new C(["ace"],"ace/mode/json_worker","JsonWorker");return y.attachToDocument($.getDocument()),y.on("annotate",function(f){$.setAnnotations(f.data)}),y.on("terminate",function(){$.clearAnnotations()}),y},this.$id="ace/mode/json"}).call(X.prototype),x.Mode=X}),ace.require(["ace/mode/json"],function(U){le&&(le.exports=U)})},2229:function(C,m,Z){var U=Z(2620),x=Z(4292),H=Z(9336),X=Z(4427),j=Z(9306),J=Z(2084),F=Z(3483),B=Z(8852),b=Z(6862),C=((C.exports=d).prototype.validate=function(t,e){var r;if(typeof t=="string"){if(!(r=this.getSchema(t)))throw new Error('no schema with key or ref "'+t+'"')}else t=this._addSchema(t),r=t.validate||this._compile(t);return t=r(e),r.$async!==!0&&(this.errors=r.errors),t},d.prototype.compile=function(t,e){return t=this._addSchema(t,void 0,e),t.validate||this._compile(t)},d.prototype.addSchema=function(t,e,r,l){if(Array.isArray(t))for(var p=0;p<t.length;p++)this.addSchema(t[p],void 0,r,l);else{var g=this._getId(t);if(g!==void 0&&typeof g!="string")throw new Error("schema id must be string");s(this,e=x.normalizeId(e||g)),this._schemas[e]=this._addSchema(t,r,l,!0)}return this},d.prototype.addMetaSchema=function(t,e,r){return this.addSchema(t,e,r,!0),this},d.prototype.validateSchema=function(t,e){var r=t.$schema;if(r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(l){var p=l._opts.meta;return l._opts.defaultMeta=typeof p=="object"?l._getId(p)||p:l.getSchema($)?$:void 0,l._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(r=this.validate(r,t),!r&&e){if(t="schema is invalid: "+this.errorsText(),this._opts.validateSchema!="log")throw new Error(t);this.logger.error(t)}return r},d.prototype.getSchema=function(t){var e=c(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return function(r,l){var p=x.schema.call(r,{schema:{}},l);{var g,I,A;if(p)return g=p.schema,I=p.root,p=p.baseId,A=U.call(r,g,I,void 0,p),r._fragments[l]=new X({ref:l,fragment:!0,schema:g,root:I,baseId:p,validate:A}),A}}(this,t)}},d.prototype.removeSchema=function(t){if(t instanceof RegExp)h(this,this._schemas,t),h(this,this._refs,t);else switch(typeof t){case"undefined":return h(this,this._schemas),h(this,this._refs),this._cache.clear(),this;case"string":var e=c(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":e=this._opts.serialize,e=e?e(t):t,e=(this._cache.del(e),this._getId(t)),e&&(e=x.normalizeId(e),delete this._schemas[e],delete this._refs[e])}return this},d.prototype.addFormat=function(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this},d.prototype.errorsText=function(t,e){if(!(t=t||this.errors))return"No errors";for(var r=(e=e||{}).separator===void 0?", ":e.separator,l=e.dataVar===void 0?"data":e.dataVar,p="",g=0;g<t.length;g++){var I=t[g];I&&(p+=l+I.dataPath+" "+I.message+r)}return p.slice(0,-r.length)},d.prototype._addSchema=function(t,A,r,l){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var p=this._opts.serialize,p=p?p(t):t,g=this._cache.get(p);if(g)return g;l=l||this._opts.addUsedSchema!==!1,g=x.normalizeId(this._getId(t)),g&&l&&s(this,g);var I,A=this._opts.validateSchema!==!1&&!A;A&&!(I=g&&g==x.normalizeId(t.$schema))&&this.validateSchema(t,!0);var N=x.ids.call(this,t),N=new X({id:g,schema:t,localRefs:N,cacheKey:p,meta:r});return g[0]!="#"&&l&&(this._refs[g]=N),this._cache.put(p,N),A&&I&&this.validateSchema(t,!0),N},d.prototype._compile=function(t,e){if(t.compiling)return(t.validate=p).schema=t.schema,p.errors=null,p.root=e||p,t.schema.$async===!0&&(p.$async=!0),p;var r,l;t.compiling=!0,t.meta&&(r=this._opts,this._opts=this._metaOpts);try{l=U.call(this,t.schema,e,t.localRefs)}catch(g){throw delete t.validate,g}finally{t.compiling=!1,t.meta&&(this._opts=r)}return t.validate=l,t.refs=l.refs,t.refVal=l.refVal,t.root=l.root,l;function p(){var g=t.validate,I=g.apply(this,arguments);return p.errors=g.errors,I}},d.prototype.compileAsync=Z(600),Z(413)),C=(d.prototype.addKeyword=C.add,d.prototype.getKeyword=C.get,d.prototype.removeKeyword=C.remove,d.prototype.validateKeyword=C.validate,Z(3689)),$=(d.ValidationError=C.Validation,d.MissingRefError=C.MissingRef,d.$dataMetaSchema=B,"http://json-schema.org/draft-07/schema"),y=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],f=["/properties"];function d(t){if(!(this instanceof d))return new d(t);t=this._opts=b.copy(t)||{};var M=this,e=M._opts.logger;if(e===!1)M.logger={log:a,warn:a,error:a};else{if(!(typeof(e=e===void 0?console:e)=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");M.logger=e}if(this._schemas={},this._refs={},this._fragments={},this._formats=J(t.format),this._cache=t.cache||new H,this._loadingSchemas={},this._compilations=[],this.RULES=F(),this._getId=function(u){switch(u.schemaId){case"auto":return i;case"id":return n;default:return o}}(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=j),this._metaOpts=function(u){for(var E=b.copy(u._opts),v=0;v<y.length;v++)delete E[y[v]];return E}(this),t.formats){var r,l=this;for(r in l._opts.formats){var p=l._opts.formats[r];l.addFormat(r,p)}}if(t.keywords){var g,I=this;for(g in I._opts.keywords){var A=I._opts.keywords[g];I.addKeyword(g,A)}}var N,M=this,R=(M._opts.$data&&(N=Z(3420),M.addMetaSchema(N,N.$id,!0)),M._opts.meta!==!1&&(N=Z(8198),M._opts.$data&&(N=B(N,f)),M.addMetaSchema(N,$,!0),M._refs["http://json-schema.org/schema"]=$),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),this),S=R._opts.schemas;if(S)if(Array.isArray(S))R.addSchema(S);else for(var _ in S)R.addSchema(S[_],_)}function c(t,e){return e=x.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function h(t,e,r){for(var l in e){var p=e[l];p.meta||r&&!r.test(l)||(t._cache.del(p.cacheKey),delete e[l])}}function n(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function o(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function i(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function s(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function a(){}},9336:function(le){le=le.exports=function(){this._cache={}},le.prototype.put=function(m,Z){this._cache[m]=Z},le.prototype.get=function(m){return this._cache[m]},le.prototype.del=function(m){delete this._cache[m]},le.prototype.clear=function(){this._cache={}}},600:function(le,m,Z){var U=Z(3689).MissingRef;function x(H,X,j){var J=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof X=="function"&&(j=X,X=void 0);var F=B(H).then(function(){var b=J._addSchema(H,void 0,X);return b.validate||function C($){try{return J._compile($)}catch(f){if(f instanceof U)return y(f);throw f}function y(f){var d=f.missingSchema;if(h(d))throw new Error("Schema "+d+" is loaded but "+f.missingRef+" cannot be resolved");return f=J._loadingSchemas[d],f||(f=J._loadingSchemas[d]=J._opts.loadSchema(d)).then(c,c),f.then(function(n){if(!h(d))return B(n).then(function(){h(d)||J.addSchema(n,d,void 0,X)})}).then(function(){return C($)});function c(){delete J._loadingSchemas[d]}function h(n){return J._refs[n]||J._schemas[n]}}}(b)});return j&&F.then(function(b){j(null,b)},j),F;function B(b){return b=b.$schema,b&&!J.getSchema(b)?x.call(J,{$ref:b},!0):Promise.resolve()}}le.exports=x},3689:function(le,m,Z){var U=Z(4292);function x(X,j,J){this.message=J||x.message(X,j),this.missingRef=U.url(X,j),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function H(X){return X.prototype=Object.create(Error.prototype),X.prototype.constructor=X}le.exports={Validation:H(function(X){this.message="validation failed",this.errors=X,this.ajv=this.validation=!0}),MissingRef:H(x)},x.message=function(X,j){return"can't resolve reference "+j+" from id "+X}},2084:function(le,m,j){var U=j(6862),x=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,H=[0,31,28,31,30,31,30,31,31,30,31,30,31],X=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,j=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,J=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,F=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,B=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,b=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,C=/^(?:\/(?:[^~/]|~0|~1)*)*$/,$=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(s){return U.copy(f[s=s=="full"?"full":"fast"])}function d(e){var a,t,e=e.match(x);return!!e&&(a=+e[1],t=+e[2],e=+e[3],1<=t)&&t<=12&&1<=e&&e<=(t!=2||(e=a)%4!=0||e%100==0&&e%400!=0?H[t]:29)}function c(l,a){var t,e,r,l=l.match(X);return!!l&&(t=l[1],e=l[2],r=l[3],l=l[5],t<=23&&e<=59&&r<=59||t==23&&e==59&&r==60)&&(!a||l)}(le.exports=f).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":F,url:B,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:b,"json-pointer":C,"json-pointer-uri-fragment":$,"relative-json-pointer":y},f.full={date:d,time:c,"date-time":function(s){return s=s.split(h),s.length==2&&d(s[0])&&c(s[1],!0)},uri:function(s){return n.test(s)&&J.test(s)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":F,url:B,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:b,"json-pointer":C,"json-pointer-uri-fragment":$,"relative-json-pointer":y};var h=/t|\s/i,n=/\/|:/,o=/[^\\]\\Z/;function i(s){if(o.test(s))return!1;try{return new RegExp(s),!0}catch{return!1}}},2620:function(le,m,Z){var U=Z(4292),x=Z(6862),H=Z(3689),X=Z(9306),j=Z(1035),J=x.ucs2length,F=Z(5215),B=H.Validation;function b(h,n,o,i){var s=this,a=this._opts,t=[void 0],e={},r=[],l={},p=[],g={},I=[],A=(n=n||{schema:h,refVal:t,refs:e},(function(K,te,T){var O=C.call(this,K,te,T);return 0<=O?{index:O,compiling:!0}:(O=this._compilations.length,this._compilations[O]={schema:K,root:te,baseId:T},{index:O,compiling:!1})}).call(this,h,n,i)),N=this._compilations[A.index];if(A.compiling)return N.callValidate=u;var M=this._formats,R=this.RULES;try{var S=E(h,n,o,i),_=(N.validate=S,N.callValidate);return _&&(_.schema=S.schema,_.errors=null,_.refs=S.refs,_.refVal=S.refVal,_.root=S.root,_.$async=S.$async,a.sourceCode)&&(_.source=S.source),S}finally{(function(K,te,T){K=C.call(this,K,te,T),0<=K&&this._compilations.splice(K,1)}).call(this,h,n,i)}function u(){var K=N.validate,te=K.apply(this,arguments);return u.errors=K.errors,te}function E(K,te,T,O){var V=!te||te.schema==K;if(te.schema!=n.schema)return b.call(s,K,te,T,O);T=K.$async===!0,O=j({isTop:!0,schema:K,isRoot:V,baseId:O,root:te,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:H.MissingRef,RULES:R,validate:j,util:x,resolve:U,resolveRef:v,usePattern:P,useDefault:Y,useCustomRule:Q,opts:a,formats:M,logger:s.logger,self:s}),O=c(t,f)+c(r,$)+c(p,y)+c(I,d)+O,a.processCode&&(O=a.processCode(O,K));try{var z=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",O)(s,R,M,n,t,p,I,F,J,B);t[0]=z}catch(w){throw s.logger.error("Error compiling schema, function code:",O),w}return z.schema=K,z.errors=null,z.refs=e,z.refVal=t,z.root=V?z:te,T&&(z.$async=!0),a.sourceCode===!0&&(z.source={code:O,patterns:r,defaults:p}),z}function v(K,te,w){te=U.url(K,te);var O=e[te];if(O!==void 0)return G(V=t[O],z="refVal["+O+"]");if(!w&&n.refs&&(O=n.refs[te],O!==void 0))return G(V=n.refVal[O],z=L(te,V));var V,z=L(te),w=U.call(s,E,n,te);if((w=w===void 0&&(O=o&&o[te])?U.inlineRef(O,a.inlineRefs)?O:b.call(s,O,n,o,K):w)!==void 0)return V=w,O=e[O=te],t[O]=V,G(w,z);delete e[te]}function L(K,te){var T=t.length;return t[T]=te,"refVal"+(e[K]=T)}function G(K,te){return typeof K=="object"||typeof K=="boolean"?{code:te,schema:K,inline:!0}:{code:te,$async:K&&!!K.$async}}function P(K){var te=l[K];return te===void 0&&(te=l[K]=r.length,r[te]=K),"pattern"+te}function Y(K){switch(typeof K){case"boolean":case"number":return""+K;case"string":return x.toQuotedString(K);case"object":var te,T;return K===null?"null":(te=X(K),(T=g[te])===void 0&&(T=g[te]=p.length,p[T]=K),"default"+T)}}function Q(K,te,T,O){if(s._opts.validateSchema!==!1){var z=K.definition.dependencies;if(z&&!z.every(function(D){return Object.prototype.hasOwnProperty.call(T,D)}))throw new Error("parent schema must have all required keywords: "+z.join(","));if(z=K.definition.validateSchema,z&&!z(te)){if(z="keyword schema is invalid: "+s.errorsText(z.errors),s._opts.validateSchema!="log")throw new Error(z);s.logger.error(z)}}var V,z=K.definition.compile,w=K.definition.inline,k=K.definition.macro;if(z)V=z.call(s,te,T,O);else if(k)V=k.call(s,te,T,O),a.validateSchema!==!1&&s.validateSchema(V,!0);else if(w)V=w.call(s,O,K.keyword,te,T);else if(!(V=K.definition.validate))return;if(V===void 0)throw new Error('custom keyword "'+K.keyword+'"failed to compile');return z=I.length,{code:"customRule"+z,validate:I[z]=V}}}function C(h,n,o){for(var i=0;i<this._compilations.length;i++){var s=this._compilations[i];if(s.schema==h&&s.root==n&&s.baseId==o)return i}return-1}function $(h,n){return"var pattern"+h+" = new RegExp("+x.toQuotedString(n[h])+");"}function y(h){return"var default"+h+" = defaults["+h+"];"}function f(h,n){return n[h]===void 0?"":"var refVal"+h+" = refVal["+h+"];"}function d(h){return"var customRule"+h+" = customRules["+h+"];"}function c(h,n){if(!h.length)return"";for(var o="",i=0;i<h.length;i++)o+=n(i,h);return o}le.exports=b},4292:function(le,m,Z){var U=Z(6777),x=Z(5215),H=Z(6862),X=Z(4427),j=Z(4316);function J(n,o,i){var s,a,t,e=this._refs[i];if(typeof e=="string"){if(!this._refs[e])return J.call(this,n,o,e);e=this._refs[e]}return(e=e||this._schemas[i])instanceof X?$(e.schema,this._opts.inlineRefs)?e.schema:e.validate||this._compile(e):((e=F.call(this,o,i))&&(s=e.schema,o=e.root,t=e.baseId),s instanceof X?a=s.validate||n.call(this,s.schema,o,void 0,t):s!==void 0&&(a=$(s,this._opts.inlineRefs)?s:n.call(this,s,o,void 0,t)),a)}function F(n,o){var i=U.parse(o),s=f(i),a=y(this._getId(n.schema));if(Object.keys(n.schema).length===0||s!==a){var s=c(s),t=this._refs[s];if(typeof t=="string")return(function(r,l,p){l=F.call(this,r,l);{var g,I;if(l)return g=l.schema,I=l.baseId,r=l.root,(l=this._getId(g))&&(I=h(I,l)),b.call(this,p,I,g,r)}}).call(this,n,t,i);if(t instanceof X)t.validate||this._compile(t);else{if(!((t=this._schemas[s])instanceof X))return;if(t.validate||this._compile(t),s==c(o))return{schema:t,root:n,baseId:a}}if(!(n=t).schema)return;a=y(this._getId(n.schema))}return b.call(this,i,a,n.schema,n)}(le.exports=J).normalizeId=c,J.fullPath=y,J.url=h,J.ids=function(n){var o=c(this._getId(n)),i={"":o},s={"":y(o,!1)},a={},t=this;return j(n,{allKeys:!0},function(e,r,l,p,g,I,A){if(r!==""){var N=t._getId(e),M=i[p],p=s[p]+"/"+g;if(A!==void 0&&(p+="/"+(typeof A=="number"?A:H.escapeFragment(A))),typeof N=="string"){if(N=M=c(M?U.resolve(M,N):N),g=t._refs[N],(g=typeof g=="string"?t._refs[g]:g)&&g.schema){if(!x(e,g.schema))throw new Error('id "'+N+'" resolves to more than one schema')}else if(N!=c(p))if(N[0]=="#"){if(a[N]&&!x(e,a[N]))throw new Error('id "'+N+'" resolves to more than one schema');a[N]=e}else t._refs[N]=p}i[r]=M,s[r]=p}}),a},J.inlineRef=$,J.schema=F;var B=H.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function b(n,o,i,s){if(n.fragment=n.fragment||"",n.fragment.slice(0,1)=="/"){for(var a=n.fragment.split("/"),t=1;t<a.length;t++){var e=a[t];if(e){if((i=i[e=H.unescapeFragment(e)])===void 0)break;B[e]||((e=this._getId(i))&&(o=h(o,e)),i.$ref&&(e=h(o,i.$ref),e=F.call(this,s,e))&&(i=e.schema,s=e.root,o=e.baseId))}}return i!==void 0&&i!==s.schema?{schema:i,root:s,baseId:o}:void 0}}var C=H.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function $(n,o){return o!==!1&&(o===void 0||o===!0?function i(s){var a;if(Array.isArray(s)){for(var t=0;t<s.length;t++)if(typeof(a=s[t])=="object"&&!i(a))return!1}else for(var e in s)if(e=="$ref"||typeof(a=s[e])=="object"&&!i(a))return!1;return!0}(n):o?function i(s){var a,t=0;if(Array.isArray(s)){for(var e=0;e<s.length;e++)if(typeof(a=s[e])=="object"&&(t+=i(a)),t==1/0)return 1/0}else for(var r in s){if(r=="$ref")return 1/0;if(C[r])t++;else if(typeof(a=s[r])=="object"&&(t+=i(a)+1),t==1/0)return 1/0}return t}(n)<=o:void 0)}function y(n,o){return o!==!1&&(n=c(n)),f(U.parse(n))}function f(n){return U.serialize(n).split("#")[0]+"#"}var d=/#\/?$/;function c(n){return n?n.replace(d,""):""}function h(n,o){return o=c(o),U.resolve(n,o)}},3483:function(le,m,Z){var U=Z(8161),x=Z(6862).toHash;le.exports=function(){var H=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],X=["type","$comment"];return H.all=x(X),H.types=x(["number","integer","string","array","object","boolean","null"]),H.forEach(function(j){j.rules=j.rules.map(function(J){var F,B;return typeof J=="object"&&(B=J[F=Object.keys(J)[0]],J=F,B.forEach(function(b){X.push(b),H.all[b]=!0})),X.push(J),H.all[J]={keyword:J,code:U[J],implements:B}}),H.all.$comment={keyword:"$comment",code:U.$comment},j.type&&(H.types[j.type]=j)}),H.keywords=x(X.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),H.custom={},H}},4427:function(le,m,Z){var U=Z(6862);le.exports=function(x){U.copy(x,this)}},611:function(le){le.exports=function(m){for(var Z,U=0,x=m.length,H=0;H<x;)U++,55296<=(Z=m.charCodeAt(H++))&&Z<=56319&&H<x&&(64512&m.charCodeAt(H))==56320&&H++;return U}},6862:function(le,m,Z){function U(d,c,h,n){var o=n?" !== ":" === ",i=n?" || ":" && ",s=n?"!":"",a=n?"":"!";switch(d){case"null":return c+o+"null";case"array":return s+"Array.isArray("+c+")";case"object":return"("+s+c+i+"typeof "+c+o+'"object"'+i+a+"Array.isArray("+c+"))";case"integer":return"(typeof "+c+o+'"number"'+i+a+"("+c+" % 1)"+i+c+o+c+(h?i+s+"isFinite("+c+")":"")+")";case"number":return"(typeof "+c+o+'"'+d+'"'+(h?i+s+"isFinite("+c+")":"")+")";default:return"typeof "+c+o+'"'+d+'"'}}le.exports={copy:function(d,c){for(var h in c=c||{},d)c[h]=d[h];return c},checkDataType:U,checkDataTypes:function(d,c,h){{if(d.length===1)return U(d[0],c,h,!0);var n,o="",d=H(d);for(n in d.array&&d.object&&(o=d.null?"(":"(!"+c+" || ",o+="typeof "+c+' !== "object")',delete d.null,delete d.array,delete d.object),d.number&&delete d.integer,d)o+=(o?" && ":"")+U(n,c,h,!0);return o}},coerceToTypes:function(d,c){{if(!Array.isArray(c))return x[c]?[c]:d==="array"&&c==="array"?["array"]:void 0;for(var h=[],n=0;n<c.length;n++){var o=c[n];(x[o]||d==="array"&&o==="array")&&(h[h.length]=o)}return h.length?h:void 0}},toHash:H,getProperty:J,escapeQuotes:F,equal:Z(5215),ucs2length:Z(611),varOccurences:function(d,c){return c+="[^0-9]",d=d.match(new RegExp(c,"g")),d?d.length:0},varReplace:function(d,c,h){return c+="([^0-9])",h=h.replace(/\$/g,"$$$$"),d.replace(new RegExp(c,"g"),h+"$1")},schemaHasRules:function(d,c){if(typeof d=="boolean")return!d;for(var h in d)if(c[h])return!0},schemaHasRulesExcept:function(d,c,h){if(typeof d=="boolean")return!d&&h!="not";for(var n in d)if(n!=h&&c[n])return!0},schemaUnknownRules:function(d,c){if(typeof d!="boolean"){for(var h in d)if(!c[h])return h}},toQuotedString:B,getPathExpr:function(d,c,h,n){return $(d,h?"'/' + "+c+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+c+" + ']'":"'[\\'' + "+c+" + '\\']'")},getPath:function(d,c,h){return h=B(h?"/"+y(c):J(c)),$(d,h)},getData:function(d,c,h){var n,o,i;if(d==="")return"rootData";if(d[0]=="/"){if(!b.test(d))throw new Error("Invalid JSON-pointer: "+d);n=d,o="rootData"}else{if(!(i=d.match(C)))throw new Error("Invalid JSON-pointer: "+d);if(d=+i[1],(n=i[2])=="#"){if(c<=d)throw new Error("Cannot access property/index "+d+" levels up, current level is "+c);return h[c-d]}if(c<d)throw new Error("Cannot access data "+d+" levels up, current level is "+c);if(o="data"+(c-d||""),!n)return o}for(var s=o,a=n.split("/"),t=0;t<a.length;t++){var e=a[t];e&&(o+=J(f(e)),s+=" && "+o)}return s},unescapeFragment:function(d){return f(decodeURIComponent(d))},unescapeJsonPointer:f,escapeFragment:function(d){return encodeURIComponent(y(d))},escapeJsonPointer:y};var x=H(["string","number","integer","boolean","null"]);function H(d){for(var c={},h=0;h<d.length;h++)c[d[h]]=!0;return c}var X=/^[a-z$_][a-z$_0-9]*$/i,j=/'|\\/g;function J(d){return typeof d=="number"?"["+d+"]":X.test(d)?"."+d:"['"+F(d)+"']"}function F(d){return d.replace(j,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function B(d){return"'"+F(d)+"'"}var b=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $(d,c){return d=='""'?c:(d+" + "+c).replace(/([^\\])' \+ '/g,"$1")}function y(d){return d.replace(/~/g,"~0").replace(/\//g,"~1")}function f(d){return d.replace(/~1/g,"/").replace(/~0/g,"~")}},8852:function(le){var m=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];le.exports=function(Z,U){for(var x=0;x<U.length;x++){Z=JSON.parse(JSON.stringify(Z));for(var H=U[x].split("/"),X=Z,j=1;j<H.length;j++)X=X[H[j]];for(j=0;j<m.length;j++){var J=m[j],F=X[J];F&&(X[J]={anyOf:[F,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return Z}},9407:function(le,m,Z){Z=Z(8198),le.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Z.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Z.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},1765:function(le){le.exports=function(m,Z,U){var x,H,X,j,J,F=" ",B=m.level,b=m.dataLevel,C=m.schema[Z],$=m.schemaPath+m.util.getProperty(Z),y=m.errSchemaPath+"/"+Z,f=!m.opts.allErrors,d="data"+(b||""),c=m.opts.$data&&C&&C.$data,h=c?(F+=" var schema"+B+" = "+m.util.getData(C.$data,b,m.dataPathArr)+"; ","schema"+B):C,n=Z=="maximum",o=n?"exclusiveMaximum":"exclusiveMinimum",i=m.schema[o],s=m.opts.$data&&i&&i.$data,a=n?"<":">",t=n?">":"<",e=void 0;if(!c&&typeof C!="number"&&C!==void 0)throw new Error(Z+" must be number");if(!s&&i!==void 0&&typeof i!="number"&&typeof i!="boolean")throw new Error(o+" must be number or boolean");s?(b=m.util.getData(i.$data,b,m.dataPathArr),X="exclIsNumber"+B,j="' + "+(J="op"+B)+" + '",e=o,(r=r||[]).push(F=F+(" var schemaExcl"+B+" = "+b+"; ")+(" var "+(x="exclusive"+B)+"; var "+(H="exclType"+B)+" = typeof "+(b="schemaExcl"+B)+"; if ("+H+" != 'boolean' && "+H+" != 'undefined' && "+H+" != 'number') { ")),F="",m.createErrors!==!1?(F+=" { keyword: '"+(e||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(y)+" , params: {} ",m.opts.messages!==!1&&(F+=" , message: '"+o+" should be boolean' "),m.opts.verbose&&(F+=" , schema: validate.schema"+$+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+d+" "),F+=" } "):F+=" {} ",l=F,F=r.pop(),!m.compositeRule&&f?m.async?F+=" throw new ValidationError(["+l+"]); ":F+=" validate.errors = ["+l+"]; return false; ":F+=" var err = "+l+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F+=" } else if ( ",c&&(F+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),F+=" "+H+" == 'number' ? ( ("+x+" = "+h+" === undefined || "+b+" "+a+"= "+h+") ? "+d+" "+t+"= "+b+" : "+d+" "+t+" "+h+" ) : ( ("+x+" = "+b+" === true) ? "+d+" "+t+"= "+h+" : "+d+" "+t+" "+h+" ) || "+d+" !== "+d+") { var op"+B+" = "+x+" ? '"+a+"' : '"+a+"='; ",C===void 0&&(y=m.errSchemaPath+"/"+(e=o),h=b,c=s)):(j=a,(X=typeof i=="number")&&c?(J="'"+j+"'",F+=" if ( ",c&&(F+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),F+=" ( "+h+" === undefined || "+i+" "+a+"= "+h+" ? "+d+" "+t+"= "+i+" : "+d+" "+t+" "+h+" ) || "+d+" !== "+d+") { "):(X&&C===void 0?(x=!0,y=m.errSchemaPath+"/"+(e=o),h=i,t+="="):(X&&(h=Math[n?"min":"max"](i,C)),i===(!X||h)?(x=!0,y=m.errSchemaPath+"/"+(e=o),t+="="):(x=!1,j+="=")),J="'"+j+"'",F+=" if ( ",c&&(F+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),F+=" "+d+" "+t+" "+h+" || "+d+" !== "+d+") { ")),e=e||Z,(r=r||[]).push(F),F="",m.createErrors!==!1?(F+=" { keyword: '"+(e||"_limit")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(y)+" , params: { comparison: "+J+", limit: "+h+", exclusive: "+x+" } ",m.opts.messages!==!1&&(F=F+" , message: 'should be "+j+" "+(c?"' + "+h:h+"'")),m.opts.verbose&&(F=(F+=" , schema:  ")+(c?"validate.schema"+$:""+C)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+d+" "),F+=" } "):F+=" {} ";var r,l=F;return F=r.pop(),!m.compositeRule&&f?m.async?F+=" throw new ValidationError(["+l+"]); ":F+=" validate.errors = ["+l+"]; return false; ":F+=" var err = "+l+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F+=" } ",f&&(F+=" else { "),F}},9337:function(le){le.exports=function(m,Z,U){var x,H=" ",X=m.level,$=m.dataLevel,j=m.schema[Z],J=m.schemaPath+m.util.getProperty(Z),F=m.errSchemaPath+"/"+Z,B=!m.opts.allErrors,b="data"+($||""),C=m.opts.$data&&j&&j.$data,$=C?(H+=" var schema"+X+" = "+m.util.getData(j.$data,$,m.dataPathArr)+"; ","schema"+X):j;if(C||typeof j=="number")return H+="if ( ",C&&(H+=" ("+$+" !== undefined && typeof "+$+" != 'number') || "),(X=[]).push(H+=" "+b+".length "+((x=Z)=="maxItems"?">":"<")+" "+$+") { "),H="",m.createErrors!==!1?(H+=" { keyword: '"+(x||"_limitItems")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+$+" } ",m.opts.messages!==!1&&(H=(H=(H+=" , message: 'should NOT have ")+(Z=="maxItems"?"more":"fewer")+" than ")+(C?"' + "+$+" + '":""+j)+" items' "),m.opts.verbose&&(H=(H+=" , schema:  ")+(C?"validate.schema"+J:""+j)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",x=H,H=X.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+x+"]); ":H+=" validate.errors = ["+x+"]; return false; ":H+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",H+="} ",B&&(H+=" else { "),H;throw new Error(Z+" must be number")}},5433:function(le){le.exports=function(m,Z,U){var x,H=" ",X=m.level,$=m.dataLevel,j=m.schema[Z],J=m.schemaPath+m.util.getProperty(Z),F=m.errSchemaPath+"/"+Z,B=!m.opts.allErrors,b="data"+($||""),C=m.opts.$data&&j&&j.$data,$=C?(H+=" var schema"+X+" = "+m.util.getData(j.$data,$,m.dataPathArr)+"; ","schema"+X):j;if(C||typeof j=="number")return H+="if ( ",C&&(H+=" ("+$+" !== undefined && typeof "+$+" != 'number') || "),m.opts.unicode===!1?H+=" "+b+".length ":H+=" ucs2length("+b+") ",(X=[]).push(H+=" "+((x=Z)=="maxLength"?">":"<")+" "+$+") { "),H="",m.createErrors!==!1?(H+=" { keyword: '"+(x||"_limitLength")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+$+" } ",m.opts.messages!==!1&&(H=(H=(H+=" , message: 'should NOT be ")+(Z=="maxLength"?"longer":"shorter")+" than ")+(C?"' + "+$+" + '":""+j)+" characters' "),m.opts.verbose&&(H=(H+=" , schema:  ")+(C?"validate.schema"+J:""+j)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",x=H,H=X.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+x+"]); ":H+=" validate.errors = ["+x+"]; return false; ":H+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",H+="} ",B&&(H+=" else { "),H;throw new Error(Z+" must be number")}},7724:function(le){le.exports=function(m,Z,U){var x,H=" ",X=m.level,$=m.dataLevel,j=m.schema[Z],J=m.schemaPath+m.util.getProperty(Z),F=m.errSchemaPath+"/"+Z,B=!m.opts.allErrors,b="data"+($||""),C=m.opts.$data&&j&&j.$data,$=C?(H+=" var schema"+X+" = "+m.util.getData(j.$data,$,m.dataPathArr)+"; ","schema"+X):j;if(C||typeof j=="number")return H+="if ( ",C&&(H+=" ("+$+" !== undefined && typeof "+$+" != 'number') || "),(X=[]).push(H+=" Object.keys("+b+").length "+((x=Z)=="maxProperties"?">":"<")+" "+$+") { "),H="",m.createErrors!==!1?(H+=" { keyword: '"+(x||"_limitProperties")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+$+" } ",m.opts.messages!==!1&&(H=(H=(H+=" , message: 'should NOT have ")+(Z=="maxProperties"?"more":"fewer")+" than ")+(C?"' + "+$+" + '":""+j)+" properties' "),m.opts.verbose&&(H=(H+=" , schema:  ")+(C?"validate.schema"+J:""+j)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",x=H,H=X.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+x+"]); ":H+=" validate.errors = ["+x+"]; return false; ":H+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",H+="} ",B&&(H+=" else { "),H;throw new Error(Z+" must be number")}},3531:function(le){le.exports=function(m,Z,U){var x=" ",H=m.schema[Z],X=m.schemaPath+m.util.getProperty(Z),j=m.errSchemaPath+"/"+Z,J=!m.opts.allErrors,F=m.util.copy(m),B="",b=(F.level++,"valid"+F.level),C=F.baseId,$=!0,y=H;if(y)for(var f,d=-1,c=y.length-1;d<c;)f=y[d+=1],(m.opts.strictKeywords?typeof f=="object"&&0<Object.keys(f).length||f===!1:m.util.schemaHasRules(f,m.RULES.all))&&($=!1,F.schema=f,F.schemaPath=X+"["+d+"]",F.errSchemaPath=j+"/"+d,x+="  "+m.validate(F)+" ",F.baseId=C,J)&&(x+=" if ("+b+") { ",B+="}");return J&&(x+=$?" if (true) { ":" "+B.slice(0,-1)+" "),x}},8854:function(le){le.exports=function(m,J,U){var x=" ",b=m.level,F=m.dataLevel,H=m.schema[J],X=m.schemaPath+m.util.getProperty(J),j=m.errSchemaPath+"/"+J,J=!m.opts.allErrors,F="data"+(F||""),B="valid"+b,b="errs__"+b,C=m.util.copy(m),$="",y=(C.level++,"valid"+C.level);if(H.every(function(i){return m.opts.strictKeywords?typeof i=="object"&&0<Object.keys(i).length||i===!1:m.util.schemaHasRules(i,m.RULES.all)})){var f=C.baseId,d=(x+=" var "+b+" = errors; var "+B+" = false;  ",m.compositeRule),c=(m.compositeRule=C.compositeRule=!0,H);if(c)for(var h,n=-1,o=c.length-1;n<o;)h=c[n+=1],C.schema=h,C.schemaPath=X+"["+n+"]",C.errSchemaPath=j+"/"+n,x+="  "+m.validate(C)+" ",C.baseId=f,x+=" "+B+" = "+B+" || "+y+"; if (!"+B+") { ",$+="}";m.compositeRule=C.compositeRule=d,x+=" "+$+" if (!"+B+") {   var err =   ",m.createErrors!==!1?(x+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: {} ",m.opts.messages!==!1&&(x+=" , message: 'should match some schema in anyOf' "),m.opts.verbose&&(x+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),x+=" } "):x+=" {} ",x+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&J&&(m.async?x+=" throw new ValidationError(vErrors); ":x+=" validate.errors = vErrors; return false; "),x+=" } else {  errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } ",m.opts.allErrors&&(x+=" } ")}else J&&(x+=" if (true) { ");return x}},8372:function(le){le.exports=function(m,H,U){var x=" ",X=m.schema[H],H=m.errSchemaPath+"/"+H,X=(m.opts.allErrors,m.util.toQuotedString(X));return m.opts.$comment===!0?x+=" console.log("+X+");":typeof m.opts.$comment=="function"&&(x+=" self._opts.$comment("+X+", "+m.util.toQuotedString(H)+", validate.root.schema);"),x}},9650:function(le){le.exports=function(m,X,U){var $=" ",x=m.level,C=m.dataLevel,b=m.schema[X],H=m.schemaPath+m.util.getProperty(X),X=m.errSchemaPath+"/"+X,j=!m.opts.allErrors,J="data"+(C||""),F="valid"+x,B=m.opts.$data&&b&&b.$data,b=(B&&($+=" var schema"+x+" = "+m.util.getData(b.$data,C,m.dataPathArr)+"; "),B||($+=" var schema"+x+" = validate.schema"+H+";"),[]),C=(b.push($+="var "+F+" = equal("+J+", schema"+x+"); if (!"+F+") {   "),$="",m.createErrors!==!1?($+=" { keyword: 'const' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { allowedValue: schema"+x+" } ",m.opts.messages!==!1&&($+=" , message: 'should be equal to constant' "),m.opts.verbose&&($+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+J+" "),$+=" } "):$+=" {} ",$),$=b.pop();return!m.compositeRule&&j?m.async?$+=" throw new ValidationError(["+C+"]); ":$+=" validate.errors = ["+C+"]; return false; ":$+=" var err = "+C+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$+=" }",j&&($+=" else { "),$}},1292:function(le){le.exports=function(m,X,U){var h=" ",d=m.level,J=m.dataLevel,x=m.schema[X],H=m.schemaPath+m.util.getProperty(X),X=m.errSchemaPath+"/"+X,j=!m.opts.allErrors,J="data"+(J||""),F="valid"+d,B="errs__"+d,b=m.util.copy(m),C=(b.level++,"valid"+b.level),d="i"+d,$=b.dataLevel=m.dataLevel+1,y="data"+$,c=m.baseId,f=m.opts.strictKeywords?typeof x=="object"&&0<Object.keys(x).length||x===!1:m.util.schemaHasRules(x,m.RULES.all),d=(h+="var "+B+" = errors;var "+F+";",f?(F=m.compositeRule,m.compositeRule=b.compositeRule=!0,b.schema=x,b.schemaPath=H,b.errSchemaPath=X,h+=" var "+C+" = false; for (var "+d+" = 0; "+d+" < "+J+".length; "+d+"++) { ",b.errorPath=m.util.getPathExpr(m.errorPath,d,m.opts.jsonPointers,!0),x=J+"["+d+"]",b.dataPathArr[$]=d,$=m.validate(b),b.baseId=c,m.util.varOccurences($,y)<2?h+=" "+m.util.varReplace($,y,x)+" ":h+=" var "+y+" = "+x+"; "+$+" ",h+=" if ("+C+") break; }  ",m.compositeRule=b.compositeRule=F,h+="  if (!"+C+") {"):h+=" if ("+J+".length == 0) {",[]),c=(d.push(h),h="",m.createErrors!==!1?(h+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: {} ",m.opts.messages!==!1&&(h+=" , message: 'should contain a valid item' "),m.opts.verbose&&(h+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+J+" "),h+=" } "):h+=" {} ",h),h=d.pop();return!m.compositeRule&&j?m.async?h+=" throw new ValidationError(["+c+"]); ":h+=" validate.errors = ["+c+"]; return false; ":h+=" var err = "+c+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h+=" } else { ",f&&(h+="  errors = "+B+"; if (vErrors !== null) { if ("+B+") vErrors.length = "+B+"; else vErrors = null; } "),m.opts.allErrors&&(h+=" } "),h}},8050:function(le){le.exports=function(m,p,U){var x,H,X,j=" ",J=m.level,F=m.dataLevel,g=m.schema[p],B=m.schemaPath+m.util.getProperty(p),b=m.errSchemaPath+"/"+p,C=!m.opts.allErrors,$="data"+(F||""),y="valid"+J,f="errs__"+J,d=m.opts.$data&&g&&g.$data,c=d?(j+=" var schema"+J+" = "+m.util.getData(g.$data,F,m.dataPathArr)+"; ","schema"+J):g,h="definition"+J,n=this.definition,o="";if(d&&n.$data){var i="keywordValidate"+J,s=n.validateSchema;j+=" var "+h+" = RULES.custom['"+p+"'].definition; var "+i+" = "+h+".validate;"}else{if(!(r=m.useCustomRule(this,g,m.schema,m)))return;c="validate.schema"+B,i=r.code,x=n.compile,H=n.inline,X=n.macro}var a,t,e,r,l,p=i+".errors",g="i"+J,I="ruleErr"+J,A=n.async;if(A&&!m.async)throw new Error("async keyword in sync schema");return H||X||(j+=p+" = null;"),j+="var "+f+" = errors;var "+y+";",d&&n.$data&&(o+="}",j+=" if ("+c+" === undefined) { "+y+" = true; } else { ",s)&&(o+="}",j+=" "+y+" = "+h+".validateSchema("+c+"); if ("+y+") { "),H?n.statements?j+=" "+r.validate+" ":j+=" "+y+" = "+r.validate+"; ":X?(o="",(d=m.util.copy(m)).level++,a="valid"+d.level,d.schema=r.validate,d.schemaPath="",s=m.compositeRule,m.compositeRule=d.compositeRule=!0,h=m.validate(d).replace(/validate\.schema/g,i),m.compositeRule=d.compositeRule=s,j+=" "+h):((l=l||[]).push(j),j="",j+="  "+i+".call( ",m.opts.passContext?j+="this":j+="self",x||n.schema===!1?j+=" , "+$+" ":j+=" , "+c+" , "+$+" , validate.schema"+m.schemaPath+" ",j+=" , (dataPath || '')",m.errorPath!='""'&&(j+=" + "+m.errorPath),r=j+=" , "+(t=F?"data"+(F-1||""):"parentData")+" , "+(e=F?m.dataPathArr[F]:"parentDataProperty")+" , rootData )  ",j=l.pop(),n.errors===!1?(j+=" "+y+" = ",A&&(j+="await "),j+=r+"; "):j+=A?" var "+(p="customErrors"+J)+" = null; try { "+y+" = await "+r+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+p+" = e.errors; else throw e; } ":" "+p+" = null; "+y+" = "+r+"; "),n.modifying&&(j+=" if ("+t+") "+$+" = "+t+"["+e+"];"),j+=""+o,n.valid?C&&(j+=" if (true) { "):(j+=" if ( ",n.valid===void 0?j=j+" !"+(X?""+a:y):j+=" "+!n.valid+" ",d=this.keyword,(l=l||[]).push(j+=") { "),(l=l||[]).push(j=""),j="",m.createErrors!==!1?(j+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(b)+" , params: { keyword: '"+this.keyword+"' } ",m.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),m.opts.verbose&&(j+=" , schema: validate.schema"+B+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+$+" "),j+=" } "):j+=" {} ",s=j,j=l.pop(),!m.compositeRule&&C?m.async?j+=" throw new ValidationError(["+s+"]); ":j+=" validate.errors = ["+s+"]; return false; ":j+=" var err = "+s+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h=j,j=l.pop(),H?n.errors?n.errors!="full"&&(j+="  for (var "+g+"="+f+"; "+g+"<errors; "+g+"++) { var "+I+" = vErrors["+g+"]; if ("+I+".dataPath === undefined) "+I+".dataPath = (dataPath || '') + "+m.errorPath+"; if ("+I+".schemaPath === undefined) { "+I+'.schemaPath = "'+b+'"; } ',m.opts.verbose&&(j+=" "+I+".schema = "+c+"; "+I+".data = "+$+"; "),j+=" } "):n.errors===!1?j+=" "+h+" ":(j+=" if ("+f+" == errors) { "+h+" } else {  for (var "+g+"="+f+"; "+g+"<errors; "+g+"++) { var "+I+" = vErrors["+g+"]; if ("+I+".dataPath === undefined) "+I+".dataPath = (dataPath || '') + "+m.errorPath+"; if ("+I+".schemaPath === undefined) { "+I+'.schemaPath = "'+b+'"; } ',m.opts.verbose&&(j+=" "+I+".schema = "+c+"; "+I+".data = "+$+"; "),j+=" } } "):X?(j+="   var err =   ",m.createErrors!==!1?(j+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(b)+" , params: { keyword: '"+this.keyword+"' } ",m.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),m.opts.verbose&&(j+=" , schema: validate.schema"+B+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+$+" "),j+=" } "):j+=" {} ",j+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&C&&(m.async?j+=" throw new ValidationError(vErrors); ":j+=" validate.errors = vErrors; return false; ")):n.errors===!1?j+=" "+h+" ":(j+=" if (Array.isArray("+p+")) { if (vErrors === null) vErrors = "+p+"; else vErrors = vErrors.concat("+p+"); errors = vErrors.length;  for (var "+g+"="+f+"; "+g+"<errors; "+g+"++) { var "+I+" = vErrors["+g+"]; if ("+I+".dataPath === undefined) "+I+".dataPath = (dataPath || '') + "+m.errorPath+";  "+I+'.schemaPath = "'+b+'";  ',m.opts.verbose&&(j+=" "+I+".schema = "+c+"; "+I+".data = "+$+"; "),j+=" } } else { "+h+" } "),j+=" } ",C&&(j+=" else { ")),j}},2860:function(le){le.exports=function(m,$,U){var x,H=" ",X=m.level,j=m.dataLevel,J=m.schema[$],F=m.schemaPath+m.util.getProperty($),B=m.errSchemaPath+"/"+$,b=!m.opts.allErrors,C="data"+(j||""),$="errs__"+X,y=m.util.copy(m),f="",d=(y.level++,"valid"+y.level),c={},h={},n=m.opts.ownProperties;for(M in J)M!="__proto__"&&(S=J[M],(x=Array.isArray(S)?h:c)[M]=S);var o=m.errorPath;for(M in H=H+("var "+$+" = errors;")+("var missing"+X+";"),h)if((x=h[M]).length){if(H+=" if ( "+C+m.util.getProperty(M)+" !== undefined ",n&&(H+=" && Object.prototype.hasOwnProperty.call("+C+", '"+m.util.escapeQuotes(M)+"') "),b){H+=" && ( ";var i=x;if(i)for(var s=-1,a=i.length-1;s<a;)p=i[s+=1],s&&(H+=" || "),H+=" ( ( "+(N=C+(A=m.util.getProperty(p)))+" === undefined ",n&&(H+=" || ! Object.prototype.hasOwnProperty.call("+C+", '"+m.util.escapeQuotes(p)+"') "),H+=") && (missing"+X+" = "+m.util.toQuotedString(m.opts.jsonPointers?p:A)+") ) ";H+=")) {  ";var r="missing"+X,t="' + "+r+" + '",e=(m.opts._errorDataPathProperty&&(m.errorPath=m.opts.jsonPointers?m.util.getPathExpr(o,r,!0):o+" + "+r),e||[]),r=(e.push(H),H="",m.createErrors!==!1?(H+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(B)+" , params: { property: '"+m.util.escapeQuotes(M)+"', missingProperty: '"+t+"', depsCount: "+x.length+", deps: '"+m.util.escapeQuotes(x.length==1?x[0]:x.join(", "))+"' } ",m.opts.messages!==!1&&(H+=" , message: 'should have ",x.length==1?H+="property "+m.util.escapeQuotes(x[0]):H+="properties "+m.util.escapeQuotes(x.join(", ")),H+=" when property "+m.util.escapeQuotes(M)+" is present' "),m.opts.verbose&&(H+=" , schema: validate.schema"+F+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),H+=" } "):H+=" {} ",H),H=e.pop();!m.compositeRule&&b?m.async?H+=" throw new ValidationError(["+r+"]); ":H+=" validate.errors = ["+r+"]; return false; ":H+=" var err = "+r+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{H+=" ) { ";var l=x;if(l)for(var p,g=-1,I=l.length-1;g<I;){p=l[g+=1];var A=m.util.getProperty(p),t=m.util.escapeQuotes(p),N=C+A;m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(o,p,m.opts.jsonPointers)),H+=" if ( "+N+" === undefined ",n&&(H+=" || ! Object.prototype.hasOwnProperty.call("+C+", '"+m.util.escapeQuotes(p)+"') "),H+=") {  var err =   ",m.createErrors!==!1?(H+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(B)+" , params: { property: '"+m.util.escapeQuotes(M)+"', missingProperty: '"+t+"', depsCount: "+x.length+", deps: '"+m.util.escapeQuotes(x.length==1?x[0]:x.join(", "))+"' } ",m.opts.messages!==!1&&(H+=" , message: 'should have ",x.length==1?H+="property "+m.util.escapeQuotes(x[0]):H+="properties "+m.util.escapeQuotes(x.join(", ")),H+=" when property "+m.util.escapeQuotes(M)+" is present' "),m.opts.verbose&&(H+=" , schema: validate.schema"+F+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),H+=" } "):H+=" {} ",H+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}H+=" }   ",b&&(f+="}",H+=" else { ")}m.errorPath=o;var M,R=y.baseId;for(M in c){var S=c[M];(m.opts.strictKeywords?typeof S=="object"&&0<Object.keys(S).length||S===!1:m.util.schemaHasRules(S,m.RULES.all))&&(H+=" "+d+" = true; if ( "+C+m.util.getProperty(M)+" !== undefined ",n&&(H+=" && Object.prototype.hasOwnProperty.call("+C+", '"+m.util.escapeQuotes(M)+"') "),H+=") { ",y.schema=S,y.schemaPath=F+m.util.getProperty(M),y.errSchemaPath=B+"/"+m.util.escapeFragment(M),H+="  "+m.validate(y)+" ",y.baseId=R,H+=" }  ",b)&&(H+=" if ("+d+") { ",f+="}")}return b&&(H+="   "+f+" if ("+$+" == errors) {"),H}},7112:function(le){le.exports=function(m,X,U){var $=" ",x=m.level,b=m.dataLevel,C=m.schema[X],H=m.schemaPath+m.util.getProperty(X),X=m.errSchemaPath+"/"+X,j=!m.opts.allErrors,J="data"+(b||""),F="valid"+x,B=m.opts.$data&&C&&C.$data,C=(B&&($+=" var schema"+x+" = "+m.util.getData(C.$data,b,m.dataPathArr)+"; "),"i"+x),b="schema"+x,b=(B||($+=" var "+b+" = validate.schema"+H+";"),$+="var "+F+";",B&&($+=" if (schema"+x+" === undefined) "+F+" = true; else if (!Array.isArray(schema"+x+")) "+F+" = false; else {"),$+=F+" = false;for (var "+C+"=0; "+C+"<"+b+".length; "+C+"++) if (equal("+J+", "+b+"["+C+"])) { "+F+" = true; break; }",B&&($+="  }  "),[]),C=(b.push($+=" if (!"+F+") {   "),$="",m.createErrors!==!1?($+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { allowedValues: schema"+x+" } ",m.opts.messages!==!1&&($+=" , message: 'should be equal to one of the allowed values' "),m.opts.verbose&&($+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+J+" "),$+=" } "):$+=" {} ",$),$=b.pop();return!m.compositeRule&&j?m.async?$+=" throw new ValidationError(["+C+"]); ":$+=" validate.errors = ["+C+"]; return false; ":$+=" var err = "+C+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$+=" }",j&&($+=" else { "),$}},4682:function(le){le.exports=function(m,F,U){var x=" ",H=m.level,X=m.dataLevel,j=m.schema[F],J=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,B=!m.opts.allErrors,b="data"+(X||"");if(m.opts.format===!1)B&&(x+=" if (true) { ");else{var C,$=m.opts.$data&&j&&j.$data,X=$?(x+=" var schema"+H+" = "+m.util.getData(j.$data,X,m.dataPathArr)+"; ","schema"+H):j,y=m.opts.unknownFormats,f=Array.isArray(y);if($)x+=" var "+(C="format"+H)+" = formats["+X+"]; var "+(d="isObject"+H)+" = typeof "+C+" == 'object' && !("+C+" instanceof RegExp) && "+C+".validate; var "+(h="formatType"+H)+" = "+d+" && "+C+".type || 'string'; if ("+d+") { ",m.async&&(x+=" var async"+H+" = "+C+".async; "),x+=" "+C+" = "+C+".validate; } if (  ",$&&(x+=" ("+X+" !== undefined && typeof "+X+" != 'string') || "),x+=" (",y!="ignore"&&(x+=" ("+X+" && !"+C+" ",f&&(x+=" && self._opts.unknownFormats.indexOf("+X+") == -1 "),x+=") || "),x+=" ("+C+" && "+h+" == '"+U+"' && !(typeof "+C+" == 'function' ? ",m.async?x+=" (async"+H+" ? await "+C+"("+b+") : "+C+"("+b+")) ":x+=" "+C+"("+b+") ",x+=" : "+C+".test("+b+"))))) {";else{if(!(C=m.formats[j])){if(y=="ignore")return m.logger.warn('unknown format "'+j+'" ignored in schema at path "'+m.errSchemaPath+'"'),B&&(x+=" if (true) { "),x;if(f&&0<=y.indexOf(j))return B&&(x+=" if (true) { "),x;throw new Error('unknown format "'+j+'" is used in schema at path "'+m.errSchemaPath+'"')}var d,c,h=(d=typeof C=="object"&&!(C instanceof RegExp)&&C.validate)&&C.type||"string";if(d&&(c=C.async===!0,C=C.validate),h!=U)return B&&(x+=" if (true) { "),x;if(c){if(!m.async)throw new Error("async format in sync schema");x+=" if (!(await "+(n="formats"+m.util.getProperty(j)+".validate")+"("+b+"))) { "}else{x+=" if (! ";var n="formats"+m.util.getProperty(j);d&&(n+=".validate"),x=x+(typeof C=="function"?" "+n+"("+b+") ":" "+n+".test("+b+") ")+") { "}}H=[],f=(H.push(x),x="",m.createErrors!==!1?(x=(x+=" { keyword: 'format' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { format:  ")+($?""+X:""+m.util.toQuotedString(j))+"  } ",m.opts.messages!==!1&&(x=(x+=` , message: 'should match format "`)+($?"' + "+X+" + '":""+m.util.escapeQuotes(j))+`"' `),m.opts.verbose&&(x=(x=(x+=" , schema:  ")+($?"validate.schema"+J:""+m.util.toQuotedString(j)))+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),x+=" } "):x+=" {} ",x),x=H.pop(),!m.compositeRule&&B?m.async?x+=" throw new ValidationError(["+f+"]); ":x+=" validate.errors = ["+f+"]; return false; ":x+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } ",B&&(x+=" else { ")}return x}},1678:function(le){le.exports=function(m,F,U){var x,H=" ",X=m.level,b=m.dataLevel,j=m.schema[F],J=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,B=!m.opts.allErrors,b="data"+(b||""),C="valid"+X,$="errs__"+X,y=m.util.copy(m),f=(y.level++,"valid"+y.level),d=m.schema.then,c=m.schema.else,d=d!==void 0&&(m.opts.strictKeywords?typeof d=="object"&&0<Object.keys(d).length||d===!1:m.util.schemaHasRules(d,m.RULES.all)),c=c!==void 0&&(m.opts.strictKeywords?typeof c=="object"&&0<Object.keys(c).length||c===!1:m.util.schemaHasRules(c,m.RULES.all)),h=y.baseId;return d||c?(y.createErrors=!1,y.schema=j,y.schemaPath=J,y.errSchemaPath=F,H+=" var "+$+" = errors; var "+C+" = true;  ",j=m.compositeRule,m.compositeRule=y.compositeRule=!0,H+="  "+m.validate(y)+" ",y.baseId=h,y.createErrors=!0,H+="  errors = "+$+"; if (vErrors !== null) { if ("+$+") vErrors.length = "+$+"; else vErrors = null; }  ",m.compositeRule=y.compositeRule=j,d?(H+=" if ("+f+") {  ",y.schema=m.schema.then,y.schemaPath=m.schemaPath+".then",y.errSchemaPath=m.errSchemaPath+"/then",H+="  "+m.validate(y)+" ",y.baseId=h,H+=" "+C+" = "+f+"; ",d&&c?H+=" var "+(x="ifClause"+X)+" = 'then'; ":x="'then'",H+=" } ",c&&(H+=" else { ")):H+=" if (!"+f+") { ",c&&(y.schema=m.schema.else,y.schemaPath=m.schemaPath+".else",y.errSchemaPath=m.errSchemaPath+"/else",H+="  "+m.validate(y)+" ",y.baseId=h,H+=" "+C+" = "+f+"; ",d&&c?H+=" var "+(x="ifClause"+X)+" = 'else'; ":x="'else'",H+=" } "),H+=" if (!"+C+") {   var err =   ",m.createErrors!==!1?(H+=" { keyword: 'if' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { failingKeyword: "+x+" } ",m.opts.messages!==!1&&(H+=` , message: 'should match "' + `+x+` + '" schema' `),m.opts.verbose&&(H+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",H+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&B&&(m.async?H+=" throw new ValidationError(vErrors); ":H+=" validate.errors = vErrors; return false; "),H+=" }   ",B&&(H+=" else { ")):B&&(H+=" if (true) { "),H}},8161:function(le,m,Z){le.exports={$ref:Z(7096),allOf:Z(3531),anyOf:Z(8854),$comment:Z(8372),const:Z(9650),contains:Z(1292),dependencies:Z(2860),enum:Z(7112),format:Z(4682),if:Z(1678),items:Z(3913),maximum:Z(1765),minimum:Z(1765),maxItems:Z(9337),minItems:Z(9337),maxLength:Z(5433),minLength:Z(5433),maxProperties:Z(7724),minProperties:Z(7724),multipleOf:Z(812),not:Z(1004),oneOf:Z(6288),pattern:Z(2079),properties:Z(2124),propertyNames:Z(4926),required:Z(2e3),uniqueItems:Z(7812),validate:Z(1035)}},3913:function(le){le.exports=function(m,B,U){var x=" ",f=m.level,b=m.dataLevel,H=m.schema[B],X=m.schemaPath+m.util.getProperty(B),j=m.errSchemaPath+"/"+B,J=!m.opts.allErrors,F="data"+(b||""),B="valid"+f,b="errs__"+f,C=m.util.copy(m),$="",y=(C.level++,"valid"+C.level),f="i"+f,d=C.dataLevel=m.dataLevel+1,c="data"+d,h=m.baseId;if(x+="var "+b+" = errors;var "+B+";",Array.isArray(H)){var n,o,i=m.schema.additionalItems,s=(i===!1&&(x+=" "+B+" = "+F+".length <= "+H.length+"; ",n=j,j=m.errSchemaPath+"/additionalItems",(o=o||[]).push(x+="  if (!"+B+") {   "),x="",m.createErrors!==!1?(x+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: { limit: "+H.length+" } ",m.opts.messages!==!1&&(x+=" , message: 'should NOT have more than "+H.length+" items' "),m.opts.verbose&&(x+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),x+=" } "):x+=" {} ",B=x,x=o.pop(),!m.compositeRule&&J?m.async?x+=" throw new ValidationError(["+B+"]); ":x+=" validate.errors = ["+B+"]; return false; ":x+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } ",j=n,J)&&($+="}",x+=" else { "),H);if(s)for(var a=-1,t=s.length-1;a<t;){var e,r,l=s[a+=1];(m.opts.strictKeywords?typeof l=="object"&&0<Object.keys(l).length||l===!1:m.util.schemaHasRules(l,m.RULES.all))&&(x+=" "+y+" = true; if ("+F+".length > "+a+") { ",e=F+"["+a+"]",C.schema=l,C.schemaPath=X+"["+a+"]",C.errSchemaPath=j+"/"+a,C.errorPath=m.util.getPathExpr(m.errorPath,a,m.opts.jsonPointers,!0),C.dataPathArr[d]=a,r=m.validate(C),C.baseId=h,m.util.varOccurences(r,c)<2?x+=" "+m.util.varReplace(r,c,e)+" ":x+=" var "+c+" = "+e+"; "+r+" ",x+=" }  ",J)&&(x+=" if ("+y+") { ",$+="}")}typeof i=="object"&&(m.opts.strictKeywords?typeof i=="object"&&0<Object.keys(i).length||i===!1:m.util.schemaHasRules(i,m.RULES.all))&&(C.schema=i,C.schemaPath=m.schemaPath+".additionalItems",C.errSchemaPath=m.errSchemaPath+"/additionalItems",x+=" "+y+" = true; if ("+F+".length > "+H.length+") {  for (var "+f+" = "+H.length+"; "+f+" < "+F+".length; "+f+"++) { ",C.errorPath=m.util.getPathExpr(m.errorPath,f,m.opts.jsonPointers,!0),e=F+"["+f+"]",C.dataPathArr[d]=f,r=m.validate(C),C.baseId=h,m.util.varOccurences(r,c)<2?x+=" "+m.util.varReplace(r,c,e)+" ":x+=" var "+c+" = "+e+"; "+r+" ",J&&(x+=" if (!"+y+") break; "),x+=" } }  ",J)&&(x+=" if ("+y+") { ",$+="}")}else(m.opts.strictKeywords?typeof H=="object"&&0<Object.keys(H).length||H===!1:m.util.schemaHasRules(H,m.RULES.all))&&(C.schema=H,C.schemaPath=X,C.errSchemaPath=j,x+="  for (var "+f+" = 0; "+f+" < "+F+".length; "+f+"++) { ",C.errorPath=m.util.getPathExpr(m.errorPath,f,m.opts.jsonPointers,!0),e=F+"["+f+"]",C.dataPathArr[d]=f,r=m.validate(C),C.baseId=h,m.util.varOccurences(r,c)<2?x+=" "+m.util.varReplace(r,c,e)+" ":x+=" var "+c+" = "+e+"; "+r+" ",J&&(x+=" if (!"+y+") break; "),x+=" }");return J&&(x+=" "+$+" if ("+b+" == errors) {"),x}},812:function(le){le.exports=function(m,Z,U){var x=" ",H=m.level,C=m.dataLevel,X=m.schema[Z],j=m.schemaPath+m.util.getProperty(Z),J=m.errSchemaPath+"/"+Z,F=!m.opts.allErrors,B="data"+(C||""),b=m.opts.$data&&X&&X.$data,C=b?(x+=" var schema"+H+" = "+m.util.getData(X.$data,C,m.dataPathArr)+"; ","schema"+H):X;if(!b&&typeof X!="number")throw new Error(Z+" must be number");return x+="var division"+H+";if (",b&&(x+=" "+C+" !== undefined && ( typeof "+C+" != 'number' || "),x+=" (division"+H+" = "+B+" / "+C+", ",m.opts.multipleOfPrecision?x+=" Math.abs(Math.round(division"+H+") - division"+H+") > 1e-"+m.opts.multipleOfPrecision+" ":x+=" division"+H+" !== parseInt(division"+H+") ",x+=" ) ",b&&(x+="  )  "),Z=[],Z.push(x+=" ) {   "),x="",m.createErrors!==!1?(x+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { multipleOf: "+C+" } ",m.opts.messages!==!1&&(x=x+" , message: 'should be multiple of "+(b?"' + "+C:C+"'")),m.opts.verbose&&(x=(x+=" , schema:  ")+(b?"validate.schema"+j:""+X)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ",H=x,x=Z.pop(),!m.compositeRule&&F?m.async?x+=" throw new ValidationError(["+H+"]); ":x+=" validate.errors = ["+H+"]; return false; ":x+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+="} ",F&&(x+=" else { "),x}},1004:function(le){le.exports=function(m,F,U){var x,H,X=" ",C=m.level,b=m.dataLevel,j=m.schema[F],J=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,B=!m.opts.allErrors,b="data"+(b||""),C="errs__"+C,$=m.util.copy(m),y=($.level++,"valid"+$.level);return(m.opts.strictKeywords?typeof j=="object"&&0<Object.keys(j).length||j===!1:m.util.schemaHasRules(j,m.RULES.all))?($.schema=j,$.schemaPath=J,$.errSchemaPath=F,X+=" var "+C+" = errors;  ",j=m.compositeRule,m.compositeRule=$.compositeRule=!0,$.createErrors=!1,$.opts.allErrors&&(H=$.opts.allErrors,$.opts.allErrors=!1),X+=" "+m.validate($)+" ",$.createErrors=!0,H&&($.opts.allErrors=H),m.compositeRule=$.compositeRule=j,(x=x||[]).push(X+=" if ("+y+") {   "),X="",m.createErrors!==!1?(X+=" { keyword: 'not' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: {} ",m.opts.messages!==!1&&(X+=" , message: 'should NOT be valid' "),m.opts.verbose&&(X+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),X+=" } "):X+=" {} ",H=X,X=x.pop(),!m.compositeRule&&B?m.async?X+=" throw new ValidationError(["+H+"]); ":X+=" validate.errors = ["+H+"]; return false; ":X+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",X+=" } else {  errors = "+C+"; if (vErrors !== null) { if ("+C+") vErrors.length = "+C+"; else vErrors = null; } ",m.opts.allErrors&&(X+=" } ")):(X+="  var err =   ",m.createErrors!==!1?(X+=" { keyword: 'not' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: {} ",m.opts.messages!==!1&&(X+=" , message: 'should NOT be valid' "),m.opts.verbose&&(X+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),X+=" } "):X+=" {} ",X+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",B&&(X+=" if (false) { ")),X}},6288:function(le){le.exports=function(m,J,U){var x=" ",h=m.level,F=m.dataLevel,H=m.schema[J],X=m.schemaPath+m.util.getProperty(J),j=m.errSchemaPath+"/"+J,J=!m.opts.allErrors,F="data"+(F||""),B="valid"+h,b="errs__"+h,C=m.util.copy(m),$="",y=(C.level++,"valid"+C.level),f=C.baseId,d="prevValid"+h,c="passingSchemas"+h,h=(x+="var "+b+" = errors , "+d+" = false , "+B+" = false , "+c+" = null; ",m.compositeRule),n=(m.compositeRule=C.compositeRule=!0,H);if(n)for(var o,i=-1,s=n.length-1;i<s;)o=n[i+=1],(m.opts.strictKeywords?typeof o=="object"&&0<Object.keys(o).length||o===!1:m.util.schemaHasRules(o,m.RULES.all))?(C.schema=o,C.schemaPath=X+"["+i+"]",C.errSchemaPath=j+"/"+i,x+="  "+m.validate(C)+" ",C.baseId=f):x+=" var "+y+" = true; ",i&&(x+=" if ("+y+" && "+d+") { "+B+" = false; "+c+" = ["+c+", "+i+"]; } else { ",$+="}"),x+=" if ("+y+") { "+B+" = "+d+" = true; "+c+" = "+i+"; }";return m.compositeRule=C.compositeRule=h,x+=$+"if (!"+B+") {   var err =   ",m.createErrors!==!1?(x+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: { passingSchemas: "+c+" } ",m.opts.messages!==!1&&(x+=" , message: 'should match exactly one schema in oneOf' "),m.opts.verbose&&(x+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),x+=" } "):x+=" {} ",x+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&J&&(m.async?x+=" throw new ValidationError(vErrors); ":x+=" validate.errors = vErrors; return false; "),x+="} else {  errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; }",m.opts.allErrors&&(x+=" } "),x}},2079:function(le){le.exports=function(m,X,U){var $=" ",C=m.level,B=m.dataLevel,x=m.schema[X],H=m.schemaPath+m.util.getProperty(X),X=m.errSchemaPath+"/"+X,j=!m.opts.allErrors,J="data"+(B||""),F=m.opts.$data&&x&&x.$data,B=F?($+=" var schema"+C+" = "+m.util.getData(x.$data,B,m.dataPathArr)+"; ","schema"+C):x,C=F?"(new RegExp("+B+"))":m.usePattern(x),b=($+="if ( ",F&&($+=" ("+B+" !== undefined && typeof "+B+" != 'string') || "),[]),C=(b.push($+=" !"+C+".test("+J+") ) {   "),$="",m.createErrors!==!1?($=($+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { pattern:  ")+(F?""+B:""+m.util.toQuotedString(x))+"  } ",m.opts.messages!==!1&&($=($+=` , message: 'should match pattern "`)+(F?"' + "+B+" + '":""+m.util.escapeQuotes(x))+`"' `),m.opts.verbose&&($=($=($+=" , schema:  ")+(F?"validate.schema"+H:""+m.util.toQuotedString(x)))+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+J+" "),$+=" } "):$+=" {} ",$),$=b.pop();return!m.compositeRule&&j?m.async?$+=" throw new ValidationError(["+C+"]); ":$+=" validate.errors = ["+C+"]; return false; ":$+=" var err = "+C+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$+="} ",j&&($+=" else { "),$}},2124:function(le){le.exports=function(m,C,U){var x,H=" ",X=m.level,i=m.dataLevel,j=m.schema[C],J=m.schemaPath+m.util.getProperty(C),F=m.errSchemaPath+"/"+C,B=!m.opts.allErrors,b="data"+(i||""),C="errs__"+X,$=m.util.copy(m),y="",f=($.level++,"valid"+$.level),d="key"+X,c="idx"+X,h=$.dataLevel=m.dataLevel+1,n="data"+h,o="dataProperties"+X,i=Object.keys(j||{}).filter(M),s=m.schema.patternProperties||{},a=Object.keys(s).filter(M),t=m.schema.additionalProperties,e=i.length||a.length,r=t===!1,l=typeof t=="object"&&Object.keys(t).length,p=m.opts.removeAdditional,g=r||l||p,I=m.opts.ownProperties,A=m.baseId,N=m.schema.required;function M(ke){return ke!=="__proto__"}if(N&&(!m.opts.$data||!N.$data)&&N.length<m.opts.loopRequired&&(x=m.util.toHash(N)),H+="var "+C+" = errors;var "+f+" = true;",I&&(H+=" var "+o+" = undefined;"),g){if(H+=I?" "+o+" = "+o+" || Object.keys("+b+"); for (var "+c+"=0; "+c+"<"+o+".length; "+c+"++) { var "+d+" = "+o+"["+c+"]; ":" for (var "+d+" in "+b+") { ",e){if(H+=" var isAdditional"+X+" = !(false ",i.length)if(8<i.length)H+=" || validate.schema"+J+".hasOwnProperty("+d+") ";else{var R=i;if(R)for(var S=-1,_=R.length-1;S<_;)P=R[S+=1],H+=" || "+d+" == "+m.util.toQuotedString(P)+" "}if(a.length){var u=a;if(u)for(var E=-1,v=u.length-1;E<v;)D=u[E+=1],H+=" || "+m.usePattern(D)+".test("+d+") "}H+=" ); if (isAdditional"+X+") { "}p=="all"?H+=" delete "+b+"["+d+"]; ":(T=m.errorPath,N="' + "+d+" + '",m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(m.errorPath,d,m.opts.jsonPointers)),r?p?H+=" delete "+b+"["+d+"]; ":(O=F,F=m.errSchemaPath+"/additionalProperties",(z=z||[]).push(H+=" "+f+" = false; "),H="",m.createErrors!==!1?(H+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { additionalProperty: '"+N+"' } ",m.opts.messages!==!1&&(H+=" , message: '",m.opts._errorDataPathProperty?H+="is an invalid additional property":H+="should NOT have additional properties",H+="' "),m.opts.verbose&&(H+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",w=H,H=z.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+w+"]); ":H+=" validate.errors = ["+w+"]; return false; ":H+=" var err = "+w+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F=O,B&&(H+=" break; ")):l&&(p=="failing"?(H+=" var "+C+" = errors;  ",g=m.compositeRule,m.compositeRule=$.compositeRule=!0,$.schema=t,$.schemaPath=m.schemaPath+".additionalProperties",$.errSchemaPath=m.errSchemaPath+"/additionalProperties",$.errorPath=m.opts._errorDataPathProperty?m.errorPath:m.util.getPathExpr(m.errorPath,d,m.opts.jsonPointers),me=b+"["+d+"]",$.dataPathArr[h]=d,ye=m.validate($),$.baseId=A,m.util.varOccurences(ye,n)<2?H+=" "+m.util.varReplace(ye,n,me)+" ":H+=" var "+n+" = "+me+"; "+ye+" ",H+=" if (!"+f+") { errors = "+C+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+b+"["+d+"]; }  ",m.compositeRule=$.compositeRule=g):($.schema=t,$.schemaPath=m.schemaPath+".additionalProperties",$.errSchemaPath=m.errSchemaPath+"/additionalProperties",$.errorPath=m.opts._errorDataPathProperty?m.errorPath:m.util.getPathExpr(m.errorPath,d,m.opts.jsonPointers),me=b+"["+d+"]",$.dataPathArr[h]=d,ye=m.validate($),$.baseId=A,m.util.varOccurences(ye,n)<2?H+=" "+m.util.varReplace(ye,n,me)+" ":H+=" var "+n+" = "+me+"; "+ye+" ",B&&(H+=" if (!"+f+") break; "))),m.errorPath=T),e&&(H+=" } "),H+=" }  ",B&&(H+=" if ("+f+") { ",y+="}")}var L=m.opts.useDefaults&&!m.compositeRule;if(i.length){var G=i;if(G)for(var P,Y=-1,Q=G.length-1;Y<Q;){var K,te,T,O,V,z,w,k=j[P=G[Y+=1]];(m.opts.strictKeywords?typeof k=="object"&&0<Object.keys(k).length||k===!1:m.util.schemaHasRules(k,m.RULES.all))&&(me=b+(V=m.util.getProperty(P)),K=L&&k.default!==void 0,$.schema=k,$.schemaPath=J+V,$.errSchemaPath=F+"/"+m.util.escapeFragment(P),$.errorPath=m.util.getPath(m.errorPath,P,m.opts.jsonPointers),$.dataPathArr[h]=m.util.toQuotedString(P),ye=m.validate($),$.baseId=A,m.util.varOccurences(ye,n)<2?(ye=m.util.varReplace(ye,n,me),te=me):H+=" var "+(te=n)+" = "+me+"; ",K?H+=" "+ye+" ":(x&&x[P]?(H+=" if ( "+te+" === undefined ",I&&(H+=" || ! Object.prototype.hasOwnProperty.call("+b+", '"+m.util.escapeQuotes(P)+"') "),H+=") { "+f+" = false; ",T=m.errorPath,O=F,V=m.util.escapeQuotes(P),m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(T,P,m.opts.jsonPointers)),F=m.errSchemaPath+"/required",(z=z||[]).push(H),H="",m.createErrors!==!1?(H+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { missingProperty: '"+V+"' } ",m.opts.messages!==!1&&(H+=" , message: '",m.opts._errorDataPathProperty?H+="is a required property":H+="should have required property \\'"+V+"\\'",H+="' "),m.opts.verbose&&(H+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",w=H,H=z.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+w+"]); ":H+=" validate.errors = ["+w+"]; return false; ":H+=" var err = "+w+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F=O,m.errorPath=T,H+=" } else { "):B?(H+=" if ( "+te+" === undefined ",I&&(H+=" || ! Object.prototype.hasOwnProperty.call("+b+", '"+m.util.escapeQuotes(P)+"') "),H+=") { "+f+" = true; } else { "):(H+=" if ("+te+" !== undefined ",I&&(H+=" &&   Object.prototype.hasOwnProperty.call("+b+", '"+m.util.escapeQuotes(P)+"') "),H+=" ) { "),H+=" "+ye+" } ")),B&&(H+=" if ("+f+") { ",y+="}")}}if(a.length){var W=a;if(W)for(var D,q=-1,ae=W.length-1;q<ae;){var me,ye,k=s[D=W[q+=1]];(m.opts.strictKeywords?typeof k=="object"&&0<Object.keys(k).length||k===!1:m.util.schemaHasRules(k,m.RULES.all))&&($.schema=k,$.schemaPath=m.schemaPath+".patternProperties"+m.util.getProperty(D),$.errSchemaPath=m.errSchemaPath+"/patternProperties/"+m.util.escapeFragment(D),H=(H+=I?" "+o+" = "+o+" || Object.keys("+b+"); for (var "+c+"=0; "+c+"<"+o+".length; "+c+"++) { var "+d+" = "+o+"["+c+"]; ":" for (var "+d+" in "+b+") { ")+" if ("+m.usePattern(D)+".test("+d+")) { ",$.errorPath=m.util.getPathExpr(m.errorPath,d,m.opts.jsonPointers),me=b+"["+d+"]",$.dataPathArr[h]=d,ye=m.validate($),$.baseId=A,m.util.varOccurences(ye,n)<2?H+=" "+m.util.varReplace(ye,n,me)+" ":H+=" var "+n+" = "+me+"; "+ye+" ",B&&(H+=" if (!"+f+") break; "),H+=" } ",B&&(H+=" else "+f+" = true; "),H+=" }  ",B)&&(H+=" if ("+f+") { ",y+="}")}}return B&&(H+=" "+y+" if ("+C+" == errors) {"),H}},4926:function(le){le.exports=function(m,f,U){var x,H,X,j,J,F,B,b=" ",C=m.level,c=m.dataLevel,$=m.schema[f],y=m.schemaPath+m.util.getProperty(f),f=m.errSchemaPath+"/"+f,d=!m.opts.allErrors,c="data"+(c||""),h="errs__"+C,n=m.util.copy(m),o=(n.level++,"valid"+n.level);return b+="var "+h+" = errors;",(m.opts.strictKeywords?typeof $=="object"&&0<Object.keys($).length||$===!1:m.util.schemaHasRules($,m.RULES.all))&&(n.schema=$,n.schemaPath=y,n.errSchemaPath=f,$="idx"+C,H="i"+C,X="' + "+(x="key"+C)+" + '",j="data"+(n.dataLevel=m.dataLevel+1),B="dataProperties"+C,F=m.opts.ownProperties,J=m.baseId,F&&(b+=" var "+B+" = undefined; "),b=b+(F?" "+B+" = "+B+" || Object.keys("+c+"); for (var "+$+"=0; "+$+"<"+B+".length; "+$+"++) { var "+x+" = "+B+"["+$+"]; ":" for (var "+x+" in "+c+") { ")+" var startErrs"+C+" = errors; ",F=x,B=m.compositeRule,m.compositeRule=n.compositeRule=!0,$=m.validate(n),n.baseId=J,m.util.varOccurences($,j)<2?b+=" "+m.util.varReplace($,j,F)+" ":b+=" var "+j+" = "+F+"; "+$+" ",m.compositeRule=n.compositeRule=B,b+=" if (!"+o+") { for (var "+H+"=startErrs"+C+"; "+H+"<errors; "+H+"++) { vErrors["+H+"].propertyName = "+x+"; }   var err =   ",m.createErrors!==!1?(b+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(f)+" , params: { propertyName: '"+X+"' } ",m.opts.messages!==!1&&(b+=" , message: 'property name \\'"+X+"\\' is invalid' "),m.opts.verbose&&(b+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+c+" "),b+=" } "):b+=" {} ",b+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&d&&(m.async?b+=" throw new ValidationError(vErrors); ":b+=" validate.errors = vErrors; return false; "),d&&(b+=" break; "),b+=" } }"),d&&(b+="  if ("+h+" == errors) {"),b}},7096:function(le){le.exports=function(m,F,U){var x,H,X=" ",C=m.level,j=m.dataLevel,J=m.schema[F],F=m.errSchemaPath+"/"+F,B=!m.opts.allErrors,b="data"+(j||""),C="valid"+C;if(J=="#"||J=="#/")H=m.isRoot?(x=m.async,"validate"):(x=m.root.schema.$async===!0,"root.refVal[0]");else{var $=m.resolveRef(m.baseId,J,m.isRoot);if($===void 0){var y=m.MissingRefError.message(m.baseId,J);if(m.opts.missingRefs=="fail")m.logger.error(y),(f=f||[]).push(X),X="",m.createErrors!==!1?(X+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { ref: '"+m.util.escapeQuotes(J)+"' } ",m.opts.messages!==!1&&(X+=" , message: 'can\\'t resolve reference "+m.util.escapeQuotes(J)+"' "),m.opts.verbose&&(X+=" , schema: "+m.util.toQuotedString(J)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),X+=" } "):X+=" {} ",F=X,X=f.pop(),!m.compositeRule&&B?m.async?X+=" throw new ValidationError(["+F+"]); ":X+=" validate.errors = ["+F+"]; return false; ":X+=" var err = "+F+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",B&&(X+=" if (false) { ");else{if(m.opts.missingRefs!="ignore")throw new m.MissingRefError(m.baseId,J,y);m.logger.warn(y),B&&(X+=" if (true) { ")}}else $.inline?((F=m.util.copy(m)).level++,y="valid"+F.level,F.schema=$.schema,F.schemaPath="",F.errSchemaPath=J,X+=" "+m.validate(F).replace(/validate\.schema/g,$.code)+" ",B&&(X+=" if ("+y+") { ")):(x=$.$async===!0||m.async&&$.$async!==!1,H=$.code)}if(H){(f=f||[]).push(X),X="",m.opts.passContext?X+=" "+H+".call(this, ":X+=" "+H+"( ",X+=" "+b+", (dataPath || '')",m.errorPath!='""'&&(X+=" + "+m.errorPath);var f,J=j?"data"+(j-1||""):"parentData",F=X+=" , "+J+" , "+(j?m.dataPathArr[j]:"parentDataProperty")+", rootData)  ";if(X=f.pop(),x){if(!m.async)throw new Error("async schema referenced by sync schema");B&&(X+=" var "+C+"; "),X+=" try { await "+F+"; ",B&&(X+=" "+C+" = true; "),X+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",B&&(X+=" "+C+" = false; "),X+=" } ",B&&(X+=" if ("+C+") { ")}else X+=" if (!"+F+") { if (vErrors === null) vErrors = "+H+".errors; else vErrors = vErrors.concat("+H+".errors); errors = vErrors.length; } ",B&&(X+=" else { ")}return X}},2e3:function(le){le.exports=function(m,F,U){var x=" ",H=m.level,$=m.dataLevel,X=m.schema[F],j=m.schemaPath+m.util.getProperty(F),J=m.errSchemaPath+"/"+F,F=!m.opts.allErrors,B="data"+($||""),b="valid"+H,C=m.opts.$data&&X&&X.$data,$=(C&&(x+=" var schema"+H+" = "+m.util.getData(X.$data,$,m.dataPathArr)+"; "),"schema"+H);if(!C)if(X.length<m.opts.loopRequired&&m.schema.properties&&Object.keys(m.schema.properties).length){var y=[],f=X;if(f)for(var d=-1,c=f.length-1;d<c;){var h=f[d+=1],n=m.schema.properties[h];n&&(m.opts.strictKeywords?typeof n=="object"&&0<Object.keys(n).length||n===!1:m.util.schemaHasRules(n,m.RULES.all))||(y[y.length]=h)}}else y=X;if(C||y.length){var o=m.errorPath,X=C||y.length>=m.opts.loopRequired,i=m.opts.ownProperties;if(F){if(x+=" var missing"+H+"; ",X){C||(x+=" var "+$+" = validate.schema"+j+"; ");var s="' + "+(p="schema"+H+"["+(e="i"+H)+"]")+" + '";m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(o,p,m.opts.jsonPointers)),x+=" var "+b+" = true; ",C&&(x+=" if (schema"+H+" === undefined) "+b+" = true; else if (!Array.isArray(schema"+H+")) "+b+" = false; else {"),x+=" for (var "+e+" = 0; "+e+" < "+$+".length; "+e+"++) { "+b+" = "+B+"["+$+"["+e+"]] !== undefined ",i&&(x+=" &&   Object.prototype.hasOwnProperty.call("+B+", "+$+"["+e+"]) "),x+="; if (!"+b+") break; } ",C&&(x+="  }  "),(l=l||[]).push(x+="  if (!"+b+") {   "),x="",m.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { missingProperty: '"+s+"' } ",m.opts.messages!==!1&&(x+=" , message: '",m.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+s+"\\'",x+="' "),m.opts.verbose&&(x+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ";var a=x,x=l.pop()}else{x+=" if ( ";var t=y;if(t)for(var e=-1,r=t.length-1;e<r;)I=t[e+=1],e&&(x+=" || "),x+=" ( ( "+(R=B+(M=m.util.getProperty(I)))+" === undefined ",i&&(x+=" || ! Object.prototype.hasOwnProperty.call("+B+", '"+m.util.escapeQuotes(I)+"') "),x+=") && (missing"+H+" = "+m.util.toQuotedString(m.opts.jsonPointers?I:M)+") ) ";x+=") {  ",s="' + "+(p="missing"+H)+" + '",m.opts._errorDataPathProperty&&(m.errorPath=m.opts.jsonPointers?m.util.getPathExpr(o,p,!0):o+" + "+p),(l=l||[]).push(x),x="",m.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { missingProperty: '"+s+"' } ",m.opts.messages!==!1&&(x+=" , message: '",m.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+s+"\\'",x+="' "),m.opts.verbose&&(x+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ";var l,a=x;x=l.pop()}!m.compositeRule&&F?m.async?x+=" throw new ValidationError(["+a+"]); ":x+=" validate.errors = ["+a+"]; return false; ":x+=" var err = "+a+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } else { "}else if(X){C||(x+=" var "+$+" = validate.schema"+j+"; ");var p,s="' + "+(p="schema"+H+"["+(e="i"+H)+"]")+" + '";m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(o,p,m.opts.jsonPointers)),C&&(x+=" if ("+$+" && !Array.isArray("+$+")) {  var err =   ",m.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { missingProperty: '"+s+"' } ",m.opts.messages!==!1&&(x+=" , message: '",m.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+s+"\\'",x+="' "),m.opts.verbose&&(x+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ",x+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+$+" !== undefined) { "),x+=" for (var "+e+" = 0; "+e+" < "+$+".length; "+e+"++) { if ("+B+"["+$+"["+e+"]] === undefined ",i&&(x+=" || ! Object.prototype.hasOwnProperty.call("+B+", "+$+"["+e+"]) "),x+=") {  var err =   ",m.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { missingProperty: '"+s+"' } ",m.opts.messages!==!1&&(x+=" , message: '",m.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+s+"\\'",x+="' "),m.opts.verbose&&(x+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ",x+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",C&&(x+="  }  ")}else{var g=y;if(g)for(var I,A=-1,N=g.length-1;A<N;){I=g[A+=1];var M=m.util.getProperty(I),s=m.util.escapeQuotes(I),R=B+M;m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(o,I,m.opts.jsonPointers)),x+=" if ( "+R+" === undefined ",i&&(x+=" || ! Object.prototype.hasOwnProperty.call("+B+", '"+m.util.escapeQuotes(I)+"') "),x+=") {  var err =   ",m.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(J)+" , params: { missingProperty: '"+s+"' } ",m.opts.messages!==!1&&(x+=" , message: '",m.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+s+"\\'",x+="' "),m.opts.verbose&&(x+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+B+" "),x+=" } "):x+=" {} ",x+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}m.errorPath=o}else F&&(x+=" if (true) {");return x}},7812:function(le){le.exports=function(m,F,U){var x,H=" ",X=m.level,y=m.dataLevel,j=m.schema[F],J=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,B=!m.opts.allErrors,b="data"+(y||""),C="valid"+X,$=m.opts.$data&&j&&j.$data,y=$?(H+=" var schema"+X+" = "+m.util.getData(j.$data,y,m.dataPathArr)+"; ","schema"+X):j;return(j||$)&&m.opts.uniqueItems!==!1?($&&(H+=" var "+C+"; if ("+y+" === false || "+y+" === undefined) "+C+" = true; else if (typeof "+y+" != 'boolean') "+C+" = false; else { "),H+=" var i = "+b+".length , "+C+" = true , j; if (i > 1) { ",X=m.schema.items&&m.schema.items.type,y=Array.isArray(X),!X||X=="object"||X=="array"||y&&(0<=X.indexOf("object")||0<=X.indexOf("array"))?H+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+b+"[i], "+b+"[j])) { "+C+" = false; break outer; } } } ":(H=(H+=" var itemIndices = {}, item; for (;i--;) { var item = "+b+"[i]; ")+" if ("+m.util["checkDataType"+(y?"s":"")](X,"item",m.opts.strictNumbers,!0)+") continue; ",y&&(H+=` if (typeof item == 'string') item = '"' + item; `),H+=" if (typeof itemIndices[item] == 'number') { "+C+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),H+=" } ",$&&(H+="  }  "),(x=x||[]).push(H+=" if (!"+C+") {   "),H="",m.createErrors!==!1?(H+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { i: i, j: j } ",m.opts.messages!==!1&&(H+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),m.opts.verbose&&(H=(H+=" , schema:  ")+($?"validate.schema"+J:""+j)+"         , parentSchema: validate.schema"+m.schemaPath+" , data: "+b+" "),H+=" } "):H+=" {} ",X=H,H=x.pop(),!m.compositeRule&&B?m.async?H+=" throw new ValidationError(["+X+"]); ":H+=" validate.errors = ["+X+"]; return false; ":H+=" var err = "+X+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",H+=" } ",B&&(H+=" else { ")):B&&(H+=" if (true) { "),H}},1035:function(le){le.exports=function(m,Z,U){var x="",H=m.schema.$async===!0,X=m.util.schemaHasRulesExcept(m.schema,m.RULES.all,"$ref"),j=m.self._getId(m.schema);if(m.opts.strictKeywords){var J=m.util.schemaUnknownRules(m.schema,m.RULES.keywords);if(J){if(J="unknown keyword: "+J,m.opts.strictKeywords!=="log")throw new Error(J);m.logger.warn(J)}}if(m.isTop&&(x+=" var validate = ",H&&(m.async=!0,x+="async "),x+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",j)&&(m.opts.sourceCode||m.opts.processCode)&&(x+=" /*# sourceURL="+j+" */ "),typeof m.schema=="boolean"||!X&&!m.schema.$ref)B=m.level,b=m.dataLevel,R=m.schema[Z="false schema"],s=m.schemaPath+m.util.getProperty(Z),a=m.errSchemaPath+"/"+Z,f=!m.opts.allErrors,C="data"+(b||""),y="valid"+B,m.schema===!1?(m.isTop?f=!0:x+=" var "+y+" = false; ",(Y=Y||[]).push(x),x="",m.createErrors!==!1?(x+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: {} ",m.opts.messages!==!1&&(x+=" , message: 'boolean schema is false' "),m.opts.verbose&&(x+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),x+=" } "):x+=" {} ",I=x,x=Y.pop(),!m.compositeRule&&f?m.async?x+=" throw new ValidationError(["+I+"]); ":x+=" validate.errors = ["+I+"]; return false; ":x+=" var err = "+I+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):m.isTop?x+=H?" return data; ":" validate.errors = null; return true; ":x+=" var "+y+" = true; ",m.isTop&&(x+=" }; return validate; ");else{if(m.isTop){var F=m.isTop,B=m.level=0,b=m.dataLevel=0,C="data";if(m.rootId=m.resolve.fullPath(m.self._getId(m.root.schema)),m.baseId=m.baseId||m.rootId,delete m.isTop,m.dataPathArr=[""],m.schema.default!==void 0&&m.opts.useDefaults&&m.opts.strictDefaults){var $="default is ignored in the schema root";if(m.opts.strictDefaults!=="log")throw new Error($);m.logger.warn($)}x=(x+=" var vErrors = null; ")+" var errors = 0;      if (rootData === undefined) rootData = data; "}else{if(B=m.level,C="data"+((b=m.dataLevel)||""),j&&(m.baseId=m.resolve.url(m.baseId,j)),H&&!m.async)throw new Error("async schema in sync schema");x+=" var errs_"+B+" = errors;"}var y="valid"+B,f=!m.opts.allErrors,d="",c="",h=m.schema.type,n=Array.isArray(h);if(h&&m.opts.nullable&&m.schema.nullable===!0&&(n?h.indexOf("null")==-1&&(h=h.concat("null")):h!="null"&&(h=[h,"null"],n=!0)),n&&h.length==1&&(h=h[0],n=!1),m.schema.$ref&&X){if(m.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+m.errSchemaPath+'" (see option extendRefs)');m.opts.extendRefs!==!0&&(X=!1,m.logger.warn('$ref: keywords ignored in schema at path "'+m.errSchemaPath+'"'))}if(m.schema.$comment&&m.opts.$comment&&(x+=" "+m.RULES.all.$comment.code(m,"$comment")),h){m.opts.coerceTypes&&(o=m.util.coerceToTypes(m.opts.coerceTypes,h));var o,i=m.RULES.types[h];if(o||n||i===!0||i&&!O(i)){var s=m.schemaPath+".type",a=m.errSchemaPath+"/type",s=m.schemaPath+".type",a=m.errSchemaPath+"/type";if(x+=" if ("+m.util[n?"checkDataTypes":"checkDataType"](h,C,m.opts.strictNumbers,!0)+") { ",o){var t="dataType"+B,e="coerced"+B,r=(x+=" var "+t+" = typeof "+C+"; var "+e+" = undefined; ",m.opts.coerceTypes=="array"&&(x+=" if ("+t+" == 'object' && Array.isArray("+C+") && "+C+".length == 1) { "+C+" = "+C+"[0]; "+t+" = typeof "+C+"; if ("+m.util.checkDataType(m.schema.type,C,m.opts.strictNumbers)+") "+e+" = "+C+"; } "),x+=" if ("+e+" !== undefined) ; ",o);if(r)for(var l,p=-1,g=r.length-1;p<g;)(l=r[p+=1])=="string"?x+=" else if ("+t+" == 'number' || "+t+" == 'boolean') "+e+" = '' + "+C+"; else if ("+C+" === null) "+e+" = ''; ":l=="number"||l=="integer"?(x+=" else if ("+t+" == 'boolean' || "+C+" === null || ("+t+" == 'string' && "+C+" && "+C+" == +"+C+" ",l=="integer"&&(x+=" && !("+C+" % 1)"),x+=")) "+e+" = +"+C+"; "):l=="boolean"?x+=" else if ("+C+" === 'false' || "+C+" === 0 || "+C+" === null) "+e+" = false; else if ("+C+" === 'true' || "+C+" === 1) "+e+" = true; ":l=="null"?x+=" else if ("+C+" === '' || "+C+" === 0 || "+C+" === false) "+e+" = null; ":m.opts.coerceTypes=="array"&&l=="array"&&(x+=" else if ("+t+" == 'string' || "+t+" == 'number' || "+t+" == 'boolean' || "+C+" == null) "+e+" = ["+C+"]; ");(Y=Y||[]).push(x+=" else {   "),x="",m.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+h.join(","):""+h)+"' } ",m.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(n?""+h.join(","):""+h)+"' "),m.opts.verbose&&(x+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),x+=" } "):x+=" {} ";var I=x,J=(x=Y.pop(),!m.compositeRule&&f?m.async?x+=" throw new ValidationError(["+I+"]); ":x+=" validate.errors = ["+I+"]; return false; ":x+=" var err = "+I+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",b?"data"+(b-1||""):"parentData");x=x+(" } if ("+e+" !== undefined) {  ")+(" "+C+" = "+e+"; "),b||(x+="if ("+J+" !== undefined)"),x+=" "+J+"["+(b?m.dataPathArr[b]:"parentDataProperty")+"] = "+e+"; } "}else I=((Y=Y||[]).push(x),x="",m.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+h.join(","):""+h)+"' } ",m.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(n?""+h.join(","):""+h)+"' "),m.opts.verbose&&(x+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),x+=" } "):x+=" {} ",x),x=Y.pop(),!m.compositeRule&&f?m.async?x+=" throw new ValidationError(["+I+"]); ":x+=" validate.errors = ["+I+"]; return false; ":x+=" var err = "+I+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";x+=" } "}}if(m.schema.$ref&&!X)x+=" "+m.RULES.all.$ref.code(m,"$ref")+" ",f&&(x=(x+=" } if (errors === ")+(F?"0":"errs_"+B)+") { ",c+="}");else{var A=m.RULES;if(A){for(var N=-1,M=A.length-1;N<M;)if(O(i=A[N+=1])){if(i.type&&(x+=" if ("+m.util.checkDataType(i.type,C,m.opts.strictNumbers)+") { "),m.opts.useDefaults){if(i.type=="object"&&m.schema.properties){var R=m.schema.properties,S=Object.keys(R);if(S){for(var _,u=-1,E=S.length-1;u<E;)if((G=R[_=S[u+=1]]).default!==void 0){var v=C+m.util.getProperty(_);if(m.compositeRule){if(m.opts.strictDefaults){if($="default is ignored for: "+v,m.opts.strictDefaults!=="log")throw new Error($);m.logger.warn($)}}else x+=" if ("+v+" === undefined ",m.opts.useDefaults=="empty"&&(x+=" || "+v+" === null || "+v+" === '' "),x+=" ) "+v+" = ",m.opts.useDefaults=="shared"?x+=" "+m.useDefault(G.default)+" ":x+=" "+JSON.stringify(G.default)+" ",x+="; "}}}else if(i.type=="array"&&Array.isArray(m.schema.items)){var L=m.schema.items;if(L){for(var G,p=-1,P=L.length-1;p<P;)if((G=L[p+=1]).default!==void 0)if(v=C+"["+p+"]",m.compositeRule){if(m.opts.strictDefaults){if($="default is ignored for: "+v,m.opts.strictDefaults!=="log")throw new Error($);m.logger.warn($)}}else x+=" if ("+v+" === undefined ",m.opts.useDefaults=="empty"&&(x+=" || "+v+" === null || "+v+" === '' "),x+=" ) "+v+" = ",m.opts.useDefaults=="shared"?x+=" "+m.useDefault(G.default)+" ":x+=" "+JSON.stringify(G.default)+" ",x+="; "}}}var Y,Q=i.rules;if(Q)for(var K,te=-1,T=Q.length-1;te<T;)V(K=Q[te+=1])&&(K=K.code(m,K.keyword,i.type))&&(x+=" "+K+" ",f)&&(d+="}");f&&(x+=" "+d+" ",d=""),i.type&&(x+=" } ",h)&&h===i.type&&!o&&(x+=" else { ",s=m.schemaPath+".type",a=m.errSchemaPath+"/type",(Y=Y||[]).push(x),x="",m.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+h.join(","):""+h)+"' } ",m.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(n?""+h.join(","):""+h)+"' "),m.opts.verbose&&(x+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+C+" "),x+=" } "):x+=" {} ",I=x,x=Y.pop(),!m.compositeRule&&f?m.async?x+=" throw new ValidationError(["+I+"]); ":x+=" validate.errors = ["+I+"]; return false; ":x+=" var err = "+I+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } "),f&&(x=(x+=" if (errors === ")+(F?"0":"errs_"+B)+") { ",c+="}")}}}f&&(x+=" "+c+" "),F?x=x+(H?" if (errors === 0) return data;            else throw new ValidationError(vErrors); ":" validate.errors = vErrors;  return errors === 0;       ")+" }; return validate;":x+=" var "+y+" = errors === errs_"+B+";"}return x;function O(z){for(var w=z.rules,k=0;k<w.length;k++)if(V(w[k]))return 1}function V(z){return m.schema[z.keyword]!==void 0||z.implements&&function(w){for(var k=w.implements,W=0;W<k.length;W++)if(m.schema[k[W]]!==void 0)return 1}(z)}}},413:function(le,m,Z){var U=/^[a-z_$][a-z0-9_$-]*$/i,x=Z(8050),H=Z(9407);function X(j,J){X.errors=null;var F=this._validateKeyword=this._validateKeyword||this.compile(H,!0);if(F(j))return!0;if(X.errors=F.errors,J)throw new Error("custom keyword definition is invalid: "+this.errorsText(F.errors));return!1}le.exports={add:function(j,J){var F=this.RULES;if(F.keywords[j])throw new Error("Keyword "+j+" is already defined");if(!U.test(j))throw new Error("Keyword "+j+" is not a valid identifier");if(J){this.validateKeyword(J,!0);var B=J.type;if(Array.isArray(B))for(var b=0;b<B.length;b++)$(j,B[b],J);else $(j,B,J);var C=J.metaSchema;C&&(J.$data&&this._opts.$data&&(C={anyOf:[C,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),J.validateSchema=this.compile(C,!0))}function $(y,f,d){for(var c,h=0;h<F.length;h++){var n=F[h];if(n.type==f){c=n;break}}c||F.push(c={type:f,rules:[]}),d={keyword:y,definition:d,custom:!0,code:x,implements:d.implements},c.rules.push(d),F.custom[y]=d}return F.keywords[j]=F.all[j]=!0,this},get:function(j){var J=this.RULES.custom[j];return J?J.definition:this.RULES.keywords[j]||!1},remove:function(j){var J=this.RULES;delete J.keywords[j],delete J.all[j],delete J.custom[j];for(var F=0;F<J.length;F++)for(var B=J[F].rules,b=0;b<B.length;b++)if(B[b].keyword==j){B.splice(b,1);break}return this},validate:X}},5215:function(le){le.exports=function m(Z,U){if(Z===U)return!0;if(Z&&U&&typeof Z=="object"&&typeof U=="object"){if(Z.constructor!==U.constructor)return!1;var x,H,X;if(Array.isArray(Z)){if((x=Z.length)!=U.length)return!1;for(H=x;H--!=0;)if(!m(Z[H],U[H]))return!1}else{if(Z.constructor===RegExp)return Z.source===U.source&&Z.flags===U.flags;if(Z.valueOf!==Object.prototype.valueOf)return Z.valueOf()===U.valueOf();if(Z.toString!==Object.prototype.toString)return Z.toString()===U.toString();if((x=(X=Object.keys(Z)).length)!==Object.keys(U).length)return!1;for(H=x;H--!=0;)if(!Object.prototype.hasOwnProperty.call(U,X[H]))return!1;for(H=x;H--!=0;){var j=X[H];if(!m(Z[j],U[j]))return!1}}return!0}return Z!=Z&&U!=U}},9306:function(le){le.exports=function(m,Z){var U,x=typeof(Z=typeof(Z=Z||{})=="function"?{cmp:Z}:Z).cycles=="boolean"&&Z.cycles,H=Z.cmp&&(U=Z.cmp,function(j){return function(J,F){return J={key:J,value:j[J]},F={key:F,value:j[F]},U(J,F)}}),X=[];return function j(J){if((J=J&&J.toJSON&&typeof J.toJSON=="function"?J.toJSON():J)!==void 0){if(typeof J=="number")return isFinite(J)?""+J:"null";if(typeof J!="object")return JSON.stringify(J);if(Array.isArray(J)){for(b="[",C=0;C<J.length;C++)C&&(b+=","),b+=j(J[C])||"null";return b+"]"}if(J===null)return"null";if(X.indexOf(J)!==-1){if(x)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var F=X.push(J)-1,B=Object.keys(J).sort(H&&H(J)),b="",C=0;C<B.length;C++){var $=B[C],y=j(J[$]);y&&(b&&(b+=","),b+=JSON.stringify($)+":"+y)}return X.splice(F,1),"{"+b+"}"}}(m)}},1342:function(le){le.exports=function m(B,b){function x(h){return m.insensitive&&(""+h).toLowerCase()||""+h}var H,X,f=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,y=/(^[ ]*|[ ]*$)/g,j=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,J=/^0x[0-9a-f]+$/i,F=/^0/,B=x(B).replace(y,"")||"",b=x(b).replace(y,"")||"",C=B.replace(f,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),$=b.replace(f,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),y=parseInt(B.match(J),16)||C.length!==1&&B.match(j)&&Date.parse(B),f=parseInt(b.match(J),16)||y&&b.match(j)&&Date.parse(b)||null;if(f){if(y<f)return-1;if(f<y)return 1}for(var d=0,c=Math.max(C.length,$.length);d<c;d++){if(H=!(C[d]||"").match(F)&&parseFloat(C[d])||C[d]||0,X=!($[d]||"").match(F)&&parseFloat($[d])||$[d]||0,isNaN(H)!==isNaN(X))return isNaN(H)?1:-1;if(typeof H!=typeof X&&(H+="",X+=""),H<X)return-1;if(X<H)return 1}return 0}},9151:function(le,m){function Z(S){return S!==null&&Object.prototype.toString.call(S)==="[object Array]"}function U(S){return S!==null&&Object.prototype.toString.call(S)==="[object Object]"}function x(S,_){if(S!==_){if(Object.prototype.toString.call(S)!==Object.prototype.toString.call(_))return!1;if(Z(S)===!0){if(S.length!==_.length)return!1;for(var u=0;u<S.length;u++)if(x(S[u],_[u])===!1)return!1}else{if(U(S)!==!0)return!1;var E,v,L={};for(E in S)if(hasOwnProperty.call(S,E)){if(x(S[E],_[E])===!1)return!1;L[E]=!0}for(v in _)if(hasOwnProperty.call(_,v)&&L[v]!==!0)return!1}}return!0}function H(S){if(S===""||S===!1||S===null||Z(S)&&S.length===0)return!0;if(U(S)){for(var _ in S)if(S.hasOwnProperty(_))return!1;return!0}return!1}function X(S){return"0"<=S&&S<="9"||S==="-"}function j(){}function J(){}function F(S){this.runtime=S}function B(S){this._interpreter=S,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[0]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[0]}]},contains:{_func:this._functionContains,_signature:[{types:[2,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[2]},{types:[2]}]},floor:{_func:this._functionFloor,_signature:[{types:[0]}]},length:{_func:this._functionLength,_signature:[{types:[2,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[2]},{types:[2]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[2]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[2,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}var b,C,$,y,f,d,c,h,n,o,i,s,a,t,e,r,l,p,g,I,A,N,M,R;m=m,b=typeof String.prototype.trimLeft=="function"?function(S){return S.trimLeft()}:function(S){return S.match(/^\s*(.*)/)[1]},C={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},$="UnquotedIdentifier",y="QuotedIdentifier",o="Number",s="Expref",a="Pipe",t="Flatten",r="Filter",p="Lbracket",I="Literal",A={".":"Dot","*":e="Star",",":c="Comma",":":h="Colon","{":l="Lbrace","}":n="Rbrace","]":f="Rbracket","(":g="Lparen",")":d="Rparen","@":i="Current"},N={"<":!0,">":!0,"=":!0,"!":!0},M={" ":!0,"	":!0,"\n":!0},j.prototype={tokenize:function(S){var _,u,E=[];for(this._current=0;this._current<S.length;)if("a"<=(L=S[this._current])&&L<="z"||"A"<=L&&L<="Z"||L==="_")v=this._current,_=this._consumeUnquotedIdentifier(S),E.push({type:$,value:_,start:v});else if(A[S[this._current]]!==void 0)E.push({type:A[S[this._current]],value:S[this._current],start:this._current}),this._current++;else if(X(S[this._current]))u=this._consumeNumber(S),E.push(u);else if(S[this._current]==="[")u=this._consumeLBracket(S),E.push(u);else if(S[this._current]==='"')v=this._current,_=this._consumeQuotedIdentifier(S),E.push({type:y,value:_,start:v});else if(S[this._current]==="'")v=this._current,_=this._consumeRawStringLiteral(S),E.push({type:I,value:_,start:v});else if(S[this._current]==="`"){var v=this._current,L=this._consumeLiteral(S);E.push({type:I,value:L,start:v})}else if(N[S[this._current]]!==void 0)E.push(this._consumeOperator(S));else if(M[S[this._current]]!==void 0)this._current++;else if(S[this._current]==="&")v=this._current,this._current++,S[this._current]==="&"?(this._current++,E.push({type:"And",value:"&&",start:v})):E.push({type:s,value:"&",start:v});else{if(S[this._current]!=="|")throw(L=new Error("Unknown character:"+S[this._current])).name="LexerError",L;v=this._current,this._current++,S[this._current]==="|"?(this._current++,E.push({type:"Or",value:"||",start:v})):E.push({type:a,value:"|",start:v})}return E},_consumeUnquotedIdentifier:function(S){var _,u=this._current;for(this._current++;this._current<S.length&&("a"<=(_=S[this._current])&&_<="z"||"A"<=_&&_<="Z"||"0"<=_&&_<="9"||_==="_");)this._current++;return S.slice(u,this._current)},_consumeQuotedIdentifier:function(S){for(var _=this._current,u=(this._current++,S.length);S[this._current]!=='"'&&this._current<u;){var E=this._current;S[E]!=="\\"||S[E+1]!=="\\"&&S[E+1]!=='"'?E++:E+=2,this._current=E}return this._current++,JSON.parse(S.slice(_,this._current))},_consumeRawStringLiteral:function(S){for(var _=this._current,u=(this._current++,S.length);S[this._current]!=="'"&&this._current<u;){var E=this._current;S[E]!=="\\"||S[E+1]!=="\\"&&S[E+1]!=="'"?E++:E+=2,this._current=E}return this._current++,S.slice(_+1,this._current-1).replace("\\'","'")},_consumeNumber:function(S){for(var _=this._current,u=(this._current++,S.length);X(S[this._current])&&this._current<u;)this._current++;var E=parseInt(S.slice(_,this._current));return{type:o,value:E,start:_}},_consumeLBracket:function(S){var _=this._current;return this._current++,S[this._current]==="?"?(this._current++,{type:r,value:"[?",start:_}):S[this._current]==="]"?(this._current++,{type:t,value:"[]",start:_}):{type:p,value:"[",start:_}},_consumeOperator:function(S){var _=this._current,u=S[_];return this._current++,u==="!"?S[this._current]==="="?(this._current++,{type:"NE",value:"!=",start:_}):{type:"Not",value:"!",start:_}:u==="<"?S[this._current]==="="?(this._current++,{type:"LTE",value:"<=",start:_}):{type:"LT",value:"<",start:_}:u===">"?S[this._current]==="="?(this._current++,{type:"GTE",value:">=",start:_}):{type:"GT",value:">",start:_}:u==="="&&S[this._current]==="="?(this._current++,{type:"EQ",value:"==",start:_}):void 0},_consumeLiteral:function(S){this._current++;for(var _=this._current,u=S.length;S[this._current]!=="`"&&this._current<u;){var E=this._current;S[E]!=="\\"||S[E+1]!=="\\"&&S[E+1]!=="`"?E++:E+=2,this._current=E}return _=(_=b(S.slice(_,this._current))).replace("\\`","`"),_=this._looksLikeJSON(_)?JSON.parse(_):JSON.parse('"'+_+'"'),this._current++,_},_looksLikeJSON:function(S){if(S==="")return!1;if(0<='[{"'.indexOf(S[0])||0<=["true","false","null"].indexOf(S))return!0;if(!(0<="-0123456789".indexOf(S[0])))return!1;try{return JSON.parse(S),!0}catch{return!1}}},R={EOF:0,UnquotedIdentifier:0,QuotedIdentifier:0,Rbracket:0,Rparen:0,Comma:0,Rbrace:0,Number:0,Current:0,Expref:0,Pipe:1,Or:2,And:3,EQ:5,GT:5,LT:5,GTE:5,LTE:5,NE:5,Flatten:9,Star:20,Filter:21,Dot:40,Not:45,Lbrace:50,Lbracket:55,Lparen:60},J.prototype={parse:function(u){this._loadTokens(u),this.index=0;var _,u=this.expression(0);if(this._lookahead(0)!=="EOF")throw _=this._lookaheadToken(0),(_=new Error("Unexpected token type: "+_.type+", value: "+_.value)).name="ParserError",_;return u},_loadTokens:function(S){var _=new j().tokenize(S);_.push({type:"EOF",value:"",start:S.length}),this.tokens=_},expression:function(S){for(var _=this._lookaheadToken(0),u=(this._advance(),this.nud(_)),E=this._lookahead(0);S<R[E];)this._advance(),u=this.led(E,u),E=this._lookahead(0);return u},_lookahead:function(S){return this.tokens[this.index+S].type},_lookaheadToken:function(S){return this.tokens[this.index+S]},_advance:function(){this.index++},nud:function(S){var _,u;switch(S.type){case I:return{type:"Literal",value:S.value};case $:return{type:"Field",name:S.value};case y:var E={type:"Field",name:S.value};if(this._lookahead(0)===g)throw new Error("Quoted identifier not allowed for function names.");return E;case"Not":return{type:"NotExpression",children:[_=this.expression(R.Not)]};case e:return _=null,{type:"ValueProjection",children:[{type:"Identity"},_=this._lookahead(0)===f?{type:"Identity"}:this._parseProjectionRHS(R.Star)]};case r:return this.led(S.type,{type:"Identity"});case l:return this._parseMultiselectHash();case t:return{type:"Projection",children:[{type:t,children:[{type:"Identity"}]},_=this._parseProjectionRHS(R.Flatten)]};case p:return this._lookahead(0)===o||this._lookahead(0)===h?(_=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},_)):this._lookahead(0)===e&&this._lookahead(1)===f?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},_=this._parseProjectionRHS(R.Star)]}):this._parseMultiselectList();case i:return{type:i};case s:return{type:"ExpressionReference",children:[u=this.expression(R.Expref)]};case g:for(var v=[];this._lookahead(0)!==d;)this._lookahead(0)===i?(u={type:i},this._advance()):u=this.expression(0),v.push(u);return this._match(d),v[0];default:this._errorToken(S)}},led:function(S,_){var u;switch(S){case"Dot":var E=R.Dot;return this._lookahead(0)!==e?{type:"Subexpression",children:[_,u=this._parseDotRHS(E)]}:(this._advance(),{type:"ValueProjection",children:[_,u=this._parseProjectionRHS(E)]});case a:return u=this.expression(R.Pipe),{type:a,children:[_,u]};case"Or":return{type:"OrExpression",children:[_,u=this.expression(R.Or)]};case"And":return{type:"AndExpression",children:[_,u=this.expression(R.And)]};case g:for(var v,E=_.name,L=[];this._lookahead(0)!==d;)this._lookahead(0)===i?(v={type:i},this._advance()):v=this.expression(0),this._lookahead(0)===c&&this._match(c),L.push(v);return this._match(d),{type:"Function",name:E,children:L};case r:return E=this.expression(0),this._match(f),{type:"FilterProjection",children:[_,u=this._lookahead(0)===t?{type:"Identity"}:this._parseProjectionRHS(R.Filter),E]};case t:return{type:"Projection",children:[{type:t,children:[_]},this._parseProjectionRHS(R.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(_,S);case p:return E=this._lookaheadToken(0),E.type===o||E.type===h?(u=this._parseIndexExpression(),this._projectIfSlice(_,u)):(this._match(e),this._match(f),{type:"Projection",children:[_,u=this._parseProjectionRHS(R.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(S){var _;if(this._lookahead(0)!==S)throw _=this._lookaheadToken(0),(S=new Error("Expected "+S+", got: "+_.type)).name="ParserError",S;this._advance()},_errorToken:function(S){throw S=new Error("Invalid token ("+S.type+'): "'+S.value+'"'),S.name="ParserError",S},_parseIndexExpression:function(){var S;return this._lookahead(0)===h||this._lookahead(1)===h?this._parseSliceExpression():(S={type:"Index",value:this._lookaheadToken(0).value},this._advance(),this._match(f),S)},_projectIfSlice:function(S,_){return S={type:"IndexExpression",children:[S,_]},_.type==="Slice"?{type:"Projection",children:[S,this._parseProjectionRHS(R.Star)]}:S},_parseSliceExpression:function(){for(var S,_=[null,null,null],u=0,E=this._lookahead(0);E!==f&&u<3;){if(E===h)u++;else{if(E!==o)throw S=this._lookahead(0),(S=new Error("Syntax error, unexpected token: "+S.value+"("+S.type+")")).name="Parsererror",S;_[u]=this._lookaheadToken(0).value}this._advance(),E=this._lookahead(0)}return this._match(f),{type:"Slice",children:_}},_parseComparator:function(S,_){return{type:"Comparator",name:_,children:[S,this.expression(R[_])]}},_parseDotRHS:function(S){var _=this._lookahead(0);return 0<=[$,y,e].indexOf(_)?this.expression(S):_===p?(this._match(p),this._parseMultiselectList()):_===l?(this._match(l),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(S){var _,u;if(R[this._lookahead(0)]<10)_={type:"Identity"};else if(this._lookahead(0)===p)_=this.expression(S);else if(this._lookahead(0)===r)_=this.expression(S);else{if(this._lookahead(0)!=="Dot")throw u=this._lookaheadToken(0),(u=new Error("Sytanx error, unexpected token: "+u.value+"("+u.type+")")).name="ParserError",u;this._match("Dot"),_=this._parseDotRHS(S)}return _},_parseMultiselectList:function(){for(var S=[];this._lookahead(0)!==f;){var _=this.expression(0);if(S.push(_),this._lookahead(0)===c&&(this._match(c),this._lookahead(0)===f))throw new Error("Unexpected token Rbracket")}return this._match(f),{type:"MultiSelectList",children:S}},_parseMultiselectHash:function(){for(var S,_,u=[],E=[$,y];;){if(S=this._lookaheadToken(0),E.indexOf(S.type)<0)throw new Error("Expecting an identifier token, got: "+S.type);if(S=S.value,this._advance(),this._match(h),_=this.expression(0),u.push({type:"KeyValuePair",name:S,value:_}),this._lookahead(0)===c)this._match(c);else if(this._lookahead(0)===n){this._match(n);break}}return{type:"MultiSelectHash",children:u}}},F.prototype={search:function(S,_){return this.visit(S,_)},visit:function(S,_){var u,E,v,L,G,P;switch(S.type){case"Field":return _!==null&&U(_)?(Y=_[S.name])===void 0?null:Y:null;case"Subexpression":for(T=this.visit(S.children[0],_),w=1;w<S.children.length;w++)if((T=this.visit(S.children[1],T))===null)return null;return T;case"IndexExpression":return G=this.visit(S.children[0],_),this.visit(S.children[1],G);case"Index":return Z(_)?(T=_[Y=(Y=S.value)<0?_.length+Y:Y])===void 0?null:T:null;case"Slice":if(!Z(_))return null;var Y=S.children.slice(0),Y=this.computeSliceParams(_.length,Y),Q=Y[0],K=Y[1],te=Y[2],T=[];if(0<te)for(w=Q;w<K;w+=te)T.push(_[w]);else for(w=Q;K<w;w+=te)T.push(_[w]);return T;case"Projection":var O=this.visit(S.children[0],_);if(!Z(O))return null;for(V=[],w=0;w<O.length;w++)(E=this.visit(S.children[1],O[w]))!==null&&V.push(E);return V;case"ValueProjection":if(!U(O=this.visit(S.children[0],_)))return null;for(var V=[],z=function(ye){for(var ke=Object.keys(ye),xe=[],Re=0;Re<ke.length;Re++)xe.push(ye[ke[Re]]);return xe}(O),w=0;w<z.length;w++)(E=this.visit(S.children[1],z[w]))!==null&&V.push(E);return V;case"FilterProjection":if(!Z(O=this.visit(S.children[0],_)))return null;var k=[],W=[];for(w=0;w<O.length;w++)H(u=this.visit(S.children[2],O[w]))||k.push(O[w]);for(var D=0;D<k.length;D++)(E=this.visit(S.children[1],k[D]))!==null&&W.push(E);return W;case"Comparator":switch(v=this.visit(S.children[0],_),L=this.visit(S.children[1],_),S.name){case"EQ":T=x(v,L);break;case"NE":T=!x(v,L);break;case"GT":T=L<v;break;case"GTE":T=L<=v;break;case"LT":T=v<L;break;case"LTE":T=v<=L;break;default:throw new Error("Unknown comparator: "+S.name)}return T;case t:var q=this.visit(S.children[0],_);if(!Z(q))return null;var ae=[];for(w=0;w<q.length;w++)Z(E=q[w])?ae.push.apply(ae,E):ae.push(E);return ae;case"Identity":return _;case"MultiSelectList":if(_===null)return null;for(V=[],w=0;w<S.children.length;w++)V.push(this.visit(S.children[w],_));return V;case"MultiSelectHash":if(_===null)return null;for(V={},w=0;w<S.children.length;w++)V[(P=S.children[w]).name]=this.visit(P.value,_);return V;case"OrExpression":return u=H(u=this.visit(S.children[0],_))?this.visit(S.children[1],_):u;case"AndExpression":return H(v=this.visit(S.children[0],_))===!0?v:this.visit(S.children[1],_);case"NotExpression":return H(v=this.visit(S.children[0],_));case"Literal":return S.value;case a:return G=this.visit(S.children[0],_),this.visit(S.children[1],G);case i:return _;case"Function":var me=[];for(w=0;w<S.children.length;w++)me.push(this.visit(S.children[w],_));return this.runtime.callFunction(S.name,me);case"ExpressionReference":return Y=S.children[0],Y.jmespathType=s,Y;default:throw new Error("Unknown node type: "+S.type)}},computeSliceParams:function(S,u){var L=u[0],G=u[1],u=u[2],E=[null,null,null];if(u===null)u=1;else if(u===0)throw(v=new Error("Invalid slice, step cannot be 0")).name="RuntimeError",v;var v=u<0,L=L===null?v?S-1:0:this.capSliceRange(S,L,u),G=G===null?v?-1:S:this.capSliceRange(S,G,u);return E[0]=L,E[1]=G,E[2]=u,E},capSliceRange:function(S,_,u){return _<0?(_+=S)<0&&(_=u<0?-1:0):S<=_&&(_=u<0?S-1:S),_}},B.prototype={callFunction:function(S,_){var u=this.functionTable[S];if(u===void 0)throw new Error("Unknown function: "+S+"()");return this._validateArgs(S,_,u._signature),u._func.call(this,_)},_validateArgs:function(S,_,u){var E;if(u[u.length-1].variadic){if(_.length<u.length)throw E=u.length===1?" argument":" arguments",new Error("ArgumentError: "+S+"() takes at least"+u.length+E+" but received "+_.length)}else if(_.length!==u.length)throw E=u.length===1?" argument":" arguments",new Error("ArgumentError: "+S+"() takes "+u.length+E+" but received "+_.length);for(var v=0;v<u.length;v++){for(var L,G=!1,P=u[v].types,Y=this._getTypeName(_[v]),Q=0;Q<P.length;Q++)if(this._typeMatches(Y,P[Q],_[v])){G=!0;break}if(!G)throw L=P.map(function(K){return C[K]}).join(","),new Error("TypeError: "+S+"() expected argument "+(v+1)+" to be type "+L+" but received type "+C[Y]+" instead.")}},_typeMatches:function(S,_,u){if(_===1)return!0;if(_!==9&&_!==8&&_!==3)return S===_;if(_===3)return S===3;if(S===3){var E;_===8?E=0:_===9&&(E=2);for(var v=0;v<u.length;v++)if(!this._typeMatches(this._getTypeName(u[v]),E,u[v]))return!1;return!0}},_getTypeName:function(S){switch(Object.prototype.toString.call(S)){case"[object String]":return 2;case"[object Number]":return 0;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return S.jmespathType===s?6:4}},_functionStartsWith:function(S){return S[0].lastIndexOf(S[1])===0},_functionEndsWith:function(u){var _=u[0],u=u[1];return _.indexOf(u,_.length-u.length)!==-1},_functionReverse:function(S){var _;if(this._getTypeName(S[0])!==2)return(_=S[0].slice(0)).reverse(),_;for(var u=S[0],E="",v=u.length-1;0<=v;v--)E+=u[v];return E},_functionAbs:function(S){return Math.abs(S[0])},_functionCeil:function(S){return Math.ceil(S[0])},_functionAvg:function(S){for(var _=0,u=S[0],E=0;E<u.length;E++)_+=u[E];return _/u.length},_functionContains:function(S){return 0<=S[0].indexOf(S[1])},_functionFloor:function(S){return Math.floor(S[0])},_functionLength:function(S){return(U(S[0])?Object.keys(S[0]):S[0]).length},_functionMap:function(S){for(var _=[],u=this._interpreter,E=S[0],v=S[1],L=0;L<v.length;L++)_.push(u.visit(E,v[L]));return _},_functionMerge:function(S){for(var _={},u=0;u<S.length;u++){var E,v=S[u];for(E in v)_[E]=v[E]}return _},_functionMax:function(S){if(0<S[0].length){if(this._getTypeName(S[0][0])===0)return Math.max.apply(Math,S[0]);for(var _=S[0],u=_[0],E=1;E<_.length;E++)u.localeCompare(_[E])<0&&(u=_[E]);return u}return null},_functionMin:function(S){if(0<S[0].length){if(this._getTypeName(S[0][0])===0)return Math.min.apply(Math,S[0]);for(var _=S[0],u=_[0],E=1;E<_.length;E++)_[E].localeCompare(u)<0&&(u=_[E]);return u}return null},_functionSum:function(S){for(var _=0,u=S[0],E=0;E<u.length;E++)_+=u[E];return _},_functionType:function(S){switch(this._getTypeName(S[0])){case 0:return"number";case 2:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(S){return Object.keys(S[0])},_functionValues:function(S){for(var _=S[0],u=Object.keys(_),E=[],v=0;v<u.length;v++)E.push(_[u[v]]);return E},_functionJoin:function(S){var _=S[0];return S[1].join(_)},_functionToArray:function(S){return this._getTypeName(S[0])===3?S[0]:[S[0]]},_functionToString:function(S){return this._getTypeName(S[0])===2?S[0]:JSON.stringify(S[0])},_functionToNumber:function(S){var _=this._getTypeName(S[0]);return _===0?S[0]:_!==2||(_=+S[0],isNaN(_))?null:_},_functionNotNull:function(S){for(var _=0;_<S.length;_++)if(this._getTypeName(S[_])!==7)return S[_];return null},_functionSort:function(S){return S=S[0].slice(0),S.sort(),S},_functionSortBy:function(S){var _=S[0].slice(0);if(_.length!==0){var u=this._interpreter,E=S[1],v=this._getTypeName(u.visit(E,_[0]));if([0,2].indexOf(v)<0)throw new Error("TypeError");for(var L=this,G=[],P=0;P<_.length;P++)G.push([P,_[P]]);G.sort(function(Q,K){var te=u.visit(E,Q[1]),T=u.visit(E,K[1]);if(L._getTypeName(te)!==v)throw new Error("TypeError: expected "+v+", received "+L._getTypeName(te));if(L._getTypeName(T)!==v)throw new Error("TypeError: expected "+v+", received "+L._getTypeName(T));return T<te?1:te<T?-1:Q[0]-K[0]});for(var Y=0;Y<G.length;Y++)_[Y]=G[Y][1]}return _},_functionMaxBy:function(S){for(var _,u,E=S[1],v=S[0],L=this.createKeyFunction(E,[0,2]),G=-1/0,P=0;P<v.length;P++)G<(u=L(v[P]))&&(G=u,_=v[P]);return _},_functionMinBy:function(S){for(var _,u,E=S[1],v=S[0],L=this.createKeyFunction(E,[0,2]),G=1/0,P=0;P<v.length;P++)(u=L(v[P]))<G&&(G=u,_=v[P]);return _},createKeyFunction:function(S,_){var u=this,E=this._interpreter;return function(G){var L,G=E.visit(S,G);if(_.indexOf(u._getTypeName(G))<0)throw L="TypeError: expected one of "+_+", received "+u._getTypeName(G),new Error(L);return G}}},m.tokenize=function(S){return new j().tokenize(S)},m.compile=function(S){return new J().parse(S)},m.search=function(S,_){var u=new J,E=new F(v=new B),v=(v._interpreter=E,u.parse(_));return E.search(v,S)},m.strictDeepEqual=x},4316:function(le){var m=le.exports=function(U,x,H){typeof x=="function"&&(H=x,x={}),function X(j,J,F,B,b,C,$,y,f,d){if(B&&typeof B=="object"&&!Array.isArray(B)){for(var c in J(B,b,C,$,y,f,d),B){var h=B[c];if(Array.isArray(h)){if(c in m.arrayKeywords)for(var n=0;n<h.length;n++)X(j,J,F,h[n],b+"/"+c+"/"+n,C,b,c,B,n)}else if(c in m.propsKeywords){if(h&&typeof h=="object")for(var o in h)X(j,J,F,h[o],b+"/"+c+"/"+Z(o),C,b,c,B,o)}else(c in m.keywords||j.allKeys&&!(c in m.skipKeywords))&&X(j,J,F,h,b+"/"+c,C,b,c,B)}F(B,b,C,$,y,f,d)}}(x,typeof(H=x.cb||H)=="function"?H:H.pre||function(){},H.post||function(){},U,"",U)};function Z(U){return U.replace(/~/g,"~0").replace(/\//g,"~1")}m.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},m.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},m.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},m.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},3094:function(le,m){var Z={b:"\b",f:"\f",n:`
`,r:"\r",t:"	",'"':'"',"/":"/","\\":"\\"},U=97,x=(m.parse=function(d,c,h){var n={},o=0,i=0,s=0,a=h&&h.bigint&&typeof BigInt<"u";return{data:t("",!0),pointers:n};function t(u,E){e(),A(u,"value");var v,L=p();switch(L){case"t":l("rue"),v=!0;break;case"f":l("alse"),v=!1;break;case"n":l("ull"),v=null;break;case'"':v=r();break;case"[":v=function(G){e();var P=[],Y=0;if(p()!="]")for(g();;){P.push(t(G+"/"+Y)),e();var Q=p();if(Q=="]")break;Q!=","&&S(),e(),Y++}return P}(u);break;case"{":v=function(G){e();var P={};if(p()!="}")for(g();;){var K=M(),Y=(p()!='"'&&S(),r()),Q=G+"/"+f(Y),K=(N(Q,"key",K),A(Q,"keyEnd"),e(),p()!=":"&&S(),e(),P[Y]=t(Q),e(),p());if(K=="}")break;K!=","&&S(),e()}return P}(u);break;default:g(),0<="-0123456789".indexOf(L)?v=function(){var G="",P=!0;d[s]=="-"&&(G+=p()),G+=(d[s]=="0"?p:I)(),d[s]=="."&&(G+=p()+I(),P=!1),d[s]!="e"&&d[s]!="E"||(G+=p(),d[s]!="+"&&d[s]!="-"||(G+=p()),G+=I(),P=!1);var Y=+G;return a&&P&&(Y>Number.MAX_SAFE_INTEGER||Y<Number.MIN_SAFE_INTEGER)?BigInt(G):Y}():R()}return A(u,"valueEnd"),e(),E&&s<d.length&&R(),v}function e(){e:for(;s<d.length;){switch(d[s]){case" ":i++;break;case"	":i+=4;break;case"\r":i=0;break;case`
`:i=0,o++;break;default:break e}s++}}function r(){for(var u,E="";(u=p())!='"';)u=="\\"?(u=p())in Z?E+=Z[u]:u=="u"?E+=function(){for(var v=4,L=0;v--;){L<<=4;var G=p().toLowerCase();"a"<=G&&G<="f"?L+=G.charCodeAt()-U+10:"0"<=G&&G<="9"?L+=+G:S()}return String.fromCharCode(L)}():S():E+=u;return E}function l(u){for(var E=0;E<u.length;E++)p()!==u[E]&&S()}function p(){_();var u=d[s];return s++,i++,u}function g(){s--,i--}function I(){for(var u="";"0"<=d[s]&&d[s]<="9";)u+=p();if(u.length)return u;_(),R()}function A(u,E){N(u,E,M())}function N(u,E,v){n[u]=n[u]||{},n[u][E]=v}function M(){return{line:o,column:i,pos:s}}function R(){throw new SyntaxError("Unexpected token "+d[s]+" in JSON at position "+s)}function S(){g(),R()}function _(){if(s>=d.length)throw new SyntaxError("Unexpected end of JSON input")}},m.stringify=function(d,c,h){if(H(d)){var n=0;switch(typeof(i=typeof h=="object"?h.space:h)){case"number":var o=10<i?10:i<0?0:Math.floor(i),i=o&&R(o," "),s=o,a=o;break;case"string":i=i.slice(0,10);for(var t=a=s=0;t<i.length;t++){switch(i[t]){case" ":a++;break;case"	":a+=4;break;case"\r":a=0;break;case`
`:a=0,n++;break;default:throw new Error("whitespace characters not allowed in JSON")}s++}break;default:i=void 0}var e="",r={},l=0,p=0,g=0,I=h&&h.es6&&typeof Map=="function";return function S(_,u,E){switch(M(E,"value"),typeof _){case"number":case"bigint":case"boolean":A(""+_);break;case"string":A(C(_));break;case"object":_===null?A("null"):typeof _.toJSON=="function"?A(C(_.toJSON())):Array.isArray(_)?v():I?_.constructor.BYTES_PER_ELEMENT?v():_ instanceof Map?G():_ instanceof Set?G(!0):L():L()}M(E,"valueEnd");function v(){if(_.length){A("[");for(var P=u+1,Y=0;Y<_.length;Y++){Y&&A(","),N(P);var Q=H(_[Y])?_[Y]:null,K=E+"/"+Y;S(Q,P,K)}N(u),A("]")}else A("[]")}function L(){var P=Object.keys(_);if(P.length){A("{");for(var Y=u+1,Q=0;Q<P.length;Q++){var K,te=P[Q],T=_[te];H(T)&&(Q&&A(","),K=E+"/"+f(te),N(Y),M(K,"key"),A(C(te)),M(K,"keyEnd"),A(":"),i&&A(" "),S(T,Y,K))}N(u),A("}")}else A("{}")}function G(P){if(_.size){A("{");for(var Y=u+1,Q=!0,K=_.entries(),te=K.next();!te.done;){var T,V=te.value,O=V[0],V=!!P||V[1];H(V)&&(Q||A(","),Q=!1,T=E+"/"+f(O),N(Y),M(T,"key"),A(C(O)),M(T,"keyEnd"),A(":"),i&&A(" "),S(V,Y,T)),te=K.next()}N(u),A("}")}else A("{}")}}(d,0,""),{json:e,pointers:r}}function A(S){p+=S.length,g+=S.length,e+=S}function N(S){if(i){for(e+=`
`+R(S,i),l++,p=0;S--;)n?(l+=n,p=a):p+=a,g+=s;g+=1}}function M(S,_){r[S]=r[S]||{},r[S][_]={line:l,column:p,pos:g}}function R(S,_){return Array(S+1).join(_)}},["number","bigint","boolean","string","object"]);function H(d){return 0<=x.indexOf(typeof d)}var X=/"|\\/g,j=/[\b]/g,J=/\f/g,F=/\n/g,B=/\r/g,b=/\t/g;function C(d){return'"'+(d=d.replace(X,"\\$&").replace(J,"\\f").replace(j,"\\b").replace(F,"\\n").replace(B,"\\r").replace(b,"\\t"))+'"'}var $=/~/g,y=/\//g;function f(d){return d.replace($,"~0").replace(y,"~1")}},8340:function(le,m){var Z;(m=typeof(Z=function(){function U(c){return typeof Node=="object"?c instanceof Node:c&&typeof c=="object"&&typeof c.nodeType=="number"}function x(c){return typeof c=="string"}function H(){var c=[];return{watch:c.push.bind(c),trigger:function(h,n){for(var o=!0,i={detail:n,preventDefault:function(){o=!1}},s=0;s<c.length;s++)c[s](h,i);return o}}}function X(c){return window.getComputedStyle(c).display==="none"}function j(c){this.elem=c}function J(c,h){return j.make(c("parent")).clazz("pico-overlay").clazz(c("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(c("overlayStyles",{opacity:.5,background:"#000"})).onClick(function(){c("overlayClose",!0)&&h()})}j.make=function(c,h){typeof c=="string"&&(c=document.querySelector(c));var n=document.createElement(h||"div");return(c||document.body).appendChild(n),new j(n)},j.prototype={child:function(c){return j.make(this.elem,c)},stylize:function(c){c=c||{},typeof c.opacity<"u"&&(c.filter="alpha(opacity="+c.opacity*100+")");for(var h in c)c.hasOwnProperty(h)&&(this.elem.style[h]=c[h]);return this},clazz:function(c){return this.elem.className+=" "+c,this},html:function(c){return U(c)?this.elem.appendChild(c):this.elem.innerHTML=c,this},onClick:function(c){return this.elem.addEventListener("click",c),this},destroy:function(){this.elem.parentNode.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(c,h){return h!==void 0&&this.elem.setAttribute(c,h),this},anyAncestor:function(c){for(var h=this.elem;h;){if(c(new j(h)))return!0;h=h.parentNode}return!1},isVisible:function(){return!X(this.elem)}};var F=1;function B(c,h){var n=c("width","auto");typeof n=="number"&&(n=""+n+"px");var o=c("modalId","pico-"+F++),i=j.make(c("parent")).clazz("pico-content").clazz(c("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:n,"-ms-transform":"translate(-50%,-38.1966%)","-moz-transform":"translate(-50%,-38.1966%)","-webkit-transform":"translate(-50%,-38.1966%)","-o-transform":"translate(-50%,-38.1966%)",transform:"translate(-50%,-38.1966%)"}).stylize(c("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(c("content")).attr("id",o).attr("role","dialog").attr("aria-labelledby",c("ariaLabelledBy")).attr("aria-describedby",c("ariaDescribedBy",o)).onClick(function(s){var a=new j(s.target).anyAncestor(function(t){return/\bpico-close\b/.test(t.elem.className)});a&&h()});return i}function b(c,h){if(h("closeButton",!0))return c.child("button").html(h("closeHtml","&#xD7;")).clazz("pico-close").clazz(h("closeClass","")).stylize(h("closeStyles",{borderRadius:"2px",border:0,padding:0,cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})).attr("aria-label",h("close-label","Close"))}function C(c){return function(){return c().elem}}var $=H(),y=H();function f(c,h){function n(t,e){var r=t.msMatchesSelector||t.webkitMatchesSelector||t.matches;return r.call(t,e)}function o(t){return X(t)||n(t,":disabled")||t.hasAttribute("contenteditable")?!1:t.hasAttribute("tabindex")||n(t,"input,select,textarea,button,a[href],area[href],iframe")}function i(t){for(var e=t.getElementsByTagName("*"),r=0;r<e.length;r++)if(o(e[r]))return e[r]}function s(t){for(var e=t.getElementsByTagName("*"),r=e.length;r--;)if(o(e[r]))return e[r]}var a;c.beforeShow(function(){a=document.activeElement}),c.afterShow(function(){if(h()){var e=i(c.modalElem());e&&e.focus()}}),c.afterClose(function(){h()&&a&&a.focus(),a=null}),y.watch(function(e){if(h()&&c.isVisible()){var r=i(c.modalElem()),l=s(c.modalElem()),p=e.shiftKey?r:l;p===document.activeElement&&((e.shiftKey?l:r).focus(),e.preventDefault())}})}function d(c,h){var n,o=new j(document.body);c.beforeShow(function(){n=o.elem.style.overflow,h()&&o.stylize({overflow:"hidden"})}),c.afterClose(function(){o.stylize({overflow:n})})}return document.documentElement.addEventListener("keydown",function(h){var n=h.which||h.keyCode;n===27?$.trigger():n===9&&y.trigger(h)}),function(h){(x(h)||U(h))&&(h={content:h});var n=H(),o=H(),i=H(),s=H(),a=H();function t(R,S){var _=h[R];return typeof _=="function"&&(_=_(S)),_===void 0?S:_}var e=M.bind(window,"modal"),r=M.bind(window,"overlay"),l=M.bind(window,"close"),p;function g(R){r().hide(),e().hide(),a.trigger(p,R)}function I(R){s.trigger(p,R)&&g(R)}function A(R){return function(){return R.apply(this,arguments),p}}var N;function M(R,S){if(!N){var _=B(t,I);N={modal:_,overlay:J(t,I),close:b(_,t)},n.trigger(p,S)}return N[R]}return p={modalElem:C(e),closeElem:C(l),overlayElem:C(r),buildDom:A(M.bind(null,null)),isVisible:function(){return!!(N&&e&&e().isVisible())},show:function(R){return o.trigger(p,R)&&(r().show(),l(),e().show(),i.trigger(p,R)),this},close:A(I),forceClose:A(g),destroy:function(){e().destroy(),r().destroy(),r=e=l=void 0},options:function(R){Object.keys(R).map(function(S){h[S]=R[S]})},afterCreate:A(n.watch),beforeShow:A(o.watch),afterShow:A(i.watch),beforeClose:A(s.watch),afterClose:A(a.watch)},f(p,t.bind(null,"focus",!0)),d(p,t.bind(null,"bodyOverflow",!0)),$.watch(function(){t("escCloses",!0)&&p.isVisible()&&p.close()}),p}})=="function"?Z.apply(m,[]):Z)!==void 0&&(le.exports=m)},6777:function(le,m){/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(Z){function U(){for(var ie=arguments.length,ne=Array(ie),se=0;se<ie;se++)ne[se]=arguments[se];if(ne.length>1){ne[0]=ne[0].slice(0,-1);for(var ge=ne.length-1,ue=1;ue<ge;++ue)ne[ue]=ne[ue].slice(1,-1);return ne[ge]=ne[ge].slice(1),ne.join("")}else return ne[0]}function x(ie){return"(?:"+ie+")"}function H(ie){return ie===void 0?"undefined":ie===null?"null":Object.prototype.toString.call(ie).split(" ").pop().split("]").shift().toLowerCase()}function X(ie){return ie.toUpperCase()}function j(ie){return ie!=null?ie instanceof Array?ie:typeof ie.length!="number"||ie.split||ie.setInterval||ie.call?[ie]:Array.prototype.slice.call(ie):[]}function J(ie,ne){var se=ie;if(ne)for(var ge in ne)se[ge]=ne[ge];return se}function F(ie){var ne="[A-Za-z]",se="[0-9]",ge=U(se,"[A-Fa-f]"),ue=x(x("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+x("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+x("%"+ge+ge)),_e="[\\:\\/\\?\\#\\[\\]\\@]",Le="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Be=U(_e,Le),Fe=ie?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ke=ie?"[\\uE000-\\uF8FF]":"[]",Ge=U(ne,se,"[\\-\\.\\_\\~]",Fe);x(ne+U(ne,se,"[\\+\\-\\.]")+"*"),x(x(ue+"|"+U(Ge,Le,"[\\:]"))+"*");var Oe=x(x("25[0-5]")+"|"+x("2[0-4]"+se)+"|"+x("1"+se+se)+"|"+x("0?[1-9]"+se)+"|0?0?"+se),je=x(Oe+"\\."+Oe+"\\."+Oe+"\\."+Oe),Pe=x(ge+"{1,4}"),Ze=x(x(Pe+"\\:"+Pe)+"|"+je),ze=x(x(Pe+"\\:")+"{6}"+Ze),De=x("\\:\\:"+x(Pe+"\\:")+"{5}"+Ze),tt=x(x(Pe)+"?\\:\\:"+x(Pe+"\\:")+"{4}"+Ze),Ue=x(x(x(Pe+"\\:")+"{0,1}"+Pe)+"?\\:\\:"+x(Pe+"\\:")+"{3}"+Ze),Qe=x(x(x(Pe+"\\:")+"{0,2}"+Pe)+"?\\:\\:"+x(Pe+"\\:")+"{2}"+Ze),ot=x(x(x(Pe+"\\:")+"{0,3}"+Pe)+"?\\:\\:"+Pe+"\\:"+Ze),nt=x(x(x(Pe+"\\:")+"{0,4}"+Pe)+"?\\:\\:"+Ze),Je=x(x(x(Pe+"\\:")+"{0,5}"+Pe)+"?\\:\\:"+Pe),qe=x(x(x(Pe+"\\:")+"{0,6}"+Pe)+"?\\:\\:"),it=x([ze,De,tt,Ue,Qe,ot,nt,Je,qe].join("|")),et=x(x(Ge+"|"+ue)+"+");x("[vV]"+ge+"+\\."+U(Ge,Le,"[\\:]")+"+"),x(x(ue+"|"+U(Ge,Le))+"*");var rt=x(ue+"|"+U(Ge,Le,"[\\:\\@]"));return x(x(ue+"|"+U(Ge,Le,"[\\@]"))+"+"),x(x(rt+"|"+U("[\\/\\?]",Ke))+"*"),{NOT_SCHEME:new RegExp(U("[^]",ne,se,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(U("[^\\%\\:]",Ge,Le),"g"),NOT_HOST:new RegExp(U("[^\\%\\[\\]\\:]",Ge,Le),"g"),NOT_PATH:new RegExp(U("[^\\%\\/\\:\\@]",Ge,Le),"g"),NOT_PATH_NOSCHEME:new RegExp(U("[^\\%\\/\\@]",Ge,Le),"g"),NOT_QUERY:new RegExp(U("[^\\%]",Ge,Le,"[\\:\\@\\/\\?]",Ke),"g"),NOT_FRAGMENT:new RegExp(U("[^\\%]",Ge,Le,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(U("[^]",Ge,Le),"g"),UNRESERVED:new RegExp(Ge,"g"),OTHER_CHARS:new RegExp(U("[^\\%]",Ge,Be),"g"),PCT_ENCODED:new RegExp(ue,"g"),IPV4ADDRESS:new RegExp("^("+je+")$"),IPV6ADDRESS:new RegExp("^\\[?("+it+")"+x(x("\\%25|\\%(?!"+ge+"{2})")+"("+et+")")+"?\\]?$")}}var B=F(!1),b=F(!0),C=function(){function ie(ne,se){var ge=[],ue=!0,_e=!1,Le=void 0;try{for(var Be=ne[Symbol.iterator](),Fe;!(ue=(Fe=Be.next()).done)&&(ge.push(Fe.value),!(se&&ge.length===se));ue=!0);}catch(Ke){_e=!0,Le=Ke}finally{try{!ue&&Be.return&&Be.return()}finally{if(_e)throw Le}}return ge}return function(ne,se){if(Array.isArray(ne))return ne;if(Symbol.iterator in Object(ne))return ie(ne,se);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),$=function(ie){if(Array.isArray(ie)){for(var ne=0,se=Array(ie.length);ne<ie.length;ne++)se[ne]=ie[ne];return se}else return Array.from(ie)},y=2147483647,f=36,d=1,c=26,h=38,n=700,o=72,i=128,s="-",a=/^xn--/,t=/[^\0-\x7E]/,e=/[\x2E\u3002\uFF0E\uFF61]/g,r={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=f-d,p=Math.floor,g=String.fromCharCode;function I(ie){throw new RangeError(r[ie])}function A(ie,ne){for(var se=[],ge=ie.length;ge--;)se[ge]=ne(ie[ge]);return se}function N(ie,ne){var se=ie.split("@"),ge="";se.length>1&&(ge=se[0]+"@",ie=se[1]),ie=ie.replace(e,".");var ue=ie.split("."),_e=A(ue,ne).join(".");return ge+_e}function M(ie){for(var ne=[],se=0,ge=ie.length;se<ge;){var ue=ie.charCodeAt(se++);if(ue>=55296&&ue<=56319&&se<ge){var _e=ie.charCodeAt(se++);(_e&64512)==56320?ne.push(((ue&1023)<<10)+(_e&1023)+65536):(ne.push(ue),se--)}else ne.push(ue)}return ne}var R=function(ne){return ne-48<10?ne-22:ne-65<26?ne-65:ne-97<26?ne-97:f},S=function(ne,se){return ne+22+75*(ne<26)-((se!=0)<<5)},_=function(ne,se,ge){var ue=0;for(ne=ge?p(ne/n):ne>>1,ne+=p(ne/se);ne>l*c>>1;ue+=f)ne=p(ne/l);return p(ue+(l+1)*ne/(ne+h))},u=function(ne){var se=[],ge=ne.length,ue=0,_e=i,Le=o,Be=ne.lastIndexOf(s);Be<0&&(Be=0);for(var Fe=0;Fe<Be;++Fe)ne.charCodeAt(Fe)>=128&&I("not-basic"),se.push(ne.charCodeAt(Fe));for(var Ke=Be>0?Be+1:0;Ke<ge;){for(var Ge=ue,Oe=1,je=f;;je+=f){Ke>=ge&&I("invalid-input");var Pe=R(ne.charCodeAt(Ke++));(Pe>=f||Pe>p((y-ue)/Oe))&&I("overflow"),ue+=Pe*Oe;var Ze=je<=Le?d:je>=Le+c?c:je-Le;if(Pe<Ze)break;var ze=f-Ze;Oe>p(y/ze)&&I("overflow"),Oe*=ze}var De=se.length+1;Le=_(ue-Ge,De,Ge==0),p(ue/De)>y-_e&&I("overflow"),_e+=p(ue/De),ue%=De,se.splice(ue++,0,_e)}return String.fromCodePoint.apply(String,se)},E=function(ne){var se=[];ne=M(ne);var ge=ne.length,ue=i,_e=0,Le=o,Be=!0,Fe=!1,Ke=void 0;try{for(var Ge=ne[Symbol.iterator](),Oe;!(Be=(Oe=Ge.next()).done);Be=!0){var je=Oe.value;je<128&&se.push(g(je))}}catch(st){Fe=!0,Ke=st}finally{try{!Be&&Ge.return&&Ge.return()}finally{if(Fe)throw Ke}}var Pe=se.length,Ze=Pe;for(Pe&&se.push(s);Ze<ge;){var ze=y,De=!0,tt=!1,Ue=void 0;try{for(var Qe=ne[Symbol.iterator](),ot;!(De=(ot=Qe.next()).done);De=!0){var nt=ot.value;nt>=ue&&nt<ze&&(ze=nt)}}catch(st){tt=!0,Ue=st}finally{try{!De&&Qe.return&&Qe.return()}finally{if(tt)throw Ue}}var Je=Ze+1;ze-ue>p((y-_e)/Je)&&I("overflow"),_e+=(ze-ue)*Je,ue=ze;var qe=!0,it=!1,et=void 0;try{for(var rt=ne[Symbol.iterator](),ut;!(qe=(ut=rt.next()).done);qe=!0){var gt=ut.value;if(gt<ue&&++_e>y&&I("overflow"),gt==ue){for(var lt=_e,ct=f;;ct+=f){var ht=ct<=Le?d:ct>=Le+c?c:ct-Le;if(lt<ht)break;var pt=lt-ht,mt=f-ht;se.push(g(S(ht+pt%mt,0))),lt=p(pt/mt)}se.push(g(S(lt,0))),Le=_(_e,Je,Ze==Pe),_e=0,++Ze}}}catch(st){it=!0,et=st}finally{try{!qe&&rt.return&&rt.return()}finally{if(it)throw et}}++_e,++ue}return se.join("")},v={version:"2.1.0",ucs2:{decode:M,encode:function(ne){return String.fromCodePoint.apply(String,$(ne))}},decode:u,encode:E,toASCII:function(ne){return N(ne,function(se){return t.test(se)?"xn--"+E(se):se})},toUnicode:function(ne){return N(ne,function(se){return a.test(se)?u(se.slice(4).toLowerCase()):se})}},L={};function G(ie){var ne=ie.charCodeAt(0),se=void 0;return ne<16?se="%0"+ne.toString(16).toUpperCase():ne<128?se="%"+ne.toString(16).toUpperCase():ne<2048?se="%"+(ne>>6|192).toString(16).toUpperCase()+"%"+(ne&63|128).toString(16).toUpperCase():se="%"+(ne>>12|224).toString(16).toUpperCase()+"%"+(ne>>6&63|128).toString(16).toUpperCase()+"%"+(ne&63|128).toString(16).toUpperCase(),se}function P(ie){for(var ne="",se=0,ge=ie.length;se<ge;){var ue=parseInt(ie.substr(se+1,2),16);if(ue<128)ne+=String.fromCharCode(ue),se+=3;else if(ue>=194&&ue<224){if(ge-se>=6){var _e=parseInt(ie.substr(se+4,2),16);ne+=String.fromCharCode((ue&31)<<6|_e&63)}else ne+=ie.substr(se,6);se+=6}else if(ue>=224){if(ge-se>=9){var Le=parseInt(ie.substr(se+4,2),16),Be=parseInt(ie.substr(se+7,2),16);ne+=String.fromCharCode((ue&15)<<12|(Le&63)<<6|Be&63)}else ne+=ie.substr(se,9);se+=9}else ne+=ie.substr(se,3),se+=3}return ne}function Y(ie,ne){function se(ge){var ue=P(ge);return ue.match(ne.UNRESERVED)?ue:ge}return ie.scheme&&(ie.scheme=String(ie.scheme).replace(ne.PCT_ENCODED,se).toLowerCase().replace(ne.NOT_SCHEME,"")),ie.userinfo!==void 0&&(ie.userinfo=String(ie.userinfo).replace(ne.PCT_ENCODED,se).replace(ne.NOT_USERINFO,G).replace(ne.PCT_ENCODED,X)),ie.host!==void 0&&(ie.host=String(ie.host).replace(ne.PCT_ENCODED,se).toLowerCase().replace(ne.NOT_HOST,G).replace(ne.PCT_ENCODED,X)),ie.path!==void 0&&(ie.path=String(ie.path).replace(ne.PCT_ENCODED,se).replace(ie.scheme?ne.NOT_PATH:ne.NOT_PATH_NOSCHEME,G).replace(ne.PCT_ENCODED,X)),ie.query!==void 0&&(ie.query=String(ie.query).replace(ne.PCT_ENCODED,se).replace(ne.NOT_QUERY,G).replace(ne.PCT_ENCODED,X)),ie.fragment!==void 0&&(ie.fragment=String(ie.fragment).replace(ne.PCT_ENCODED,se).replace(ne.NOT_FRAGMENT,G).replace(ne.PCT_ENCODED,X)),ie}function Q(ie){return ie.replace(/^0*(.*)/,"$1")||"0"}function K(ie,ne){var se=ie.match(ne.IPV4ADDRESS)||[],ge=C(se,2),ue=ge[1];return ue?ue.split(".").map(Q).join("."):ie}function te(ie,ne){var se=ie.match(ne.IPV6ADDRESS)||[],ge=C(se,3),ue=ge[1],_e=ge[2];if(ue){for(var Le=ue.toLowerCase().split("::").reverse(),Be=C(Le,2),Fe=Be[0],Ke=Be[1],Ge=Ke?Ke.split(":").map(Q):[],Oe=Fe.split(":").map(Q),je=ne.IPV4ADDRESS.test(Oe[Oe.length-1]),Pe=je?7:8,Ze=Oe.length-Pe,ze=Array(Pe),De=0;De<Pe;++De)ze[De]=Ge[De]||Oe[Ze+De]||"";je&&(ze[Pe-1]=K(ze[Pe-1],ne));var tt=ze.reduce(function(Je,qe,it){if(!qe||qe==="0"){var et=Je[Je.length-1];et&&et.index+et.length===it?et.length++:Je.push({index:it,length:1})}return Je},[]),Ue=tt.sort(function(Je,qe){return qe.length-Je.length})[0],Qe=void 0;if(Ue&&Ue.length>1){var ot=ze.slice(0,Ue.index),nt=ze.slice(Ue.index+Ue.length);Qe=ot.join(":")+"::"+nt.join(":")}else Qe=ze.join(":");return _e&&(Qe+="%"+_e),Qe}else return ie}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,O="".match(/(){0}/)[1]===void 0;function V(ie){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se={},ge=ne.iri!==!1?b:B;ne.reference==="suffix"&&(ie=(ne.scheme?ne.scheme+":":"")+"//"+ie);var ue=ie.match(T);if(ue){O?(se.scheme=ue[1],se.userinfo=ue[3],se.host=ue[4],se.port=parseInt(ue[5],10),se.path=ue[6]||"",se.query=ue[7],se.fragment=ue[8],isNaN(se.port)&&(se.port=ue[5])):(se.scheme=ue[1]||void 0,se.userinfo=ie.indexOf("@")!==-1?ue[3]:void 0,se.host=ie.indexOf("//")!==-1?ue[4]:void 0,se.port=parseInt(ue[5],10),se.path=ue[6]||"",se.query=ie.indexOf("?")!==-1?ue[7]:void 0,se.fragment=ie.indexOf("#")!==-1?ue[8]:void 0,isNaN(se.port)&&(se.port=ie.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ue[4]:void 0)),se.host&&(se.host=te(K(se.host,ge),ge)),se.scheme===void 0&&se.userinfo===void 0&&se.host===void 0&&se.port===void 0&&!se.path&&se.query===void 0?se.reference="same-document":se.scheme===void 0?se.reference="relative":se.fragment===void 0?se.reference="absolute":se.reference="uri",ne.reference&&ne.reference!=="suffix"&&ne.reference!==se.reference&&(se.error=se.error||"URI is not a "+ne.reference+" reference.");var _e=L[(ne.scheme||se.scheme||"").toLowerCase()];if(!ne.unicodeSupport&&(!_e||!_e.unicodeSupport)){if(se.host&&(ne.domainHost||_e&&_e.domainHost))try{se.host=v.toASCII(se.host.replace(ge.PCT_ENCODED,P).toLowerCase())}catch(Le){se.error=se.error||"Host's domain name can not be converted to ASCII via punycode: "+Le}Y(se,B)}else Y(se,ge);_e&&_e.parse&&_e.parse(se,ne)}else se.error=se.error||"URI can not be parsed.";return se}function z(ie,ne){var se=ne.iri!==!1?b:B,ge=[];return ie.userinfo!==void 0&&(ge.push(ie.userinfo),ge.push("@")),ie.host!==void 0&&ge.push(te(K(String(ie.host),se),se).replace(se.IPV6ADDRESS,function(ue,_e,Le){return"["+_e+(Le?"%25"+Le:"")+"]"})),(typeof ie.port=="number"||typeof ie.port=="string")&&(ge.push(":"),ge.push(String(ie.port))),ge.length?ge.join(""):void 0}var w=/^\.\.?\//,k=/^\/\.(\/|$)/,W=/^\/\.\.(\/|$)/,D=/^\/?(?:.|\n)*?(?=\/|$)/;function q(ie){for(var ne=[];ie.length;)if(ie.match(w))ie=ie.replace(w,"");else if(ie.match(k))ie=ie.replace(k,"/");else if(ie.match(W))ie=ie.replace(W,"/"),ne.pop();else if(ie==="."||ie==="..")ie="";else{var se=ie.match(D);if(se){var ge=se[0];ie=ie.slice(ge.length),ne.push(ge)}else throw new Error("Unexpected dot segment condition")}return ne.join("")}function ae(ie){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=ne.iri?b:B,ge=[],ue=L[(ne.scheme||ie.scheme||"").toLowerCase()];if(ue&&ue.serialize&&ue.serialize(ie,ne),ie.host&&!se.IPV6ADDRESS.test(ie.host)){if(ne.domainHost||ue&&ue.domainHost)try{ie.host=ne.iri?v.toUnicode(ie.host):v.toASCII(ie.host.replace(se.PCT_ENCODED,P).toLowerCase())}catch(Be){ie.error=ie.error||"Host's domain name can not be converted to "+(ne.iri?"Unicode":"ASCII")+" via punycode: "+Be}}Y(ie,se),ne.reference!=="suffix"&&ie.scheme&&(ge.push(ie.scheme),ge.push(":"));var _e=z(ie,ne);if(_e!==void 0&&(ne.reference!=="suffix"&&ge.push("//"),ge.push(_e),ie.path&&ie.path.charAt(0)!=="/"&&ge.push("/")),ie.path!==void 0){var Le=ie.path;!ne.absolutePath&&(!ue||!ue.absolutePath)&&(Le=q(Le)),_e===void 0&&(Le=Le.replace(/^\/\//,"/%2F")),ge.push(Le)}return ie.query!==void 0&&(ge.push("?"),ge.push(ie.query)),ie.fragment!==void 0&&(ge.push("#"),ge.push(ie.fragment)),ge.join("")}function me(ie,ne){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ge=arguments[3],ue={};return ge||(ie=V(ae(ie,se),se),ne=V(ae(ne,se),se)),se=se||{},!se.tolerant&&ne.scheme?(ue.scheme=ne.scheme,ue.userinfo=ne.userinfo,ue.host=ne.host,ue.port=ne.port,ue.path=q(ne.path||""),ue.query=ne.query):(ne.userinfo!==void 0||ne.host!==void 0||ne.port!==void 0?(ue.userinfo=ne.userinfo,ue.host=ne.host,ue.port=ne.port,ue.path=q(ne.path||""),ue.query=ne.query):(ne.path?(ne.path.charAt(0)==="/"?ue.path=q(ne.path):((ie.userinfo!==void 0||ie.host!==void 0||ie.port!==void 0)&&!ie.path?ue.path="/"+ne.path:ie.path?ue.path=ie.path.slice(0,ie.path.lastIndexOf("/")+1)+ne.path:ue.path=ne.path,ue.path=q(ue.path)),ue.query=ne.query):(ue.path=ie.path,ne.query!==void 0?ue.query=ne.query:ue.query=ie.query),ue.userinfo=ie.userinfo,ue.host=ie.host,ue.port=ie.port),ue.scheme=ie.scheme),ue.fragment=ne.fragment,ue}function ye(ie,ne,se){var ge=J({scheme:"null"},se);return ae(me(V(ie,ge),V(ne,ge),ge,!0),ge)}function ke(ie,ne){return typeof ie=="string"?ie=ae(V(ie,ne),ne):H(ie)==="object"&&(ie=V(ae(ie,ne),ne)),ie}function xe(ie,ne,se){return typeof ie=="string"?ie=ae(V(ie,se),se):H(ie)==="object"&&(ie=ae(ie,se)),typeof ne=="string"?ne=ae(V(ne,se),se):H(ne)==="object"&&(ne=ae(ne,se)),ie===ne}function Re(ie,ne){return ie&&ie.toString().replace(!ne||!ne.iri?B.ESCAPE:b.ESCAPE,G)}function Se(ie,ne){return ie&&ie.toString().replace(!ne||!ne.iri?B.PCT_ENCODED:b.PCT_ENCODED,P)}var ce={scheme:"http",domainHost:!0,parse:function(ne,se){return ne.host||(ne.error=ne.error||"HTTP URIs must have a host."),ne},serialize:function(ne,se){var ge=String(ne.scheme).toLowerCase()==="https";return(ne.port===(ge?443:80)||ne.port==="")&&(ne.port=void 0),ne.path||(ne.path="/"),ne}},oe={scheme:"https",domainHost:ce.domainHost,parse:ce.parse,serialize:ce.serialize};function fe(ie){return typeof ie.secure=="boolean"?ie.secure:String(ie.scheme).toLowerCase()==="wss"}var Ee={scheme:"ws",domainHost:!0,parse:function(ne,se){var ge=ne;return ge.secure=fe(ge),ge.resourceName=(ge.path||"/")+(ge.query?"?"+ge.query:""),ge.path=void 0,ge.query=void 0,ge},serialize:function(ne,se){if((ne.port===(fe(ne)?443:80)||ne.port==="")&&(ne.port=void 0),typeof ne.secure=="boolean"&&(ne.scheme=ne.secure?"wss":"ws",ne.secure=void 0),ne.resourceName){var ge=ne.resourceName.split("?"),ue=C(ge,2),_e=ue[0],Le=ue[1];ne.path=_e&&_e!=="/"?_e:void 0,ne.query=Le,ne.resourceName=void 0}return ne.fragment=void 0,ne}},Ne={scheme:"wss",domainHost:Ee.domainHost,parse:Ee.parse,serialize:Ee.serialize},He={},de="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",pe="[0-9A-Fa-f]",Ce=x(x("%[EFef]"+pe+"%"+pe+pe+"%"+pe+pe)+"|"+x("%[89A-Fa-f]"+pe+"%"+pe+pe)+"|"+x("%"+pe+pe)),we="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ae=U("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Te="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Me=new RegExp(de,"g"),ee=new RegExp(Ce,"g"),re=new RegExp(U("[^]",we,"[\\.]",'[\\"]',Ae),"g"),he=new RegExp(U("[^]",de,Te),"g"),ve=he;function $e(ie){var ne=P(ie);return ne.match(Me)?ne:ie}var Ie={scheme:"mailto",parse:function(ne,se){var ge=ne,ue=ge.to=ge.path?ge.path.split(","):[];if(ge.path=void 0,ge.query){for(var _e=!1,Le={},Be=ge.query.split("&"),Fe=0,Ke=Be.length;Fe<Ke;++Fe){var Ge=Be[Fe].split("=");switch(Ge[0]){case"to":for(var Oe=Ge[1].split(","),je=0,Pe=Oe.length;je<Pe;++je)ue.push(Oe[je]);break;case"subject":ge.subject=Se(Ge[1],se);break;case"body":ge.body=Se(Ge[1],se);break;default:_e=!0,Le[Se(Ge[0],se)]=Se(Ge[1],se);break}}_e&&(ge.headers=Le)}ge.query=void 0;for(var Ze=0,ze=ue.length;Ze<ze;++Ze){var De=ue[Ze].split("@");if(De[0]=Se(De[0]),se.unicodeSupport)De[1]=Se(De[1],se).toLowerCase();else try{De[1]=v.toASCII(Se(De[1],se).toLowerCase())}catch(tt){ge.error=ge.error||"Email address's domain name can not be converted to ASCII via punycode: "+tt}ue[Ze]=De.join("@")}return ge},serialize:function(ne,se){var ge=ne,ue=j(ne.to);if(ue){for(var _e=0,Le=ue.length;_e<Le;++_e){var Be=String(ue[_e]),Fe=Be.lastIndexOf("@"),Ke=Be.slice(0,Fe).replace(ee,$e).replace(ee,X).replace(re,G),Ge=Be.slice(Fe+1);try{Ge=se.iri?v.toUnicode(Ge):v.toASCII(Se(Ge,se).toLowerCase())}catch(Ze){ge.error=ge.error||"Email address's domain name can not be converted to "+(se.iri?"Unicode":"ASCII")+" via punycode: "+Ze}ue[_e]=Ke+"@"+Ge}ge.path=ue.join(",")}var Oe=ne.headers=ne.headers||{};ne.subject&&(Oe.subject=ne.subject),ne.body&&(Oe.body=ne.body);var je=[];for(var Pe in Oe)Oe[Pe]!==He[Pe]&&je.push(Pe.replace(ee,$e).replace(ee,X).replace(he,G)+"="+Oe[Pe].replace(ee,$e).replace(ee,X).replace(ve,G));return je.length&&(ge.query=je.join("&")),ge}},be=/^([^\:]+)\:(.*)/,We={scheme:"urn",parse:function(ne,se){var ge=ne.path&&ne.path.match(be),ue=ne;if(ge){var _e=se.scheme||ue.scheme||"urn",Le=ge[1].toLowerCase(),Be=ge[2],Fe=_e+":"+(se.nid||Le),Ke=L[Fe];ue.nid=Le,ue.nss=Be,ue.path=void 0,Ke&&(ue=Ke.parse(ue,se))}else ue.error=ue.error||"URN can not be parsed.";return ue},serialize:function(ne,se){var ge=se.scheme||ne.scheme||"urn",ue=ne.nid,_e=ge+":"+(se.nid||ue),Le=L[_e];Le&&(ne=Le.serialize(ne,se));var Be=ne,Fe=ne.nss;return Be.path=(ue||se.nid)+":"+Fe,Be}},Ve=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Xe={scheme:"urn:uuid",parse:function(ne,se){var ge=ne;return ge.uuid=ge.nss,ge.nss=void 0,!se.tolerant&&(!ge.uuid||!ge.uuid.match(Ve))&&(ge.error=ge.error||"UUID is not valid."),ge},serialize:function(ne,se){var ge=ne;return ge.nss=(ne.uuid||"").toLowerCase(),ge}};L[ce.scheme]=ce,L[oe.scheme]=oe,L[Ee.scheme]=Ee,L[Ne.scheme]=Ne,L[Ie.scheme]=Ie,L[We.scheme]=We,L[Xe.scheme]=Xe,Z.SCHEMES=L,Z.pctEncChar=G,Z.pctDecChars=P,Z.parse=V,Z.removeDotSegments=q,Z.serialize=ae,Z.resolveComponents=me,Z.resolve=ye,Z.normalize=ke,Z.equal=xe,Z.escapeComponent=Re,Z.unescapeComponent=Se,Object.defineProperty(Z,"__esModule",{value:!0})})(m)},7598:function(le){le.exports=function(){var m=function(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")},Z=function(){function o(i,s){for(var a=0;a<s.length;a++){var t=s[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}return function(i,s,a){return s&&o(i.prototype,s),a&&o(i,a),i}}(),U=function(){function o(i,s){var a=[],t=!0,e=!1,r=void 0;try{for(var l=i[Symbol.iterator](),p;!(t=(p=l.next()).done)&&(a.push(p.value),!(s&&a.length===s));t=!0);}catch(g){e=!0,r=g}finally{try{!t&&l.return&&l.return()}finally{if(e)throw r}}return a}return function(i,s){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return o(i,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=(String.prototype.startsWith=String.prototype.startsWith||function(o){return this.indexOf(o)===0},String.prototype.padStart=String.prototype.padStart||function(o,i){for(var s=this;s.length<o;)s=i+s;return s},{cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"});function H(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,s=i>0?o.toFixed(i).replace(/0+$/,"").replace(/\.$/,""):o.toString();return s||"0"}var X=function(){function o(i,s,a,t){m(this,o);var e=this;function r(p){if(p.startsWith("hsl")){var g=p.match(/([\-\d\.e]+)/g).map(Number),I=U(g,4),A=I[0],N=I[1],M=I[2],R=I[3];R===void 0&&(R=1),A/=360,N/=100,M/=100,e.hsla=[A,N,M,R]}else if(p.startsWith("rgb")){var S=p.match(/([\-\d\.e]+)/g).map(Number),_=U(S,4),u=_[0],E=_[1],v=_[2],L=_[3];L===void 0&&(L=1),e.rgba=[u,E,v,L]}else p.startsWith("#")?e.rgba=o.hexToRgb(p):e.rgba=o.nameToRgb(p)||o.hexToRgb(p)}if(i!==void 0)if(Array.isArray(i))this.rgba=i;else if(a===void 0){var l=i&&""+i;l&&r(l.toLowerCase())}else this.rgba=[i,s,a,t===void 0?1:t]}return Z(o,[{key:"printRGB",value:function(s){var a=s?this.rgba:this.rgba.slice(0,3),t=a.map(function(e,r){return H(e,r===3?3:0)});return s?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(s){var a=[360,100,100,1],t=["","%","%",""],e=s?this.hsla:this.hsla.slice(0,3),r=e.map(function(l,p){return H(l*a[p],p===3?3:1)+t[p]});return s?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(s){var a=this.hex;return s?a:a.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=o.hslToRgb(this._hsla)},set:function(s){s.length===3&&(s[3]=1),this._rgba=s,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=o.rgbToHsl(this._rgba)},set:function(s){s.length===3&&(s[3]=1),this._hsla=s,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var s=this.rgba,a=s.map(function(t,e){return e<3?t.toString(16):Math.round(t*255).toString(16)});return"#"+a.map(function(t){return t.padStart(2,"0")}).join("")},set:function(s){this.rgba=o.hexToRgb(s)}}],[{key:"hexToRgb",value:function(s){var a=(s.startsWith("#")?s.slice(1):s).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!a.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+s);var t=a.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e){return parseInt(e,16)});return t[3]=t[3]/255,t}},{key:"nameToRgb",value:function(s){var a=s.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),t=x[a];return t===void 0?t:o.hexToRgb(t.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(s){var a=U(s,4),t=a[0],e=a[1],r=a[2],l=a[3];t/=255,e/=255,r/=255;var p=Math.max(t,e,r),g=Math.min(t,e,r),I=void 0,A=void 0,N=(p+g)/2;if(p===g)I=A=0;else{var M=p-g;switch(A=N>.5?M/(2-p-g):M/(p+g),p){case t:I=(e-r)/M+(e<r?6:0);break;case e:I=(r-t)/M+2;break;case r:I=(t-e)/M+4;break}I/=6}return[I,A,N,l]}},{key:"hslToRgb",value:function(s){var a=U(s,4),t=a[0],e=a[1],r=a[2],l=a[3],p=void 0,g=void 0,I=void 0;if(e===0)p=g=I=r;else{var A=function(_,u,E){return E<0&&(E+=1),E>1&&(E-=1),E<.16666666666666666?_+(u-_)*6*E:E<.5?u:E<.6666666666666666?_+(u-_)*(.6666666666666666-E)*6:_},N=r<.5?r*(1+e):r+e-r*e,M=2*r-N;p=A(M,N,t+1/3),g=A(M,N,t),I=A(M,N,t-1/3)}var R=[p*255,g*255,I*255].map(Math.round);return R[3]=l,R}}]),o}(),j=function(){function o(){m(this,o),this._events=[]}return Z(o,[{key:"add",value:function(s,a,t){s.addEventListener(a,t,!1),this._events.push({target:s,type:a,handler:t})}},{key:"remove",value:function(s,a,t){this._events=this._events.filter(function(e){var r=!0;return s&&s!==e.target&&(r=!1),a&&a!==e.type&&(r=!1),t&&t!==e.handler&&(r=!1),r&&o._doRemove(e.target,e.type,e.handler),!r})}},{key:"destroy",value:function(){this._events.forEach(function(s){return o._doRemove(s.target,s.type,s.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(s,a,t){s.removeEventListener(a,t,!1)}}]),o}();function J(o){var i=document.createElement("div");return i.innerHTML=o,i.firstElementChild}function F(o,i,s){var a=!1;function t(p,g,I){return Math.max(g,Math.min(p,I))}function e(p,g,I){if(I&&(a=!0),!!a){p.preventDefault();var A=i.getBoundingClientRect(),N=A.width,M=A.height,R=g.clientX,S=g.clientY,_=t(R-A.left,0,N),u=t(S-A.top,0,M);s(_/N,u/M)}}function r(p,g){var I=p.buttons===void 0?p.which:p.buttons;I===1?e(p,p,g):a=!1}function l(p,g){p.touches.length===1?e(p,p.touches[0],g):a=!1}o.add(i,"mousedown",function(p){r(p,!0)}),o.add(i,"touchstart",function(p){l(p,!0)}),o.add(window,"mousemove",r),o.add(i,"touchmove",l),o.add(window,"mouseup",function(p){a=!1}),o.add(i,"touchend",function(p){a=!1}),o.add(i,"touchcancel",function(p){a=!1})}var B=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
                   linear-gradient(45deg, lightgrey 25%,       white 25%,       white 75%, lightgrey 75%) 1em 1em / 2em 2em`,b=360,C="keydown",$="mousedown",y="focusin";function f(o,i){return(i||document).querySelector(o)}function d(o){o.preventDefault(),o.stopPropagation()}function c(o,i,s,a,t){o.add(i,C,function(e){s.indexOf(e.key)>=0&&a(e)})}var h=function(){function o(i){m(this,o),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new j,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(i)}return Z(o,[{key:"setOptions",value:function(s){var a=this;if(!s)return;var t=this.settings;function e(g,I,A){for(var N in g)I[N]=g[N]}if(s instanceof HTMLElement)t.parent=s;else{t.parent&&s.parent&&t.parent!==s.parent&&(this._events.remove(t.parent),this._popupInited=!1),e(s,t),s.onChange&&(this.onChange=s.onChange),s.onDone&&(this.onDone=s.onDone),s.onOpen&&(this.onOpen=s.onOpen),s.onClose&&(this.onClose=s.onClose);var r=s.color||s.colour;r&&this._setColor(r)}var l=t.parent;if(l&&t.popup&&!this._popupInited){var p=function(I){return a.openHandler(I)};this._events.add(l,"click",p),c(this._events,l,[" ","Spacebar","Enter"],p),this._popupInited=!0}else s.parent&&!t.popup&&this.show()}},{key:"openHandler",value:function(s){if(this.show()){s&&s.preventDefault(),this.settings.parent.style.pointerEvents="none";var a=s&&s.type===C?this._domEdit:this.domElement;setTimeout(function(){return a.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(s){var a=s&&s.type,t=!1;if(!s)t=!0;else if(a===$||a===y){var e=(this.__containedEvent||0)+100;s.timeStamp>e&&(t=!0)}else d(s),t=!0;t&&this.hide()&&(this.settings.parent.style.pointerEvents="",a!==$&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(s,a){this.closeHandler(),this.setOptions(s),a&&this.openHandler()}},{key:"setColor",value:function(s,a){this._setColor(s,{silent:a})}},{key:"_setColor",value:function(s,a){if(typeof s=="string"&&(s=s.trim()),!!s){a=a||{};var t=void 0;try{t=new X(s)}catch(r){if(a.failSilently)return;throw r}if(!this.settings.alpha){var e=t.hsla;e[3]=1,t.hsla=e}this.colour=this.color=t,this._setHSLA(null,null,null,null,a)}}},{key:"setColour",value:function(s,a){this.setColor(s,a)}},{key:"show",value:function(){var s=this.settings.parent;if(!s)return!1;if(this.domElement){var a=this._toggleDOM(!0);return this._setPosition(),a}var t=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',e=J(t);return this.domElement=e,this._domH=f(".picker_hue",e),this._domSL=f(".picker_sl",e),this._domA=f(".picker_alpha",e),this._domEdit=f(".picker_editor input",e),this._domSample=f(".picker_sample",e),this._domOkay=f(".picker_done button",e),this._domCancel=f(".picker_cancel button",e),e.classList.add("layout_"+this.settings.layout),this.settings.alpha||e.classList.add("no_alpha"),this.settings.editor||e.classList.add("no_editor"),this.settings.cancelButton||e.classList.add("no_cancel"),this._ifPopup(function(){return e.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var s=this,a=this,t=this.domElement,e=this._events;function r(g,I,A){e.add(g,I,A)}r(t,"click",function(g){return g.preventDefault()}),F(e,this._domH,function(g,I){return a._setHSLA(g)}),F(e,this._domSL,function(g,I){return a._setHSLA(null,g,1-I)}),this.settings.alpha&&F(e,this._domA,function(g,I){return a._setHSLA(null,null,null,1-I)});var l=this._domEdit;r(l,"input",function(g){a._setColor(this.value,{fromEditor:!0,failSilently:!0})}),r(l,"focus",function(g){var I=this;I.selectionStart===I.selectionEnd&&I.select()}),this._ifPopup(function(){var g=function(N){return s.closeHandler(N)};r(window,$,g),r(window,y,g),c(e,t,["Esc","Escape"],g);var I=function(N){s.__containedEvent=N.timeStamp};r(t,$,I),r(t,y,I),r(s._domCancel,"click",g)});var p=function(I){s._ifPopup(function(){return s.closeHandler(I)}),s.onDone&&s.onDone(s.colour)};r(this._domOkay,"click",p),c(e,t,["Enter"],p)}},{key:"_setPosition",value:function(){var s=this.settings.parent,a=this.domElement;s!==a.parentNode&&s.appendChild(a),this._ifPopup(function(t){getComputedStyle(s).position==="static"&&(s.style.position="relative");var e=t===!0?"popup_right":"popup_"+t;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(r){r===e?a.classList.add(r):a.classList.remove(r)}),a.classList.add(e)})}},{key:"_setHSLA",value:function(s,a,t,e,r){r=r||{};var l=this.colour,p=l.hsla;[s,a,t,e].forEach(function(g,I){(g||g===0)&&(p[I]=g)}),l.hsla=p,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(l)}},{key:"_updateUI",value:function(s){if(!this.domElement)return;s=s||{};var a=this.colour,t=a.hsla,e="hsl("+t[0]*b+", 100%, 50%)",r=a.hslString,l=a.hslaString,p=this._domH,g=this._domSL,I=this._domA,A=f(".picker_selector",p),N=f(".picker_selector",g),M=f(".picker_selector",I);function R(P,Y,Q){Y.style.left=Q*100+"%"}function S(P,Y,Q){Y.style.top=Q*100+"%"}R(p,A,t[0]),this._domSL.style.backgroundColor=this._domH.style.color=e,R(g,N,t[1]),S(g,N,1-t[2]),g.style.color=r,S(I,M,1-t[3]);var _=r,u=_.replace("hsl","hsla").replace(")",", 0)"),E="linear-gradient("+[_,u]+")";if(this._domA.style.background=E+", "+B,!s.fromEditor){var v=this.settings.editorFormat,L=this.settings.alpha,G=void 0;switch(v){case"rgb":G=a.printRGB(L);break;case"hsl":G=a.printHSL(L);break;default:G=a.printHex(L)}this._domEdit.value=G}this._domSample.style.color=l}},{key:"_ifPopup",value:function(s,a){this.settings.parent&&this.settings.popup?s&&s(this.settings.popup):a&&a()}},{key:"_toggleDOM",value:function(s){var a=this.domElement;if(!a)return!1;var t=s?"":"none",e=a.style.display!==t;return e&&(a.style.display=t),e}}]),o}(),n=document.createElement("style");return n.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(n),h.StyleElement=n,h}()},9857:function(le,m,Z){Z.d(m,{m:function(){return Se}});class U extends Error{constructor(oe,fe){super(oe+" at position "+fe),this.position=fe}}let x=92,H=47,X=42,j=123,J=125,F=91,B=93,b=40,C=41,$=32,y=10,f=9,d=13,c=8,h=12,n=34,o=43,i=45,s=39,a=48,t=57,e=44,r=46,l=58,p=59,g=65,I=97,A=69,N=101,M=70,R=102,S=160,_=8192,u=8202,E=8239,v=8287,L=12288,G=8220,P=8221,Y=8216,Q=8217,K=96,te=180;function T(ce){return ce>=a&&ce<=t}function O(ce){return V.test(ce)}let V=/^[,:[\]/{}()\n+]$/;function z(ce){return w.test(ce)||ce&&W(ce.charCodeAt(0))}let w=/^[[{\w-]$/;function k(ce){return ce===$||ce===y||ce===f||ce===d}function W(ce){return D(ce)||ae(ce)}function D(ce){return ce===n||ce===G||ce===P}function q(ce){return ce===n}function ae(ce){return ce===s||ce===Y||ce===Q||ce===K||ce===te}function me(ce){return ce===s}function ye(ce,oe,fe){return fe=2<arguments.length&&fe!==void 0&&fe,oe=ce.lastIndexOf(oe),oe!==-1?ce.substring(0,oe)+(fe?"":ce.substring(oe+1)):ce}function ke(ce,oe){let fe=ce.length;if(!k(ce.charCodeAt(fe-1)))return ce+oe;for(;k(ce.charCodeAt(fe-1));)fe--;return ce.substring(0,fe)+oe+ce.substring(fe)}let xe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t"},Re={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:"	"};function Se(ce){let oe=0,fe="";if(!Ne())throw new U("Unexpected end of json string",ce.length);var Ee=pe(e);if(Ee&&He(),z(ce[oe])&&/[,\n][ \t\r]*$/.test(fe)){Ee||(fe=ke(fe,","));{let Ie=!0,be=!0;for(;be;)Ie?Ie=!1:pe(e)||(fe=ke(fe,",")),be=Ne();be||(fe=ye(fe,",")),fe=`[
`.concat(fe,`
]`)}}else Ee&&(fe=ye(fe,","));for(;ce.charCodeAt(oe)===J||ce.charCodeAt(oe)===B;)oe++,He();if(oe>=ce.length)return fe;throw new U("Unexpected character "+JSON.stringify(ce[oe]),oe);function Ne(){He();var Ie=function(){if(ce.charCodeAt(oe)!==j)return!1;{fe+="{",oe++,He(),Ce(e)&&He();let Xe=!0;for(;oe<ce.length&&ce.charCodeAt(oe)!==J;){if(Xe?Xe=!1:(pe(e)||(fe=ke(fe,",")),He()),we(),!(Ae()||ee())){ce.charCodeAt(oe)===J||ce.charCodeAt(oe)===j||ce.charCodeAt(oe)===B||ce.charCodeAt(oe)===F||ce[oe]===void 0?fe=ye(fe,","):function(){throw new U("Object key expected",oe)}();break}He();var be=pe(l),We=oe>=ce.length,Ve=(be||(z(ce[oe])||We?fe=ke(fe,":"):$e()),Ne());Ve||(be||We?fe+="null":$e())}return ce.charCodeAt(oe)===J?(fe+="}",oe++):fe=ke(fe,"}"),!0}}()||function(){if(ce.charCodeAt(oe)!==F)return!1;{fe+="[",oe++,He(),Ce(e)&&He();let We=!0;for(;oe<ce.length&&ce.charCodeAt(oe)!==B;){We?We=!1:pe(e)||(fe=ke(fe,",")),we();var be=Ne();if(!be){fe=ye(fe,",");break}}return ce.charCodeAt(oe)===B?(fe+="]",oe++):fe=ke(fe,"]"),!0}}()||Ae()||function(){var be=oe;if(ce.charCodeAt(oe)===i){if(oe++,he())return ve(be),!0;if(!T(ce.charCodeAt(oe)))return oe=be,!1}for(;T(ce.charCodeAt(oe));)oe++;if(ce.charCodeAt(oe)===r){if(oe++,he())return ve(be),!0;if(!T(ce.charCodeAt(oe)))return oe=be,!1;for(;T(ce.charCodeAt(oe));)oe++}if(ce.charCodeAt(oe)===N||ce.charCodeAt(oe)===A){if(oe++,ce.charCodeAt(oe)!==i&&ce.charCodeAt(oe)!==o||oe++,he())return ve(be),!0;if(!T(ce.charCodeAt(oe)))return oe=be,!1;for(;T(ce.charCodeAt(oe));)oe++}var We,Ve;if(he()){if(oe>be)return We=ce.slice(be,oe),Ve=/^0\d/.test(We),fe+=Ve?'"'.concat(We,'"'):We,!0}else oe=be;return!1}()||Me("true","true")||Me("false","false")||Me("null","null")||Me("True","true")||Me("False","false")||Me("None","null")||ee();return He(),Ie}function He(){for(de();function(){if(ce.charCodeAt(oe)===H&&ce.charCodeAt(oe+1)===X){for(;oe<ce.length&&!function(Ie,be){return Ie[be]==="*"&&Ie[be+1]==="/"}(ce,oe);)oe++;oe+=2}else{if(ce.charCodeAt(oe)!==H||ce.charCodeAt(oe+1)!==H)return!1;for(;oe<ce.length&&ce.charCodeAt(oe)!==y;)oe++}return!0}()&&de(););}function de(){let Ie="";for(var be,We;(be=k(ce.charCodeAt(oe)))||(We=ce.charCodeAt(oe))===S||We>=_&&We<=u||We===E||We===v||We===L;)Ie+=be?ce[oe]:" ",oe++;return 0<Ie.length&&(fe+=Ie,!0)}function pe(Ie){return ce.charCodeAt(oe)===Ie&&(fe+=ce[oe],oe++,!0)}function Ce(Ie){return ce.charCodeAt(oe)===Ie&&(oe++,!0)}function we(){He(),ce.charCodeAt(oe)===r&&ce.charCodeAt(oe+1)===r&&ce.charCodeAt(oe+2)===r&&(oe+=3,He(),Ce(e))}function Ae(Ie){var be,We,Ve=0<arguments.length&&Ie!==void 0&&Ie;let Xe=ce.charCodeAt(oe)===x;if(Xe&&(oe++,Xe=!0),W(ce.charCodeAt(oe))){var ie=q(ce.charCodeAt(oe))?q:me(ce.charCodeAt(oe))?me:ae(ce.charCodeAt(oe))?ae:D,ne=oe,se=fe.length;let Be='"';for(oe++;;){if(oe>=ce.length)return ge=re(oe-1),!Ve&&O(ce.charAt(ge))?(oe=ne,fe=fe.substring(0,se),Ae(!0)):(Be=ke(Be,'"'),fe+=Be,!0);if(ie(ce.charCodeAt(oe))){var ge=oe,ue=Be.length;if(Be+='"',oe++,fe+=Be,He(),Ve||oe>=ce.length||O(ce.charAt(oe))||W(ce.charCodeAt(oe))||T(ce.charCodeAt(oe)))return Te(),!0;if(O(ce.charAt(re(ge-1))))return oe=ne,fe=fe.substring(0,se),Ae(!0);fe=fe.substring(0,se),oe=ge+1,Be=Be.substring(0,ue)+"\\"+Be.substring(ue)}else{if(Ve&&O(ce[oe]))return Be=ke(Be,'"'),fe+=Be,Te(),!0;if(ce.charCodeAt(oe)===x)if(ue=ce.charAt(oe+1),Re[ue]!==void 0)Be+=ce.slice(oe,oe+2),oe+=2;else if(ue==="u"){let Fe=2;for(;Fe<6&&((We=ce.charCodeAt(oe+Fe))>=a&&We<=t||We>=g&&We<=M||We>=I&&We<=R);)Fe++;if(Fe===6)Be+=ce.slice(oe,oe+6),oe+=6;else{if(!(oe+Fe>=ce.length))throw _e=void 0,_e=ce.slice(oe,oe+6),new U('Invalid unicode character "'.concat(_e,'"'),oe);oe=ce.length}}else Be+=ue,oe+=2;else{var _e=ce.charAt(oe),Le=ce.charCodeAt(oe);if(Le===n&&ce.charCodeAt(oe-1)!==x)Be+="\\"+_e;else if((be=Le)===y||be===d||be===f||be===c||be===h)Be+=xe[_e];else{if(!(32<=(be=Le)&&be<=1114111))throw Le=void 0,Le=_e,new U("Invalid character "+JSON.stringify(Le),oe);Be+=_e}oe++}}Xe&&Ce(x)}}return!1}function Te(){for(He();ce.charCodeAt(oe)===o;){oe++,He();var Ie=(fe=ye(fe,'"',!0)).length,be=Ae();fe=be?(be=fe,Ie=Ie,We=1,be.substring(0,Ie)+be.substring(Ie+We)):ke(fe,'"')}var We}function Me(Ie,be){return ce.slice(oe,oe+Ie.length)===Ie&&(fe+=be,oe+=Ie.length,!0)}function ee(){for(var Ie,be=oe;oe<ce.length&&(!O(Ie=ce[oe])||Ie==="/")&&!W(ce.charCodeAt(oe));)oe++;if(oe>be){if(ce.charCodeAt(oe)===b&&/^\w+$/.test(ce.slice(be,oe).trim()))oe++,Ne(),ce.charCodeAt(oe)===C&&(oe++,ce.charCodeAt(oe)===p)&&oe++;else{for(;k(ce.charCodeAt(oe-1))&&0<oe;)oe--;be=ce.slice(be,oe),fe+=be==="undefined"?"null":JSON.stringify(be),ce.charCodeAt(oe)===n&&oe++}return!0}}function re(Ie){let be=Ie;for(;0<be&&k(ce.charCodeAt(be));)be--;return be}function he(){return oe>=ce.length||O(ce[oe])||k(ce.charCodeAt(oe))}function ve(Ie){fe+=ce.slice(Ie,oe)+"0"}function $e(){throw new U("Colon expected",oe)}}},3420:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},5207:function(le){le.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},6801:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},8198:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},dt={},Ye.amdD=function(){throw new Error("define cannot be used indirect")},Ye.n=function(le){var m=le&&le.__esModule?function(){return le.default}:function(){return le};return Ye.d(m,{a:m}),m},Ye.d=function(le,m){for(var Z in m)Ye.o(m,Z)&&!Ye.o(le,Z)&&Object.defineProperty(le,Z,{enumerable:!0,get:m[Z]})},Ye.o=function(le,m){return Object.prototype.hasOwnProperty.call(le,m)},Ye.r=function(le){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(le,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(le,"__esModule",{value:!0})},Ye.nmd=function(le){return le.paths=[],le.children||(le.children=[]),le},Ye(1346);function Ye(le){var m=dt[le];return m!==void 0||(m=dt[le]={id:le,loaded:!1,exports:{}},at[le].call(m.exports,m,m.exports,Ye),m.loaded=!0),m.exports}var at,dt})})(ft);var vt=ft.exports;const At=yt(vt);export{At as J};
//# sourceMappingURL=jsoneditor.CygqJEEj.js.map
