@yoobic/yobi 7.7.106 → 7.7.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,4 +37,4 @@ var i;i=function(){return function(){var t={134:function(t,i,e){e.d(i,{default:f
37
37
  */
38
38
  self,t.exports=function(){return i={6835:function(t){t.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}')},2689:function(t){t.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":{}}')},1030:function(t){t.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":{}}')},38:function(t){t.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}')},897:function(t,i,e){e.d(i,{x:function(){return s}});var n=e(2602),r=e(9791),o=e(7907);var s=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.dom={};var n=this,r=this.dom;this.anchor=void 0,this.items=i,this.eventListeners={},this.selection=void 0,this.onClose=e?e.close:void 0,this.limitHeight=!!e&&e.limitHeight;var s=document.createElement("div");s.className="jsoneditor-contextmenu-root",r.root=s,(e=document.createElement("div")).className="jsoneditor-contextmenu",r.menu=e,s.appendChild(e),(s=document.createElement("ul")).className="jsoneditor-menu",e.appendChild(s),r.list=s,r.items=[],(e=document.createElement("button")).type="button",r.focusButton=e,(r=document.createElement("li")).style.overflow="hidden",r.style.height="0",r.appendChild(e),s.appendChild(r),function t(i,e,r){r.forEach((function(r){var s,a,h,c,l,u,d;"separator"===r.type?((h=document.createElement("div")).className="jsoneditor-separator",(l=document.createElement("li")).appendChild(h),i.appendChild(l)):(s={},a=document.createElement("li"),i.appendChild(a),(h=document.createElement("button")).type="button",h.className=r.className,s.button=h,r.title&&(h.title=r.title),r.click&&(h.onclick=function(t){t.preventDefault(),n.hide(),r.click()}),a.appendChild(h),r.submenu?((l=document.createElement("div")).className="jsoneditor-icon",h.appendChild(l),(l=document.createElement("div")).className="jsoneditor-text"+(r.click?"":" jsoneditor-right-margin"),l.appendChild(document.createTextNode(r.text)),h.appendChild(l),(c=r.click?(h.className+=" jsoneditor-default",(d=document.createElement("button")).type="button",(s.buttonExpand=d).className="jsoneditor-expand",(l=document.createElement("div")).className="jsoneditor-expand",d.appendChild(l),a.appendChild(d),r.submenuTitle&&(d.title=r.submenuTitle),d):((u=document.createElement("div")).className="jsoneditor-expand",h.appendChild(u),h)).onclick=function(t){t.preventDefault(),n._onExpandItem(s),c.focus()},s.subItems=d=[],u=document.createElement("ul"),(s.ul=u).className="jsoneditor-menu",u.style.height="0",a.appendChild(u),t(u,d,r.submenu)):((d=document.createElement("div")).className="jsoneditor-icon",h.appendChild(d),(d=document.createElement("div")).className="jsoneditor-text",d.appendChild(document.createTextNode((0,o.Iu)(r.text))),h.appendChild(d)),e.push(s))}))}(s,this.dom.items,i),this.maxHeight=0,i.forEach((function(t){t=24*(i.length+(t.submenu?t.submenu.length:0)),n.maxHeight=Math.max(n.maxHeight,t)}))}var i;return(i=[{key:"_getVisibleButtons",value:function(){var t=[],i=this;return this.dom.items.forEach((function(e){t.push(e.button),e.buttonExpand&&t.push(e.buttonExpand),e.subItems&&e===i.expandedItem&&e.subItems.forEach((function(i){t.push(i.button),i.buttonExpand&&t.push(i.buttonExpand)}))})),t}},{key:"show",value:function(i,e,o){this.hide();var s=!0,a=i.parentNode,h=i.getBoundingClientRect(),c=a.getBoundingClientRect(),l=(a=e.getBoundingClientRect(),this);this.dom.absoluteAnchor=(0,n.w)(i,e,(function(){l.hide()})),h.bottom+this.maxHeight<a.bottom||h.top-this.maxHeight>a.top&&(s=!1),o=o?0:h.top-c.top,s?(c=i.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=o+c+"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&&(this.dom.list.style.maxHeight=(a=s?a.bottom-h.bottom-10:h.top-a.top-10)+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,r.getSelection)(),this.anchor=i,setTimeout((function(){l.dom.focusButton.focus()}),0),t.visibleMenu&&t.visibleMenu.hide(),t.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()),t.visibleMenu===this&&(t.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(t){var i,e=this,n=t===this.expandedItem,o=this.expandedItem;o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout((function(){e.expandedItem!==o&&(o.ul.style.display="",r.removeClassName)(o.ul.parentNode,"jsoneditor-selected")}),300),this.expandedItem=void 0),n||((i=t.ul).style.display="block",setTimeout((function(){if(e.expandedItem===t){for(var n=0,r=0;r<i.childNodes.length;r++)n+=i.childNodes[r].clientHeight;i.style.height=n+"px",i.style.padding="5px 10px"}}),0),(0,r.addClassName)(i.parentNode,"jsoneditor-selected"),this.expandedItem=t)}},{key:"_onKeyDown",value:function(t){var i,e,n,o,s=t.target,a=t.which,h=!1;27===a?(this.selection&&(0,r.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),h=!0):9===a?t.shiftKey?0===(e=(i=this._getVisibleButtons()).indexOf(s))&&(i[i.length-1].focus(),h=!0):(e=(i=this._getVisibleButtons()).indexOf(s))===i.length-1&&(i[0].focus(),h=!0):37===a?("jsoneditor-expand"===s.className&&(e=(i=this._getVisibleButtons()).indexOf(s),(n=i[e-1])&&n.focus()),h=!0):38===a?(e=(i=this._getVisibleButtons()).indexOf(s),(n=(n=(n=i[e-1])&&"jsoneditor-expand"===n.className?i[e-2]:n)||i[i.length-1])&&n.focus(),h=!0):39===a?(e=(i=this._getVisibleButtons()).indexOf(s),(o=i[e+1])&&"jsoneditor-expand"===o.className&&o.focus(),h=!0):40===a&&(e=(i=this._getVisibleButtons()).indexOf(s),(o=(o=(o=i[e+1])&&"jsoneditor-expand"===o.className?i[e+2]:o)||i[0])&&(o.focus(),h=!0),h=!0),h&&(t.stopPropagation(),t.preventDefault())}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}();s.visibleMenu=void 0},6436:function(t,i,e){e.d(i,{Q:function(){return n}});var n=function(){function t(i){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorTableVisible=i.errorTableVisible,this.onToggleVisibility=i.onToggleVisibility,this.onFocusLine=i.onFocusLine||function(){},this.onChangeHeight=i.onChangeHeight,this.dom={};var e=document.createElement("div");e.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=e,(i=document.createElement("div")).style.display="none",i.className="jsoneditor-additional-errors fadein",i.textContent="Scroll for more ▿",this.dom.additionalErrorsIndication=i,e.appendChild(i),(i=document.createElement("span")).className="jsoneditor-validation-error-icon",i.style.display="none",this.dom.validationErrorIcon=i,(i=document.createElement("span")).className="jsoneditor-validation-error-count",i.style.display="none",this.dom.validationErrorCount=i,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var i;return(i=[{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(t,i){var e,n,r=this;this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<t.length?((o=document.createElement("div")).className="jsoneditor-validation-errors",(e=document.createElement("table")).className="jsoneditor-text-errors",o.appendChild(e),n=document.createElement("tbody"),e.appendChild(n),t.forEach((function(t){var e;isNaN(t.line)?!t.dataPath||(c=i.find((function(i){return i.path===t.dataPath})))&&(e=c.line+1):e=t.line;var o=document.createElement("tr");o.className=isNaN(e)?"":"jump-to-line",o.className+="error"===t.type?" parse-error":" validation-error";var s,a,h=document.createElement("td"),c=document.createElement("button");c.className="jsoneditor-schema-error",h.appendChild(c),o.appendChild(h),(h=document.createElement("td")).style="white-space: nowrap;",h.textContent=isNaN(e)?"":"Ln "+e,o.appendChild(h),"string"==typeof t?((s=document.createElement("td")).colSpan=2,(a=document.createElement("pre")).appendChild(document.createTextNode(t)),s.appendChild(a),o.appendChild(s)):((a=document.createElement("td")).appendChild(document.createTextNode(t.dataPath||"")),o.appendChild(a),s=document.createElement("td"),(a=document.createElement("pre")).appendChild(document.createTextNode(t.message)),s.appendChild(a),o.appendChild(s)),o.onclick=function(){r.onFocusLine(e)},n.appendChild(o)})),this.dom.validationErrors=o,this.dom.validationErrorsContainer.appendChild(o),this.dom.additionalErrorsIndication.title=t.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){r.dom.additionalErrorsIndication.style.display=0<r.dom.validationErrorsContainer.clientHeight&&0===r.dom.validationErrorsContainer.scrollTop?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,this.onChangeHeight(o=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0))):this.onChangeHeight(0);var o=t.filter((function(t){return"error"!==t.type})).length;0<o?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=o,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=o+" 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"),t.some((function(t){return"error"===t.type}))?(t=t[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(t)?"parse error - check that the json is valid":"parse error on line "+t,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}()},2474:function(t,i,e){e.d(i,{R:function(){return n}});var n=function(){function t(i){if(function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.target=i.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus="function"==typeof i.onFocus?i.onFocus:null,this.onBlur="function"==typeof i.onBlur?i.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(t){9!==t.which&&9!==t.keyCode||this._onEvent(t)}.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp))}var i;return(i=[{key:"destroy",value:function(){document.removeEventListener("click",this._onClick),document.removeEventListener("keyup",this._onKeyUp),this._onEvent({target:document.body})}},{key:"_onEvent",value:function(t){(t=(t=t.target)===this.target||!(!this.target.contains(t)&&!this.target.contains(document.activeElement)))?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))}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}()},3161:function(t,i,e){var n=e(8170),r=e(8037),o=e(8038).treeModeMixins,s=e(5956).textModeMixins,a=e(341).previewModeMixins,h=(p=e(9791)).clear,c=p.extend,l=p.getInnerText,u=p.getInternetExplorerVersion,d=p.parse,f=e(2744).tryRequireAjv,g=e(2558).showTransformModal,p=e(6210).showSortModal,m=f();function I(t,i,e){if(!(this instanceof I))throw new Error('JSONEditor constructor called without "new".');var n=u();if(-1!==n&&n<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");i&&(i.error&&(console.warn('Option "error" has been renamed to "onError"'),i.onError=i.error,delete i.error),i.change&&(console.warn('Option "change" has been renamed to "onChange"'),i.onChange=i.change,delete i.change),i.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),i.onEditable=i.editable,delete i.editable),i.onChangeJSON&&("text"!==i.mode&&"code"!==i.mode&&(!i.modes||-1===i.modes.indexOf("text")&&-1===i.modes.indexOf("code"))||console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.')),i&&Object.keys(i).forEach((function(t){-1===I.VALID_OPTIONS.indexOf(t)&&console.warn('Unknown option "'+t+'". This option will be ignored')}))),arguments.length&&this._create(t,i,e)}"undefined"==typeof Promise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),I.modes={},I.prototype.DEBOUNCE_INTERVAL=150,I.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","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"],I.prototype._create=function(t,i,e){this.container=t,this.options=i||{},this.json=e||{},this.setMode(e=this.options.mode||this.options.modes&&this.options.modes[0]||"tree")},I.prototype.destroy=function(){},I.prototype.set=function(t){this.json=t},I.prototype.get=function(){return this.json},I.prototype.setText=function(t){this.json=d(t)},I.prototype.getText=function(){return JSON.stringify(this.json)},I.prototype.setName=function(t){this.options||(this.options={}),this.options.name=t},I.prototype.getName=function(){return this.options&&this.options.name},I.prototype.setMode=function(t){if(t!==this.options.mode||!this.create){var i=this.container,e=c({},this.options),n=e.mode;e.mode=t;var r=I.modes[t];if(!r)throw new Error('Unknown mode "'+e.mode+'"');try{var o="text"===r.data,s=this.getName(),a=this[o?"getText":"get"]();if(this.destroy(),h(this),c(this,r.mixin),this.create(i,e),this.setName(s),this[o?"setText":"set"](a),"function"==typeof r.load)try{r.load.call(this)}catch(t){console.error(t)}if("function"==typeof e.onModeChange&&t!==n)try{e.onModeChange(t,n)}catch(t){console.error(t)}}catch(t){this._onError(t)}}},I.prototype.getMode=function(){return this.options.mode},I.prototype._onError=function(t){if(!this.options||"function"!=typeof this.options.onError)throw t;this.options.onError(t)},I.prototype.setSchema=function(t,i){if(t){var n;try{this.options.ajv?n=this.options.ajv:((n=m({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(e(2689)),n.addMetaSchema(e(1030)))}catch(t){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(n){if(i){for(var r in i)n.removeSchema(r),i[r]&&n.addSchema(i[r],r);this.options.schemaRefs=i}this.validateSchema=n.compile(t),this.options.schema=t,this.validate()}this.refresh()}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate(),this.refresh()},I.prototype.validate=function(){},I.prototype.refresh=function(){},I.registerMode=function(t){var i;if(Array.isArray(t))for(r=0;r<t.length;r++)I.registerMode(t[r]);else{if(!("mode"in t))throw new Error('Property "mode" missing');if(!("mixin"in t))throw new Error('Property "mixin" missing');if(!("data"in t))throw new Error('Property "data" missing');var e=t.mode;if(e in I.modes)throw new Error('Mode "'+e+'" already registered');if("function"!=typeof t.mixin.create)throw new Error('Required function "create" missing on mixin');for(var n=["setMode","registerMode","modes"],r=0;r<n.length;r++)if((i=n[r])in t.mixin)throw new Error('Reserved property "'+i+'" not allowed in mixin');I.modes[e]=t}},I.registerMode(o),I.registerMode(s),I.registerMode(a),I.ace=n,I.Ajv=m,I.VanillaPicker=r,I.showTransformModal=g,I.showSortModal=p,I.getInnerText=l,I.default=I,t.exports=I},6617:function(t,i,e){e.d(i,{x:function(){return o}});var n=e(897),r=e(7907);var o=function(){function t(i,e,o,s){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a={code:{text:(0,r.Iu)("modeCodeText"),title:(0,r.Iu)("modeCodeTitle"),click:function(){s("code")}},form:{text:(0,r.Iu)("modeFormText"),title:(0,r.Iu)("modeFormTitle"),click:function(){s("form")}},text:{text:(0,r.Iu)("modeTextText"),title:(0,r.Iu)("modeTextTitle"),click:function(){s("text")}},tree:{text:(0,r.Iu)("modeTreeText"),title:(0,r.Iu)("modeTreeTitle"),click:function(){s("tree")}},view:{text:(0,r.Iu)("modeViewText"),title:(0,r.Iu)("modeViewTitle"),click:function(){s("view")}},preview:{text:(0,r.Iu)("modePreviewText"),title:(0,r.Iu)("modePreviewTitle"),click:function(){s("preview")}}},h=[],c=0;c<e.length;c++){var l=e[c],u=a[l];if(!u)throw new Error('Unknown mode "'+l+'"');u.className="jsoneditor-type-modes"+(o===l?" jsoneditor-selected":""),h.push(u)}if(!(d=a[o]))throw new Error('Unknown mode "'+o+'"');var d=d.text,f=document.createElement("button");f.type="button",f.className="jsoneditor-modes jsoneditor-separator",f.textContent=d+" ▾",f.title=(0,r.Iu)("modeEditorTitle"),f.onclick=function(){new n.x(h).show(f,i)},(d=document.createElement("div")).className="jsoneditor-modes",d.style.position="relative",d.appendChild(f),i.appendChild(d),this.dom={container:i,box:f,frame:d}}var i;return(i=[{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}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}()},8170:function(t,i,e){var n;if(window.ace)n=window.ace;else try{n=e(6225),e(4091),e(3330);var r=e(7923);n.config.setModuleUrl("ace/mode/json_worker",r)}catch(t){}t.exports=n},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],(function(t,i){i.isDark=!1,i.cssClass="ace-jsoneditor",i.cssText='.ace-jsoneditor .ace_gutter {\nbackground: #ebebeb;\ncolor: #333\n}\n\n.ace-jsoneditor.ace_editor {\nfont-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;\nline-height: 1.3;\nbackground-color: #fff;\n}\n.ace-jsoneditor .ace_print-margin {\nwidth: 1px;\nbackground: #e8e8e8\n}\n.ace-jsoneditor .ace_scroller {\nbackground-color: #FFFFFF\n}\n.ace-jsoneditor .ace_text-layer {\ncolor: gray\n}\n.ace-jsoneditor .ace_variable {\ncolor: #1a1a1a\n}\n.ace-jsoneditor .ace_cursor {\nborder-left: 2px solid #000000\n}\n.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\nborder-left: 0px;\nborder-bottom: 1px solid #000000\n}\n.ace-jsoneditor .ace_marker-layer .ace_selection {\nbackground: lightgray\n}\n.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\nbox-shadow: 0 0 3px 0px #FFFFFF;\nborder-radius: 2px\n}\n.ace-jsoneditor .ace_marker-layer .ace_step {\nbackground: rgb(255, 255, 0)\n}\n.ace-jsoneditor .ace_marker-layer .ace_bracket {\nmargin: -1px 0 0 -1px;\nborder: 1px solid #BFBFBF\n}\n.ace-jsoneditor .ace_marker-layer .ace_active-line {\nbackground: #FFFBD1\n}\n.ace-jsoneditor .ace_gutter-active-line {\nbackground-color : #dcdcdc\n}\n.ace-jsoneditor .ace_marker-layer .ace_selected-word {\nborder: 1px solid lightgray\n}\n.ace-jsoneditor .ace_invisible {\ncolor: #BFBFBF\n}\n.ace-jsoneditor .ace_keyword,\n.ace-jsoneditor .ace_meta,\n.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\ncolor: #AF956F\n}\n.ace-jsoneditor .ace_keyword.ace_operator {\ncolor: #484848\n}\n.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\ncolor: #96DC5F\n}\n.ace-jsoneditor .ace_constant.ace_language {\ncolor: darkorange\n}\n.ace-jsoneditor .ace_constant.ace_numeric {\ncolor: red\n}\n.ace-jsoneditor .ace_constant.ace_character.ace_entity {\ncolor: #BF78CC\n}\n.ace-jsoneditor .ace_invalid {\ncolor: #FFFFFF;\nbackground-color: #FF002A;\n}\n.ace-jsoneditor .ace_fold {\nbackground-color: #AF956F;\nborder-color: #000000\n}\n.ace-jsoneditor .ace_storage,\n.ace-jsoneditor .ace_support.ace_class,\n.ace-jsoneditor .ace_support.ace_function,\n.ace-jsoneditor .ace_support.ace_other,\n.ace-jsoneditor .ace_support.ace_type {\ncolor: #C52727\n}\n.ace-jsoneditor .ace_string {\ncolor: green\n}\n.ace-jsoneditor .ace_comment {\ncolor: #BCC8BA\n}\n.ace-jsoneditor .ace_entity.ace_name.ace_tag,\n.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\ncolor: #606060\n}\n.ace-jsoneditor .ace_markup.ace_underline {\ntext-decoration: underline\n}\n.ace-jsoneditor .ace_indent-guide {\nbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\n}',t("../lib/dom").importCssString(i.cssText,i.cssClass)}))},6589:function(t,i){var e=function(){var t,i={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(t,i,e,n,r,o){var s=o.length-1;switch(r){case 1:this.$=t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(t);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[s-1];case 13:this.$={};break;case 14:this.$=o[s-1];break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[];break;case 19:this.$=o[s-1];break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},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(t){throw new Error(t)},parse:function(t){var i=this,e=[0],n=[null],r=[],o=this.table,s="",a=0,h=0,c=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;function u(){var t=i.lexer.lex()||1;return"number"!=typeof t&&i.symbols_[t]||t}r.push(l),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,f,g,p,m,I,b,C,A={};;){if(void 0===(p=this.defaultActions[g=e[e.length-1]]||(null==d&&(d=u()),o[g]&&o[g][d]))||!p.length||!p[0]){if(!c){for(I in C=[],o[g])this.terminals_[I]&&2<I&&C.push("'"+this.terminals_[I]+"'");var v="";v=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(v,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:l,expected:C})}if(3==c){if(1==d)throw new Error(v||"Parsing halted.");h=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,l=this.lexer.yylloc,d=u()}for(;!(2..toString()in o[g]);){if(0==g)throw new Error(v||"Parsing halted.");e.length=e.length-2*1,n.length=n.length-1,r.length=r.length-1,g=e[e.length-1]}f=d,d=2,p=o[g=e[e.length-1]]&&o[g][2],c=3}if(p[0]instanceof Array&&1<p.length)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+d);switch(p[0]){case 1:e.push(d),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),e.push(p[1]),d=null,f?(d=f,f=null):(h=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,l=this.lexer.yylloc,0<c&&c--);break;case 2:if(A.$=n[n.length-(b=this.productions_[p[1]][1])],A._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},void 0!==(m=this.performAction.call(A,s,h,a,this.yy,p[1],n,r)))return m;b&&(e=e.slice(0,-1*b*2),n=n.slice(0,-1*b),r=r.slice(0,-1*b)),e.push(this.productions_[p[1]][0]),n.push(A.$),r.push(A._$),e.push(b=o[e[e.length-2]][e[e.length-1]]);break;case 3:return!0}}return!0}};return t={EOF:1,parseError:function(t,i){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,i)},setInput:function(t){return this._input=t,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 t=this._input[0];return this.yytext+=t,this.yyleng++,this.match+=t,this.matched+=t,t.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),t},unput:function(t){return this._input=t+this._input,this},more:function(){return this._more=!0,this},less:function(t){this._input=this.match.slice(t)+this._input},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},next:function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;o<r.length&&(!(i=this._input.match(this.rules[r[o]]))||t&&!(i[0].length>t[0].length)||(t=i,e=o,this.options.flex));o++);return t?((n=t[0].match(/\n.*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,r[e],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){this.begin(t)},options:{},performAction:function(t,i,e){switch(e){case 0:break;case 1:return 6;case 2:return i.yytext=i.yytext.substr(1,i.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}}},i.lexer=t,i}();i.parser=e,i.parse=e.parse.bind(e)},3879:function(t){function i(){}var e={defaultSelected:!0,width:"auto",disabled:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag..."};i.prototype={on:function(t,i){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(i)},off:function(t,i){this._events=this._events||{},t in this._events!=0&&this._events[t].splice(this._events[t].indexOf(i),1)},emit:function(t){if(this._events=this._events||{},t in this._events!=0)for(var i=0;i<this._events[t].length;i++)this._events[t][i].apply(this,Array.prototype.slice.call(arguments,1))}},i.mixin=function(t){for(var e=["on","off","emit"],n=0;n<e.length;n++)"function"==typeof t?t.prototype[e[n]]=i.prototype[e[n]]:t[e[n]]=i.prototype[e[n]];return t};var n={extend:function(t,i){for(var e in i=i||{},t)t.hasOwnProperty(e)&&(i.hasOwnProperty(e)||(i[e]=t[e]));return i},each:function(t,i,e){if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.call(e,n,t[n],t);else for(var r=0,o=t.length;r<o;r++)i.call(e,r,t[r],t)},createElement:function(t,i){var e,n,r=document,o=r.createElement(t);if(i&&"[object Object]"===Object.prototype.toString.call(i))for(e in i)e in o?o[e]=i[e]:"html"===e?o.textContent=i[e]:"text"===e?(n=r.createTextNode(i[e]),o.appendChild(n)):o.setAttribute(e,i[e]);return o},hasClass:function(t,i){if(t)return t.classList?t.classList.contains(i):!!t.className&&!!t.className.match(new RegExp("(\\s|^)"+i+"(\\s|$)"))},addClass:function(t,i){n.hasClass(t,i)||(t.classList?t.classList.add(i):t.className=t.className.trim()+" "+i)},removeClass:function(t,i){n.hasClass(t,i)&&(t.classList?t.classList.remove(i):t.className=t.className.replace(new RegExp("(^|\\s)"+i.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(t,i){return t&&t!==document.body&&(i(t)?t:n.closest(t.parentNode,i))},isInt:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},debounce:function(t,i,e){var n;return function(){var r=this,o=arguments,s=e&&!n;clearTimeout(n),n=setTimeout((function(){n=null,e||t.apply(r,o)}),i),s&&t.apply(r,o)}},rect:function(t,i){var e=window,n=t.getBoundingClientRect();return t=i?e.pageXOffset:0,{bottom:n.bottom+(e=i?e.pageYOffset:0),height:n.height,left:n.left+t,right:n.right+t,top:n.top+e,width:n.width}},includes:function(t,i){return-1<t.indexOf(i)},truncate:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}};function r(t,i){return t.hasOwnProperty(i)&&(!0===t[i]||t[i].length)}function o(t,i,e){t.parentNode?t.parentNode.parentNode||i.appendChild(t.parentNode):i.appendChild(t),n.removeClass(t,"excluded"),e||(t.textContent=t.textContent+"")}function s(){var t,i;this.items.length&&(t=document.createDocumentFragment(),this.config.pagination?(i=this.pages.slice(0,this.pageIndex),n.each(i,(function(i,e){n.each(e,(function(i,e){o(e,t,this.customOption)}),this)}),this)):n.each(this.items,(function(i,e){o(e,t,this.customOption)}),this),t.childElementCount&&(n.removeClass(this.items[this.navIndex],"active"),this.navIndex=t.querySelector(".selectr-option").idx,n.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(t))}function a(t,i){return i=i||t,i=this.customOption?this.config.renderOption(i):t.textContent,(i=n.createElement("li",{class:"selectr-option",html:i,role:"treeitem","aria-selected":!1})).idx=t.idx,this.items.push(i),t.defaultSelected&&this.defaultSelected.push(t.idx),t.disabled&&(i.disabled=!0,n.addClass(i,"disabled")),i}function h(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&n.removeClass(this.inputContainer,"active"),n.hasClass(this.container,"notice")&&(n.removeClass(this.container,"notice"),n.addClass(this.container,"open"),this.input.focus()),n.each(this.items,(function(t,i){n.removeClass(i,"excluded"),this.customOption||(i.textContent=i.textContent+"")}),this))}function c(t,i){if(i=i||{},!t)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if("string"==typeof(this.el=t)&&(this.el=document.querySelector(t)),null===this.el)throw new Error("The element you passed to Selectr can not be found.");if("select"!==this.el.nodeName.toLowerCase())throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(i)}var l=function(){var t,i=this.tree;i.scrollHeight-i.offsetHeight<=i.scrollTop&&this.pageIndex<this.pages.length&&(t=document.createDocumentFragment(),n.each(this.pages[this.pageIndex],(function(i,e){o(e,t,this.customOption)}),this),i.appendChild(t),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))};c.prototype.render=function(t){var o;this.rendered||(this.config=n.extend(e,t),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=r(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&"function"==typeof this.config.renderOption,this.customSelected=this.config.hasOwnProperty("renderSelection")&&"function"==typeof this.config.renderSelection,i.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,r(this.config,"width")&&(n.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":n.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=n.createElement("div",{class:"selectr-container"}),this.config.customClass&&n.addClass(this.container,this.config.customClass),n.addClass(this.container,this.mobileDevice?"selectr-mobile":"selectr-desktop"),this.el.tabIndex=-1,n.addClass(this.el,this.config.nativeDropdown||this.mobileDevice?"selectr-visible":"selectr-hidden"),this.selected=n.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:1,"aria-expanded":!1}),this.label=n.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var t,i=n.createElement("div",{class:"selectr-options-container"});this.tree=n.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=n.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple&&(n.addClass(this.label,"selectr-tags"),n.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.getSelectedProperties("value"),this.selectedIndexes=this.getSelectedProperties("idx")),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=n.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),n.addClass(this.container,"clearable")),this.config.taggable&&(t=n.createElement("li",{class:"input-tag"}),this.input=n.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),t.appendChild(this.input),this.label.appendChild(t),n.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators&&(this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators))),this.config.searchable&&(this.input=n.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),this.inputClear=n.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=n.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),i.appendChild(this.inputContainer)),i.appendChild(this.notice),i.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var e,o,s,h=!1,c=0;this.el.children.length&&n.each(this.el.children,(function(t,i){"OPTGROUP"===i.nodeName?(h=n.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+i.label+"</li>"}),n.each(i.children,(function(t,i){i.idx=c,h.appendChild(a.call(this,i,h)),c++}),this)):(i.idx=c,a.call(this,i),c++)}),this),this.config.data&&Array.isArray(this.config.data)&&(e=!(this.data=[]),h=!1,c=0,n.each(this.config.data,(function(t,i){r(i,"children")?(e=n.createElement("optgroup",{label:i.text}),h=n.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+i.text+"</li>"}),n.each(i.children,(function(t,i){(o=new Option(i.text,i.value,!1,i.hasOwnProperty("selected")&&!0===i.selected)).disabled=r(i,"disabled"),this.options.push(o),e.appendChild(o),o.idx=c,h.appendChild(a.call(this,o,i)),this.data[c]=i,c++}),this)):((o=new Option(i.text,i.value,!1,i.hasOwnProperty("selected")&&!0===i.selected)).disabled=r(i,"disabled"),this.options.push(o),o.idx=c,a.call(this,o,i),this.data[c]=i,c++)}),this)),this.setSelected(!0);for(var l=this.navIndex=0;l<this.items.length;l++)if(!n.hasClass(s=this.items[l],"disabled")){n.addClass(s,"active"),this.navIndex=l;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(i),this.placeEl=n.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=n.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),o=this,setTimeout((function(){o.emit("selectr.init")}),20))},c.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},c.prototype.getSelectedProperties=function(t){var i=this.getSelected();return[].slice.call(i).map((function(i){return i[t]})).filter((function(t){return null!=t}))},c.prototype.bindEvents=function(){var t=this;this.events={},this.events.dismiss=function(t){this.container.contains(t=t.target)||!this.opened&&!n.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(t){if(t=t||window.event,this.items.length&&this.opened&&n.includes([13,38,40],t.which)){if(t.preventDefault(),13===t.which)return!(this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var i,e=this.items[this.navIndex];switch(t.which){case 38:(i=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(i=1)&&this.navIndex++}for(this.navigating=!0;n.hasClass(this.items[this.navIndex],"disabled")||n.hasClass(this.items[this.navIndex],"excluded");)if(i?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}}t=n.rect(this.items[this.navIndex]),i?(0===this.navIndex?this.tree.scrollTop=0:t.top+t.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(t.top+t.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&l.call(this)):0===this.navIndex?this.tree.scrollTop=0:t.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(t.top-this.optsRect.top)),e&&n.removeClass(e,"active"),n.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(i){i.changedTouches[0].target===t.el&&t.toggle()})),(this.config.nativeDropdown||this.mobileDevice)&&this.container.addEventListener("click",(function(i){i.preventDefault(),i.stopPropagation(),i.target===t.el&&t.toggle()})),this.el.addEventListener("change",(function(){var i;t.el.multiple?(i=t.getSelectedProperties("idx"),i=function(t,i){for(var e,n=[],r=t.slice(0),o=0;o<i.length;o++)-1<(e=r.indexOf(i[o]))?r.splice(e,1):n.push(i[o]);return[n,r]}(t.selectedIndexes,i),n.each(i[0],(function(i,e){t.select(e)}),t),n.each(i[1],(function(i,e){t.deselect(e)}),t)):-1<t.el.selectedIndex&&t.select(t.el.selectedIndex)}))),this.config.nativeDropdown&&this.container.addEventListener("keydown",(function(i){"Enter"===i.key&&t.selected===document.activeElement&&(t.toggle(),setTimeout((function(){t.el.focus()}),200))})),this.selected.addEventListener("click",(function(i){t.disabled||t.toggle(),i.preventDefault(),i.stopPropagation()})),this.label.addEventListener("click",(function(i){n.hasClass(i.target,"selectr-tag-remove")&&t.deselect(i.target.parentNode.idx)})),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",(function(t){t.preventDefault()})),this.tree.addEventListener("click",(function(i){i.preventDefault(),i.stopPropagation(),(i=n.closest(i.target,(function(t){return t&&n.hasClass(t,"selectr-option")})))&&(n.hasClass(i,"disabled")||(n.hasClass(i,"selected")?(t.el.multiple||!t.el.multiple&&t.config.allowDeselect)&&t.deselect(i.idx):t.select(i.idx),t.opened&&!t.el.multiple&&t.close()))})),this.tree.addEventListener("mouseover",(function(i){n.hasClass(i.target,"selectr-option")&&(n.hasClass(i.target,"disabled")||(n.removeClass(t.items[t.navIndex],"active"),n.addClass(i.target,"active"),t.navIndex=[].slice.call(t.items).indexOf(i.target)))})),this.config.searchable&&(this.input.addEventListener("focus",(function(){t.searching=!0})),this.input.addEventListener("blur",(function(){t.searching=!1})),this.input.addEventListener("keyup",(function(){t.search(),t.config.taggable||(this.value.length?n.addClass(this.parentNode,"active"):n.removeClass(this.parentNode,"active"))})),this.inputClear.addEventListener("click",(function(){t.input.value=null,h.call(t),t.tree.childElementCount||s.call(t)}))),this.config.taggable&&this.input.addEventListener("keyup",(function(i){var e;t.search(),t.config.taggable&&this.value.length&&(e=this.value.trim(),13!==i.which&&!n.includes(t.tagSeperators,i.key)||(n.each(t.tagSeperators,(function(t,i){e=e.replace(i,"")})),t.add({value:e,text:e,selected:!0},!0)?(t.close(),h.call(t)):(this.value="",t.setMessage("That tag is already in use."))))})),this.update=n.debounce((function(){t.opened&&t.config.closeOnScroll&&t.close(),t.width&&(t.container.style.width=t.width),t.invert()}),50),this.requiresPagination&&(this.paginateItems=n.debounce((function(){l.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.el.form&&this.el.form.addEventListener("reset",this.events.reset)},c.prototype.setSelected=function(){var t;this.config.data||this.el.multiple||!this.el.options.length||(0===this.el.selectedIndex&&(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&&"select-one"===this.originalType&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),n.each(this.options,(function(t,i){i.selected&&i.defaultSelected&&this.select(i.idx)}),this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data&&(!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&this.select(0),t=0,n.each(this.config.data,(function(i,e){r(e,"children")?n.each(e.children,(function(i,e){e.hasOwnProperty("selected")&&!0===e.selected&&this.select(t),t++}),this):(e.hasOwnProperty("selected")&&!0===e.selected&&this.select(t),t++)}),this))},c.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),"select-one"===this.originalType&&(this.el.multiple=!1),this.config.data&&(this.el.textContent=""),n.removeClass(this.el,"selectr-hidden"),this.el.form&&n.off(this.el.form,"reset",this.events.reset),n.off(document,"click",this.events.dismiss),n.off(document,"keydown",this.events.navigate),n.off(window,"resize",this.update),n.off(window,"scroll",this.update),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1)},c.prototype.change=function(t){var i=this.options[t];i.disabled||(i.selected&&n.hasClass(this.items[t],"selected")?this.deselect(t):this.select(t),this.opened&&!this.el.multiple&&this.close())},c.prototype.select=function(t){var i=this.items[t],e=[].slice.call(this.el.options),r=this.options[t];if(this.el.multiple){if(n.includes(this.selectedIndexes,t))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage("A maximum of "+this.config.maxSelections+" items can be selected.",!0),!1;this.selectedValues.push(r.value),this.selectedIndexes.push(t),function(t){var i,e=this,r=document.createDocumentFragment(),o=this.options[t.idx],s=this.data?this.data[t.idx]:o,a=this.customSelected?this.config.renderSelection(s):o.textContent;s=n.createElement("li",{class:"selectr-tag",html:a}),a=n.createElement("button",{class:"selectr-tag-remove",type:"button"}),s.appendChild(a),s.idx=t.idx,s.tag=o.value,this.tags.push(s),this.config.sortSelected?(o=this.tags.slice(),i=function(t,i){t.replace(/(\d+)|(\D+)/g,(function(t,e,n){i.push([e||1/0,n||""])}))},o.sort((function(t,n){var r,o,s=[],a=[];for(!0===e.config.sortSelected?(r=t.tag,o=n.tag):"text"===e.config.sortSelected&&(r=t.textContent,o=n.textContent),i(r,s),i(o,a);s.length&&a.length;){var h=s.shift(),c=a.shift();if(c=h[0]-c[0]||h[1].localeCompare(c[1]))return c}return s.length-a.length})),n.each(o,(function(t,i){r.appendChild(i)})),this.label.textContent=""):r.appendChild(s),this.config.taggable?this.label.insertBefore(r,this.input.parentNode):this.label.appendChild(r)}.call(this,i)}else this.label.textContent=this.customSelected?this.config.renderSelection(this.data?this.data[t]:r):r.textContent,this.selectedValue=r.value,this.selectedIndex=t,n.each(this.options,(function(i,e){var r=this.items[i];i!==t&&(r&&n.removeClass(r,"selected"),e.selected=!1,e.removeAttribute("selected"))}),this);n.includes(e,r)||this.el.add(r),i.setAttribute("aria-selected",!0),n.addClass(i,"selected"),n.addClass(this.container,"has-selected"),r.selected=!0,r.setAttribute("selected",""),this.emit("selectr.change",r),this.emit("selectr.select",r)},c.prototype.deselect=function(t,i){var e=this.items[t],r=this.options[t];if(this.el.multiple){var o=this.selectedIndexes.indexOf(t);this.selectedIndexes.splice(o,1),o=this.selectedValues.indexOf(r.value),this.selectedValues.splice(o,1),function(t){var i=!1;n.each(this.tags,(function(e,n){n.idx===t.idx&&(i=n)}),this),i&&(this.label.removeChild(i),this.tags.splice(this.tags.indexOf(i),1))}.call(this,e),this.tags.length||n.removeClass(this.container,"has-selected")}else{if(!i&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.textContent="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,n.removeClass(this.container,"has-selected")}this.items[t].setAttribute("aria-selected",!1),n.removeClass(this.items[t],"selected"),r.selected=!1,r.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",r)},c.prototype.setValue=function(t){var i=Array.isArray(t);if(i||(t=t.toString().trim()),!this.el.multiple&&i)return!1;n.each(this.options,(function(e,r){(i&&n.includes(t.toString(),r.value)||r.value===t)&&this.change(r.idx)}),this)},c.prototype.getValue=function(t,i){var e,r;return this.el.multiple?t?this.selectedIndexes.length&&(r={values:[]},n.each(this.selectedIndexes,(function(t,i){r.values[t]={value:(i=this.options[i]).value,text:i.textContent}}),this)):r=this.selectedValues.slice():r=t?{value:(e=this.options[this.selectedIndex]).value,text:e.textContent}:this.selectedValue,r=t&&i?JSON.stringify(r):r},c.prototype.add=function(t,i){if(t){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(t))n.each(t,(function(t,e){this.add(e,i)}),this);else if("[object Object]"===Object.prototype.toString.call(t)){if(i){var e=!1;if(n.each(this.options,(function(i,n){n.value.toLowerCase()===t.value.toLowerCase()&&(e=!0)})),e)return!1}var r=n.createElement("option",t);return this.data.push(t),this.options.push(r),r.idx=0<this.options.length?this.options.length-1:0,a.call(this,r),t.selected&&this.select(r.idx),r}return this.setPlaceholder(),this.config.pagination&&this.paginate(),!0}},c.prototype.remove=function(t){var i,e=[];Array.isArray(t)?n.each(t,(function(i,r){n.isInt(r)?e.push(this.getOptionByIndex(r)):"string"==typeof t&&e.push(this.getOptionByValue(r))}),this):n.isInt(t)?e.push(this.getOptionByIndex(t)):"string"==typeof t&&e.push(this.getOptionByValue(t)),e.length&&(n.each(e,(function(t,e){i=e.idx,this.el.remove(e),this.options.splice(i,1),(e=this.items[i].parentNode)&&e.removeChild(this.items[i]),this.items.splice(i,1),n.each(this.options,(function(t,i){i.idx=t,this.items[t].idx=t}),this)}),this),this.setPlaceholder(),this.config.pagination&&this.paginate())},c.prototype.removeAll=function(){this.clear(!0),n.each(this.el.options,(function(t,i){this.el.remove(i)}),this),n.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},c.prototype.search=function(t){var i,e;this.navigating||(t=t||this.input.value,i=document.createDocumentFragment(),this.removeMessage(),n.truncate(this.tree),1<t.length?(n.each(this.options,(function(e,r){var s,a=this.items[r.idx];n.includes(r.textContent.toLowerCase(),t.toLowerCase())&&!r.disabled?(o(a,i,this.customOption),n.removeClass(a,"excluded"),this.customOption||(a.textContent="",(s=function(t,i){var e=new RegExp(t,"i").exec(i);return e?(t=e.index,e=e.index+e[0].length,{before:i.substring(0,t),match:i.substring(t,e),after:i.substring(e)}):null}(t,r.textContent))&&(a.appendChild(document.createTextNode(s.before)),(r=document.createElement("span")).className="selectr-match",r.appendChild(document.createTextNode(s.match)),a.appendChild(r),a.appendChild(document.createTextNode(s.after))))):n.addClass(a,"excluded")}),this),i.childElementCount?(e=i.firstElementChild,n.removeClass(this.items[this.navIndex],"active"),this.navIndex=e.idx,n.addClass(e,"active")):this.config.taggable||this.setMessage("no results.")):s.call(this),this.tree.appendChild(i))},c.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},c.prototype.open=function(){var t=this;return!!this.options.length&&(this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(n.addClass(this.container,"native-open"),void(this.config.data&&n.each(this.options,(function(t,i){this.el.add(i)}),this))):(n.addClass(this.container,"open"),s.call(this),this.invert(),this.tree.scrollTop=0,n.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),void(this.config.searchable&&!this.config.taggable&&setTimeout((function(){t.input.focus(),t.input.tabIndex=0}),10))))},c.prototype.close=function(){var t;this.opened&&this.emit("selectr.close"),this.opened=!1,this.mobileDevice||this.config.nativeDropdown?n.removeClass(this.container,"native-open"):(t=n.hasClass(this.container,"notice"),this.config.searchable&&!t&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),t&&(n.removeClass(this.container,"notice"),this.notice.textContent=""),n.removeClass(this.container,"open"),n.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),n.truncate(this.tree),h.call(this))},c.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&n.each(this.tags,(function(t,i){i.lastElementChild.tabIndex=0})),n.removeClass(this.container,"selectr-disabled")},c.prototype.disable=function(t){t||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&n.each(this.tags,(function(t,i){i.lastElementChild.tabIndex=-1})),this.disabled=!0,n.addClass(this.container,"selectr-disabled")},c.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),n.each(this.defaultSelected,(function(t,i){this.select(i)}),this),this.emit("selectr.reset"))},c.prototype.clear=function(t){var i;this.el.multiple?this.selectedIndexes.length&&(i=this.selectedIndexes.slice(),n.each(i,(function(t,i){this.deselect(i)}),this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,t),this.emit("selectr.clear")},c.prototype.serialise=function(t){var i=[];return n.each(this.options,(function(t,e){var n={value:e.value,text:e.textContent};e.selected&&(n.selected=!0),e.disabled&&(n.disabled=!0),i[t]=n})),t?JSON.stringify(i):i},c.prototype.serialize=function(t){return this.serialise(t)},c.prototype.setPlaceholder=function(t){t=t||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(t="No options available"),this.placeEl.textContent=t},c.prototype.paginate=function(){if(this.items.length){var t=this;return this.pages=this.items.map((function(i,e){return e%t.config.pagination==0?t.items.slice(e,e+t.config.pagination):null})).filter((function(t){return t})),this.pages}},c.prototype.setMessage=function(t,i){i&&this.close(),n.addClass(this.container,"notice"),this.notice.textContent=t},c.prototype.removeMessage=function(){n.removeClass(this.container,"notice"),this.notice.textContent=""},c.prototype.invert=function(){var t=n.rect(this.selected),i=window.innerHeight;t.top+t.height+this.tree.parentNode.offsetHeight>i?(n.addClass(this.container,"inverted"),this.isInverted=!0):(n.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=n.rect(this.tree)},c.prototype.getOptionByIndex=function(t){return this.options[t]},c.prototype.getOptionByValue=function(t){for(var i=!1,e=0,n=this.options.length;e<n;e++)if(this.options[e].value.trim()===t.toString().trim()){i=this.options[e];break}return i},t.exports=c},4188:function(t,i,e){e.d(i,{qD:function(){return n},EX:function(){return r},WF:function(){return o},oW:function(){return s}});var n=document.body,r=10485760,o=2e4,s=2147483648},2602:function(t,i,e){e.d(i,{w:function(){return r}});var n=e(9791);function r(t,i,e){var r,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],s="function"==typeof(c=t).getRootNode?c.getRootNode():window,a={},h=t.getBoundingClientRect(),c=i.getBoundingClientRect(),l=document.createElement("div");function u(){if(l&&l.parentNode){for(var i in l.parentNode.removeChild(l),a)r=i,Object.prototype.hasOwnProperty.call(a,r)&&((r=a[i])&&(0,n.removeEventListener)(s,i,r),delete a[i]);"function"==typeof e&&e(t)}var r}function d(t){(t=t.target)===l||(0,n.isChildOf)(t,l)||u()}return l.className="jsoneditor-anchor",l.style.position="absolute",l.style.left=h.left-c.left+"px",l.style.top=h.top-c.top+"px",l.style.width=h.width-2+"px",l.style.height=h.height-2+"px",l.style.boxSizing="border-box",i.appendChild(l),a.mousedown=(0,n.addEventListener)(s,"mousedown",d),a.mousewheel=(0,n.addEventListener)(s,"mousewheel",d),o&&(r=null,l.onmouseover=function(){clearTimeout(r),r=null},l.onmouseout=function(){r=r||setTimeout(u,200)}),l.destroy=u,l}},7923:function(t){t.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb3cgPSB3aW5kb3c7CndpbmRvdy5hY2UgPSB3aW5kb3c7Cgp3aW5kb3cub25lcnJvciA9IGZ1bmN0aW9uKG1lc3NhZ2UsIGZpbGUsIGxpbmUsIGNvbCwgZXJyKSB7CiAgICBwb3N0TWVzc2FnZSh7dHlwZTogImVycm9yIiwgZGF0YTogewogICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsCiAgICAgICAgZGF0YTogZXJyLmRhdGEsCiAgICAgICAgZmlsZTogZmlsZSwKICAgICAgICBsaW5lOiBsaW5lLCAKICAgICAgICBjb2w6IGNvbCwKICAgICAgICBzdGFjazogZXJyLnN0YWNrCiAgICB9fSk7Cn07Cgp3aW5kb3cubm9ybWFsaXplTW9kdWxlID0gZnVuY3Rpb24ocGFyZW50SWQsIG1vZHVsZU5hbWUpIHsKICAgIC8vIG5vcm1hbGl6ZSBwbHVnaW4gcmVxdWlyZXMKICAgIGlmIChtb2R1bGVOYW1lLmluZGV4T2YoIiEiKSAhPT0gLTEpIHsKICAgICAgICB2YXIgY2h1bmtzID0gbW9kdWxlTmFtZS5zcGxpdCgiISIpOwogICAgICAgIHJldHVybiB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBjaHVua3NbMF0pICsgIiEiICsgd2luZG93Lm5vcm1hbGl6ZU1vZHVsZShwYXJlbnRJZCwgY2h1bmtzWzFdKTsKICAgIH0KICAgIC8vIG5vcm1hbGl6ZSByZWxhdGl2ZSByZXF1aXJlcwogICAgaWYgKG1vZHVsZU5hbWUuY2hhckF0KDApID09ICIuIikgewogICAgICAgIHZhciBiYXNlID0gcGFyZW50SWQuc3BsaXQoIi8iKS5zbGljZSgwLCAtMSkuam9pbigiLyIpOwogICAgICAgIG1vZHVsZU5hbWUgPSAoYmFzZSA/IGJhc2UgKyAiLyIgOiAiIikgKyBtb2R1bGVOYW1lOwogICAgICAgIAogICAgICAgIHdoaWxlIChtb2R1bGVOYW1lLmluZGV4T2YoIi4iKSAhPT0gLTEgJiYgcHJldmlvdXMgIT0gbW9kdWxlTmFtZSkgewogICAgICAgICAgICB2YXIgcHJldmlvdXMgPSBtb2R1bGVOYW1lOwogICAgICAgICAgICBtb2R1bGVOYW1lID0gbW9kdWxlTmFtZS5yZXBsYWNlKC9eXC5cLy8sICIiKS5yZXBsYWNlKC9cL1wuXC8vLCAiLyIpLnJlcGxhY2UoL1teXC9dK1wvXC5cLlwvLywgIiIpOwogICAgICAgIH0KICAgIH0KICAgIAogICAgcmV0dXJuIG1vZHVsZU5hbWU7Cn07Cgp3aW5kb3cucmVxdWlyZSA9IGZ1bmN0aW9uIHJlcXVpcmUocGFyZW50SWQsIGlkKSB7CiAgICBpZiAoIWlkKSB7CiAgICAgICAgaWQgPSBwYXJlbnRJZDsKICAgICAgICBwYXJlbnRJZCA9IG51bGw7CiAgICB9CiAgICBpZiAoIWlkLmNoYXJBdCkKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIndvcmtlci5qcyByZXF1aXJlKCkgYWNjZXB0cyBvbmx5IChwYXJlbnRJZCwgaWQpIGFzIGFyZ3VtZW50cyIpOwoKICAgIGlkID0gd2luZG93Lm5vcm1hbGl6ZU1vZHVsZShwYXJlbnRJZCwgaWQpOwoKICAgIHZhciBtb2R1bGUgPSB3aW5kb3cucmVxdWlyZS5tb2R1bGVzW2lkXTsKICAgIGlmIChtb2R1bGUpIHsKICAgICAgICBpZiAoIW1vZHVsZS5pbml0aWFsaXplZCkgewogICAgICAgICAgICBtb2R1bGUuaW5pdGlhbGl6ZWQgPSB0cnVlOwogICAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IG1vZHVsZS5mYWN0b3J5KCkuZXhwb3J0czsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG1vZHVsZS5leHBvcnRzOwogICAgfQogICAKICAgIGlmICghd2luZG93LnJlcXVpcmUudGxucykKICAgICAgICByZXR1cm4gY29uc29sZS5sb2coInVuYWJsZSB0byBsb2FkICIgKyBpZCk7CiAgICAKICAgIHZhciBwYXRoID0gcmVzb2x2ZU1vZHVsZUlkKGlkLCB3aW5kb3cucmVxdWlyZS50bG5zKTsKICAgIGlmIChwYXRoLnNsaWNlKC0zKSAhPSAiLmpzIikgcGF0aCArPSAiLmpzIjsKICAgIAogICAgd2luZG93LnJlcXVpcmUuaWQgPSBpZDsKICAgIHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdID0ge307IC8vIHByZXZlbnQgaW5maW5pdGUgbG9vcCBvbiBicm9rZW4gbW9kdWxlcwogICAgaW1wb3J0U2NyaXB0cyhwYXRoKTsKICAgIHJldHVybiB3aW5kb3cucmVxdWlyZShwYXJlbnRJZCwgaWQpOwp9OwpmdW5jdGlvbiByZXNvbHZlTW9kdWxlSWQoaWQsIHBhdGhzKSB7CiAgICB2YXIgdGVzdFBhdGggPSBpZCwgdGFpbCA9ICIiOwogICAgd2hpbGUgKHRlc3RQYXRoKSB7CiAgICAgICAgdmFyIGFsaWFzID0gcGF0aHNbdGVzdFBhdGhdOwogICAgICAgIGlmICh0eXBlb2YgYWxpYXMgPT0gInN0cmluZyIpIHsKICAgICAgICAgICAgcmV0dXJuIGFsaWFzICsgdGFpbDsKICAgICAgICB9IGVsc2UgaWYgKGFsaWFzKSB7CiAgICAgICAgICAgIHJldHVybiAgYWxpYXMubG9jYXRpb24ucmVwbGFjZSgvXC8qJC8sICIvIikgKyAodGFpbCB8fCBhbGlhcy5tYWluIHx8IGFsaWFzLm5hbWUpOwogICAgICAgIH0gZWxzZSBpZiAoYWxpYXMgPT09IGZhbHNlKSB7CiAgICAgICAgICAgIHJldHVybiAiIjsKICAgICAgICB9CiAgICAgICAgdmFyIGkgPSB0ZXN0UGF0aC5sYXN0SW5kZXhPZigiLyIpOwogICAgICAgIGlmIChpID09PSAtMSkgYnJlYWs7CiAgICAgICAgdGFpbCA9IHRlc3RQYXRoLnN1YnN0cihpKSArIHRhaWw7CiAgICAgICAgdGVzdFBhdGggPSB0ZXN0UGF0aC5zbGljZSgwLCBpKTsKICAgIH0KICAgIHJldHVybiBpZDsKfQp3aW5kb3cucmVxdWlyZS5tb2R1bGVzID0ge307CndpbmRvdy5yZXF1aXJlLnRsbnMgPSB7fTsKCndpbmRvdy5kZWZpbmUgPSBmdW5jdGlvbihpZCwgZGVwcywgZmFjdG9yeSkgewogICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT0gMikgewogICAgICAgIGZhY3RvcnkgPSBkZXBzOwogICAgICAgIGlmICh0eXBlb2YgaWQgIT0gInN0cmluZyIpIHsKICAgICAgICAgICAgZGVwcyA9IGlkOwogICAgICAgICAgICBpZCA9IHdpbmRvdy5yZXF1aXJlLmlkOwogICAgICAgIH0KICAgIH0gZWxzZSBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7CiAgICAgICAgZmFjdG9yeSA9IGlkOwogICAgICAgIGRlcHMgPSBbXTsKICAgICAgICBpZCA9IHdpbmRvdy5yZXF1aXJlLmlkOwogICAgfQogICAgCiAgICBpZiAodHlwZW9mIGZhY3RvcnkgIT0gImZ1bmN0aW9uIikgewogICAgICAgIHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdID0gewogICAgICAgICAgICBleHBvcnRzOiBmYWN0b3J5LAogICAgICAgICAgICBpbml0aWFsaXplZDogdHJ1ZQogICAgICAgIH07CiAgICAgICAgcmV0dXJuOwogICAgfQoKICAgIGlmICghZGVwcy5sZW5ndGgpCiAgICAgICAgLy8gSWYgdGhlcmUgaXMgbm8gZGVwZW5kZW5jaWVzLCB3ZSBpbmplY3QgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kCiAgICAgICAgLy8gIm1vZHVsZSIgYXMgZGVwZW5kZW5jaWVzLCB0byBwcm92aWRlIENvbW1vbkpTIGNvbXBhdGliaWxpdHkuCiAgICAgICAgZGVwcyA9IFsicmVxdWlyZSIsICJleHBvcnRzIiwgIm1vZHVsZSJdOwoKICAgIHZhciByZXEgPSBmdW5jdGlvbihjaGlsZElkKSB7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKGlkLCBjaGlsZElkKTsKICAgIH07CgogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgZXhwb3J0czoge30sCiAgICAgICAgZmFjdG9yeTogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHZhciBtb2R1bGUgPSB0aGlzOwogICAgICAgICAgICB2YXIgcmV0dXJuRXhwb3J0cyA9IGZhY3RvcnkuYXBwbHkodGhpcywgZGVwcy5zbGljZSgwLCBmYWN0b3J5Lmxlbmd0aCkubWFwKGZ1bmN0aW9uKGRlcCkgewogICAgICAgICAgICAgICAgc3dpdGNoIChkZXApIHsKICAgICAgICAgICAgICAgICAgICAvLyBCZWNhdXNlICJyZXF1aXJlIiwgImV4cG9ydHMiIGFuZCAibW9kdWxlIiBhcmVuJ3QgYWN0dWFsCiAgICAgICAgICAgICAgICAgICAgLy8gZGVwZW5kZW5jaWVzLCB3ZSBtdXN0IGhhbmRsZSB0aGVtIHNlcGVyYXRlbHkuCiAgICAgICAgICAgICAgICAgICAgY2FzZSAicmVxdWlyZSI6IHJldHVybiByZXE7CiAgICAgICAgICAgICAgICAgICAgY2FzZSAiZXhwb3J0cyI6IHJldHVybiBtb2R1bGUuZXhwb3J0czsKICAgICAgICAgICAgICAgICAgICBjYXNlICJtb2R1bGUiOiAgcmV0dXJuIG1vZHVsZTsKICAgICAgICAgICAgICAgICAgICAvLyBCdXQgZm9yIGFsbCBvdGhlciBkZXBlbmRlbmNpZXMsIHdlIGNhbiBqdXN0IGdvIGFoZWFkIGFuZAogICAgICAgICAgICAgICAgICAgIC8vIHJlcXVpcmUgdGhlbS4KICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiAgICAgICAgcmV0dXJuIHJlcShkZXApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIGlmIChyZXR1cm5FeHBvcnRzKQogICAgICAgICAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSByZXR1cm5FeHBvcnRzOwogICAgICAgICAgICByZXR1cm4gbW9kdWxlOwogICAgICAgIH0KICAgIH07Cn07CndpbmRvdy5kZWZpbmUuYW1kID0ge307CnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHJlcXVpcmUudGxuc1tpXSA9IHRvcExldmVsTmFtZXNwYWNlc1tpXTsKfTsKCndpbmRvdy5pbml0U2VuZGVyID0gZnVuY3Rpb24gaW5pdFNlbmRlcigpIHsKCiAgICB2YXIgRXZlbnRFbWl0dGVyID0gd2luZG93LnJlcXVpcmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKICAgIHZhciBvb3AgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9vb3AiKTsKICAgIAogICAgdmFyIFNlbmRlciA9IGZ1bmN0aW9uKCkge307CiAgICAKICAgIChmdW5jdGlvbigpIHsKICAgICAgICAKICAgICAgICBvb3AuaW1wbGVtZW50KHRoaXMsIEV2ZW50RW1pdHRlcik7CiAgICAgICAgICAgICAgICAKICAgICAgICB0aGlzLmNhbGxiYWNrID0gZnVuY3Rpb24oZGF0YSwgY2FsbGJhY2tJZCkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiY2FsbCIsCiAgICAgICAgICAgICAgICBpZDogY2FsbGJhY2tJZCwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgIAogICAgICAgIHRoaXMuZW1pdCA9IGZ1bmN0aW9uKG5hbWUsIGRhdGEpIHsKICAgICAgICAgICAgcG9zdE1lc3NhZ2UoewogICAgICAgICAgICAgICAgdHlwZTogImV2ZW50IiwKICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsCiAgICAgICAgICAgICAgICBkYXRhOiBkYXRhCiAgICAgICAgICAgIH0pOwogICAgICAgIH07CiAgICAgICAgCiAgICB9KS5jYWxsKFNlbmRlci5wcm90b3R5cGUpOwogICAgCiAgICByZXR1cm4gbmV3IFNlbmRlcigpOwp9OwoKdmFyIG1haW4gPSB3aW5kb3cubWFpbiA9IG51bGw7CnZhciBzZW5kZXIgPSB3aW5kb3cuc2VuZGVyID0gbnVsbDsKCndpbmRvdy5vbm1lc3NhZ2UgPSBmdW5jdGlvbihlKSB7CiAgICB2YXIgbXNnID0gZS5kYXRhOwogICAgaWYgKG1zZy5ldmVudCAmJiBzZW5kZXIpIHsKICAgICAgICBzZW5kZXIuX3NpZ25hbChtc2cuZXZlbnQsIG1zZy5kYXRhKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5jb21tYW5kKSB7CiAgICAgICAgaWYgKG1haW5bbXNnLmNvbW1hbmRdKQogICAgICAgICAgICBtYWluW21zZy5jb21tYW5kXS5hcHBseShtYWluLCBtc2cuYXJncyk7CiAgICAgICAgZWxzZSBpZiAod2luZG93W21zZy5jb21tYW5kXSkKICAgICAgICAgICAgd2luZG93W21zZy5jb21tYW5kXS5hcHBseSh3aW5kb3csIG1zZy5hcmdzKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiVW5rbm93biBjb21tYW5kOiIgKyBtc2cuY29tbWFuZCk7CiAgICB9CiAgICBlbHNlIGlmIChtc2cuaW5pdCkgewogICAgICAgIHdpbmRvdy5pbml0QmFzZVVybHMobXNnLnRsbnMpOwogICAgICAgIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSB3aW5kb3cuaW5pdFNlbmRlcigpOwogICAgICAgIHZhciBjbGF6eiA9IHJlcXVpcmUobXNnLm1vZHVsZSlbbXNnLmNsYXNzbmFtZV07CiAgICAgICAgbWFpbiA9IHdpbmRvdy5tYWluID0gbmV3IGNsYXp6KHNlbmRlcik7CiAgICB9Cn07Cn0pKHRoaXMpOwoKYWNlLmRlZmluZSgiYWNlL2xpYi9vb3AiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKZXhwb3J0cy5pbmhlcml0cyA9IGZ1bmN0aW9uKGN0b3IsIHN1cGVyQ3RvcikgewogICAgY3Rvci5zdXBlcl8gPSBzdXBlckN0b3I7CiAgICBjdG9yLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoc3VwZXJDdG9yLnByb3RvdHlwZSwgewogICAgICAgIGNvbnN0cnVjdG9yOiB7CiAgICAgICAgICAgIHZhbHVlOiBjdG9yLAogICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSwKICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsCiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZQogICAgICAgIH0KICAgIH0pOwp9OwoKZXhwb3J0cy5taXhpbiA9IGZ1bmN0aW9uKG9iaiwgbWl4aW4pIHsKICAgIGZvciAodmFyIGtleSBpbiBtaXhpbikgewogICAgICAgIG9ialtrZXldID0gbWl4aW5ba2V5XTsKICAgIH0KICAgIHJldHVybiBvYmo7Cn07CgpleHBvcnRzLmltcGxlbWVudCA9IGZ1bmN0aW9uKHByb3RvLCBtaXhpbikgewogICAgZXhwb3J0cy5taXhpbihwcm90bywgbWl4aW4pOwp9OwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvcmFuZ2UiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwp2YXIgY29tcGFyZVBvaW50cyA9IGZ1bmN0aW9uKHAxLCBwMikgewogICAgcmV0dXJuIHAxLnJvdyAtIHAyLnJvdyB8fCBwMS5jb2x1bW4gLSBwMi5jb2x1bW47Cn07CnZhciBSYW5nZSA9IGZ1bmN0aW9uKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pIHsKICAgIHRoaXMuc3RhcnQgPSB7CiAgICAgICAgcm93OiBzdGFydFJvdywKICAgICAgICBjb2x1bW46IHN0YXJ0Q29sdW1uCiAgICB9OwoKICAgIHRoaXMuZW5kID0gewogICAgICAgIHJvdzogZW5kUm93LAogICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICB9Owp9OwoKKGZ1bmN0aW9uKCkgewogICAgdGhpcy5pc0VxdWFsID0gZnVuY3Rpb24ocmFuZ2UpIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT09IHJhbmdlLnN0YXJ0LnJvdyAmJgogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPT09IHJhbmdlLmVuZC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPT09IHJhbmdlLnN0YXJ0LmNvbHVtbiAmJgogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPT09IHJhbmdlLmVuZC5jb2x1bW47CiAgICB9OwogICAgdGhpcy50b1N0cmluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAoIlJhbmdlOiBbIiArIHRoaXMuc3RhcnQucm93ICsgIi8iICsgdGhpcy5zdGFydC5jb2x1bW4gKwogICAgICAgICAgICAiXSAtPiBbIiArIHRoaXMuZW5kLnJvdyArICIvIiArIHRoaXMuZW5kLmNvbHVtbiArICJdIik7CiAgICB9OwoKICAgIHRoaXMuY29udGFpbnMgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7CiAgICB9OwogICAgdGhpcy5jb21wYXJlUmFuZ2UgPSBmdW5jdGlvbihyYW5nZSkgewogICAgICAgIHZhciBjbXAsCiAgICAgICAgICAgIGVuZCA9IHJhbmdlLmVuZCwKICAgICAgICAgICAgc3RhcnQgPSByYW5nZS5zdGFydDsKCiAgICAgICAgY21wID0gdGhpcy5jb21wYXJlKGVuZC5yb3csIGVuZC5jb2x1bW4pOwogICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoc3RhcnQucm93LCBzdGFydC5jb2x1bW4pOwogICAgICAgICAgICBpZiAoY21wID09IDEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAyOwogICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAwKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgcmV0dXJuIC0yOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfSBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlUG9pbnQgPSBmdW5jdGlvbihwKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pOwogICAgfTsKICAgIHRoaXMuY29udGFpbnNSYW5nZSA9IGZ1bmN0aW9uKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDsKICAgIH07CiAgICB0aGlzLmludGVyc2VjdHMgPSBmdW5jdGlvbihyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIHRoaXMuaXNFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW47CiAgICB9OwogICAgdGhpcy5pc1N0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbjsKICAgIH07CiAgICB0aGlzLnNldFN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICB0aGlzLnN0YXJ0LnJvdyA9IHJvdzsKICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuc2V0RW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSByb3cuY29sdW1uOwogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3cucm93OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdzsKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID0gY29sdW1uOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLmluc2lkZSA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkgewogICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikgfHwgdGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHRoaXMuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9OwogICAgdGhpcy5pbnNpZGVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH07CiAgICB0aGlzLmNvbXBhcmUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICghdGhpcy5pc011bHRpTGluZSgpKSB7CiAgICAgICAgICAgIGlmIChyb3cgPT09IHRoaXMuc3RhcnQucm93KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29sdW1uIDwgdGhpcy5zdGFydC5jb2x1bW4gPyAtMSA6IChjb2x1bW4gPiB0aGlzLmVuZC5jb2x1bW4gPyAxIDogMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdykKICAgICAgICAgICAgcmV0dXJuIC0xOwoKICAgICAgICBpZiAocm93ID4gdGhpcy5lbmQucm93KQogICAgICAgICAgICByZXR1cm4gMTsKCiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09PSByb3cpCiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPj0gdGhpcy5zdGFydC5jb2x1bW4gPyAwIDogLTE7CgogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdykKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTsKCiAgICAgICAgcmV0dXJuIDA7CiAgICB9OwogICAgdGhpcy5jb21wYXJlU3RhcnQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlRW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLmNvbXBhcmVJbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA+IGxhc3RSb3cpCiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiBsYXN0Um93ICsgMSwgY29sdW1uOiAwfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHtyb3c6IGZpcnN0Um93LCBjb2x1bW46IDB9OwoKICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBsYXN0Um93ICsgMSwgY29sdW1uOiAwfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1uOiAwfTsKCiAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQgfHwgdGhpcy5zdGFydCwgZW5kIHx8IHRoaXMuZW5kKTsKICAgIH07CiAgICB0aGlzLmV4dGVuZCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgdmFyIGNtcCA9IHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CgogICAgICAgIGlmIChjbXAgPT0gMCkKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTsKCiAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQgfHwgdGhpcy5zdGFydCwgZW5kIHx8IHRoaXMuZW5kKTsKICAgIH07CgogICAgdGhpcy5pc0VtcHR5ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuICh0aGlzLnN0YXJ0LnJvdyA9PT0gdGhpcy5lbmQucm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09PSB0aGlzLmVuZC5jb2x1bW4pOwogICAgfTsKICAgIHRoaXMuaXNNdWx0aUxpbmUgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gKHRoaXMuc3RhcnQucm93ICE9PSB0aGlzLmVuZC5yb3cpOwogICAgfTsKICAgIHRoaXMuY2xvbmUgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyh0aGlzLnN0YXJ0LCB0aGlzLmVuZCk7CiAgICB9OwogICAgdGhpcy5jb2xsYXBzZVJvd3MgPSBmdW5jdGlvbigpIHsKICAgICAgICBpZiAodGhpcy5lbmQuY29sdW1uID09IDApCiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2UodGhpcy5zdGFydC5yb3csIDAsIE1hdGgubWF4KHRoaXMuc3RhcnQucm93LCB0aGlzLmVuZC5yb3ctMSksIDApOwogICAgICAgIGVsc2UKICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSh0aGlzLnN0YXJ0LnJvdywgMCwgdGhpcy5lbmQucm93LCAwKTsKICAgIH07CiAgICB0aGlzLnRvU2NyZWVuUmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uKSB7CiAgICAgICAgdmFyIHNjcmVlblBvc1N0YXJ0ID0gc2Vzc2lvbi5kb2N1bWVudFRvU2NyZWVuUG9zaXRpb24odGhpcy5zdGFydCk7CiAgICAgICAgdmFyIHNjcmVlblBvc0VuZCA9IHNlc3Npb24uZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHRoaXMuZW5kKTsKCiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSgKICAgICAgICAgICAgc2NyZWVuUG9zU3RhcnQucm93LCBzY3JlZW5Qb3NTdGFydC5jb2x1bW4sCiAgICAgICAgICAgIHNjcmVlblBvc0VuZC5yb3csIHNjcmVlblBvc0VuZC5jb2x1bW4KICAgICAgICApOwogICAgfTsKICAgIHRoaXMubW92ZUJ5ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICB0aGlzLnN0YXJ0LnJvdyArPSByb3c7CiAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gKz0gY29sdW1uOwogICAgICAgIHRoaXMuZW5kLnJvdyArPSByb3c7CiAgICAgICAgdGhpcy5lbmQuY29sdW1uICs9IGNvbHVtbjsKICAgIH07Cgp9KS5jYWxsKFJhbmdlLnByb3RvdHlwZSk7ClJhbmdlLmZyb21Qb2ludHMgPSBmdW5jdGlvbihzdGFydCwgZW5kKSB7CiAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uLCBlbmQucm93LCBlbmQuY29sdW1uKTsKfTsKUmFuZ2UuY29tcGFyZVBvaW50cyA9IGNvbXBhcmVQb2ludHM7CgpSYW5nZS5jb21wYXJlUG9pbnRzID0gZnVuY3Rpb24ocDEsIHAyKSB7CiAgICByZXR1cm4gcDEucm93IC0gcDIucm93IHx8IHAxLmNvbHVtbiAtIHAyLmNvbHVtbjsKfTsKCgpleHBvcnRzLlJhbmdlID0gUmFuZ2U7Cn0pOwoKYWNlLmRlZmluZSgiYWNlL2FwcGx5X2RlbHRhIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCmZ1bmN0aW9uIHRocm93RGVsdGFFcnJvcihkZWx0YSwgZXJyb3JUZXh0KXsKICAgIGNvbnNvbGUubG9nKCJJbnZhbGlkIERlbHRhOiIsIGRlbHRhKTsKICAgIHRocm93ICJJbnZhbGlkIERlbHRhOiAiICsgZXJyb3JUZXh0Owp9CgpmdW5jdGlvbiBwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIHBvc2l0aW9uKSB7CiAgICByZXR1cm4gcG9zaXRpb24ucm93ICAgID49IDAgJiYgcG9zaXRpb24ucm93ICAgIDwgIGRvY0xpbmVzLmxlbmd0aCAmJgogICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA+PSAwICYmIHBvc2l0aW9uLmNvbHVtbiA8PSBkb2NMaW5lc1twb3NpdGlvbi5yb3ddLmxlbmd0aDsKfQoKZnVuY3Rpb24gdmFsaWRhdGVEZWx0YShkb2NMaW5lcywgZGVsdGEpIHsKICAgIGlmIChkZWx0YS5hY3Rpb24gIT0gImluc2VydCIgJiYgZGVsdGEuYWN0aW9uICE9ICJyZW1vdmUiKQogICAgICAgIHRocm93RGVsdGFFcnJvcihkZWx0YSwgImRlbHRhLmFjdGlvbiBtdXN0IGJlICdpbnNlcnQnIG9yICdyZW1vdmUnIik7CiAgICBpZiAoIShkZWx0YS5saW5lcyBpbnN0YW5jZW9mIEFycmF5KSkKICAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5saW5lcyBtdXN0IGJlIGFuIEFycmF5Iik7CiAgICBpZiAoIWRlbHRhLnN0YXJ0IHx8ICFkZWx0YS5lbmQpCiAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5zdGFydC9lbmQgbXVzdCBiZSBhbiBwcmVzZW50Iik7CiAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIGlmICghcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBkZWx0YS5zdGFydCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuc3RhcnQgbXVzdCBiZSBjb250YWluZWQgaW4gZG9jdW1lbnQiKTsKICAgIHZhciBlbmQgPSBkZWx0YS5lbmQ7CiAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmICFwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIGVuZCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuZW5kIG11c3QgY29udGFpbmVkIGluIGRvY3VtZW50IGZvciAncmVtb3ZlJyBhY3Rpb25zIik7CiAgICB2YXIgbnVtUmFuZ2VSb3dzID0gZW5kLnJvdyAtIHN0YXJ0LnJvdzsKICAgIHZhciBudW1SYW5nZUxhc3RMaW5lQ2hhcnMgPSAoZW5kLmNvbHVtbiAtIChudW1SYW5nZVJvd3MgPT0gMCA/IHN0YXJ0LmNvbHVtbiA6IDApKTsKICAgIGlmIChudW1SYW5nZVJvd3MgIT0gZGVsdGEubGluZXMubGVuZ3RoIC0gMSB8fCBkZWx0YS5saW5lc1tudW1SYW5nZVJvd3NdLmxlbmd0aCAhPSBudW1SYW5nZUxhc3RMaW5lQ2hhcnMpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEucmFuZ2UgbXVzdCBtYXRjaCBkZWx0YSBsaW5lcyIpOwp9CgpleHBvcnRzLmFwcGx5RGVsdGEgPSBmdW5jdGlvbihkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIAogICAgdmFyIHJvdyA9IGRlbHRhLnN0YXJ0LnJvdzsKICAgIHZhciBzdGFydENvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjsKICAgIHZhciBsaW5lID0gZG9jTGluZXNbcm93XSB8fCAiIjsKICAgIHN3aXRjaCAoZGVsdGEuYWN0aW9uKSB7CiAgICAgICAgY2FzZSAiaW5zZXJ0IjoKICAgICAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgICAgIGlmIChsaW5lcy5sZW5ndGggPT09IDEpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBkZWx0YS5saW5lc1swXSArIGxpbmUuc3Vic3RyaW5nKHN0YXJ0Q29sdW1uKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHZhciBhcmdzID0gW3JvdywgMV0uY29uY2F0KGRlbHRhLmxpbmVzKTsKICAgICAgICAgICAgICAgIGRvY0xpbmVzLnNwbGljZS5hcHBseShkb2NMaW5lcywgYXJncyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbcm93XTsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3JvdyArIGRlbHRhLmxpbmVzLmxlbmd0aCAtIDFdICs9IGxpbmUuc3Vic3RyaW5nKHN0YXJ0Q29sdW1uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICJyZW1vdmUiOgogICAgICAgICAgICB2YXIgZW5kQ29sdW1uID0gZGVsdGEuZW5kLmNvbHVtbjsKICAgICAgICAgICAgdmFyIGVuZFJvdyA9IGRlbHRhLmVuZC5yb3c7CiAgICAgICAgICAgIGlmIChyb3cgPT09IGVuZFJvdykgewogICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGxpbmUuc3Vic3RyaW5nKGVuZENvbHVtbik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UoCiAgICAgICAgICAgICAgICAgICAgcm93LCBlbmRSb3cgLSByb3cgKyAxLAogICAgICAgICAgICAgICAgICAgIGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGRvY0xpbmVzW2VuZFJvd10uc3Vic3RyaW5nKGVuZENvbHVtbikKICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICB9Cn07Cn0pOwoKYWNlLmRlZmluZSgiYWNlL2xpYi9ldmVudF9lbWl0dGVyIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCnZhciBFdmVudEVtaXR0ZXIgPSB7fTsKdmFyIHN0b3BQcm9wYWdhdGlvbiA9IGZ1bmN0aW9uKCkgeyB0aGlzLnByb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWU7IH07CnZhciBwcmV2ZW50RGVmYXVsdCA9IGZ1bmN0aW9uKCkgeyB0aGlzLmRlZmF1bHRQcmV2ZW50ZWQgPSB0cnVlOyB9OwoKRXZlbnRFbWl0dGVyLl9lbWl0ID0KRXZlbnRFbWl0dGVyLl9kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24oZXZlbnROYW1lLCBlKSB7CiAgICB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8ICh0aGlzLl9ldmVudFJlZ2lzdHJ5ID0ge30pOwogICAgdGhpcy5fZGVmYXVsdEhhbmRsZXJzIHx8ICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7fSk7CgogICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSB8fCBbXTsKICAgIHZhciBkZWZhdWx0SGFuZGxlciA9IHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdOwogICAgaWYgKCFsaXN0ZW5lcnMubGVuZ3RoICYmICFkZWZhdWx0SGFuZGxlcikKICAgICAgICByZXR1cm47CgogICAgaWYgKHR5cGVvZiBlICE9ICJvYmplY3QiIHx8ICFlKQogICAgICAgIGUgPSB7fTsKCiAgICBpZiAoIWUudHlwZSkKICAgICAgICBlLnR5cGUgPSBldmVudE5hbWU7CiAgICBpZiAoIWUuc3RvcFByb3BhZ2F0aW9uKQogICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gc3RvcFByb3BhZ2F0aW9uOwogICAgaWYgKCFlLnByZXZlbnREZWZhdWx0KQogICAgICAgIGUucHJldmVudERlZmF1bHQgPSBwcmV2ZW50RGVmYXVsdDsKCiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGk9MDsgaTxsaXN0ZW5lcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICBsaXN0ZW5lcnNbaV0oZSwgdGhpcyk7CiAgICAgICAgaWYgKGUucHJvcGFnYXRpb25TdG9wcGVkKQogICAgICAgICAgICBicmVhazsKICAgIH0KICAgIAogICAgaWYgKGRlZmF1bHRIYW5kbGVyICYmICFlLmRlZmF1bHRQcmV2ZW50ZWQpCiAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyKGUsIHRoaXMpOwp9OwoKCkV2ZW50RW1pdHRlci5fc2lnbmFsID0gZnVuY3Rpb24oZXZlbnROYW1lLCBlKSB7CiAgICB2YXIgbGlzdGVuZXJzID0gKHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge30pW2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGk9MDsgaTxsaXN0ZW5lcnMubGVuZ3RoOyBpKyspCiAgICAgICAgbGlzdGVuZXJzW2ldKGUsIHRoaXMpOwp9OwoKRXZlbnRFbWl0dGVyLm9uY2UgPSBmdW5jdGlvbihldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgX3NlbGYgPSB0aGlzOwogICAgdGhpcy5vbihldmVudE5hbWUsIGZ1bmN0aW9uIG5ld0NhbGxiYWNrKCkgewogICAgICAgIF9zZWxmLm9mZihldmVudE5hbWUsIG5ld0NhbGxiYWNrKTsKICAgICAgICBjYWxsYmFjay5hcHBseShudWxsLCBhcmd1bWVudHMpOwogICAgfSk7CiAgICBpZiAoIWNhbGxiYWNrKSB7CiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUpIHsKICAgICAgICAgICAgY2FsbGJhY2sgPSByZXNvbHZlOwogICAgICAgIH0pOwogICAgfQp9OwoKCkV2ZW50RW1pdHRlci5zZXREZWZhdWx0SGFuZGxlciA9IGZ1bmN0aW9uKGV2ZW50TmFtZSwgY2FsbGJhY2spIHsKICAgIHZhciBoYW5kbGVycyA9IHRoaXMuX2RlZmF1bHRIYW5kbGVyczsKICAgIGlmICghaGFuZGxlcnMpCiAgICAgICAgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7X2Rpc2FibGVkXzoge319OwogICAgCiAgICBpZiAoaGFuZGxlcnNbZXZlbnROYW1lXSkgewogICAgICAgIHZhciBvbGQgPSBoYW5kbGVyc1tldmVudE5hbWVdOwogICAgICAgIHZhciBkaXNhYmxlZCA9IGhhbmRsZXJzLl9kaXNhYmxlZF9bZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWRpc2FibGVkKQogICAgICAgICAgICBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV0gPSBkaXNhYmxlZCA9IFtdOwogICAgICAgIGRpc2FibGVkLnB1c2gob2xkKTsKICAgICAgICB2YXIgaSA9IGRpc2FibGVkLmluZGV4T2YoY2FsbGJhY2spOwogICAgICAgIGlmIChpICE9IC0xKSAKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQogICAgaGFuZGxlcnNbZXZlbnROYW1lXSA9IGNhbGxiYWNrOwp9OwpFdmVudEVtaXR0ZXIucmVtb3ZlRGVmYXVsdEhhbmRsZXIgPSBmdW5jdGlvbihldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnM7CiAgICBpZiAoIWhhbmRsZXJzKQogICAgICAgIHJldHVybjsKICAgIHZhciBkaXNhYmxlZCA9IGhhbmRsZXJzLl9kaXNhYmxlZF9bZXZlbnROYW1lXTsKICAgIAogICAgaWYgKGhhbmRsZXJzW2V2ZW50TmFtZV0gPT0gY2FsbGJhY2spIHsKICAgICAgICBpZiAoZGlzYWJsZWQpCiAgICAgICAgICAgIHRoaXMuc2V0RGVmYXVsdEhhbmRsZXIoZXZlbnROYW1lLCBkaXNhYmxlZC5wb3AoKSk7CiAgICB9IGVsc2UgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQp9OwoKRXZlbnRFbWl0dGVyLm9uID0KRXZlbnRFbWl0dGVyLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbihldmVudE5hbWUsIGNhbGxiYWNrLCBjYXB0dXJpbmcpIHsKICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwoKICAgIHZhciBsaXN0ZW5lcnMgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICBsaXN0ZW5lcnMgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSBbXTsKCiAgICBpZiAobGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spID09IC0xKQogICAgICAgIGxpc3RlbmVyc1tjYXB0dXJpbmcgPyAidW5zaGlmdCIgOiAicHVzaCJdKGNhbGxiYWNrKTsKICAgIHJldHVybiBjYWxsYmFjazsKfTsKCkV2ZW50RW1pdHRlci5vZmYgPQpFdmVudEVtaXR0ZXIucmVtb3ZlTGlzdGVuZXIgPQpFdmVudEVtaXR0ZXIucmVtb3ZlRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uKGV2ZW50TmFtZSwgY2FsbGJhY2spIHsKICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwoKICAgIHZhciBsaXN0ZW5lcnMgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CgogICAgdmFyIGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spOwogICAgaWYgKGluZGV4ICE9PSAtMSkKICAgICAgICBsaXN0ZW5lcnMuc3BsaWNlKGluZGV4LCAxKTsKfTsKCkV2ZW50RW1pdHRlci5yZW1vdmVBbGxMaXN0ZW5lcnMgPSBmdW5jdGlvbihldmVudE5hbWUpIHsKICAgIGlmICghZXZlbnROYW1lKSB0aGlzLl9ldmVudFJlZ2lzdHJ5ID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzID0gdW5kZWZpbmVkOwogICAgaWYgKHRoaXMuX2V2ZW50UmVnaXN0cnkpIHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSA9IHVuZGVmaW5lZDsKICAgIGlmICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMpIHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdID0gdW5kZWZpbmVkOwp9OwoKZXhwb3J0cy5FdmVudEVtaXR0ZXIgPSBFdmVudEVtaXR0ZXI7Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9hbmNob3IiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIG9vcCA9IHJlcXVpcmUoIi4vbGliL29vcCIpOwp2YXIgRXZlbnRFbWl0dGVyID0gcmVxdWlyZSgiLi9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKCnZhciBBbmNob3IgPSBleHBvcnRzLkFuY2hvciA9IGZ1bmN0aW9uKGRvYywgcm93LCBjb2x1bW4pIHsKICAgIHRoaXMuJG9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpOwogICAgdGhpcy5hdHRhY2goZG9jKTsKICAgIAogICAgaWYgKHR5cGVvZiBjb2x1bW4gPT0gInVuZGVmaW5lZCIpCiAgICAgICAgdGhpcy5zZXRQb3NpdGlvbihyb3cucm93LCByb3cuY29sdW1uKTsKICAgIGVsc2UKICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHJvdywgY29sdW1uKTsKfTsKCihmdW5jdGlvbigpIHsKCiAgICBvb3AuaW1wbGVtZW50KHRoaXMsIEV2ZW50RW1pdHRlcik7CiAgICB0aGlzLmdldFBvc2l0aW9uID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQodGhpcy5yb3csIHRoaXMuY29sdW1uKTsKICAgIH07CiAgICB0aGlzLmdldERvY3VtZW50ID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnQ7CiAgICB9OwogICAgdGhpcy4kaW5zZXJ0UmlnaHQgPSBmYWxzZTsKICAgIHRoaXMub25DaGFuZ2UgPSBmdW5jdGlvbihkZWx0YSkgewogICAgICAgIGlmIChkZWx0YS5zdGFydC5yb3cgPT0gZGVsdGEuZW5kLnJvdyAmJiBkZWx0YS5zdGFydC5yb3cgIT0gdGhpcy5yb3cpCiAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgaWYgKGRlbHRhLnN0YXJ0LnJvdyA+IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIAogICAgICAgIHZhciBwb2ludCA9ICRnZXRUcmFuc2Zvcm1lZFBvaW50KGRlbHRhLCB7cm93OiB0aGlzLnJvdywgY29sdW1uOiB0aGlzLmNvbHVtbn0sIHRoaXMuJGluc2VydFJpZ2h0KTsKICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHBvaW50LnJvdywgcG9pbnQuY29sdW1uLCB0cnVlKTsKICAgIH07CiAgICAKICAgIGZ1bmN0aW9uICRwb2ludHNJbk9yZGVyKHBvaW50MSwgcG9pbnQyLCBlcXVhbFBvaW50c0luT3JkZXIpIHsKICAgICAgICB2YXIgYkNvbElzQWZ0ZXIgPSBlcXVhbFBvaW50c0luT3JkZXIgPyBwb2ludDEuY29sdW1uIDw9IHBvaW50Mi5jb2x1bW4gOiBwb2ludDEuY29sdW1uIDwgcG9pbnQyLmNvbHVtbjsKICAgICAgICByZXR1cm4gKHBvaW50MS5yb3cgPCBwb2ludDIucm93KSB8fCAocG9pbnQxLnJvdyA9PSBwb2ludDIucm93ICYmIGJDb2xJc0FmdGVyKTsKICAgIH0KICAgICAgICAgICAgCiAgICBmdW5jdGlvbiAkZ2V0VHJhbnNmb3JtZWRQb2ludChkZWx0YSwgcG9pbnQsIG1vdmVJZkVxdWFsKSB7CiAgICAgICAgdmFyIGRlbHRhSXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICAgICAgdmFyIGRlbHRhUm93U2hpZnQgPSAoZGVsdGFJc0luc2VydCA/IDEgOiAtMSkgKiAoZGVsdGEuZW5kLnJvdyAgICAtIGRlbHRhLnN0YXJ0LnJvdyk7CiAgICAgICAgdmFyIGRlbHRhQ29sU2hpZnQgPSAoZGVsdGFJc0luc2VydCA/IDEgOiAtMSkgKiAoZGVsdGEuZW5kLmNvbHVtbiAtIGRlbHRhLnN0YXJ0LmNvbHVtbik7CiAgICAgICAgdmFyIGRlbHRhU3RhcnQgPSBkZWx0YS5zdGFydDsKICAgICAgICB2YXIgZGVsdGFFbmQgPSBkZWx0YUlzSW5zZXJ0ID8gZGVsdGFTdGFydCA6IGRlbHRhLmVuZDsgLy8gQ29sbGFwc2UgaW5zZXJ0IHJhbmdlLgogICAgICAgIGlmICgkcG9pbnRzSW5PcmRlcihwb2ludCwgZGVsdGFTdGFydCwgbW92ZUlmRXF1YWwpKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICByb3c6IHBvaW50LnJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogcG9pbnQuY29sdW1uCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIGlmICgkcG9pbnRzSW5PcmRlcihkZWx0YUVuZCwgcG9pbnQsICFtb3ZlSWZFcXVhbCkpIHsKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgIHJvdzogcG9pbnQucm93ICsgZGVsdGFSb3dTaGlmdCwKICAgICAgICAgICAgICAgIGNvbHVtbjogcG9pbnQuY29sdW1uICsgKHBvaW50LnJvdyA9PSBkZWx0YUVuZC5yb3cgPyBkZWx0YUNvbFNoaWZ0IDogMCkKICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcm93OiBkZWx0YVN0YXJ0LnJvdywKICAgICAgICAgICAgY29sdW1uOiBkZWx0YVN0YXJ0LmNvbHVtbgogICAgICAgIH07CiAgICB9CiAgICB0aGlzLnNldFBvc2l0aW9uID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIG5vQ2xpcCkgewogICAgICAgIHZhciBwb3M7CiAgICAgICAgaWYgKG5vQ2xpcCkgewogICAgICAgICAgICBwb3MgPSB7CiAgICAgICAgICAgICAgICByb3c6IHJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogY29sdW1uCiAgICAgICAgICAgIH07CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgcG9zID0gdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudChyb3csIGNvbHVtbik7CiAgICAgICAgfQoKICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CgogICAgICAgIHZhciBvbGQgPSB7CiAgICAgICAgICAgIHJvdzogdGhpcy5yb3csCiAgICAgICAgICAgIGNvbHVtbjogdGhpcy5jb2x1bW4KICAgICAgICB9OwoKICAgICAgICB0aGlzLnJvdyA9IHBvcy5yb3c7CiAgICAgICAgdGhpcy5jb2x1bW4gPSBwb3MuY29sdW1uOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlIiwgewogICAgICAgICAgICBvbGQ6IG9sZCwKICAgICAgICAgICAgdmFsdWU6IHBvcwogICAgICAgIH0pOwogICAgfTsKICAgIHRoaXMuZGV0YWNoID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5kb2N1bWVudC5vZmYoImNoYW5nZSIsIHRoaXMuJG9uQ2hhbmdlKTsKICAgIH07CiAgICB0aGlzLmF0dGFjaCA9IGZ1bmN0aW9uKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLCB0aGlzLiRvbkNoYW5nZSk7CiAgICB9OwogICAgdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgdmFyIHBvcyA9IHt9OwoKICAgICAgICBpZiAocm93ID49IHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgcG9zLnJvdyA9IE1hdGgubWF4KDAsIHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcG9zLnJvdyA9IDA7CiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcG9zLnJvdyA9IHJvdzsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IE1hdGgubWluKHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGgsIE1hdGgubWF4KDAsIGNvbHVtbikpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGNvbHVtbiA8IDApCiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwoKICAgICAgICByZXR1cm4gcG9zOwogICAgfTsKCn0pLmNhbGwoQW5jaG9yLnByb3RvdHlwZSk7Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9kb2N1bWVudCIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSkgewoidXNlIHN0cmljdCI7Cgp2YXIgb29wID0gcmVxdWlyZSgiLi9saWIvb29wIik7CnZhciBhcHBseURlbHRhID0gcmVxdWlyZSgiLi9hcHBseV9kZWx0YSIpLmFwcGx5RGVsdGE7CnZhciBFdmVudEVtaXR0ZXIgPSByZXF1aXJlKCIuL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwp2YXIgUmFuZ2UgPSByZXF1aXJlKCIuL3JhbmdlIikuUmFuZ2U7CnZhciBBbmNob3IgPSByZXF1aXJlKCIuL2FuY2hvciIpLkFuY2hvcjsKCnZhciBEb2N1bWVudCA9IGZ1bmN0aW9uKHRleHRPckxpbmVzKSB7CiAgICB0aGlzLiRsaW5lcyA9IFsiIl07CiAgICBpZiAodGV4dE9yTGluZXMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KHRleHRPckxpbmVzKSkgewogICAgICAgIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMoe3JvdzogMCwgY29sdW1uOiAwfSwgdGV4dE9yTGluZXMpOwogICAgfSBlbHNlIHsKICAgICAgICB0aGlzLmluc2VydCh7cm93OiAwLCBjb2x1bW46MH0sIHRleHRPckxpbmVzKTsKICAgIH0KfTsKCihmdW5jdGlvbigpIHsKCiAgICBvb3AuaW1wbGVtZW50KHRoaXMsIEV2ZW50RW1pdHRlcik7CiAgICB0aGlzLnNldFZhbHVlID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgIHZhciBsZW4gPSB0aGlzLmdldExlbmd0aCgpIC0gMTsKICAgICAgICB0aGlzLnJlbW92ZShuZXcgUmFuZ2UoMCwgMCwgbGVuLCB0aGlzLmdldExpbmUobGVuKS5sZW5ndGgpKTsKICAgICAgICB0aGlzLmluc2VydCh7cm93OiAwLCBjb2x1bW46IDB9LCB0ZXh0KTsKICAgIH07CiAgICB0aGlzLmdldFZhbHVlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0QWxsTGluZXMoKS5qb2luKHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpKTsKICAgIH07CiAgICB0aGlzLmNyZWF0ZUFuY2hvciA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmNob3IodGhpcywgcm93LCBjb2x1bW4pOwogICAgfTsKICAgIGlmICgiYWFhIi5zcGxpdCgvYS8pLmxlbmd0aCA9PT0gMCkgewogICAgICAgIHRoaXMuJHNwbGl0ID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgICAgICByZXR1cm4gdGV4dC5yZXBsYWNlKC9cclxufFxyL2csICJcbiIpLnNwbGl0KCJcbiIpOwogICAgICAgIH07CiAgICB9IGVsc2UgewogICAgICAgIHRoaXMuJHNwbGl0ID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgICAgICByZXR1cm4gdGV4dC5zcGxpdCgvXHJcbnxccnxcbi8pOwogICAgICAgIH07CiAgICB9CgoKICAgIHRoaXMuJGRldGVjdE5ld0xpbmUgPSBmdW5jdGlvbih0ZXh0KSB7CiAgICAgICAgdmFyIG1hdGNoID0gdGV4dC5tYXRjaCgvXi4qPyhcclxufFxyfFxuKS9tKTsKICAgICAgICB0aGlzLiRhdXRvTmV3TGluZSA9IG1hdGNoID8gbWF0Y2hbMV0gOiAiXG4iOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICB0aGlzLmdldE5ld0xpbmVDaGFyYWN0ZXIgPSBmdW5jdGlvbigpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuJG5ld0xpbmVNb2RlKSB7CiAgICAgICAgICBjYXNlICJ3aW5kb3dzIjoKICAgICAgICAgICAgcmV0dXJuICJcclxuIjsKICAgICAgICAgIGNhc2UgInVuaXgiOgogICAgICAgICAgICByZXR1cm4gIlxuIjsKICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIHJldHVybiB0aGlzLiRhdXRvTmV3TGluZSB8fCAiXG4iOwogICAgICAgIH0KICAgIH07CgogICAgdGhpcy4kYXV0b05ld0xpbmUgPSAiIjsKICAgIHRoaXMuJG5ld0xpbmVNb2RlID0gImF1dG8iOwogICAgdGhpcy5zZXROZXdMaW5lTW9kZSA9IGZ1bmN0aW9uKG5ld0xpbmVNb2RlKSB7CiAgICAgICAgaWYgKHRoaXMuJG5ld0xpbmVNb2RlID09PSBuZXdMaW5lTW9kZSkKICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICB0aGlzLiRuZXdMaW5lTW9kZSA9IG5ld0xpbmVNb2RlOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICB0aGlzLmdldE5ld0xpbmVNb2RlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJG5ld0xpbmVNb2RlOwogICAgfTsKICAgIHRoaXMuaXNOZXdMaW5lID0gZnVuY3Rpb24odGV4dCkgewogICAgICAgIHJldHVybiAodGV4dCA9PSAiXHJcbiIgfHwgdGV4dCA9PSAiXHIiIHx8IHRleHQgPT0gIlxuIik7CiAgICB9OwogICAgdGhpcy5nZXRMaW5lID0gZnVuY3Rpb24ocm93KSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGxpbmVzW3Jvd10gfHwgIiI7CiAgICB9OwogICAgdGhpcy5nZXRMaW5lcyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGxpbmVzLnNsaWNlKGZpcnN0Um93LCBsYXN0Um93ICsgMSk7CiAgICB9OwogICAgdGhpcy5nZXRBbGxMaW5lcyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLmdldExpbmVzKDAsIHRoaXMuZ2V0TGVuZ3RoKCkpOwogICAgfTsKICAgIHRoaXMuZ2V0TGVuZ3RoID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGxpbmVzLmxlbmd0aDsKICAgIH07CiAgICB0aGlzLmdldFRleHRSYW5nZSA9IGZ1bmN0aW9uKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0TGluZXNGb3JSYW5nZShyYW5nZSkuam9pbih0aGlzLmdldE5ld0xpbmVDaGFyYWN0ZXIoKSk7CiAgICB9OwogICAgdGhpcy5nZXRMaW5lc0ZvclJhbmdlID0gZnVuY3Rpb24ocmFuZ2UpIHsKICAgICAgICB2YXIgbGluZXM7CiAgICAgICAgaWYgKHJhbmdlLnN0YXJ0LnJvdyA9PT0gcmFuZ2UuZW5kLnJvdykgewogICAgICAgICAgICBsaW5lcyA9IFt0aGlzLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uLCByYW5nZS5lbmQuY29sdW1uKV07CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbGluZXMgPSB0aGlzLmdldExpbmVzKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2UuZW5kLnJvdyk7CiAgICAgICAgICAgIGxpbmVzWzBdID0gKGxpbmVzWzBdIHx8ICIiKS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSAxOwogICAgICAgICAgICBpZiAocmFuZ2UuZW5kLnJvdyAtIHJhbmdlLnN0YXJ0LnJvdyA9PSBsKQogICAgICAgICAgICAgICAgbGluZXNbbF0gPSBsaW5lc1tsXS5zdWJzdHJpbmcoMCwgcmFuZ2UuZW5kLmNvbHVtbik7CiAgICAgICAgfQogICAgICAgIHJldHVybiBsaW5lczsKICAgIH07CiAgICB0aGlzLmluc2VydExpbmVzID0gZnVuY3Rpb24ocm93LCBsaW5lcykgewogICAgICAgIGNvbnNvbGUud2FybigiVXNlIG9mIGRvY3VtZW50Lmluc2VydExpbmVzIGlzIGRlcHJlY2F0ZWQuIFVzZSB0aGUgaW5zZXJ0RnVsbExpbmVzIG1ldGhvZCBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydEZ1bGxMaW5lcyhyb3csIGxpbmVzKTsKICAgIH07CiAgICB0aGlzLnJlbW92ZUxpbmVzID0gZnVuY3Rpb24oZmlyc3RSb3csIGxhc3RSb3cpIHsKICAgICAgICBjb25zb2xlLndhcm4oIlVzZSBvZiBkb2N1bWVudC5yZW1vdmVMaW5lcyBpcyBkZXByZWNhdGVkLiBVc2UgdGhlIHJlbW92ZUZ1bGxMaW5lcyBtZXRob2QgaW5zdGVhZC4iKTsKICAgICAgICByZXR1cm4gdGhpcy5yZW1vdmVGdWxsTGluZXMoZmlyc3RSb3csIGxhc3RSb3cpOwogICAgfTsKICAgIHRoaXMuaW5zZXJ0TmV3TGluZSA9IGZ1bmN0aW9uKHBvc2l0aW9uKSB7CiAgICAgICAgY29uc29sZS53YXJuKCJVc2Ugb2YgZG9jdW1lbnQuaW5zZXJ0TmV3TGluZSBpcyBkZXByZWNhdGVkLiBVc2UgaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIFsnJywgJyddKSBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydE1lcmdlZExpbmVzKHBvc2l0aW9uLCBbIiIsICIiXSk7CiAgICB9OwogICAgdGhpcy5pbnNlcnQgPSBmdW5jdGlvbihwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIGlmICh0aGlzLmdldExlbmd0aCgpIDw9IDEpCiAgICAgICAgICAgIHRoaXMuJGRldGVjdE5ld0xpbmUodGV4dCk7CiAgICAgICAgCiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIHRoaXMuJHNwbGl0KHRleHQpKTsKICAgIH07CiAgICB0aGlzLmluc2VydEluTGluZSA9IGZ1bmN0aW9uKHBvc2l0aW9uLCB0ZXh0KSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5wb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4gKyB0ZXh0Lmxlbmd0aCk7CiAgICAgICAgCiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IFt0ZXh0XQogICAgICAgIH0sIHRydWUpOwogICAgICAgIAogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgCiAgICB0aGlzLmNsaXBwZWRQb3MgPSBmdW5jdGlvbihyb3csIGNvbHVtbikgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpOwogICAgICAgIGlmIChyb3cgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByb3cgPSBsZW5ndGg7CiAgICAgICAgfSBlbHNlIGlmIChyb3cgPCAwKSB7CiAgICAgICAgICAgIHJvdyA9IDA7CiAgICAgICAgfSBlbHNlIGlmIChyb3cgPj0gbGVuZ3RoKSB7CiAgICAgICAgICAgIHJvdyA9IGxlbmd0aCAtIDE7CiAgICAgICAgICAgIGNvbHVtbiA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgdmFyIGxpbmUgPSB0aGlzLmdldExpbmUocm93KTsKICAgICAgICBpZiAoY29sdW1uID09IHVuZGVmaW5lZCkKICAgICAgICAgICAgY29sdW1uID0gbGluZS5sZW5ndGg7CiAgICAgICAgY29sdW1uID0gTWF0aC5taW4oTWF0aC5tYXgoY29sdW1uLCAwKSwgbGluZS5sZW5ndGgpOwogICAgICAgIHJldHVybiB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTsKICAgIH07CiAgICAKICAgIHRoaXMuY2xvbmVQb3MgPSBmdW5jdGlvbihwb3MpIHsKICAgICAgICByZXR1cm4ge3JvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1ufTsKICAgIH07CiAgICAKICAgIHRoaXMucG9zID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4ge3Jvdzogcm93LCBjb2x1bW46IGNvbHVtbn07CiAgICB9OwogICAgCiAgICB0aGlzLiRjbGlwUG9zaXRpb24gPSBmdW5jdGlvbihwb3NpdGlvbikgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpOwogICAgICAgIGlmIChwb3NpdGlvbi5yb3cgPj0gbGVuZ3RoKSB7CiAgICAgICAgICAgIHBvc2l0aW9uLnJvdyA9IE1hdGgubWF4KDAsIGxlbmd0aCAtIDEpOwogICAgICAgICAgICBwb3NpdGlvbi5jb2x1bW4gPSB0aGlzLmdldExpbmUobGVuZ3RoIC0gMSkubGVuZ3RoOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHBvc2l0aW9uLnJvdyA9IE1hdGgubWF4KDAsIHBvc2l0aW9uLnJvdyk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IE1hdGgubWluKE1hdGgubWF4KHBvc2l0aW9uLmNvbHVtbiwgMCksIHRoaXMuZ2V0TGluZShwb3NpdGlvbi5yb3cpLmxlbmd0aCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBwb3NpdGlvbjsKICAgIH07CiAgICB0aGlzLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uKHJvdywgbGluZXMpIHsKICAgICAgICByb3cgPSBNYXRoLm1pbihNYXRoLm1heChyb3csIDApLCB0aGlzLmdldExlbmd0aCgpKTsKICAgICAgICB2YXIgY29sdW1uID0gMDsKICAgICAgICBpZiAocm93IDwgdGhpcy5nZXRMZW5ndGgoKSkgewogICAgICAgICAgICBsaW5lcyA9IGxpbmVzLmNvbmNhdChbIiJdKTsKICAgICAgICAgICAgY29sdW1uID0gMDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IFsiIl0uY29uY2F0KGxpbmVzKTsKICAgICAgICAgICAgcm93LS07CiAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuJGxpbmVzW3Jvd10ubGVuZ3RoOwogICAgICAgIH0KICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHtyb3c6IHJvdywgY29sdW1uOiBjb2x1bW59LCBsaW5lcyk7CiAgICB9OyAgICAKICAgIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMgPSBmdW5jdGlvbihwb3NpdGlvbiwgbGluZXMpIHsKICAgICAgICB2YXIgc3RhcnQgPSB0aGlzLmNsaXBwZWRQb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4pOwogICAgICAgIHZhciBlbmQgPSB7CiAgICAgICAgICAgIHJvdzogc3RhcnQucm93ICsgbGluZXMubGVuZ3RoIC0gMSwKICAgICAgICAgICAgY29sdW1uOiAobGluZXMubGVuZ3RoID09IDEgPyBzdGFydC5jb2x1bW4gOiAwKSArIGxpbmVzW2xpbmVzLmxlbmd0aCAtIDFdLmxlbmd0aAogICAgICAgIH07CiAgICAgICAgCiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IGxpbmVzCiAgICAgICAgfSk7CiAgICAgICAgCiAgICAgICAgcmV0dXJuIHRoaXMuY2xvbmVQb3MoZW5kKTsKICAgIH07CiAgICB0aGlzLnJlbW92ZSA9IGZ1bmN0aW9uKHJhbmdlKSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJhbmdlLmVuZC5yb3csIHJhbmdlLmVuZC5jb2x1bW4pOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgIGxpbmVzOiB0aGlzLmdldExpbmVzRm9yUmFuZ2Uoe3N0YXJ0OiBzdGFydCwgZW5kOiBlbmR9KQogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICB0aGlzLnJlbW92ZUluTGluZSA9IGZ1bmN0aW9uKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICAKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHtzdGFydDogc3RhcnQsIGVuZDogZW5kfSkKICAgICAgICB9LCB0cnVlKTsKICAgICAgICAKICAgICAgICByZXR1cm4gdGhpcy5jbG9uZVBvcyhzdGFydCk7CiAgICB9OwogICAgdGhpcy5yZW1vdmVGdWxsTGluZXMgPSBmdW5jdGlvbihmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGZpcnN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgZmlyc3RSb3cpLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7CiAgICAgICAgbGFzdFJvdyAgPSBNYXRoLm1pbihNYXRoLm1heCgwLCBsYXN0Um93ICksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICB2YXIgZGVsZXRlRmlyc3ROZXdMaW5lID0gbGFzdFJvdyA9PSB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiBmaXJzdFJvdyA+IDA7CiAgICAgICAgdmFyIGRlbGV0ZUxhc3ROZXdMaW5lICA9IGxhc3RSb3cgIDwgdGhpcy5nZXRMZW5ndGgoKSAtIDE7CiAgICAgICAgdmFyIHN0YXJ0Um93ID0gKCBkZWxldGVGaXJzdE5ld0xpbmUgPyBmaXJzdFJvdyAtIDEgICAgICAgICAgICAgICAgICA6IGZpcnN0Um93ICAgICAgICAgICAgICAgICAgICApOwogICAgICAgIHZhciBzdGFydENvbCA9ICggZGVsZXRlRmlyc3ROZXdMaW5lID8gdGhpcy5nZXRMaW5lKHN0YXJ0Um93KS5sZW5ndGggOiAwICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICB2YXIgZW5kUm93ICAgPSAoIGRlbGV0ZUxhc3ROZXdMaW5lICA/IGxhc3RSb3cgKyAxICAgICAgICAgICAgICAgICAgIDogbGFzdFJvdyAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgdmFyIGVuZENvbCAgID0gKCBkZWxldGVMYXN0TmV3TGluZSAgPyAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRoaXMuZ2V0TGluZShlbmRSb3cpLmxlbmd0aCApOyAKICAgICAgICB2YXIgcmFuZ2UgPSBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sLCBlbmRSb3csIGVuZENvbCk7CiAgICAgICAgdmFyIGRlbGV0ZWRMaW5lcyA9IHRoaXMuJGxpbmVzLnNsaWNlKGZpcnN0Um93LCBsYXN0Um93ICsgMSk7CiAgICAgICAgCiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHJhbmdlLnN0YXJ0LAogICAgICAgICAgICBlbmQ6IHJhbmdlLmVuZCwKICAgICAgICAgICAgYWN0aW9uOiAicmVtb3ZlIiwKICAgICAgICAgICAgbGluZXM6IHRoaXMuZ2V0TGluZXNGb3JSYW5nZShyYW5nZSkKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gZGVsZXRlZExpbmVzOwogICAgfTsKICAgIHRoaXMucmVtb3ZlTmV3TGluZSA9IGZ1bmN0aW9uKHJvdykgewogICAgICAgIGlmIChyb3cgPCB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiByb3cgPj0gMCkgewogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICAgICAgc3RhcnQ6IHRoaXMucG9zKHJvdywgdGhpcy5nZXRMaW5lKHJvdykubGVuZ3RoKSwKICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgMSwgMCksCiAgICAgICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICAgICAgbGluZXM6IFsiIiwgIiJdCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLnJlcGxhY2UgPSBmdW5jdGlvbihyYW5nZSwgdGV4dCkgewogICAgICAgIGlmICghKHJhbmdlIGluc3RhbmNlb2YgUmFuZ2UpKQogICAgICAgICAgICByYW5nZSA9IFJhbmdlLmZyb21Qb2ludHMocmFuZ2Uuc3RhcnQsIHJhbmdlLmVuZCk7CiAgICAgICAgaWYgKHRleHQubGVuZ3RoID09PSAwICYmIHJhbmdlLmlzRW1wdHkoKSkKICAgICAgICAgICAgcmV0dXJuIHJhbmdlLnN0YXJ0OwogICAgICAgIGlmICh0ZXh0ID09IHRoaXMuZ2V0VGV4dFJhbmdlKHJhbmdlKSkKICAgICAgICAgICAgcmV0dXJuIHJhbmdlLmVuZDsKCiAgICAgICAgdGhpcy5yZW1vdmUocmFuZ2UpOwogICAgICAgIHZhciBlbmQ7CiAgICAgICAgaWYgKHRleHQpIHsKICAgICAgICAgICAgZW5kID0gdGhpcy5pbnNlcnQocmFuZ2Uuc3RhcnQsIHRleHQpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgZW5kID0gcmFuZ2Uuc3RhcnQ7CiAgICAgICAgfQogICAgICAgIAogICAgICAgIHJldHVybiBlbmQ7CiAgICB9OwogICAgdGhpcy5hcHBseURlbHRhcyA9IGZ1bmN0aW9uKGRlbHRhcykgewogICAgICAgIGZvciAodmFyIGk9MDsgaTxkZWx0YXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhc1tpXSk7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMucmV2ZXJ0RGVsdGFzID0gZnVuY3Rpb24oZGVsdGFzKSB7CiAgICAgICAgZm9yICh2YXIgaT1kZWx0YXMubGVuZ3RoLTE7IGk+PTA7IGktLSkgewogICAgICAgICAgICB0aGlzLnJldmVydERlbHRhKGRlbHRhc1tpXSk7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuYXBwbHlEZWx0YSA9IGZ1bmN0aW9uKGRlbHRhLCBkb05vdFZhbGlkYXRlKSB7CiAgICAgICAgdmFyIGlzSW5zZXJ0ID0gZGVsdGEuYWN0aW9uID09ICJpbnNlcnQiOwogICAgICAgIGlmIChpc0luc2VydCA/IGRlbHRhLmxpbmVzLmxlbmd0aCA8PSAxICYmICFkZWx0YS5saW5lc1swXQogICAgICAgICAgICA6ICFSYW5nZS5jb21wYXJlUG9pbnRzKGRlbHRhLnN0YXJ0LCBkZWx0YS5lbmQpKSB7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgaWYgKGlzSW5zZXJ0ICYmIGRlbHRhLmxpbmVzLmxlbmd0aCA+IDIwMDAwKSB7CiAgICAgICAgICAgIHRoaXMuJHNwbGl0QW5kYXBwbHlMYXJnZURlbHRhKGRlbHRhLCAyMDAwMCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBhcHBseURlbHRhKHRoaXMuJGxpbmVzLCBkZWx0YSwgZG9Ob3RWYWxpZGF0ZSk7CiAgICAgICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlIiwgZGVsdGEpOwogICAgICAgIH0KICAgIH07CiAgICAKICAgIHRoaXMuJHNhZmVBcHBseURlbHRhID0gZnVuY3Rpb24oZGVsdGEpIHsKICAgICAgICB2YXIgZG9jTGVuZ3RoID0gdGhpcy4kbGluZXMubGVuZ3RoOwogICAgICAgIGlmICgKICAgICAgICAgICAgZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmIGRlbHRhLnN0YXJ0LnJvdyA8IGRvY0xlbmd0aCAmJiBkZWx0YS5lbmQucm93IDwgZG9jTGVuZ3RoCiAgICAgICAgICAgIHx8IGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiAmJiBkZWx0YS5zdGFydC5yb3cgPD0gZG9jTGVuZ3RoCiAgICAgICAgKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YShkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIAogICAgdGhpcy4kc3BsaXRBbmRhcHBseUxhcmdlRGVsdGEgPSBmdW5jdGlvbihkZWx0YSwgTUFYKSB7CiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSBNQVggKyAxOwogICAgICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7IAogICAgICAgIHZhciBjb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47CiAgICAgICAgZm9yICh2YXIgZnJvbSA9IDAsIHRvID0gMDsgZnJvbSA8IGw7IGZyb20gPSB0bykgewogICAgICAgICAgICB0byArPSBNQVggLSAxOwogICAgICAgICAgICB2YXIgY2h1bmsgPSBsaW5lcy5zbGljZShmcm9tLCB0byk7CiAgICAgICAgICAgIGNodW5rLnB1c2goIiIpOwogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICAgICAgc3RhcnQ6IHRoaXMucG9zKHJvdyArIGZyb20sIGNvbHVtbiksCiAgICAgICAgICAgICAgICBlbmQ6IHRoaXMucG9zKHJvdyArIHRvLCBjb2x1bW4gPSAwKSwKICAgICAgICAgICAgICAgIGFjdGlvbjogZGVsdGEuYWN0aW9uLAogICAgICAgICAgICAgICAgbGluZXM6IGNodW5rCiAgICAgICAgICAgIH0sIHRydWUpOwogICAgICAgIH0KICAgICAgICBkZWx0YS5saW5lcyA9IGxpbmVzLnNsaWNlKGZyb20pOwogICAgICAgIGRlbHRhLnN0YXJ0LnJvdyA9IHJvdyArIGZyb207CiAgICAgICAgZGVsdGEuc3RhcnQuY29sdW1uID0gY29sdW1uOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YShkZWx0YSwgdHJ1ZSk7CiAgICB9OwogICAgdGhpcy5yZXZlcnREZWx0YSA9IGZ1bmN0aW9uKGRlbHRhKSB7CiAgICAgICAgdGhpcy4kc2FmZUFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogdGhpcy5jbG9uZVBvcyhkZWx0YS5zdGFydCksCiAgICAgICAgICAgIGVuZDogdGhpcy5jbG9uZVBvcyhkZWx0YS5lbmQpLAogICAgICAgICAgICBhY3Rpb246IChkZWx0YS5hY3Rpb24gPT0gImluc2VydCIgPyAicmVtb3ZlIiA6ICJpbnNlcnQiKSwKICAgICAgICAgICAgbGluZXM6IGRlbHRhLmxpbmVzLnNsaWNlKCkKICAgICAgICB9KTsKICAgIH07CiAgICB0aGlzLmluZGV4VG9Qb3NpdGlvbiA9IGZ1bmN0aW9uKGluZGV4LCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICBmb3IgKHZhciBpID0gc3RhcnRSb3cgfHwgMCwgbCA9IGxpbmVzLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICBpbmRleCAtPSBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RoOwogICAgICAgICAgICBpZiAoaW5kZXggPCAwKQogICAgICAgICAgICAgICAgcmV0dXJuIHtyb3c6IGksIGNvbHVtbjogaW5kZXggKyBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RofTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHtyb3c6IGwtMSwgY29sdW1uOiBpbmRleCArIGxpbmVzW2wtMV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aH07CiAgICB9OwogICAgdGhpcy5wb3NpdGlvblRvSW5kZXggPSBmdW5jdGlvbihwb3MsIHN0YXJ0Um93KSB7CiAgICAgICAgdmFyIGxpbmVzID0gdGhpcy4kbGluZXMgfHwgdGhpcy5nZXRBbGxMaW5lcygpOwogICAgICAgIHZhciBuZXdsaW5lTGVuZ3RoID0gdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkubGVuZ3RoOwogICAgICAgIHZhciBpbmRleCA9IDA7CiAgICAgICAgdmFyIHJvdyA9IE1hdGgubWluKHBvcy5yb3csIGxpbmVzLmxlbmd0aCk7CiAgICAgICAgZm9yICh2YXIgaSA9IHN0YXJ0Um93IHx8IDA7IGkgPCByb3c7ICsraSkKICAgICAgICAgICAgaW5kZXggKz0gbGluZXNbaV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aDsKCiAgICAgICAgcmV0dXJuIGluZGV4ICsgcG9zLmNvbHVtbjsKICAgIH07Cgp9KS5jYWxsKERvY3VtZW50LnByb3RvdHlwZSk7CgpleHBvcnRzLkRvY3VtZW50ID0gRG9jdW1lbnQ7Cn0pOwoKYWNlLmRlZmluZSgiYWNlL2xpYi9sYW5nIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCmV4cG9ydHMubGFzdCA9IGZ1bmN0aW9uKGEpIHsKICAgIHJldHVybiBhW2EubGVuZ3RoIC0gMV07Cn07CgpleHBvcnRzLnN0cmluZ1JldmVyc2UgPSBmdW5jdGlvbihzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcuc3BsaXQoIiIpLnJldmVyc2UoKS5qb2luKCIiKTsKfTsKCmV4cG9ydHMuc3RyaW5nUmVwZWF0ID0gZnVuY3Rpb24gKHN0cmluZywgY291bnQpIHsKICAgIHZhciByZXN1bHQgPSAnJzsKICAgIHdoaWxlIChjb3VudCA+IDApIHsKICAgICAgICBpZiAoY291bnQgJiAxKQogICAgICAgICAgICByZXN1bHQgKz0gc3RyaW5nOwoKICAgICAgICBpZiAoY291bnQgPj49IDEpCiAgICAgICAgICAgIHN0cmluZyArPSBzdHJpbmc7CiAgICB9CiAgICByZXR1cm4gcmVzdWx0Owp9OwoKdmFyIHRyaW1CZWdpblJlZ2V4cCA9IC9eXHNccyovOwp2YXIgdHJpbUVuZFJlZ2V4cCA9IC9cc1xzKiQvOwoKZXhwb3J0cy5zdHJpbmdUcmltTGVmdCA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSh0cmltQmVnaW5SZWdleHAsICcnKTsKfTsKCmV4cG9ydHMuc3RyaW5nVHJpbVJpZ2h0ID0gZnVuY3Rpb24gKHN0cmluZykgewogICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKHRyaW1FbmRSZWdleHAsICcnKTsKfTsKCmV4cG9ydHMuY29weU9iamVjdCA9IGZ1bmN0aW9uKG9iaikgewogICAgdmFyIGNvcHkgPSB7fTsKICAgIGZvciAodmFyIGtleSBpbiBvYmopIHsKICAgICAgICBjb3B5W2tleV0gPSBvYmpba2V5XTsKICAgIH0KICAgIHJldHVybiBjb3B5Owp9OwoKZXhwb3J0cy5jb3B5QXJyYXkgPSBmdW5jdGlvbihhcnJheSl7CiAgICB2YXIgY29weSA9IFtdOwogICAgZm9yICh2YXIgaT0wLCBsPWFycmF5Lmxlbmd0aDsgaTxsOyBpKyspIHsKICAgICAgICBpZiAoYXJyYXlbaV0gJiYgdHlwZW9mIGFycmF5W2ldID09ICJvYmplY3QiKQogICAgICAgICAgICBjb3B5W2ldID0gdGhpcy5jb3B5T2JqZWN0KGFycmF5W2ldKTsKICAgICAgICBlbHNlIAogICAgICAgICAgICBjb3B5W2ldID0gYXJyYXlbaV07CiAgICB9CiAgICByZXR1cm4gY29weTsKfTsKCmV4cG9ydHMuZGVlcENvcHkgPSBmdW5jdGlvbiBkZWVwQ29weShvYmopIHsKICAgIGlmICh0eXBlb2Ygb2JqICE9PSAib2JqZWN0IiB8fCAhb2JqKQogICAgICAgIHJldHVybiBvYmo7CiAgICB2YXIgY29weTsKICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHsKICAgICAgICBjb3B5ID0gW107CiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHsKICAgICAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29weTsKICAgIH0KICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSAhPT0gIltvYmplY3QgT2JqZWN0XSIpCiAgICAgICAgcmV0dXJuIG9iajsKICAgIAogICAgY29weSA9IHt9OwogICAgZm9yICh2YXIga2V5IGluIG9iaikKICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICByZXR1cm4gY29weTsKfTsKCmV4cG9ydHMuYXJyYXlUb01hcCA9IGZ1bmN0aW9uKGFycikgewogICAgdmFyIG1hcCA9IHt9OwogICAgZm9yICh2YXIgaT0wOyBpPGFyci5sZW5ndGg7IGkrKykgewogICAgICAgIG1hcFthcnJbaV1dID0gMTsKICAgIH0KICAgIHJldHVybiBtYXA7Cgp9OwoKZXhwb3J0cy5jcmVhdGVNYXAgPSBmdW5jdGlvbihwcm9wcykgewogICAgdmFyIG1hcCA9IE9iamVjdC5jcmVhdGUobnVsbCk7CiAgICBmb3IgKHZhciBpIGluIHByb3BzKSB7CiAgICAgICAgbWFwW2ldID0gcHJvcHNbaV07CiAgICB9CiAgICByZXR1cm4gbWFwOwp9OwpleHBvcnRzLmFycmF5UmVtb3ZlID0gZnVuY3Rpb24oYXJyYXksIHZhbHVlKSB7CiAgZm9yICh2YXIgaSA9IDA7IGkgPD0gYXJyYXkubGVuZ3RoOyBpKyspIHsKICAgIGlmICh2YWx1ZSA9PT0gYXJyYXlbaV0pIHsKICAgICAgYXJyYXkuc3BsaWNlKGksIDEpOwogICAgfQogIH0KfTsKCmV4cG9ydHMuZXNjYXBlUmVnRXhwID0gZnVuY3Rpb24oc3RyKSB7CiAgICByZXR1cm4gc3RyLnJlcGxhY2UoLyhbLiorP14ke30oKXxbXF1cL1xcXSkvZywgJ1xcJDEnKTsKfTsKCmV4cG9ydHMuZXNjYXBlSFRNTCA9IGZ1bmN0aW9uKHN0cikgewogICAgcmV0dXJuICgiIiArIHN0cikucmVwbGFjZSgvJi9nLCAiJiMzODsiKS5yZXBsYWNlKC8iL2csICImIzM0OyIpLnJlcGxhY2UoLycvZywgIiYjMzk7IikucmVwbGFjZSgvPC9nLCAiJiM2MDsiKTsKfTsKCmV4cG9ydHMuZ2V0TWF0Y2hPZmZzZXRzID0gZnVuY3Rpb24oc3RyaW5nLCByZWdFeHApIHsKICAgIHZhciBtYXRjaGVzID0gW107CgogICAgc3RyaW5nLnJlcGxhY2UocmVnRXhwLCBmdW5jdGlvbihzdHIpIHsKICAgICAgICBtYXRjaGVzLnB1c2goewogICAgICAgICAgICBvZmZzZXQ6IGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoLTJdLAogICAgICAgICAgICBsZW5ndGg6IHN0ci5sZW5ndGgKICAgICAgICB9KTsKICAgIH0pOwoKICAgIHJldHVybiBtYXRjaGVzOwp9OwpleHBvcnRzLmRlZmVycmVkQ2FsbCA9IGZ1bmN0aW9uKGZjbikgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICBmY24oKTsKICAgIH07CgogICAgdmFyIGRlZmVycmVkID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIGRlZmVycmVkLmNhbmNlbCgpOwogICAgICAgIHRpbWVyID0gc2V0VGltZW91dChjYWxsYmFjaywgdGltZW91dCB8fCAwKTsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwoKICAgIGRlZmVycmVkLnNjaGVkdWxlID0gZGVmZXJyZWQ7CgogICAgZGVmZXJyZWQuY2FsbCA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKCiAgICBkZWZlcnJlZC5jYW5jZWwgPSBmdW5jdGlvbigpIHsKICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwogICAgCiAgICBkZWZlcnJlZC5pc1BlbmRpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwoKICAgIHJldHVybiBkZWZlcnJlZDsKfTsKCgpleHBvcnRzLmRlbGF5ZWRDYWxsID0gZnVuY3Rpb24oZmNuLCBkZWZhdWx0VGltZW91dCkgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uKCkgewogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICBmY24oKTsKICAgIH07CgogICAgdmFyIF9zZWxmID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIGlmICh0aW1lciA9PSBudWxsKQogICAgICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQgfHwgZGVmYXVsdFRpbWVvdXQpOwogICAgfTsKCiAgICBfc2VsZi5kZWxheSA9IGZ1bmN0aW9uKHRpbWVvdXQpIHsKICAgICAgICB0aW1lciAmJiBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gc2V0VGltZW91dChjYWxsYmFjaywgdGltZW91dCB8fCBkZWZhdWx0VGltZW91dCk7CiAgICB9OwogICAgX3NlbGYuc2NoZWR1bGUgPSBfc2VsZjsKCiAgICBfc2VsZi5jYWxsID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdGhpcy5jYW5jZWwoKTsKICAgICAgICBmY24oKTsKICAgIH07CgogICAgX3NlbGYuY2FuY2VsID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdGltZXIgJiYgY2xlYXJUaW1lb3V0KHRpbWVyKTsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICB9OwoKICAgIF9zZWxmLmlzUGVuZGluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aW1lcjsKICAgIH07CgogICAgcmV0dXJuIF9zZWxmOwp9Owp9KTsKCmFjZS5kZWZpbmUoImFjZS93b3JrZXIvbWlycm9yIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCnZhciBSYW5nZSA9IHJlcXVpcmUoIi4uL3JhbmdlIikuUmFuZ2U7CnZhciBEb2N1bWVudCA9IHJlcXVpcmUoIi4uL2RvY3VtZW50IikuRG9jdW1lbnQ7CnZhciBsYW5nID0gcmVxdWlyZSgiLi4vbGliL2xhbmciKTsKICAgIAp2YXIgTWlycm9yID0gZXhwb3J0cy5NaXJyb3IgPSBmdW5jdGlvbihzZW5kZXIpIHsKICAgIHRoaXMuc2VuZGVyID0gc2VuZGVyOwogICAgdmFyIGRvYyA9IHRoaXMuZG9jID0gbmV3IERvY3VtZW50KCIiKTsKICAgIAogICAgdmFyIGRlZmVycmVkVXBkYXRlID0gdGhpcy5kZWZlcnJlZFVwZGF0ZSA9IGxhbmcuZGVsYXllZENhbGwodGhpcy5vblVwZGF0ZS5iaW5kKHRoaXMpKTsKICAgIAogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHNlbmRlci5vbigiY2hhbmdlIiwgZnVuY3Rpb24oZSkgewogICAgICAgIHZhciBkYXRhID0gZS5kYXRhOwogICAgICAgIGlmIChkYXRhWzBdLnN0YXJ0KSB7CiAgICAgICAgICAgIGRvYy5hcHBseURlbHRhcyhkYXRhKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRhdGEubGVuZ3RoOyBpICs9IDIpIHsKICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGRhdGFbaSsxXSkpIHsKICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IHthY3Rpb246ICJpbnNlcnQiLCBzdGFydDogZGF0YVtpXSwgbGluZXM6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHZhciBkID0ge2FjdGlvbjogInJlbW92ZSIsIHN0YXJ0OiBkYXRhW2ldLCBlbmQ6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkb2MuYXBwbHlEZWx0YShkLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoX3NlbGYuJHRpbWVvdXQpCiAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZFVwZGF0ZS5zY2hlZHVsZShfc2VsZi4kdGltZW91dCk7CiAgICAgICAgX3NlbGYub25VcGRhdGUoKTsKICAgIH0pOwp9OwoKKGZ1bmN0aW9uKCkgewogICAgCiAgICB0aGlzLiR0aW1lb3V0ID0gNTAwOwogICAgCiAgICB0aGlzLnNldFRpbWVvdXQgPSBmdW5jdGlvbih0aW1lb3V0KSB7CiAgICAgICAgdGhpcy4kdGltZW91dCA9IHRpbWVvdXQ7CiAgICB9OwogICAgCiAgICB0aGlzLnNldFZhbHVlID0gZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICB0aGlzLmRvYy5zZXRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgdGhpcy5kZWZlcnJlZFVwZGF0ZS5zY2hlZHVsZSh0aGlzLiR0aW1lb3V0KTsKICAgIH07CiAgICAKICAgIHRoaXMuZ2V0VmFsdWUgPSBmdW5jdGlvbihjYWxsYmFja0lkKSB7CiAgICAgICAgdGhpcy5zZW5kZXIuY2FsbGJhY2sodGhpcy5kb2MuZ2V0VmFsdWUoKSwgY2FsbGJhY2tJZCk7CiAgICB9OwogICAgCiAgICB0aGlzLm9uVXBkYXRlID0gZnVuY3Rpb24oKSB7CiAgICB9OwogICAgCiAgICB0aGlzLmlzUGVuZGluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLmRlZmVycmVkVXBkYXRlLmlzUGVuZGluZygpOwogICAgfTsKICAgIAp9KS5jYWxsKE1pcnJvci5wcm90b3R5cGUpOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvbW9kZS9qc29uL2pzb25fcGFyc2UiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKICAgIHZhciBhdCwgICAgIC8vIFRoZSBpbmRleCBvZiB0aGUgY3VycmVudCBjaGFyYWN0ZXIKICAgICAgICBjaCwgICAgIC8vIFRoZSBjdXJyZW50IGNoYXJhY3RlcgogICAgICAgIGVzY2FwZWUgPSB7CiAgICAgICAgICAgICciJzogICciJywKICAgICAgICAgICAgJ1xcJzogJ1xcJywKICAgICAgICAgICAgJy8nOiAgJy8nLAogICAgICAgICAgICBiOiAgICAnXGInLAogICAgICAgICAgICBmOiAgICAnXGYnLAogICAgICAgICAgICBuOiAgICAnXG4nLAogICAgICAgICAgICByOiAgICAnXHInLAogICAgICAgICAgICB0OiAgICAnXHQnCiAgICAgICAgfSwKICAgICAgICB0ZXh0LAoKICAgICAgICBlcnJvciA9IGZ1bmN0aW9uIChtKSB7CgogICAgICAgICAgICB0aHJvdyB7CiAgICAgICAgICAgICAgICBuYW1lOiAgICAnU3ludGF4RXJyb3InLAogICAgICAgICAgICAgICAgbWVzc2FnZTogbSwKICAgICAgICAgICAgICAgIGF0OiAgICAgIGF0LAogICAgICAgICAgICAgICAgdGV4dDogICAgdGV4dAogICAgICAgICAgICB9OwogICAgICAgIH0sCgogICAgICAgIG5leHQgPSBmdW5jdGlvbiAoYykgewoKICAgICAgICAgICAgaWYgKGMgJiYgYyAhPT0gY2gpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJFeHBlY3RlZCAnIiArIGMgKyAiJyBpbnN0ZWFkIG9mICciICsgY2ggKyAiJyIpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBjaCA9IHRleHQuY2hhckF0KGF0KTsKICAgICAgICAgICAgYXQgKz0gMTsKICAgICAgICAgICAgcmV0dXJuIGNoOwogICAgICAgIH0sCgogICAgICAgIG51bWJlciA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBudW1iZXIsCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJzsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJy0nKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnLSc7CiAgICAgICAgICAgICAgICBuZXh0KCctJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICcuJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9ICcuJzsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkgJiYgY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICdlJyB8fCBjaCA9PT0gJ0UnKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICctJyB8fCBjaCA9PT0gJysnKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBudW1iZXIgPSArc3RyaW5nOwogICAgICAgICAgICBpZiAoaXNOYU4obnVtYmVyKSkgewogICAgICAgICAgICAgICAgZXJyb3IoIkJhZCBudW1iZXIiKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBzdHJpbmcgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgaGV4LAogICAgICAgICAgICAgICAgaSwKICAgICAgICAgICAgICAgIHN0cmluZyA9ICcnLAogICAgICAgICAgICAgICAgdWZmZmY7CgogICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgd2hpbGUgKG5leHQoKSkgewogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJyInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0cmluZzsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFwnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAndScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCA0OyBpICs9IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZXggPSBwYXJzZUludChuZXh0KCksIDE2KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzRmluaXRlKGhleCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gdWZmZmYgKiAxNiArIGhleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKHVmZmZmKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZXNjYXBlZVtjaF0gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gZXNjYXBlZVtjaF07CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT0gIlxuIiB8fCBjaCA9PSAiXHIiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBzdHJpbmciKTsKICAgICAgICB9LAoKICAgICAgICB3aGl0ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHdoaWxlIChjaCAmJiBjaCA8PSAnICcpIHsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIHdvcmQgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgICAgIGNhc2UgJ3QnOgogICAgICAgICAgICAgICAgbmV4dCgndCcpOwogICAgICAgICAgICAgICAgbmV4dCgncicpOwogICAgICAgICAgICAgICAgbmV4dCgndScpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIGNhc2UgJ2YnOgogICAgICAgICAgICAgICAgbmV4dCgnZicpOwogICAgICAgICAgICAgICAgbmV4dCgnYScpOwogICAgICAgICAgICAgICAgbmV4dCgnbCcpOwogICAgICAgICAgICAgICAgbmV4dCgncycpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICBjYXNlICduJzoKICAgICAgICAgICAgICAgIG5leHQoJ24nKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJVbmV4cGVjdGVkICciICsgY2ggKyAiJyIpOwogICAgICAgIH0sCgogICAgICAgIHZhbHVlLCAgLy8gUGxhY2UgaG9sZGVyIGZvciB0aGUgdmFsdWUgZnVuY3Rpb24uCgogICAgICAgIGFycmF5ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGFycmF5ID0gW107CgogICAgICAgICAgICBpZiAoY2ggPT09ICdbJykgewogICAgICAgICAgICAgICAgbmV4dCgnWycpOwogICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnXScpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsgICAvLyBlbXB0eSBhcnJheQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyYXkucHVzaCh2YWx1ZSgpKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFycmF5OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBuZXh0KCcsJyk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiQmFkIGFycmF5Iik7CiAgICAgICAgfSwKCiAgICAgICAgb2JqZWN0ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGtleSwKICAgICAgICAgICAgICAgIG9iamVjdCA9IHt9OwoKICAgICAgICAgICAgaWYgKGNoID09PSAneycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ3snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0OyAgIC8vIGVtcHR5IG9iamVjdAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAga2V5ID0gc3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBuZXh0KCc6Jyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwga2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICBlcnJvcignRHVwbGljYXRlIGtleSAiJyArIGtleSArICciJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG9iamVjdFtrZXldID0gdmFsdWUoKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ30nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBvYmplY3QiKTsKICAgICAgICB9OwoKICAgIHZhbHVlID0gZnVuY3Rpb24gKCkgewoKICAgICAgICB3aGl0ZSgpOwogICAgICAgIHN3aXRjaCAoY2gpIHsKICAgICAgICBjYXNlICd7JzoKICAgICAgICAgICAgcmV0dXJuIG9iamVjdCgpOwogICAgICAgIGNhc2UgJ1snOgogICAgICAgICAgICByZXR1cm4gYXJyYXkoKTsKICAgICAgICBjYXNlICciJzoKICAgICAgICAgICAgcmV0dXJuIHN0cmluZygpOwogICAgICAgIGNhc2UgJy0nOgogICAgICAgICAgICByZXR1cm4gbnVtYmVyKCk7CiAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgcmV0dXJuIGNoID49ICcwJyAmJiBjaCA8PSAnOScgPyBudW1iZXIoKSA6IHdvcmQoKTsKICAgICAgICB9CiAgICB9OwoKICAgIHJldHVybiBmdW5jdGlvbiAoc291cmNlLCByZXZpdmVyKSB7CiAgICAgICAgdmFyIHJlc3VsdDsKCiAgICAgICAgdGV4dCA9IHNvdXJjZTsKICAgICAgICBhdCA9IDA7CiAgICAgICAgY2ggPSAnICc7CiAgICAgICAgcmVzdWx0ID0gdmFsdWUoKTsKICAgICAgICB3aGl0ZSgpOwogICAgICAgIGlmIChjaCkgewogICAgICAgICAgICBlcnJvcigiU3ludGF4IGVycm9yIik7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdHlwZW9mIHJldml2ZXIgPT09ICdmdW5jdGlvbicgPyBmdW5jdGlvbiB3YWxrKGhvbGRlciwga2V5KSB7CiAgICAgICAgICAgIHZhciBrLCB2LCB2YWx1ZSA9IGhvbGRlcltrZXldOwogICAgICAgICAgICBpZiAodmFsdWUgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgZm9yIChrIGluIHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKHZhbHVlLCBrKSkgewogICAgICAgICAgICAgICAgICAgICAgICB2ID0gd2Fsayh2YWx1ZSwgayk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlW2tdID0gdjsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB2YWx1ZVtrXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmV2aXZlci5jYWxsKGhvbGRlciwga2V5LCB2YWx1ZSk7CiAgICAgICAgfSh7Jyc6IHJlc3VsdH0sICcnKSA6IHJlc3VsdDsKICAgIH07Cn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbl93b3JrZXIiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIG9vcCA9IHJlcXVpcmUoIi4uL2xpYi9vb3AiKTsKdmFyIE1pcnJvciA9IHJlcXVpcmUoIi4uL3dvcmtlci9taXJyb3IiKS5NaXJyb3I7CnZhciBwYXJzZSA9IHJlcXVpcmUoIi4vanNvbi9qc29uX3BhcnNlIik7Cgp2YXIgSnNvbldvcmtlciA9IGV4cG9ydHMuSnNvbldvcmtlciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgTWlycm9yLmNhbGwodGhpcywgc2VuZGVyKTsKICAgIHRoaXMuc2V0VGltZW91dCgyMDApOwp9OwoKb29wLmluaGVyaXRzKEpzb25Xb3JrZXIsIE1pcnJvcik7CgooZnVuY3Rpb24oKSB7CgogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB2YWx1ZSA9IHRoaXMuZG9jLmdldFZhbHVlKCk7CiAgICAgICAgdmFyIGVycm9ycyA9IFtdOwogICAgICAgIHRyeSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSkKICAgICAgICAgICAgICAgIHBhcnNlKHZhbHVlKTsKICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIHZhciBwb3MgPSB0aGlzLmRvYy5pbmRleFRvUG9zaXRpb24oZS5hdC0xKTsKICAgICAgICAgICAgZXJyb3JzLnB1c2goewogICAgICAgICAgICAgICAgcm93OiBwb3Mucm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBwb3MuY29sdW1uLAogICAgICAgICAgICAgICAgdGV4dDogZS5tZXNzYWdlLAogICAgICAgICAgICAgICAgdHlwZTogImVycm9yIgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgdGhpcy5zZW5kZXIuZW1pdCgiYW5ub3RhdGUiLCBlcnJvcnMpOwogICAgfTsKCn0pLmNhbGwoSnNvbldvcmtlci5wcm90b3R5cGUpOwoKfSk7Cg=="},7907:function(t,i,e){e.d(i,{m0:function(){return h},cC:function(){return c},Iu:function(){return l}}),i=e(4987);var n={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). \nCtrl+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). \n 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:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',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:"Codigo",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:"Arbol",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 validas",containsInvalidItems:"Contiene items no validos"},"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). \nCtrl+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). \nCtrl+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). \nAlt 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). \nCtrl+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). \nCtrl+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). \nStrg+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)\nили 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) \nCtrl + 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:"잘못된 항목이 포함되어 있습니다"}},r=Object.keys(n),o="en",s="undefined"!=typeof navigator?navigator.language||navigator.userLanguage:void 0,a=r.find((function(t){return t===s}))||o;function h(t){var i;t&&((i=r.find((function(i){return i===t})))?a=i:console.error("Language not found"))}function c(t){if(t)for(var i in t)!function(i){r.find((function(t){return t===i}))||r.push(i),n[i]=Object.assign({},n.en,n[i],t[i])}(i)}function l(t,i,e){var r=n[e=e||a][t]||n.en[t]||t;if(i)for(var o in i)r=r.replace("${"+o+"}",i[o]);return r}},6056:function(t,i,e){e.d(i,{r:function(){return o},J:function(){return s}}),i=e(5156);var n=e.n(i),r=e(9791);function o(t,i){var e=i.sort,n=i.filter,o=i.projection,s="";return n?(i="@"!==n.field?["0"].concat((0,r.parsePath)("."+n.field)):["0"],i="string"==typeof(0,r.get)(t,i)?n.value:(0,r.parseString)(n.value),s+="[? "+n.field+" "+n.relation+" `"+JSON.stringify(i)+"`]"):s+=Array.isArray(t)?"[*]":"@",e&&(s+="desc"===e.direction?" | reverse(sort_by(@, &"+e.field+"))":" | sort_by(@, &"+e.field+")"),o&&("]"!==s[s.length-1]&&(s+=" | [*]"),1===o.fields.length?s+="."+o.fields[0]:1<o.fields.length&&(s+=".{"+o.fields.map((function(t){var i=t.split(".");return i[i.length-1]+": "+t})).join(", ")+"}")),s}function s(t,i){return n().search(t,i)}},4987:function(){function t(t){"remove"in t||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){void 0!==this.parentNode&&this.parentNode.removeChild(this)}})}"undefined"!=typeof Element&&(void 0!==window.Element&&t(window.Element.prototype),void 0!==window.CharacterData&&t(window.CharacterData.prototype),void 0!==window.DocumentType&&t(window.DocumentType.prototype)),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){for(var i=0;i<this.length;i++)if(t.call(this,this[i],i,this))return i;return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){return this[t=this.findIndex(t)]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(t,i,e){e.r(i),e.d(i,{previewModeMixins:function(){return g}}),i=e(8909);var n=e.n(i),r=e(4188),o=e(6436),s=e(2474);var a=function(){function t(i,e,n){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.onChange=i,this.calculateItemSize=e||function(){return 1},this.limit=n,this.items=[],this.index=-1}var i;return(i=[{key:"add",value:function(t){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(t),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var t=this.calculateItemSize,i=0;return this.items.forEach((function(e){i+=t(e)})),i}},{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()}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}(),h=e(7907),c=e(6056),l=e(6617),u=e(6210),d=e(2558),f=(i=e(5956),e(9791));e=i.textModeMixins[0].mixin,(i={create:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};void 0===i.statusBar&&(i.statusBar=!0),i.mainMenuBar=!1!==i.mainMenuBar,i.enableSort=!1!==i.enableSort,i.enableTransform=!1!==i.enableTransform,i.createQuery=i.createQuery||c.r,i.executeQuery=i.executeQuery||c.J,this.indentation="number"==typeof(this.options=i).indentation?Number(i.indentation):2,(0,h.cC)(this.options.languages),(0,h.m0)(this.options.language),this.mode="preview";var e,n=this;this.container=t,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,f.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=t.clientWidth,this.height=t.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(t){t.preventDefault()},this.frameFocusTracker=new s.R(t={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),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),(t=document.createElement("button")).type="button",t.className="jsoneditor-format",t.title=(0,h.Iu)("formatTitle"),this.menu.appendChild(t),t.onclick=function(){n.executeWithBusyMessage((function(){try{n.format()}catch(t){n._onError(t)}}),"formatting...")},(t=document.createElement("button")).type="button",t.className="jsoneditor-compact",t.title=(0,h.Iu)("compactTitle"),this.menu.appendChild(t),t.onclick=function(){n.executeWithBusyMessage((function(){try{n.compact()}catch(t){n._onError(t)}}),"compacting...")},this.options.enableSort&&((t=document.createElement("button")).type="button",t.className="jsoneditor-sort",t.title=(0,h.Iu)("sortTitleShort"),t.onclick=function(){n._showSortModal()},this.menu.appendChild(t)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,h.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){n._showTransformModal()},this.dom.transform=e,this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,h.Iu)("repairTitle"),this.menu.appendChild(e),!(e.onclick=function(){void 0===n.json&&n.executeWithBusyMessage((function(){try{n.repair()}catch(t){n._onError(t)}}),"repairing...")})!==this.options.history&&(this.history=new a((function(){n.dom.undo.disabled=!n.history.canUndo(),n.dom.redo.disabled=!n.history.canRedo()}),(function(t){return 2*t.text.length}),r.oW),(e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,h.Iu)("undo"),e.onclick=function(){var t=n.history.undo();t&&n._applyHistory(t)},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,h.Iu)("redo"),e.onclick=function(){var t=n.history.redo();t&&n._applyHistory(t)},this.menu.appendChild(e),this.dom.redo=e,this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new l.x(this.menu,this.options.modes,this.options.mode,(function(t){n.setMode(t),n.modeSwitcher.focus()})))),this.errorTable=new o.Q({errorTableVisible:!0,onToggleVisibility:function(){n.validate()},onFocusLine:null,onChangeHeight:function(t){n.content.style.marginBottom=-(t=t+(n.dom.statusBar?n.dom.statusBar.clientHeight:0)+1)+"px",n.content.style.paddingBottom=t+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),i.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),i=document.createElement("div"),(this.dom.statusBar=i).className="jsoneditor-statusbar",this.frame.appendChild(i),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",i.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",i.appendChild(this.dom.arrayInfo),i.appendChild(this.errorTable.getErrorCounter()),i.appendChild(this.errorTable.getWarningIcon()),i.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var t=this.getText();this.dom.previewText.nodeValue=(0,f.limitCharacters)(t,r.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,f.formatSize)(t.length)),this.dom.arrayInfo&&(this.dom.arrayInfo.innerText=Array.isArray(this.json)?"Array: "+this.json.length+" items":"")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(t){console.error("Error in onChange callback: ",t)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(t){console.error("Error in onChangeJSON callback: ",t)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(t){console.error("Error in onChangeText callback: ",t)}},_showSortModal:function(){var t=this;this.executeWithBusyMessage((function(){var i=t.options.modalAnchor||r.qD,e=t.get();t._renderPreview(),(0,u.showSortModal)(i,e,(function(i){t.executeWithBusyMessage((function(){var n,r,o;n=e,r=i,Array.isArray(n)&&(o=(0,f.sort)(n,r.path,r.direction),t.sortedBy=r,t._setAndFireOnChange(o)),(0,f.isObject)(n)&&(n=(0,f.sortObjectKeys)(n,r.direction),t.sortedBy=r,t._setAndFireOnChange(n))}),"sorting...")}),t.sortedBy)}),"parsing...")},_showTransformModal:function(){var t=this;this.executeWithBusyMessage((function(){var i=(o=t.options).createQuery,e=o.executeQuery,n=o.modalAnchor,o=o.queryDescription,s=t.get();t._renderPreview(),(0,d.showTransformModal)({container:n||r.qD,json:s,queryDescription:o,createQuery:i,executeQuery:e,onTransform:function(i){t.executeWithBusyMessage((function(){var n=e(s,i);t._setAndFireOnChange(n)}),"transforming...")}})}),"parsing...")},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()},compact:function(){var t=this.get(),i=JSON.stringify(t);this._setTextAndFireOnChange(i,t)},format:function(){var t=this.get(),i=JSON.stringify(t,null,this.indentation);this._setTextAndFireOnChange(i,t)},repair:function(){var t=this.getText();try{var i=n()(t);this._setTextAndFireOnChange(i)}catch(t){}},focus:function(){this.dom.transform.focus()},set:function(t){this.history&&this.history.clear(),this._set(t)},update:function(t){this._set(t)},_set:function(t){this.text=void 0,this.json=t,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},_setAndFireOnChange:function(t){this._set(t),this._onChange()},get:function(){var t;return void 0===this.json&&(t=this.getText(),this.json=(0,f.parse)(t)),this.json},getText:function(){return void 0===this.text&&(this.text=JSON.stringify(this.json,null,this.indentation),!0===this.options.escapeUnicode&&(this.text=(0,f.escapeUnicodeChars)(this.text))),this.text},setText:function(t){this.history&&this.history.clear(),this._setText(t)},updateText:function(t){this.getText()!==t&&this._setText(t)},_setText:function(t,i){var e;this.text=!0===this.options.escapeUnicode?(0,f.escapeUnicodeChars)(t):t,this.json=i,this._renderPreview(),void 0===this.json?(e=this).executeWithBusyMessage((function(){try{e.json=e.get(),e._renderPreview(),e._pushHistory()}catch(t){}}),"parsing..."):this._pushHistory(),this._debouncedValidate()},_setTextAndFireOnChange:function(t,i){this._setText(t,i),this._onChange()},_applyHistory:function(t){this.json=t.json,this.text=t.text,this._renderPreview(),this._debouncedValidate()},_pushHistory:function(){this.history&&this.history.add({text:this.text,json:this.json})},executeWithBusyMessage:function(t,i){var e;this.getText().length>r.EX?((0,f.addClassName)((e=this).frame,"busy"),e.dom.busyContent.innerText=i,setTimeout((function(){t(),(0,f.removeClassName)(e.frame,"busy"),e.dom.busyContent.innerText=""}),100)):t()}}).validate=e.validate,i._renderErrors=e._renderErrors;var g=[{mode:"preview",mixin:i,data:"json"}]},6210:function(t,i,e){e.r(i),e.d(i,{showSortModal:function(){return s}}),i=e(483);var n=e.n(i),r=e(7907),o=e(9791);function s(t,i,e,s){var a=Array.isArray(i)?(0,o.getChildPaths)(i):[""],h=s&&s.path&&(0,o.contains)(a,s.path)?s.path:a[0],c=s&&s.direction||"asc";s='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,r.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,r.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,r.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,r.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,r.Iu)("sortAscending")+'" title="'+(0,r.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,r.Iu)("sortDescending")+'" title="'+(0,r.Iu)("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,r.Iu)("ok")+'" /></td></tr></tbody></table></form></div>',n()({parent:t,content:s,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate((function(t){var i=t.modalElem().querySelector("form"),n=t.modalElem().querySelector("#ok"),r=t.modalElem().querySelector("#field"),o=t.modalElem().querySelector("#direction");function s(t){o.value=t,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}a.forEach((function(t){var i,e=document.createElement("option");e.text=""===(i=t)?"@":"."===i[0]?i.slice(1):i,e.value=t,r.appendChild(e)})),r.value=h||a[0],s(c||"asc"),o.onclick=function(t){s(t.target.getAttribute("data-value"))},n.onclick=function(i){i.preventDefault(),i.stopPropagation(),t.close(),e({path:r.value,direction:o.value})},i&&(i.onsubmit=n.onclick)})).afterClose((function(t){t.destroy()})).show()}},2558:function(t,i,e){e.r(i),e.d(i,{showTransformModal:function(){return u}}),i=e(483);var n=e.n(i),r=(i=e(3879),e.n(i)),o=e(7907);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,i,e,n){return"boolean"==typeof t||t instanceof Boolean||null===t||"number"==typeof t||t instanceof Number||"string"==typeof t||t instanceof String||t instanceof Date?JSON.stringify(t):Array.isArray(t)?function(t,i,e,n){for(var r=i?e+i:void 0,o=i?"[\n":"[",s=0;s<t.length;s++){var h=t[s];if(i&&(o+=r),o+=void 0!==h&&"function"!=typeof h?a(h,i,r,n):"null",s<t.length-1&&(o+=i?",\n":","),o.length>n)return o+"..."}return o+(i?"\n"+e+"]":"]")}(t,i,e,n):t&&"object"===s(t)?function(t,i,e,n){var r,o=i?e+i:void 0,s=!0,h=i?"{\n":"{";if("function"==typeof t.toJSON)return a(t.toJSON(),i,e,n);for(r in t)if(function(t,i){return Object.prototype.hasOwnProperty.call(t,i)}(t,r)&&(s?s=!1:h+=i?",\n":",",h+=i?o+'"'+r+'": ':'"'+r+'":',(h+=a(t[r],i,o,n)).length>n))return h+"...";return h+(i?"\n"+e+"}":"}")}(t,i,e,n):void 0}function h(t,i){for(var e="";0<i--;)e+=t;return e}var c=e(9791),l=e(4188);function u(t){var i=t.container,e=t.json,s=void 0===(s=t.queryDescription)?'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>.':s,u=t.createQuery,d=t.executeQuery,f=t.onTransform,g=e;s='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,o.Iu)("transform")+"</div><p>"+s+'</p><div class="jsoneditor-jmespath-label">'+(0,o.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,o.Iu)("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,o.Iu)("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,o.Iu)("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,o.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,o.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,o.Iu)("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,o.Iu)("ok")+'" autofocus /></div></div>',n()({parent:i,content:s,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate((function(t){var i=t.modalElem(),n=i.querySelector("#wizard"),o=i.querySelector("#ok"),s=i.querySelector("#filterField"),p=i.querySelector("#filterRelation"),m=i.querySelector("#filterValue"),I=i.querySelector("#sortField"),b=i.querySelector("#sortOrder"),C=i.querySelector("#selectFields"),A=i.querySelector("#query"),v=i.querySelector("#preview");Array.isArray(g)||(n.style.fontStyle="italic",n.textContent="(wizard not available for objects, only for arrays)"),(0,c.getChildPaths)(e).forEach((function(t){var i=j(t);(t=document.createElement("option")).text=i,t.value=i,s.appendChild(t),(t=document.createElement("option")).text=i,t.value=i,I.appendChild(t)})),0<(x=(0,c.getChildPaths)(e,!0).filter((function(t){return""!==t}))).length?x.forEach((function(t){var i=j(t);(t=document.createElement("option")).text=i,t.value=i,C.appendChild(t)})):(k=i.querySelector("#selectFieldsPart"))&&(k.style.display="none");var y=new(r())(s,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),w=new(r())(p,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),x=(n=new(r())(I,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),new(r())(b,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."})),k=new(r())(C,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function j(t){return""===t?"@":"."===t[0]?t.slice(1):t}y.on("selectr.change",G),w.on("selectr.change",G),m.oninput=G,n.on("selectr.change",G),x.on("selectr.change",G),k.on("selectr.change",G),i.querySelector(".pico-modal-contents").onclick=function(t){"A"!==t.target.nodeName&&t.preventDefault()};var S=(0,c.debounce)((function(){try{var t=d(g,A.value);v.className="jsoneditor-transform-preview",v.value=(i=t,e=l.WF,"number"==typeof 2&&(n=h(" ",2)),(i=a(i,n,"",e)).length>e?(n=i,("number"==typeof(e=e)?n.slice(0,e):n)+"..."):i),o.disabled=!1}catch(t){v.className="jsoneditor-transform-preview jsoneditor-error",v.value=t.toString(),o.disabled=!0}var i,e,n}),300);function Z(t,i){try{A.value=u(t,i),o.disabled=!1,S()}catch(t){i='Error: an error happened when executing "createQuery": '+(t.message||t.toString()),A.value="",o.disabled=!0,v.className="jsoneditor-transform-preview jsoneditor-error",v.value=i}}function G(){var t={};if(s.value&&p.value&&m.value&&(t.filter={field:s.value,relation:p.value,value:m.value}),I.value&&b.value&&(t.sort={field:I.value,direction:b.value}),C.value){for(var i=[],n=0;n<C.options.length;n++)C.options[n].selected&&i.push(C.options[n].value);t.projection={fields:i}}Z(e,t)}A.oninput=S,o.onclick=function(i){i.preventDefault(),i.stopPropagation(),t.close(),f(A.value)},Z(e,{}),setTimeout((function(){A.select(),A.focus(),A.selectionStart=3,A.selectionEnd=3}))})).afterClose((function(t){t.destroy()})).show()}},5956:function(t,i,e){e.r(i),e.d(i,{textModeMixins:function(){return b}}),i=e(8909);var n=e.n(i),r=(i=e(8170),e.n(i)),o=e(4188),s=e(6436),a=e(2474),h=e(7907),c=e(6056),l=e(6617),u=e(6210),d=e(2558),f=e(9125),g=e(9791);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var m="ace/theme/jsoneditor";function I(){try{this.format()}catch(t){}}(e={}).create=function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};void 0===e.statusBar&&(e.statusBar=!0),e.mainMenuBar=!1!==e.mainMenuBar,e.enableSort=!1!==e.enableSort,e.enableTransform=!1!==e.enableTransform,e.createQuery=e.createQuery||c.r,e.executeQuery=e.executeQuery||c.J,this.indentation="number"==typeof(this.options=e).indentation?Number(e.indentation):2,(0,h.cC)(this.options.languages),(0,h.m0)(this.options.language);var n=e.ace||r();this.mode="code"===e.mode?"code":"text","code"===this.mode&&void 0===n&&(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=e.theme||m,this.theme===m&&n&&(0,f.O)(),e.onTextSelectionChange&&this.onTextSelectionChange(e.onTextSelectionChange);var o,u,d=this;this.container=t,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,g.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=t.clientWidth,this.height=t.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(t){t.preventDefault()},this.frame.onkeydown=function(t){d._onKeyDown(t)},this.frameFocusTracker=new a.R(t={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,g.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(t=document.createElement("button")).type="button",t.className="jsoneditor-format",t.title=(0,h.Iu)("formatTitle"),this.menu.appendChild(t),t.onclick=function(){try{d.format(),d._onChange()}catch(t){d._onError(t)}},(t=document.createElement("button")).type="button",t.className="jsoneditor-compact",t.title=(0,h.Iu)("compactTitle"),this.menu.appendChild(t),t.onclick=function(){try{d.compact(),d._onChange()}catch(t){d._onError(t)}},this.options.enableSort&&((t=document.createElement("button")).type="button",t.className="jsoneditor-sort",t.title=(0,h.Iu)("sortTitleShort"),t.onclick=function(){d._showSortModal()},this.menu.appendChild(t)),this.options.enableTransform&&((o=document.createElement("button")).type="button",o.title=(0,h.Iu)("transformTitleShort"),o.className="jsoneditor-transform",o.onclick=function(){d._showTransformModal()},this.menu.appendChild(o)),(o=document.createElement("button")).type="button",o.className="jsoneditor-repair",o.title=(0,h.Iu)("repairTitle"),this.menu.appendChild(o),o.onclick=function(){try{d.repair(),d._onChange()}catch(t){d._onError(t)}},"code"===this.mode&&((A=document.createElement("button")).type="button",A.className="jsoneditor-undo jsoneditor-separator",A.title=(0,h.Iu)("undo"),A.onclick=function(){i.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,h.Iu)("redo"),A.onclick=function(){i.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(A),this.dom.redo=A),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new l.x(this.menu,this.options.modes,this.options.mode,(function(t){d.setMode(t),d.modeSwitcher.focus()}))),"code"===this.mode&&((u=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),u.href="https://ace.c9.io/",u.target="_blank",u.className="jsoneditor-poweredBy",u.onclick=function(){window.open(u.href,u.target,"noopener")},this.menu.appendChild(u)));var I,b,C,A=this.options.onEditable&&p("function"===this.options.onEditable)&&!this.options.onEditable({});this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"===this.mode?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),n=(b=n.edit(this.editorDom)).getSession(),b.$blockScrolling=1/0,b.setTheme(this.theme),b.setOptions({readOnly:A}),b.setShowPrintMargin(!1),b.setFontSize("13px"),n.setMode("ace/mode/json"),n.setTabSize(this.indentation),n.setUseSoftTabs(!0),n.setUseWrapMode(!0),I=n.setAnnotations,n.setAnnotations=function(t){I.call(this,t&&t.length?t:d.annotations)},b.commands.bindKey("Ctrl-L",null),b.commands.bindKey("Command-L",null),b.commands.bindKey("Ctrl-\\",null),b.commands.bindKey("Command-\\",null),b.commands.bindKey("Ctrl-Shift-\\",null),b.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=b).on("change",this._onChange.bind(this)),b.on("changeSelection",this._onSelect.bind(this))):((C=document.createElement("textarea")).className="jsoneditor-text",C.spellcheck=!1,this.content.appendChild(C),this.textarea=C,this.textarea.readOnly=A,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),C.onselect=this._onSelect.bind(this),C.onmousedown=this._onMouseDown.bind(this),C.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),this.errorTable=new s.Q({errorTableVisible:"text"===this.mode,onToggleVisibility:function(){d._validateAndCatch()},onFocusLine:function(t){d.isFocused=!0,isNaN(t)||d.setTextSelection({row:t,column:1},{row:t,column:1e3})},onChangeHeight:function(t){d.content.style.marginBottom=-(t=t+(d.dom.statusBar?d.dom.statusBar.clientHeight:0)+1)+"px",d.content.style.paddingBottom=t+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),e.statusBar&&((0,g.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},b=document.createElement("div"),(this.dom.statusBar=b).className="jsoneditor-statusbar",this.frame.appendChild(b),(A=document.createElement("span")).className="jsoneditor-curserinfo-label",A.innerText="Ln:",(C=document.createElement("span")).className="jsoneditor-curserinfo-val",C.innerText="1",b.appendChild(A),b.appendChild(C),(e=document.createElement("span")).className="jsoneditor-curserinfo-label",e.innerText="Col:",(A=document.createElement("span")).className="jsoneditor-curserinfo-val",A.innerText="1",b.appendChild(e),b.appendChild(A),this.curserInfoElements.colVal=A,this.curserInfoElements.lnVal=C,(A=document.createElement("span")).className="jsoneditor-curserinfo-label",A.innerText="characters selected",A.style.display="none",(C=document.createElement("span")).className="jsoneditor-curserinfo-count",C.innerText="0",C.style.display="none",this.curserInfoElements.countLabel=A,this.curserInfoElements.countVal=C,b.appendChild(C),b.appendChild(A),b.appendChild(this.errorTable.getErrorCounter()),b.appendChild(this.errorTable.getWarningIcon()),b.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},e._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(t){console.error("Error in onChange callback: ",t)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(t){console.error("Error in onChangeText callback: ",t)}}},e._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())},e._showSortModal=function(){var t=this,i=this.options.modalAnchor||o.qD,e=this.get();(0,u.showSortModal)(i,e,(function(i){var n;Array.isArray(e)&&(n=(0,g.sort)(e,i.path,i.direction),t.sortedBy=i,t.update(n)),(0,g.isObject)(e)&&(n=(0,g.sortObjectKeys)(e,i.direction),t.sortedBy=i,t.update(n))}),t.sortedBy)},e._showTransformModal=function(){var t=this,i=(r=this.options).modalAnchor,e=r.createQuery,n=r.executeQuery,r=r.queryDescription,s=this.get();(0,d.showTransformModal)({container:i||o.qD,json:s,queryDescription:r,createQuery:e,executeQuery:n,onTransform:function(i){i=n(s,i),t.update(i)}})},e._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},e._onKeyDown=function(t){var i=!1;73===(t.which||t.keyCode)&&t.ctrlKey&&(t.shiftKey?this.compact():this.format(),this._onChange(),i=!0),i&&(t.preventDefault(),t.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},e._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},e._onBlur=function(){var t=this;setTimeout((function(){t.isFocused||(t._updateCursorInfo(),t._emitSelectionChange()),t.isFocused=!1}))},e._updateCursorInfo=function(){var t,i,e,n,r,o=this;function s(){o.curserInfoElements.countVal.innerText!==r&&(o.curserInfoElements.countVal.innerText=r,o.curserInfoElements.countVal.style.display=r?"inline":"none",o.curserInfoElements.countLabel.style.display=r?"inline":"none"),o.curserInfoElements.lnVal.innerText=e,o.curserInfoElements.colVal.innerText=n}this.textarea?setTimeout((function(){var t=(0,g.getInputSelection)(o.textarea);t.startIndex!==t.endIndex&&(r=t.endIndex-t.startIndex),n=r&&o.cursorInfo&&o.cursorInfo.line===t.end.row&&o.cursorInfo.column===t.end.column?(e=t.start.row,t.start.column):(e=t.end.row,t.end.column),o.cursorInfo={line:e,column:n,count:r},o.options.statusBar&&s()}),0):this.aceEditor&&this.curserInfoElements&&(t=this.aceEditor.getCursorPosition(),i=this.aceEditor.getSelectedText(),o.cursorInfo={line:e=t.row+1,column:n=t.column+1,count:r=i.length},this.options.statusBar&&s())},e._emitSelectionChange=function(){var t;this._selectionChangedHandler&&(t=this.getTextSelection(),this._selectionChangedHandler(t.start,t.end,t.text))},e._refreshAnnotations=function(){var t,i=this.aceEditor&&this.aceEditor.getSession();i&&(t=i.getAnnotations().filter((function(t){return"error"===t.type})),i.setAnnotations(t))},e.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()},e.compact=function(){var t=this.get();t=JSON.stringify(t),this.updateText(t)},e.format=function(){var t=this.get();t=JSON.stringify(t,null,this.indentation),this.updateText(t)},e.repair=function(){var t=this.getText();try{var i=n()(t);this.updateText(i)}catch(t){}},e.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},e.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},e.set=function(t){this.setText(JSON.stringify(t,null,this.indentation))},e.update=function(t){this.updateText(JSON.stringify(t,null,this.indentation))},e.get=function(){var t=this.getText();return(0,g.parse)(t)},e.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},e._setText=function(t,i){var e,n=this;t=!0===this.options.escapeUnicode?(0,g.escapeUnicodeChars)(t):t,this.textarea&&(this.textarea.value=t),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(t,-1),this.onChangeDisabled=!1,i&&(e=this,setTimeout((function(){e.aceEditor&&e.aceEditor.session.getUndoManager().reset()}))),setTimeout((function(){n._updateHistoryButtons&&n._updateHistoryButtons()}))),this._debouncedValidate()},e.setText=function(t){this._setText(t,!0)},e.updateText=function(t){this.getText()!==t&&this._setText(t,!1)},e.validate=function(){var t,i=this,e=[],n=[];try{var r=this.get();this.validateSchema&&(this.validateSchema(r)||(e=this.validateSchema.errors.map((function(t){return t.type="validation",(0,g.improveSchemaError)(t)})))),this.validationSequence=(this.validationSequence||0)+1;var o=this,s=this.validationSequence;return function(t,i){if(!i)return Promise.resolve([]);try{var e=i(t);return((0,g.isPromise)(e)?e:Promise.resolve(e)).then((function(t){return Array.isArray(t)?t.filter((function(t){var i=(0,g.isValidValidationError)(t);return i||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',t),i})).map((function(t){return{dataPath:(0,g.stringifyPath)(t.path),message:t.message,type:"customValidation"}})):[]}))}catch(t){return Promise.reject(t)}}(r,this.options.onValidate).then((function(t){return s===o.validationSequence&&(t=e.concat(n).concat(t),o._renderErrors(t),"function"==typeof i.options.onValidationError&&(0,g.isValidationErrorChanged)(t,i.lastSchemaErrors)&&i.options.onValidationError.call(i,t),i.lastSchemaErrors=t),i.lastSchemaErrors}))}catch(i){return this.getText()&&((r=/\w*line\s*(\d+)\w*/g.exec(i.message))&&(t=+r[1]),n=[{type:"error",message:i.message.replace(/\n/g,"<br>"),line:t}]),this._renderErrors(n),"function"==typeof this.options.onValidationError&&(0,g.isValidationErrorChanged)(n,this.lastSchemaErrors)&&this.options.onValidationError.call(this,n),this.lastSchemaErrors=n,Promise.resolve(this.lastSchemaErrors)}},e._validateAndCatch=function(){this.validate().catch((function(t){console.error("Error running validation:",t)}))},e._renderErrors=function(t){var i=this.getText(),e=[];t.reduce((function(t,i){return"string"==typeof i.dataPath&&-1===t.indexOf(i.dataPath)&&t.push(i.dataPath),t}),e),e=(0,g.getPositionForPath)(i,e),this.aceEditor&&(this.annotations=e.map((function(i){var e=t.filter((function(t){return t.dataPath===i.path})),n=e.map((function(t){return t.message})).join("\n");return n?{row:i.line,column:i.column,text:"Schema validation error"+(1!==e.length?"s":"")+": \n"+n,type:"warning",source:"jsoneditor"}:{}})),this._refreshAnnotations()),this.errorTable.setErrors(t,e),this.aceEditor&&this.aceEditor.resize(!1)},e.getTextSelection=function(){var t={};if(this.textarea){var i=(0,g.getInputSelection)(this.textarea);return this.cursorInfo&&this.cursorInfo.line===i.end.row&&this.cursorInfo.column===i.end.column?(t.start=i.end,t.end=i.start):t=i,{start:t.start,end:t.end,text:this.textarea.value.substring(i.startIndex,i.endIndex)}}if(this.aceEditor){var e=this.aceEditor.getSelection(),n=this.aceEditor.getSelectedText();return i=e.getRange(),(e=e.getSelectionLead()).row===i.end.row&&e.column===i.end.column?t=i:(t.start=i.end,t.end=i.start),{start:{row:t.start.row+1,column:t.start.column+1},end:{row:t.end.row+1,column:t.end.column+1},text:n}}},e.onTextSelectionChange=function(t){"function"==typeof t&&(this._selectionChangedHandler=(0,g.debounce)(t,this.DEBOUNCE_INTERVAL))},e.setTextSelection=function(t,i){var e,n,r;t&&i&&(this.textarea?(e=(0,g.getIndexForPosition)(this.textarea,t.row,t.column),n=(0,g.getIndexForPosition)(this.textarea,i.row,i.column),-1<e&&-1<n&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(e,n)):this.textarea.createTextRange&&((r=this.textarea.createTextRange()).collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r.select()),r=(this.textarea.value.match(/\n/g)||[]).length+1,r=this.textarea.scrollHeight/r,this.textarea.scrollTop=(r*=t.row)>this.textarea.clientHeight?r-this.textarea.clientHeight/2:0)):this.aceEditor&&(this.aceEditor.selection.setRange(i={start:{row:t.row-1,column:t.column-1},end:{row:i.row-1,column:i.column-1}}),this.aceEditor.scrollToLine(t.row-1,!0)))};var b=[{mode:"text",mixin:e,data:"text",load:I},{mode:"code",mixin:e,data:"text",load:I}]},8038:function(t,i,e){e.r(i),e.d(i,{treeModeMixins:function(){return T}});var n={start:function(t,i){return 0===i.indexOf(t)},contain:function(t,i){return-1<i.indexOf(t)}},r=e(897),o=e(2474);var s=function(){function t(){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.locked=!1}var i;return(i=[{key:"highlight",value:function(t){this.locked||(this.node!==t&&(this.node&&this.node.setHighlight(!1),this.node=t,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var t;this.locked||(t=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout((function(){t.node.setHighlight(!1),t.node=void 0,t.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}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}(),a=e(7907),h=e(6056),c=e(6617),l=(i=e(233),e.n(i)),u=e(2602),d=e(9791),f=e(6210),g=e(2558),p=e(4188);function m(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,r,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(n=e.next()).done)&&(o.push(n.value),!i||o.length!==i);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw r}}return o}}(t,i)||b(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,i){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=b(t))||i&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return{s:i=function(){},n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==e.return||e.return()}finally{if(s)throw r}}}}function b(t,i){if(t){if("string"==typeof t)return C(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(e="Object"===e&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?C(t,i):void 0}}function C(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var v=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=i,this.dom={},this.expanded=!1,e&&e instanceof Object?(this.setField(e.field,e.fieldEditable),"value"in e&&this.setValue(e.value,e.type),"internalValue"in e&&this.setInternalValue(e.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,d.debounce)(this._onChangeValue.bind(this),t.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,d.debounce)(this._onChangeField.bind(this),t.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var i;return(i=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:y}},{key:"_updateEditability",value:function(){var t;this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"!==this.editor.options.mode&&"form"!==this.editor.options.mode||"function"!=typeof this.editor.options.onEditable||("boolean"==typeof(t=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()}))?(this.editable.field=t,this.editable.value=t):"object"===A(t)&&null!==t?("boolean"==typeof t.field&&(this.editable.field=t.field),"boolean"==typeof t.value&&(this.editable.value=t.value)):(console.error("Invalid return value for function onEditable.","Actual value:",t,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var t=this,i=[];t;){var e=t.getName();void 0!==e&&i.unshift(e),t=t.parent}return i}},{key:"getInternalPath",value:function(){for(var t=this,i=[];t;)t.parent&&i.unshift(t.getIndex()),t=t.parent;return i}},{key:"getName",value:function(){return this.parent?"array"!==this.parent.type?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(t){if(t){if(0===t.length)return this;if(t.length&&this.childs&&this.childs.length)for(var i=0;i<this.childs.length;++i)if(""+t[0]==""+this.childs[i].getName())return this.childs[i].findNodeByPath(t.slice(1))}}},{key:"findNodeByInternalPath",value:function(t){if(t){for(var i=this,e=0;e<t.length&&i;e++)i=i.childs[t[e]];return i}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(t){for(var i=(0,d.parsePath)(t),e=this;e&&0<i.length;)!function(){var t=i.shift();if("number"==typeof t){if("array"!==e.type)throw new Error("Cannot get child node at index "+t+": node is no array");e=e.childs[t]}else{if("object"!==e.type)throw new Error("Cannot get child node "+t+": node is no object");e=e.childs.filter((function(i){return i.field===t}))[0]}}();return e}},{key:"findParents",value:function(){for(var t=[],i=this.parent;i;)t.unshift(i),i=i.parent;return t}},{key:"setError",value:function(t,i){this.error=t,this.errorChild=i,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var t=this,i=this.fieldError||this.valueError||this.error,e=this.dom.tdError;if(i&&this.dom&&this.dom.tr){(0,d.addClassName)(this.dom.tr,"jsoneditor-validation-error"),e||(e=document.createElement("td"),this.dom.tdError=e,this.dom.tdValue.parentNode.appendChild(e));var n=document.createElement("button");n.type="button",n.className="jsoneditor-button jsoneditor-schema-error";var r=function(){t.dom.popupAnchor&&t.dom.popupAnchor.destroy()},o=function(){delete t.dom.popupAnchor},s=function(e){var r=t.editor.frame;t.dom.popupAnchor=(0,u.w)(n,t.editor.getPopupAnchor(),o,e),e=n.getBoundingClientRect(),r=120<r.getBoundingClientRect().width-e.x?"jsoneditor-above":"jsoneditor-left",(e=document.createElement("div")).className="jsoneditor-popover "+r,e.appendChild(document.createTextNode(i.message)),t.dom.popupAnchor.appendChild(e)};n.onmouseover=function(){t.dom.popupAnchor||s(!0)},n.onfocus=function(){r(),s(!1)},n.onblur=function(){r()};var a=this.errorChild;for(a&&(n.onclick=function(){a.findParents().forEach((function(t){t.expand(!1)})),a.scrollTo((function(){a.focus()}))});e.firstChild;)e.removeChild(e.firstChild);e.appendChild(n)}else this.dom.tr&&(0,d.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),e&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){if(this.parent){var t=this.parent.childs.indexOf(this);return-1!==t?t:null}return-1}},{key:"setParent",value:function(t){this.parent=t}},{key:"setField",value:function(t,i){this.field=t,this.previousField=t,this.fieldEditable=!0===i}},{key:"getField",value:function(){return void 0===this.field&&this._getDomField(),this.field}},{key:"setValue",value:function(i,e){var n,r,o,s,a,h,c=this.childs;if(this.type=this._getType(i),e&&e!==this.type){if("string"!==e||"auto"!==this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+e+'"');this.type=e}if("array"===this.type){for(this.childs||(this.childs=[]),n=0;n<i.length;n++)void 0===(a=i[n])||a instanceof Function||(n<this.childs.length?((o=this.childs[n]).fieldEditable=!1,o.index=n,o.setValue(a)):(o=new t(this.editor,{value:a}),s=n<this.getMaxVisibleChilds(),this.appendChild(o,s,!1)));for(r=this.childs.length;r>=i.length;r--)this.removeChild(this.childs[r],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),r=this.childs.length-1;0<=r;r--)k(i,this.childs[r].field)||this.removeChild(this.childs[r],!1);for(var l in n=0,i)k(i,l)&&(void 0===(a=i[l])||a instanceof Function||((h=this.findChildByProperty(l))?(h.setField(l,!0),h.setValue(a)):(h=new t(this.editor,{field:l,value:a}),l=n<this.getMaxVisibleChilds(),this.appendChild(h,l,!1))),n++);!(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=i;Array.isArray(c)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(i){var e,n,r,o,s,a=this.childs;if(this.type=i.type,"array"===i.type){for(this.childs||(this.childs=[]),o=0;o<i.childs.length;o++)void 0===(e=i.childs[o])||e instanceof Function||(o<this.childs.length?((n=this.childs[o]).fieldEditable=!1,n.index=o,n.setInternalValue(e)):(n=new t(this.editor,{internalValue:e}),r=o<this.getMaxVisibleChilds(),this.appendChild(n,r,!1)));for(s=this.childs.length;s>=i.childs.length;s--)this.removeChild(this.childs[s],!1)}else if("object"===i.type){for(this.childs||(this.childs=[]),o=0;o<i.childs.length;o++)void 0===(e=i.childs[o])||e instanceof Function||(o<this.childs.length?(delete(n=this.childs[o]).index,n.setField(e.field,!0),n.setInternalValue(e.value)):(n=new t(this.editor,{field:e.field,internalValue:e.value}),r=o<this.getMaxVisibleChilds(),this.appendChild(n,r,!1)));for(s=this.childs.length;s>=i.childs.length;s--)this.removeChild(this.childs[s],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=i.value;Array.isArray(a)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var t;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(t=this._detachFromDom(),this.clearDom(),this._attachToDom(t)):this.clearDom()}},{key:"getValue",value:function(){if("array"===this.type){var t=[];return this.childs.forEach((function(i){t.push(i.getValue())})),t}if("object"!==this.type)return void 0===this.value&&this._getDomValue(),this.value;var i={};return this.childs.forEach((function(t){i[t.getField()]=t.getValue()})),i}},{key:"getInternalValue",value:function(){return"array"===this.type?{type:this.type,childs:this.childs.map((function(t){return t.getInternalValue()}))}:"object"===this.type?{type:this.type,childs:this.childs.map((function(t){return{field:t.getField(),value:t.getInternalValue()}}))}:(void 0===this.value&&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 t=this.parent?this.parent.getNodePath():[];return t.push(this),t}},{key:"clone",value:function(){var i,e;return(i=new t(this.editor)).type=this.type,i.field=this.field,i.fieldInnerText=this.fieldInnerText,i.fieldEditable=this.fieldEditable,i.previousField=this.previousField,i.value=this.value,i.valueInnerText=this.valueInnerText,i.previousValue=this.previousValue,i.expanded=this.expanded,i.visibleChilds=this.visibleChilds,this.childs?(e=[],this.childs.forEach((function(t){(t=t.clone()).setParent(i),e.push(t)})),i.childs=e):i.childs=void 0,i}},{key:"expand",value:function(t){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==t&&this.childs.forEach((function(i){i.expand(t)})),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(t){this.childs&&(this.hideChilds(),!1!==t&&this.childs.forEach((function(i){i.collapse(t)})),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var t=this.childs;if(t&&this.expanded){var i=this.dom.tr,e=i?i.parentNode:void 0;if(e){(t=this.getAppendDom()).parentNode||((r=i.nextSibling)?e.insertBefore(t,r):e.appendChild(t));for(var n=Math.min(this.childs.length,this.visibleChilds),r=this._getNextTr(),o=0;o<n;o++){var s=this.childs[o];s.getDom().parentNode||e.insertBefore(s.getDom(),r),s.showChilds()}t=this.getShowMoreDom(),r=this._getNextTr(),t.parentNode||e.insertBefore(t,r),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(t){var i=this.dom.tr,e=i?i.parentNode:void 0;e&&e.removeChild(i),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(t)}},{key:"hideChilds",value:function(t){var i;this.childs&&this.expanded&&((i=this.getAppendDom()).parentNode&&i.parentNode.removeChild(i),this.childs.forEach((function(t){t.hide()})),(i=this.getShowMoreDom()).parentNode&&i.parentNode.removeChild(i),t&&!t.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var t;this.dom.field&&this.editor&&this.editor.options&&"function"==typeof this.editor.options.onClassName&&this.dom.tree&&((0,d.removeAllClassNames)(this.dom.tree),t=this.editor.options.onClassName({path:this.getPath(),field:this.field,value:this.value})||"",(0,d.addClassName)(this.dom.tree,"jsoneditor-values "+t))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var t=0;t<this.childs.length;t++)this.childs[t].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var t=this.parent;t;)t.expanded||t.expand(),t=t.parent}},{key:"appendChild",value:function(t,i,e){var n,r;this._hasChilds()&&(t.setParent(this),t.fieldEditable="object"===this.type,"array"===this.type&&(t.index=this.childs.length),"object"===this.type&&void 0===t.field&&t.setField(""),this.childs.push(t),this.expanded&&!1!==i&&(n=t.getDom(),i=(r=this._getNextTr())?r.parentNode:void 0,r&&i&&i.insertBefore(n,r),t.showChilds(),this.visibleChilds++),!1!==e&&(this.updateDom({updateIndexes:!0}),t.updateDom({recurse:!0})))}},{key:"moveBefore",value:function(t,i,e){var n,r;this._hasChilds()&&((n=this.dom.tr?this.dom.tr.parentNode:void 0)&&((r=document.createElement("tr")).style.height=n.clientHeight+"px",n.appendChild(r)),t.parent&&t.parent.removeChild(t),i instanceof j||!i?this.childs.length+1>this.visibleChilds?this.insertBefore(t,this.childs[this.visibleChilds-1],e):this.appendChild(t,!0,e):this.insertBefore(t,i,e),n&&r&&n.removeChild(r))}},{key:"insertBefore",value:function(t,i,e){if(this._hasChilds()){if(this.visibleChilds++,"object"===this.type&&void 0===t.field&&t.setField(""),i===this.append)t.setParent(this),t.fieldEditable="object"===this.type,this.childs.push(t);else{var n=this.childs.indexOf(i);if(-1===n)throw new Error("Node not found");t.setParent(this),t.fieldEditable="object"===this.type,this.childs.splice(n,0,t)}var r;this.expanded&&(r=t.getDom(),i=(n=i.getDom())?n.parentNode:void 0,n&&i&&i.insertBefore(r,n),t.showChilds(),this.showChilds()),!1!==e&&(this.updateDom({updateIndexes:!0}),t.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(t,i){this._hasChilds()&&(i=this.childs.indexOf(i),(i=this.childs[i+1])?this.insertBefore(t,i):this.appendChild(t))}},{key:"search",value:function(t,i){Array.isArray(i)||(i=[]);var e=t?t.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,void 0!==this.field&&i.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(e)&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach((function(e){e.search(t,i)})):void 0!==this.value&&i.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(e)&&(this.searchValue=!0,i.push({node:this,elem:"value"})),this._updateDomValue()),i}},{key:"scrollTo",value:function(t){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,t)}},{key:"expandPathToNode",value:function(){for(var t=this;t&&t.parent;){for(var i="array"===t.parent.type?t.index:t.parent.childs.indexOf(t);t.parent.visibleChilds<i+1;)t.parent.visibleChilds+=this.getMaxVisibleChilds();t.parent.expand(!1),t=t.parent}}},{key:"focus",value:function(i){if(t.focusElement=i,this.dom.tr&&this.dom.tr.parentNode){var e=this.dom;switch(i){case"drag":(e.drag||e.menu).focus();break;case"menu":e.menu.focus();break;case"expand":this._hasChilds()?e.expand.focus():e.field&&this.fieldEditable?(e.field.focus(),(0,d.selectContentEditable)(e.field)):e.value&&!this._hasChilds()?(e.value.focus(),(0,d.selectContentEditable)(e.value)):e.menu.focus();break;case"field":e.field&&this.fieldEditable?(e.field.focus(),(0,d.selectContentEditable)(e.field)):e.value&&!this._hasChilds()?(e.value.focus(),(0,d.selectContentEditable)(e.value)):(this._hasChilds()?e.expand:e.menu).focus();break;default:e.select?e.select.focus():e.value&&!this._hasChilds()?(e.value.focus(),(0,d.selectContentEditable)(e.value)):e.field&&this.fieldEditable?(e.field.focus(),(0,d.selectContentEditable)(e.field)):(this._hasChilds()?e.expand:e.menu).focus()}}}},{key:"containsNode",value:function(t){if(this===t)return!0;var i=this.childs;if(i)for(var e=0,n=i.length;e<n;e++)if(i[e].containsNode(t))return!0;return!1}},{key:"removeChild",value:function(t,i){if(this.childs){var e=this.childs.indexOf(t);if(-1!==e)return e<this.visibleChilds&&this.expanded&&this.visibleChilds--,t.hide(),delete t.searchField,delete t.searchValue,(e=this.childs.splice(e,1)[0]).parent=null,!1!==i&&this.updateDom({updateIndexes:!0}),e}}},{key:"_remove",value:function(t){this.removeChild(t)}},{key:"changeType",value:function(t){var i,e=this.type;e!==t&&("string"!==t&&"auto"!==t||"string"!==e&&"auto"!==e?(i=this._detachFromDom(),this.clearDom(),"object"===(this.type=t)?(this.childs||(this.childs=[]),this.childs.forEach((function(t){t.clearDom(),delete t.index,t.fieldEditable=!0,void 0===t.field&&(t.field="")})),"string"!==e&&"auto"!==e||(this.expanded=!0)):"array"===t?(this.childs||(this.childs=[]),this.childs.forEach((function(t,i){t.clearDom(),t.fieldEditable=!1,t.index=i})),"string"!==e&&"auto"!==e||(this.expanded=!0)):this.expanded=!1,this._attachToDom(i)):this.type=t,"auto"!==t&&"string"!==t||(this.value="string"===t?String(this.value):(0,d.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(t){var i;if("array"===this.type){if(!Array.isArray(t))return!1;if(this.childs.length!==t.length)return!1;for(i=0;i<this.childs.length;i++)if(!this.childs[i].deepEqual(t[i]))return!1}else if("object"===this.type){if("object"!==A(t)||!t)return!1;var e=Object.keys(t);if(this.childs.length!==e.length)return!1;for(i=0;i<e.length;i++){var n=this.childs[i];if(n.field!==e[i]||!n.deepEqual(t[n.field]))return!1}}else if(this.value!==t)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&"array"!==this.type&&"object"!==this.type&&(this.valueInnerText=(0,d.getInnerText)(this.dom.value),""===this.valueInnerText&&""!==this.dom.value.innerHTML&&(this.dom.value.textContent="")),void 0!==this.valueInnerText)try{var t,i;(i="string"===this.type?this._unescapeHTML(this.valueInnerText):(t=this._unescapeHTML(this.valueInnerText),(0,d.parseString)(t)))!==this.value&&(this.value=i,this._debouncedOnChangeValue())}catch(t){this._setValueError((0,a.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(t){this.valueError={message:t},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(t){this.fieldError={message:t},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var t=this.editor.getDomSelection();t.range&&(i=(0,d.textDiff)(String(this.value),String(this.previousValue)),t.range.startOffset=i.start,t.range.endOffset=i.end);var i,e=this.editor.getDomSelection();e.range&&(i=(0,d.textDiff)(String(this.previousValue),String(this.value)),e.range.startOffset=i.start,e.range.endOffset=i.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:t,newSelection:e}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var t=this.editor.getDomSelection(),i=this.previousField||"";t.range&&(e=(0,d.textDiff)(this.field,i),t.range.startOffset=e.start,t.range.endOffset=e.end);var e=this.editor.getDomSelection();e.range&&(i=(0,d.textDiff)(i,this.field),e.range.startOffset=i.start,e.range.endOffset=i.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:t,newSelection:e}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var t=this.dom.value;if(t){var i=["jsoneditor-value"],e=this.value,n="auto"===this.type?(0,d.getType)(e):this.type,r="string"===n&&(0,d.isUrl)(e);if(i.push("jsoneditor-"+n),r&&i.push("jsoneditor-url"),""===String(this.value)&&"array"!==this.type&&"object"!==this.type&&i.push("jsoneditor-empty"),this.searchValueActive&&i.push("jsoneditor-highlight-active"),this.searchValue&&i.push("jsoneditor-highlight"),t.className=i.join(" "),t.title="array"===n||"object"===n?this.type+" containing "+(i=this.childs?this.childs.length:0)+" items":r&&this.editable.value?(0,a.Iu)("openUrl"):"","boolean"===n&&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){if(!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;var o=document.createElement("option");o.value="",o.textContent="--",this.dom.select.appendChild(o);for(var s=0;s<this.enum.length;s++){var h=document.createElement("option");h.value=this.enum[s],h.textContent=this.enum[s],this.dom.select.appendChild(h)}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=-1!==this.enum.indexOf(this.value)?this.value:"",!this.schema||k(this.schema,"oneOf")||k(this.schema,"anyOf")||k(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")}else 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);if(this.editable.value&&this.editor.options.colorPicker&&"string"==typeof e&&(0,d.isValidColor)(e)?(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,d.addClassName)(this.dom.value,"jsoneditor-color-value"),this.dom.color.style.backgroundColor=e):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)),o=null,o="function"==typeof this.editor.options.timestampFormat?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):o){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(o))}else this.dom.date.textContent=new Date(e).toISOString();this.dom.date.title=new Date(e).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,d.stripFormatting)(t),this._updateDomDefault()}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,d.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var t,i=this.dom.field;i&&((t=(0,d.makeFieldTooltip)(this.schema,this.editor.options.language))&&(i.title=t),(""===String(this.field)&&this.parent&&"array"!==this.parent.type?d.addClassName:d.removeClassName)(i,"jsoneditor-empty"),(this.searchFieldActive?d.addClassName:d.removeClassName)(i,"jsoneditor-highlight-active"),(this.searchField?d.addClassName:d.removeClassName)(i,"jsoneditor-highlight"),(0,d.stripFormatting)(i))}},{key:"_getDomField",value:function(t){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,d.getInnerText)(this.dom.field),""===this.fieldInnerText&&""!==this.dom.field.innerHTML&&(this.dom.field.textContent="")),void 0!==this.fieldInnerText)try{var i=this._unescapeHTML(this.fieldInnerText),e=this.parent.getFieldNames(this);-1!==e.indexOf(i)?t?(i=(0,d.findUniqueName)(i,e))!==this.field&&(this.field=i,this._debouncedOnChangeField()):this._setFieldError((0,a.Iu)("duplicateFieldError")):i!==this.field&&(this.field=i,this._debouncedOnChangeField())}catch(t){this._setFieldError((0,a.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var t;!this.schema||void 0===this.schema.default||this._hasChilds()||(t=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(t.title=(0,a.Iu)("default"),(0,d.addClassName)(t,"jsoneditor-is-default"),(0,d.removeClassName)(t,"jsoneditor-is-not-default")):(t.removeAttribute("title"),(0,d.removeClassName)(t,"jsoneditor-is-default"),(0,d.addClassName)(t,"jsoneditor-is-not-default")))}},{key:"_showTimestampTag",value:function(){if("number"!=typeof this.value)return!1;var t=this.editor.options.timestampTag;return"function"!=typeof t?!0===t&&(0,d.isTimestamp)(this.field,this.value):"boolean"==typeof(t=t({field:this.field,value:this.value,path:this.getPath()}))?t:(0,d.isTimestamp)(this.field,this.value)}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var t,i=this.dom;if(i.tr)return i.tr;this._updateEditability(),i.tr=document.createElement("tr"),"tree"===(i.tr.node=this).editor.options.mode&&(t=document.createElement("td"),this.editable.field&&this.parent&&((e=document.createElement("button")).type="button",(i.drag=e).className="jsoneditor-button jsoneditor-dragarea",e.title=(0,a.Iu)("drag"),t.appendChild(e)),i.tr.appendChild(t),e=document.createElement("td"),(t=document.createElement("button")).type="button",(i.menu=t).className="jsoneditor-button jsoneditor-contextmenu-button",t.title=(0,a.Iu)("actionsMenu"),e.appendChild(i.menu),i.tr.appendChild(e));var e=document.createElement("td");return i.tr.appendChild(e),i.tree=this._createDomTree(),e.appendChild(i.tree),this.updateDom({updateIndexes:!0}),i.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(t){for(var i=this.parent;i;){if(i===t)return!0;i=i.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(t){this.dom.tr&&((t?d.addClassName:d.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(t),this.childs&&this.childs.forEach((function(i){i.setHighlight(t)})))}},{key:"setSelected",value:function(t,i){this.selected=t,this.dom.tr&&((t?d.addClassName:d.removeClassName)(this.dom.tr,"jsoneditor-selected"),(i?d.addClassName:d.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(t),this.showMore&&this.showMore.setSelected(t),this.childs&&this.childs.forEach((function(i){i.setSelected(t)})))}},{key:"updateValue",value:function(t){this.value=t,this.previousValue=t,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(t){this.field=t,this.previousField=t,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(i){var e=this.dom.tree;e&&(e.style.marginLeft=24*this.getLevel()+"px"),(e=this.dom.field)&&(this.fieldEditable?(e.contentEditable=this.editable.field,e.spellcheck=!1,e.className="jsoneditor-field"):(e.contentEditable=!1,e.className="jsoneditor-readonly"),n=void 0!==this.index?this.index:void 0!==this.field?this.field:(n=this.editor.options.schema?t._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&n.title?n.title:this._hasChilds()?this.type:"",n=this._escapeHTML(n),document.activeElement!==e&&n!==this._unescapeHTML((0,d.getInnerText)(e))&&(e.innerHTML=n),this._updateSchema());var n=this.dom.value;n&&("array"===this.type||"object"===this.type?this.updateNodeName():(r=this._escapeHTML(this.value),document.activeElement!==n&&r!==this._unescapeHTML((0,d.getInnerText)(n))&&(n.innerHTML=r)));var r=this.dom.tr;r&&("array"===this.type||"object"===this.type?((0,d.addClassName)(r,"jsoneditor-expandable"),this.expanded?((0,d.addClassName)(r,"jsoneditor-expanded"),(0,d.removeClassName)(r,"jsoneditor-collapsed")):((0,d.addClassName)(r,"jsoneditor-collapsed"),(0,d.removeClassName)(r,"jsoneditor-expanded"))):((0,d.removeClassName)(r,"jsoneditor-expandable"),(0,d.removeClassName)(r,"jsoneditor-expanded"),(0,d.removeClassName)(r,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),i&&!0===i.updateIndexes&&this._updateDomIndexes(),i&&!0===i.recurse&&this.childs&&this.childs.forEach((function(t){t.updateDom(i)})),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 t=this.childs;this.dom.value&&t&&("array"===this.type?t.forEach((function(t,i){t.index=i,(t=t.dom.field)&&(t.textContent=i)})):"object"===this.type&&t.forEach((function(t){void 0!==t.index&&(delete t.index,void 0===t.field&&(t.field=""))})))}},{key:"_createDomValue",value:function(){var t;return"array"===this.type?(t=document.createElement("div")).textContent="[...]":"object"===this.type?(t=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,d.isUrl)(this.value)?(t=document.createElement("a")).href=this.value:((t=document.createElement("div")).contentEditable=this.editable.value,t.spellcheck=!1),t.innerHTML=this._escapeHTML(this.value)),t}},{key:"_createDomExpandButton",value:function(){var t=document.createElement("button");return t.type="button",this._hasChilds()?(t.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",t.title=(0,a.Iu)("expandTitle")):(t.className="jsoneditor-button jsoneditor-invisible",t.title=""),t}},{key:"_createDomTree",value:function(){var t=this.dom,i=document.createElement("table"),e=document.createElement("tbody");i.style.borderCollapse="collapse",i.className="jsoneditor-values",i.appendChild(e);var n=document.createElement("tr");return e.appendChild(n),(e=document.createElement("td")).className="jsoneditor-tree",n.appendChild(e),t.expand=this._createDomExpandButton(),e.appendChild(t.expand),t.tdExpand=e,(e=document.createElement("td")).className="jsoneditor-tree",n.appendChild(e),t.field=this._createDomField(),e.appendChild(t.field),t.tdField=e,(e=document.createElement("td")).className="jsoneditor-tree",n.appendChild(e),"object"!==this.type&&"array"!==this.type&&(e.appendChild(document.createTextNode(":")),e.className="jsoneditor-separator"),t.tdSeparator=e,(e=document.createElement("td")).className="jsoneditor-tree",n.appendChild(e),t.value=this._createDomValue(),e.appendChild(t.value),t.tdValue=e,i}},{key:"onEvent",value:function(t){var i,e=t.type,n=t.target||t.srcElement,r=this.dom,o=this,s=this._hasChilds();n!==r.drag&&n!==r.menu||("mouseover"===e?this.editor.highlighter.highlight(this):"mouseout"===e&&this.editor.highlighter.unhighlight()),"click"===e&&n===r.menu&&((i=o.editor.highlighter).highlight(o),i.lock(),(0,d.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,(function(){(0,d.removeClassName)(r.menu,"jsoneditor-selected"),i.unlock(),i.unhighlight()}))),"click"===e&&n===r.expand&&s&&this._onExpand(u=t.ctrlKey),"click"!==e||t.target!==o.dom.tdColor&&t.target!==o.dom.color||this._showColorPicker(),"change"===e&&n===r.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),"change"===e&&n===r.select&&(this.dom.value.innerHTML=this._escapeHTML(r.select.value),this._getDomValue(),this._updateDomValue());var a=r.value;if(n===a)switch(e){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var h=this._escapeHTML(this.value);h!==this._unescapeHTML((0,d.getInnerText)(a))&&(a.innerHTML=h);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":t.ctrlKey&&this.editable.value&&(0,d.isUrl)(this.value)&&(t.preventDefault(),window.open(this.value,"_blank","noopener"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout((function(){o._getDomValue(),o._updateDomValue()}),1)}var c=r.field;if(n===c)switch(e){case"blur":this._getDomField(!0),this._updateDomField();var l=this._escapeHTML(this.field);l!==this._unescapeHTML((0,d.getInnerText)(c))&&(c.innerHTML=l);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(){o._getDomField(),o._updateDomField()}),1)}var u=r.tree;u&&n===u.parentNode&&"click"===e&&!t.hasMoved&&((void 0!==t.offsetX?t.offsetX<24*(this.getLevel()+1):t.pageX<(0,d.getAbsoluteLeft)(r.tdSeparator))||s?c&&((0,d.setEndOfContentEditable)(c),c.focus()):a&&!this.enum&&((0,d.setEndOfContentEditable)(a),a.focus())),(n!==r.tdExpand||s)&&n!==r.tdField&&n!==r.tdSeparator||"click"!==e||t.hasMoved||c&&((0,d.setEndOfContentEditable)(c),c.focus()),"keydown"===e&&this.onKeyDown(t),"function"==typeof this.editor.options.onEvent&&this._onEvent(t)}},{key:"_onEvent",value:function(t){var i=(e=t.target)===this.dom.field,e=e===this.dom.value||e===this.dom.checkbox||e===this.dom.select;(i||e)&&(i={field:this.getField(),path:this.getPath()},e&&!this._hasChilds()&&(i.value=this.getValue()),this.editor.options.onEvent(i,t))}},{key:"onKeyDown",value:function(i){var e,n,r,o,s,a,h,c,l,u,f,g,p,m,I,b,C,A=i.which||i.keyCode,v=i.target||i.srcElement,y=i.ctrlKey,w=i.shiftKey,k=i.altKey,S=!1,Z="tree"===this.editor.options.mode,G=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],B=G[0],V=G[G.length-1];13===A?v===this.dom.value?this.editable.value&&!i.ctrlKey||(0,d.isUrl)(this.value)&&(window.open(this.value,"_blank","noopener"),S=!0):v===this.dom.expand&&this._hasChilds()&&(this._onExpand(f=i.ctrlKey),v.focus(),S=!0):68===A?y&&Z&&(t.onDuplicate(G),S=!0):69===A?y&&(this._onExpand(w),v.focus(),S=!0):77===A&&Z?y&&(this.showContextMenu(v),S=!0):46===A&&Z?y&&(t.onRemove(G),S=!0):45===A&&Z?y&&!w?(this._onInsertBefore(),S=!0):y&&w&&(this._onInsertAfter(),S=!0):35===A?k&&((f=this._lastNode())&&f.focus(t.focusElement||this._getElementName(v)),S=!0):36===A?k&&((g=this._firstNode())&&g.focus(t.focusElement||this._getElementName(v)),S=!0):37===A?k&&!w?((g=this._previousElement(v))&&this.focus(this._getElementName(g)),S=!0):k&&w&&Z&&(m=V.expanded?(m=V.getAppendDom())?m.nextSibling:void 0:V.getDom().nextSibling)&&(p=t.getNodeFromTarget(m),I=t.getNodeFromTarget(m=m.nextSibling),p&&p instanceof j&&1!==V.parent.childs.length&&I&&I.parent&&(n=this.editor.getDomSelection(),r=(o=B.parent).childs[V.getIndex()+1]||o.append,s=B.getIndex(),a=I.getIndex(),h=o.getInternalPath(),c=I.parent.getInternalPath(),G.forEach((function(t){I.parent.moveBefore(t,I)})),this.focus(t.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:G.length,fieldNames:G.map(x),oldParentPath:o.getInternalPath(),newParentPath:B.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:B.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:h,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()}))):38===A?k&&!w?((e=this._previousNode())&&(this.editor.deselect(!0),e.focus(t.focusElement||this._getElementName(v))),S=!0):!k&&y&&w&&Z?((e=this._previousNode())&&((u=this.editor.multiselection).start=u.start||this,u.end=e,l=this.editor._findTopLevelNodes(u.start,u.end),this.editor.select(l),e.focus("field")),S=!0):k&&w&&Z&&((e=B._previousNode())&&e.parent&&(n=this.editor.getDomSelection(),r=(o=B.parent).childs[V.getIndex()+1]||o.append,s=B.getIndex(),a=e.getIndex(),h=o.getInternalPath(),c=e.parent.getInternalPath(),G.forEach((function(t){e.parent.moveBefore(t,e)})),this.focus(t.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:G.length,fieldNames:G.map(x),oldParentPath:o.getInternalPath(),newParentPath:B.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:B.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:h,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()})),S=!0):39===A?k&&!w?((b=this._nextElement(v))&&this.focus(this._getElementName(b)),S=!0):k&&w&&Z&&(b=B.getDom().previousSibling)&&(e=t.getNodeFromTarget(b))&&e.parent&&!e.isVisible()&&(n=this.editor.getDomSelection(),r=(o=B.parent).childs[V.getIndex()+1]||o.append,s=B.getIndex(),a=e.getIndex(),h=o.getInternalPath(),c=e.parent.getInternalPath(),G.forEach((function(t){e.parent.moveBefore(t,e)})),this.focus(t.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:G.length,fieldNames:G.map(x),oldParentPath:o.getInternalPath(),newParentPath:B.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:B.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:h,newParentPathRedo:c,oldSelection:n,newSelection:this.editor.getDomSelection()})):40===A&&(k&&!w?((p=this._nextNode())&&(this.editor.deselect(!0),p.focus(t.focusElement||this._getElementName(v))),S=!0):!k&&y&&w&&Z?((p=this._nextNode())&&((u=this.editor.multiselection).start=u.start||this,u.end=p,l=this.editor._findTopLevelNodes(u.start,u.end),this.editor.select(l),p.focus("field")),S=!0):k&&w&&Z&&((C=(p=(p=(p=V.expanded?V.append?V.append._nextNode():void 0:V._nextNode())&&!p.isVisible()?p.parent.showMore:p)&&p instanceof j?V:p)&&(p._nextNode()||p.parent.append))&&C.parent&&(n=this.editor.getDomSelection(),r=(o=B.parent).childs[V.getIndex()+1]||o.append,s=B.getIndex(),a=C.getIndex(),h=o.getInternalPath(),c=C.parent.getInternalPath(),G.forEach((function(t){C.parent.moveBefore(t,C)})),this.focus(t.focusElement||this._getElementName(v)),this.editor._onAction("moveNodes",{count:G.length,fieldNames:G.map(x),oldParentPath:o.getInternalPath(),newParentPath:B.parent.getInternalPath(),oldParentPathRedo:h,newParentPathRedo:c,oldIndexRedo:s,newIndexRedo:a,oldIndex:r.getIndex(),newIndex:B.getIndex(),oldSelection:n,newSelection:this.editor.getDomSelection()})),S=!0)),S&&(i.preventDefault(),i.stopPropagation())}},{key:"_onExpand",value:function(t){var i,e,n;t&&(n=(e=(i=this.dom.tr.parentNode).parentNode).scrollTop,e.removeChild(i)),this.expanded?this.collapse(t):this.expand(t),t&&(e.appendChild(i),e.scrollTop=n)}},{key:"_showColorPicker",value:function(){var t,i;"function"==typeof this.editor.options.onColorPicker&&this.dom.color&&((t=this)._deleteDomColor(),t.updateDom(),i=(0,u.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(i,this.value,(function(i){"string"==typeof i&&i!==t.value&&(t._deleteDomColor(),t.value=i,t.updateDom(),t._debouncedOnChangeValue())})))}},{key:"getFieldNames",value:function(t){return"object"===this.type?this.childs.filter((function(i){return i!==t})).map((function(t){return t.field})):[]}},{key:"_onInsertBefore",value:function(i,e,n){var r=this.editor.getDomSelection();(i=new t(this.editor,{field:void 0!==i?i:"",value:void 0!==e?e:"",type:n})).expand(!0),e=this.getInternalPath(),this.parent.insertBefore(i,this),this.editor.highlighter.unhighlight(),i.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("insertBeforeNodes",{nodes:[i],paths:[i.getInternalPath()],beforePath:e,parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:n})}},{key:"_onInsertAfter",value:function(i,e,n){var r=this.editor.getDomSelection();(e=new t(this.editor,{field:void 0!==i?i:"",value:void 0!==e?e:"",type:n})).expand(!0),this.parent.insertAfter(e,this),this.editor.highlighter.unhighlight(),e.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("insertAfterNodes",{nodes:[e],paths:[e.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:n})}},{key:"_onAppend",value:function(i,e,n){var r=this.editor.getDomSelection();(e=new t(this.editor,{field:void 0!==i?i:"",value:void 0!==e?e:"",type:n})).expand(!0),this.parent.appendChild(e),this.editor.highlighter.unhighlight(),e.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("appendNodes",{nodes:[e],paths:[e.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:n})}},{key:"_onChangeType",value:function(t){var i,e,n=this.type;t!==n&&(i=this.editor.getDomSelection(),this.changeType(t),e=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:n,newType:t,oldSelection:i,newSelection:e}))}},{key:"sort",value:function(t,i){var e,n,r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];"string"==typeof t&&(t=(0,d.parsePath)(t)),this._hasChilds()&&(this.hideChilds(),e=this.childs,this.childs=this.childs.concat(),n="desc"===i?-1:1,this.childs.sort("object"===this.type?function(t,i){return n*l()(t.field,i.field)}:function(i,e){return i=i.getNestedChild(t),e=e.getNestedChild(t),i?e?(e=e.value,"string"!=typeof(i=i.value)&&"string"!=typeof e?e<i?n:i<e?-n:0:n*l()(i,e)):-n:n}),this._updateDomIndexes(),this.showChilds(),!0===r&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:e,newChilds:this.childs}))}},{key:"update",value:function(t){var i=this.getInternalValue();this.setValue(t),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:i,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var t=this.dom.tr?this.dom.tr.parentNode:void 0,i=(i=this.expanded?this.getAppendDom():this.getDom())&&i.parentNode?i.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:t,nextTr:i}}},{key:"_attachToDom",value:function(t){t.table&&(t.nextTr?t.table.insertBefore(this.getDom(),t.nextTr):t.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(t){if(this._hasChilds()){this.hideChilds();try{var i=this.getInternalValue(),e=this.getValue(),n=this.editor.options.executeQuery(e,t);this.setValue(n);var r=this.getInternalValue();this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:i,newValue:r}),this.showChilds()}catch(t){this.showChilds(),this.editor._onError(t)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var t=this.editor.node.getInternalValue();this.editor._setRoot(this);var i=this.editor.node.getInternalValue();this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:t,newValue:i})}catch(t){this.editor._onError(t)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(t){for(var i=0,e=this;e&&i<t.length;)e=e.findChildByProperty(t[i]),i++;return e}},{key:"findChildByProperty",value:function(t){if("object"===this.type)return this.childs.find((function(i){return i.field===t}))}},{key:"getAppendDom",value:function(){return this.append||(this.append=new j(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new Z(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var t=this.parent.childs.indexOf(this);return this.parent.childs[t+1]||this.parent.append}},{key:"_previousNode",value:function(){var i=null,e=this.getDom();if(e&&e.parentNode)for(var n=e;i=t.getNodeFromTarget(n=n.previousSibling),n&&i&&i instanceof j&&!i.isVisible(););return i}},{key:"_nextNode",value:function(){var i=null,e=this.getDom();if(e&&e.parentNode)for(var n=e;i=t.getNodeFromTarget(n=n.nextSibling),n&&i&&i instanceof j&&!i.isVisible(););return i}},{key:"_firstNode",value:function(){var i=null,e=this.getDom();return e&&e.parentNode&&(i=t.getNodeFromTarget(e=e.parentNode.firstChild)),i}},{key:"_lastNode",value:function(){var i=null,e=this.getDom();if(e&&e.parentNode){var n=e.parentNode.lastChild;for(i=t.getNodeFromTarget(n);n&&i&&!i.isVisible();)i=t.getNodeFromTarget(n=n.previousSibling)}return i}},{key:"_previousElement",value:function(t){var i=this.dom;switch(t){case i.value:if(this.fieldEditable)return i.field;case i.field:if(this._hasChilds())return i.expand;case i.expand:return i.menu;case i.menu:if(i.drag)return i.drag;default:return null}}},{key:"_nextElement",value:function(t){var i=this.dom;switch(t){case i.drag:return i.menu;case i.menu:if(this._hasChilds())return i.expand;case i.expand:if(this.fieldEditable)return i.field;case i.field:if(!this._hasChilds())return i.value;default:return null}}},{key:"_getElementName",value:function(t){var i=this;return Object.keys(this.dom).find((function(e){return i.dom[e]===t}))}},{key:"_hasChilds",value:function(){return"array"===this.type||"object"===this.type}},{key:"addTemplates",value:function(t,i){var e=this,n=e.editor.options.templates;null!=n&&(n.length&&t.push({type:"separator"}),n.forEach((function(n){t.push({text:n.text,className:n.className||"jsoneditor-type-object",title:n.title,click:(i?function(t,i){e._onAppend(t,i)}:function(t,i){e._onInsertBefore(t,i)}).bind(this,n.field,n.value)})})))}},{key:"showContextMenu",value:function(i,e){var n,o,s=this,h=[];this.editable.value&&h.push({text:(0,a.Iu)("type"),title:(0,a.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,a.Iu)("auto"),className:"jsoneditor-type-auto"+("auto"===this.type?" jsoneditor-selected":""),title:(0,a.Iu)("autoType"),click:function(){s._onChangeType("auto")}},{text:(0,a.Iu)("array"),className:"jsoneditor-type-array"+("array"===this.type?" jsoneditor-selected":""),title:(0,a.Iu)("arrayType"),click:function(){s._onChangeType("array")}},{text:(0,a.Iu)("object"),className:"jsoneditor-type-object"+("object"===this.type?" jsoneditor-selected":""),title:(0,a.Iu)("objectType"),click:function(){s._onChangeType("object")}},{text:(0,a.Iu)("string"),className:"jsoneditor-type-string"+("string"===this.type?" jsoneditor-selected":""),title:(0,a.Iu)("stringType"),click:function(){s._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&h.push({text:(0,a.Iu)("sort"),title:(0,a.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){s.showSortModal()}}),this.editor.options.enableTransform&&h.push({text:(0,a.Iu)("transform"),title:(0,a.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){s.showTransformModal()}}),this.parent&&h.push({text:(0,a.Iu)("extract"),title:(0,a.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){s.extract()}})),this.parent&&this.parent._hasChilds()&&(h.length&&h.push({type:"separator"}),s===(n=s.parent.childs)[n.length-1]&&(o=[{text:(0,a.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,a.Iu)("autoType"),click:function(){s._onAppend("","","auto")}},{text:(0,a.Iu)("array"),className:"jsoneditor-type-array",title:(0,a.Iu)("arrayType"),click:function(){s._onAppend("",[])}},{text:(0,a.Iu)("object"),className:"jsoneditor-type-object",title:(0,a.Iu)("objectType"),click:function(){s._onAppend("",{})}},{text:(0,a.Iu)("string"),className:"jsoneditor-type-string",title:(0,a.Iu)("stringType"),click:function(){s._onAppend("","","string")}}],s.addTemplates(o,!0),h.push({text:(0,a.Iu)("appendText"),title:(0,a.Iu)("appendTitle"),submenuTitle:(0,a.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){s._onAppend("","","auto")},submenu:o})),o=[{text:(0,a.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,a.Iu)("autoType"),click:function(){s._onInsertBefore("","","auto")}},{text:(0,a.Iu)("array"),className:"jsoneditor-type-array",title:(0,a.Iu)("arrayType"),click:function(){s._onInsertBefore("",[])}},{text:(0,a.Iu)("object"),className:"jsoneditor-type-object",title:(0,a.Iu)("objectType"),click:function(){s._onInsertBefore("",{})}},{text:(0,a.Iu)("string"),className:"jsoneditor-type-string",title:(0,a.Iu)("stringType"),click:function(){s._onInsertBefore("","","string")}}],s.addTemplates(o,!1),h.push({text:(0,a.Iu)("insert"),title:(0,a.Iu)("insertTitle"),submenuTitle:(0,a.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){s._onInsertBefore("","","auto")},submenu:o}),this.editable.field&&(h.push({text:(0,a.Iu)("duplicateText"),title:(0,a.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){t.onDuplicate(s)}}),h.push({text:(0,a.Iu)("removeText"),title:(0,a.Iu)("removeField"),className:"jsoneditor-remove",click:function(){t.onRemove(s)}}))),this.editor.options.onCreateMenu&&(o=s.getPath(),h=this.editor.options.onCreateMenu(h,{type:"single",path:o,paths:[o]})),new r.x(h,{close:e}).show(i,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var t=this,i=this.editor.options.modalAnchor||p.qD,e=this.getValue();(0,f.showSortModal)(i,e,(function(i){var e=(0,d.parsePath)(e=i.path);t.sortedBy=i,t.sort(e,i.direction)}),t.sortedBy)}},{key:"showTransformModal",value:function(){var t=this,i=(o=this.editor.options).modalAnchor,e=o.createQuery,n=o.executeQuery,r=o.queryDescription,o=this.getValue();(0,g.showTransformModal)({container:i||p.qD,json:o,queryDescription:r,createQuery:e,executeQuery:n,onTransform:function(i){t.transform(i)}})}},{key:"_getType",value:function(t){return t instanceof Array?"array":t instanceof Object?"object":"string"==typeof t&&"string"!=typeof(0,d.parseString)(t)?"string":"auto"}},{key:"_escapeHTML",value:function(t){return"string"!=typeof t?String(t):(t=String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ {2}/g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),t=(t=JSON.stringify(t)).substring(1,t.length-1),!0===this.editor.options.escapeUnicode?(0,d.escapeUnicodeChars)(t):t)}},{key:"_unescapeHTML",value:function(t){return t='"'+this._escapeJSON(t)+'"',(0,d.parse)(t).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")}},{key:"_escapeJSON",value:function(t){for(var i="",e=0;e<t.length;){var n=t.charAt(e);"\n"===n?i+="\\n":"\\"===n?(i+=n,e++,""!==(n=t.charAt(e))&&-1!=='"\\/bfnrtu'.indexOf(n)||(i+="\\"),i+=n):i+='"'===n?'\\"':n,e++}return i}},{key:"updateNodeName",value:function(){var t,i=this.childs?this.childs.length:0;if("object"===this.type||"array"===this.type){if(this.editor.options.onNodeName)try{t=this.editor.options.onNodeName({path:this.getPath(),size:i,type:this.type})}catch(t){console.error("Error in onNodeName callback: ",t)}this.dom.value.textContent="object"===this.type?"{"+(t||i)+"}":"["+(t||i)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),"undefined"!==this.childs))for(var t in this.childs)this.childs[t].recursivelyUpdateNodeName()}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}();v.prototype.DEBOUNCE_INTERVAL=150,v.prototype.MAX_SEARCH_RESULTS=999;var y=100;function w(t){return t.getInternalPath()}function x(t){return t.getField()}function k(t,i){return Object.prototype.hasOwnProperty.call(t,i)}v.focusElement=void 0,v.select=function(t){setTimeout((function(){(0,d.selectContentEditable)(t)}),0)},v.onDragStart=function(t,i){if(!Array.isArray(t))return v.onDragStart([t],i);var e,n,r,o,s;0!==t.length&&(n=t[t.length-1],r=(e=t[0]).parent,s=v.getNodeFromTarget(i.target),o=e.editor,s=(0,d.getAbsoluteTop)(s.dom.tr)-(0,d.getAbsoluteTop)(e.dom.tr),o.mousemove||(o.mousemove=(0,d.addEventListener)(i.view,"mousemove",(function(i){v.onDrag(t,i)}))),o.mouseup||(o.mouseup=(0,d.addEventListener)(i.view,"mouseup",(function(i){v.onDragEnd(t,i)}))),o.highlighter.lock(),o.drag={oldCursor:document.body.style.cursor,oldSelection:o.getDomSelection(),oldPaths:t.map(w),oldParent:r,oldNextNode:r.childs[n.getIndex()+1]||r.append,oldParentPathRedo:r.getInternalPath(),oldIndexRedo:e.getIndex(),mouseX:i.pageX,offsetY:s,level:e.getLevel()},document.body.style.cursor="move",i.preventDefault())},v.onDrag=function(t,i){if(!Array.isArray(t))return v.onDrag([t],i);if(0!==t.length){var e,n,r,o,s,a=t[0].editor,h=i.pageY-a.drag.offsetY,c=i.pageX,l=!1,u=t[0],f=u.dom.tr,g=(0,d.getAbsoluteTop)(f),p=f.offsetHeight;if(h<g){for(A=f;y=v.getNodeFromTarget(A=A.previousSibling),r=A?(0,d.getAbsoluteTop)(A):0,A&&h<r;);(y=y&&!y.parent?void 0:y)||(A=(m=f.parentNode.firstChild)?m.nextSibling:void 0,(y=v.getNodeFromTarget(A))===u&&(y=void 0)),!(y=y&&y.isVisible()&&(r=(A=y.dom.tr)?(0,d.getAbsoluteTop)(A):0)+p<h?void 0:y)||!1!==a.options.limitDragging&&y.parent!==t[0].parent||(t.forEach((function(t){y.parent.moveBefore(t,y)})),l=!0)}else{var m,I=t[t.length-1];if(p=(m=I.expanded&&I.append?I.append.getDom():I.dom.tr)?m.nextSibling:void 0){for(o=(0,d.getAbsoluteTop)(p),e=p;n=v.getNodeFromTarget(e),e&&(s=e.nextSibling?(0,d.getAbsoluteTop)(e.nextSibling):0,s=e?s-o:0,n&&n.parent.childs.length===t.length&&n.parent.childs[t.length-1]===I&&(g+=27),e=e.nextSibling),e&&g+s<h;);if(n&&n.parent){p=c-a.drag.mouseX,p=Math.round(p/24/2);for(var b=a.drag.level+p,C=n.getLevel(),A=n.dom.tr&&n.dom.tr.previousSibling;C<b&&A;){var y=v.getNodeFromTarget(A),w=t.some((function(t){return t===y||y.isDescendantOf(t)}));if(!w){if(!(y instanceof j))break;if((w=y.parent.childs).length===t.length&&w[t.length-1]===I)break;C=(n=v.getNodeFromTarget(A)).getLevel()}A=A.previousSibling}(n=n instanceof j&&!n.isVisible()&&n.parent.showMore.isVisible()?n._nextNode():n)&&(!1===a.options.limitDragging||n.parent===t[0].parent)&&n.dom.tr&&n.dom.tr!==m.nextSibling&&(t.forEach((function(t){n.parent.moveBefore(t,n)})),l=!0)}}}l&&(a.drag.mouseX=c,a.drag.level=u.getLevel()),a.startAutoScroll(h),i.preventDefault()}},v.onDragEnd=function(t,i){if(!Array.isArray(t))return v.onDrag([t],i);var e,n,r,o,s,a,h,c,l;0!==t.length&&(e=(l=t[0]).editor,l&&l.dom.menu&&l.dom.menu.focus(),n=e.drag.oldParent.getInternalPath(),r=l.parent.getInternalPath(),o=e.drag.oldParent===l.parent,s=e.drag.oldNextNode.getIndex(),a=l.getIndex(),h=e.drag.oldParentPathRedo,c=e.drag.oldIndexRedo,l=o&&c<a?a+t.length:a,o&&c===a||e._onAction("moveNodes",{count:t.length,fieldNames:t.map(x),oldParentPath:n,newParentPath:r,oldIndex:s,newIndex:a,oldIndexRedo:c,newIndexRedo:l,oldParentPathRedo:h,newParentPathRedo:null,oldSelection:e.drag.oldSelection,newSelection:e.getDomSelection()}),document.body.style.cursor=e.drag.oldCursor,e.highlighter.unlock(),t.forEach((function(t){t.updateDom(),i.target!==t.dom.drag&&i.target!==t.dom.menu&&e.highlighter.unhighlight()})),delete e.drag,e.mousemove&&((0,d.removeEventListener)(i.view,"mousemove",e.mousemove),delete e.mousemove),e.mouseup&&((0,d.removeEventListener)(i.view,"mouseup",e.mouseup),delete e.mouseup),e.stopAutoScroll(),i.preventDefault())},v._findEnum=function(t){return t.enum?t.enum:(t=t.oneOf||t.anyOf||t.allOf)&&0<(t=t.filter((function(t){return t.enum}))).length?t[0].enum:null},v._findSchema=function(t,i,e){for(var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t,r=e.slice(1,e.length),o=e[0],s=[n],a=0,h=[n.oneOf,n.anyOf,n.allOf];a<h.length;a++){var c=h[a];Array.isArray(c)&&(s=s.concat(c))}var l,u=I(s);try{for(u.s();!(l=u.n()).done;){if("$ref"in(n=l.value)&&"string"==typeof n.$ref){var d,f=n.$ref;if(f in i)n=i[f];else{if(!f.startsWith("#/")){if(1!==(null===(d=f.match(/#\//g))||void 0===d?void 0:d.length))throw Error("Unable to resolve reference ".concat(f));var g=m(f.split("#/"),2),p=g[0];if(p in i){var b=i[p],C={$ref:"#/".concat(g[1])};return v._findSchema(b,i,r,C)}throw Error("Unable to resolve reference ".concat(f))}var y,w=f.substring(2).split("/"),x=(n=t,I(w));try{for(x.s();!(y=x.n()).done;){var k=y.value;if(!(k in n))throw Error("Unable to resovle reference ".concat(f));n=n[k]}}catch(t){x.e(t)}finally{x.f()}}}if(void 0===o)return n;if("string"!=typeof o){if("number"==typeof o&&"object"===A(n.items)&&null!==n.items)return v._findSchema(t,i,r,n=n.items)}else{if("object"===A(n.properties)&&null!==n.properties&&o in n.properties)return v._findSchema(t,i,r,n=n.properties[o]);if("object"===A(n.patternProperties)&&null!==n.patternProperties)for(var j in n.patternProperties)if(o.match(j))return v._findSchema(t,i,r,n=n.patternProperties[j]);if("object"===A(n.additionalProperties))return v._findSchema(t,i,r,n=n.additionalProperties)}}}catch(t){u.e(t)}finally{u.f()}return null},v.onRemove=function(t){if(!Array.isArray(t))return v.onRemove([t]);var i,e,n,r,o,s;t&&0<t.length&&(i=(s=t[0]).parent,e=s.editor,n=s.getIndex(),e.highlighter.unhighlight(),r=e.getDomSelection(),v.blurNodes(t),o=e.getDomSelection(),s=t.map(w),t.forEach((function(t){t.parent._remove(t)})),e._onAction("removeNodes",{nodes:t,paths:s,parentPath:i.getInternalPath(),index:n,oldSelection:r,newSelection:o}))},v.onDuplicate=function(t){if(!Array.isArray(t))return v.onDuplicate([t]);var i,e,n,r,o,s,a;t&&0<t.length&&(e=(i=t[t.length-1]).parent,(n=i.editor).deselect(n.multiselection.nodes),r=n.getDomSelection(),o=i,s=t.map((function(t){var i,n=t.clone();return"object"===t.parent.type&&(i=t.parent.getFieldNames(),n.field=(0,d.findUniqueName)(t.field,i)),e.insertAfter(n,o),o=n})),1===t.length?"object"===s[0].parent.type?(s[0].dom.field.innerHTML=t[0]._escapeHTML(t[0].field),s[0].focus("field")):s[0].focus():n.select(s),a=n.getDomSelection(),n._onAction("duplicateNodes",{paths:t.map(w),clonePaths:s.map(w),afterPath:i.getInternalPath(),parentPath:e.getInternalPath(),oldSelection:r,newSelection:a}))},v.getNodeFromTarget=function(t){for(;t;){if(t.node)return t.node;t=t.parentNode}},v.targetIsColorPicker=function(t){var i=v.getNodeFromTarget(t);if(i)for(var e=t&&t.parentNode;e;){if(e===i.dom.color)return!0;e=e.parentNode}return!1},v.blurNodes=function(t){var i,e;Array.isArray(t)?(i=(e=t[0]).parent,e=e.getIndex(),(i.childs[e+t.length]?i.childs[e+t.length]:i.childs[e-1]||i).focus()):v.blurNodes([t])};var j=((S.prototype=new v).getDom=function(){var t=this.dom;if(t.tr)return t.tr;this._updateEditability();var i=document.createElement("tr");i.className="jsoneditor-append",i.node=this,t.tr=i,"tree"===this.editor.options.mode&&(t.tdDrag=document.createElement("td"),n=document.createElement("td"),t.tdMenu=n,(e=document.createElement("button")).type="button",e.className="jsoneditor-button jsoneditor-contextmenu-button",e.title="Click to open the actions menu (Ctrl+M)",t.menu=e,n.appendChild(t.menu));var e=document.createElement("td"),n=document.createElement("div");return n.appendChild(document.createTextNode("("+(0,a.Iu)("empty")+")")),n.className="jsoneditor-readonly",e.appendChild(n),t.td=e,t.text=n,this.updateDom(),i},S.prototype.getPath=function(){return null},S.prototype.getIndex=function(){return null},S.prototype.updateDom=function(){var t=this.dom,i=t.td;i&&(i.style.paddingLeft=24*this.getLevel()+26+"px");var e=t.text;e&&(e.firstChild.nodeValue="("+(0,a.Iu)("empty")+" "+this.parent.type+")"),e=t.tr,this.isVisible()?t.tr.firstChild||(t.tdDrag&&e.appendChild(t.tdDrag),t.tdMenu&&e.appendChild(t.tdMenu),e.appendChild(i)):t.tr.firstChild&&(t.tdDrag&&e.removeChild(t.tdDrag),t.tdMenu&&e.removeChild(t.tdMenu),e.removeChild(i))},S.prototype.isVisible=function(){return 0===this.parent.childs.length},S.prototype.showContextMenu=function(t,i){var e=this,n=[{text:(0,a.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,a.Iu)("autoType"),click:function(){e._onAppend("","","auto")}},{text:(0,a.Iu)("array"),className:"jsoneditor-type-array",title:(0,a.Iu)("arrayType"),click:function(){e._onAppend("",[])}},{text:(0,a.Iu)("object"),className:"jsoneditor-type-object",title:(0,a.Iu)("objectType"),click:function(){e._onAppend("",{})}},{text:(0,a.Iu)("string"),className:"jsoneditor-type-string",title:(0,a.Iu)("stringType"),click:function(){e._onAppend("","","string")}}];e.addTemplates(n,!0);var o=[{text:(0,a.Iu)("appendText"),title:(0,a.Iu)("appendTitleAuto"),submenuTitle:(0,a.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){e._onAppend("","","auto")},submenu:n}];this.editor.options.onCreateMenu&&(n=e.parent.getPath(),o=this.editor.options.onCreateMenu(o,{type:"append",path:n,paths:[n]})),new r.x(o,{close:i}).show(t,this.editor.getPopupAnchor())},S.prototype.onEvent=function(t){var i,e=t.type,n=t.target||t.srcElement,r=this.dom;n===r.menu&&("mouseover"===e?this.editor.highlighter.highlight(this.parent):"mouseout"===e&&this.editor.highlighter.unhighlight()),"click"===e&&n===r.menu&&((i=this.editor.highlighter).highlight(this.parent),i.lock(),(0,d.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,(function(){(0,d.removeClassName)(r.menu,"jsoneditor-selected"),i.unlock(),i.unhighlight()}))),"keydown"===e&&this.onKeyDown(t)},S);function S(t){this.editor=t,this.dom={}}var Z=((G.prototype=new v).getDom=function(){return this.dom.tr||(this._updateEditability(),this.dom.tr||(i=(t=this).parent,(r=document.createElement("a")).appendChild(document.createTextNode((0,a.Iu)("showMore"))),r.href="#",r.onclick=function(e){return i.visibleChilds=Math.floor(i.visibleChilds/i.getMaxVisibleChilds()+1)*i.getMaxVisibleChilds(),t.updateDom(),i.showChilds(),e.preventDefault(),!1},(o=document.createElement("a")).appendChild(document.createTextNode((0,a.Iu)("showAll"))),o.href="#",o.onclick=function(e){return i.visibleChilds=1/0,t.updateDom(),i.showChilds(),e.preventDefault(),!1},e=document.createElement("div"),n=document.createTextNode(this._getShowMoreText()),e.className="jsoneditor-show-more",e.appendChild(n),e.appendChild(r),e.appendChild(document.createTextNode(". ")),e.appendChild(o),e.appendChild(document.createTextNode(". ")),(r=document.createElement("td")).appendChild(e),o=document.createElement("tr"),"tree"===this.editor.options.mode&&(o.appendChild(document.createElement("td")),o.appendChild(document.createElement("td"))),o.appendChild(r),o.className="jsoneditor-show-more",this.dom.tr=o,this.dom.moreContents=e,this.dom.moreText=n),this.updateDom(),this.dom.tr);var t,i,e,n,r,o},G.prototype.updateDom=function(){var t;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(t=this.parent._getNextTr())&&t.parentNode.insertBefore(this.dom.tr,t),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)},G.prototype._getShowMoreText=function(){return(0,a.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},G.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},G.prototype.onEvent=function(t){"keydown"===t.type&&this.onKeyDown(t)},G);function G(t,i){this.editor=t,this.parent=i,this.dom={}}var B=function(){function t(i){function e(t){return i.node.findNodeByInternalPath(t)}!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=i,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(t){e(t.parentPath).childs[t.index].updateField(t.oldValue)},redo:function(t){e(t.parentPath).childs[t.index].updateField(t.newValue)}},editValue:{undo:function(t){e(t.path).updateValue(t.oldValue)},redo:function(t){e(t.path).updateValue(t.newValue)}},changeType:{undo:function(t){e(t.path).changeType(t.oldType)},redo:function(t){e(t.path).changeType(t.newType)}},appendNodes:{undo:function(t){var i=e(t.parentPath);t.paths.map(e).forEach((function(t){i.removeChild(t)}))},redo:function(t){var i=e(t.parentPath);t.nodes.forEach((function(t){i.appendChild(t)}))}},insertBeforeNodes:{undo:function(t){var i=e(t.parentPath);t.paths.map(e).forEach((function(t){i.removeChild(t)}))},redo:function(t){var i=e(t.parentPath),n=e(t.beforePath);t.nodes.forEach((function(t){i.insertBefore(t,n)}))}},insertAfterNodes:{undo:function(t){var i=e(t.parentPath);t.paths.map(e).forEach((function(t){i.removeChild(t)}))},redo:function(t){var i=e(t.parentPath),n=e(t.afterPath);t.nodes.forEach((function(t){i.insertAfter(t,n),n=t}))}},removeNodes:{undo:function(t){var i=e(t.parentPath),n=i.childs[t.index]||i.append;t.nodes.forEach((function(t){i.insertBefore(t,n)}))},redo:function(t){var i=e(t.parentPath);t.paths.map(e).forEach((function(t){i.removeChild(t)}))}},duplicateNodes:{undo:function(t){var i=e(t.parentPath);t.clonePaths.map(e).forEach((function(t){i.removeChild(t)}))},redo:function(t){var i=e(t.parentPath),n=e(t.afterPath);t.paths.map(e).forEach((function(t){var e,r=t.clone();"object"===i.type&&(e=i.getFieldNames(),r.field=(0,d.findUniqueName)(t.field,e)),i.insertAfter(r,n),n=r}))}},moveNodes:{undo:function(t){var i=e(t.oldParentPath),n=e(t.newParentPath),r=i.childs[t.oldIndex]||i.append;n.childs.slice(t.newIndex,t.newIndex+t.count).forEach((function(e,n){e.field=t.fieldNames[n],i.moveBefore(e,r)})),null===t.newParentPathRedo&&(t.newParentPathRedo=n.getInternalPath())},redo:function(t){var i=e(t.oldParentPathRedo),n=e(t.newParentPathRedo),r=n.childs[t.newIndexRedo]||n.append;i.childs.slice(t.oldIndexRedo,t.oldIndexRedo+t.count).forEach((function(i,e){i.field=t.fieldNames[e],n.moveBefore(i,r)}))}},sort:{undo:function(t){var i=e(t.path);i.hideChilds(),i.childs=t.oldChilds,i.updateDom({updateIndexes:!0}),i.showChilds()},redo:function(t){var i=e(t.path);i.hideChilds(),i.childs=t.newChilds,i.updateDom({updateIndexes:!0}),i.showChilds()}},transform:{undo:function(t){e(t.path).setInternalValue(t.oldValue)},redo:function(t){e(t.path).setInternalValue(t.newValue)}}}}var i;return(i=[{key:"onChange",value:function(){}},{key:"add",value:function(t,i){this.index++,this.history[this.index]={action:t,params:i,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 t=this.history[this.index];if(t){var i=this.actions[t.action];if(i&&i.undo){if(i.undo(t.params),t.params.oldSelection)try{this.editor.setDomSelection(t.params.oldSelection)}catch(t){console.error(t)}}else console.error(new Error('unknown action "'+t.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var t=this.history[this.index];if(t){var i=this.actions[t.action];if(i&&i.redo){if(i.redo(t.params),t.params.newSelection)try{this.editor.setDomSelection(t.params.newSelection)}catch(t){console.error(t)}}else console.error(new Error('unknown action "'+t.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}();var V=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t);var n=this;this.editor=i,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=e,i=document.createElement("div"),(this.dom.wrapper=i).className="jsoneditor-search",e.appendChild(i),e=document.createElement("div"),(this.dom.results=e).className="jsoneditor-results",i.appendChild(e),e=document.createElement("div"),(this.dom.input=e).className="jsoneditor-frame",e.title=(0,a.Iu)("searchTitle"),i.appendChild(e),(i=document.createElement("button")).type="button",i.className="jsoneditor-refresh",e.appendChild(i);var r=document.createElement("input");r.type="text",(this.dom.search=r).oninput=function(t){n._onDelayedSearch(t)},r.onchange=function(){n._onSearch()},r.onkeydown=function(t){n._onKeyDown(t)},r.onkeyup=function(t){n._onKeyUp(t)},i.onclick=function(){r.select()},e.appendChild(r),(i=document.createElement("button")).type="button",i.title=(0,a.Iu)("searchNextResultTitle"),i.className="jsoneditor-next",i.onclick=function(){n.next()},e.appendChild(i),(i=document.createElement("button")).type="button",i.title=(0,a.Iu)("searchPreviousResultTitle"),i.className="jsoneditor-previous",i.onclick=function(){n.previous()},e.appendChild(i)}var i;return(i=[{key:"next",value:function(t){var i;this.results&&((i=null!==this.resultIndex?this.resultIndex+1:0)>this.results.length-1&&(i=0),this._setActiveResult(i,t))}},{key:"previous",value:function(t){var i,e;this.results&&(i=this.results.length-1,this._setActiveResult(e=(e=null!==this.resultIndex?this.resultIndex-1:i)<0?i:e,t))}},{key:"_setActiveResult",value:function(t,i){var e;if(this.activeResult&&(e=this.activeResult.node,"field"===this.activeResult.elem?delete e.searchFieldActive:delete e.searchValueActive,e.updateDom()),!this.results||!this.results[t])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=t;var n=this.results[this.resultIndex].node,r=this.results[this.resultIndex].elem;"field"===r?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo((function(){i&&n.focus(r)}))}},{key:"_clearDelay",value:function(){void 0!==this.timeout&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(){this._clearDelay();var t=this;this.timeout=setTimeout((function(){t._onSearch()}),this.delay)}},{key:"_onSearch",value:function(t){var i;if(this._clearDelay(),(i=0<(i=this.dom.search.value).length?i:void 0)!==this.lastText||t){this.lastText=i,this.results=this.editor.search(i),t=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0;var e=0;if(this.activeResult)for(var n=0;n<this.results.length;n++)if(this.results[n].node===this.activeResult.node){e=n;break}this._setActiveResult(e,!1),this.dom.results.textContent=void 0!==i?0===(i=this.results.length)?"no results":1===i?"1 result":t<i?t+"+ results":i+" results":""}}},{key:"_onKeyDown",value:function(t){var i=t.which;27===i?(this.dom.search.value="",this._onSearch(),t.preventDefault(),t.stopPropagation()):13===i&&(t.ctrlKey?this._onSearch(!0):t.shiftKey?this.previous():this.next(),t.preventDefault(),t.stopPropagation())}},{key:"_onKeyUp",value:function(t){var i=t.keyCode;27!==i&&13!==i&&this._onDelayedSearch(t)}},{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()}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}();var W=function(){function t(i,e){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),i&&(this.root=e,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,i.appendChild(this.path),this.reset())}var i;return(i=[{key:"reset",value:function(){this.path.textContent=(0,a.Iu)("selectNode")}},{key:"setPath",value:function(t){var i=this;this.path.textContent="",t&&t.length&&t.forEach((function(e,n){var o,s=document.createElement("span");s.className="jsoneditor-treepath-element",s.innerText=e.name,s.onclick=function(t){this.selectionCallback&&this.selectionCallback(t)}.bind(i,e),i.path.appendChild(s),e.children.length&&((o=document.createElement("span")).className="jsoneditor-treepath-seperator",o.textContent="►",o.onclick=function(){i.contentMenuClicked=!0;var s=[];e.children.forEach((function(r){s.push({text:r.name,className:"jsoneditor-type-modes"+(t[n+1]+1&&t[n+1].name===r.name?" jsoneditor-selected":""),click:function(t,i){this.contextMenuCallback&&this.contextMenuCallback(t,i)}.bind(i,e,r.name)})})),new r.x(s,{limitHeight:!0}).show(o,i.root,!0)},i.path.appendChild(o)),n===t.length-1&&(s=(o||s).getBoundingClientRect().right,i.path.offsetWidth<s&&(i.path.scrollLeft=s),i.path.scrollLeft&&((s=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",s.title="show all path",s.textContent="...",s.onclick=function(t){(i.contentMenuClicked=!1,d.addClassName)(i.path,"show-all"),i.path.style.width=i.path.parentNode.getBoundingClientRect().width-10+"px",i.path.onblur=function(){if(i.contentMenuClicked)return i.contentMenuClicked=!1,void i.path.focus();(0,d.removeClassName)(i.path,"show-all"),i.path.onblur=void 0,i.path.style.width="",i.setPath(t)}}.bind(i,t),i.path.insertBefore(s,i.path.firstChild)))}))}},{key:"onSectionSelected",value:function(t){"function"==typeof t&&(this.selectionCallback=t)}},{key:"onContextMenuItemSelected",value:function(t){"function"==typeof t&&(this.contextMenuCallback=t)}}])&&function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,i),t}(),K=(i=e(8037),e.n(i)),T=[{mode:"tree",mixin:i={create:function(t,i){if(!t)throw new Error("No container element provided.");this.container=t,this.dom={},this.highlighter=new s,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(i),i.autocomplete&&(this.autocomplete=function(t){(t=t||{}).filter=t.filter||"start",t.trigger=t.trigger||"keydown",t.confirmKeys=t.confirmKeys||[39,35,9],t.caseSensitive=t.caseSensitive||!1;var i="",e="",r=document.createElement("div");r.style.position="relative",r.style.outline="0",r.style.border="0",r.style.margin="0",r.style.padding="0";var o,s,a=document.createElement("div");function h(t){var i,e;document.createRange?((i=document.createRange()).selectNodeContents(t),i.collapse(!1),(e=window.getSelection()).removeAllRanges(),e.addRange(i)):document.selection&&((i=document.body.createTextRange()).moveToElementText(t),i.collapse(!1),i.select())}function c(t){return void 0===o&&((o=document.createElement("span")).style.visibility="hidden",o.style.position="fixed",o.style.outline="0",o.style.margin="0",o.style.padding="0",o.style.border="0",o.style.left="0",o.style.whiteSpace="pre",o.style.fontSize=i,o.style.fontFamily=e,o.style.fontWeight="normal",document.body.appendChild(o)),o.textContent=t,o.getBoundingClientRect().right}a.className="autocomplete dropdown",a.style.position="absolute",a.style.visibility="hidden";var l,u,d,f,g,p={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:r,show:function(t,n,o){var s=this;this.startFrom=n,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""===i&&(i=window.getComputedStyle(t).getPropertyValue("font-size")),""===e&&(e=window.getComputedStyle(t).getPropertyValue("font-family")),a.style.marginLeft="0",a.style.marginTop=t.getBoundingClientRect().height+"px",this.options=o.map(String),this.element!==t&&(this.element=t,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=t.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){s.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",A),this.element.addEventListener("keydown",A,!1),this.element.removeEventListener("blur",v),this.element.addEventListener("blur",v,!1)),r.appendChild(this.elementHint),r.appendChild(a),t.parentElement.appendChild(r),this.repaint(t)},setText:function(t){this.element.innerText=t},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,m.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(i){i=(i=i.innerText).replace("\n","");var e=this.options.length,n=i.substring(this.startFrom);s=i.substring(0,this.startFrom);for(var r=0;r<e;r++){var o=this.options[r];if(!t.caseSensitive&&0===o.toLowerCase().indexOf(n.toLowerCase())||t.caseSensitive&&0===o.indexOf(n)){this.elementHint.innerText=s+n+o.substring(n.length),this.elementHint.realInnerText=s+o;break}}a.style.left=c(s)+"px",m.refresh(n,this.options),this.elementHint.style.width=c(this.elementHint.innerText)+10+"px","hidden"===a.style.visibility||(this.elementHint.style.width=c(this.elementHint.innerText)+a.clientWidth+"px")}},m=(l=a,u=[],d=0,f=-1,g={rs:p,hide:function(){l.style.visibility="hidden"},refresh:function(i,e){l.style.visibility="hidden",d=0,l.textContent="";var r=window.innerHeight||document.documentElement.clientHeight,o=(s=l.parentNode.getBoundingClientRect()).top-6,s=r-s.bottom-6;u=[];var a="function"==typeof t.filter?t.filter:n[t.filter];e=a?e.filter((function(e){return a(t.caseSensitive?i:i.toLowerCase(),t.caseSensitive?e:e.toLowerCase(),t)})):[],0!==(u=e.map((function(t){var e=document.createElement("div");e.className="item",e.onmouseover=I,e.onmouseout=b,e.onmousedown=C,e.__hint=t,e.textContent="",e.appendChild(document.createTextNode(t.substring(0,i.length)));var n=document.createElement("b");return n.appendChild(document.createTextNode(t.substring(i.length))),e.appendChild(n),l.appendChild(e),e}))).length&&(1===u.length&&(i.toLowerCase()===u[0].__hint.toLowerCase()&&!t.caseSensitive||i===u[0].__hint&&t.caseSensitive)||u.length<2||(g.highlight(0),3*s<o?(l.style.maxHeight=o+"px",l.style.top="",l.style.bottom="100%"):(l.style.top="100%",l.style.bottom="",l.style.maxHeight=s+"px"),l.style.visibility="visible"))},highlight:function(t){-1!==f&&u[f]&&(u[f].className="item"),u[t].className="item hover",f=t},move:function(t){return"hidden"===l.style.visibility?"":(d+t===-1||d+t===u.length||g.highlight(d+=t),u[d].__hint)},onmouseselection:function(){}});function I(){this.style.backgroundColor="#ddd"}function b(){this.style.backgroundColor=""}function C(){g.hide(),g.onmouseselection(this.__hint,g.rs)}var A=function(i){var e=(i=i||window.event).keyCode;if(null!=this.elementHint&&33!==e&&34!==e){if(27===e)return p.hideDropDown(),p.element.focus(),i.preventDefault(),void i.stopPropagation();var n=(n=this.element.innerText).replace("\n","");if(0<=t.confirmKeys.indexOf(e))return 9===e&&0===this.elementHint.innerText.length&&p.onTab(),void(0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,p.hideDropDown(),h(this.element),9===e&&(p.element.focus(),i.preventDefault(),i.stopPropagation())));if(13!==e){if(40===e){var r=n.substring(this.startFrom),o=m.move(1);return""===o&&p.onArrowDown(),this.elementHint.innerText=s+r+o.substring(r.length),this.elementHint.realInnerText=s+o,i.preventDefault(),void i.stopPropagation()}38===e&&(n=n.substring(this.startFrom),""===(c=m.move(-1))&&p.onArrowUp(),this.elementHint.innerText=s+n+c.substring(n.length),this.elementHint.realInnerText=s+c,i.preventDefault(),i.stopPropagation())}else if(0===this.elementHint.innerText.length)p.onEnter();else{var c="hidden"===a.style.visibility;if(m.hide(),c)return p.hideDropDown(),p.element.focus(),void p.onEnter();this.element.innerText=this.elementHint.realInnerText,p.hideDropDown(),h(this.element),i.preventDefault(),i.stopPropagation()}}}.bind(p),v=function(){p.hideDropDown()};return m.onmouseselection=function(t,i){i.element.innerText=i.elementHint.innerText=s+t,i.hideDropDown(),window.setTimeout((function(){i.element.focus(),h(i.element)}),1)},p}(i.autocomplete)),this.options.history&&"view"!==this.options.mode&&(this.history=new B(this)),this._createFrame(),this._createTable()},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()},_setOptions:function(t){var i=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(t,i,e){var n;K()?(n=t.getBoundingClientRect().top,n=(0,d.getWindow)(t).innerHeight-n<300&&300<n,new(K())({parent:t,color:i,popup:n?"top":"bottom",onDone:function(t){t=1===t.rgba[3]?t.hex.substr(0,7):t.hex,e(t)}}).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:h.r,executeQuery:h.J,onEvent:null,enableSort:!0,enableTransform:!0},t&&(Object.keys(t).forEach((function(e){i.options[e]=t[e]})),null==t.limitDragging&&null!=t.schema&&(this.options.limitDragging=!0)),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,d.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),t.onSelectionChange&&this.onSelectionChange(t.onSelectionChange),(0,a.cC)(this.options.languages),(0,a.m0)(this.options.language)},set:function(t){t instanceof Function||void 0===t?this.clear():(this.content.removeChild(this.table),t=new v(this,t={field:this.options.name,value: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()},update:function(t){var i,e;this.node.deepEqual(t)||(i=this.getSelection(),this.onChangeDisabled=!0,this.node.update(t),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),i&&i.start&&i.end?(e=this.node.findNodeByPath(i.start.path),t=this.node.findNodeByPath(i.end.path),e&&t?this.setSelection(i.start,i.end):this.setSelection({},{})):this.setSelection({},{}))},get:function(){if(this.node)return this.node.getValue()},getText:function(){return JSON.stringify(this.get())},setText:function(t){try{this.set((0,d.parse)(t))}catch(i){t=(0,d.tryJsonRepair)(t),this.set((0,d.parse)(t))}},updateText:function(t){try{this.update((0,d.parse)(t))}catch(i){t=(0,d.tryJsonRepair)(t),this.update((0,d.parse)(t))}},setName:function(t){this.options.name=t,this.node&&this.node.updateField(this.options.name)},getName:function(){return this.options.name},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()},clear:function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},_setRoot:function(t){this.clear(),(this.node=t).setParent(null),t.setField(this.getName(),!1),delete t.index,this.tbody.appendChild(t.getDom())},search:function(t){var i;return this.node?(this.content.removeChild(this.table),i=this.node.search(t),this.content.appendChild(this.table)):i=[],i},expandAll:function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},collapseAll:function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},_onAction:function(t,i){this.history&&this.history.add(t,i),this._onChange()},_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(t){console.error("Error in onChange callback: ",t)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(t){console.error("Error in onChangeJSON callback: ",t)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(t){console.error("Error in onChangeText callback: ",t)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(t){console.error("Error in onNodeName callback: ",t)}}},validate:function(){var t=this,i=this.node;if(i){var e=i.getValue(),n=[];this.validateSchema&&(this.validateSchema(e)||(n=this.validateSchema.errors.map((function(t){return(0,d.improveSchemaError)(t)})).map((function(t){return{node:i.findNode(t.dataPath),error:t,type:"validation"}})).filter((function(t){return null!=t.node}))));try{this.validationSequence++;var r=this,o=this.validationSequence;return this._validateCustom(e).then((function(i){return o===r.validationSequence&&(i=[].concat(n,i||[]),r._renderValidationErrors(i),"function"==typeof t.options.onValidationError&&(0,d.isValidationErrorChanged)(i,t.lastSchemaErrors)&&t.options.onValidationError.call(t,i),t.lastSchemaErrors=i),t.lastSchemaErrors}))}catch(e){return Promise.reject(e)}}},_validateAndCatch:function(){this.validate().catch((function(t){console.error("Error running validation:",t)}))},_renderValidationErrors:function(t){this.errorNodes&&this.errorNodes.forEach((function(t){t.setError(null)}));var i=t.reduce((function(t,i){return i.node.findParents().filter((function(i){return!t.some((function(t){return t[0]===i}))})).map((function(t){return[t,i.node]})).concat(t)}),[]);this.errorNodes=i.map((function(t){return{node:t[0],child:t[1],error:{message:(0,a.Iu)("object"===t[0].type?"containsInvalidProperties":"containsInvalidItems")}}})).concat(t).map((function(t){return t.node.setError(t.error,t.child),t.node}))},_validateCustom:function(t){try{if(this.options.onValidate){var i=this.node,e=this.options.onValidate(t);return((0,d.isPromise)(e)?e:Promise.resolve(e)).then((function(t){return Array.isArray(t)?t.filter((function(t){var i=(0,d.isValidValidationError)(t);return i||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',t),i})).map((function(t){var e;try{e=t&&t.path?i.findNodeByPath(t.path):null}catch(t){}return e||console.warn("Ignoring validation error: node not found. Path:",t.path,"Error:",t),{node:e,error:t,type:"customValidation"}})).filter((function(t){return t&&t.node&&t.error&&t.error.message})):null}))}}catch(t){return Promise.reject(t)}return Promise.resolve(null)},refresh:function(){this.node&&this.node.updateDom({recurse:!0})},startAutoScroll:function(t){var i=this,e=this.scrollableContent,n=(0,d.getAbsoluteTop)(e),r=e.clientHeight,o=n+r;this.autoScrollStep=t<n+24&&0<e.scrollTop?(n+24-t)/3:o-24<t&&r+e.scrollTop<e.scrollHeight?(o-24-t)/3:void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval((function(){i.autoScrollStep?e.scrollTop-=i.autoScrollStep:i.stopAutoScroll()}),50)):this.stopAutoScroll()},stopAutoScroll:function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},setDomSelection:function(t){var i,e,n;t&&("scrollTop"in t&&this.scrollableContent&&(this.scrollableContent.scrollTop=t.scrollTop),t.paths?(i=this,n=t.paths.map((function(t){return i.node.findNodeByInternalPath(t)})),this.select(n)):(n=(e=t.path?this.node.findNodeByInternalPath(t.path):null)&&t.domName?e.dom[t.domName]:null,t.range&&n?(n=Object.assign({},t.range,{container:n}),(0,d.setSelectionOffset)(n)):e&&e.focus()))},getDomSelection:function(){var t=v.getNodeFromTarget(this.focusTarget),i=this.focusTarget,e=t?Object.keys(t.dom).find((function(e){return t.dom[e]===i})):null,n=(0,d.getSelectionOffset)();return(n=(n=n&&"DIV"!==n.container.nodeName?null:n)&&n.container!==i?null:n)&&delete n.container,{path:t?t.getInternalPath():null,domName:e,range:n,paths:0<this.multiselection.length?this.multiselection.nodes.map((function(t){return t.getInternalPath()})):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},scrollTo:function(t,i){var e,n,r,o,s=this.scrollableContent;s?((e=this).animateTimeout&&(clearTimeout(e.animateTimeout),delete e.animateTimeout),e.animateCallback&&(e.animateCallback(!1),delete e.animateCallback),r=s.scrollHeight-(n=s.clientHeight),o=Math.min(Math.max(t-n/4,0),r),function t(){var n=o-(n=s.scrollTop);3<Math.abs(n)?(s.scrollTop+=n/3,e.animateCallback=i,e.animateTimeout=setTimeout(t,50)):(i&&i(!0),s.scrollTop=o,delete e.animateTimeout,delete e.animateCallback)}()):i&&i(!1)},_createFrame:function(){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";var t=this;function i(i){t._onEvent&&t._onEvent(i)}var e,n,r,s,h={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new o.R(h),this.frame.onclick=function(t){var e=t.target;i(t),"BUTTON"===e.nodeName&&t.preventDefault()},this.frame.oninput=i,this.frame.onchange=i,this.frame.onkeydown=i,this.frame.onkeyup=i,this.frame.oncut=i,this.frame.onpaste=i,this.frame.onmousedown=i,this.frame.onmouseup=i,this.frame.onmouseover=i,this.frame.onmouseout=i,(0,d.addEventListener)(this.frame,"focus",i,!0),(0,d.addEventListener)(this.frame,"blur",i,!0),this.frame.onfocusin=i,this.frame.onfocusout=i,this.options.mainMenuBar&&((0,d.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(h=document.createElement("button")).type="button",h.className="jsoneditor-expand-all",h.title=(0,a.Iu)("expandAll"),h.onclick=function(){t.expandAll()},this.menu.appendChild(h),(h=document.createElement("button")).type="button",h.title=(0,a.Iu)("collapseAll"),h.className="jsoneditor-collapse-all",h.onclick=function(){t.collapseAll()},this.menu.appendChild(h),this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,a.Iu)("sortTitleShort"),e.onclick=function(){t.node.showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,a.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){t.node.showTransformModal()},this.menu.appendChild(e)),this.history&&((n=document.createElement("button")).type="button",n.className="jsoneditor-undo jsoneditor-separator",n.title=(0,a.Iu)("undo"),n.onclick=function(){t._onUndo()},this.menu.appendChild(n),this.dom.undo=n,(r=document.createElement("button")).type="button",r.className="jsoneditor-redo",r.title=(0,a.Iu)("redo"),r.onclick=function(){t._onRedo()},this.menu.appendChild(r),this.dom.redo=r,this.history.onChange=function(){n.disabled=!t.history.canUndo(),r.disabled=!t.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((s=this).modeSwitcher=new c.x(this.menu,this.options.modes,this.options.mode,(function(t){s.setMode(t),s.modeSwitcher.focus()}))),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 W(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},_onUndo:function(){this.history&&(this.history.undo(),this._onChange())},_onRedo:function(){this.history&&(this.history.redo(),this._onChange())},_onEvent:function(t){if(!v.targetIsColorPicker(t.target)){var i,e=v.getNodeFromTarget(t.target);if("keydown"===t.type&&this._onKeyDown(t),e&&"focus"===t.type&&(this.focusTarget=t.target,this.options.autocomplete&&"focus"===this.options.autocomplete.trigger&&this._showAutoComplete(t.target)),"mousedown"===t.type&&this._startDragDistance(t),"mousemove"!==t.type&&"mouseup"!==t.type&&"click"!==t.type||this._updateDragDistance(t),e&&this.options&&this.options.navigationBar&&e&&("keydown"===t.type||"mousedown"===t.type)&&(i=this,setTimeout((function(){i._updateTreePath(e.getNodePath())}))),e&&e.selected){if("click"===t.type){if(t.target===e.dom.menu)return void this.showContextMenu(t.target);t.hasMoved||this.deselect()}"mousedown"===t.type&&v.onDragStart(this.multiselection.nodes,t)}else"mousedown"===t.type&&(0,d.hasParentNode)(t.target,this.content)&&(this.deselect(),e&&t.target===e.dom.drag?v.onDragStart(e,t):e&&(t.target===e.dom.field||t.target===e.dom.value||t.target===e.dom.select)||this._onMultiSelectStart(t));e&&e.onEvent(t)}},_updateTreePath:function(t){var i;function e(t){return t.parent?"array"===t.parent.type?t.index:t.field:t.field||t.type}t&&t.length?((0,d.removeClassName)(this.navBar,"nav-bar-empty"),i=[],t.forEach((function(t){var n={name:e(t),node:t,children:[]};t.childs&&t.childs.length&&t.childs.forEach((function(t){n.children.push({name:e(t),node:t})})),i.push(n)})),this.treePath.setPath(i)):(0,d.addClassName)(this.navBar,"nav-bar-empty")},_onTreePathSectionSelected:function(t){t&&t.node&&(t.node.expandTo(),t.node.focus())},_onTreePathMenuItemSelected:function(t,i){t&&t.children.length&&(t=t.children.find((function(t){return t.name===i})))&&t.node&&(this._updateTreePath(t.node.getNodePath()),t.node.expandTo(),t.node.focus())},_startDragDistance:function(t){this.dragDistanceEvent={initialTarget:t.target,initialPageX:t.pageX,initialPageY:t.pageY,dragDistance:0,hasMoved:!1}},_updateDragDistance:function(t){this.dragDistanceEvent||this._startDragDistance(t);var i=t.pageX-this.dragDistanceEvent.initialPageX,e=t.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(i*i+e*e),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,t.dragDistance=this.dragDistanceEvent.dragDistance,t.hasMoved=this.dragDistanceEvent.hasMoved,t.dragDistance},_onMultiSelectStart:function(t){var i,e=v.getNodeFromTarget(t.target);"tree"===this.options.mode&&void 0===this.options.onEditable&&(this.multiselection={start:e||null,end:null,nodes:[]},this._startDragDistance(t),(i=this).mousemove||(this.mousemove=(0,d.addEventListener)(t.view,"mousemove",(function(t){i._onMultiSelect(t)}))),this.mouseup||(this.mouseup=(0,d.addEventListener)(t.view,"mouseup",(function(t){i._onMultiSelectEnd(t)}))),t.preventDefault())},_onMultiSelect:function(t){var i;t.preventDefault(),this._updateDragDistance(t),t.hasMoved&&((i=v.getNodeFromTarget(t.target))&&(null==this.multiselection.start&&(this.multiselection.start=i),this.multiselection.end=i),this.deselect(),i=this.multiselection.end||this.multiselection.start,(t=this.multiselection.start)&&i&&(this.multiselection.nodes=this._findTopLevelNodes(t,i),this.multiselection.nodes&&this.multiselection.nodes.length&&(this.multiselection.direction=this.multiselection.start===(i=this.multiselection.nodes[0])||this.multiselection.start.isDescendantOf(i)?"down":"up"),this.select(this.multiselection.nodes)))},_onMultiSelectEnd:function(t){var i=this.multiselection.nodes[0];i&&i.dom.menu&&i.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,d.removeEventListener)(t.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,d.removeEventListener)(t.view,"mouseup",this.mouseup),delete this.mouseup)},deselect:function(t){var i=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach((function(t){t.setSelected(!1)})),this.multiselection.nodes=[],t&&(this.multiselection.start=null,this.multiselection.end=null),i&&this._selectionChangedHandler&&this._selectionChangedHandler()},select:function(t){if(!Array.isArray(t))return this.select([t]);var i;t&&(this.deselect(),this.multiselection.nodes=t.slice(0),i=t[0],t.forEach((function(t){t.expandPathToNode(),t.setSelected(!0,t===i)})),this._selectionChangedHandler&&(t=this.getSelection(),this._selectionChangedHandler(t.start,t.end)))},_findTopLevelNodes:function(t,i){for(var e=t.getNodePath(),n=i.getNodePath(),r=0;r<e.length&&e[r]===n[r];)r++;var o=e[r-1],s=e[r];return t=n[r],s&&t||(o.parent?o=(t=s=o).parent:(s=o.childs[0],t=o.childs[o.childs.length-1])),o&&s&&t?(i=o.childs.indexOf(s),s=o.childs.indexOf(t),t=Math.min(i,s),s=Math.max(i,s),o.childs.slice(t,s+1)):[]},_showAutoComplete:function(t){var i,e=v.getNodeFromTarget(t),n="";0<=t.className.indexOf("jsoneditor-value")&&(n="value"),""!==(n=0<=t.className.indexOf("jsoneditor-field")?"field":n)&&(i=this,setTimeout((function(){var r;e&&("focus"===i.options.autocomplete.trigger||0<t.innerText.length)&&null!==(r=i.options.autocomplete.getOptions(t.innerText,e.getPath(),n,e.editor))?"function"==typeof r.then?r.then((function(e){null===e?i.autocomplete.hideDropDown():e.options?i.autocomplete.show(t,e.startFrom,e.options):i.autocomplete.show(t,0,e)})).catch((function(t){console.error(t)})):r.options?i.autocomplete.show(t,r.startFrom,r.options):i.autocomplete.show(t,0,r):i.autocomplete.hideDropDown()}),50))},_onKeyDown:function(t){var i,e=t.which||t.keyCode,n=t.altKey,r=t.ctrlKey,o=t.metaKey,s=t.shiftKey,a=!1,h=this.focusTarget;9===e&&(i=this,setTimeout((function(){i.focusTarget!==h&&(0,d.selectContentEditable)(i.focusTarget)}),0)),this.searchBox&&(r&&70===e?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),a=!0):(114===e||r&&71===e)&&(s?this.searchBox.previous(!0):this.searchBox.next(!0),a=!0)),this.history&&(r&&!s&&90===e?(this._onUndo(),a=!0):r&&s&&90===e&&(this._onRedo(),a=!0)),this.options.autocomplete&&!a&&(r||n||o||1!==t.key.length&&8!==e&&46!==e||(a=!1,this._showAutoComplete(t.target))),a&&(t.preventDefault(),t.stopPropagation())},_createTable:function(){var t;this.options.navigationBar&&(0,d.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"),"tree"===this.options.mode&&((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)},showContextMenu:function(t,i){var e,n=[],o=this.multiselection.nodes.slice();n.push({text:(0,a.Iu)("duplicateText"),title:(0,a.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){v.onDuplicate(o)}}),n.push({text:(0,a.Iu)("remove"),title:(0,a.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){v.onRemove(o)}}),this.options.onCreateMenu&&(e=o.map((function(t){return t.getPath()})),n=this.options.onCreateMenu(n,{type:"multiple",path:e[0],paths:e})),new r.x(n,{close:i}).show(t,this.getPopupAnchor())},getPopupAnchor:function(){return this.options.popupAnchor||this.frame},getSelection:function(){var t,i,e={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(t=this.multiselection.nodes[0],i=this.multiselection.nodes[this.multiselection.nodes.length-1],"down"===this.multiselection.direction?(e.start=t.serialize(),e.end=i.serialize()):(e.start=i.serialize(),e.end=t.serialize())),e},onSelectionChange:function(t){"function"==typeof t&&(this._selectionChangedHandler=(0,d.debounce)(t,this.DEBOUNCE_INTERVAL))},setSelection:function(t,i){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)),(i=this._getNodeInstancesByRange(t,i)).forEach((function(t){t.expandTo()})),this.select(i)},_getNodeInstancesByRange:function(t,i){var e,n;t&&t.path&&(e=this.node.findNodeByPath(t.path),i&&i.path&&(n=this.node.findNodeByPath(i.path)));var r=[];if(e instanceof v)if(n instanceof v&&n!==e)if(e.parent===n.parent){i=e.getIndex()<n.getIndex()?(t=e,n):(t=n,e);var o=t;for(r.push(o);o=o.nextSibling(),r.push(o),o&&o!==i;);}else r=this._findTopLevelNodes(e,n);else r.push(e);return r},getNodesByRange:function(t,i){i=this._getNodeInstancesByRange(t,i);var e=[];return i.forEach((function(t){e.push(t.serialize())})),e}},data:"json"},{mode:"view",mixin:i,data:"json"},{mode:"form",mixin:i,data:"json"}]},2744:function(t,i,e){i.tryRequireAjv=function(){try{return e(8903)}catch(t){}}},9125:function(t,i,e){i.O=function(){try{e(4864)}catch(t){console.error(t)}}},9791:function(t,i,e){e.r(i),e.d(i,{parse:function(){return c},tryJsonRepair:function(){return l},escapeUnicodeChars:function(){return u},validate:function(){return d},extend:function(){return f},clear:function(){return g},getType:function(){return p},isUrl:function(){return I},isArray:function(){return b},getWindow:function(){return C},getAbsoluteLeft:function(){return A},getAbsoluteTop:function(){return v},addClassName:function(){return y},removeAllClassNames:function(){return w},removeClassName:function(){return x},stripFormatting:function(){return k},setEndOfContentEditable:function(){return j},selectContentEditable:function(){return S},getSelection:function(){return Z},setSelection:function(){return G},getSelectionOffset:function(){return B},setSelectionOffset:function(){return V},getInnerText:function(){return W},hasParentNode:function(){return K},getInternetExplorerVersion:function(){return T},isFirefox:function(){return R},addEventListener:function(){return H},removeEventListener:function(){return E},isChildOf:function(){return _},parsePath:function(){return N},stringifyPath:function(){return X},improveSchemaError:function(){return z},isPromise:function(){return J},isValidValidationError:function(){return O},insideRect:function(){return Y},debounce:function(){return P},textDiff:function(){return L},getInputSelection:function(){return M},getIndexForPosition:function(){return D},getPositionForPath:function(){return U},compileJSONPointer:function(){return Q},getColorCSS:function(){return $},isValidColor:function(){return q},makeFieldTooltip:function(){return tt},get:function(){return it},findUniqueName:function(){return et},getChildPaths:function(){return nt},sort:function(){return rt},sortObjectKeys:function(){return ot},parseString:function(){return st},isTimestamp:function(){return at},formatSize:function(){return ht},limitCharacters:function(){return ct},isObject:function(){return lt},contains:function(){return ut},isValidationErrorChanged:function(){return dt}}),i=e(4987),i=e(233);var n=e.n(i),r=(i=e(8909),e.n(i)),o=e(6589),s=e(7026),a=e(7907);function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){try{return JSON.parse(t)}catch(i){throw d(t),i}}function l(t){try{return r()(t)}catch(i){return t}}function u(t){return t.replace(/[\u007F-\uFFFF]/g,(function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))}function d(t){(void 0!==o?o:JSON).parse(t)}function f(t,i){for(var e in i)ft(i,e)&&(t[e]=i[e]);return t}function g(t){for(var i in t)ft(t,i)&&delete t[i];return t}function p(t){return null===t?"null":void 0===t?"undefined":t instanceof Number||"number"==typeof t?"number":t instanceof String||"string"==typeof t?"string":t instanceof Boolean||"boolean"==typeof t?"boolean":t instanceof RegExp?"regexp":b(t)?"array":"object"}var m=/^https?:\/\/\S+$/;function I(t){return("string"==typeof t||t instanceof String)&&m.test(t)}function b(t){return"[object Array]"===Object.prototype.toString.call(t)}function C(t){return t.ownerDocument.defaultView}function A(t){return t.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function v(t){return t.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function y(t,i){var e=t.className.split(" ");-1===e.indexOf(i)&&(e.push(i),t.className=e.join(" "))}function w(t){t.className=""}function x(t,i){var e=t.className.split(" ");-1!==(i=e.indexOf(i))&&(e.splice(i,1),t.className=e.join(" "))}function k(t){for(var i=t.childNodes,e=0,n=i.length;e<n;e++){var r=i[e];r.style&&r.removeAttribute("style");var o=r.attributes;if(o)for(var s=o.length-1;0<=s;s--){var a=o[s];!0===a.specified&&r.removeAttribute(a.name)}k(r)}}function j(t){var i;document.createRange&&((i=document.createRange()).selectNodeContents(t),i.collapse(!1),(t=window.getSelection()).removeAllRanges(),t.addRange(i))}function S(t){var i;t&&"DIV"===t.nodeName&&window.getSelection&&document.createRange&&((i=document.createRange()).selectNodeContents(t),(t=window.getSelection()).removeAllRanges(),t.addRange(i))}function Z(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)}return null}function G(t){var i;t&&window.getSelection&&((i=window.getSelection()).removeAllRanges(),i.addRange(t))}function B(){var t=Z();return t&&"startOffset"in t&&"endOffset"in t&&t.startContainer&&t.startContainer===t.endContainer?{startOffset:t.startOffset,endOffset:t.endOffset,container:t.startContainer.parentNode}:null}function V(t){var i;document.createRange&&window.getSelection&&window.getSelection()&&(i=document.createRange(),t.container.firstChild||t.container.appendChild(document.createTextNode("")),i.setStart(t.container.firstChild,t.startOffset),i.setEnd(t.container.firstChild,t.endOffset),G(i))}function W(t,i){if(void 0===i&&(i={_text:"",flush:function(){var t=this._text;return this._text="",t},set:function(t){this._text=t}}),t.nodeValue){var e=t.nodeValue.replace(/\s*\n\s*/g,"");return""!==e?i.flush()+e:""}if(t.hasChildNodes()){for(var n=t.childNodes,r="",o=0,s=n.length;o<s;o++){var a,h=n[o];"DIV"===h.nodeName||"P"===h.nodeName?((a=(a=n[o-1])?a.nodeName:void 0)&&"DIV"!==a&&"P"!==a&&"BR"!==a&&(""!==r&&(r+="\n"),i.flush()),r+=W(h,i),i.set("\n")):"BR"===h.nodeName?(r+=i.flush(),i.set("\n")):r+=W(h,i)}return r}return""}function K(t,i){for(var e=t?t.parentNode:void 0;e;){if(e===i)return!0;e=e.parentNode}return!1}function T(){var t;return-1===F&&(t=-1,"undefined"!=typeof navigator&&"Microsoft Internet Explorer"===navigator.appName&&null!=/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)&&(t=parseFloat(RegExp.$1)),F=t),F}var F=-1;function R(){return"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Firefox")}function H(t,i,e,n){return t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===i&&R()&&(i="DOMMouseScroll"),t.addEventListener(i,e,n),e):t.attachEvent?(t.attachEvent("on"+i,n=function(){return e.call(t,window.event)}),n):void 0}function E(t,i,e,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===i&&R()&&(i="DOMMouseScroll"),t.removeEventListener(i,e,n)):t.detachEvent&&t.detachEvent("on"+i,e)}function _(t,i){for(var e=t.parentNode;e;){if(e===i)return!0;e=e.parentNode}return!1}function N(t){var i=[],e=0;function n(i){for(var n="";void 0!==t[e]&&t[e]!==i;)n+=t[e],e++;if(t[e]!==i)throw new Error("Invalid JSON path: unexpected end, character "+i+" expected");return n}for(;void 0!==t[e];)if("."===t[e])e++,i.push(function(){for(var i="";void 0!==t[e]&&/[\w$]/.test(t[e]);)i+=t[e],e++;if(""===i)throw new Error("Invalid JSON path: property name expected at index "+e);return i}());else{if("["!==t[e])throw new Error('Invalid JSON path: unexpected character "'+t[e]+'" at index '+e);if("'"===t[++e]||'"'===t[e]){var r=t[e];if(e++,i.push(n(r)),t[e]!==r)throw new Error("Invalid JSON path: closing quote ' expected at index "+e);e++}else{if(0===(r=n("]").trim()).length)throw new Error("Invalid JSON path: array value expected at index "+e);r="*"===r?r:JSON.parse(r),i.push(r)}if("]"!==t[e])throw new Error("Invalid JSON path: closing bracket ] expected at index "+e);e++}return i}function X(t){return t.map((function(t){return"number"==typeof t?"["+t+"]":"string"==typeof t&&t.match(/^[A-Za-z0-9_$]+$/)?"."+t:'["'+t+'"]'})).join("")}function z(t){var i,e;return"enum"!==t.keyword||!Array.isArray(t.schema)||(e=t.schema)&&(5<(e=e.map((function(t){return JSON.stringify(t)}))).length&&(i=["("+(e.length-5)+" more...)"],(e=e.slice(0,5)).push(i)),t.message="should be equal to one of: "+e.join(", ")),"additionalProperties"===t.keyword&&(t.message="should NOT have additional property: "+t.params.additionalProperty),t}function J(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function O(t){return"object"===h(t)&&Array.isArray(t.path)&&"string"==typeof t.message}function Y(t,i,e){return i.left-(e=void 0!==e?e:0)>=t.left&&i.right+e<=t.right&&i.top-e>=t.top&&i.bottom+e<=t.bottom}function P(t,i,e){var n;return function(){var r=this,o=arguments,s=e&&!n;clearTimeout(n),n=setTimeout((function(){n=null,e||t.apply(r,o)}),i),s&&t.apply(r,o)}}function L(t,i){for(var e=i.length,n=0,r=t.length,o=i.length;i.charAt(n)===t.charAt(n)&&n<e;)n++;for(;i.charAt(o-1)===t.charAt(r-1)&&n<o&&0<r;)o--,r--;return{start:n,end:o}}function M(t){var i,e,n,r,o=0,s=0;return"number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd?(o=t.selectionStart,s=t.selectionEnd):(r=document.selection.createRange())&&r.parentElement()===t&&(n=t.value.length,i=t.value.replace(/\r\n/g,"\n"),(e=t.createTextRange()).moveToBookmark(r.getBookmark()),(r=t.createTextRange()).collapse(!1),-1<e.compareEndPoints("StartToEnd",r)?o=s=n:(o=-e.moveStart("character",-n),o+=i.slice(0,o).split("\n").length-1,-1<e.compareEndPoints("EndToEnd",r)?s=n:(s=-e.moveEnd("character",-n),s+=i.slice(0,s).split("\n").length-1))),{startIndex:o,endIndex:s,start:a(o),end:a(s)};function a(i){return{row:((i=t.value.substring(0,i)).match(/\n/g)||[]).length+1,column:i.length-i.lastIndexOf("\n")}}}function D(t,i,e){return t=t.value||"",0<i&&0<e?(t=t.split("\n",i),i=Math.min(t.length,i),e=Math.min(t[i-1].length,e-1),e=1===i?e:e+1,t.slice(0,i-1).join("\n").length+e):-1}function U(t,i){var e,n=[];if(!i||!i.length)return n;try{e=s.parse(t)}catch(t){return n}return i.forEach((function(t){var i=Q(N(t));(i=e.pointers[i])&&n.push({path:t,line:i.key?i.key.line:i.value?i.value.line:0,column:i.key?i.key.column:i.value?i.value.column:0})})),n}function Q(t){return t.map((function(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")})).join("")}function $(t){var i=document.createElement("div");return i.style.color=t,i.style.color.split(/\s+/).join("").toLowerCase()||null}function q(t){return!!$(t)}function tt(t,i){if(!t)return"";var e="";return t.title&&(e+=t.title),t.description&&(0<e.length&&(e+="\n"),e+=t.description),t.default&&(0<e.length&&(e+="\n\n"),e+=(0,a.Iu)("default",void 0,i)+"\n",e+=JSON.stringify(t.default,null,2)),Array.isArray(t.examples)&&0<t.examples.length&&(0<e.length&&(e+="\n\n"),e+=(0,a.Iu)("examples",void 0,i)+"\n",t.examples.forEach((function(i,n){e+=JSON.stringify(i,null,2),n!==t.examples.length-1&&(e+="\n")}))),e}function it(t,i){for(var e=t,n=0;n<i.length&&null!=e;n++)e=e[i[n]];return e}function et(t,i){for(var e=t.replace(/ \(copy( \d+)?\)$/,""),n=e,r=1;-1!==i.indexOf(n);)n=e+" (copy"+(1<r?" "+r:"")+")",r++;return n}function nt(t,i){var e={};if(Array.isArray(t))for(var n=Math.min(t.length,1e4),r=0;r<n;r++)!function t(i,e,n,r){(Array.isArray(i)||lt(i))&&!r||(e[n||""]=!0),lt(i)&&Object.keys(i).forEach((function(o){t(i[o],e,n+"."+o,r)}))}(t[r],e,"",i);else e[""]=!0;return Object.keys(e).sort()}function rt(t,i,e){var n=i&&"."!==i?N(i):[],r="desc"===e?-1:1;return(t=t.slice()).sort((function(t,i){return t=it(t,n),i=it(i,n),r*(i<t?1:t<i?-1:0)})),t}function ot(t,i){var e="desc"===i?-1:1,r=(i=Object.keys(t).sort((function(t,i){return e*n()(t,i)})),{});return i.forEach((function(i){r[i]=t[i]})),r}function st(t){if(""===t)return"";if("null"===(e=t.toLowerCase()))return null;if("true"===e)return!0;if("false"===e)return!1;var i=Number(t),e=parseFloat(t);return isNaN(i)||isNaN(e)?t:i}function at(t,i){return"number"==typeof i&&9466848e5<i&&isFinite(i)&&Math.floor(i)===i&&!isNaN(new Date(i).valueOf())}function ht(t){return t<900?t.toFixed()+" B":(t/=1e3)<900?t.toFixed(1)+" KB":(t/=1e3)<900?t.toFixed(1)+" MB":(t/=1e3)<900?t.toFixed(1)+" GB":(t/1e3).toFixed(1)+" TB"}function ct(t,i){return t.length<=i?t:t.slice(0,i)+"..."}function lt(t){return"object"===h(t)&&null!==t&&!Array.isArray(t)}function ut(t,i){return-1!==t.indexOf(i)}function dt(t,i){if(!i&&!t)return!1;if(i&&!t||!i&&t)return!0;if(i.length!==t.length)return!0;for(var e=0;e<t.length;++e){var n=function(e){if(!i.find("error"===t[e].type?function(i){return i.line===t[e].line}:function(i){return i.dataPath===t[e].dataPath&&i.schemaPath===t[e].schemaPath}))return{v:!0}}(e);if("object"===h(n))return n.v}return!1}function ft(t,i){return Object.prototype.hasOwnProperty.call(t,i)}},8037:function(t,i,e){var n;if(window.Picker)n=window.Picker;else try{n=e(4049)}catch(t){}t.exports=n},6225:function(t,i,e){t=e.nmd(t),function(){var t=function(){return this}();t||"undefined"==typeof window||(t=window);var i=function(t,e,n){"string"==typeof t?(2==arguments.length&&(n=e),i.modules[t]||(i.payloads[t]=n,i.modules[t]=null)):i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};function e(t,i,e){if("string"==typeof i){var n=a(t,i);if(null!=n)return e&&e(),n}else if("[object Array]"===Object.prototype.toString.call(i)){for(var r=[],s=0,h=i.length;s<h;++s){var c=a(t,i[s]);if(null==c&&o.original)return;r.push(c)}return e&&e.apply(null,r)||!0}}i.modules={},i.payloads={};var n,r,o=function(t,i){var n=e("",t,i);return null==n&&o.original?o.original.apply(this,arguments):n},s=function(t,i){if(-1!==i.indexOf("!")){var e=i.split("!");return s(t,e[0])+"!"+s(t,e[1])}if("."==i.charAt(0))for(i=t.split("/").slice(0,-1).join("/")+"/"+i;-1!==i.indexOf(".")&&n!=i;){var n=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return i},a=function(t,n){n=s(t,n);var r,o=i.modules[n];return o||("function"==typeof(o=i.payloads[n])&&(t={id:n,uri:"",exports:r={},packaged:!0},r=o((function(t,i){return e(n,t,i)}),r,t)||t.exports,i.modules[n]=r,delete i.payloads[n]),o=i.modules[n]=r||o),o};r=t,(n="ace")&&(t[n]||(t[n]={}),r=t[n]),r.define&&r.define.packaged||(i.original=r.define,r.define=i,r.define.packaged=!0),r.require&&r.require.packaged||(o.original=r.require,r.require=o,r.require.packaged=!0)}(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],(function(){"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,i){i.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},i.getOS=function(){return i.isMac?i.OS.MAC:i.isLinux?i.OS.LINUX:i.OS.WINDOWS};var e="object"==typeof navigator?navigator:{},n=(/mac|win|linux/i.exec(e.platform)||["other"])[0].toLowerCase(),r=e.userAgent||"";e=e.appName||"",i.isWin="win"==n,i.isMac="mac"==n,i.isLinux="linux"==n,i.isIE="Microsoft Internet Explorer"==e||0<=e.indexOf("MSAppHost")?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),i.isOldIE=i.isIE&&i.isIE<9,i.isGecko=i.isMozilla=r.match(/ Gecko\/\d+/),i.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),i.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,i.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,i.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,i.isAIR=0<=r.indexOf("AdobeAIR"),i.isAndroid=0<=r.indexOf("Android"),i.isChromeOS=0<=r.indexOf(" CrOS "),i.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,i.isIOS&&(i.isMac=!0),i.isMobile=i.isIOS||i.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(t,i){var e=t("./useragent");i.buildDom=function t(i,e,n){if("string"==typeof i&&i){var r=document.createTextNode(i);return e&&e.appendChild(r),r}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if("string"!=typeof i[0]||!i[0]){for(var o=[],s=0;s<i.length;s++){var a=t(i[s],e,n);a&&o.push(a)}return o}var h=document.createElement(i[0]),c=i[1];for(r=1,s=r=c&&"object"==typeof c&&!Array.isArray(c)?2:r;s<i.length;s++)t(i[s],h,n);return 2==r&&Object.keys(c).forEach((function(t){var i=c[t];"class"===t?h.className=Array.isArray(i)?i.join(" "):i:"function"==typeof i||"value"==t||"$"==t[0]?h[t]=i:"ref"===t?n&&(n[i]=h):null!=i&&h.setAttribute(t,i)})),e&&e.appendChild(h),h},i.getDocumentHead=function(t){return(t=t||document).head||t.getElementsByTagName("head")[0]||t.documentElement},i.createElement=function(t,i){return document.createElementNS?document.createElementNS(i||"http://www.w3.org/1999/xhtml",t):document.createElement(t)},i.removeChildren=function(t){t.innerHTML=""},i.createTextNode=function(t,i){return(i?i.ownerDocument:document).createTextNode(t)},i.createFragment=function(t){return(t?t.ownerDocument:document).createDocumentFragment()},i.hasCssClass=function(t,i){return-1!==(t.className+"").split(/\s+/g).indexOf(i)},i.addCssClass=function(t,e){i.hasCssClass(t,e)||(t.className+=" "+e)},i.removeCssClass=function(t,i){for(var e=t.className.split(/\s+/g);;){var n=e.indexOf(i);if(-1==n)break;e.splice(n,1)}t.className=e.join(" ")},i.toggleCssClass=function(t,i){for(var e=t.className.split(/\s+/g),n=!0;;){var r=e.indexOf(i);if(-1==r)break;n=!1,e.splice(r,1)}return n&&e.push(i),t.className=e.join(" "),n},i.setCssClass=function(t,e,n){n?i.addCssClass(t,e):i.removeCssClass(t,e)},i.hasCssString=function(t,i){var e,n=0;if(e=(i=i||document).querySelectorAll("style"))for(;n<e.length;)if(e[n++].id===t)return!0},i.importCssString=function(t,e,n){var r=n,o=(r=n&&n.getRootNode&&(r=n.getRootNode())&&r!=n?r:document).ownerDocument||r;if(e&&i.hasCssString(e,r))return null;e&&(t+="\n/*# sourceURL=ace/css/"+e+" */"),(n=i.createElement("style")).appendChild(o.createTextNode(t)),e&&(n.id=e),(r=r==o?i.getDocumentHead(o):r).insertBefore(n,r.firstChild)},i.importCssStylsheet=function(t,e){i.buildDom(["link",{rel:"stylesheet",href:t}],i.getDocumentHead(e))},i.scrollbarWidth=function(t){var e=i.createElement("ace_inner");e.style.width="100%",e.style.minWidth="0px",e.style.height="200px",e.style.display="block";var n=i.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(e);var o=t.documentElement;return o.appendChild(n),t=e.offsetWidth,r.overflow="scroll",t==(e=e.offsetWidth)&&(e=n.clientWidth),o.removeChild(n),t-e},"undefined"==typeof document&&(i.importCssString=function(){}),i.computedStyle=function(t){return window.getComputedStyle(t,"")||{}},i.setStyle=function(t,i,e){t[i]!==e&&(t[i]=e)},i.HAS_CSS_ANIMATION=!1,i.HAS_CSS_TRANSFORMS=!1,i.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,"undefined"!=typeof document&&(t=document.createElement("div"),i.HI_DPI&&void 0!==t.style.transform&&(i.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===t.style.animationName||(i.HAS_CSS_ANIMATION=!0),t=null),i.translate=i.HAS_CSS_TRANSFORMS?function(t,i,e){t.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:function(t,i,e){t.style.top=Math.round(e)+"px",t.style.left=Math.round(i)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(t,i){i.inherits=function(t,i){t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(t,i){for(var e in i)t[e]=i[e];return t},i.implement=function(t,e){i.mixin(t,e)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(t,i){var e=t("./oop"),n=function(){var t,i,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(i in n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[i].toLowerCase(),n[t]=parseInt(i,10);for(i in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[i].toLowerCase(),n[t]=parseInt(i,10);return e.mixin(n,n.MODIFIER_KEYS),e.mixin(n,n.PRINTABLE_KEYS),e.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],i=Math.pow(2,t.length);i--;)n.KEY_MODS[i]=t.filter((function(t){return i&n.KEY_MODS[t]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();e.mixin(i,n),i.keyCodeToString=function(t){var i=n[t];return(i="string"!=typeof i?String.fromCharCode(t):i).toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,i){var e,n=t("./keys"),r=t("./useragent"),o=null,s=0;function a(){return null==e&&function(){e=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){e={passive:!1}}})}catch(t){}}(),e}function h(t,i,e){this.elem=t,this.type=i,this.callback=e}h.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c,l=i.addListener=function(t,i,e,n){t.addEventListener(i,e,a()),n&&n.$toDestroy.push(new h(t,i,e))},u=i.removeListener=function(t,i,e){t.removeEventListener(i,e,a())};function d(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)}function f(t,i,e){var a=d(i);if(!r.isMac&&o){if(i.getModifierState&&(i.getModifierState("OS")||i.getModifierState("Win"))&&(a|=8),o.altGr){if(3==(3&a))return;o.altGr=0}18!==e&&17!==e||(h="location"in i?i.location:i.keyLocation,17===e&&1===h?1==o[e]&&(s=i.timeStamp):18===e&&3===a&&2===h&&i.timeStamp-s<50&&(o.altGr=!0))}if(e in n.MODIFIER_KEYS&&(e=-1),!a&&13===e){var h="location"in i?i.location:i.keyLocation;if(3===h&&(t(i,a,-e),i.defaultPrevented))return}if(r.isChromeOS&&8&a){if(t(i,a,e),i.defaultPrevented)return;a&=-9}return!!(a||e in n.FUNCTION_KEYS||e in n.PRINTABLE_KEYS)&&t(i,a,e)}function g(){o=Object.create(null)}i.stopEvent=function(t){return i.stopPropagation(t),i.preventDefault(t),!1},i.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},i.preventDefault=function(t){t.preventDefault&&t.preventDefault()},i.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||r.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},i.capture=function(t,i,e){var n=t&&t.ownerDocument||document;function r(t){i&&i(t),e&&e(t),u(n,"mousemove",i),u(n,"mouseup",r),u(n,"dragstart",r)}return l(n,"mousemove",i),l(n,"mouseup",r),l(n,"dragstart",r),r},i.addMouseWheelListener=function(t,i,e){"onmousewheel"in t?l(t,"mousewheel",(function(t){void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/8,t.wheelY=-t.wheelDeltaY/8):(t.wheelX=0,t.wheelY=-t.wheelDelta/8),i(t)}),e):"onwheel"in t?l(t,"wheel",(function(t){switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=.35*t.deltaX||0,t.wheelY=.35*t.deltaY||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}i(t)}),e):l(t,"DOMMouseScroll",(function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),i(t)}),e)},i.addMultiMouseDownListener=function(t,e,n,o,s){var a,h,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){var s;if(0!==i.getButton(t)?u=0:1<t.detail&&!(4<++u)||(u=1),r.isIE&&(s=5<Math.abs(t.clientX-a)||5<Math.abs(t.clientY-h),c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),e[u-1]||600),1==u&&(a=t.clientX,h=t.clientY)),t._clicks=u,n[o]("mousedown",t),4<u)u=0;else if(1<u)return n[o](d[u],t)}(t=Array.isArray(t)?t:[t]).forEach((function(t){l(t,"mousedown",f,s)}))},i.getModifierString=function(t){return n.KEY_MODS[d(t)]},i.addCommandKeyListener=function(t,e,n){var s,a;r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)?(s=null,l(t,"keydown",(function(t){s=t.keyCode}),n),l(t,"keypress",(function(t){return f(e,t,s)}),n)):(a=null,l(t,"keydown",(function(t){o[t.keyCode]=(o[t.keyCode]||0)+1;var i=f(e,t,t.keyCode);return a=t.defaultPrevented,i}),n),l(t,"keypress",(function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(i.stopEvent(t),a=null)}),n),l(t,"keyup",(function(t){o[t.keyCode]=null}),n),o||(g(),l(window,"focus",g)))},"object"==typeof window&&window.postMessage&&!r.isOldIE&&(c=1,i.nextTick=function(t,e){e=e||window;var n="zero-timeout-message-"+c++,r=function(o){o.data==n&&(i.stopPropagation(o),u(e,"message",r),t())};l(e,"message",r),e.postMessage(n,"*")}),i.$idleBlocked=!1,i.onIdle=function(t,e){return setTimeout((function e(){i.$idleBlocked?setTimeout(e,100):t()}),e)},i.$idleBlockId=null,i.blockIdle=function(t){i.$idleBlockId&&clearTimeout(i.$idleBlockId),i.$idleBlocked=!0,i.$idleBlockId=setTimeout((function(){i.$idleBlocked=!1}),t||100)},i.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),i.nextFrame=i.nextFrame?i.nextFrame.bind(window):function(t){setTimeout(t,17)}})),ace.define("ace/range",["require","exports","module"],(function(t,i){function e(t,i,e,n){this.start={row:t,column:i},this.end={row:e,column:n}}(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,i){return 0==this.compare(t,i)},this.compareRange=function(t){var i=t.end;return t=t.start,1==(i=this.compare(i.row,i.column))?1==(i=this.compare(t.row,t.column))?2:0==i?1:0:-1==i?-2:-1==(i=this.compare(t.row,t.column))?-1:1==i?42:0},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){return-1==(t=this.compareRange(t))||0==t||1==t},this.isEnd=function(t,i){return this.end.row==t&&this.end.column==i},this.isStart=function(t,i){return this.start.row==t&&this.start.column==i},this.setStart=function(t,i){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=i)},this.setEnd=function(t,i){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=i)},this.inside=function(t,i){return 0==this.compare(t,i)&&!this.isEnd(t,i)&&!this.isStart(t,i)},this.insideStart=function(t,i){return 0==this.compare(t,i)&&!this.isEnd(t,i)},this.insideEnd=function(t,i){return 0==this.compare(t,i)&&!this.isStart(t,i)},this.compare=function(t,i){return this.isMultiLine()||t!==this.start.row?t<this.start.row?-1:t>this.end.row?1:this.start.row===t?i>=this.start.column?0:-1:this.end.row!==t||i<=this.end.column?0:1:i<this.start.column?-1:i>this.end.column?1:0},this.compareStart=function(t,i){return this.start.row==t&&this.start.column==i?-1:this.compare(t,i)},this.compareEnd=function(t,i){return this.end.row==t&&this.end.column==i?1:this.compare(t,i)},this.compareInside=function(t,i){return this.end.row==t&&this.end.column==i?1:this.start.row==t&&this.start.column==i?-1:this.compare(t,i)},this.clipRows=function(t,i){var n,r;return this.end.row>i?n={row:i+1,column:0}:this.end.row<t&&(n={row:t,column:0}),this.start.row>i?r={row:i+1,column:0}:this.start.row<t&&(r={row:t,column:0}),e.fromPoints(r||this.start,n||this.end)},this.extend=function(t,i){var n,r,o=this.compare(t,i);return 0==o?this:(-1==o?n={row:t,column:i}:r={row:t,column:i},e.fromPoints(n||this.start,r||this.end))},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return e.fromPoints(this.start,this.end)},this.collapseRows=function(){return new e(this.start.row,0,0==this.end.column?Math.max(this.start.row,this.end.row-1):this.end.row,0)},this.toScreenRange=function(t){var i=t.documentToScreenPosition(this.start);return t=t.documentToScreenPosition(this.end),new e(i.row,i.column,t.row,t.column)},this.moveBy=function(t,i){this.start.row+=t,this.start.column+=i,this.end.row+=t,this.end.column+=i}}).call(e.prototype),e.fromPoints=function(t,i){return new e(t.row,t.column,i.row,i.column)},e.comparePoints=function(t,i){return t.row-i.row||t.column-i.column},e.comparePoints=function(t,i){return t.row-i.row||t.column-i.column},i.Range=e})),ace.define("ace/lib/lang",["require","exports","module"],(function(t,i){i.last=function(t){return t[t.length-1]},i.stringReverse=function(t){return t.split("").reverse().join("")},i.stringRepeat=function(t,i){for(var e="";0<i;)1&i&&(e+=t),(i>>=1)&&(t+=t);return e};var e=/^\s\s*/,n=/\s\s*$/;i.stringTrimLeft=function(t){return t.replace(e,"")},i.stringTrimRight=function(t){return t.replace(n,"")},i.copyObject=function(t){var i,e={};for(i in t)e[i]=t[i];return e},i.copyArray=function(t){for(var i=[],e=0,n=t.length;e<n;e++)i[e]=t[e]&&"object"==typeof t[e]?this.copyObject(t[e]):t[e];return i},i.deepCopy=function t(i){if("object"!=typeof i||!i)return i;if(Array.isArray(i)){for(var e=[],n=0;n<i.length;n++)e[n]=t(i[n]);return e}if("[object Object]"!==Object.prototype.toString.call(i))return i;for(n in e={},i)e[n]=t(i[n]);return e},i.arrayToMap=function(t){for(var i={},e=0;e<t.length;e++)i[t[e]]=1;return i},i.createMap=function(t){var i,e=Object.create(null);for(i in t)e[i]=t[i];return e},i.arrayRemove=function(t,i){for(var e=0;e<=t.length;e++)i===t[e]&&t.splice(e,1)},i.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},i.escapeHTML=function(t){return(""+t).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},i.getMatchOffsets=function(t,i){var e=[];return t.replace(i,(function(t){e.push({offset:arguments[arguments.length-2],length:t.length})})),e},i.deferredCall=function(t){function i(){e=null,t()}var e=null,n=function(t){return n.cancel(),e=setTimeout(i,t||0),n};return(n.schedule=n).call=function(){return this.cancel(),t(),n},n.cancel=function(){return clearTimeout(e),e=null,n},n.isPending=function(){return e},n},i.delayedCall=function(t,i){function e(){r=null,t()}function n(t){null==r&&(r=setTimeout(e,t||i))}var r=null;return n.delay=function(t){r&&clearTimeout(r),r=setTimeout(e,t||i)},(n.schedule=n).call=function(){this.cancel(),t()},n.cancel=function(){r&&clearTimeout(r),r=null},n.isPending=function(){return r},n}})),ace.define("ace/clipboard",["require","exports","module"],(function(t,i,e){var n;e.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(t,i){var e=t("../lib/event"),n=t("../lib/useragent"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("../clipboard"),a=n.isChrome<18,h=n.isIE,c=63<n.isChrome,l=t("../lib/keys"),u=l.KEY_MODS,d=n.isIOS,f=d?/\s/:/\n/,g=n.isMobile;i.TextInput=function(t,i){var p=r.createElement("textarea");p.className="ace_text-input",p.setAttribute("wrap","off"),p.setAttribute("autocorrect","off"),p.setAttribute("autocapitalize","off"),p.setAttribute("spellcheck",!1),p.style.opacity="0",t.insertBefore(p,t.firstChild);var m=!1,I=!1,b=!1,C=!1,A="";g||(p.style.fontSize="1px");var v=!1,y=!1,w="",x=0,k=0,j=0;try{var S=document.activeElement===p}catch(t){}e.addListener(p,"blur",(function(t){y||(i.onBlur(t),S=!1)}),i),e.addListener(p,"focus",(function(t){if(!y){if(S=!0,n.isEdge)try{if(!document.hasFocus())return}catch(t){}i.onFocus(t),n.isEdge?setTimeout(Z):Z()}}),i),this.$focusScroll=!1,this.focus=function(){if(A||c||"browser"==this.$focusScroll)return p.focus({preventScroll:!0});var t=p.style.top;p.style.position="fixed",p.style.top="0px";try{var i=0!=p.getBoundingClientRect().top}catch(t){return}var e=[];if(i)for(var n=p.parentElement;n&&1==n.nodeType;)e.push(n),n.setAttribute("ace_nocontext",!0),n=!n.parentElement&&n.getRootNode?n.getRootNode().host:n.parentElement;p.focus({preventScroll:!0}),i&&e.forEach((function(t){t.removeAttribute("ace_nocontext")})),setTimeout((function(){p.style.position="","0px"==p.style.top&&(p.style.top=t)}),0)},this.blur=function(){p.blur()},this.isFocused=function(){return S},i.on("beforeEndOperation",(function(){var t=i.curOp,e=t&&t.command&&t.command.name;"insertstring"!=e&&(t=e&&(t.docChanged||t.selectionChanged),b&&t&&(w=p.value="",_()),Z())}));var Z=d?function(t){var e;!S||m&&!t||C||((e="\n ab"+(t=t||"")+"cde fg\n")!=p.value&&(p.value=w=e),t=4+(t.length||(i.selection.isEmpty()?0:1)),4==x&&k==t||p.setSelectionRange(4,t),x=4,k=t)}:function(){if(!b&&!C&&(S||R)){b=!0;var t,e,n,r=0,o=0,s="";if(i.session&&(r=(t=(e=i.selection).getRange()).start.column,o=t.end.column,s=i.session.getLine(e=e.cursor.row),t.start.row!=e?(n=i.session.getLine(e-1),r=t.start.row<e-1?0:r,o+=n.length+1,s=n+"\n"+s):t.end.row!=e?(n=i.session.getLine(e+1),o=t.end.row>e+1?n.length:o,o+=s.length+1,s=s+"\n"+n):g&&0<e&&(s="\n"+s,o+=1,r+=1),400<s.length&&(r<400&&o<400?s=s.slice(0,400):(s="\n",r==o?r=o=0:(r=0,o=1)))),(s+="\n\n")!=w&&(p.value=w=s,x=k=s.length),R&&(x=p.selectionStart,k=p.selectionEnd),k!=o||x!=r||p.selectionEnd!=k)try{p.setSelectionRange(r,o),x=r,k=o}catch(t){}b=!1}};this.resetSelection=Z,S&&i.onFocus();var G=null;function B(t,e){if(R=R&&!1,I)return Z(),t&&i.onPaste(t),I=!1,"";for(var r=p.selectionStart,o=p.selectionEnd,s=x,a=w.length-k,h=t,c=t.length-r,l=t.length-o,u=0;0<s&&w[u]==t[u];)u++,s--;for(h=h.slice(u),u=1;0<a&&w.length-u>x-1&&w[w.length-u]==t[t.length-u];)u++,a--;c-=u-1,l-=u-1;var d=h.length-u+1;return d<0&&(s=-d,d=0),h=h.slice(0,d),e||h||c||s||a||l?(e=!(C=!0),n.isAndroid&&". "==h&&(h=" ",e=!0),h&&!s&&!a&&!c&&!l||v?i.onTextInput(h):i.onTextInput(h,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:l}),C=!1,w=t,x=r,k=o,j=l,e?"\n":h):""}function V(t){if(b)return E();if(t&&t.inputType){if("historyUndo"==t.inputType)return i.execCommand("undo");if("historyRedo"==t.inputType)return i.execCommand("redo")}var e=p.value;t=B(e,!0),(500<e.length||f.test(t)||g&&x<1&&x==k)&&Z()}function W(t,n){var r=i.getCopyText();if(!r)return e.preventDefault(t);H(t,r)?(d&&(Z(r),m=r,setTimeout((function(){m=!1}),10)),n?i.onCut():i.onCopy(),e.preventDefault(t)):(m=!0,p.value=r,p.select(),setTimeout((function(){m=!1,Z(),n?i.onCut():i.onCopy()})))}function K(t){W(t,!0)}function T(t){W(t,!1)}function F(t){var r=H(t);s.pasteCancelled()||("string"==typeof r?(r&&i.onPaste(r,t),n.isIE&&setTimeout(Z),e.preventDefault(t)):(p.value="",I=!0))}this.setInputHandler=function(t){G=t};var R=!(this.getInputHandler=function(){return G}),H=function(t,i,e){var n=t.clipboardData||window.clipboardData;if(n&&!a){var r=h||e?"Text":"text/plain";try{return i?!1!==n.setData(r,i):n.getData(r)}catch(t){if(!e)return H(t,i,!0)}}};e.addCommandKeyListener(p,i.onCommandKey.bind(i),i),e.addListener(p,"select",(function(){var t;b||(m?m=!1:0===(t=p).selectionStart&&t.selectionEnd>=w.length&&t.value===w&&w&&t.selectionEnd!==k?(i.selectAll(),Z()):g&&p.selectionStart!=x&&Z())}),i),e.addListener(p,"input",V,i),e.addListener(p,"cut",K,i),e.addListener(p,"copy",T,i),e.addListener(p,"paste",F,i),"oncut"in p&&"oncopy"in p&&"onpaste"in p||e.addListener(t,"keydown",(function(t){if((!n.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:T(t);break;case 86:F(t);break;case 88:K(t)}}),i);var E=function(){var t;if(b&&i.onCompositionUpdate&&!i.$readOnly)return v?N():void(b.useTextareaForIME?i.onCompositionUpdate(p.value):(t=p.value,B(t),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+k-b.selectionStart+j)))},_=function(t){i.onCompositionEnd&&!i.$readOnly&&(b=!1,i.onCompositionEnd(),i.off("mousedown",N),t&&V())};function N(){y=!0,p.blur(),p.focus(),y=!1}var X,z=o.delayedCall(E,50).schedule.bind(null,null);function J(){clearTimeout(X),X=setTimeout((function(){A&&(p.style.cssText=A,A=""),i.renderer.$isMousePressed=!1,i.renderer.$keepTextAreaAtCursor&&i.renderer.$moveTextAreaToCursor()}),0)}e.addListener(p,"compositionstart",(function(t){b||!i.onCompositionStart||i.$readOnly||(b={},v||(t.data&&(b.useTextareaForIME=!1),setTimeout(E,0),i._signal("compositionStart"),i.on("mousedown",N),(t=i.getSelectionRange()).end.row=t.start.row,t.end.column=t.start.column,b.markerRange=t,b.selectionStart=x,i.onCompositionStart(b),b.useTextareaForIME?(w=p.value="",k=x=0):(p.msGetInputContext&&(b.context=p.msGetInputContext()),p.getInputContext&&(b.context=p.getInputContext()))))}),i),e.addListener(p,"compositionupdate",E,i),e.addListener(p,"keyup",(function(t){27==t.keyCode&&p.value.length<p.selectionStart&&(b||(w=p.value),x=k=-1,Z()),z()}),i),e.addListener(p,"keydown",z,i),e.addListener(p,"compositionend",_,i),this.getElement=function(){return p},this.setCommandMode=function(t){v=t,p.readOnly=!1},this.setReadOnly=function(t){v||(p.readOnly=t)},this.setCopyWithEmptySelection=function(){},this.onContextMenu=function(t){R=!0,Z(),i._emit("nativecontextmenu",{target:i,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,o){A=A||p.style.cssText,p.style.cssText=(o?"z-index:100000;":"")+(n.isIE?"opacity:0.1;":"")+"text-indent: -"+(x+k)*i.renderer.characterWidth*.5+"px;";var s=i.container.getBoundingClientRect(),a=(o=r.computedStyle(i.container),s.top+(parseInt(o.borderTopWidth)||0)),h=s.left+(parseInt(s.borderLeftWidth)||0),c=s.bottom-a-p.clientHeight-2;(s=function(t){r.translate(p,t.clientX-h-2,Math.min(t.clientY-a-2,c))})(t),"mousedown"==t.type&&(i.renderer.$isMousePressed=!0,clearTimeout(X),n.isWin&&e.capture(i.container,s,J))},this.onContextMenuClose=J,e.addListener(p,"mouseup",t=function(t){i.textInput.onContextMenu(t),J()},i),e.addListener(p,"mousedown",(function(t){t.preventDefault(),J()}),i),e.addListener(i.renderer.scroller,"contextmenu",t,i),e.addListener(p,"contextmenu",t,i),d&&function(t,i){var e=null,n=!1;function r(){var e,r,o,s;document.activeElement===i&&(n||b||t.$mouseHandler.isMousePressed||m||(r=i.selectionEnd,s=null,(o=0)==(e=i.selectionStart)?s=l.up:1==e?s=l.home:k<r&&"\n"==w[r]?s=l.end:e<x&&" "==w[e-1]?(s=l.left,o=u.option):e<x||e==x&&k!=x&&e==r?s=l.left:k<r&&2<w.slice(0,r).split("\n").length?s=l.down:k<r&&" "==w[r-1]?(s=l.right,o=u.option):(k<r||r==k&&k!=x&&e==r)&&(s=l.right),e!==r&&(o|=u.shift),s&&(!t.onCommandKey({},o,s)&&t.commands&&(s=l.keyCodeToString(s),(s=t.commands.findKeyCommand(o,s))&&t.execCommand(s)),x=e,k=r,Z(""))))}i.addEventListener("keydown",(function(){e&&clearTimeout(e),n=!0}),!0),i.addEventListener("keyup",(function(){e=setTimeout((function(){n=!1}),100)}),!0),document.addEventListener("selectionchange",r),t.on("destroy",(function(){document.removeEventListener("selectionchange",r)}))}(i,p)},i.$setUserAgentForTests=function(t,i){g=t,d=i}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(t,i){var e=t("../lib/useragent");function n(t){t.$clickSelection=null;var i=t.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(i){t[i]=this[i]}),this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function r(t,i){return(t.start.row==t.end.row?2*i.column-t.start.column-t.end.column:t.start.row!=t.end.row-1||t.start.column||t.end.column?2*i.row-t.start.row-t.end.row:i.column-4)<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var i=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,o=t.getButton();return 0!==o?(!r.getSelectionRange().isEmpty()&&1!=o||r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(t.domEvent),e.isMozilla||t.preventDefault()))):(this.mousedownEvent.time=Date.now(),!i||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,1<t.domEvent._clicks),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t)))},this.startSelect=function(t,i){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(t):i||e.selection.moveToPosition(t),i||this.select(),e.renderer.scroller.setCapture&&e.renderer.scroller.setCapture(),e.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var t,i,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(i=-1==(t=this.$clickSelection.comparePoint(n))?this.$clickSelection.end:1==t?this.$clickSelection.start:(n=(i=r(this.$clickSelection,n)).cursor,i.anchor),e.selection.setSelectionAnchor(i.row,i.column)),e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var i,e,n=this.editor,o=n.renderer.screenToTextCoordinates(this.x,this.y),s=n.selection[t](o.row,o.column);this.$clickSelection&&(i=this.$clickSelection.comparePoint(s.start),t=this.$clickSelection.comparePoint(s.end),-1==i&&t<=0?(e=this.$clickSelection.end,s.end.row==o.row&&s.end.column==o.column||(o=s.start)):1==t&&0<=i?(e=this.$clickSelection.start,s.start.row==o.row&&s.start.column==o.column||(o=s.end)):e=-1==i&&1==t?(o=s.end,s.start):(o=(s=r(this.$clickSelection,o)).cursor,s.anchor),n.selection.setSelectionAnchor(e.row,e.column)),n.selection.selectToPosition(o),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t=(i=this.mousedownEvent.y,t=this.y,Math.sqrt(Math.pow(this.x-this.mousedownEvent.x,2)+Math.pow(t-i,2))),i=Date.now();(0<t||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var i=t.getDocumentPosition(),e=this.editor;(t=e.session.getBracketRange(i))?(t.isEmpty()&&(t.start.column--,t.end.column++),this.setState("select")):(t=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=t,this.select()},this.onTripleClick=function(t){var i=t.getDocumentPosition(),e=this.editor;this.setState("selectByLines"),(t=e.getSelectionRange()).isMultiLine()&&t.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(t.start.row),this.$clickSelection.end=e.selection.getLineRange(t.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},this.onQuadClick=function(){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=t.domEvent.timeStamp,r=(a=n-e.t)?t.wheelX/a:e.vx,o=a?t.wheelY/a:e.vy;a<550&&(r=(r+e.vx)/2,o=(o+e.vy)/2);var s=Math.abs(r/o),a=!1;return 1<=s&&i.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(a=!0),(a=!!(s<=1&&i.renderer.isScrollableBy(0,t.wheelY*t.speed))||a)?e.allowed=n:n-e.allowed<550&&(Math.abs(r)<=1.5*Math.abs(e.vx)&&Math.abs(o)<=1.5*Math.abs(e.vy)?(a=!0,e.allowed=n):e.allowed=0),e.t=n,e.vx=r,e.vy=o,a?(i.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(n.prototype),i.DefaultHandlers=n})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(t,i){t("./lib/oop");var e=t("./lib/dom");function n(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=e.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(t){this.getElement().textContent=t},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,i){this.getElement().style.left=t+"px",this.getElement().style.top=i+"px"},this.setClassName=function(t){e.addCssClass(this.getElement(),t)},this.show=function(t,i,e){null!=t&&this.setText(t),null!=i&&null!=e&&this.setPosition(i,e),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),i.Tooltip=n})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(t,i){var e=t("../lib/dom"),n=t("../lib/oop"),r=t("../lib/event"),o=t("../tooltip").Tooltip;function s(t){o.call(this,t)}n.inherits(s,o),function(){this.setPosition=function(t,i){var e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();e<(t+=15)+r&&(t-=t+r-e),n<(i+=15)+s&&(i-=20+s),o.prototype.setPosition.call(this,t,i)}}.call(s.prototype),i.GutterHandler=function(t){var i,n,o,a=t.editor,h=a.renderer.$gutterLayer,c=new s(a.container);function l(){i=i&&clearTimeout(i),o&&(c.hide(),o=null,a._signal("hideGutterTooltip",c),a.off("mousewheel",l))}function u(t){c.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(i){if(a.isFocused()&&0==i.getButton()&&"foldWidgets"!=h.getRegion(i)){var e=i.getDocumentPosition().row,n=a.session.selection;if(i.getShiftKey())n.selectTo(e,0);else{if(2==i.domEvent.detail)return a.selectAll(),i.preventDefault();t.$clickSelection=a.selection.getLineRange(e)}return t.setState("selectByLines"),t.captureMouse(i),i.preventDefault()}})),t.editor.setDefaultHandler("guttermousemove",(function(r){if(e.hasCssClass(r.domEvent.target||r.domEvent.srcElement,"ace_fold-widget"))return l();o&&t.$tooltipFollowsMouse&&u(r),n=r,i=i||setTimeout((function(){i=null,(n&&!t.isMousePressed?function(){var i=n.getDocumentPosition().row,e=h.$annotations[i];if(!e)return l();if(i==a.session.getLength()){i=a.renderer.pixelToScreenCoordinates(0,n.y).row;var r=n.$pos;if(i>a.session.documentToScreenRow(r.row,r.column))return l()}o!=e&&(o=e.text.join("<br/>"),c.setHtml(o),c.show(),a._signal("showGutterTooltip",c),a.on("mousewheel",l),t.$tooltipFollowsMouse?u(n):(r=n.domEvent.target.getBoundingClientRect(),(e=c.getElement().style).left=r.right+"px",e.top=r.bottom+"px"))}:l)()}),50)})),r.addListener(a.renderer.$gutter,"mouseout",(function(){n=null,o&&!i&&(i=setTimeout((function(){i=null,l()}),50))}),a),a.on("changeSession",l)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,i){var e=t("../lib/event"),n=t("../lib/useragent");i=i.MouseEvent=function(t,i){this.domEvent=t,this.editor=i,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1},function(){this.stopPropagation=function(){e.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){e.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t,i=this.editor.getSelectionRange();return i.isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=i.contains(t.row,t.column)),this.$inSelection},this.getButton=function(){return e.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=n.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(i.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,i){var e=t("../lib/dom"),n=t("../lib/event"),r=t("../lib/useragent");function o(t){var i=t.editor,o=e.createElement("img");o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r.isOpera&&(o.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(i){t[i]=this[i]}),this),i.on("mousedown",this.onMouseDown.bind(t));var a,h,c,l,u,d,f,g,p,m,I,b=i.container,C=0;function A(){var t,e,n,r,o,a,l,u,f=d;l=d=i.renderer.screenToTextCoordinates(h,c),a=f,u=Date.now(),o=!a||l.row!=a.row,a=!a||l.column!=a.column,!m||o||a?(i.moveCursorToPosition(l),m=u,I={x:h,y:c}):5<s(I.x,I.y,h,c)?m=null:200<=u-m&&(i.renderer.scrollCursorIntoView(),m=null),t=d,e=f,n=Date.now(),r=i.renderer.layerConfig.lineHeight,o=i.renderer.layerConfig.characterWidth,a=i.renderer.scroller.getBoundingClientRect(),l={x:{left:h-a.left,right:a.right-h},y:{top:c-a.top,bottom:a.bottom-c}},u=Math.min(l.x.left,l.x.right),f=Math.min(l.y.top,l.y.bottom),a={row:t.row,column:t.column},u/o<=2&&(a.column+=l.x.left<l.x.right?-3:2),f/r<=1&&(a.row+=l.y.top<l.y.bottom?-1:1),l=t.column!=a.column,e=!e||t.row!=e.row,(r=t.row!=a.row)||l&&!e?p?200<=n-p&&i.renderer.scrollCursorIntoView(a):p=n:p=null}function v(){u=i.selection.toOrientedRange(),a=i.session.addMarker(u,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),A(),l=setInterval(A,20),C=0,n.addListener(document,"mousemove",x)}function y(){clearInterval(l),i.session.removeMarker(a),a=null,i.selection.fromOrientedRange(u),i.isFocused()&&!g&&i.$resetCursorStyle(),C=0,m=p=d=u=null,n.removeListener(document,"mousemove",x)}this.onDragStart=function(t){if(this.cancelDrag||!b.draggable){var e=this;return setTimeout((function(){e.startSelect(),e.captureMouse(t)}),0),t.preventDefault()}u=i.getSelectionRange();var n=t.dataTransfer;n.effectAllowed=i.getReadOnly()?"copy":"copyMove",r.isOpera&&(i.container.appendChild(o),o.scrollTop=0),n.setDragImage&&n.setDragImage(o,0,0),r.isOpera&&i.container.removeChild(o),n.clearData(),n.setData("Text",i.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(t){b.draggable=!1,g=!1,this.setState(null),i.getReadOnly()||(t=t.dataTransfer.dropEffect,f||"move"!=t||i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!i.getReadOnly()&&k(t.dataTransfer))return h=t.clientX,c=t.clientY,a||v(),C++,t.dataTransfer.dropEffect=f=j(t),n.preventDefault(t)},this.onDragOver=function(t){if(!i.getReadOnly()&&k(t.dataTransfer))return h=t.clientX,c=t.clientY,a||(v(),C++),null!==w&&(w=null),t.dataTransfer.dropEffect=f=j(t),n.preventDefault(t)},this.onDragLeave=function(t){if(--C<=0&&a)return y(),f=null,n.preventDefault(t)},this.onDrop=function(t){if(d){var e=t.dataTransfer;if(g)switch(f){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:i.moveText(u,d);break;case"copy":u=i.moveText(u,d,!0)}else e=e.getData("Text"),u={start:d,end:i.session.insert(d,e)},i.focus(),f=null;return y(),n.preventDefault(t)}},n.addListener(b,"dragstart",this.onDragStart.bind(t),i),n.addListener(b,"dragend",this.onDragEnd.bind(t),i),n.addListener(b,"dragenter",this.onDragEnter.bind(t),i),n.addListener(b,"dragover",this.onDragOver.bind(t),i),n.addListener(b,"dragleave",this.onDragLeave.bind(t),i),n.addListener(b,"drop",this.onDrop.bind(t),i);var w=null;function x(){null==w&&(w=setTimeout((function(){null!=w&&a&&y()}),20))}function k(t){return!(t=t.types)||Array.prototype.some.call(t,(function(t){return"text/plain"==t||"Text"==t}))}function j(t){var i=["copy","copymove","all","uninitialized"],e=r.isMac?t.altKey:t.ctrlKey,n="uninitialized";try{n=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var o="none";return e&&0<=i.indexOf(n)?o="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(n)?o="move":0<=i.indexOf(n)&&(o="copy"),o}}function s(t,i,e,n){return Math.sqrt(Math.pow(e-t,2)+Math.pow(n-i,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(){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor;t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging"),t.renderer.setCursorStyle(r.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(){var t=this.editor.container;r.isIE&&"dragReady"==this.state&&3<s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){var i,e,n;this.$dragEnabled&&(this.mousedownEvent=t,i=this.editor,n=t.inSelection(),e=t.getButton(),1===(t.domEvent.detail||1)&&0===e&&n&&(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(n=t.domEvent.target||t.domEvent.srcElement)&&(n.unselectable="on"),i.getDragDelay()?(r.isWebKit&&(this.cancelDrag=!0,i.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0)))}}).call(o.prototype),i.DragdropHandler=o})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(t,i){var e=t("./mouse_event").MouseEvent,n=t("../lib/event"),r=t("../lib/dom");i.addTouchListeners=function(t,i){var o,s,a,h,c,l,u,d,f,g="scroll",p=0,m=0,I=0,b=0;function C(){f||function(){function t(t){var o,s=t.target.getAttribute("action");if("more"==s||!n)return n=!n,o=i.getCopyText(),t=i.session.getUndoManager().hasUndo(),void f.replaceChild(r.buildDom(n?["span",!o&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],o&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],o&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],t&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),f.firstChild);"paste"==s?e.readText().then((function(t){i.execCommand(s,t)})):s&&("cut"!=s&&"copy"!=s||(e?e.writeText(i.getCopyText()):document.execCommand("copy")),i.execCommand(s)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=s&&i.focus()}var e=window.navigator&&window.navigator.clipboard,n=!1;f=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){g="menu",t.stopPropagation(),t.preventDefault(),i.textInput.focus()},ontouchend:function(i){i.stopPropagation(),i.preventDefault(),t(i)},onclick:t},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],i.container)}();var t=i.renderer.textToScreenCoordinates((o=i.selection.cursor).row,o.column),e=i.renderer.textToScreenCoordinates(0,0).pageX,n=i.renderer.scrollLeft,o=i.container.getBoundingClientRect();f.style.top=t.pageY-o.top-3+"px",t.pageX-o.left<o.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=e+n-o.left+"px"),f.style.display="",f.firstChild.style.display="none",i.on("input",A)}function A(){f&&(f.style.display="none"),i.off("input",A)}function v(){c=null,clearTimeout(c);var t=i.selection.getRange(),e=t.contains(u.row,u.column);!t.isEmpty()&&e||(i.selection.moveToPosition(u),i.selection.selectWord()),g="wait",C()}n.addListener(t,"contextmenu",(function(){d&&i.textInput.getElement().focus()}),i),n.addListener(t,"touchstart",(function(t){var n=t.touches;if(c||1<n.length)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=i.$mouseHandler.isMousePressed=!0;var r=i.renderer.layerConfig.lineHeight,l=i.renderer.layerConfig.lineHeight,f=t.timeStamp;h=f;var C=(x=n[0]).clientX,A=x.clientY;Math.abs(o-C)+Math.abs(s-A)>r&&(a=-1),o=t.clientX=C,s=t.clientY=A,I=b=0;var y=new e(t,i);if(u=y.getDocumentPosition(),f-a<500&&1==n.length&&!p)m++,t.preventDefault(),t.button=0,function(){c=null,clearTimeout(c),i.selection.moveToPosition(u);var t=2<=m?i.selection.getLineRange(u.row):i.session.getBracketRange(u);t&&!t.isEmpty()?i.selection.setRange(t):i.selection.selectWord(),g="wait"}();else{m=0;var w=i.selection.cursor,x=i.selection.isEmpty()?w:i.selection.anchor;if(C=i.renderer.$cursorLayer.getPixelPosition(w,!0),A=i.renderer.$cursorLayer.getPixelPosition(x,!0),y=i.renderer.scroller.getBoundingClientRect(),x=function(t,i){return(t/=l)*t+(i=i/r-.75)*i},t.clientX<y.left)return void(g="zoom");C=x(t.clientX-y.left-C.left+(w=i.renderer.scrollLeft),t.clientY-y.top-C.top+(n=i.renderer.layerConfig.offset)),n=x(t.clientX-y.left-A.left+w,t.clientY-y.top-A.top+n),C<3.5&&n<3.5&&(g=n<C?"cursor":"anchor"),g=n<3.5?"anchor":C<3.5?"cursor":"scroll",c=setTimeout(v,450)}a=f}),i),n.addListener(t,"touchend",(function(){d=i.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),"zoom"==g?(g="",p=0):c?(i.selection.moveToPosition(u),p=0,C()):"scroll"==g?(p+=60,l=setInterval((function(){p--<=0&&(clearInterval(l),l=null),Math.abs(I)<.01&&(I=0),Math.abs(b)<.01&&(b=0),p<20&&(I*=.9),p<20&&(b*=.9);var t=i.session.getScrollTop();i.renderer.scrollBy(10*I,10*b),t==i.session.getScrollTop()&&(p=0)}),10),A()):C(),clearTimeout(c),c=null}),i),n.addListener(t,"touchmove",(function(t){if(c&&(clearTimeout(c),c=null),!(1<(l=t.touches).length||"zoom"==g)){var n=o-(u=l[0]).clientX,r=s-u.clientY;if("wait"==g){if(!(4<n*n+r*r))return t.preventDefault();g="cursor"}o=u.clientX,s=u.clientY,t.clientX=u.clientX,t.clientY=u.clientY;var a,l,u=(l=t.timeStamp)-h;h=l,"scroll"==g?((a=new e(t,i)).speed=1,a.wheelX=n,a.wheelY=r,10*Math.abs(n)<Math.abs(r)&&(n=0),10*Math.abs(r)<Math.abs(n)&&(r=0),0!=u&&(I=n/u,b=r/u),i._emit("mousewheel",a),a.propagationStopped||(I=b=0)):(a=new e(t,i).getDocumentPosition(),"cursor"==g?i.selection.moveCursorToPosition(a):"anchor"==g&&i.selection.setSelectionAnchor(a.row,a.column),i.renderer.scrollCursorIntoView(a),t.preventDefault())}}),i)}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(t,i){var e=t("./dom");i.get=function(t,i){var e=new XMLHttpRequest;e.open("GET",t,!0),e.onreadystatechange=function(){4===e.readyState&&i(e.responseText)},e.send(null)},i.loadScript=function(t,i){var n=e.getDocumentHead(),r=document.createElement("script");r.src=t,n.appendChild(r),r.onload=r.onreadystatechange=function(t,e){!e&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,e||i())}},i.qualifyURL=function(t){var i=document.createElement("a");return i.href=t,i.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(t,i){function e(){this.propagationStopped=!0}function n(){this.defaultPrevented=!0}var r={};r._emit=r._dispatchEvent=function(t,i){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._defaultHandlers[t];if((o=this._eventRegistry[t]||[]).length||r){(i="object"==typeof i&&i?i:{}).type||(i.type=t),i.stopPropagation||(i.stopPropagation=e),i.preventDefault||(i.preventDefault=n);for(var o=o.slice(),s=0;s<o.length&&(o[s](i,this),!i.propagationStopped);s++);return r&&!i.defaultPrevented?r(i,this):void 0}},r._signal=function(t,i){if(e=(this._eventRegistry||{})[t])for(var e=e.slice(),n=0;n<e.length;n++)e[n](i,this)},r.once=function(t,i){var e=this;if(this.on(t,(function n(){e.off(t,n),i.apply(null,arguments)})),!i)return new Promise((function(t){i=t}))},r.setDefaultHandler=function(t,i){var e,n,r=this._defaultHandlers;(r=r||(this._defaultHandlers={_disabled_:{}}))[t]&&(n=r[t],(e=r._disabled_[t])||(r._disabled_[t]=e=[]),e.push(n),-1!=(n=e.indexOf(i))&&e.splice(n,1)),r[t]=i},r.removeDefaultHandler=function(t,i){var e,n=this._defaultHandlers;n&&(e=n._disabled_[t],n[t]==i?e&&this.setDefaultHandler(t,e.pop()):!e||-1!=(i=e.indexOf(i))&&e.splice(i,1))},r.on=r.addEventListener=function(t,i,e){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[t];return-1==(n=n||(this._eventRegistry[t]=[])).indexOf(i)&&n[e?"unshift":"push"](i),i},r.off=r.removeListener=r.removeEventListener=function(t,i){this._eventRegistry=this._eventRegistry||{},!(t=this._eventRegistry[t])||-1!==(i=t.indexOf(i))&&t.splice(i,1)},r.removeAllListeners=function(t){t||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[t]=void 0),this._defaultHandlers&&(this._defaultHandlers[t]=void 0)},i.EventEmitter=r})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,i){var e=t("./oop"),n=t("./event_emitter").EventEmitter,r={setOptions:function(t){Object.keys(t).forEach((function(i){this.setOption(i,t[i])}),this)},getOptions:function(t){var i,e={};return t?Array.isArray(t)||(e=t,t=Object.keys(e)):(i=this.$options,t=Object.keys(i).filter((function(t){return!i[t].hidden}))),t.forEach((function(t){e[t]=this.getOption(t)}),this),e},setOption:function(t,i){if(this["$"+t]!==i){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].setOption(t,i):(e.handlesSet||(this["$"+t]=i),void(e&&e.set&&e.set.call(this,i))):o('misspelled option "'+t+'"')}},getOption:function(t){var i=this.$options[t];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(t):i&&i.get?i.get.call(this):this["$"+t]:o('misspelled option "'+t+'"')}};function o(t){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function s(t,i){var e=new Error(t);e.data=i,"object"==typeof console&&console.error&&console.error(e),setTimeout((function(){throw e}))}(function(){e.implement(this,n),this.defineOptions=function(t,i,n){return t.$options||(this.$defaultOptions[i]=t.$options={}),Object.keys(n).forEach((function(i){var e=n[i];(e="string"==typeof e?{forwardTo:e}:e).name||(e.name=i),"initialValue"in(t.$options[e.name]=e)&&(t["$"+e.name]=e.initialValue)})),e.implement(t,r),this},this.resetOptions=function(t){Object.keys(t.$options).forEach((function(i){var e=t.$options[i];"value"in e&&t.setOption(i,e.value)}))},this.setDefaultValue=function(t,i,e){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][i])break;if(!this.$defaultOptions[t][i])return!1}var n=this.$defaultOptions[t]||(this.$defaultOptions[t]={});n[i]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,i,e):n[i].value=e)},this.setDefaultValues=function(t,i){Object.keys(i).forEach((function(e){this.setDefaultValue(t,e,i[e])}),this)},this.warn=o,this.reportError=s}).call((t=function(){this.$defaultOptions={}}).prototype),i.AppConfig=t})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(t,i,n){var r=t("./lib/lang"),o=(t("./lib/oop"),t("./lib/net")),s=t("./lib/app_config").AppConfig;n.exports=i=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};i.get=function(t){if(!h.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return h[t]},i.set=function(t,i){if(h.hasOwnProperty(t))h[t]=i;else if(0==this.setDefaultValue("",t,i))throw new Error("Unknown config key: "+t)},i.all=function(){return r.copyObject(h)},i.$modes={},i.moduleUrl=function(t,i){if(h.$moduleUrls[t])return h.$moduleUrls[t];var e=t.split("/"),n="snippets"==(i=i||e[e.length-2]||"")?"/":"-",r=e[e.length-1];return"worker"==i&&"-"==n&&(t=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g"),r=r.replace(t,"")),(!r||r==i)&&1<e.length&&(r=e[e.length-2]),null==(e=h[i+"Path"])?e=h.basePath:"/"==n&&(i=n=""),e&&"/"!=e.slice(-1)&&(e+="/"),e+i+n+r+this.get("suffix")},i.setModuleUrl=function(t,i){return h.$moduleUrls[t]=i},i.$loading={},i.loadModule=function(e,n){var r,s;Array.isArray(e)&&(s=e[0],e=e[1]);try{r=t(e)}catch(n){}if(r&&!i.$loading[e])return n&&n(r);if(i.$loading[e]||(i.$loading[e]=[]),i.$loading[e].push(n),!(1<i.$loading[e].length)){if(n=function(){t([e],(function(t){i._emit("load.module",{name:e,module:t});var n=i.$loading[e];i.$loading[e]=null,n.forEach((function(i){i&&i(t)}))}))},!i.get("packaged"))return n();o.loadScript(i.moduleUrl(e,s),n),c()}};var c=function(){h.basePath||h.workerPath||h.modePath||h.themePath||Object.keys(h.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function l(r){if(a&&a.document){h.packaged=r||t.packaged||n.packaged||a.define&&e.amdD.packaged;for(var o,s={},c="",l=((r=document.currentScript||document._currentScript)&&r.ownerDocument||document).getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u],f=d.src||d.getAttribute("src");if(f){for(var g=d.attributes,p=0,m=g.length;p<m;p++){var I=g[p];0===I.name.indexOf("data-ace-")&&(s[I.name.replace(/^data-ace-/,"").replace(/-(.)/g,(function(t,i){return i.toUpperCase()}))]=I.value)}(f=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/))&&(c=f[1])}}for(o in c&&(s.base=s.base||c,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[o]&&i.set(o,s[o])}}l(!0),i.init=l,i.version="1.4.12"})),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(t,i){var e=t("../lib/event"),n=t("../lib/useragent"),r=t("./default_handlers").DefaultHandlers,o=t("./default_gutter_handler").GutterHandler,s=t("./mouse_event").MouseEvent,a=t("./dragdrop_handler").DragdropHandler,h=t("./touch_handler").addTouchListeners,c=t("../config");(function(){this.onMouseEvent=function(t,i){this.editor._emit(t,new s(i,this.editor))},this.onMouseMove=function(t,i){var e=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;e&&e.length&&this.editor._emit(t,new s(i,this.editor))},this.onMouseWheel=function(t,i){var e=new s(i,this.editor);e.speed=2*this.$scrollSpeed,e.wheelX=i.wheelX,e.wheelY=i.wheelY,this.editor._emit(t,e)},this.setState=function(t){this.state=t},this.captureMouse=function(t,i){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var r=this.editor,o=this.editor.renderer;function a(t){if(t){if(n.isWebKit&&!t.which&&c.releaseMouse)return c.releaseMouse();c.x=t.clientX,c.y=t.clientY,i&&i(t),c.mouseEvent=new s(t,c.editor),c.$mouseMoved=!0}}function h(t){r.off("beforeEndOperation",u),clearInterval(d),l(),c[c.state+"End"]&&c[c.state+"End"](t),c.state="",c.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),c.$onCaptureMouseMove=c.releaseMouse=null,t&&c.onMouseEvent("mouseup",t),r.endOperation()}o.$isMousePressed=!0;var c=this,l=function(){c[c.state]&&c[c.state](),c.$mouseMoved=!1};if(n.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){h(t)}));var u=function(){c.releaseMouse&&r.curOp.command.name&&r.curOp.selectionChanged&&(c[c.state+"End"]&&c[c.state+"End"](),c.state="",c.releaseMouse())};r.on("beforeEndOperation",u),r.startOperation({command:{name:"mouse"}}),c.$onCaptureMouseMove=a,c.releaseMouse=e.capture(this.editor.container,a,h);var d=setInterval(l,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var t=function(i){i&&i.domEvent&&"contextmenu"!=i.domEvent.type||(this.editor.off("nativecontextmenu",t),i&&i.domEvent&&e.stopEvent(i.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call((t=function(t){var i=this;function s(){document.hasFocus&&document.hasFocus()&&(t.isFocused()||document.activeElement!=(t.textInput&&t.textInput.getElement()))||window.focus(),t.focus()}this.editor=t,new r(this),new o(this),new a(this);var c=t.renderer.getMouseEventTarget();e.addListener(c,"click",this.onMouseEvent.bind(this,"click"),t),e.addListener(c,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),e.addMultiMouseDownListener([c,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),e.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),h(t.container,t);var l=t.renderer.$gutter;e.addListener(l,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),e.addListener(l,"click",this.onMouseEvent.bind(this,"gutterclick"),t),e.addListener(l,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),e.addListener(l,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),e.addListener(c,"mousedown",s,t),e.addListener(l,"mousedown",s,t),n.isIE&&t.renderer.scrollBarV&&(e.addListener(t.renderer.scrollBarV.element,"mousedown",s,t),e.addListener(t.renderer.scrollBarH.element,"mousedown",s,t)),t.on("mousemove",(function(e){var n,r;i.state||i.$dragDelay||!i.$dragEnabled||(n=t.renderer.screenToTextCoordinates(e.x,e.y),r=t.session.selection.getRange(),e=t.renderer,!r.isEmpty()&&r.insideStart(n.row,n.column)?e.setCursorStyle("default"):e.setCursorStyle(""))}),t)}).prototype),c.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:n.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),i.MouseHandler=t})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(t,i){var e=t("../lib/dom");i.FoldHandler=function(t){t.on("click",(function(i){var n=i.getDocumentPosition(),r=t.session;(n=r.getFoldAt(n.row,n.column,1))&&(i.getAccelKey()?r.removeFold(n):r.expandFold(n),i.stop()),(i=i.domEvent&&i.domEvent.target)&&e.hasCssClass(i,"ace_inline_button")&&e.hasCssClass(i,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),t.renderer.scrollCursorIntoView())})),t.on("gutterclick",(function(i){var e,n;"foldWidgets"==t.renderer.$gutterLayer.getRegion(i)&&(e=i.getDocumentPosition().row,(n=t.session).foldWidgets&&n.foldWidgets[e]&&t.session.onFoldWidgetClick(e,i),t.isFocused()||t.focus(),i.stop())})),t.on("gutterdblclick",(function(i){var e,n,r;"foldWidgets"==t.renderer.$gutterLayer.getRegion(i)&&(r=i.getDocumentPosition().row,(n=(n=(e=t.session).getParentFoldRangeData(r,!0)).range||n.firstRange)&&((r=e.getFoldAt(r=n.start.row,e.getLine(r).length,1))?e.removeFold(r):(e.addFold("...",n),t.renderer.scrollCursorIntoView({row:n.start.row,column:0}))),i.stop())}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(t,i){var e=t("../lib/keys"),n=t("../lib/event");(function(){this.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0)},this.setKeyboardHandler=function(t){var i=this.$handlers;if(i[i.length-1]!=t){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(t,1)}},this.addKeyboardHandler=function(t,i){var e;t&&("function"!=typeof t||t.handleKeyboard||(t.handleKeyboard=t),-1!=(e=this.$handlers.indexOf(t))&&this.$handlers.splice(e,1),null==i?this.$handlers.push(t):this.$handlers.splice(i,0,t),-1==e&&t.attach&&t.attach(this.$editor))},this.removeKeyboardHandler=function(t){var i=this.$handlers.indexOf(t);return-1!=i&&(this.$handlers.splice(i,1),t.detach&&t.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var t=this.$data,i=t.editor;return this.$handlers.map((function(e){return e.getStatusText&&e.getStatusText(i,t)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(t,i,e,r){for(var o,s=!1,a=this.$editor.commands,h=this.$handlers.length;h--&&!((o=this.$handlers[h].handleKeyboard(this.$data,t,i,e,r))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,r))&&r&&-1!=t&&1!=o.passEvent&&1!=o.command.passEvent&&n.stopEvent(r),s)););return s||-1!=t||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,i)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(t,i,n){var r=e.keyCodeToString(n);return this.$callKeyboardHandlers(i,r,n,t)},this.onTextInput=function(t){return this.$callKeyboardHandlers(-1,t)}}).call((t=function(t){this.$editor=t,this.$data={editor:t},this.$handlers=[],this.setDefaultHandler(t.commands)}).prototype),i.KeyBinding=t})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(t,i){var e=0,n=0,r=!1,o=!1,s=!1,a=[[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]],h=[[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]],c=11,l=18,u=[l,l,l,l,l,l,l,l,l,6,5,6,8,5,l,l,l,l,l,l,l,l,l,l,l,l,l,l,5,5,5,6,8,4,4,c,c,c,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,l,l,l,l,l,l,5,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,9,4,c,c,c,c,4,4,4,4,0,4,4,l,4,4,c,c,2,2,4,0,4,4,4,2,0,4,4,4,4,4],d=[8,8,8,8,8,8,8,8,8,8,8,l,l,l,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,c,c,c,c,c,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function f(t,i,r){if(!(n<t))if(1!=t||1!=e||o)for(var s,a,h,c,l=r.length,u=0;u<l;){if(i[u]>=t){for(s=u+1;s<l&&i[s]>=t;)s++;for(a=u,h=s-1;a<h;a++,h--)c=r[a],r[a]=r[h],r[h]=c;u=s}u++}else r.reverse()}function g(t){var i=t.charCodeAt(0),e=i>>8;return 0==e?191<i?0:u[i]:5==e?/[\u0591-\u05f4]/.test(t)?1:0:6==e?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?12:/[\u0660-\u0669\u066b-\u066c]/.test(t)?3:1642==i?c:/[\u06f0-\u06f9]/.test(t)?2:7:32==e&&i<=8287?d[255&i]:254==e&&65136<=i?7:4}i.L=0,i.R=1,i.EN=2,i.ON_R=3,i.AN=4,i.R_H=5,i.B=6,i.RLE=7,i.DOT="·",i.doBidiReorder=function(t,u,d){if(t.length<2)return{};var p=t.split(""),m=new Array(p.length),I=new Array(p.length),b=[];e=d?1:0,function(t,i,u,d){var f,p,m,I,b=e?h:a,C=0,A=-1,v=null,y=null,w=[];if(!d)for(v=0,d=[];v<u;v++)d[v]=g(t[v]);for(n=e,s=o=r=!1,y=0;y<u;y++){if(f=C,w[y]=p=function(t,i,n,a){var h,u,d,f=i[a];switch(f){case 0:case 1:r=!1;case 4:case 3:return f;case 2:return r?3:2;case 7:return r=!0,1;case 8:return 4;case 9:return a<1||a+1>=i.length||2!=(h=n[a-1])&&3!=h||2!=(g=i[a+1])&&3!=g?4:(g=r?3:g)==h?g:4;case 10:return 2==(h=0<a?n[a-1]:5)&&a+1<i.length&&2==i[a+1]?2:4;case c:if(0<a&&2==n[a-1])return 2;if(r)return 4;for(d=a+1,u=i.length;d<u&&i[d]==c;)d++;return d<u&&2==i[d]?2:4;case 12:for(u=i.length,d=a+1;d<u&&12==i[d];)d++;var g;return d<u&&(h=i[d],(g=1425<=(g=t[a])&&g<=2303||64286==g)&&(1==h||7==h))?1:a<1||5==(h=i[a-1])?4:n[a-1];case 5:return o=!(r=!1),e;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:r=!1;case l:return 4}}(t,d,w,y),I=240&(C=b[f][p]),i[y]=m=b[C&=15][5],0<I)if(16==I){for(v=A;v<y;v++)i[v]=1;A=-1}else A=-1;if(b[C][6])-1==A&&(A=y);else if(-1<A){for(v=A;v<y;v++)i[v]=m;A=-1}5==d[y]&&(i[y]=0),n|=m}if(s)for(v=0;v<u;v++)if(6==d[v]){i[v]=e;for(var x=v-1;0<=x&&8==d[x];x--)i[x]=e}}(p,b,p.length,u);for(var C=0;C<m.length;m[C]=C,C++);for(f(2,b,m),f(1,b,m),C=0;C<m.length-1;C++)3===u[C]?b[C]=i.AN:1===b[C]&&(u[C]>7&&u[C]<13||4===u[C]||u[C]===l)?b[C]=i.ON_R:0<C&&"ل"===p[C-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[C])&&(b[C-1]=b[C]=i.R_H,C++);for(p[p.length-1]===i.DOT&&(b[p.length-1]=i.B),"‫"===p[0]&&(b[0]=i.RLE),C=0;C<m.length;C++)I[C]=b[m[C]];return{logicalFromVisual:m,bidiLevels:I}},i.hasBidiCharacters=function(t,i){for(var e=!1,n=0;n<t.length;n++)i[n]=g(t.charAt(n)),e||1!=i[n]&&7!=i[n]&&3!=i[n]||(e=!0);return e},i.getVisualFromLogicalIdx=function(t,i){for(var e=0;e<i.logicalFromVisual.length;e++)if(i.logicalFromVisual[e]==t)return e;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(t,i){var e=t("./lib/bidiutil"),n=t("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;(function(){this.isBidiRow=function(t,i,e){return!!this.seenBidi&&(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(i,e),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(t){this.seenBidi?this.currentRow=null:"insert"==t.action&&r.test(t.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var t=0,i=this.session.$screenRowCache;return!i.length||0<=(i=this.session.$getRowCacheIndex(i,this.currentRow))&&(t=this.session.$docRowCache[i]),t},this.getSplitIndex=function(){var t=0,i=this.session.$screenRowCache;if(i.length)for(var e,n=this.session.$getRowCacheIndex(i,this.currentRow);0<this.currentRow-t&&(e=this.session.$getRowCacheIndex(i,this.currentRow-t-1))===n;)n=e,t++;else t=this.currentRow;return t},this.updateRowLine=function(t,i){var r=(t=void 0===t?this.getDocumentRow():t)===this.session.getLength()-1?this.EOF:this.EOL;this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode?((t=this.session.$wrapData[t])&&(0<(i=void 0===i?this.getSplitIndex():i)&&t.length?(this.wrapIndent=t.indent,this.wrapOffset=this.wrapIndent*this.charWidths[e.L],this.line=i<t.length?this.line.substring(t[i-1],t[i]):this.line.substring(t[t.length-1])):this.line=this.line.substring(0,t[i])),i==t.length&&(this.line+=this.showInvisibles?r:e.DOT)):this.line+=this.showInvisibles?r:e.DOT;var o,s=this.session,a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(t,i){return"\t"===t||s.isFullWidth(t.charCodeAt(0))?(o="\t"===t?s.getScreenTabSize(i+a):2,a+=o-1,n.stringRepeat(e.DOT,o)):t})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==e.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var t=[];this.bidiMap=e.hasBidiCharacters(this.line,t)||this.isRtlDir?e.doBidiReorder(this.line,t,this.isRtlDir):{}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(t){var i;this.characterWidth!==t.$characterSize.width&&(this.fontMetrics=t,i=this.characterWidth=t.$characterSize.width,t=t.$measureCharWidth("ה"),this.charWidths[e.L]=this.charWidths[e.EN]=this.charWidths[e.ON_R]=i,this.charWidths[e.R]=this.charWidths[e.AN]=t,this.charWidths[e.R_H]=.45*t,this.charWidths[e.B]=this.charWidths[e.RLE]=0,this.currentRow=null)},this.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},this.setEolChar=function(t){this.EOL=t},this.setContentWidth=function(t){this.contentWidth=t},this.isRtlLine=function(t){return!!this.$isRtl||(null!=t?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(t,i){for(var e=t.getCursorPosition(),n=t.selection.getSelectionAnchor().row;n<=e.row;n++)i||t.session.getLine(n).charAt(0)!==t.session.$bidiHandler.RLE?i&&t.session.getLine(n).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:n},t.session.$bidiHandler.RLE):t.session.doc.removeInLine(n,0,1)},this.getPosLeft=function(t){t-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,n=i<t?this.session.getOverwrite()?t:t-1:i,r=e.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&t<=i&&o[r]%2!=0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&i<t&&o[r]%2==0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(t,i){var e,n=this.bidiMap,r=n.bidiLevels,o=[],s=0,a=Math.min(t,i)-this.wrapIndent,h=Math.max(t,i)-this.wrapIndent,c=!1,l=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f<r.length;f++)e=r[f],(c=a<=(d=n.logicalFromVisual[f])&&d<h)&&!l?u=s:!c&&l&&o.push({left:u,width:s-u}),s+=this.charWidths[e],l=c;if(c&&f===r.length&&o.push({left:u,width:s-u}),this.isRtlDir)for(var g=0;g<o.length;g++)o[g].left+=this.rtlLineOffset;return o},this.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var i=0,e=(t=Math.max(t,0),0),n=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[n]];for(this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e+o/2<t;){if(e+=o,n===r.length-1){o=0;break}o=this.charWidths[r[++n]]}return 0===(i=0<n&&r[n-1]%2!=0&&r[n]%2==0?(t<e&&n--,this.bidiMap.logicalFromVisual[n]):0<n&&r[n-1]%2==0&&r[n]%2!=0?1+(e<t?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===r.length-1&&0===o&&r[n-1]%2==0||!this.isRtlDir&&0===n&&r[n]%2!=0?1+this.bidiMap.logicalFromVisual[n]:(0<n&&r[n-1]%2!=0&&0!==o&&n--,this.bidiMap.logicalFromVisual[n]))&&this.isRtlDir&&i++,i+this.wrapIndent}}).call((t=function(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=e,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=r.test(t.getValue())}).prototype),i.BidiHandler=t})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(t,i){var e=t("./lib/oop"),n=t("./lib/lang"),r=t("./lib/event_emitter").EventEmitter,o=t("./range").Range;(function(){e.implement(this,r),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,i){this.$isEmpty=!1,this.anchor.setPosition(t,i)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,i=this.lead;return t.row>i.row||t.row==i.row&&t.column>i.column},this.getRange=function(){var t=this.anchor,i=this.lead;return this.$isEmpty?o.fromPoints(i,i):this.isBackwards()?o.fromPoints(i,t):o.fromPoints(t,i)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,i){var e=i?t.end:t.start;this.$setSelection(e.row,e.column,(t=i?t.start:t.end).row,t.column)},this.$setSelection=function(t,i,e,n){var r,s;this.$silent||(r=this.$isEmpty,s=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,i),this.cursor.setPosition(e,n),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection"))},this.$moveSelection=function(t){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),t.call(this)},this.selectTo=function(t,i){this.$moveSelection((function(){this.moveCursorTo(t,i)}))},this.selectToPosition=function(t){this.$moveSelection((function(){this.moveCursorToPosition(t)}))},this.moveTo=function(t,i){this.clearSelection(),this.moveCursorTo(t,i)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,i){var e;return void 0===i&&(t=(e=t||this.lead).row,i=e.column),this.session.getWordRange(t,i)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor();t=this.session.getAWordRange(t.row,t.column),this.setSelectionRange(t)},this.getLineRange=function(t,i){var e="number"==typeof t?t:this.lead.row;return t=(t=this.session.getFoldLine(e))?(e=t.start.row,t.end.row):e,!0===i?new o(e,0,t,this.session.getLine(t).length):new o(e,0,t+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,i,e){var n=t.column,r=t.column+i;return e<0&&(n=t.column-i,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(n,r).split(" ").length-1==i},this.moveCursorLeft=function(){var t,i=this.lead.getPosition();(t=this.session.getFoldAt(i.row,i.column,-1))?this.moveCursorTo(t.start.row,t.start.column):0===i.column?0<i.row&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length):(t=this.session.getTabSize(),this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var t,i=this.lead.getPosition();(t=this.session.getFoldAt(i.row,i.column,1))?this.moveCursorTo(t.end.row,t.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):(t=this.session.getTabSize(),this.wouldMoveIntoSoftTab(i=this.lead,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var t,i=this.lead.column,e=this.session.documentToScreenRow(t=this.lead.row,i);e=this.session.screenToDocumentPosition(e,0),(t=this.session.getDisplayLine(t,null,e.row,e.column).match(/^\s*/))[0].length==i||this.session.$useEmacsStyleLineStart||(e.column+=t[0].length),this.moveCursorToPosition(e)},this.moveCursorLineEnd=function(){var t=this.lead,i=this.session.getDocumentLastRowColumnPosition(t.row,t.column);this.lead.column==i.column&&(t=this.session.getLine(i.row),i.column!=t.length||0<(t=t.search(/\s+$/))&&(i.column=t)),this.moveCursorTo(i.row,i.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,i=this.doc.getLine(t).length;this.moveCursorTo(t,i)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,i=this.lead.column,e=this.doc.getLine(t),n=e.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,i,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(n)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=e.substring(i)),i>=e.length)return this.moveCursorTo(t,e.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.moveCursorLongWordLeft=function(){var t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))this.moveCursorTo(e.start.row,e.start.column);else{var e=this.session.getFoldStringAt(t,i,-1);if(null==e&&(e=this.doc.getLine(t).substring(0,i)),e=n.stringReverse(e),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(e)&&(i-=this.session.nonTokenRe.lastIndex,e=e.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(0<t&&this.moveCursorWordLeft());this.session.tokenRe.exec(e)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(t){var i,e=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))e=this.session.tokenRe.lastIndex;else{for(;(i=t[e])&&n.test(i);)e++;if(e<1)for(r.lastIndex=0;(i=t[e])&&!r.test(i);)if(r.lastIndex=0,e++,n.test(i)){if(2<e){e--;break}for(;(i=t[e])&&n.test(i);)e++;if(2<e)break}}return r.lastIndex=0,e},this.moveCursorShortWordRight=function(){var t=this.lead.row,i=this.lead.column,e=this.doc.getLine(t),n=e.substring(i),r=this.session.getFoldAt(t,i,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(i==e.length){for(var o=this.doc.getLength();n=this.doc.getLine(++t),t<o&&/^\s*$/.test(n););/^\s+/.test(n)||(n=""),i=0}e=this.$shortWordEndIndex(n),this.moveCursorTo(t,i+e)},this.moveCursorShortWordLeft=function(){var t=this.lead.row,i=this.lead.column;if(r=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(r.start.row,r.start.column);var e=this.session.getLine(t).substring(0,i);if(0===i){for(;e=this.doc.getLine(--t),0<t&&/^\s*$/.test(e););i=e.length,/\s+$/.test(e)||(e="")}var r=n.stringReverse(e);return r=this.$shortWordEndIndex(r),this.moveCursorTo(t,i-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,i){var e,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===i&&(0!==t&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(e=this.session.lineWidgets[this.lead.row],t<0?t-=e.rowsAbove||0:0<t&&(t+=e.rowCount-(e.rowsAbove||0)));var r=this.session.screenToDocumentPosition(n.row+t,n.column,r);this.moveCursorTo(r.row,r.column+i,0===i)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,i,e){var n=this.session.getFoldAt(t,i,1);n&&(t=n.start.row,i=n.start.column),this.$keepDesiredColumnOnChange=!0,n=this.session.getLine(t),/[\uDC00-\uDFFF]/.test(n.charAt(i))&&n.charAt(i-1)&&(this.lead.row==t&&this.lead.column==i+1?i-=1:i+=1),this.lead.setPosition(t,i),this.$keepDesiredColumnOnChange=!1,e||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,i,e){i=this.session.screenToDocumentPosition(t,i),this.moveCursorTo(i.row,i.column,e)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var i=this.getRange();return t?(t.start.column=i.start.column,t.start.row=i.start.row,t.end.column=i.end.column,t.end.row=i.end.row):t=i,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var i=this.getCursor();try{t(this);var e=this.getCursor();return o.fromPoints(i,e)}catch(t){return o.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},this.toJSON=function(){var t;return this.rangeCount?t=this.ranges.map((function(t){var i=t.clone();return i.isBackwards=t.cursor==t.start,i})):(t=this.getRange()).isBackwards=this.isBackwards(),t},this.fromJSON=function(t){if(null==t.start){if(this.rangeList&&1<t.length){this.toSingleRange(t[0]);for(var i=t.length;i--;){var e=o.fromPoints(t[i].start,t[i].end);t[i].isBackwards&&(e.cursor=e.start),this.addRange(e,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(t[i]))return!1;return!0}}).call((t=function(t){this.session=t,this.doc=t.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(t){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),i.$isEmpty||i.$silent||i._emit("changeSelection"),i.$keepDesiredColumnOnChange||t.old.column==t.value.column||(i.$desiredColumn=null)})),this.anchor.on("change",(function(){i.$anchorChanged=!0,i.$isEmpty||i.$silent||i._emit("changeSelection")}))}).prototype),i.Selection=t})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(t,i){var e=t("./config"),n=2e3;(function(){this.$setMaxTokenCount=function(t){n=0|t},this.$applyToken=function(t){var i=this.splitRegex.exec(t).slice(1),e=this.token.apply(this,i);if("string"==typeof e)return[{type:e,value:t}];for(var n=[],r=0,o=e.length;r<o;r++)i[r]&&(n[n.length]={type:e[r],value:i[r]});return n},this.$arrayTokens=function(t){if(!t)return[];var i=this.splitRegex.exec(t);if(!i)return"text";for(var e=[],n=this.tokenArray,r=0,o=n.length;r<o;r++)i[r+1]&&(e[e.length]={type:n[r],value:i[r+1]});return e},this.removeCapturingGroups=function(t){return t.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,(function(t,i){return i?"(?:":t}))},this.createSplitterRegexp=function(t,i){var e,n,r;return-1!=t.indexOf("(?=")&&(e=0,n=!1,r={},t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(t,i,o,s,a,h){return n?n="]"!=a:a?n=!0:s?(e==r.stack&&(r.end=h+1,r.stack=-1),e--):o&&(e++,1!=o.length&&(r.stack=e,r.start=h)),t})),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))),"$"!=(t="^"!=t.charAt(0)?"^"+t:t).charAt(t.length-1)&&(t+="$"),new RegExp(t,(i||"").replace("g",""))},this.getLineTokens=function(t,i){var e;i&&"string"!=typeof i?"#tmp"===(i=(e=i.slice(0))[0])&&(e.shift(),i=e.shift()):e=[];for(var r,o=i||"start",s=(s=this.states[o])||this.states[o="start"],a=this.matchMappings[o],h=this.regExps[o],c=[],l=h.lastIndex=0,u=0,d={type:null,value:""};r=h.exec(t);){var f,g=a.defaultToken,p=null,m=r[0],I=h.lastIndex;I-m.length>l&&(f=t.substring(l,I-m.length),d.type==g?d.value+=f:(d.type&&c.push(d),d={type:g,value:f}));for(var b=0;b<r.length-2;b++)if(void 0!==r[b+1]){g=(p=s[a[b]]).onMatch?p.onMatch(m,o,e,t):p.token,p.next&&(o="string"==typeof p.next?p.next:p.next(o,e),(s=this.states[o])||(this.reportError("state doesn't exist",o),s=this.states[o="start"]),a=this.matchMappings[o],(h=this.regExps[o]).lastIndex=l=I),p.consumeLineEnd&&(l=I);break}if(m)if("string"==typeof g)p&&!1===p.merge||d.type!==g?(d.type&&c.push(d),d={type:g,value:m}):d.value+=m;else if(g)for(d.type&&c.push(d),d={type:null,value:""},b=0;b<g.length;b++)c.push(g[b]);if(l==t.length)break;if(l=I,u++>n){for(u>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:t});l<t.length;)d.type&&c.push(d),d={value:t.substring(l,l+=500),type:"overflow"};o="start",e=[];break}}return d.type&&c.push(d),1<e.length&&e[0]!==o&&e.unshift("#tmp",o),{tokens:c,state:e.length?e:o}},this.reportError=e.reportError}).call((t=function(t){for(var i in this.states=t,this.regExps={},this.matchMappings={},this.states){for(var e=this.states[i],n=[],r=0,o=this.matchMappings[i]={defaultToken:"text"},s="g",a=[],h=0;h<e.length;h++){var c,l,u=e[h];u.defaultToken&&(o.defaultToken=u.defaultToken),u.caseInsensitive&&(s="gi"),null!=u.regex&&(u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1)),c=u.regex,l=new RegExp("(?:("+c+")|(.))").exec("a").length-2,Array.isArray(u.token)?1==u.token.length||1==l?u.token=u.token[0]:l-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:l-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(u.onMatch=1<l?this.$applyToken:u.token),1<l&&(c=/\\\d/.test(u.regex)?u.regex.replace(/\\([0-9]+)/g,(function(t,i){return"\\"+(parseInt(i,10)+r+1)})):(l=1,this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||a.push(u)),o[r]=h,r+=l,n.push(c),u.onMatch||(u.onMatch=null))}n.length||(o[0]=0,n.push("$")),a.forEach((function(t){t.splitRegex=this.createSplitterRegexp(t.regex,s)}),this),this.regExps[i]=new RegExp("("+n.join(")|(")+")|($)",s)}}).prototype),i.Tokenizer=t})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(t,i){var e=t("../lib/lang");(function(){function t(t,i){return"start"==t&&!i.length||i.unshift(this.nextState,t),this.nextState}function i(t,i){return i.shift(),i.shift()||"start"}this.addRules=function(t,i){if(i)for(var e in t){for(var n=t[e],r=0;r<n.length;r++){var o=n[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(i)&&(o.next=i+o.next),o.nextState&&0!==o.nextState.indexOf(i)&&(o.nextState=i+o.nextState))}this.$rules[i+e]=n}else for(var e in t)this.$rules[e]=t[e]},this.getRules=function(){return this.$rules},this.embedRules=function(t,i,n,r,o){if(t="function"==typeof t?(new t).getRules():t,r)for(var s=0;s<r.length;s++)r[s]=i+r[s];else for(var a in r=[],t)r.push(i+a);if(this.addRules(t,i),n){var h=Array.prototype[o?"push":"unshift"];for(s=0;s<r.length;s++)h.apply(this.$rules[r[s]],e.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds},this.normalizeRules=function(){var e=0,n=this.$rules;Object.keys(n).forEach((function r(o){var s=n[o];s.processed=!0;for(var a=0;a<s.length;a++){var h=s[a],c=null;Array.isArray(h)&&(c=h,h={}),!h.regex&&h.start&&(h.regex=h.start,h.next||(h.next=[]),h.next.push({defaultToken:h.token},{token:h.token+".end",regex:h.end||h.start,next:"pop"}),h.token=h.token+".start",h.push=!0);var l,u=h.next||h.push;if(u&&Array.isArray(u)?((l=h.stateName)||("string"!=typeof(l=h.token)&&(l=l[0]||""),n[l]&&(l+=e++)),n[l]=u,r(h.next=l)):"pop"==u&&(h.next=i),h.push&&(h.nextState=h.next||h.push,h.next=t,delete h.push),h.rules)for(var d in h.rules)n[d]?n[d].push&&n[d].push.apply(n[d],h.rules[d]):n[d]=h.rules[d];(c=(u="string"==typeof h?h:h.include)?Array.isArray(u)?u.map((function(t){return n[t]})):n[u]:c)&&(c=[a,1].concat(c),h.noEscape&&(c=c.filter((function(t){return!t.next}))),s.splice.apply(s,c),a--),h.keywordMap&&(h.token=this.createKeywordMapper(h.keywordMap,h.defaultToken||"text",h.caseInsensitive),delete h.defaultToken)}}),this)},this.createKeywordMapper=function(t,i,e,n){var r=Object.create(null);return this.$keywordList=[],Object.keys(t).forEach((function(i){for(var o=t[i].split(n||"|"),s=o.length;s--;){var a=o[s];this.$keywordList.push(a),e&&(a=a.toLowerCase()),r[a]=i}}),this),t=null,e?function(t){return r[t.toLowerCase()]||i}:function(t){return r[t]||i}},this.getKeywords=function(){return this.$keywords}}).call((t=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),i.TextHighlightRules=t})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(t,i){function e(){this.$behaviours={}}(function(){this.add=function(t,i,e){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][i]=e},this.addBehaviours=function(t){for(var i in t)for(var e in t[i])this.add(i,e,t[i][e])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,i){i=("function"==typeof t?new t:t).getBehaviours(i),this.addBehaviours(i)},this.getBehaviours=function(t){if(t){for(var i={},e=0;e<t.length;e++)this.$behaviours[t[e]]&&(i[t[e]]=this.$behaviours[t[e]]);return i}return this.$behaviours}}).call(e.prototype),i.Behaviour=e})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(t,i){var e=t("./range").Range;(function(){this.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]},this.stepForward=function(){var t;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,t=t||this.$session.getLength(),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,i=this.$tokenIndex,e=t[i].start;if(void 0!==e)return e;for(e=0;0<i;)e+=t[--i].value.length;return e},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],i=this.getCurrentTokenColumn();return new e(this.$row,i,this.$row,i+t.value.length)}}).call((t=function(t,i,e){this.$session=t,this.$row=i,this.$rowTokens=t.getTokens(i),e=t.getTokenAt(i,e),this.$tokenIndex=e?e.index:-1}).prototype),i.TokenIterator=t})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(t,i){function e(t){var i=-1;if(t.multiSelect&&(i=t.selection.index,u.rangeCount!=t.multiSelect.rangeCount&&(u={rangeCount:t.multiSelect.rangeCount})),u[i])return r=u[i];r=u[i]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function n(t,i,e,n){var r=t.end.row-t.start.row;return{text:e+i+n,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}}var r,o=t("../../lib/oop"),s=t("../behaviour").Behaviour,a=t("../../token_iterator").TokenIterator,h=t("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(t){this.add("braces","insertion",(function(i,o,s,a,c){var l=s.getCursorPosition(),u=a.doc.getLine(l.row);if("{"==c){e(s);var d=s.getSelectionRange(),g=a.doc.getTextRange(d);return""!==g&&"{"!==g&&s.getWrapBehavioursEnabled()?n(d,g,"{","}"):f.isSaneInsertion(s,a)?/[\]\}\)]/.test(u[l.column])||s.inMultiSelectMode||t&&t.braces?(f.recordAutoInsert(s,a,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(s,a,"{"),{text:"{",selection:[1,1]}):void 0}if("}"==c){e(s);var p=u.substring(l.column,l.column+1);if("}"==p&&null!==a.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&f.isAutoInsertedClosing(l,u,c))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){if(e(s),s="",f.isMaybeInsertedClosing(l,u)&&(s=h.stringRepeat("}",r.maybeInsertedBrackets),f.clearMaybeInsertedClosing()),"}"===(p=u.substring(l.column,l.column+1))){var m=a.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;m=this.$getIndent(a.getLine(m.row))}else{if(!s)return void f.clearMaybeInsertedClosing();m=this.$getIndent(u)}return{text:"\n"+(a=m+a.getTabString())+"\n"+m+s,selection:[1,a.length,1,a.length]}}f.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,i,n,o,s){var a=o.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==a){if(e(n),"}"==o.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,i,r,o,s){if("("==s){e(r);var a=r.getSelectionRange(),h=o.doc.getTextRange(a);return""!==h&&r.getWrapBehavioursEnabled()?n(a,h,"(",")"):f.isSaneInsertion(r,o)?(f.recordAutoInsert(r,o,")"),{text:"()",selection:[1,1]}):void 0}if(")"==s&&(e(r),a=r.getCursorPosition(),")"==(r=(h=o.doc.getLine(a.row)).substring(a.column,a.column+1))&&null!==o.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,h,s)))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}})),this.add("parens","deletion",(function(t,i,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==s&&(e(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,i,r,o,s){if("["==s){e(r);var a=r.getSelectionRange(),h=o.doc.getTextRange(a);return""!==h&&r.getWrapBehavioursEnabled()?n(a,h,"[","]"):f.isSaneInsertion(r,o)?(f.recordAutoInsert(r,o,"]"),{text:"[]",selection:[1,1]}):void 0}if("]"==s&&(e(r),a=r.getCursorPosition(),"]"==(r=(h=o.doc.getLine(a.row)).substring(a.column,a.column+1))&&null!==o.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,h,s)))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}})),this.add("brackets","deletion",(function(t,i,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==s&&(e(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(t,i,r,o,s){var a=o.$mode.$quotes||d;if(1==s.length&&a[s]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(s))){e(r);var h=s,c=r.getSelectionRange();if(!(""===(g=o.doc.getTextRange(c))||1==g.length&&a[g])&&r.getWrapBehavioursEnabled())return n(c,g,h,h);if(!g){var l,u=r.getCursorPosition(),f=o.doc.getLine(u.row),g=(s=f.substring(u.column-1,u.column),a=f.substring(u.column,u.column+1),c=o.getTokenAt(u.row,u.column),o.getTokenAt(u.row,u.column+1));if("\\"==s&&c&&/escape/.test(c.type))return null;if(r=c&&/string|escape/.test(c.type),c=!g||/string|escape/.test(g.type),a==h)(l=r!==c)&&/string\.end/.test(g.type)&&(l=!1);else{if(r&&!c)return null;if(r&&c)return null;if((r=o.$mode.tokenRe).lastIndex=0,c=r.test(s),r.lastIndex=0,o=r.test(s),c||o)return null;if(a&&!/[\s;,.})\]\\]/.test(a))return null;if(u=f[u.column-2],s==h&&(u==h||r.test(u)))return null;l=!0}return{text:l?h+h:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,i,n,r,o){var s=r.$mode.$quotes||d,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&s.hasOwnProperty(a)&&(e(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))};f.isSaneInsertion=function(t,i){var e=t.getCursorPosition(),n=new a(i,e.row,e.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",c)){if(/[)}\]]/.test(t.session.getLine(e.row)[e.column]))return!0;if(i=new a(i,e.row,e.column+1),!this.$matchTokenType(i.getCurrentToken()||"text",c))return!1}return n.stepForward(),n.getCurrentTokenRow()!==e.row||this.$matchTokenType(n.getCurrentToken()||"text",l)},f.$matchTokenType=function(t,i){return-1<i.indexOf(t.type||t)},f.recordAutoInsert=function(t,i,e){t=t.getCursorPosition(),i=i.doc.getLine(t.row),this.isAutoInsertedClosing(t,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=t.row,r.autoInsertedLineEnd=e+i.substr(t.column),r.autoInsertedBrackets++},f.recordMaybeInsert=function(t,i,e){t=t.getCursorPosition(),i=i.doc.getLine(t.row),this.isMaybeInsertedClosing(t,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=t.row,r.maybeInsertedLineStart=i.substr(0,t.column)+e,r.maybeInsertedLineEnd=i.substr(t.column),r.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(t,i,e){return 0<r.autoInsertedBrackets&&t.row===r.autoInsertedRow&&e===r.autoInsertedLineEnd[0]&&i.substr(t.column)===r.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(t,i){return 0<r.maybeInsertedBrackets&&t.row===r.maybeInsertedRow&&i.substr(t.column)===r.maybeInsertedLineEnd&&i.substr(0,t.column)==r.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(f,s),i.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(t,i){for(var e=[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],n=0,r=[],o=0;o<e.length;o+=2)r.push(n+=e[o]),e[o+1]&&r.push(45,n+=e[o+1]);i.wordChars=String.fromCharCode.apply(null,r)})),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(t,i){var e=t("../config"),n=t("../tokenizer").Tokenizer,r=t("./text_highlight_rules").TextHighlightRules,o=t("./behaviour/cstyle").CstyleBehaviour,s=t("../unicode"),a=t("../lib/lang"),h=t("../token_iterator").TokenIterator,c=t("../range").Range;(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+s.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,i,e,n){var r=i.doc,o=!0,s=!0,h=1/0,c=i.getTabSize(),l=!1;if(this.lineCommentStart){m=Array.isArray(this.lineCommentStart)?(b=this.lineCommentStart.map(a.escapeRegExp).join("|"),this.lineCommentStart[0]):(b=a.escapeRegExp(this.lineCommentStart),this.lineCommentStart),b=new RegExp("^(\\s*)(?:"+b+") ?"),l=i.getUseSoftTabs();var u=function(t,i){var e,n,o=t.match(b);o&&(p(t,e=o[1].length,n=o[0].length)||" "!=o[0][n-1]||n--,r.removeInLine(i,e,n))},d=m+" ",f=function(t,i){o&&!/\S/.test(t)||(p(t,h,h)?r.insertInLine({row:i,column:h},d):r.insertInLine({row:i,column:h},m))},g=function(t){return b.test(t)},p=function(t,i,e){for(var n=0;i--&&" "==t.charAt(i);)n++;if(n%c!=0)return!1;for(n=0;" "==t.charAt(e++);)n++;return 2<c?n%c!=c-1:n%c==0}}else{if(!this.blockComment)return!1;var m=this.blockComment.start,I=this.blockComment.end,b=new RegExp("^(\\s*)(?:"+a.escapeRegExp(m)+")"),C=new RegExp("(?:"+a.escapeRegExp(I)+")\\s*$");f=function(t,i){g(t,i)||o&&!/\S/.test(t)||(r.insertInLine({row:i,column:t.length},I),r.insertInLine({row:i,column:h},m))},u=function(t,i){var e;(e=t.match(C))&&r.removeInLine(i,t.length-e[0].length,t.length),(e=t.match(b))&&r.removeInLine(i,e[1].length,e[0].length)},g=function(t,e){if(b.test(t))return!0;for(var n=i.getTokens(e),r=0;r<n.length;r++)if("comment"===n[r].type)return!0}}function A(t){for(var i=e;i<=n;i++)t(r.getLine(i),i)}var v=1/0;A((function(t,i){var e=t.search(/\S/);-1!==e?(e<h&&(h=e),s&&!g(t,i)&&(s=!1)):v>t.length&&(v=t.length)})),h==1/0&&(h=v,s=o=!1),l&&h%c!=0&&(h=Math.floor(h/c)*c),A(s?u:f)},this.toggleBlockComment=function(t,i,e,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new h(i,n.row,n.column)).getCurrentToken(),l=i.selection.toOrientedRange();if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.start))){var u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+p,f=new c(u,d,u,d+r.start.length);break}a=g.stepBackward()}var g,p;for(a=(g=new h(i,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.end))){u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+p;var m=new c(u,d,u,d+r.end.length);break}a=g.stepForward()}m&&i.remove(m),f&&(i.remove(f),o=f.start.row,s=-r.start.length)}else s=r.start.length,o=e.start.row,i.insert(e.end,r.end),i.insert(e.start,r.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(l.end.column+=s),i.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(t,i){return this.$getIndent(i)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(t){for(var i in this.$embeds=[],this.$modes={},t){var n,r,o;t[i]&&(r=(n=t[i]).prototype.$id,(o=e.$modes[r])||(e.$modes[r]=o=new n),e.$modes[i]||(e.$modes[i]=o),this.$embeds.push(i),this.$modes[i]=o)}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(i=0;i<s.length;i++)!function(t){var e=s[i],n=t[e];t[s[i]]=function(){return this.$delegator(e,arguments,n)}}(this)},this.$delegator=function(t,i,e){var n=i[0]||"start";if("string"!=typeof n){if(Array.isArray(n[2])){var r=n[2][n[2].length-1];if(s=this.$modes[r])return s[t].apply(s,[n[1]].concat([].slice.call(i,1)))}n=n[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=n.split(this.$embeds[o]);if(!a[0]&&a[1])return i[0]=a[1],(s=this.$modes[this.$embeds[o]])[t].apply(s,i)}return r=e.apply(this,i),e?r:void 0},this.transformAction=function(t,i,e,n,r){if(this.$behaviour){var o,s=this.$behaviour.getBehaviours();for(o in s)if(s[o][i]){var a=s[o][i].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var i=this.$tokenizer.rules,e=[];for(s in i)for(var n=i[s],r=0,o=n.length;r<o;r++)if("string"==typeof n[r].token)/keyword|support|storage/.test(n[r].token)&&e.push(n[r].regex);else if("object"==typeof n[r].token)for(var s,a=0,h=n[r].token.length;a<h;a++)/keyword|support|storage/.test(n[r].token[a])&&(s=n[r].regex.match(/\(.+?\)/g)[a],e.push(s.substr(1,s.length-2)));this.completionKeywords=e}return t?e.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){return(this.$keywordList||this.$createKeywordList()).map((function(t){return{name:t,value:t,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call((t=function(){this.HighlightRules=r}).prototype),i.Mode=t})),ace.define("ace/apply_delta",["require","exports","module"],(function(t,i){i.applyDelta=function(t,i){var e=i.start.row,n=i.start.column,r=t[e]||"";switch(i.action){case"insert":1===i.lines.length?t[e]=r.substring(0,n)+i.lines[0]+r.substring(n):(s=[e,1].concat(i.lines),t.splice.apply(t,s),t[e]=r.substring(0,n)+t[e],t[e+i.lines.length-1]+=r.substring(n));break;case"remove":var o=i.end.column,s=i.end.row;e===s?t[e]=r.substring(0,n)+r.substring(o):t.splice(e,s-e+1,r.substring(0,n)+t[s].substring(o))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,i){var e=t("./lib/oop"),n=t("./lib/event_emitter").EventEmitter;i=i.Anchor=function(t,i,e){this.$onChange=this.onChange.bind(this),this.attach(t),void 0===e?this.setPosition(i.row,i.column):this.setPosition(i,e)},function(){function t(t,i,e){return e=e?t.column<=i.column:t.column<i.column,t.row<i.row||t.row==i.row&&e}e.implement(this,n),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(i){i.start.row==i.end.row&&i.start.row!=this.row||i.start.row>this.row||(i=function(i,e,n){var r="insert"==i.action,o=(r?1:-1)*(i.end.row-i.start.row),s=(r?1:-1)*(i.end.column-i.start.column),a=i.start;return i=r?a:i.end,t(e,a,n)?{row:e.row,column:e.column}:t(i,e,!n)?{row:e.row+o,column:e.column+(e.row==i.row?s:0)}:{row:a.row,column:a.column}}(i,{row:this.row,column:this.column},this.$insertRight),this.setPosition(i.row,i.column,!0))},this.setPosition=function(t,i,e){t=e?{row:t,column:i}:this.$clipPositionToDocument(t,i),this.row==t.row&&this.column==t.column||(i={row:this.row,column:this.column},this.row=t.row,this.column=t.column,this._signal("change",{old:i,value:t}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,i){var e={};return t>=this.document.getLength()?(e.row=Math.max(0,this.document.getLength()-1),e.column=this.document.getLine(e.row).length):t<0?(e.row=0,e.column=0):(e.row=t,e.column=Math.min(this.document.getLine(e.row).length,Math.max(0,i))),i<0&&(e.column=0),e}}.call(i.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(t,i){var e=t("./lib/oop"),n=t("./apply_delta").applyDelta,r=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,s=t("./anchor").Anchor;(function(){e.implement(this,r),this.setValue=function(t){var i=this.getLength()-1;this.remove(new o(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,i){return new s(this,t,i)},this.$split=0==="aaa".split(/a/).length?function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){t=t.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,i){return this.$lines.slice(t,i+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var i,e;return t.start.row===t.end.row?i=[this.getLine(t.start.row).substring(t.start.column,t.end.column)]:((i=this.getLines(t.start.row,t.end.row))[0]=(i[0]||"").substring(t.start.column),t.end.row-t.start.row==(e=i.length-1)&&(i[e]=i[e].substring(0,t.end.column))),i},this.insertLines=function(t,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,i)},this.removeLines=function(t,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,i)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(t,this.$split(i))},this.insertInLine=function(t,i){var e=this.clippedPos(t.row,t.column);return t=this.pos(t.row,t.column+i.length),this.applyDelta({start:e,end:t,action:"insert",lines:[i]},!0),this.clonePos(t)},this.clippedPos=function(t,i){var e=this.getLength();return void 0===t?t=e:t<0?t=0:e<=t&&(t=e-1,i=void 0),e=this.getLine(t),null==i&&(i=e.length),{row:t,column:i=Math.min(Math.max(i,0),e.length)}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,i){return{row:t,column:i}},this.$clipPosition=function(t){var i=this.getLength();return t.row>=i?(t.row=Math.max(0,i-1),t.column=this.getLine(i-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,i){var e;e=(t=Math.min(Math.max(t,0),this.getLength()))<this.getLength()?(i=i.concat([""]),0):(i=[""].concat(i),this.$lines[--t].length),this.insertMergedLines({row:t,column:e},i)},this.insertMergedLines=function(t,i){var e=this.clippedPos(t.row,t.column);return this.applyDelta({start:e,end:t={row:e.row+i.length-1,column:(1==i.length?e.column:0)+i[i.length-1].length},action:"insert",lines:i}),this.clonePos(t)},this.remove=function(t){var i=this.clippedPos(t.start.row,t.start.column);return t=this.clippedPos(t.end.row,t.end.column),this.applyDelta({start:i,end:t,action:"remove",lines:this.getLinesForRange({start:i,end:t})}),this.clonePos(i)},this.removeInLine=function(t,i,e){return i=this.clippedPos(t,i),e=this.clippedPos(t,e),this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})},!0),this.clonePos(i)},this.removeFullLines=function(t,i){t=Math.min(Math.max(0,t),this.getLength()-1);var e=(i=Math.min(Math.max(0,i),this.getLength()-1))==this.getLength()-1&&0<t,n=i<this.getLength()-1,r=e?t-1:t,s=e?this.getLine(r).length:0;return e=n?i+1:i,n=n?0:this.getLine(e).length,n=new o(r,s,e,n),i=this.$lines.slice(t,i+1),this.applyDelta({start:n.start,end:n.end,action:"remove",lines:this.getLinesForRange(n)}),i},this.removeNewLine=function(t){t<this.getLength()-1&&0<=t&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,i){return t instanceof o||(t=o.fromPoints(t.start,t.end)),0===i.length&&t.isEmpty()?t.start:i==this.getTextRange(t)?t.end:(this.remove(t),i?this.insert(t.start,i):t.start)},this.applyDeltas=function(t){for(var i=0;i<t.length;i++)this.applyDelta(t[i])},this.revertDeltas=function(t){for(var i=t.length-1;0<=i;i--)this.revertDelta(t[i])},this.applyDelta=function(t,i){var e="insert"==t.action;(e?t.lines.length<=1&&!t.lines[0]:!o.comparePoints(t.start,t.end))||(e&&2e4<t.lines.length?this.$splitAndapplyLargeDelta(t,2e4):(n(this.$lines,t,i),this._signal("change",t)))},this.$safeApplyDelta=function(t){var i=this.$lines.length;("remove"==t.action&&t.start.row<i&&t.end.row<i||"insert"==t.action&&t.start.row<=i)&&this.applyDelta(t)},this.$splitAndapplyLargeDelta=function(t,i){for(var e=t.lines,n=e.length-i+1,r=t.start.row,o=t.start.column,s=0,a=0;s<n;s=a){var h=e.slice(s,a+=i-1);h.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:t.action,lines:h},!0)}t.lines=e.slice(s),t.start.row=r+s,t.start.column=o,this.applyDelta(t,!0)},this.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:"insert"==t.action?"remove":"insert",lines:t.lines.slice()})},this.indexToPosition=function(t,i){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=i||0,o=e.length;r<o;r++)if((t-=e[r].length+n)<0)return{row:r,column:t+e[r].length+n};return{row:o-1,column:t+e[o-1].length+n}},this.positionToIndex=function(t,i){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,o=Math.min(t.row,e.length),s=i||0;s<o;++s)r+=e[s].length+n;return r+t.column}}).call((t=function(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)}).prototype),i.Document=t})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,i){var e=t("./lib/oop"),n=t("./lib/event_emitter").EventEmitter;(function(){e.implement(this,n),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,i){this._signal("update",{data:{first:t,last:i}})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var i=t.start.row,e=t.end.row-i;0==e?this.lines[i]=null:"remove"==t.action?(this.lines.splice(i,1+e,null),this.states.splice(i,1+e,null)):((e=Array(1+e)).unshift(i,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)),this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var i=this.doc.getLine(t),e=this.tokenizer.getLineTokens(i,e=this.states[t-1],t);return this.states[t]+""!=e.state+""?(this.states[t]=e.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=e.tokens}}).call((t=function(t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var i=this;this.$worker=function(){if(i.running){for(var t=new Date,e=i.currentLine,n=-1,r=i.doc,o=e;i.lines[e];)e++;var s=r.getLength(),a=0;for(i.running=!1;e<s;){for(i.$tokenizeRow(e),n=e;e++,i.lines[e];);if(++a%5==0&&20<new Date-t){i.running=setTimeout(i.$worker,20);break}}i.currentLine=e,o<=(n=-1==n?e:n)&&i.fireUpdateEvent(o,n)}}}).prototype),i.BackgroundTokenizer=t})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,i){var e=t("./lib/lang"),n=(t("./lib/oop"),t("./range").Range);(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,i,r,o){if(this.regExp)for(var s=o.lastRow,a=o.firstRow;a<=s;a++){var h=this.cache[a];null==h&&(h=(h=(h=e.getMatchOffsets(r.getLine(a),this.regExp)).length>this.MAX_RANGES?h.slice(0,this.MAX_RANGES):h).map((function(t){return new n(a,t.offset,a,t.offset+t.length)})),this.cache[a]=h.length?h:"");for(var c=h.length;c--;)i.drawSingleLineMarker(t,h[c].toScreenRange(r),this.clazz,o)}}}).call((t=function(t,i,e){this.setRegexp(t),this.clazz=i,this.type=e||"text"}).prototype),i.SearchHighlight=t})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(t,i){var e=t("../range").Range;function n(t,i){this.foldData=t,Array.isArray(i)?this.folds=i:i=this.folds=[i],this.range=new e(i[0].start.row,i[0].start.column,(t=i[i.length-1]).end.row,t.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(t){t.setFoldLine(this)}),this)}(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach((function(i){i.start.row+=t,i.end.row+=t}))},this.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort((function(t,i){return-t.range.compareEnd(i.start.row,i.start.column)})),0<this.range.compareEnd(t.start.row,t.start.column)?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,i,e){var n,r,o=0,s=this.folds,a=!0;null==i&&(i=this.end.row,e=this.end.column);for(var h=0;h<s.length;h++){if(-1==(r=(n=s[h]).range.compareStart(i,e)))return void t(null,i,e,o,a);if(!t(null,n.start.row,n.start.column,o,a)&&t(n.placeholder,n.start.row,n.start.column,o)||0===r)return;a=!n.sameRow,o=n.end.column}t(null,i,e,o,a)},this.getNextFoldTo=function(t,i){for(var e,n,r=0;r<this.folds.length;r++){if(-1==(n=(e=this.folds[r]).range.compareEnd(t,i)))return{fold:e,kind:"after"};if(0===n)return{fold:e,kind:"inside"}}return null},this.addRemoveChars=function(t,i,e){var n,r=this.getNextFoldTo(t,i);if(r)if(n=r.fold,"inside"==r.kind&&n.start.column!=i&&n.start.row!=t)window.console&&window.console.log(t,i,n);else if(n.start.row==t){var o,s=(o=this.folds).indexOf(n);for(0===s&&(this.start.column+=e);s<o.length;s++){if((n=o[s]).start.column+=e,!n.sameRow)return;n.end.column+=e}this.end.column+=e}},this.split=function(t,i){if(!(r=this.getNextFoldTo(t,i))||"inside"==r.kind)return null;i=this.foldData;var e,r=(t=this.folds).indexOf(r.fold);return this.end.row=(e=t[r-1]).end.row,this.end.column=e.end.column,t=new n(i,t=t.splice(r,t.length-r)),i.splice(i.indexOf(this)+1,0,t),t},this.merge=function(t){for(var i=t.folds,e=0;e<i.length;e++)this.addFold(i[e]);var n=this.foldData;n.splice(n.indexOf(t),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach((function(i){t.push(" "+i.toString())})),t.push("]"),t.join("\n")},this.idxToPosition=function(t){for(var i=0,e=0;e<this.folds.length;e++){var n=this.folds[e];if((t-=n.start.column-i)<0)return{row:n.start.row,column:n.start.column+t};if((t-=n.placeholder.length)<0)return n.start;i=n.end.column}return{row:this.end.row,column:this.end.column+t}}}).call(n.prototype),i.FoldLine=n})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(t,i){var e=t("./range").Range.comparePoints;(function(){this.comparePoints=e,this.pointIndex=function(t,i,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=e(t,s.end);if(!(0<a))return s=e(t,s.start),0===a?i&&0!==s?-o-2:o:0<s||0===s&&!i?o:-o-1}return-o-1},this.add=function(t){var i=!t.isEmpty(),e=this.pointIndex(t.start,i);return(i=this.pointIndex(t.end,i,e=e<0?-e-1:e))<0?i=-i-1:i++,this.ranges.splice(e,i-e,t)},this.addList=function(t){for(var i=[],e=t.length;e--;)i.push.apply(i,this.add(t[e]));return i},this.substractPoint=function(t){if(0<=(t=this.pointIndex(t)))return this.ranges.splice(t,1)},this.merge=function(){for(var t=[],i=this.ranges,n=(i=i.sort((function(t,i){return e(t.start,i.start)})))[0],r=1;r<i.length;r++){var o=n,s=e(o.end,(n=i[r]).start);s<0||(0!=s||o.isEmpty()||n.isEmpty())&&(e(o.end,n.end)<0&&(o.end.row=n.end.row,o.end.column=n.end.column),i.splice(r,1),t.push(n),n=o,r--)}return this.ranges=i,t},this.contains=function(t,i){return 0<=this.pointIndex({row:t,column:i})},this.containsPoint=function(t){return 0<=this.pointIndex(t)},this.rangeAtPoint=function(t){if(0<=(t=this.pointIndex(t)))return this.ranges[t]},this.clipRows=function(t,i){var e=this.ranges;if(e[0].start.row>i||e[e.length-1].start.row<t)return[];t=this.pointIndex({row:t,column:0});var n=this.pointIndex({row:i,column:0},t=t<0?-t-1:t);n<0&&(n=-n-1);for(var r=[],o=t;o<n;o++)r.push(e[o]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(t){for(var i=t.start,e=t.end,n=i.row,r=e.row,o=this.ranges,s=0,a=o.length;s<a&&!((h=o[s]).end.row>=n);s++);var h;if("insert"==t.action)for(var c=r-n,l=-i.column+e.column;s<a&&!((h=o[s]).start.row>n);s++)h.start.row==n&&h.start.column>=i.column&&(h.start.column==i.column&&this.$bias<=0||(h.start.column+=l,h.start.row+=c)),h.end.row==n&&h.end.column>=i.column&&(h.end.column==i.column&&this.$bias<0||(h.end.column==i.column&&0<l&&s<a-1&&h.end.column>h.start.column&&h.end.column==o[s+1].start.column&&(h.end.column-=l),h.end.column+=l,h.end.row+=c));else for(c=n-r,l=i.column-e.column;s<a&&!((h=o[s]).start.row>r);s++)h.end.row<r&&(n<h.end.row||n==h.end.row&&i.column<h.end.column)?(h.end.row=n,h.end.column=i.column):h.end.row==r?h.end.column<=e.column?(c||h.end.column>i.column)&&(h.end.column=i.column,h.end.row=i.row):(h.end.column+=l,h.end.row+=c):h.end.row>r&&(h.end.row+=c),h.start.row<r&&(n<h.start.row||n==h.start.row&&i.column<h.start.column)?(h.start.row=n,h.start.column=i.column):h.start.row==r?h.start.column<=e.column?(c||h.start.column>i.column)&&(h.start.column=i.column,h.start.row=i.row):(h.start.column+=l,h.start.row+=c):h.start.row>r&&(h.start.row+=c);if(0!=c&&s<a)for(;s<a;s++)(h=o[s]).start.row+=c,h.end.row+=c}}).call((t=function(){this.ranges=[],this.$bias=1}).prototype),i.RangeList=t})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(t,i){var e=t("../range_list").RangeList,n=(t=t("../lib/oop"),i.Fold=function(t,i){this.foldLine=null,this.placeholder=i,this.range=t,this.start=t.start,this.end=t.end,this.sameRow=t.start.row==t.end.row,this.subFolds=this.ranges=[]});function r(t,i){t.row-=i.row,0==t.row&&(t.column-=i.column)}function o(t,i){0==t.row&&(t.column+=i.column),t.row+=i.row}t.inherits(n,e),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach((function(i){i.setFoldLine(t)}))},this.clone=function(){var t=this.range.clone(),i=new n(t,this.placeholder);return this.subFolds.forEach((function(t){i.subFolds.push(t.clone())})),i.collapseChildren=this.collapseChildren,i},this.addSubFold=function(t){if(!this.range.isEqual(t)){r((s=t).start,a=this.start),r(s.end,a);for(var i=t.start.row,e=t.start.column,n=0,o=-1;n<this.subFolds.length&&1==(o=this.subFolds[n].range.compare(i,e));n++);var s=this.subFolds[n],a=0;if(0==o){if(s.range.containsRange(t))return s.addSubFold(t);a=1}i=t.range.end.row,e=t.range.end.column;var h=n;for(o=-1;h<this.subFolds.length&&1==(o=this.subFolds[h].range.compare(i,e));h++);0==o&&h++;for(var c=this.subFolds.splice(n,h-n,t),l=0==o?c.length-1:c.length,u=a;u<l;u++)t.addSubFold(c[u]);return t.setFoldLine(this.foldLine),t}},this.restoreRange=function(t){return o((i=t).start,t=this.start),void o(i.end,t);var i}}.call(n.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(t,i){var e=t("../range").Range,n=t("./fold_line").FoldLine,r=t("./fold").Fold,o=t("../token_iterator").TokenIterator;i.Folding=function(){this.getFoldAt=function(t,i,e){var n=this.getFoldLine(t);if(!n)return null;for(var r=n.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(t,i)&&(1!=e||!s.isEnd(t,i)||s.isEmpty())&&(-1!=e||!s.isStart(t,i)||s.isEmpty()))return r[o]}},this.getFoldsInRange=function(t){var i=t.start,e=t.end,n=this.$foldData,r=[];i.column+=1,--e.column;for(var o=0;o<n.length;o++)if(2!=(h=n[o].range.compareRange(t))){if(-2==h)break;for(var s=n[o].folds,a=0;a<s.length;a++){var h,c=s[a];if(-2==(h=c.range.compareRange(t)))break;if(2!=h){if(42==h)break;r.push(c)}}}return--i.column,e.column+=1,r},this.getFoldsInRangeList=function(t){var i;return Array.isArray(t)?(i=[],t.forEach((function(t){i=i.concat(this.getFoldsInRange(t))}),this)):i=this.getFoldsInRange(t),i},this.getAllFolds=function(){for(var t=[],i=this.$foldData,e=0;e<i.length;e++)for(var n=0;n<i[e].folds.length;n++)t.push(i[e].folds[n]);return t},this.getFoldStringAt=function(t,i,e,n){if(!(n=n||this.getFoldLine(t)))return null;for(var r,o={end:{column:0}},s=0;s<n.folds.length;s++){var a,h=(a=n.folds[s]).range.compareEnd(t,i);if(-1==h){r=this.getLine(a.start.row).substring(o.end.column,a.start.column);break}if(0===h)return null;o=a}return r=r||this.getLine(a.start.row).substring(o.end.column),-1==e?r.substring(0,i-o.end.column):1==e?r.substring(i-o.end.column):r},this.getFoldLine=function(t,i){var e=this.$foldData,n=0;for(-1==(n=i?e.indexOf(i):n)&&(n=0);n<e.length;n++){var r=e[n];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,i){var e=this.$foldData,n=0;for(-1==(n=i?e.indexOf(i):n)&&(n=0);n<e.length;n++){var r=e[n];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,i){for(var e=this.$foldData,n=i-t+1,r=0;r<e.length;r++){var o=(s=e[r]).end.row,s=s.start.row;if(i<=o){s<i&&(t<=s?n-=i-s:n=0);break}t<=o&&(n-=t<=s?o-s:o-t+1)}return n},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort((function(t,i){return t.start.row-i.start.row})),t},this.addFold=function(t,i){var e,o=this.$foldData,s=!1;t instanceof r?e=t:(e=new r(i,t)).collapseChildren=i.collapseChildren,this.$clipRangeToDocument(e.range);var a=e.start.row,h=e.start.column,c=e.end.row,l=e.end.column;if(t=this.getFoldAt(a,h,1),i=this.getFoldAt(c,l,-1),t&&i==t)return t.addSubFold(e);t&&!t.range.isStart(a,h)&&this.removeFold(t),i&&!i.range.isEnd(c,l)&&this.removeFold(i),0<(i=this.getFoldsInRange(e.range)).length&&(this.removeFolds(i),e.collapseChildren||i.forEach((function(t){e.addSubFold(t)})));for(var u=0;u<o.length;u++){var d=o[u];if(c==d.start.row){d.addFold(e),s=!0;break}if(a==d.end.row){if(d.addFold(e),s=!0,!e.sameRow){var f=o[u+1];if(f&&f.start.row==c){d.merge(f);break}}break}if(c<=d.start.row)break}return s||(d=this.$addFoldLine(new n(this.$foldData,e))),this.$useWrapMode?this.$updateWrapData(d.start.row,d.start.row):this.$updateRowLengthCache(d.start.row,d.start.row),this.$modified=!0,this._signal("changeFold",{data:e,action:"add"}),e},this.addFolds=function(t){t.forEach((function(t){this.addFold(t)}),this)},this.removeFold=function(t){var i=t.foldLine,e=i.start.row,n=i.end.row,r=this.$foldData,o=i.folds;1==o.length?r.splice(r.indexOf(i),1):i.range.isEnd(t.end.row,t.end.column)?(o.pop(),i.end.row=o[o.length-1].end.row,i.end.column=o[o.length-1].end.column):i.range.isStart(t.start.row,t.start.column)?(o.shift(),i.start.row=o[0].start.row,i.start.column=o[0].start.column):t.sameRow?o.splice(o.indexOf(t),1):((o=(i=i.split(t.start.row,t.start.column)).folds).shift(),i.start.row=o[0].start.row,i.start.column=o[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(e,n):this.$updateRowLengthCache(e,n)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var i=[],e=0;e<t.length;e++)i.push(t[e]);i.forEach((function(t){this.removeFold(t)}),this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach((function(i){t.restoreRange(i),this.addFold(i)}),this),0<t.collapseChildren&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach((function(t){this.expandFold(t)}),this)},this.unfold=function(t,i){var n;if(null==t?(n=new e(0,0,this.getLength(),0),null==i&&(i=!0)):n="number"==typeof t?new e(t,0,t,this.getLine(t).length):"row"in t?e.fromPoints(t,t):t,n=this.getFoldsInRangeList(n),0!=i?this.removeFolds(n):this.expandFolds(n),n.length)return n},this.isRowFolded=function(t,i){return!!this.getFoldLine(t,i)},this.getRowFoldEnd=function(t,i){return(i=this.getFoldLine(t,i))?i.end.row:t},this.getRowFoldStart=function(t,i){return(i=this.getFoldLine(t,i))?i.start.row:t},this.getFoldDisplayLine=function(t,i,e,n,r){null==n&&(n=t.start.row),null==r&&(r=0),null==i&&(i=t.end.row),null==e&&(e=this.getLine(i).length);var o=this.doc,s="";return t.walk((function(t,i,e,a){if(!(i<n)){if(i==n){if(e<r)return;a=Math.max(r,a)}s+=null!=t?t:o.getLine(i).substring(a,e)}}),i,e),s},this.getDisplayLine=function(t,i,e,n){var r=this.getFoldLine(t);return r?this.getFoldDisplayLine(r,t,i,e,n):(t=this.doc.getLine(t)).substring(n||0,i||t.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map((function(i){return i=i.folds.map((function(t){return t.clone()})),new n(t,i)}))},this.toggleFold=function(t){var i,e=this.selection.getRange();if(e.isEmpty()){var n=e.start;if(r=this.getFoldAt(n.row,n.column))return void this.expandFold(r);(i=this.findMatchingBracket(n))?1==e.comparePoint(i)?e.end=i:(e.start=i,e.start.column++,e.end.column--):(i=this.findMatchingBracket({row:n.row,column:n.column+1}))?(1==e.comparePoint(i)?e.end=i:e.start=i,e.start.column++):e=this.getCommentFoldRange(n.row,n.column)||e}else{if(n=this.getFoldsInRange(e),t&&n.length)return void this.expandFolds(n);1==n.length&&(r=n[0])}if((r=r||this.getFoldAt(e.start.row,e.start.column))&&r.range.toString()==e.toString())this.expandFold(r);else{var r="...";if(!e.isMultiLine()){if((r=this.getTextRange(e)).length<4)return;r=r.trim().substring(0,2)+".."}this.addFold(r,e)}},this.getCommentFoldRange=function(t,i,n){var r=new o(this,t,i),s=r.getCurrentToken(),a=s&&s.type;if(s&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var h=new RegExp(a);if(a=new e,1!=n){for(;(s=r.stepBackward())&&h.test(s.type););r.stepForward()}if(a.start.row=r.getCurrentTokenRow(),a.start.column=r.getCurrentTokenColumn()+2,r=new o(this,t,i),-1!=n){var c=-1;do{if(s=r.stepForward(),-1==c){var l=this.getState(r.$row);h.test(l)||(c=r.$row)}else if(r.$row>c)break}while(s&&h.test(s.type));s=r.stepBackward()}else s=r.getCurrentToken();return a.end.row=r.getCurrentTokenRow(),a.end.column=r.getCurrentTokenColumn()+s.value.length-2,a}},this.foldAll=function(t,i,e,n){null==e&&(e=1e5);var r=this.foldWidgets;if(r){i=i||this.getLength();for(var o,s=t=t||0;s<i;s++)null==r[s]&&(r[s]=this.getFoldWidget(s)),"start"==r[s]&&(n&&!n(s)||(o=this.getFoldWidgetRange(s))&&o.isMultiLine()&&o.end.row<=i&&o.start.row>=t&&(s=o.end.row,o.collapseChildren=e,this.addFold("...",o)))}},this.foldToLevel=function(t){for(this.foldAll();0<t--;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,(function(i){for(var e=t.getTokens(i),n=0;n<e.length;n++){var r=e[n];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=t&&("manual"==(this.$foldStyle=t)&&this.unfold(),t=this.$foldMode,this.$setFolding(null),this.$setFolding(t))},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,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(t,i){var e=this.foldWidgets;if(!e||i&&e[t])return{};for(var n=t-1;0<=n;){var r=e[n];if("start"==(r=null==r?e[n]=this.getFoldWidget(n):r)){var o=this.getFoldWidgetRange(n),s=s||o;if(o&&o.end.row>=t)break}n--}return{range:-1!==n&&o,firstRange:s}},this.onFoldWidgetClick=function(t,i){var e={children:(i=i.domEvent).shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey};this.$toggleFoldWidget(t,e)||(i=i.target||i.srcElement)&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")},this.$toggleFoldWidget=function(t,i){if(this.getFoldWidget){var e,n,r=this.getFoldWidget(t),o=this.getLine(t);return(o=this.getFoldAt(t,-1==(r="end"===r?-1:1)?0:o.length,r))?(i.children||i.all?this.removeFold(o):this.expandFold(o),o):(r=this.getFoldWidgetRange(t,!0))&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1))&&r.isEqual(o.range)?(this.removeFold(o),o):(i.siblings?((o=this.getParentFoldRangeData(t)).range&&(e=o.range.start.row+1,n=o.range.end.row),this.foldAll(e,n,i.all?1e4:0)):i.children?(n=r?r.end.row:this.getLength(),this.foldAll(t+1,n,i.all?1e4:0)):r&&(i.all&&(r.collapseChildren=1e4),this.addFold("...",r)),r)}},this.toggleFoldWidget=function(){var t,i,e=this.selection.getCursor().row;e=this.getRowFoldStart(e),(i=this.$toggleFoldWidget(e,{}))||(i=(t=this.getParentFoldRangeData(e,!0)).range||t.firstRange)&&((e=this.getFoldAt(e=i.start.row,this.getLine(e).length,1))?this.removeFold(e):this.addFold("...",i))},this.updateFoldWidgets=function(t){var i=t.start.row,e=t.end.row-i;0==e?this.foldWidgets[i]=null:"remove"==t.action?this.foldWidgets.splice(i,1+e,null):((e=Array(1+e)).unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(t){(t=t.data).first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(t,i){var e=t("../token_iterator").TokenIterator,n=t("../range").Range;i.BracketMatch=function(){this.findMatchingBracket=function(t,i){return 0==t.column||""==(i=i||this.getLine(t.row).charAt(t.column-1))?null:(i=i.match(/([\(\[\{])|([\)\]\}])/))?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var i,e,r=this.getLine(t.row),o=!0,s=r.charAt(t.column-1),a=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(a||(s=r.charAt(t.column),t={row:t.row,column:t.column+1},a=s&&s.match(/([\(\[\{])|([\)\]\}])/),o=!1),!a)return null;if(a[1]){if(!(e=this.$findClosingBracket(a[1],t)))return null;i=n.fromPoints(t,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{if(!(e=this.$findOpeningBracket(a[2],t)))return null;i=n.fromPoints(e,t),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(t){var i=this.getLine(t.row),e=i.charAt(t.column-1),r=e&&e.match(/([\(\[\{])|([\)\]\}])/);return r||(e=i.charAt(t.column),t={row:t.row,column:t.column+1},r=e&&e.match(/([\(\[\{])|([\)\]\}])/)),r?(e=new n(t.row,t.column-1,t.row,t.column),(t=r[1]?this.$findClosingBracket(r[1],t):this.$findOpeningBracket(r[2],t))?[e,new n(t.row,t.column,t.row,t.column+1)]:[e]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,i,n){var r=this.$brackets[t],o=1,s=new e(this,i.row,i.column),a=s.getCurrentToken();if(a=a||s.stepForward()){n=n||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var h=i.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;0<=h;){var l=c.charAt(h);if(l==r){if(0==--o)return{row:s.getCurrentTokenRow(),column:h+s.getCurrentTokenColumn()}}else l==t&&(o+=1);--h}for(;(a=s.stepBackward())&&!n.test(a.type););if(null==a)break;h=(c=a.value).length-1}return null}},this.$findClosingBracket=function(t,i,n){var r=this.$brackets[t],o=1,s=new e(this,i.row,i.column),a=s.getCurrentToken();if(a=a||s.stepForward()){n=n||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var h=i.column-s.getCurrentTokenColumn();;){for(var c=a.value,l=c.length;h<l;){var u=c.charAt(h);if(u==r){if(0==--o)return{row:s.getCurrentTokenRow(),column:h+s.getCurrentTokenColumn()}}else u==t&&(o+=1);h+=1}for(;(a=s.stepForward())&&!n.test(a.type););if(null==a)break;h=0}return null}}}})),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/edit_session/folding","ace/edit_session/bracket_match"],(function(t,i){var e=t("./lib/oop"),n=t("./lib/lang"),r=t("./bidihandler").BidiHandler,o=t("./config"),s=t("./lib/event_emitter").EventEmitter,a=t("./selection").Selection,h=t("./mode/text").Mode,c=t("./range").Range,l=t("./document").Document,u=t("./background_tokenizer").BackgroundTokenizer,d=t("./search_highlight").SearchHighlight,f=function(t,i){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new l(t)),this.setDocument(t),this.selection=new a(this),this.$bidiHandler=new r(this),o.resetOptions(this),this.setMode(i),o._signal("session",this)};f.$uid=0,function(){e.implement(this,s),this.setDocument=function(t){this.doc&&this.doc.removeListener("change",this.$onChange),(this.doc=t).on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var i=this.$docRowCache.length;(t=this.$getRowCacheIndex(this.$docRowCache,t)+1)<i&&(this.$docRowCache.splice(t,i),this.$screenRowCache.splice(t,i))},this.$getRowCacheIndex=function(t,i){for(var e=0,n=t.length-1;e<=n;){var r=e+n>>1,o=t[r];if(o<i)e=1+r;else{if(!(i<o))return r;n=r-1}}return e-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(t){this.$resetRowCache((t=t.data).start.row)},this.onChange=function(t){this.$modified=!0,this.$bidiHandler.onChange(t),this.$resetRowCache(t.start.row);var i=this.$updateInternalDataOnChange(t);!this.$fromUndo&&this.$undoManager&&(i&&i.length&&(this.$undoManager.add({action:"removeFolds",folds:i},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(t,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),this._signal("change",t)},this.setValue=function(t){this.doc.setValue(t),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(t){return this.bgTokenizer.getState(t)},this.getTokens=function(t){return this.bgTokenizer.getTokens(t)},this.getTokenAt=function(t,i){var e=this.bgTokenizer.getTokens(t),n=0;if(null==i){var r=e.length-1;n=this.getLine(t).length}else for(r=0;r<e.length&&!(i<=(n+=e[r].value.length));r++);return(t=e[r])?(t.index=r,t.start=n-t.value.length,t):null},this.setUndoManager=function(t){var i;this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t?(t.addSession(i=this),this.$syncInformUndoManager=function(){i.$informUndoManager.cancel(),i.mergeUndoDeltas=!1},this.$informUndoManager=n.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?n.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,i){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+i,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(t,i){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+i,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var i=0;i<t.length;i++)this.$breakpoints[t[i]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(t,i){(i=void 0===i?"ace_breakpoint":i)?this.$breakpoints[t]=i:delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(t){delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.addMarker=function(t,i,e,n){var r=this.$markerId++;return i={range:t,type:e||"line",renderer:"function"==typeof e?e:null,clazz:i,inFront:!!n,id:r},n?(this.$frontMarkers[r]=i,this._signal("changeFrontMarker")):(this.$backMarkers[r]=i,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(t,i){if(t.update){var e=this.$markerId++;return t.id=e,t.inFront=!!i,i?(this.$frontMarkers[e]=t,this._signal("changeFrontMarker")):(this.$backMarkers[e]=t,this._signal("changeBackMarker")),t}},this.removeMarker=function(t){var i=this.$frontMarkers[t]||this.$backMarkers[t];i&&(delete(i.inFront?this.$frontMarkers:this.$backMarkers)[t],this._signal(i.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},this.highlight=function(t){var i;this.$searchHighlight||(i=new d(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(i)),this.$searchHighlight.setRegexp(t)},this.highlightLines=function(t,i,e,n){return"number"!=typeof i&&(e=i,i=t),e=e||"ace_step",(i=new c(t,0,i,1/0)).id=this.addMarker(i,e,"fullLine",n),i},this.setAnnotations=function(t){this.$annotations=t,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(t){t=t.match(/^.*?(\r?\n)/m),this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(t,i){var e,n=this.getLine(t),r=!1;e=(r=(r=0<i?!!n.charAt(i-1).match(this.tokenRe):r)||!!n.charAt(i).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(n.slice(i-1,i+1))?/\s/:this.nonTokenRe;var o=i;if(0<o){for(;0<=--o&&n.charAt(o).match(e););o++}for(var s=i;s<n.length&&n.charAt(s).match(e);)s++;return new c(t,o,t,s)},this.getAWordRange=function(t,i){for(var e=this.getWordRange(t,i),n=this.getLine(e.end.row);n.charAt(e.end.column).match(/[ \t]/);)e.end.column+=1;return e},this.setNewLineMode=function(t){this.doc.setNewLineMode(t)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(t){this.setOption("useWorker",t)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(t){this.bgTokenizer.start(t.data.first),this._signal("tokenizerUpdate",t)},this.$modes=o.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(t,i){if(t&&"object"==typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var e=t,n=t.path}else n=t||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[n]&&!e)return this.$onChangeMode(this.$modes[n]),void(i&&i());this.$modeId=n,o.loadModule(["mode",n],function(t){if(this.$modeId!==n)return i&&i();this.$modes[n]&&!e?this.$onChangeMode(this.$modes[n]):t&&t.Mode&&(t=new t.Mode(e),e||((this.$modes[n]=t).$id=n),this.$onChangeMode(t)),i&&i()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(t,i){var e,n,r,o;i||(this.$modeId=t.$id),this.$mode!==t&&(e=this.$mode,this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(n=t.getTokenizer()).on&&(r=this.onReloadTokenizer.bind(this),n.on("update",r)),this.bgTokenizer?this.bgTokenizer.setTokenizer(n):(this.bgTokenizer=new u(n),(o=this).bgTokenizer.on("update",(function(t){o._signal("tokenizerUpdate",t)}))),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,i||(t.attachToSession&&t.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:e,mode:t})))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(t){o.warn("Could not load worker",t),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach((function(i){i&&i.screenWidth>t&&(t=i.screenWidth)})),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var i=this.doc.getAllLines(),e=this.$rowLengthCache,n=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=i.length,h=0;h<a;h++){if(s<h){if(a<=(h=o.end.row+1))break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==e[h]&&(e[h]=this.$getStringScreenWidth(i[h])[0]),e[h]>n&&(n=e[h])}this.screenWidth=n}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,i){return this.doc.getLines(t,i)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,i){return this.doc.insert(t,i)},this.remove=function(t){return this.doc.remove(t)},this.removeFullLines=function(t,i){return this.doc.removeFullLines(t,i)},this.undoChanges=function(t,i){if(t.length){this.$fromUndo=!0;for(var e=t.length-1;-1!=e;e--){var n=t[e];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!i&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},this.redoChanges=function(t,i){if(t.length){this.$fromUndo=!0;for(var e=0;e<t.length;e++){var n=t[e];"insert"!=n.action&&"remove"!=n.action||this.doc.$safeApplyDelta(n)}!i&&this.$undoSelect&&(t.selectionAfter?this.selection.fromJSON(t.selectionAfter):this.selection.setRange(this.$getUndoSelection(t,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(t){this.$undoSelect=t},this.$getUndoSelection=function(t,i){function e(t){return i?"insert"!==t.action:"insert"===t.action}for(var n,r,o=0;o<t.length;o++){var s=t[o];s.start&&(n?e(s)?(-1==n.compare((r=s.start).row,r.column)&&n.setStart(r),1==n.compare((r=s.end).row,r.column)&&n.setEnd(r)):-1==n.compare((r=s.start).row,r.column)&&(n=c.fromPoints(s.start,s.start)):n=e(s)?c.fromPoints(s.start,s.end):c.fromPoints(s.start,s.start))}return n},this.replace=function(t,i){return this.doc.replace(t,i)},this.moveText=function(t,i,e){var n,r,o,s=this.getTextRange(t),a=this.getFoldsInRange(t);return i=c.fromPoints(i,i),e||(this.remove(t),(o=(r=t.start.row-t.end.row)?-t.end.column:t.start.column-t.end.column)&&(i.start.row==t.end.row&&i.start.column>t.end.column&&(i.start.column+=o),i.end.row==t.end.row&&i.end.column>t.end.column&&(i.end.column+=o)),r&&i.start.row>=t.end.row&&(i.start.row+=r,i.end.row+=r)),i.end=this.insert(i.start,s),a.length&&(n=t.start,r=(t=i.start).row-n.row,o=t.column-n.column,this.addFolds(a.map((function(t){return(t=t.clone()).start.row==n.row&&(t.start.column+=o),t.end.row==n.row&&(t.end.column+=o),t.start.row+=r,t.end.row+=r,t})))),i},this.indentRows=function(t,i,e){e=e.replace(/\t/g,this.getTabString());for(var n=t;n<=i;n++)this.doc.insertInLine({row:n,column:0},e)},this.outdentRows=function(t){for(var i=t.collapseRows(),e=new c(0,0,0,0),n=this.getTabSize(),r=i.start.row;r<=i.end.row;++r){var o=this.getLine(r);e.start.row=r,e.end.row=r;for(var s=0;s<n&&" "==o.charAt(s);++s);s<n&&"\t"==o.charAt(s)?(e.start.column=s,e.end.column=s+1):(e.start.column=0,e.end.column=s),this.remove(e)}},this.$moveLines=function(t,i,e){if(t=this.getRowFoldStart(t),i=this.getRowFoldEnd(i),e<0){if((r=this.getRowFoldStart(t+e))<0)return 0;var n=r-t}else if(0<e){if((r=this.getRowFoldEnd(i+e))>this.doc.getLength()-1)return 0;n=r-i}else t=this.$clipRowToDocument(t),n=(i=this.$clipRowToDocument(i))-t+1;var r=new c(t,0,i,Number.MAX_VALUE);return r=this.getFoldsInRange(r).map((function(t){return(t=t.clone()).start.row+=n,t.end.row+=n,t})),i=0==e?this.doc.getLines(t,i):this.doc.removeFullLines(t,i),this.doc.insertFullLines(t+n,i),r.length&&this.addFolds(r),n},this.moveLinesUp=function(t,i){return this.$moveLines(t,i,-1)},this.moveLinesDown=function(t,i){return this.$moveLines(t,i,1)},this.duplicateLines=function(t,i){return this.$moveLines(t,i,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,i){return i<0?0:Math.min(this.doc.getLine(t).length,i)},this.$clipPositionToDocument=function(t,i){var e;return i=Math.max(0,i),i=t<0?t=0:(e=this.doc.getLength())<=t?this.doc.getLine(t=e-1).length:Math.min(this.doc.getLine(t).length,i),{row:t,column:i}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var i=this.doc.getLength()-1;return t.end.row>i?(t.end.row=i,t.end.column=this.doc.getLine(i).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){t!=this.$useWrapMode&&(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t&&(t=this.getLength(),this.$wrapData=Array(t),this.$updateWrapData(0,t-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,i){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===i||(this.$wrapLimitRange={min:t,max:i},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(t,i){var e=this.$wrapLimitRange;return e.max<0&&(e={min:i,max:i}),(e=this.$constrainWrapLimit(t,e.min,e.max))!=this.$wrapLimit&&1<e&&(this.$wrapLimit=e,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(t,i,e){return i&&(t=Math.max(i,t)),e?Math.min(e,t):t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var i,e=this.$useWrapMode,n=t.action,r=t.start,o=t.end,s=r.row,a=o.row,h=a-s,c=null;if(this.$updating=!0,0!=h)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(s,h);var l=this.$foldData;c=this.getFoldsInRange(t),this.removeFolds(c);var u=0;for((i=this.getFoldLine(o.row))&&(i.addRemoveChars(o.row,o.column,r.column-o.column),i.shiftRow(-h),(f=this.getFoldLine(s))&&f!==i&&(f.merge(i),i=f),u=l.indexOf(i)+1);u<l.length;u++)(i=l[u]).start.row>=o.row&&i.shiftRow(-h);a=s}else{var d=Array(h);d.unshift(s,0);var f=e?this.$wrapData:this.$rowLengthCache;for(f.splice.apply(f,d),l=this.$foldData,u=0,(i=this.getFoldLine(s))&&(0==(d=i.range.compareInside(r.row,r.column))?(i=i.split(r.row,r.column))&&(i.shiftRow(h),i.addRemoveChars(a,0,o.column-r.column)):-1==d&&(i.addRemoveChars(s,0,o.column-r.column),i.shiftRow(h)),u=l.indexOf(i)+1);u<l.length;u++)(i=l[u]).start.row>=s&&i.shiftRow(h)}else h=Math.abs(t.start.column-t.end.column),"remove"===n&&(c=this.getFoldsInRange(t),this.removeFolds(c),h=-h),(i=this.getFoldLine(s))&&i.addRemoveChars(s,r.column,h);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(s,a):this.$updateRowLengthCache(s,a),c},this.$updateRowLengthCache=function(t,i){this.$rowLengthCache[t]=null,this.$rowLengthCache[i]=null},this.$updateWrapData=function(e,n){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),h=this.$wrapData,c=this.$wrapLimit,l=e;for(n=Math.min(n,s.length-1);l<=n;)(o=this.getFoldLine(l,o))?(r=[],o.walk(function(e,n,o,a){var h;if(null!=e){(h=this.$getDisplayTokens(e,r.length))[0]=t;for(var c=1;c<h.length;c++)h[c]=i}else h=this.$getDisplayTokens(s[n].substring(a,o),r.length);r=r.concat(h)}.bind(this),o.end.row,s[o.end.row].length+1),h[o.start.row]=this.$computeWrapSplits(r,c,a),l=o.end.row+1):(r=this.$getDisplayTokens(s[l]),h[l]=this.$computeWrapSplits(r,c,a),l++)};var t=3,i=4;function r(t){return!(t<4352)&&(4352<=t&&t<=4447||4515<=t&&t<=4519||4602<=t&&t<=4607||9001<=t&&t<=9002||11904<=t&&t<=11929||11931<=t&&t<=12019||12032<=t&&t<=12245||12272<=t&&t<=12283||12288<=t&&t<=12350||12353<=t&&t<=12438||12441<=t&&t<=12543||12549<=t&&t<=12589||12593<=t&&t<=12686||12688<=t&&t<=12730||12736<=t&&t<=12771||12784<=t&&t<=12830||12832<=t&&t<=12871||12880<=t&&t<=13054||13056<=t&&t<=19903||19968<=t&&t<=42124||42128<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||55216<=t&&t<=55238||55243<=t&&t<=55291||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65106||65108<=t&&t<=65126||65128<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510)}this.$computeWrapSplits=function(e,n,r){if(0==e.length)return[];var o=[],s=e.length,a=0,h=0,c=this.$wrapAsCode,l=this.$indentedSoftWrap,u=n<=Math.max(2*r,8)||!1===l?0:Math.floor(n/2);function d(t){for(var i=t-a,n=a;n<t;n++){var s=e[n];12!==s&&2!==s||--i}o.length||(f=function(){var t=0;if(0===u)return t;if(l)for(var i=0;i<e.length;i++){var n=e[i];if(10==n)t+=1;else if(11==n)t+=r;else if(12!=n)break}return c&&!1!==l&&(t+=r),Math.min(t,u)}(),o.indent=f),o.push(h+=i),a=t}for(var f=0;n-f<s-a;){var g=a+n-f;if(10<=e[g-1]&&10<=e[g])d(g);else if(e[g]!=t&&e[g]!=i){for(var p=Math.max(g-(n-(n>>2)),a-1);p<g&&e[g]<t;)g--;if(c){for(;p<g&&e[g]<t;)g--;for(;p<g&&9==e[g];)g--}else for(;p<g&&e[g]<10;)g--;p<g?d(++g):(2==e[g=a+n]&&g--,d(g-f))}else{for(;g!=a-1&&e[g]!=t;g--);if(a<g)d(g);else{for(g=a+n;g<e.length&&e[g]==i;g++);if(g==e.length)break;d(g)}}}return o},this.$getDisplayTokens=function(t,i){var e,n=[];i=i||0;for(var o=0;o<t.length;o++){var s=t.charCodeAt(o);if(9==s){e=this.getScreenTabSize(n.length+i),n.push(11);for(var a=1;a<e;a++)n.push(12)}else 32==s?n.push(10):39<s&&s<48||57<s&&s<64?n.push(9):4352<=s&&r(s)?n.push(1,2):n.push(1)}return n},this.$getStringScreenWidth=function(t,i,e){if(0==i)return[0,0];var n,o;for(null==i&&(i=1/0),e=e||0,o=0;o<t.length&&(9==(n=t.charCodeAt(o))?e+=this.getScreenTabSize(e):4352<=n&&r(n)?e+=2:e+=1,!(i<e));o++);return[e,o]},this.lineWidgets=null,this.getRowLength=function(t){var i=1;return this.lineWidgets&&(i+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+i:i},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getRowWrapIndent=function(t){if(this.$useWrapMode){var i=this.screenToDocumentPosition(t,Number.MAX_VALUE);return(t=this.$wrapData[i.row]).length&&t[0]<i.column?t.indent:0}return 0},this.getScreenLastRowColumn=function(t){return t=this.screenToDocumentPosition(t,Number.MAX_VALUE),this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(t,i){return i=this.documentToScreenRow(t,i),this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(t,i){return i=this.documentToScreenRow(t,i),this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(t){if(this.$useWrapMode)return this.$wrapData[t]},this.getScreenTabSize=function(t){return this.$tabSize-(t%this.$tabSize|0)},this.screenToDocumentRow=function(t,i){return this.screenToDocumentPosition(t,i).row},this.screenToDocumentColumn=function(t,i){return this.screenToDocumentPosition(t,i).column},this.screenToDocumentPosition=function(t,i,e){if(t<0)return{row:0,column:0};var n,r,o,s=0,a=0,h=0,c=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,t),d=l.length;o=d&&0<=u?(h=l[u],s=this.$docRowCache[u],t>l[d-1]):!d;for(var f=this.getLength()-1,g=this.getNextFoldLine(s),p=g?g.start.row:1/0;h<=t&&!(t<h+(c=this.getRowLength(s))||f<=s);)h+=c,p<++s&&(p=(g=this.getNextFoldLine(s=g.end.row+1,g))?g.start.row:1/0),o&&(this.$docRowCache.push(s),this.$screenRowCache.push(h));if(g&&g.start.row<=s)n=this.getFoldDisplayLine(g),s=g.start.row;else{if(h+c<=t||f<s)return{row:f,column:this.getLine(f).length};n=this.getLine(s),g=null}return u=0,l=Math.floor(t-h),!this.$useWrapMode||(d=this.$wrapData[s])&&(r=d[l],0<l&&d.length&&(u=d.indent,n=n.substring(a=d[l-1]||d[d.length-1]))),void 0!==e&&this.$bidiHandler.isBidiRow(h+l,s,l)&&(i=this.$bidiHandler.offsetToCol(e)),a+=this.$getStringScreenWidth(n,i-u)[1],this.$useWrapMode&&r<=a&&(a=r-1),g?g.idxToPosition(a):{row:s,column:a}},this.documentToScreenPosition=function(t,i){t=(c=void 0===i?this.$clipPositionToDocument(t.row,t.column):this.$clipPositionToDocument(t,i)).row;var e,n=0,r=null;(r=this.getFoldAt(t,i=c.column,1))&&(t=r.start.row,i=r.start.column);var o,s,a=0,h=this.$docRowCache,c=this.$getRowCacheIndex(h,t);s=(r=h.length)&&0<=c?(a=h[c],n=this.$screenRowCache[c],t>h[r-1]):!r;for(var l=this.getNextFoldLine(a),u=l?l.start.row:1/0;a<t;){if(u<=a){if(t<(o=l.end.row+1))break;u=(l=this.getNextFoldLine(o,l))?l.start.row:1/0}else o=a+1;n+=this.getRowLength(a),a=o,s&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var d="";if(e=l&&u<=a?(d=this.getFoldDisplayLine(l,t,i),l.start.row):(d=this.getLine(t).substring(0,i),t),i=0,this.$useWrapMode){var f=this.$wrapData[e];if(f){for(var g=0;d.length>=f[g];)n++,g++;d=d.substring(f[g-1]||0,d.length),i=0<g?f.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(n+=this.lineWidgets[a].rowsAbove),{row:n,column:i+this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(t,i){return this.documentToScreenPosition(t,i).column},this.documentToScreenRow=function(t,i){return this.documentToScreenPosition(t,i).row},this.getScreenLength=function(){var t=0,i=null;if(this.$useWrapMode)for(var e=this.$wrapData.length,n=0,r=0,o=(i=this.$foldData[r++])?i.start.row:1/0;n<e;){var s=this.$wrapData[n];t+=s?s.length+1:1,o<++n&&(n=i.end.row+1,o=(i=this.$foldData[r++])?i.start.row:1/0)}else{t=this.getLength();var a=this.$foldData;for(r=0;r<a.length;r++)t-=(i=a[r]).end.row-i.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t},this.$setFontMetrics=function(t){this.$enableVarChar&&(this.$getStringScreenWidth=function(i,e,n){if(0===e)return[0,0];var r,o;for(e=e||1/0,n=n||0,o=0;o<i.length&&!(e<(n+="\t"===(r=i.charAt(o))?this.getScreenTabSize(n):t.getCharacterWidth(r)));o++);return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=r}.call(f.prototype),t("./edit_session/folding").Folding.call(f.prototype),t("./edit_session/bracket_match").BracketMatch.call(f.prototype),o.defineOptions(f.prototype,"session",{wrap:{set:function(t){t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t&&((this.$wrap=t)?(this.setWrapLimitRange(t="number"==typeof t?t:null,t),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){(t="auto"==t?"text"!=this.$mode.type:"text"!=t)!=this.$wrapAsCode&&(this.$wrapAsCode=t,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(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){0<(t=parseInt(t))&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),i.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,i){var e=t("./lib/lang"),n=t("./lib/oop"),r=t("./range").Range;(function(){this.set=function(t){return n.mixin(this.$options,t),this},this.getOptions=function(){return e.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var i=this.$options;if(!(t=this.$matchIterator(t,i)))return!1;var e=null;return t.forEach((function(t,n,o,s){return e=new r(t,n,o,s),!(n==s&&i.start&&i.start.start&&0!=i.skipCurrent&&e.isEqual(i.start)&&(e=null,1))})),e},this.findAll=function(t){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var n=i.range,o=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),s=[],a=i.re;if(i.$isMultiLine){var h,c=a.length,l=o.length-c;t:for(var u=a.offset||0;u<=l;u++){for(var d=0;d<c;d++)if(-1==o[u+d].search(a[d]))continue t;var f=o[u+c-1],g=(g=o[u]).length-g.match(a[0])[0].length;f=f.match(a[c-1])[0].length,h&&h.end.row===u&&h.end.column>g||(s.push(h=new r(u,g,u+c-1,f)),2<c&&(u=u+c-2))}}else for(var p=0;p<o.length;p++){var m=e.getMatchOffsets(o[p],a);for(d=0;d<m.length;d++){var I=m[d];s.push(new r(p,I.offset,p,I.offset+I.length))}}if(n){var b=n.start.column,C=n.start.column;for(p=0,d=s.length-1;p<d&&s[p].start.column<b&&s[p].start.row==n.start.row;)p++;for(;p<d&&s[d].end.column>C&&s[d].end.row==n.end.row;)d--;for(s=s.slice(p,d+1),p=0,d=s.length;p<d;p++)s[p].start.row+=n.start.row,s[p].end.row+=n.start.row}return s},this.replace=function(t,i){var e=this.$options,n=this.$assembleRegExp(e);if(e.$isMultiLine)return i;if(n){var r=n.exec(t);if(!r||r[0].length!=t.length)return null;if(i=t.replace(n,i),e.preserveCase){i=i.split("");for(var o=Math.min(t.length,t.length);o--;){var s=t[o];i[o]=s&&s.toLowerCase()!=s?i[o].toUpperCase():i[o].toLowerCase()}i=i.join("")}return i}},this.$assembleRegExp=function(t,i){if(t.needle instanceof RegExp)return t.re=t.needle;var n,r=t.needle;if(!t.needle)return t.re=!1;function o(t){return/\w/.test(t)||n.regExp?"\\b":""}t.regExp||(r=e.escapeRegExp(r)),t.wholeWord&&(n=t,r=o((s=r)[0])+s+o(s[s.length-1]));var s=t.caseSensitive?"gm":"gmi";if(t.$isMultiLine=!i&&/[\n\r]/.test(r),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(r,s);try{var a=new RegExp(r,s)}catch(t){a=!1}return t.re=a},this.$assembleMultilineRegExp=function(t,i){for(var e=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<e.length;r++)try{n.push(new RegExp(e[r],i))}catch(t){return!1}return n},this.$matchIterator=function(t,i){var e=this.$assembleRegExp(i);if(!e)return!1;var n=1==i.backwards,r=0!=i.skipCurrent,o=i.range,s=i.start;(s=s||(o?o[n?"end":"start"]:t.selection.getRange())).start&&(s=s[r!=n?"end":"start"]);var a,h,c=o?o.start.row:0,l=o?o.end.row:t.getLength()-1;return o=n?function(t){var e=s.row;if(!h(e,s.column,t)){for(e--;c<=e;e--)if(h(e,Number.MAX_VALUE,t))return;if(0!=i.wrap)for(e=l,c=s.row;c<=e;e--)if(h(e,Number.MAX_VALUE,t))return}}:function(t){var e=s.row;if(!h(e,s.column,t)){for(e+=1;e<=l;e++)if(h(e,0,t))return;if(0!=i.wrap)for(e=c,l=s.row;e<=l;e++)if(h(e,0,t))return}},h=i.$isMultiLine?(a=e.length,function(i,r,o){var s=n?i-a+1:i;if(!(s<0)){var h=t.getLine(s),c=h.search(e[0]);if(!(!n&&c<r||-1===c)){for(var l=1;l<a;l++)if(-1==(h=t.getLine(s+l)).search(e[l]))return;if(i=h.match(e[a-1])[0].length,!(n&&r<i))return!!o(s,c,s+a-1,i)||void 0}}}):n?function(i,n,r){var o,s=t.getLine(i),a=[];for(e.lastIndex=0;o=e.exec(s);){var h=o[0].length,c=o.index;if(!h){if(c>=s.length)break;e.lastIndex=c+=1}if(o.index+h>n)break;a.push(o.index,h)}for(var l=a.length-1;0<=l;l-=2){var u=a[l-1];if(r(i,u,i,u+(h=a[l])))return!0}}:function(i,n,r){var o=t.getLine(i);for(e.lastIndex=n;s=e.exec(o);){var s,a=s[0].length;if(r(i,s=s.index,i,s+a))return!0;if(!a&&(e.lastIndex=s+=1,s>=o.length))return!1}},{forEach:o}}}).call((t=function(){this.$options={}}).prototype),i.Search=t})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,i){var e=t("../lib/keys"),n=t("../lib/useragent"),r=e.KEY_MODS;function o(t,i){this.platform=i||(n.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function s(t,i){o.call(this,t,i),this.$singleCommand=!1}s.prototype=o.prototype,function(){function t(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),(this.commands[t.name]=t).bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,i){var e=t&&("string"==typeof t?t:t.name);t=this.commands[e],i||delete this.commands[e];var n,r=this.commandKeyBinding;for(n in r){var o,s=r[n];s==t?delete r[n]:!Array.isArray(s)||-1!=(o=s.indexOf(t))&&(s.splice(o,1),1==s.length&&(r[n]=s[0]))}},this.bindKey=function(t,i,e){if("object"==typeof t&&t&&(null==e&&(e=t.position),t=t[this.platform]),t)return"function"==typeof i?this.addCommand({exec:i,bindKey:t,name:i.name||t}):void t.split("|").forEach((function(t){var n,o="";-1!=t.indexOf(" ")&&(t=(n=t.split(/\s+/)).pop(),n.forEach((function(t){t=this.parseKeys(t),this._addCommandToBinding(o+=(o?" ":"")+(t=r[t.hashId]+t.key),"chainKeys")}),this),o+=" "),t=this.parseKeys(t),this._addCommandToBinding(o+(t=r[t.hashId]+t.key),i,e)}),this)},this._addCommandToBinding=function(i,e,n){var r=this.commandKeyBinding;if(e)if(!r[i]||this.$singleCommand)r[i]=e;else{Array.isArray(r[i])?-1!=(s=r[i].indexOf(e))&&r[i].splice(s,1):r[i]=[r[i]],"number"!=typeof n&&(n=t(e));for(var o=r[i],s=0;s<o.length&&!(n<t(o[s]));s++);o.splice(s,0,e)}else delete r[i]},this.addCommands=function(t){t&&Object.keys(t).forEach((function(i){var e=t[i];if(e){if("string"==typeof e)return this.bindKey(e,i);"object"==typeof(e="function"==typeof e?{exec:e}:e)&&(e.name||(e.name=i),this.addCommand(e))}}),this)},this.removeCommands=function(t){Object.keys(t).forEach((function(i){this.removeCommand(t[i])}),this)},this.bindKeys=function(t){Object.keys(t).forEach((function(i){this.bindKey(i,t[i])}),this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var i=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(t){return t})),n=i.pop(),r=e[n];if(e.FUNCTION_KEYS[r])n=e.FUNCTION_KEYS[r].toLowerCase();else{if(!i.length)return{key:n,hashId:-1};if(1==i.length&&"shift"==i[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=i.length;s--;){var a=e.KEY_MODS[i[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+i[s]+" in "+t),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(t,i){return this.commandKeyBinding[i=r[t]+i]},this.handleKeyboard=function(t,i,e,n){if(!(n<0)){var o=r[i]+e,s=this.commandKeyBinding[o];return t.$keyChain&&(t.$keyChain+=" "+o,s=this.commandKeyBinding[t.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(t.$keyChain&&(i&&4!=i||1!=e.length?(-1==i||0<n)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-o.length-1)),{command:s}):(t.$keyChain=t.$keyChain||o,{command:"null"})}},this.getStatusText=function(t,i){return i.$keyChain||""}}.call(o.prototype),i.HashHandler=o,i.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(t,i){var e=t("../lib/oop"),n=t("../keyboard/hash_handler").MultiHashHandler,r=t("../lib/event_emitter").EventEmitter;e.inherits(t=function(t,i){n.call(this,i,t),this.byName=this.commands,this.setDefaultHandler("exec",(function(t){return t.command.exec(t.editor,t.args||{})}))},n),function(){e.implement(this,r),this.exec=function(t,i,e){if(Array.isArray(t)){for(var n=t.length;n--;)if(this.exec(t[n],i,e))return!0;return!1}if(!(t="string"==typeof t?this.commands[t]:t))return!1;if(i&&i.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(i))return!1;var r={editor:i,command:t,args:e};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(t){if(!this.$inReplay)return t&&t._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(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach((function(i){"string"==typeof i?this.exec(i,t):this.exec(i[0],t,i[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map((function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]?t:t[0]}))}}.call(t.prototype),i.CommandManager=t})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(t,i){var e=t("../lib/lang"),n=t("../config"),r=t("../range").Range;function o(t,i){return{win:t,mac:i}}i.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){n.loadModule("ace/ext/settings_menu",(function(i){i.init(t),t.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(t){n.loadModule("./ext/error_marker",(function(i){i.showErrorMarker(t,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){n.loadModule("./ext/error_marker",(function(i){i.showErrorMarker(t,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,i){"number"!=typeof i||isNaN(i)||t.gotoLine(i),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){n.loadModule("ace/ext/searchbox",(function(i){i.Search(t)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,i){t.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,i){t.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,i){t.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,i){t.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var i=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",i),i.isEmpty()||t.session.remove(i),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,i){t.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){n.loadModule("ace/ext/searchbox",(function(i){i.Search(t,!0)}))}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var i=t.selection.getRange();i.start.column=0,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var i=t.selection.getRange();i.end.column=Number.MAX_VALUE,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,i){t.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,i){t.insert(e.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var i=t.selection.getRange();i.start.column=i.end.column=0,i.end.row++,t.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var i=(s=t.selection.isBackwards())?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),n=s?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),o=t.session.doc.getLine(i.row).length,s=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,a=t.session.doc.getLine(i.row),h=i.row+1;h<=n.row+1;h++){var c=e.stringTrimLeft(e.stringTrimRight(t.session.doc.getLine(h)));a+=c=0!==c.length?" "+c:c}n.row+1<t.session.doc.getLength()-1&&(a+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new r(i.row,0,n.row+2,0),a),0<s?(t.selection.moveCursorTo(i.row,i.column),t.selection.selectTo(i.row,i.column+s)):(o=t.session.doc.getLine(i.row).length>o?o+1:o,t.selection.moveCursorTo(i.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var i=t.session.doc.getLength()-1,e=t.session.doc.getLine(i).length,n=t.selection.rangeList.ranges,o=[];n.length<1&&(n=[t.selection.getRange()]);for(var s=0;s<n.length;s++)s==n.length-1&&(n[s].end.row===i&&n[s].end.column===e||o.push(new r(n[s].end.row,n[s].end.column,i,e))),0===s?0===n[s].start.row&&0===n[s].start.column||o.push(new r(0,0,n[s].start.row,n[s].start.column)):o.push(new r(n[s-1].end.row,n[s-1].end.column,n[s].start.row,n[s].start.column));for(t.exitMultiSelectMode(),t.clearSelection(),s=0;s<o.length;s++)t.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(t){t.selection.clearSelection();var i=t.getCursorPosition();t.selection.moveTo(i.row-1,Number.MAX_VALUE),t.insert("\n"),0===i.row&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:o("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var s=1;s<9;s++)i.commands.push({name:"foldToLevel"+s,description:"Fold To Level "+s,level:s,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","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/clipboard"],(function(t,i){t("./lib/fixoldbrowsers");var e=t("./lib/oop"),n=t("./lib/dom"),r=t("./lib/lang"),o=t("./lib/useragent"),s=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,h=t("./mouse/fold_handler").FoldHandler,c=t("./keyboard/keybinding").KeyBinding,l=t("./edit_session").EditSession,u=t("./search").Search,d=t("./range").Range,f=t("./lib/event_emitter").EventEmitter,g=t("./commands/command_manager").CommandManager,p=t("./commands/default_commands").commands,m=t("./config"),I=t("./token_iterator").TokenIterator,b=t("./clipboard"),C=function(t,i,e){this.$toDestroy=[];var n=t.getContainerElement();this.container=n,this.renderer=t,this.id="editor"+ ++C.$uid,this.commands=new g(o.isMac?"mac":"win",p),"object"==typeof document&&(this.textInput=new s(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new h(this)),this.keyBinding=new c(this),this.$search=(new u).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=r.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(t,i){i._$emitInputEvent.schedule(31)})),this.setSession(i||e&&e.session||new l("")),m.resetOptions(this),e&&this.setOptions(e),m._signal("editor",this)};C.$uid=0,function(){e.implement(this,f),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=r.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)},this.curOp=null,this.prevOp={},this.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(t){if(this.curOp&&this.session){if(t&&!1===t.returnValue||!this.session)return this.curOp=null;if((1!=t||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var i=(t=this.curOp.command)&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var e=this.selection.getRange(),n=this.renderer.layerConfig;(e.start.row>=n.lastRow||e.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}t=this.selection.toJSON(),this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(t),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(t){var i,e,n,r;this.$mergeUndoDeltas&&(e=this.$mergeableCommands,n=(i=this.prevOp).command&&t.command.name==i.command.name,"insertstring"==t.command.name?(r=t.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(i.args)),this.mergeNextCommand=!0):n=n&&-1!==e.indexOf(t.command.name),(n=!("always"!=this.$mergeUndoDeltas&&2e3<Date.now()-this.sequenceStartTime)&&n)?this.session.mergeUndoDeltas=!0:-1!==e.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now()))},this.setKeyboardHandler=function(t,i){var e;t&&"string"==typeof t&&"ace"!=t?(this.$keybindingId=t,e=this,m.loadModule(["keybinding",t],(function(n){e.$keybindingId==t&&e.keyBinding.setKeyboardHandler(n&&n.handler),i&&i()}))):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),i&&i())},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){var i,e;this.session!=t&&(this.curOp&&this.endOperation(),this.curOp={},(i=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),(e=this.session.getSelection()).off("changeCursor",this.$onCursorChange),e.off("changeSelection",this.$onSelectionChange)),(this.session=t)?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.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=t.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(t)),this._signal("changeSession",{session:t,oldSession:i}),this.curOp=null,i&&i._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&t.bgTokenizer&&t.bgTokenizer.scheduleStart())},this.getSession=function(){return this.session},this.setValue=function(t,i){return this.session.doc.setValue(t),i?1==i?this.navigateFileEnd():-1==i&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t,i){this.renderer.setTheme(t,i)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||n.computedStyle(this.container).fontSize},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){var t;this.$highlightPending||((t=this).$highlightPending=!0,setTimeout((function(){t.$highlightPending=!1;var i,e,n=t.session;n&&n.bgTokenizer&&(n.$bracketHighlight&&(n.$bracketHighlight.markerIds.forEach((function(t){n.removeMarker(t)})),n.$bracketHighlight=null),(i=!(i=n.getMatchingBracketRanges(t.getCursorPosition()))&&n.$mode.getMatching?n.$mode.getMatching(t.session):i)&&(e="ace_bracket",Array.isArray(i)?1==i.length&&(e="ace_error_bracket"):i=[i],2==i.length&&(0==d.comparePoints(i[0].end,i[1].start)?i=[d.fromPoints(i[0].start,i[1].end)]:0==d.comparePoints(i[0].start,i[1].end)&&(i=[d.fromPoints(i[1].start,i[0].end)])),n.$bracketHighlight={ranges:i,markerIds:i.map((function(t){return n.addMarker(t,e,"text")}))}))}),50))},this.$highlightTags=function(){var t;this.$highlightTagPending||((t=this).$highlightTagPending=!0,setTimeout((function(){t.$highlightTagPending=!1;var i=t.session;if(i&&i.bgTokenizer){var e=t.getCursorPosition(),n=new I(t.session,e.row,e.column),r=n.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return i.removeMarker(i.$tagHighlight),void(i.$tagHighlight=null);if(-1===r.type.indexOf("tag-open")||(r=n.stepForward())){var o=r.value,s=r.value,a=0,h=n.stepBackward();if("<"===h.value)for(;h=r,(r=n.stepForward())&&(-1!==r.type.indexOf("tag-name")?o===(s=r.value)&&("<"===h.value?a++:"</"===h.value&&a--):o===s&&"/>"===r.value&&a--),r&&0<=a;);else{do{if(r=h,h=n.stepBackward(),r)if(-1!==r.type.indexOf("tag-name"))o===r.value&&("<"===h.value?a++:"</"===h.value&&a--);else if("/>"===r.value){for(var c=0,l=h;l;){if(-1!==l.type.indexOf("tag-name")&&l.value===o){a--;break}if("<"===l.value)break;l=n.stepBackward(),c++}for(var u=0;u<c;u++)n.stepForward()}}while(h&&a<=0);n.stepForward()}if(!r)return i.removeMarker(i.$tagHighlight),void(i.$tagHighlight=null);var f=n.getCurrentTokenRow();e=n.getCurrentTokenColumn(),f=new d(f,e,f,e+r.value.length),e=i.$backMarkers[i.$tagHighlight],i.$tagHighlight&&null!=e&&0!==f.compareRange(e.range)&&(i.removeMarker(i.$tagHighlight),i.$tagHighlight=null),i.$tagHighlight||(i.$tagHighlight=i.addMarker(f,"ace_bracket","text"))}}}),50))},this.focus=function(){var t=this;setTimeout((function(){t.isFocused()||t.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(t){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",t))},this.onBlur=function(t){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",t))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(t){this.renderer.updateLines(t.start.row,t.start.row==t.end.row?t.end.row:1/0,this.session.$useWrapMode),this._signal("change",t),this.$cursorChange()},this.onTokenizerUpdate=function(t){this.renderer.updateLines((t=t.data).first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var t,i,e=this.getSession();this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),!this.renderer.$maxLines||1!==this.session.getLength()||1<this.renderer.$minLines||(t=!1)),e.$highlightLineMarker&&!t?(e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null):!e.$highlightLineMarker&&t?((i=new d(t.row,t.column,t.row,1/0)).id=e.addMarker(i,"ace_active-line","screenLine"),e.$highlightLineMarker=i):t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(){var t,i=this.session;i.$selectionMarker&&i.removeMarker(i.$selectionMarker),i.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),e=this.getSelectionStyle(),i.$selectionMarker=i.addMarker(t,"ace_selection",e));var e=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(e),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session;if(!(i=this.getSelectionRange()).isEmpty()&&!i.isMultiLine()){var i,e=i.start.column,n=i.end.column;if(!(5e3<(i=(t=t.getLine(i.start.row)).substring(e,n)).length)&&/[\w\d]/.test(i)&&(i=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),n=t.substring(e-1,n+1),i.test(n)))return i}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText(),i=this.session.doc.getNewLineCharacter(),e=!1;if(!t&&this.$copyWithEmptySelection){e=!0;for(var n=this.selection.getAllRanges(),r=0;r<n.length;r++){var o=n[r];r&&n[r-1].start.row==o.start.row||(t+=this.session.getLine(o.start.row)+i)}}var s={text:t};return this._signal("copy",s),b.lineMode=e?s.text:"",s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(t,i){this.commands.exec("paste",this,{text:t,event:i})},this.$handlePaste=function(t){this._signal("paste",t="string"==typeof t?{text:t}:t);var i=t.text,e=(t=i==b.lineMode,this.session);if(!this.inMultiSelectMode||this.inVirtualSelectionMode)t?e.insert({row:this.selection.lead.row,column:0},i):this.insert(i);else if(t)this.selection.rangeList.ranges.forEach((function(t){e.insert({row:t.start.row,column:0},i)}));else{var n=i.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(t=!(2!=n.length||n[0]&&n[1]),n.length!=r.length||t)return this.commands.exec("insertstring",this,i);for(var o=r.length;o--;){var s=r[o];s.isEmpty()||e.remove(s),e.insert(s.start,n[o])}}},this.execCommand=function(t,i){return this.commands.exec(t,this,i)},this.insert=function(t,i){var e,n=this.session,r=n.getMode(),o=this.getCursorPosition();!this.getBehavioursEnabled()||i||(e=r.transformAction(n.getState(o.row),"insertion",this,n,t))&&(t!==e.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),t=e.text),"\t"==t&&(t=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==t.indexOf("\n")&&((s=new d.fromPoints(o,o)).end.column+=t.length,this.session.remove(s)):(s=this.getSelectionRange(),o=this.session.remove(s),this.clearSelection()),"\n"!=t&&"\r\n"!=t||(a=n.getLine(o.row),o.column>a.search(/\S|$/)&&(h=a.substr(o.column).search(/\S|$/),n.doc.removeInLine(o.row,o.column,o.column+h))),this.clearSelection(),i=o.column;var s=n.getState(o.row),a=n.getLine(o.row),h=r.checkOutdent(s,a,t);n.insert(o,t),e&&e.selection&&this.selection.setSelectionRange(2==e.selection.length?new d(o.row,i+e.selection[0],o.row,i+e.selection[1]):new d(o.row+e.selection[0],e.selection[1],o.row+e.selection[2],e.selection[3])),this.$enableAutoIndent&&(n.getDocument().isNewLine(t)&&(a=r.getNextLineIndent(s,a.slice(0,o.column),n.getTabString()),n.insert({row:o.row+1,column:0},a)),h&&r.autoOutdent(s,n,o.row))},this.autoIndent=function(){var t,i,e,n=this.session,r=n.getMode();e=this.selection.isEmpty()?(i=0,n.doc.getLength()-1):(i=(t=this.getSelectionRange()).start.row,t.end.row);for(var o,s,a="",h="",c=n.getTabString(),l=i;l<=e;l++)0<l&&(a=n.getState(l-1),o=n.getLine(l-1),h=r.getNextLineIndent(a,o,c)),s=n.getLine(l),h!==(s=r.$getIndent(s))&&(0<s.length&&(s=new d(l,0,l,s.length),n.remove(s)),0<h.length&&n.insert({row:l,column:0},h)),r.autoOutdent(a,n,l)},this.onTextInput=function(t,i){if(!i)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}}),i=this.applyComposition.bind(this,t,i),this.selection.rangeCount?this.forEachSelection(i):i(),this.endOperation()},this.applyComposition=function(t,i){var e;(i.extendLeft||i.extendRight)&&((e=this.selection.getRange()).start.column-=i.extendLeft,e.end.column+=i.extendRight,e.start.column<0&&(e.start.row--,e.start.column+=this.session.getLine(e.start.row).length+1),this.selection.setRange(e),t||e.isEmpty()||this.remove()),!t&&this.selection.isEmpty()||this.insert(t,!0),(i.restoreStart||i.restoreEnd)&&((e=this.selection.getRange()).start.column-=i.restoreStart,e.end.column-=i.restoreEnd,this.selection.setRange(e))},this.onCommandKey=function(t,i,e){return this.keyBinding.onCommandKey(t,i,e)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var i,e,n=this.getSelectionRange();this.getBehavioursEnabled()&&(i=(e=this.session).getState(n.start.row),t=e.getMode().transformAction(i,"deletion",this,e,n),0!==n.end.column||"\n"==(i=e.getTextRange(n))[i.length-1]&&(e=e.getLine(n.end.row),/^\s+$/.test(e)&&(n.end.column=e.length)),t&&(n=t)),this.session.remove(n),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){var t,i,e,n;!this.selection.isEmpty()||0!==(n=(t=this.getCursorPosition()).column)&&(n=n<(i=this.session.getLine(t.row)).length?(e=i.charAt(n)+i.charAt(n-1),new d(t.row,n-1,t.row,n+1)):(e=i.charAt(n-1)+i.charAt(n-2),new d(t.row,n-2,t.row,n)),this.session.replace(n,e),this.session.selection.moveToPosition(n.end))},this.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var i=this.getSelectionRange(),e=this.session.getTextRange(i);this.session.replace(i,e.toLowerCase()),this.selection.setSelectionRange(t)},this.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var i=this.getSelectionRange(),e=this.session.getTextRange(i);this.session.replace(i,e.toUpperCase()),this.selection.setSelectionRange(t)},this.indent=function(){var t=this.session,i=this.getSelectionRange();if(!(i.start.row<i.end.row)){if(i.start.column<i.end.column){var e=t.getTextRange(i);if(!/^\s+$/.test(e))return h=this.$getSelectedRows(),void t.indentRows(h.first,h.last,"\t")}var n=t.getLine(i.start.row),o=i.start;if(e=t.getTabSize(),o=t.documentToScreenColumn(o.row,o.column),this.session.getUseSoftTabs())var s=e-o%e,a=r.stringRepeat(" ",s);else{for(s=o%e;" "==n[i.start.column-1]&&s;)i.start.column--,s--;this.selection.setSelectionRange(i),a="\t"}return this.insert(a)}var h=this.$getSelectedRows();t.indentRows(h.first,h.last,"\t")},this.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"\t")},this.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},this.sortLines=function(){for(var t=this.$getSelectedRows(),i=this.session,e=[],n=t.first;n<=t.last;n++)e.push(i.getLine(n));e.sort((function(t,i){return t.toLowerCase()<i.toLowerCase()?-1:t.toLowerCase()>i.toLowerCase()?1:0}));var r=new d(0,0,0,0);for(n=t.first;n<=t.last;n++){var o=i.getLine(n);r.start.row=n,r.end.row=n,r.end.column=o.length,i.replace(r,e[n-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),i=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,i.first,i.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),i=this.session.getState(t.row),e=this.getSelectionRange();this.session.getMode().toggleBlockComment(i,this.session,e,t)},this.getNumberAt=function(t,i){var e=/[\-]?[0-9]+(?:\.[0-9]+)?/g;e.lastIndex=0;for(var n=this.session.getLine(t);e.lastIndex<i;){var r=e.exec(n);if(r.index<=i&&r.index+r[0].length>=i)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(t){var i,e,n=this.selection.getCursor().row,r=this.selection.getCursor().column,o=new d(n,r-1,n,r),s=this.session.getTextRange(o);!isNaN(parseFloat(s))&&isFinite(s)?(i=this.getNumberAt(n,r))&&(e=0<=i.value.indexOf(".")?i.start+i.value.indexOf(".")+1:i.end,o=i.start+i.value.length-e,s=parseFloat(i.value),s*=Math.pow(10,o),s+=t*=e!==i.end&&r<e?Math.pow(10,i.end-r-1):Math.pow(10,i.end-r),s=(s/=Math.pow(10,o)).toFixed(o),o=new d(n,i.start,n,i.end),this.session.replace(o,s),this.moveCursorTo(n,Math.max(i.start+1,r+s.length-i.value.length))):this.toggleWord()},this.$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"],["&&","||"],["==","!="]],this.toggleWord=function(){var t=this.selection.getCursor().row,i=this.selection.getCursor().column;this.selection.selectWord();var e=this.getSelectedText(),n=this.selection.getWordRange().start.column,o=e.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),s=i-n-1;s<0&&(s=0);var a,h=0,c=this;e.match(/[A-Za-z0-9_]+/)&&o.forEach((function(i){a=h+i.length,h<=s&&s<=a&&(e=i,c.selection.clearSelection(),c.moveCursorTo(t,h+n),c.selection.selectTo(t,a+n)),h=a}));for(var l=this.$toggleWordPairs,u=0;u<l.length;u++)for(var d=l[u],f=0;f<=1;f++){var g=+!f,p=e.match(new RegExp("^\\s?_?("+r.escapeRegExp(d[f])+")\\s?$","i"));p&&e.match(new RegExp("([_]|^|\\s)("+r.escapeRegExp(p[1])+")($|\\s)","g"))&&(p=e.replace(new RegExp(r.escapeRegExp(d[f]),"i"),(function(t){var i=d[g];return t.toUpperCase()==t?i=i.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(i=i.substr(0,0)+d[g].charAt(0).toUpperCase()+i.substr(1)),i})),this.insert(p))}},this.removeLines=function(){var t=this.$getSelectedRows();this.session.removeFullLines(t.first,t.last),this.clearSelection()},this.duplicateSelection=function(){var t,i=this.selection,e=this.session,n=i.getRange(),r=i.isBackwards();n.isEmpty()?e.duplicateLines(t=n.start.row,t):(e=e.insert(t=r?n.start:n.end,e.getTextRange(n),!1),n.start=t,n.end=e,i.setSelectionRange(n,r))},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(t,i,e){return this.session.moveText(t,i,e)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(t,i){var e=this.selection;if(!e.inMultiSelectMode||this.inVirtualSelectionMode){var n=e.toOrientedRange(),r=this.$getSelectedRows(n),o=this.session.$moveLines(r.first,r.last,i?0:t);n.moveBy(o=i&&-1==t?0:o,0),e.fromOrientedRange(n)}else{var s=e.rangeList.ranges;e.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,h=0,c=s.length,l=0;l<c;l++){var u=l;s[l].moveBy(a,0);for(var d=(r=this.$getSelectedRows(s[l])).first,f=r.last;++l<c;){h&&s[l].moveBy(h,0);var g=this.$getSelectedRows(s[l]);if(i&&g.first!=f)break;if(!i&&g.first>f+1)break;f=g.last}for(l--,a=this.session.$moveLines(d,f,i?0:t),i&&-1==t&&(u=l+1);u<=l;)s[u].moveBy(a,0),u++;h+=a=i?a:0}e.fromOrientedRange(e.ranges[0]),e.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(t)},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,i){var e=this.renderer,n=this.renderer.layerConfig,r=t*Math.floor(n.height/n.lineHeight);!0===i?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===i&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),t=e.scrollTop,e.scrollBy(0,r*n.lineHeight),null!=i&&e.scrollCursorIntoView(null,.5),e.animateScrolling(t)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,i,e,n){this.renderer.scrollToLine(t,i,e,n)},this.centerSelection=function(){var t=this.getSelectionRange();t={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)},this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,i){this.selection.moveCursorTo(t,i)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t,i){var e=this.getCursorPosition(),n=new I(this.session,e.row,e.column),r=n.getCurrentToken(),o=r||n.stepForward();if(o){var s,a,h,c=!1,l={},u=e.column-o.start,f={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(f[o.value[u]])switch(a=f[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(l[a])&&(l[a]=0),o.value[u]){case"(":case"[":case"{":l[a]++;break;case")":case"]":case"}":l[a]--,-1===l[a]&&(s="bracket",c=!0)}}else-1!==o.type.indexOf("tag-name")&&(isNaN(l[o.value])&&(l[o.value]=0),"<"===r.value?l[o.value]++:"</"===r.value&&l[o.value]--,-1===l[o.value]&&(s="tag",c=!0))}while(c||(r=o,o=n.stepForward(),u=0),o&&!c);if(s){if("bracket"===s)(g=this.session.getBracketRange(e))||(h=(g=new d(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1)).start,(i||h.row===e.row&&Math.abs(h.column-e.column)<2)&&(g=this.session.getBracketRange(h)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var g,p=o.value;if(0===(g=new d(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(e.row,e.column))for(c=!1;o=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&g.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),o.value===p&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?l[p]++:"</"===r.value&&l[p]--,0===l[p]&&(c=!0))),r&&!c;);o&&o.type.indexOf("tag-name")&&(h=g.start).row==e.row&&Math.abs(h.column-e.column)<2&&(h=g.end)}(h=g&&g.cursor||h)&&(t?g&&i?this.selection.setRange(g):g&&g.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(h.row,h.column):this.selection.moveTo(h.row,h.column))}}},this.gotoLine=function(t,i,e){this.selection.clearSelection(),this.session.unfold({row:t-1,column:i||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,i||0),this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,e)},this.navigateTo=function(t,i){this.selection.moveTo(t,i)},this.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var i=this.selection.anchor.getPosition();return this.moveCursorToPosition(i)}this.selection.clearSelection(),this.selection.moveCursorBy(-t||-1,0)},this.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var i=this.selection.anchor.getPosition();return this.moveCursorToPosition(i)}this.selection.clearSelection(),this.selection.moveCursorBy(t||1,0)},this.navigateLeft=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorLeft();else{var i=this.getSelectionRange().start;this.moveCursorToPosition(i)}this.clearSelection()},this.navigateRight=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorRight();else{var i=this.getSelectionRange().end;this.moveCursorToPosition(i)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(t,i){i&&this.$search.set(i);var e=this.$search.find(this.session);return i=0,e&&(this.$tryReplace(e,t)&&(i=1),this.selection.setSelectionRange(e),this.renderer.scrollSelectionIntoView(e.start,e.end)),i},this.replaceAll=function(t,i){i&&this.$search.set(i);var e=this.$search.findAll(this.session),n=0;if(!e.length)return n;i=this.getSelectionRange(),this.selection.moveTo(0,0);for(var r=e.length-1;0<=r;--r)this.$tryReplace(e[r],t)&&n++;return this.selection.setSelectionRange(i),n},this.$tryReplace=function(t,i){var e=this.session.getTextRange(t);return null!==(i=this.$search.replace(e,i))?(t.end=this.session.replace(t,i),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,i,n){i=i||{},"string"==typeof t||t instanceof RegExp?i.needle=t:"object"==typeof t&&e.mixin(i,t);var r=this.selection.getRange();return null==i.needle&&((t=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(i),i.start||this.$search.set({start:r}),t=this.$search.find(this.session),i.preventScroll?t:t?(this.revealRange(t,n),t):(i.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(t,i){this.find({skipCurrent:!0,backwards:!1},t,i)},this.findPrevious=function(t,i){this.find(t,{skipCurrent:!0,backwards:!0},i)},this.revealRange=function(t,i){this.session.unfold(t),this.selection.setSelectionRange(t);var e=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==i&&this.renderer.animateScrolling(e)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(t){t.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(t){var i,e,n,r,o,s,a;t&&(n=!1,(e=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(r=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild),o=this.on("changeSelection",(function(){n=!0})),s=this.renderer.on("beforeRender",(function(){n&&(i=e.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){var t,o,s;n&&i&&(e.isFocused()||e.searchBox&&e.searchBox.isFocused())&&(t=(s=e.renderer).$cursorLayer.$pixelPos,s=t.top-(o=s.layerConfig).offset,null!=(n=0<=t.top&&s+i.top<0||!(t.top<o.height&&t.top+i.top+o.lineHeight>window.innerHeight)&&null)&&(r.style.top=s+"px",r.style.left=t.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(n)),n=i=null)})),this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))})},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",i=this.renderer.$cursorLayer;i&&(i.setSmoothBlinking(/smooth/.test(t)),i.isBlinking=!this.$readOnly&&"wide"!=t,n.setCssClass(i.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,i,e){var n=this;m.loadModule("./ext/prompt",(function(r){r.prompt(n,t,i,e)}))}}.call(C.prototype),m.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(){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(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?A.attach(this):A.detach(this)}},placeholder:{set:function(){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var t=this.session&&(this.renderer.$composition||this.getValue());t&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),n.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):t||this.renderer.placeholderNode?!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),n.addCssClass(this.container,"ace_hasPlaceholder"),(t=n.createElement("div")).className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(t,i){return(Math.abs(t.selection.lead.row-i)||i+1+(i<9?"·":""))+""},getWidth:function(t,i,e){return Math.max(i.toString().length,(e.lastRow+1).toString().length,2)*e.characterWidth},update:function(t,i){i.renderer.$loop.schedule(i.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};i.Editor=C})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(t,i){function e(){this.$maxRev=0,this.$fromUndo=!1,this.reset()}(function(){this.addSession=function(t){this.$session=t},this.add=function(t,i){this.$fromUndo||t!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==i&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev),"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t))},this.addSelection=function(t,i){this.selections.push({value:t,rev:i||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(t,i){null==i&&(i=this.$rev+1);for(var e=this.$undoStack,n=e.length;n--;){var r=e[n][0];if(r.id<=t)break;r.id<i&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(t,i){for(var e=this.selections,n=e.length;n--;){var r=e[n];if(r.rev<t)return i?e[n+1]:r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(t,i){null==i&&(i=this.$rev+1);for(var e=this.$undoStack,n=null,r=0,o=e.length;o--;){var s=e[o][0];if(s.id<i&&!n&&(n=o+1),s.id<=t){r=o+1;break}}return e.slice(r,n)},this.getChangedRanges=function(){},this.getChangedLines=function(){},this.undo=function(t,i){if(this.lastDeltas=null,function(t,i){for(var e=i;e--;){var n=t[e];if(n&&!n[0].ignore){for(;e<i-1;){var r=function(t,i){for(var e=t.length;e--;)for(var n=0;n<i.length;n++)if(!h(t[e],i[n])){for(;e<t.length;){for(;n--;)h(i[n],t[e]);n=i.length,e++}return[t,i]}return t.selectionBefore=i.selectionBefore=t.selectionAfter=i.selectionAfter=null,[i,t]}(t[e],t[e+1]);t[e]=r[0],t[e+1]=r[1],e++}return!0}}}(n=this.$undoStack,n.length)){t=t||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var e=n.pop(),n=null;return e&&(n=t.undoChanges(e,i),this.$redoStack.push(e),this.$syncRev()),this.$fromUndo=!1,n}},this.redo=function(t,i){this.lastDeltas=null,t=t||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev&&(s=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),function(t,i){for(var e=0;e<i.length;e++)for(var s=i[e],a=0;a<s.length;a++)!function(t,i){i=function(t){return{start:o(t.start),end:o(t.end),action:t.action,lines:t.lines.slice()}}(i);for(var e=t.length;e--;){for(var s=t[e],a=0;a<s.length;a++){var h=function(t,i){var e,o,s="insert"==t.action,a="insert"==i.action;if(s&&a)r(t.start,i.start)<0?c(i,t,1):c(t,i,1);else if(s&&!a)0<=r(t.start,i.end)?c(t,i,-1):(r(t.start,i.start)<=0||c(t,n.fromPoints(i.start,t.start),-1),c(i,t,1));else if(!s&&a)0<=r(i.start,t.end)?c(i,t,-1):(r(i.start,t.start)<=0||c(i,n.fromPoints(t.start,i.start),-1),c(t,i,1));else if(!s&&!a)if(0<=r(i.start,t.end))c(i,t,-1);else{if(!(r(i.end,t.start)<=0))return r(t.start,i.start)<0&&(t=u(e=t,i.start)),0<r(t.end,i.end)&&(o=u(t,i.end)),l(i.end,t.start,t.end,-1),o&&!e&&(t.lines=o.lines,t.start=o.start,t.end=o.end,o=t),[i,e,o].filter(Boolean);c(t,i,-1)}return[i,t]}(s[a],i);i=h[0],2!=h.length&&(h[2]?(s.splice(a+1,1,h[1],h[2]),a++):h[1]||(s.splice(a,1),a--))}s.length||t.splice(e,1)}}(t,s[a])}(this.$redoStack,s),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(t){t[0].id=++this.$maxRev}),this));var e=this.$redoStack.pop(),s=null;return e&&(s=t.redoChanges(e,i),this.$undoStack.push(e),this.$syncRev()),this.$fromUndo=!1,s},this.$syncRev=function(){var t;this.$redoStackBaseRev=t=(t=(t=this.$undoStack)[t.length-1])&&t[0].id||0,this.$rev=t},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return 0<this.$undoStack.length},this.canRedo=function(){return 0<this.$redoStack.length},this.bookmark=function(t){null==t&&(t=this.$rev),this.mark=t},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(t){return t?s(t):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(e.prototype);var n=t("./range").Range,r=n.comparePoints;function o(t){return{row:t.row,column:t.column}}function s(t){if(t=t||this,Array.isArray(t))return t.map(s).join("\n");var i="";return t.action?(i="insert"==t.action?"+":"-",i+="["+t.lines+"]"):t.value&&(i=Array.isArray(t.value)?t.value.map(a).join("\n"):a(t.value)),t.start&&(i+=a(t)),(t.id||t.rev)&&(i+="\t("+(t.id||t.rev)+")"),i}function a(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function h(t,i){var e="insert"==t.action,n="insert"==i.action;if(e&&n)if(0<=r(i.start,t.end))c(i,t,-1);else{if(!(r(i.start,t.start)<=0))return;c(t,i,1)}else if(e&&!n)if(0<=r(i.start,t.end))c(i,t,-1);else{if(!(r(i.end,t.start)<=0))return;c(t,i,-1)}else if(!e&&n)if(0<=r(i.start,t.start))c(i,t,1);else{if(!(r(i.start,t.start)<=0))return;c(t,i,1)}else if(!e&&!n)if(0<=r(i.start,t.start))c(i,t,1);else{if(!(r(i.end,t.start)<=0))return;c(t,i,-1)}return 1}function c(t,i,e){l(t.start,i.start,i.end,e),l(t.end,i.start,i.end,e)}function l(t,i,e,n){t.row==(1==n?i:e).row&&(t.column+=n*(e.column-i.column)),t.row+=n*(e.row-i.row)}function u(t,i){var e=t.lines,n=t.end;t.end=o(i);var r,s=e.splice(r=t.end.row-t.start.row,e.length);return e.push(s[0].substring(0,r=r?i.column:i.column-t.start.column)),s[0]=s[0].substr(r),{start:o(i),end:n,lines:s,action:t.action}}i.UndoManager=e})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(t,i){var e=t("../lib/dom");(function(){this.moveContainer=function(t){e.translate(this.element,0,-t.firstRowScreen*t.lineHeight%this.canvasHeight-t.offset*this.$offsetCoefficient)},this.pageChanged=function(t,i){return Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)!==Math.floor(i.firstRowScreen*i.lineHeight/this.canvasHeight)},this.computeLineTop=function(t,i,e){var n=i.firstRowScreen*i.lineHeight;return n=Math.floor(n/this.canvasHeight),e.documentToScreenRow(t,0)*i.lineHeight-n*this.canvasHeight},this.computeLineHeight=function(t,i,e){return i.lineHeight*e.getRowLineCount(t)},this.getLength=function(){return this.cells.length},this.get=function(t){return this.cells[t]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(t){if(Array.isArray(t)){this.cells.push.apply(this.cells,t);for(var i=e.createFragment(this.element),n=0;n<t.length;n++)i.appendChild(t[n].element);this.element.appendChild(i)}else this.cells.push(t),this.element.appendChild(t.element)},this.unshift=function(t){if(Array.isArray(t)){this.cells.unshift.apply(this.cells,t);for(var i=e.createFragment(this.element),n=0;n<t.length;n++)i.appendChild(t[n].element);this.element.firstChild?this.element.insertBefore(i,this.element.firstChild):this.element.appendChild(i)}else this.cells.unshift(t),this.element.insertAdjacentElement("afterbegin",t.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(t){t&&(t.element.remove(),this.cellCache.push(t))},this.createCell=function(t,i,n,r){var o,s=this.cellCache.pop();return s||(o=e.createElement("div"),r&&r(o),this.element.appendChild(o),s={element:o,text:"",row:t}),s.row=t,s}}).call((t=function(t,i){this.element=t,this.canvasHeight=i||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}).prototype),i.Lines=t})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(t,i){var e=t("../lib/dom"),n=t("../lib/oop"),r=t("../lib/lang"),o=t("../lib/event_emitter").EventEmitter,s=t("./lines").Lines;function a(t){var i=document.createTextNode("");return t.appendChild(i),i=e.createElement("span"),t.appendChild(i),t}(function(){n.implement(this,o),this.setSession=function(t){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=t)&&t.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(t,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,i)},this.removeGutterDecoration=function(t,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,i)},this.setAnnotations=function(t){this.$annotations=[];for(var i=0;i<t.length;i++){var e=t[i],n=(n=this.$annotations[o=e.row])||(this.$annotations[o]={text:[]}),o=(o=e.text)?r.escapeHTML(o):e.html||"";-1===n.text.indexOf(o)&&n.text.push(o),"error"==(e=e.type)?n.className=" ace_error":"warning"==e&&" ace_error"!=n.className?n.className=" ace_warning":"info"!=e||n.className||(n.className=" ace_info")}},this.$updateAnnotations=function(t){var i,e;this.$annotations.length&&(0==(e=t.end.row-(i=t.start.row))||("remove"==t.action?this.$annotations.splice(i,1+e,null):((e=new Array(1+e)).unshift(i,1),this.$annotations.splice.apply(this.$annotations,e))))},this.update=function(t){this.config=t;var i=this.session,e=t.firstRow,n=Math.min(t.lastRow+t.gutterOffset,i.getLength()-1);this.oldLastRow=n,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();for(var r=i.getNextFoldLine(e),o=r?r.start.row:1/0,s=null,h=-1,c=e;;){if(o<c&&(o=(r=i.getNextFoldLine(c=r.end.row+1,r))?r.start.row:1/0),n<c){for(;this.$lines.getLength()>h+1;)this.$lines.pop();break}(s=this.$lines.get(++h))?s.row=c:(s=this.$lines.createCell(c,t,this.session,a),this.$lines.push(s)),this.$renderCell(s,t,r,c),c++}this._signal("afterRender"),this.$updateGutterWidth(t)},this.$updateGutterWidth=function(t){var i=this.session,e=i.gutterRenderer||this.$renderer,n=i.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(r=i.getLength()+n-1),r=e?e.getWidth(i,r,t):r.toString().length*t.characterWidth,(r+=(t=this.$padding||this.$computePadding()).left+t.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))},this.$updateCursorRow=function(){var t;this.$highlightGutterLine&&(t=this.session.selection.getCursor(),this.$cursorRow!==t.row&&(this.$cursorRow=t.row))},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var e=0;e<i.length;e++){var n=i[e];if(n.row>=this.$cursorRow){if(n.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0<e&&r&&r.start.row==i[e-1].row))break;n=i[e-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},this.scrollLines=function(t){var i=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(i,t))return this.update(t);this.$lines.moveContainer(t);var e=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=e,!i||n<t.firstRow)return this.update(t);if(e<i.firstRow)return this.update(t);if(i.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(i.firstRow,t.firstRow-1);0<r;r--)this.$lines.shift();if(e<n)for(r=this.session.getFoldedRowCount(e+1,n);0<r;r--)this.$lines.pop();t.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,i.firstRow-1)),n<e&&this.$lines.push(this.$renderLines(t,n+1,e)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},this.$renderLines=function(t,i,e){for(var n=[],r=i,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;s<r&&(s=(o=this.session.getNextFoldLine(r=o.end.row+1,o))?o.start.row:1/0),!(e<r);){var h=this.$lines.createCell(r,t,this.session,a);this.$renderCell(h,t,o,r),n.push(h),r++}return n},this.$renderCell=function(t,i,n,r){var o,s=t.element,a=this.session,h=s.childNodes[0],c=s.childNodes[1],l=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,g=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";return this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&p<=r&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),u[r]&&(m+=u[r]),d[r]&&(m+=d[r]),this.$annotations[r]&&(m+=this.$annotations[r].className),s.className!=m&&(s.className=m),!g||null==(o=g[r])&&(o=g[r]=a.getFoldWidget(r)),o?(m="ace_fold-widget ace_"+o,c.className!=(m+="start"==o&&r==p&&r<n.end.row?" ace_closed":" ace_open")&&(c.className=m),e.setStyle(c.style,"height",m=i.lineHeight+"px"),e.setStyle(c.style,"display","inline-block")):c&&e.setStyle(c.style,"display","none"),(l=(f?f.getText(a,r):r+l).toString())!==h.data&&(h.data=l),e.setStyle(t.element.style,"height",this.$lines.computeLineHeight(r,i,a)+"px"),e.setStyle(t.element.style,"top",this.$lines.computeLineTop(r,i,a)+"px"),t.text=l,t},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(t){t?e.addCssClass(this.element,"ace_folding-enabled"):e.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=e.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},this.getRegion=function(t){var i=this.$padding||this.$computePadding(),e=this.element.getBoundingClientRect();return t.x<i.left+e.left?"markers":this.$showFoldWidgets&&t.x>e.right-i.right?"foldWidgets":void 0}}).call((t=function(t){this.element=e.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}).prototype),i.Gutter=t})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(t,i){var e=t("../range").Range,n=t("../lib/dom");(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.elt=function(t,i){var e=-1!=this.i&&this.element.childNodes[this.i];e?this.i++:(e=document.createElement("div"),this.element.appendChild(e),this.i=-1),e.style.cssText=i,e.className=t},this.update=function(t){if(t){var i,e;for(e in this.config=t,this.i=0,this.markers){var n,r,o=this.markers[e];o.range?(r=o.range.clipRows(t.firstRow,t.lastRow)).isEmpty()||(r=r.toScreenRange(this.session),o.renderer?(n=this.$getTop(r.start.row,t),o.renderer(i,r,this.$padding+r.start.column*t.characterWidth,n,t)):"fullLine"==o.type?this.drawFullLineMarker(i,r,o.clazz,t):"screenLine"==o.type?this.drawScreenLineMarker(i,r,o.clazz,t):r.isMultiLine()?"text"==o.type?this.drawTextMarker(i,r,o.clazz,t):this.drawMultiLineMarker(i,r,o.clazz,t):this.drawSingleLineMarker(i,r,o.clazz+" ace_start ace_br15",t)):o.update(i,this,this.session,t)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(t,i){return(t-i.firstRowScreen)*i.lineHeight},this.drawTextMarker=function(t,i,n,r,o){for(var s,a=this.session,h=i.start.row,c=i.end.row,l=h,u=0,d=a.getScreenLastRowColumn(l),f=new e(l,i.start.column,l,u);l<=c;l++)f.start.row=f.end.row=l,f.start.column=l==h?i.start.column:a.getRowWrapIndent(l),s=u,u=f.end.column=d,d=l+1<c?a.getScreenLastRowColumn(l+1):l==c?0:i.end.column,this.drawSingleLineMarker(t,f,n+(l==h?" ace_start":"")+" ace_br"+((l==h||l==h+1&&i.start.column?1:0)|(s<u?2:0)|(d<u?4:0)|(l==c?8:0)),r,l==c?0:1,o)},this.drawMultiLineMarker=function(t,i,e,n,r){var o,s=this.$padding,a=n.lineHeight,h=this.$getTop(i.start.row,n),c=s+i.start.column*n.characterWidth;r=r||"",this.session.$bidiHandler.isBidiRow(i.start.row)?((o=i.clone()).end.row=o.start.row,o.end.column=this.session.getLine(o.start.row).length,this.drawBidiSingleLineMarker(t,o,e+" ace_br1 ace_start",n,null,r)):this.elt(e+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+h+"px;left:"+c+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(i.end.row)?((o=i.clone()).start.row=o.end.row,o.start.column=0,this.drawBidiSingleLineMarker(t,o,e+" ace_br12",n,null,r)):(h=this.$getTop(i.end.row,n),this.elt(e+" ace_br12","height:"+a+"px;width:"+(o=i.end.column*n.characterWidth)+"px;top:"+h+"px;left:"+s+"px;"+(r||""))),(a=(i.end.row-i.start.row-1)*n.lineHeight)<=0||(h=this.$getTop(i.start.row+1,n),this.elt(e+((i=(i.start.column?1:0)|(i.end.column?0:8))?" ace_br"+i:""),"height:"+a+"px;right:0;top:"+h+"px;left:"+s+"px;"+(r||"")))},this.drawSingleLineMarker=function(t,i,e,n,r,o){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(t,i,e,n,r,o);var s=n.lineHeight;t=(i.end.column+(r||0)-i.start.column)*n.characterWidth,r=this.$getTop(i.start.row,n),this.elt(e,"height:"+s+"px;width:"+t+"px;top:"+r+"px;left:"+(n=this.$padding+i.start.column*n.characterWidth)+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(t,i,e,n,r,o){var s=n.lineHeight,a=this.$getTop(i.start.row,n),h=this.$padding;this.session.$bidiHandler.getSelections(i.start.column,i.end.column).forEach((function(t){this.elt(e,"height:"+s+"px;width:"+t.width+(r||0)+"px;top:"+a+"px;left:"+(h+t.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(t,i,e,n,r){var o=this.$getTop(i.start.row,n),s=n.lineHeight;i.start.row!=i.end.row&&(s+=this.$getTop(i.end.row,n)-o),this.elt(e,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(t,i,e,n,r){i=this.$getTop(i.start.row,n),this.elt(e,"height:"+(n=n.lineHeight)+"px;top:"+i+"px;left:0;right:0;"+(r||""))}}).call((t=function(t){this.element=n.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}).prototype),i.Marker=t})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(t,i){var e=t("../lib/oop"),n=t("../lib/dom"),r=t("../lib/lang"),o=t("./lines").Lines,s=t("../lib/event_emitter").EventEmitter;(function(){e.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t="\n"==(t=this.session.doc).getNewLineCharacter()&&"windows"!=t.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){(this.session=t)&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&("string"==typeof(this.showInvisibles=t)?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var i,e,n,o,s,a,h=this.$tabStrings=[0],c=1;c<t+1;c++)this.showTabs?((a=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",a.textContent=r.stringRepeat(this.TAB_CHAR,c),h.push(a)):h.push(this.dom.createTextNode(r.stringRepeat(" ",c),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,i="ace_indent-guide",e=this.showSpaces?" ace_invisible ace_invisible_space":"",n=r.stringRepeat(this.showSpaces?this.SPACE_CHAR:" ",this.tabSize),o=this.showTabs?" ace_invisible ace_invisible_tab":"",s=this.showTabs?r.stringRepeat(this.TAB_CHAR,this.tabSize):n,(a=this.dom.createElement("span")).className=i+e,a.textContent=n,this.$tabStrings[" "]=a,(a=this.dom.createElement("span")).className=i+o,a.textContent=s,this.$tabStrings["\t"]=a)},this.updateLines=function(t,i,e){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var n=Math.max(i,t.firstRow),r=Math.min(e,t.lastRow),o=this.element.childNodes,s=0,a=t.firstRow;a<n;a++){if(h=this.session.getFoldLine(a)){if(h.containsRow(n)){n=h.start.row;break}a=h.end.row}s++}for(var h,c=!1,l=(h=this.session.getNextFoldLine(a=n))?h.start.row:1/0;l<a&&(l=(h=this.session.getNextFoldLine(a=h.end.row+1,h))?h.start.row:1/0),!(r<a);){var u,d=o[s++];d&&(this.dom.removeChildren(d),this.$renderLine(d,a,a==l&&h),c&&(d.style.top=this.$lines.computeLineTop(a,t,this.session)+"px"),u=t.lineHeight*this.session.getRowLength(a)+"px",d.style.height!=u&&(c=!0,d.style.height=u)),a++}if(c)for(;s<this.$lines.cells.length;){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.row,t,this.session)+"px"}},this.scrollLines=function(t){var i=this.config;if(this.config=t,this.$lines.pageChanged(i,t))return this.update(t);this.$lines.moveContainer(t);var e=t.lastRow;if(!i||(i?i.lastRow:-1)<t.firstRow)return this.update(t);if(e<i.firstRow)return this.update(t);if(!i||i.lastRow<t.firstRow)return this.update(t);if(t.lastRow<i.firstRow)return this.update(t);if(i.firstRow<t.firstRow)for(var n=this.session.getFoldedRowCount(i.firstRow,t.firstRow-1);0<n;n--)this.$lines.shift();if(i.lastRow>t.lastRow)for(n=this.session.getFoldedRowCount(t.lastRow+1,i.lastRow);0<n;n--)this.$lines.pop();t.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,i.firstRow-1)),t.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(t,i.lastRow+1,t.lastRow))},this.$renderLinesFragment=function(t,i,e){for(var r=[],o=i,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;a<o&&(a=(s=this.session.getNextFoldLine(o=s.end.row+1,s))?s.start.row:1/0),!(e<o);){var h=this.$lines.createCell(o,t,this.session),c=h.element;this.dom.removeChildren(c),n.setStyle(c.style,"height",this.$lines.computeLineHeight(o,t,this.session)+"px"),n.setStyle(c.style,"top",this.$lines.computeLineTop(o,t,this.session)+"px"),this.$renderLine(c,o,o==a&&s),c.className=this.$useLineGroups()?"ace_line_group":"ace_line",r.push(h),o++}return r},this.update=function(t){this.$lines.moveContainer(t);for(var i=(this.config=t).firstRow,e=t.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(t,i,e))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,i,e,n){for(var o,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,h=this.dom.createFragment(this.element),c=0;u=a.exec(n);){var l,u,d,f=u[1],g=u[2],p=u[3],m=u[4],I=u[5];!s.showSpaces&&g||(l=c!=u.index?n.slice(c,u.index):"",c=u.index+u[0].length,l&&h.appendChild(this.dom.createTextNode(l,this.element)),f?(u=s.session.getScreenTabSize(i+u.index),h.appendChild(s.$tabStrings[u].cloneNode(!0)),i+=u-1):g?s.showSpaces?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",d.textContent=r.stringRepeat(s.SPACE_CHAR,g.length),h.appendChild(d)):h.appendChild(this.com.createTextNode(g,this.element)):p?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",d.textContent=r.stringRepeat(s.SPACE_CHAR,p.length),h.appendChild(d)):m?(i+=1,(d=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",d.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",d.textContent=s.showSpaces?s.SPACE_CHAR:m,h.appendChild(d)):I&&(i+=1,(d=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",d.className="ace_cjk",d.textContent=I,h.appendChild(d)))}return h.appendChild(this.dom.createTextNode(c?n.slice(c):n,this.element)),this.$textToken[e.type]?t.appendChild(h):(o="ace_"+e.type.replace(/\./g," ace_"),d=this.dom.createElement("span"),"fold"==e.type&&(d.style.width=e.value.length*this.config.characterWidth+"px"),d.className=o,d.appendChild(h),t.appendChild(d)),i+n.length},this.renderIndentGuide=function(t,i,e){var n=i.search(this.$indentGuideRe);if(n<=0||e<=n)return i;if(" "==i[0]){for(var r=(n-=n%this.tabSize)/this.tabSize,o=0;o<r;o++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return i.substr(n)}if("\t"!=i[0])return i;for(o=0;o<n;o++)t.appendChild(this.$tabStrings["\t"].cloneNode(!0));return i.substr(n)},this.$createLineElement=function(){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(t,i,e){var n=0,o=0,s=e[0],a=0,h=this.$createLineElement();t.appendChild(h);for(var c=0;c<i.length;c++){var l=i[c],u=l.value;if(0==c&&this.displayIndentGuides){if(n=u.length,!(u=this.renderIndentGuide(h,u,s)))continue;n-=u.length}if(n+u.length<s)a=this.$renderToken(h,a,l,u),n+=u.length;else{for(;n+u.length>=s;)a=this.$renderToken(h,a,l,u.substring(0,s-n)),u=u.substring(s-n),n=s,h=this.$createLineElement(),t.appendChild(h),h.appendChild(this.dom.createTextNode(r.stringRepeat(" ",e.indent),this.element)),a=0,s=e[++o]||Number.MAX_VALUE;0!=u.length&&(n+=u.length,a=this.$renderToken(h,a,l,u))}}e[e.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(h,a,null,"",!0)},this.$renderSimpleLine=function(t,i){var e=0,n=i[0],r=n.value;(r=this.displayIndentGuides?this.renderIndentGuide(t,r):r)&&(e=this.$renderToken(t,e,n,r));for(var o=1;o<i.length;o++){if(e+(r=(n=i[o]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,e,n,r);e=this.$renderToken(t,e,n,r)}},this.$renderOverflowMessage=function(t,i,e,n,r){e&&this.$renderToken(t,i,e,n.slice(0,this.MAX_LINE_LENGTH-i)),(i=this.dom.createElement("span")).className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=r?"<hide>":"<click to see more...>",t.appendChild(i)},this.$renderLine=function(t,i,e){var n,r,o=t;(n=(e=e||0==e?e:this.session.getFoldLine(i))?this.$getFoldLineTokens(i,e):this.session.getTokens(i)).length?(r=this.session.getRowSplitData(i))&&r.length?(this.$renderWrappedLine(t,n,r),o=t.lastChild):(o=t,this.$useLineGroups()&&(o=this.$createLineElement(),t.appendChild(o)),this.$renderSimpleLine(o,n)):this.$useLineGroups()&&(o=this.$createLineElement(),t.appendChild(o)),this.showEOL&&o&&(e&&(i=e.end.row),(e=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",e.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(e))},this.$getFoldLineTokens=function(t,i){var e=this.session,n=[],r=e.getTokens(t);return i.walk((function(t,i,o,s,a){null!=t?n.push({type:"fold",value:t}):(r=a?e.getTokens(i):r).length&&function(t,i,e){for(var r,o=0,s=0;s+t[o].value.length<i;)if(s+=t[o].value.length,++o==t.length)return;for(s!=i&&((r=t[o].value.substring(i-s)).length>e-i&&(r=r.substring(0,e-i)),n.push({type:t[o].type,value:r}),s=i+r.length,o+=1);s<e&&o<t.length;)(r=t[o].value).length+s>e?n.push({type:t[o].type,value:r.substring(0,e-s)}):n.push(t[o]),s+=r.length,o+=1}(r,s,o)}),i.end.row,this.session.getLine(i.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call((t=function(t){this.dom=n,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}).prototype),i.Text=t})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(t,i){var e=t("../lib/dom");(function(){this.$updateOpacity=function(t){for(var i=this.cursors,n=i.length;n--;)e.setStyle(i[n].style,"opacity",t?"":"0")},this.$startCssAnimation=function(){for(var t=this.cursors,i=t.length;i--;)t[i].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){e.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){e.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,e.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var t=e.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(1<this.cursors.length){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,e.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,e.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var t,i=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&e.removeCssClass(this.element,"ace_smooth-blinking"),i(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&setTimeout(function(){e.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),e.HAS_CSS_ANIMATION?this.$startCssAnimation():(t=function(){this.timeoutId=setTimeout((function(){i(!1)}),.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval((function(){i(!0),t()}),this.blinkInterval),t())):this.$stopCssAnimation()},this.getPixelPosition=function(t,i){if(!this.config||!this.session)return{left:0,top:0};t=t||this.session.selection.getCursor();var e=this.session.documentToScreenPosition(t);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(e.row,t.row)?this.session.$bidiHandler.getPosLeft(e.column):e.column*this.config.characterWidth),top:(e.row-(i?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(t,i){return 0<=t.top&&t.top<i.maxHeight},this.update=function(t){this.config=t;for(var i=this.session.$selectionMarkers,n=0,r=0,o=(n=0,(i=void 0===i||0===i.length?[{cursor:null}]:i).length);n<o;n++){var s,a,h=this.getPixelPosition(i[n].cursor,!0);(h.top>t.height+t.offset||h.top<0)&&1<n||(a=(s=this.cursors[r++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,h,t,i[n],this.session):this.isCursorInView(h,t)?(e.setStyle(a,"display","block"),e.translate(s,h.left,h.top),e.setStyle(a,"width",Math.round(t.characterWidth)+"px"),e.setStyle(a,"height",t.lineHeight+"px")):e.setStyle(a,"display","none"))}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=h,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(t){t!=this.overwrite&&((this.overwrite=t)?e.addCssClass(this.element,"ace_overwrite-cursors"):e.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call((t=function(t){this.element=e.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),e.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}).prototype),i.Cursor=t})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,i){function e(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}var n=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/event"),s=t("./lib/event_emitter").EventEmitter;function a(t,i){e.call(this,t),this.scrollTop=0,this.scrollHeight=0,i.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}(function(){n.implement(this,s),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(e.prototype),n.inherits(a,e),function(){this.classSuffix="-v",this.onScroll=function(){var t;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(this.scrollTop=this.scrollTop*(1-(t=this.element.clientHeight/this.scrollHeight))/(this.coeff-t)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=this.setScrollHeight=function(t){32768<(this.scrollHeight=t)?(this.coeff=32768/t,t=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)}}.call(a.prototype),n.inherits(t=function(t,i){e.call(this,t),this.scrollLeft=0,this.height=i.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"},e),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}.call(t.prototype),i.ScrollBar=a,i.ScrollBarV=a,i.ScrollBarH=t,i.VScrollBar=a,i.HScrollBar=t})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(t,i){var e=t("./lib/event");(function(){this.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(e.nextFrame(this._flush),this.pending=!0)},this.clear=function(){var t=this.changes;return this.changes=0,t}}).call((t=function(t,i){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=i||window;var n=this;this._flush=function(){n.pending=!1;var t=n.changes;t&&(e.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}).prototype),i.RenderLoop=t})),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(t,i){var e=t("../lib/oop"),n=t("../lib/dom"),r=t("../lib/lang"),o=t("../lib/event"),s=t("../lib/useragent"),a=t("../lib/event_emitter").EventEmitter,h="function"==typeof ResizeObserver;i=i.FontMetrics=function(t){this.el=n.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=n.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=n.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",256),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()},function(){e.implement(this,a),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(t,i){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",s.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=i?"hidden":"visible"},this.checkForSizeChanges=function(t){var i;!(t=void 0===t?this.$measureSizes():t)||this.$characterSize.width===t.width&&this.$characterSize.height===t.height||(this.$measureNode.style.fontWeight="bold",i=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=i&&i.width===t.width&&i.height===t.height,this._emit("changeCharacterSize",{data:t}))},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver((function(){t.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=o.onIdle((function i(){t.checkForSizeChanges(),o.onIdle(i,500)}),500)},this.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(t){return 0===(t={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/256}).width||0===t.height?null:t},this.$measureCharWidth=function(t){return this.$main.textContent=r.stringRepeat(t,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(t){var i=this.charSizes[t];return void 0===i?this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width:i},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function t(i){return i&&i.parentElement?(window.getComputedStyle(i).zoom||1)*t(i.parentElement):1},this.$initTransformMeasureNodes=function(){function t(t,i){return["div",{style:"position: absolute;top:"+t+"px;left:"+i+"px;"}]}this.els=n.buildDom([t(0,0),t(200,0),t(0,200),t(200,200)],this.el)},this.transformCoordinates=function(t,i){function e(t,i,e){var n=t[1]*i[0]-t[0]*i[1];return[(-i[1]*e[0]+i[0]*e[1])/n,(+t[1]*e[0]-t[0]*e[1])/n]}function n(t,i){return[t[0]-i[0],t[1]-i[1]]}function r(t,i){return[t[0]+i[0],t[1]+i[1]]}function o(t,i){return[t*i[0],t*i[1]]}function s(t){return[(t=t.getBoundingClientRect()).left,t.top]}t=t&&o(1/this.$getZoom(this.el),t),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),h=s(this.els[1]),c=s(this.els[2]),l=e(n(u=s(this.els[3]),h),n(u,c),n(r(h,c),r(u,a))),u=o(1+l[0],n(h,a));return h=o(1+l[1],n(c,a)),i?(c=l[0]*i[0]/200+l[1]*i[1]/200+1,i=r(o(i[0],u),o(i[1],h)),r(o(1/c/200,i),a)):(a=n(t,a),a=e(n(u,o(l[0],a)),n(h,o(l[1],a)),a),o(200,a))}}.call(i.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(t,i){var e=t("./lib/oop"),n=t("./lib/dom"),r=t("./config"),o=t("./layer/gutter").Gutter,s=t("./layer/marker").Marker,a=t("./layer/text").Text,h=t("./layer/cursor").Cursor,c=t("./scrollbar").HScrollBar,l=t("./scrollbar").VScrollBar,u=t("./renderloop").RenderLoop,d=t("./layer/font_metrics").FontMetrics,f=t("./lib/event_emitter").EventEmitter,g='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',p=t("./lib/useragent"),m=p.isIE;n.importCssString(g,"ace_editor.css"),function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,e.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),n.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=t)&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(t,i,e){if(void 0===i&&(i=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<i&&(this.$changedLines.lastRow=i)):this.$changedLines={firstRow:t,lastRow:i},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!e)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,i,e,n){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=t?1:0;var r=this.container;if(i=this.$updateCachedSize(t,i,e=e||r.clientWidth||r.scrollWidth,n=n||r.clientHeight||r.scrollHeight),!this.$size.scrollerHeight||!e&&!n)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(t,i,e,r){var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};return(r-=this.$extraHeight||0)&&(t||s.height!=r)&&(s.height=r,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),e&&(t||s.width!=e)&&(o|=this.CHANGE_SIZE,s.width=e,null==i&&(i=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=i,n.setStyle(this.scrollBarH.element.style,"left",i+"px"),n.setStyle(this.scroller.style,"left",i+this.margin.left+"px"),s.scrollerWidth=Math.max(0,e-i-this.scrollBarV.getWidth()-this.margin.h),n.setStyle(this.$gutter.style,"left",this.margin.left+"px"),i=this.scrollBarV.getWidth()+"px",n.setStyle(this.scrollBarH.element.style,"right",i),n.setStyle(this.scroller.style,"right",i),n.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(o|=this.CHANGE_FULL)),s.$dirty=!e||!r,o&&this._signal("resize",a),o},this.onGutterResize=function(t){(t=this.$showGutter?t:0)!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding;return t=Math.floor(t/this.characterWidth),this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){var t;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((t=n.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=n.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)),(t=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit())},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){var t,i,e,r,o,s,a;this.$isMousePressed||(t=this.textarea.style,s=this.$composition,this.$keepTextAreaAtCursor||s?(a=this.$cursorLayer.$pixelPos)&&(s&&s.markerRange&&(a=this.$cursorLayer.getPixelPosition(s.markerRange.start,!0)),i=a.top,e=a.left,r=s&&s.useTextareaForIME?this.lineHeight:m?0:1,(i-=(o=this.layerConfig).offset)<0||i>o.height-r?n.translate(this.textarea,0,0):(a=1,o=this.$size.height-r,s?s.useTextareaForIME?a=this.characterWidth*this.session.$getStringScreenWidth(s=this.textarea.value)[0]:i+=this.lineHeight+2:i+=this.lineHeight,(e-=this.scrollLeft)>this.$size.scrollerWidth-a&&(e=this.$size.scrollerWidth-a),e+=this.gutterWidth+this.margin.left,n.setStyle(t,"height",r+"px"),n.setStyle(t,"width",a+"px"),n.translate(this.textarea,Math.min(e,this.$size.scrollerWidth-a),Math.min(i,o)))):n.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=this.layerConfig,i=t.lastRow;return this.session.documentToScreenRow(i,0)*t.lineHeight-this.session.getScrollTop()>t.height-t.lineHeight?i-1:i},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,i,e,n){var r=this.scrollMargin;r.top=0|t,r.bottom=0|i,r.right=0|n,r.left=0|e,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(t,i,e,n){var r=this.margin;r.top=0|t,r.bottom=0|i,r.right=0|n,r.left=0|e,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,i=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(t-=(i-this.lineHeight)*this.$scrollPastEnd)-i&&(t=this.scrollTop+i,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,i){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||i)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var e,r=this.layerConfig;return(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL)&&(t|=this.$computeLayerConfig()|this.$loop.clear(),r.firstRow==this.layerConfig.firstRow||r.firstRowScreen!=this.layerConfig.firstRowScreen||0<(e=this.scrollTop+(r.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=e,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear()),r=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),n.translate(this.content,-this.scrollLeft,-r.offset),e=r.minHeight+"px",n.setStyle(this.content.style,"width",i=r.width+2*this.$padding+"px"),n.setStyle(this.content.style,"height",e)),t&this.CHANGE_H_SCROLL&&(n.translate(this.content,-this.scrollLeft,-r.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(r),this.$showGutter&&this.$gutterLayer.update(r),this.$markerBack.update(r),this.$markerFront.update(r),this.$cursorLayer.update(r),this.$moveTextAreaToCursor(),void this._signal("afterRender",t)):(t&this.CHANGE_SCROLL?(this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(r):this.$textLayer.scrollLines(r),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(r):this.$gutterLayer.scrollLines(r)),this.$markerBack.update(r),this.$markerFront.update(r),this.$cursorLayer.update(r),this.$moveTextAreaToCursor()):(t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(r),this.$showGutter&&this.$gutterLayer.update(r)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(r):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(r):t&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(r),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(r),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(r),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(r)),void this._signal("afterRender",t))}this.$changes|=t},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,i=this.$maxLines*this.lineHeight,e=Math.min(i,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(e+=this.scrollBarH.getHeight()),t=!((e=this.$maxPixelHeight&&e>this.$maxPixelHeight?this.$maxPixelHeight:e)<=2*this.lineHeight)&&i<t,e==this.desiredHeight&&this.$size.height==this.desiredHeight&&t==this.$vScroll||(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),t=this.container.clientWidth,this.container.style.height=e+"px",this.$updateCachedSize(!0,this.$gutterWidth,t,e),this.desiredHeight=e,this._signal("autosize"))},this.$computeLayerConfig=function(){var t=this.session,i=this.$size,e=i.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=this.$horizScroll!==(u=!e&&(this.$hScrollBarAlwaysVisible||i.scrollerWidth-r-2*this.$padding<0));o&&(this.$horizScroll=u,this.scrollBarH.setVisible(u));var s=this.$vScroll;this.$maxLines&&1<this.lineHeight&&this.$autosize();var a=i.scrollerHeight+this.lineHeight;n+=d=!this.$maxLines&&this.$scrollPastEnd?(i.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,n-i.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-i.scrollerWidth+h.right)));var c=s!==(l=!e&&(this.$vScrollBarAlwaysVisible||i.scrollerHeight-n+d<0||this.scrollTop>h.top));c&&(this.$vScroll=l,this.scrollBarV.setVisible(l));var l,u=this.scrollTop%this.lineHeight,d=(e=Math.ceil(a/this.lineHeight)-1,h=(d=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)))+e,s=this.lineHeight,t.screenToDocumentRow(d,0));return(l=t.getFoldLine(d))&&(d=l.start.row),e=t.documentToScreenRow(d,0),l=t.getRowLength(d)*s,h=Math.min(t.screenToDocumentRow(h,0),t.getLength()-1),a=i.scrollerHeight+t.getRowLength(h)*s+l,u=this.scrollTop-e*s,l=0,this.layerConfig.width==r&&!o||(l=this.CHANGE_H_SCROLL),(o||c)&&(l|=this.$updateCachedSize(!0,this.gutterWidth,i.width,i.height),this._signal("scrollbarVisibilityChanged"),c&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:d,firstRowScreen:e,lastRow:h,lineHeight:s,characterWidth:this.characterWidth,minHeight:a,maxHeight:n,offset:u,gutterOffset:s?Math.max(0,Math.ceil((u+i.height-i.scrollerHeight)/s)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),l},this.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,i=this.$changedLines.lastRow;this.$changedLines=null;var e=this.layerConfig;if(!(t>e.lastRow+1||i<e.firstRow))return i===1/0?(this.$showGutter&&this.$gutterLayer.update(e),void this.$textLayer.update(e)):(this.$textLayer.updateLines(e,t,i),!0)}},this.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),this.$textLayer&&t>this.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,i){this.$gutterLayer.addGutterDecoration(t,i)},this.removeGutterDecoration=function(t,i){this.$gutterLayer.removeGutterDecoration(t,i)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,i,e){this.scrollCursorIntoView(t,e),this.scrollCursorIntoView(i,e)},this.scrollCursorIntoView=function(t,i,e){var n,r,o;0!==this.$size.scrollerHeight&&(n=(o=this.$cursorLayer.getPixelPosition(t)).left,r=o.top,t=e&&e.top||0,o=e&&e.bottom||0,r<(e=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+t?(i&&e+t>r+this.lineHeight&&(r-=i*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):e+this.$size.scrollerHeight-o<r+this.lineHeight&&(i&&e+this.$size.scrollerHeight-o<r-this.lineHeight&&(r+=i*this.$size.scrollerHeight),this.session.setScrollTop(r+this.lineHeight+o-this.$size.scrollerHeight)),n<(o=this.scrollLeft)?(n<this.$padding+2*this.layerConfig.characterWidth&&(n=-this.scrollMargin.left),this.session.setScrollLeft(n)):o+this.$size.scrollerWidth<n+this.characterWidth?this.session.setScrollLeft(Math.round(n+this.characterWidth-this.$size.scrollerWidth)):o<=this.$padding&&n-o<this.characterWidth&&this.session.setScrollLeft(0))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},this.alignCursor=function(t,i){var e=this.$cursorLayer.getPixelPosition(t="number"==typeof t?{row:t,column:0}:t);return this.session.setScrollTop(i=e.top-(t=this.$size.scrollerHeight-this.lineHeight)*(i||0)),i},this.STEPS=8,this.$calcSteps=function(t,i){var e,n=0,r=this.STEPS,o=[];for(n=0;n<r;++n)o.push((i-(e=t))*(Math.pow(n/this.STEPS-1,3)+1)+e);return o},this.scrollToLine=function(t,i,e,n){t=this.$cursorLayer.getPixelPosition({row:t,column:0}).top,i&&(t-=this.$size.scrollerHeight/2),i=this.scrollTop,this.session.setScrollTop(t),!1!==e&&this.animateScrolling(i,n)},this.animateScrolling=function(t,i){var e=this.scrollTop;if(this.$animatedScroll){var n=this;if(t!=e){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0])==e)return}var o=n.$calcSteps(t,e);this.$scrollAnimation={from:t,to:e,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=e,this.$timer=setInterval((function(){return n.session?void(o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=e):null!=e?(n.session.$scrollTop=-1,n.session.setScrollTop(e),e=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,i&&i())):clearInterval(n.$timer)}),10)}}},this.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},this.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(t,i){this.session.setScrollTop(i),this.session.setScrollLeft(i)},this.scrollBy=function(t,i){i&&this.session.setScrollTop(this.session.getScrollTop()+i),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},this.isScrollableBy=function(t,i){return i<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<i&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<t&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(t,i){this.$hasCssTransforms?(n={top:0,left:0},t=(e=this.$fontMetrics.transformCoordinates([t,i]))[1]-this.gutterWidth-this.margin.left,i=e[0]):n=this.scroller.getBoundingClientRect();var e=t+this.scrollLeft-n.left-this.$padding,n=(t=e/this.characterWidth,i=Math.floor((i+this.scrollTop-n.top)/this.lineHeight),this.$blockCursor?Math.floor(t):Math.round(t));return{row:i,column:n,side:0<t-n?1:-1,offsetX:e}},this.screenToTextCoordinates=function(t,i){this.$hasCssTransforms?(n={top:0,left:0},t=(e=this.$fontMetrics.transformCoordinates([t,i]))[1]-this.gutterWidth-this.margin.left,i=e[0]):n=this.scroller.getBoundingClientRect();var e=t+this.scrollLeft-n.left-this.$padding,n=(t=e/this.characterWidth,t=this.$blockCursor?Math.floor(t):Math.round(t),Math.floor((i+this.scrollTop-n.top)/this.lineHeight));return this.session.screenToDocumentPosition(n,Math.max(t,0),e)},this.textToScreenCoordinates=function(t,i){var e=this.scroller.getBoundingClientRect();return i=this.session.documentToScreenPosition(t,i),t=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),{pageX:e.left+t-this.scrollLeft,pageY:e.top+(i=i.row*this.lineHeight)-this.scrollTop}},this.visualizeFocus=function(){n.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){n.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){(this.$composition=t).cssText||(t.cssText=this.textarea.style.cssText),null==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(n.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(t){var i=this.session.selection.cursor;this.addToken(t,"composition_placeholder",i.row,i.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){var t;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),n.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,this.removeExtraToken((t=this.session.selection.cursor).row,t.column),this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(t,i,e,n){var r=this.session;r.bgTokenizer.lines[e]=null;var o={type:i,value:t},s=r.getTokens(e);if(null==n)s.push(o);else for(var a=0,h=0;h<s.length;h++){var c=s[h];if(n<=(a+=c.value.length)){var l=c.value.slice(0,u=c.value.length-(a-n)),u=c.value.slice(u);s.splice(h,1,{type:c.type,value:l},o,{type:c.type,value:u});break}}this.updateLines(e,e)},this.removeExtraToken=function(t){this.updateLines(t,t)},this.setTheme=function(t,i){var e=this;function o(r){if(e.$themeId!=t)return i&&i();if(!r||!r.cssClass)throw new Error("couldn't load module "+t+" or it didn't call define");r.$id&&(e.$themeId=r.$id),n.importCssString(r.cssText,r.cssClass,e.container),e.theme&&n.removeCssClass(e.container,e.theme.cssClass);var o="padding"in r?r.padding:"padding"in(e.theme||{})?4:e.$padding;e.$padding&&o!=e.$padding&&e.setPadding(o),e.$theme=r.cssClass,e.theme=r,n.addCssClass(e.container,r.cssClass),n.setCssClass(e.container,"ace_dark",r.isDark),e.$size&&(e.$size.width=0,e.$updateSizeAsync()),e._dispatchEvent("themeLoaded",{theme:r}),i&&i()}this.$themeId=t,e._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t?o(t):r.loadModule(["theme",t||this.$options.theme.initialValue],o)},this.getTheme=function(){return this.$themeId},this.setStyle=function(t,i){n.setCssClass(this.container,t,!1!==i)},this.unsetStyle=function(t){n.removeCssClass(this.container,t)},this.setCursorStyle=function(t){n.setStyle(this.scroller.style,"cursor",t)},this.setMouseCursor=function(t){n.setStyle(this.scroller.style,"cursor",t)},this.attachToShadowRoot=function(){n.importCssString(g,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}.call((t=function(t,i){var e=this;this.container=t||n.createElement("div"),n.addCssClass(this.container,"ace_editor"),n.HI_DPI&&n.addCssClass(this.container,"ace_hidpi"),this.setTheme(i),this.$gutter=n.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=n.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=n.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content),i=this.$textLayer=new a(this.content),this.canvas=i.element,this.$markerFront=new s(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new l(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(t){e.updateCharacterSize(),e.onResize(!0,e.gutterWidth,e.$size.width,e.$size.height),e._signal("changeCharacterSize",t)})),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=!p.isIOS,this.$loop=new u(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._signal("renderer",this)}).prototype),r.defineOptions(t.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&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(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(t){n.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(t){this.$gutterLayer.setHighlightGutterLine(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(t){this.$scrollPastEnd!=(t=+t||0)&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!p.isMobile&&!p.isIE}}),i.VirtualRenderer=t})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(t,i){var e=t("../lib/oop"),n=t("../lib/net"),r=t("../lib/event_emitter").EventEmitter,o=t("../config");function s(t){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var i=function(t){var i="importScripts('"+n.qualifyURL(t)+"');";try{return new Blob([i],{type:"application/javascript"})}catch(e){return(t=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder)).append(i),t.getBlob("application/javascript")}}(t);return i=(window.URL||window.webkitURL).createObjectURL(i),new Worker(i)}return new Worker(t)}function a(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){e.implement(this,r),this.$createWorkerFromOldConfig=function(i,e,n,r,a){var h,c;return t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),o.get("packaged")||!t.toUrl?r=r||o.moduleUrl(e,"worker"):(h=this.$normalizePath,r=r||h(t.toUrl("ace/worker/worker.js",null,"_")),c={},i.forEach((function(i){c[i]=h(t.toUrl(i,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))),this.$worker=s(r),a&&this.send("importScripts",a),this.$worker.postMessage({init:!0,tlns:c,module:e,classname:n}),this.$worker},this.onMessage=function(t){var i=t.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var e=this.callbacks[i.id];e&&(e(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(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return n.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,i){this.$worker.postMessage({command:t,args:i})},this.call=function(t,i,e){var n;e&&(n=this.callbackId++,this.callbacks[n]=e,i.push(n)),this.send(t,i)},this.emit=function(t,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.postMessage({event:t,data:{data:i.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),this.deltaQueue.push(t.start,"insert"==t.action?t.lines:t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,50<t.length&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(a.prototype),i.UIWorkerClient=function(t,i,e){var n=null,s=!1,h=Object.create(r),c=[],l=new a({messageBuffer:c,terminate:function(){},postMessage:function(t){c.push(t),n&&(s?setTimeout(u):u())}});l.setEmitSync=function(t){s=t};var u=function(){var t=c.shift();t.command?n[t.command].apply(n,t.args):t.event&&h._signal(t.event,t.data)};return h.postMessage=function(t){l.onMessage({data:t})},h.callback=function(t,i){this.postMessage({type:"call",id:i,data:t})},h.emit=function(t,i){this.postMessage({type:"event",name:t,data:i})},o.loadModule(["worker",i],(function(t){for(n=new t[e](h);c.length;)u()})),l},i.WorkerClient=a,i.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(t,i){var e=t("./range").Range,n=t("./lib/event_emitter").EventEmitter,r=t("./lib/oop");(function(){r.implement(this,n),this.setup=function(){var t=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new e(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(e){(e=i.createAnchor(e.row,e.column)).$insertRight=!0,e.detach(),t.others.push(e)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){var t,i;this.othersActive||(t=this.session,(i=this).othersActive=!0,this.others.forEach((function(n){n.markerId=t.addMarker(new e(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},this.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var i=t;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var n="insert"===t.action?i.end.column-i.start.column:i.start.column-i.end.column,r=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,o=i.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var s=this.others.length-1;0<=s;s--){var a={row:(h=this.others[s]).row,column:h.column+o};this.doc.insertMergedLines(a,t.lines)}else if("remove"===t.action)for(s=this.others.length-1;0<=s;s--){var h;a={row:(h=this.others[s]).row,column:h.column+o},this.doc.remove(new e(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(t){this.pos.onChange(t);for(var i=this.others.length;i--;)this.others[i].onChange(t);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var t=this,i=this.session,n=function(n,r){i.removeMarker(n.markerId),n.markerId=i.addMarker(new e(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(t){var i;!this.$updating&&this.session&&((i=this.session.selection.getCursor()).row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t)))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),i=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,e=0;e<i;e++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call((t=function(t,i,e,n,r,o){var s=this;this.length=i,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=e,e=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1},this.$undoStackDepth=e.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}).prototype),i.PlaceHolder=t})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,i){var e=t("../lib/event"),n=t("../lib/useragent");function r(t,i){return t.row==i.row&&t.column==i.column}i.onMouseDown=function(t){var i=t.domEvent,o=i.altKey,s=i.shiftKey,a=i.ctrlKey,h=t.getAccelKey(),c=t.getButton();if(a&&n.isMac&&(c=i.button),t.editor.inMultiSelectMode&&2==c)t.editor.textInput.onContextMenu(t.domEvent);else if(a||o||h){if(0===c){var l,u,d,f,g=t.editor,p=g.selection,m=g.inMultiSelectMode,I=t.getDocumentPosition(),b=p.getCursor(),C=(b=t.inSelection()||p.isEmpty()&&r(I,b),t.x),A=t.y,v=g.session,y=g.renderer.pixelToScreenCoordinates(C,A),w=y;if(g.$mouseHandler.$enableJumpToDef)a&&o||h&&o?l=s?"block":"add":o&&g.$blockSelectEnabled&&(l="block");else if(h&&!o){if(l="add",!m&&s)return}else o&&g.$blockSelectEnabled&&(l="block");if(l&&n.isMac&&i.ctrlKey&&g.$mouseHandler.cancelContextMenu(),"add"==l)!m&&b||(m||(u=p.toOrientedRange(),g.addSelectionMarker(u)),d=p.rangeList.rangeAtPoint(I),g.inVirtualSelectionMode=!0,s&&(d=null,g.removeSelectionMarker(u=p.ranges[0]||u)),g.once("mouseup",(function(){var t=p.toOrientedRange();d&&t.isEmpty()&&r(d.cursor,t.cursor)?p.substractPoint(t.cursor):(s?p.substractPoint(u.cursor):u&&(g.removeSelectionMarker(u),p.addRange(u)),p.addRange(t)),g.inVirtualSelectionMode=!1})));else if("block"==l){function x(){var t=g.renderer.pixelToScreenCoordinates(C,A),i=v.screenToDocumentPosition(t.row,t.column,t.offsetX);r(w,t)&&r(i,p.lead)||(w=t,g.selection.moveToPosition(i),g.renderer.scrollCursorIntoView(),g.removeSelectionMarkers(k),k=p.rectangularRangeBlock(w,y),g.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=g.$mouseHandler.$clickSelection.clone()),k.forEach(g.addSelectionMarker,g),g.updateSelectionMarkers())}t.stop(),g.inVirtualSelectionMode=!0;var k=[];m&&!h?p.toSingleRange():!m&&h&&(f=p.toOrientedRange(),g.addSelectionMarker(f)),s?y=v.documentToScreenPosition(p.lead):p.moveToPosition(I),w={row:-1,column:-1};var j=x;e.capture(g.container,(function(t){C=t.clientX,A=t.clientY}),(function(){x(),clearInterval(S),g.removeSelectionMarkers(k),k.length||(k=[p.toOrientedRange()]),f&&(g.removeSelectionMarker(f),p.toSingleRange(f));for(var t=0;t<k.length;t++)p.addRange(k[t]);g.inVirtualSelectionMode=!1,g.$mouseHandler.$clickSelection=null}));var S=setInterval((function(){j()}),20);return t.preventDefault()}}}else 0===c&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(t,i){i.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(t){t.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(t){t.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(t){t.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(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(t){t.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(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(t){1<t.multiSelect.rangeCount?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],i.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}],t=t("../keyboard/hash_handler").HashHandler,i.keyboardHandler=new t(i.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(t,i){var e=t("./range_list").RangeList,n=t("./range").Range,r=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,s=t("./lib/event"),a=t("./lib/lang"),h=t("./commands/multi_select_commands");i.commands=h.defaultCommands.concat(h.multiSelectCommands);var c=new(t("./search").Search),l=t("./edit_session").EditSession;function u(t){var e,n;function r(){n&&(e.renderer.setMouseCursor(""),n=!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=i.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",o),t.commands.addCommands(h.defaultCommands),(e=t).textInput&&(t=e.textInput.getElement(),n=!1,s.addListener(t,"keydown",(function(t){t=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey),e.$blockSelectEnabled&&t?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)))}(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,i){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var e=this.toOrientedRange();if(this.rangeList.add(e),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),i||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(e),this.$onAddRange(e)}return t.cursor||(t.cursor=t.end),e=this.rangeList.add(t),this.$onAddRange(t),e.length&&this.$onRemoveRange(e),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),i||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var i=this.rangeList.removeAll();i.length&&this.$onRemoveRange(i),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){if(t=this.rangeList.substractPoint(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 i;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(i=this.rangeList.ranges.pop(),t.push(i),this.rangeCount=0);for(var e=t.length;e--;){var n=this.ranges.indexOf(t[e]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(i=i||this.ranges[0])&&!i.isEqual(this.getRange())&&this.fromOrientedRange(i)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new e,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()],i=[],e=0;e<t.length;e++){var r=t[e],o=r.start.row,s=r.end.row;if(o===s)i.push(r.clone());else{for(i.push(new n(o,r.start.column,o,this.session.getLine(o).length));++o<s;)i.push(this.getLineRange(o,!0));i.push(new n(s,0,s,r.end.column))}0!=e||this.isBackwards()||(i=i.reverse())}for(this.toSingleRange(),e=i.length;e--;)this.addRange(i[e])},this.joinSelections=function(){var t=(i=this.rangeList.ranges)[i.length-1],i=n.fromPoints(i[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)},this.toggleBlockSelection=function(){var t,i;1<this.rangeCount?(i=(t=this.rangeList.ranges)[t.length-1],t=n.fromPoints(t[0].start,i.end),this.toSingleRange(),this.setSelectionRange(t,i.cursor==i.start)):(t=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(t,i).forEach(this.addRange,this))},this.rectangularRangeBlock=function(t,i,e){var r,o,s,a,h=[],c=t.column<i.column;a=c?(r=t.column,o=i.column,s=t.offsetX,i.offsetX):(r=i.column,o=t.column,s=i.offsetX,t.offsetX);var l,u,d,f=t.row<i.row;u=f?(l=t.row,i.row):(l=i.row,t.row),r<0&&(r=0),(l=l<0?0:l)==u&&(e=!0);for(var g,p,m=l;m<=u;m++){var I=n.fromPoints(this.session.screenToDocumentPosition(m,r,s),this.session.screenToDocumentPosition(m,o,a));if(I.isEmpty()){if(d&&(g=I.end).row==(p=d).row&&g.column==p.column)break;d=I.end}I.cursor=c?I.start:I.end,h.push(I)}if(f&&h.reverse(),!e){for(var b=h.length-1;h[b].isEmpty()&&0<b;)b--;if(0<b)for(var C=0;h[C].isEmpty();)C++;for(var A=b;C<=A;A--)h[A].isEmpty()&&h.splice(A,1)}return h}}.call(r.prototype),l=t("./editor").Editor,function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var i=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",i),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){t.marker&&(this.session.removeMarker(t.marker),-1!=(t=this.session.$selectionMarkers.indexOf(t))&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(t){for(var i=this.session.$selectionMarkers,e=t.length;e--;){var n=t[e];n.marker&&(this.session.removeMarker(n.marker),-1!=(n=i.indexOf(n))&&i.splice(n,1))}this.session.selectionMarkerCount=i.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(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var i,e=t.command,n=t.editor;if(n.multiSelect)return e.multiSelectAction?i="forEach"==e.multiSelectAction?n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),e.exec(n,t.args||{})):e.multiSelectAction(n,t.args||{}):(i=e.exec(n,t.args||{}),n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()),i},this.forEachSelection=function(t,i,e){if(!this.inVirtualSelectionMode){var n,o=e&&e.keepOrder,s=1==e||e&&e.$byLines,a=this.session,h=this.selection,c=(e=h.rangeList,(o?h:e).ranges);if(!c.length)return t.exec?t.exec(this,i||{}):t(this,i||{});e=h._eventRegistry,h._eventRegistry={};var l=new r(a);this.inVirtualSelectionMode=!0;for(var u=c.length;u--;){if(s)for(;0<u&&c[u].start.row==c[u-1].end.row;)u--;l.fromOrientedRange(c[u]),l.index=u,this.selection=a.selection=l;var d=t.exec?t.exec(this,i||{}):t(this,i||{});n||void 0===d||(n=d),l.toOrientedRange(c[u])}return l.detach(),this.selection=a.selection=h,this.inVirtualSelectionMode=!1,h._eventRegistry=e,h.mergeOverlappingRanges(),h.ranges[0]&&h.fromOrientedRange(h.ranges[0]),h=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var i=this.multiSelect.rangeList.ranges,e=[],n=0;n<i.length;n++)e.push(this.session.getTextRange(i[n]));var r=this.session.getDocument().getNewLineCharacter();(t=e.join(r)).length==(e.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,i){var e;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(e=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&i==this.multiSelect.anchor||((e=i==this.multiSelect.anchor?e.cursor==e.start?e.end:e.start:e.cursor).row!=i.row||this.session.$clipPositionToDocument(e.row,e.column).column!=i.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(t,i,e){var n;(i=i||{}).needle=t||i.needle,null==i.needle&&(n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),i.needle=this.session.getTextRange(n)),this.$search.set(i);var r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;e||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return n&&o.rangeList.rangeAtPoint(n.start)&&o.addRange(n,!0),r.length},this.selectMoreLines=function(t,i){var e=this.selection.toOrientedRange(),r=e.cursor==e.end,o=this.session.documentToScreenPosition(e.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a,h,c=this.session.screenToDocumentPosition(o.row+t,o.column);s=e.isEmpty()?c:(s=this.session.documentToScreenPosition(r?e.end:e.start),this.session.screenToDocumentPosition(s.row+t,s.column)),r?(a=n.fromPoints(c,s)).cursor=a.start:(a=n.fromPoints(s,c)).cursor=a.end,a.desiredColumn=o.column,this.selection.inMultiSelectMode?i&&(h=e.cursor):this.selection.addRange(e),this.selection.addRange(a),h&&this.selection.substractPoint(h)},this.transposeSelections=function(t){for(var i=this.session,e=i.multiSelect,n=e.ranges,r=n.length;r--;)(s=n[r]).isEmpty()&&(a=i.getWordRange(s.start.row,s.start.column),s.start.row=a.start.row,s.start.column=a.start.column,s.end.row=a.end.row,s.end.column=a.end.column);e.mergeOverlappingRanges();var o=[];for(r=n.length;r--;){var s=n[r];o.unshift(i.getTextRange(s))}for(t<0?o.unshift(o.pop()):o.push(o.shift()),r=n.length;r--;){var a=(s=n[r]).clone();i.replace(s,o[r]),s.start.row=a.start.row,s.start.column=a.start.column}e.fromOrientedRange(e.ranges[0])},this.selectMore=function(t,i,e){var n,r=this.session,o=r.multiSelect.toOrientedRange();o.isEmpty()&&((o=r.getWordRange(o.start.row,o.start.column)).cursor=-1==t?o.start:o.end,this.multiSelect.addRange(o),e)||(n=r.getTextRange(o),e=r,r=n,n=t,c.$options.wrap=!0,c.$options.needle=r,c.$options.backwards=-1==n,(e=c.find(e))&&(e.cursor=-1==t?e.start:e.end,this.session.unfold(e),this.multiSelect.addRange(e),this.renderer.scrollCursorIntoView(null,.5)),i&&this.multiSelect.substractPoint(o.cursor))},this.alignCursors=function(){var t=this.session,i=t.multiSelect,e=i.ranges,r=-1,o=e.filter((function(t){return t.cursor.row==r||void(r=t.cursor.row)}));if(e.length&&o.length!=e.length-1){o.forEach((function(t){i.substractPoint(t.cursor)}));var s=0,h=1/0,c=e.map((function(i){var e=i.cursor;return i=t.getLine(e.row).substr(e.column).search(/\S/g),e.column>s&&(s=e.column),(i=-1==i?0:i)<h&&(h=i),i}));e.forEach((function(i,e){var r=i.cursor,o=s-r.column;(e=c[e]-h)<o?t.insert(r,a.stringRepeat(" ",o-e)):t.remove(new n(r.row,r.column,r.row,r.column-o+e)),i.start.column=i.end.column=s,i.start.row=i.end.row=r.row,i.cursor=i.end})),i.fromOrientedRange(e[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var l=this.selection.getRange(),u=l.start.row,d=l.end.row;if(o=u==d){for(var f,g=this.session.getLength();f=this.session.getLine(d),/[=:]/.test(f)&&++d<g;);for(;f=this.session.getLine(u),/[=:]/.test(f)&&0<--u;);u<0&&(u=0),g<=d&&(d=g-1)}e=this.session.removeFullLines(u,d),e=this.$reAlignText(e,o),this.session.insert({row:u,column:0},e.join("\n")+"\n"),o||(l.start.column=0,l.end.column=e[e.length-1].length),this.selection.setRange(l)}},this.$reAlignText=function(t,i){var e,n,r,o=!0,s=!0;return t.map((function(t){var i=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return i?(null==e?(e=i[1].length,n=i[2].length,r=i[3].length):(e+n+r!=i[1].length+i[2].length+i[3].length&&(s=!1),e!=i[1].length&&(o=!1),e>i[1].length&&(e=i[1].length),n<i[2].length&&(n=i[2].length),r>i[3].length&&(r=i[3].length)),i):[t]})).map(i?c:o?s?function(t){return t[2]?h(e+n-t[2].length)+t[2]+h(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}:c:function(t){return t[2]?h(e)+t[2]+h(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]});function h(t){return a.stringRepeat(" ",t)}function c(t){return t[2]?h(e)+t[2]+h(n-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}.call(l.prototype),i.onSessionChange=function(t){var i=t.session;i&&!i.multiSelect&&(i.$selectionMarkers=[],i.selection.$initRangeList(),i.multiSelect=i.selection),this.multiSelect=i&&i.multiSelect,(t=t.oldSession)&&(t.multiSelect.off("addRange",this.$onAddRange),t.multiSelect.off("removeRange",this.$onRemoveRange),t.multiSelect.off("multiSelect",this.$onMultiSelect),t.multiSelect.off("singleSelect",this.$onSingleSelect),t.multiSelect.lead.off("change",this.$checkMultiselectChange),t.multiSelect.anchor.off("change",this.$checkMultiselectChange)),i&&(i.multiSelect.on("addRange",this.$onAddRange),i.multiSelect.on("removeRange",this.$onRemoveRange),i.multiSelect.on("multiSelect",this.$onMultiSelect),i.multiSelect.on("singleSelect",this.$onSingleSelect),i.multiSelect.lead.on("change",this.$checkMultiselectChange),i.multiSelect.anchor.on("change",this.$checkMultiselectChange)),i&&this.inMultiSelectMode!=i.selection.inMultiSelectMode&&(i.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},i.MultiSelect=u,t("./config").defineOptions(l.prototype,"editor",{enableMultiselect:{set:function(t){u(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(t,i){var e=t("../../range").Range;i=i.FoldMode=function(){},function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,i,e){return e=t.getLine(e),this.foldingStartMarker.test(e)?"start":"markbeginend"==i&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(t,i,n){var r=/\S/,o=t.getLine(i),s=o.search(r);if(-1!=s){for(var a=n||o.length,h=t.getLength(),c=(n=i,i);++i<h;){var l=t.getLine(i).search(r);if(-1!=l){if(l<=s&&(!(l=t.getTokenAt(i,0))||"string"!==l.type))break;c=i}}if(n<c)return o=t.getLine(c).length,new e(n,a,c,o)}},this.openingBracketBlock=function(t,i,n,r,o){if(i=t.$findClosingBracket(i,r={row:n,column:r+1},o))return"start"==(o=null==(o=t.foldWidgets[i.row])?t.getFoldWidget(i.row):o)&&i.row>r.row&&(i.row--,i.column=t.getLine(i.row).length),e.fromPoints(r,i)},this.closingBracketBlock=function(t,i,n,r){if(i=t.$findOpeningBracket(i,r={row:n,column:r}))return i.column++,r.column--,e.fromPoints(i,r)}}.call(i.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(t,i){i.isDark=!1,i.cssClass="ace-tm",i.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',i.$id="ace/theme/textmate",t("../lib/dom").importCssString(i.cssText,i.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(t,i){var e=t("./lib/dom");function n(t){this.session=t,(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)}(function(){this.getRowLength=function(t){var i=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0;return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+i:1+i},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach((function(i){i&&i.rowCount&&!i.hidden&&(t+=i.rowCount)})),t},this.$onChangeEditor=function(t){this.attach(t.editor)},this.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),(this.editor=t)&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),(t=this.session.lineWidgets)&&t.forEach((function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})))},this.updateOnFold=function(t,i){var e=i.lineWidgets;if(e&&t.action){for(var n=t.data,r=n.end.row,o="add"==t.action,s=(i=n.start.row)+1;s<r;s++)e[s]&&(e[s].hidden=o);e[r]&&(o?e[i]?e[r].hidden=o:e[i]=e[r]:(e[i]==e[r]&&(e[i]=void 0),e[r].hidden=o))}},this.updateOnChange=function(t){var i,e,n,r=this.session.lineWidgets;r&&(0==(n=t.end.row-(i=t.start.row))||("remove"==t.action?(e=r.splice(i+1,n),!r[i]&&e[e.length-1]&&(r[i]=e.pop()),e.forEach((function(t){t&&this.removeLineWidget(t)}),this)):(n=new Array(n),r[i]&&null!=r[i].column&&t.start.column>r[i].column&&i++,n.unshift(i,0),r.splice.apply(r,n)),this.$updateRows()))},this.$updateRows=function(){var t,i=this.session.lineWidgets;i&&(t=!0,i.forEach((function(i,e){if(i)for(t=!1,i.row=e;i.$oldWidget;)i.$oldWidget.row=e,i=i.$oldWidget})),t&&(this.session.lineWidgets=null))},this.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var i=this.session.lineWidgets[t.row];return i&&(t.$oldWidget=i).el&&i.el.parentNode&&(i.el.parentNode.removeChild(i.el),i._inDocument=!1),this.session.lineWidgets[t.row]=t},this.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var i=this.editor.renderer;t.html&&!t.el&&(t.el=e.createElement("div"),t.el.innerHTML=t.html),t.el&&(e.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,i.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex=3),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/i.layerConfig.lineHeight);var n,r=this.session.getFoldAt(t.row,0);return(t.$fold=r)&&(n=this.session.lineWidgets,t.row!=r.end.row||n[r.start.row]?t.hidden=!0:n[r.start.row]=t),this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,i),this.onWidgetChanged(t),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(t){}if(this.session.lineWidgets){var i=this.session.lineWidgets[t.row];if(i==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else for(;i;){if(i.$oldWidget==t){i.$oldWidget=t.$oldWidget;break}i=i.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(t){for(var i=this.session.lineWidgets,e=i&&i[t],n=[];e;)n.push(e),e=e.$oldWidget;return n},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,i){var e=this.session._changedWidgets,n=i.layerConfig;if(e&&e.length){for(var r=1/0,o=0;o<e.length;o++){var s=e[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,i.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<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(t,i){var e=i.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,e.firstRow),o=Math.max(this.lastRow,e.lastRow,n.length);0<r&&!n[r];)r--;this.firstRow=e.firstRow,this.lastRow=e.lastRow,i.$cursorLayer.config=e;for(var s=r;s<=o;s++){var a,h=n[s];h&&h.el&&(h.hidden?h.el.style.top=-100-(h.pixelHeight||0)+"px":(h._inDocument||(h._inDocument=!0,i.container.appendChild(h.el)),a=i.$cursorLayer.getPixelPosition({row:s,column:0},!0).top,h.coverLine||(a+=e.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=a-e.offset+"px",a=h.coverGutter?0:i.gutterWidth,h.fixedWidth||(a-=i.scrollLeft),h.el.style.left=a+"px",h.fullWidth&&h.screenWidth&&(h.el.style.minWidth=e.width+2*e.padding+"px"),h.el.style.right=h.fixedWidth?i.scrollBar.getWidth()+"px":""))}}}}).call(n.prototype),i.LineWidgets=n})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(t,i){var e=t("../line_widgets").LineWidgets,n=t("../lib/dom"),r=t("../range").Range;function o(t,i,e){var n=t.getAnnotations().sort(r.comparePoints);if(n.length){var o=function(t,i,e){for(var n=0,r=t.length-1;n<=r;){var o=n+r>>1,s=e(i,t[o]);if(0<s)n=1+o;else{if(!(s<0))return o;r=o-1}}return-(n+1)}(n,{row:i,column:-1},r.comparePoints);(o=o<0?-o-1:o)>=n.length?o=0<e?0:n.length-1:0===o&&e<0&&(o=n.length-1);var s=n[o];if(s&&e){if(s.row===i){for(;(s=n[o+=e])&&s.row===i;);if(!s)return n.slice()}var a=[];for(i=s.row;a[e<0?"unshift":"push"](s),(s=n[o+=e])&&s.row==i;);return a.length&&a}}}i.showErrorMarker=function(t,i){var r=t.session;r.widgetManager||(r.widgetManager=new e(r),r.widgetManager.attach(t));var s,a=t.getCursorPosition(),h=a.row;if((c=r.widgetManager.getWidgetsAtRow(h).filter((function(t){return"errorMarker"==t.type}))[0])?c.destroy():h-=i,i=o(r,h,i))a.column=((u=i[0]).pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,s=t.renderer.$gutterLayer.$annotations[a.row];else{if(c)return;s={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(a.row),t.selection.moveToPosition(a);var c,l={row:a.row,fixedWidth:!0,coverGutter:!0,el:n.createElement("div"),type:"errorMarker"},u=l.el.appendChild(n.createElement("div"));function d(t,i,e){if(0===i&&("esc"===e||"return"===e))return l.destroy(),{command:"null"}}(c=l.el.appendChild(n.createElement("div"))).className="error_widget_arrow "+s.className,a=t.renderer.$cursorLayer.getPixelPosition(a).left,c.style.left=a+t.renderer.gutterWidth-5+"px",l.el.className="error_widget_wrapper",u.className="error_widget "+s.className,u.innerHTML=s.text.join("<br>"),u.appendChild(n.createElement("div")),l.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(d),r.widgetManager.removeLineWidget(l),t.off("changeSelection",l.destroy),t.off("changeSession",l.destroy),t.off("mouseup",l.destroy),t.off("change",l.destroy))},t.keyBinding.addKeyboardHandler(d),t.on("changeSelection",l.destroy),t.on("changeSession",l.destroy),t.on("mouseup",l.destroy),t.on("change",l.destroy),t.session.widgetManager.addLineWidget(l),l.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},n.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; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(t,i){t("./lib/fixoldbrowsers");var n=t("./lib/dom"),r=t("./lib/event"),o=t("./range").Range,s=t("./editor").Editor,a=t("./edit_session").EditSession,h=t("./undomanager").UndoManager,c=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),i.config=t("./config"),i.require=t,i.define=e.amdD,i.edit=function(t,e){if("string"==typeof t){var o=t;if(!(t=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(t&&t.env&&t.env.editor instanceof s)return t.env.editor;var a;o="",t&&/input|textarea/i.test(t.tagName)?(o=(a=t).value,t=n.createElement("pre"),a.parentNode.replaceChild(t,a)):t&&(o=t.textContent,t.innerHTML="");var h={document:o=i.createEditSession(o),editor:e=new s(new c(t),o,e),onResize:e.resize.bind(e,null)};return a&&(h.textarea=a),r.addListener(window,"resize",h.onResize),e.on("destroy",(function(){r.removeListener(window,"resize",h.onResize),h.editor.container.env=null})),e.container.env=e.env=h,e},i.createEditSession=function(t,i){return(i=new a(t,i)).setUndoManager(new h),i},i.Range=o,i.Editor=s,i.EditSession=a,i.UndoManager=h,i.VirtualRenderer=c,i.version=i.config.version})),ace.require(["ace/ace"],(function(i){for(var e in i&&(i.config.init(!0),i.define=ace.define),window.ace||(window.ace=i),i)i.hasOwnProperty(e)&&(window.ace[e]=i[e]);window.ace.default=window.ace,t&&(t.exports=window.ace)}))},3330:function(t,i,e){t=e.nmd(t),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],(function(t,i){var e=t("../lib/dom"),n=t("../lib/lang"),r=t("../lib/event"),o='.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;}',s=t("../keyboard/hash_handler").HashHandler,a=t("../lib/keys");function h(t){var i=e.createElement("div");e.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",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"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",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:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],i),this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(t),e.importCssString(o,"ace_searchbox",t.container)}e.importCssString(o,"ace_searchbox"),function(){this.setEditor=function(t){t.searchBox=this,t.renderer.scroller.appendChild(this.element),this.editor=t},this.setSession=function(){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOption=t.querySelector("[action=searchInSelection]"),this.replaceOption=t.querySelector("[action=toggleReplace]"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=t.querySelector(".ace_search_counter")},this.$init=function(){var t=this.element;this.$initElements(t);var i=this;r.addListener(t,"mousedown",(function(t){setTimeout((function(){i.activeInput.focus()}),0),r.stopPropagation(t)})),r.addListener(t,"click",(function(t){var e=(t.target||t.srcElement).getAttribute("action");e&&i[e]?i[e]():i.$searchBarKb.commands[e]&&i.$searchBarKb.commands[e].exec(i),r.stopPropagation(t)})),r.addCommandKeyListener(t,(function(t,e,n){n=a.keyCodeToString(n),(n=i.$searchBarKb.findKeyCommand(e,n))&&n.exec&&(n.exec(i),r.stopEvent(t))})),this.$onChange=n.delayedCall((function(){i.find(!1,!1)})),r.addListener(this.searchInput,"input",(function(){i.$onChange.schedule(20)})),r.addListener(this.searchInput,"focus",(function(){i.activeInput=i.searchInput,i.searchInput.value&&i.highlight()})),r.addListener(this.replaceInput,"focus",(function(){i.activeInput=i.replaceInput,i.searchInput.value&&i.highlight()}))},this.$closeSearchBarKb=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]),this.$searchBarKb=new s,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(t){var i=t.isReplace=!t.isReplace;t.replaceBox.style.display=i?"":"none",t.replaceOption.checked=!1,t.$syncOptions(),t.searchInput.focus()},"Ctrl-H|Command-Option-F":function(t){t.editor.getReadOnly()||(t.replaceOption.checked=!0,t.$syncOptions(),t.replaceInput.focus())},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout((function(){t.hide()}))},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},"Alt-Return":function(t){t.activeInput==t.replaceInput&&t.replaceAll(),t.findAll()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}},{name:"toggleReplace",exec:function(t){t.replaceOption.checked=!t.replaceOption.checked,t.$syncOptions()}},{name:"searchInSelection",exec:function(t){t.searchOption.checked=!t.searchRange,t.setSearchRange(t.searchOption.checked&&t.editor.getSelectionRange()),t.$syncOptions()}}]),this.setSearchRange=function(t){(this.searchRange=t)?this.searchRangeMarker=this.editor.session.addMarker(t,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(t){e.setCssClass(this.replaceOption,"checked",this.searchRange),e.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",e.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),e.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),e.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var i=this.editor.getReadOnly();this.replaceOption.style.display=i?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!i?"":"none",this.find(!1,!1,t)},this.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(t,i,n){n=!this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:i,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value,e.setCssClass(this.searchBox,"ace_nomatch",n),this.editor._emit("findSearchBox",{match:!n}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var t=this.editor,i=t.$search.$options.re,e=0,n=0;if(i){var r,o,s=this.searchRange?t.session.getTextRange(this.searchRange):t.getValue(),a=t.session.doc.positionToIndex(t.selection.anchor);for(this.searchRange&&(a-=t.session.doc.positionToIndex(this.searchRange.start)),i.lastIndex=0;(o=i.exec(s))&&((r=o.index)<=a&&n++,!(999<++e))&&(o[0]||(i.lastIndex=r+=1,!(r>=s.length))););}this.searchCounter.textContent=n+" of "+(999<e?"999+":e)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var t=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;e.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.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()},this.show=function(t,i){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=i,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var t=document.activeElement;return t==this.searchInput||t==this.replaceInput}}.call(h.prototype),i.SearchBox=h,i.Search=function(t,i){(t.searchBox||new h(t)).show(t.session.getTextRange(),i)}})),ace.require(["ace/ext/searchbox"],(function(i){t&&(t.exports=i)}))},4091:function(t,i,e){t=e.nmd(t),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(t,i){var e=t("../lib/oop"),n=t("./text_highlight_rules").TextHighlightRules;e.inherits(t=function(){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:"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"}]}},n),i.JsonHighlightRules=t})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(t,i){var e=t("../range").Range;(function(){this.checkOutdent=function(t,i){return!!/^\s+$/.test(t)&&/^\s*\}/.test(i)},this.autoOutdent=function(t,i){if(!(n=t.getLine(i).match(/^(\s*\})/)))return 0;var n,r=n[1].length;if(!(n=t.findMatchingBracket({row:i,column:r}))||n.row==i)return 0;n=this.$getIndent(t.getLine(n.row)),t.replace(new e(i,0,i,r-1),n)},this.$getIndent=function(t){return t.match(/^\s*/)[0]}}).call((t=function(){}).prototype),i.MatchingBraceOutdent=t})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(t,i){var e=t("../../lib/oop"),n=t("../../range").Range;t=t("./fold_mode").FoldMode,i=i.FoldMode=function(t){t&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+t.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+t.end)))},e.inherits(i,t),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(t,i,e){var n=t.getLine(e);return!this.singleLineBlockCommentRe.test(n)||this.startRegionRe.test(n)||this.tripleStarBlockCommentRe.test(n)?!(e=this._getFoldWidgetBase(t,i,e))&&this.startRegionRe.test(n)?"start":e:""},this.getFoldWidgetRange=function(t,i,e,n){var r=t.getLine(e);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(t,r,e);var o=r.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(t,o[1],e,s);var a=t.getCommentFoldRange(e,s+o[0].length,1);return a&&!a.isMultiLine()&&(n?a=this.getSectionRange(t,e):"all"!=i&&(a=null)),a}return"markbegin"!==i&&(o=r.match(this.foldingStopMarker))?(s=o.index+o[0].length,o[1]?this.closingBracketBlock(t,o[1],e,s):t.getCommentFoldRange(e,s,-1)):void 0},this.getSectionRange=function(t,i){for(var e=(h=t.getLine(i)).search(/\S/),r=i,o=h.length,s=i+=1,a=t.getLength();++i<a;){var h,c=(h=t.getLine(i)).search(/\S/);if(-1!==c){if(c<e)break;var l=this.getFoldWidgetRange(t,"all",i);if(l){if(l.start.row<=r)break;if(l.isMultiLine())i=l.end.row;else if(e==c)break}s=i}}return new n(r,o,s,t.getLine(s).length)},this.getCommentRegionBlock=function(t,i,e){for(var r=i.search(/\s*$/),o=t.getLength(),s=e,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++e<o;){i=t.getLine(e);var c=a.exec(i);if(c&&(c[1]?h--:h++,!h))break}if(s<e)return new n(s,r,e,i.length)}}.call(i.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/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(t,i){var e=t("../lib/oop"),n=t("./text").Mode,r=t("./json_highlight_rules").JsonHighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,s=t("./behaviour/cstyle").CstyleBehaviour,a=t("./folding/cstyle").FoldMode,h=t("../worker/worker_client").WorkerClient;e.inherits(t=function(){this.HighlightRules=r,this.$outdent=new o,this.$behaviour=new s,this.foldingRules=new a},n),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(t,i,e){var n=this.$getIndent(i);return"start"==t&&i.match(/^.*[\{\(\[]\s*$/)&&(n+=e),n},this.checkOutdent=function(t,i,e){return this.$outdent.checkOutdent(i,e)},this.autoOutdent=function(t,i,e){this.$outdent.autoOutdent(i,e)},this.createWorker=function(t){var i=new h(["ace"],"ace/mode/json_worker","JsonWorker");return i.attachToDocument(t.getDocument()),i.on("annotate",(function(i){t.setAnnotations(i.data)})),i.on("terminate",(function(){t.clearAnnotations()})),i},this.$id="ace/mode/json"}.call(t.prototype),i.Mode=t})),ace.require(["ace/mode/json"],(function(i){t&&(t.exports=i)}))},8903:function(t,i,e){var n=e(5689),r=e(3969),o=e(5255),s=e(4293),a=e(3508),h=e(3368),c=e(742),l=e(9394),u=e(3724);(t.exports=p).prototype.validate=function(t,i){var e;if("string"==typeof t){if(!(e=this.getSchema(t)))throw new Error('no schema with key or ref "'+t+'"')}else e=(t=this._addSchema(t)).validate||this._compile(t);return i=e(i),!0!==e.$async&&(this.errors=e.errors),i},p.prototype.compile=function(t,i){return(i=this._addSchema(t,void 0,i)).validate||this._compile(i)},p.prototype.addSchema=function(t,i,e,n){if(Array.isArray(t)){for(var o=0;o<t.length;o++)this.addSchema(t[o],void 0,e,n);return this}var s=this._getId(t);if(void 0!==s&&"string"!=typeof s)throw new Error("schema id must be string");return v(this,i=r.normalizeId(i||s)),this._schemas[i]=this._addSchema(t,e,n,!0),this},p.prototype.addMetaSchema=function(t,i,e){return this.addSchema(t,i,e,!0),this},p.prototype.validateSchema=function(t,i){var e=t.$schema;if(void 0!==e&&"string"!=typeof e)throw new Error("$schema must be a string");if(!(e=e||this._opts.defaultMeta||function(t){var i=t._opts.meta;return t._opts.defaultMeta="object"==typeof i?t._getId(i)||i:t.getSchema(d)?d:void 0,t._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(!(t=this.validate(e,t))&&i){if(i="schema is invalid: "+this.errorsText(),"log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return t},p.prototype.getSchema=function(t){var i=m(this,t);switch(typeof i){case"object":return i.validate||this._compile(i);case"string":return this.getSchema(i);case"undefined":return function(t,i){if(h=r.schema.call(t,{schema:{}},i)){var e=h.schema,o=h.root,a=h.baseId,h=n.call(t,e,o,void 0,a);return t._fragments[i]=new s({ref:i,fragment:!0,schema:e,root:o,baseId:a,validate:h}),h}}(this,t)}},p.prototype.removeSchema=function(t){if(t instanceof RegExp)return I(this,this._schemas,t),I(this,this._refs,t),this;switch(typeof t){case"undefined":return I(this,this._schemas),I(this,this._refs),this._cache.clear(),this;case"string":var i=m(this,t);return i&&this._cache.del(i.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":i=(i=this._opts.serialize)?i(t):t,this._cache.del(i),(i=this._getId(t))&&(i=r.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},p.prototype.addFormat=function(t,i){return"string"==typeof i&&(i=new RegExp(i)),this._formats[t]=i,this},p.prototype.errorsText=function(t,i){if(!(t=t||this.errors))return"No errors";for(var e=void 0===(i=i||{}).separator?", ":i.separator,n=void 0===i.dataVar?"data":i.dataVar,r="",o=0;o<t.length;o++){var s=t[o];s&&(r+=n+s.dataPath+" "+s.message+e)}return r.slice(0,-e.length)},p.prototype._addSchema=function(t,i,e,n){if("object"!=typeof t&&"boolean"!=typeof t)throw new Error("schema should be object or boolean");var o,a,h=this._opts.serialize,c=h?h(t):t;return(a=this._cache.get(c))?a:(n=n||!1!==this._opts.addUsedSchema,(h=r.normalizeId(this._getId(t)))&&n&&v(this,h),(a=!1!==this._opts.validateSchema&&!i)&&!(o=h&&h==r.normalizeId(t.$schema))&&this.validateSchema(t,!0),i=r.ids.call(this,t),e=new s({id:h,schema:t,localRefs:i,cacheKey:c,meta:e}),"#"!=h[0]&&n&&(this._refs[h]=e),this._cache.put(c,e),a&&o&&this.validateSchema(t,!0),e)},p.prototype._compile=function(t,i){if(t.compiling)return(t.validate=o).schema=t.schema,o.errors=null,o.root=i||o,!0===t.schema.$async&&(o.$async=!0),o;var e,r;t.compiling=!0,t.meta&&(e=this._opts,this._opts=this._metaOpts);try{r=n.call(this,t.schema,i,t.localRefs)}catch(i){throw delete t.validate,i}finally{t.compiling=!1,t.meta&&(this._opts=e)}return t.validate=r,t.refs=r.refs,t.refVal=r.refVal,t.root=r.root,r;function o(){var i=t.validate,e=i.apply(this,arguments);return o.errors=i.errors,e}},p.prototype.compileAsync=e(9677),t=e(7931),p.prototype.addKeyword=t.add,p.prototype.getKeyword=t.get,p.prototype.removeKeyword=t.remove,p.prototype.validateKeyword=t.validate,t=e(5359),p.ValidationError=t.Validation,p.MissingRefError=t.MissingRef,p.$dataMetaSchema=l;var d="http://json-schema.org/draft-07/schema",f=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],g=["/properties"];function p(t){if(!(this instanceof p))return new p(t);t=this._opts=u.copy(t)||{},function(t){var i=t._opts.logger;if(!1===i)t.logger={log:y,warn:y,error:y};else{if(!("object"==typeof(i=void 0===i?console:i)&&i.log&&i.warn&&i.error))throw new Error("logger must implement log, warn and error methods");t.logger=i}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=h(t.format),this._cache=t.cache||new o,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(t){switch(t.schemaId){case"auto":return A;case"id":return b;default:return C}}(t),t.loopRequired=t.loopRequired||1/0,"property"==t.errorDataPath&&(t._errorDataPathProperty=!0),void 0===t.serialize&&(t.serialize=a),this._metaOpts=function(t){for(var i=u.copy(t._opts),e=0;e<f.length;e++)delete i[f[e]];return i}(this),t.formats&&function(t){for(var i in t._opts.formats)t.addFormat(i,t._opts.formats[i])}(this),t.keywords&&function(t){for(var i in t._opts.keywords)t.addKeyword(i,t._opts.keywords[i])}(this),function(t){var i;t._opts.$data&&(i=e(6835),t.addMetaSchema(i,i.$id,!0)),!1!==t._opts.meta&&(i=e(38),t._opts.$data&&(i=l(i,g)),t.addMetaSchema(i,d,!0),t._refs["http://json-schema.org/schema"]=d)}(this),"object"==typeof t.meta&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(t){var i=t._opts.schemas;if(i)if(Array.isArray(i))t.addSchema(i);else for(var e in i)t.addSchema(i[e],e)}(this)}function m(t,i){return i=r.normalizeId(i),t._schemas[i]||t._refs[i]||t._fragments[i]}function I(t,i,e){for(var n in i){var r=i[n];r.meta||e&&!e.test(n)||(t._cache.del(r.cacheKey),delete i[n])}}function b(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function C(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function A(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 v(t,i){if(t._schemas[i]||t._refs[i])throw new Error('schema with key or id "'+i+'" already exists')}function y(){}},5255:function(t){(t=t.exports=function(){this._cache={}}).prototype.put=function(t,i){this._cache[t]=i},t.prototype.get=function(t){return this._cache[t]},t.prototype.del=function(t){delete this._cache[t]},t.prototype.clear=function(){this._cache={}}},9677:function(t,i,e){var n=e(5359).MissingRef;t.exports=function t(i,e,r){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof e&&(r=e,e=void 0);var s=a(i).then((function(){var t=o._addSchema(i,void 0,e);return t.validate||function t(i){try{return o._compile(i)}catch(r){if(r instanceof n)return function(n){var r=n.missingSchema;if(h(r))throw new Error("Schema "+r+" is loaded but "+n.missingRef+" cannot be resolved");return(n=o._loadingSchemas[r])||(n=o._loadingSchemas[r]=o._opts.loadSchema(r)).then(s,s),n.then((function(t){if(!h(r))return a(t).then((function(){h(r)||o.addSchema(t,r,void 0,e)}))})).then((function(){return t(i)}));function s(){delete o._loadingSchemas[r]}function h(t){return o._refs[t]||o._schemas[t]}}(r);throw r}}(t)}));return r&&s.then((function(t){r(null,t)}),r),s;function a(i){return(i=i.$schema)&&!o.getSchema(i)?t.call(o,{$ref:i},!0):Promise.resolve()}}},5359:function(t,i,e){var n=e(3969);function r(t,i,e){this.message=e||r.message(t,i),this.missingRef=n.url(t,i),this.missingSchema=n.normalizeId(n.fullPath(this.missingRef))}function o(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t}t.exports={Validation:o((function(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0})),MissingRef:o(r)},r.message=function(t,i){return"can't resolve reference "+i+" from id "+t}},3368:function(t,i,e){var n=e(3724),r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{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,h=/^(?:[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,c=/^(?:(?:[^\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,l=/^(?:(?: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,u=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function g(t){return n.copy(g[t="full"==t?"full":"fast"])}function p(t){if(!(e=t.match(r)))return!1;var i=+e[1],e=(t=+e[2],+e[3]);return 1<=t&&t<=12&&1<=e&&e<=(2!=t||(i=i)%4!=0||i%100==0&&i%400!=0?o[t]:29)}function m(t,i){if(!(r=t.match(s)))return!1;var e=r[1],n=r[2],r=(t=r[3],r[5]);return(e<=23&&n<=59&&t<=59||23==e&&59==n&&60==t)&&(!i||r)}e=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,(t.exports=g).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":c,url:l,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:a,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:A,uuid:u,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":e},g.full={date:p,time:m,"date-time":function(t){return 2==(t=t.split(I)).length&&p(t[0])&&m(t[1],!0)},uri:function(t){return b.test(t)&&h.test(t)},"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":c,url:l,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:a,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:A,uuid:u,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":e};var I=/t|\s/i,b=/\/|:/,C=/[^\\]\\Z/;function A(t){if(C.test(t))return!1;try{return!0}catch(t){return!1}}},5689:function(t,i,e){var n=e(3969),r=e(3724),o=e(5359),s=e(3508),a=e(1869),h=r.ucs2length,c=e(2303),l=o.Validation;function u(t,i,e){for(var n=0;n<this._compilations.length;n++){var r=this._compilations[n];if(r.schema==t&&r.root==i&&r.baseId==e)return n}return-1}function d(t,i){return"var pattern"+t+" = new RegExp("+r.toQuotedString(i[t])+");"}function f(t){return"var default"+t+" = defaults["+t+"];"}function g(t,i){return void 0===i[t]?"":"var refVal"+t+" = refVal["+t+"];"}function p(t){return"var customRule"+t+" = customRules["+t+"];"}function m(t,i){if(!t.length)return"";for(var e="",n=0;n<t.length;n++)e+=i(n,t);return e}t.exports=function t(i,e,I,b){var C=this,A=this._opts,v=[void 0],y={},w=[],x={},k=[],j={},S=[],Z=function(t,i,e){var n=u.call(this,t,i,e);return 0<=n?{index:n,compiling:!0}:(this._compilations[n=this._compilations.length]={schema:t,root:i,baseId:e},{index:n,compiling:!1})}.call(this,i,e=e||{schema:i,refVal:v,refs:y},b),G=this._compilations[Z.index];if(Z.compiling)return G.callValidate=function t(){var i=G.validate,e=i.apply(this,arguments);return t.errors=i.errors,e};var B=this._formats,V=this.RULES;try{var W=T(i,e,I,b);G.validate=W;var K=G.callValidate;return K&&(K.schema=W.schema,K.errors=null,K.refs=W.refs,K.refVal=W.refVal,K.root=W.root,K.$async=W.$async,A.sourceCode&&(K.source=W.source)),W}finally{(function(t,i,e){0<=(e=u.call(this,t,i,e))&&this._compilations.splice(e,1)}).call(this,i,e,b)}function T(i,s,u,I){var b=!s||s&&s.schema==i;if(s.schema!=e.schema)return t.call(C,i,s,u,I);u=!0===i.$async,I=a({isTop:!0,schema:i,isRoot:b,baseId:I,root:s,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:V,validate:a,util:r,resolve:n,resolveRef:F,usePattern:E,useDefault:_,useCustomRule:N,opts:A,formats:B,logger:C.logger,self:C}),I=m(v,g)+m(w,d)+m(k,f)+m(S,p)+I,A.processCode&&(I=A.processCode(I,i));try{var x=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",I)(C,V,B,e,v,k,S,c,h,l);v[0]=x}catch(i){throw C.logger.error("Error compiling schema, function code:",I),i}return x.schema=i,x.errors=null,x.refs=y,x.refVal=v,x.root=b?x:s,u&&(x.$async=!0),!0===A.sourceCode&&(x.source={code:I,patterns:w,defaults:k}),x}function F(i,r,o){r=n.url(i,r);var s=y[r];if(void 0!==s)return H(a=v[s],c="refVal["+s+"]");if(!o&&e.refs&&void 0!==(h=e.refs[r]))return H(a=e.refVal[h],c=R(r,a));var a,h,c=R(r);if(void 0!==(h=n.call(C,T,e,r))||(a=I&&I[r])&&(h=n.inlineRef(a,A.inlineRefs)?a:t.call(C,a,e,I,i)),void 0!==h)return function(t,i){v[t=y[t]]=i}(r,h),H(h,c);delete y[r]}function R(t,i){var e=v.length;return v[e]=i,"refVal"+(y[t]=e)}function H(t,i){return"object"==typeof t||"boolean"==typeof t?{code:i,schema:t,inline:!0}:{code:i,$async:t&&!!t.$async}}function E(t){var i=x[t];return void 0===i&&(i=x[t]=w.length,w[i]=t),"pattern"+i}function _(t){switch(typeof t){case"boolean":case"number":return""+t;case"string":return r.toQuotedString(t);case"object":if(null===t)return"null";var i=s(t),e=j[i];return void 0===e&&(e=j[i]=k.length,k[e]=t),"default"+e}}function N(t,i,e,n){if(!1!==C._opts.validateSchema){if((s=t.definition.dependencies)&&!s.every((function(t){return Object.prototype.hasOwnProperty.call(e,t)})))throw new Error("parent schema must have all required keywords: "+s.join(","));if((a=t.definition.validateSchema)&&!a(i)){var r="keyword schema is invalid: "+C.errorsText(a.errors);if("log"!=C._opts.validateSchema)throw new Error(r);C.logger.error(r)}}var o,s,a=t.definition.inline;if(r=t.definition.macro,s=t.definition.compile)o=s.call(C,i,e,n);else if(r)o=r.call(C,i,e,n),!1!==A.validateSchema&&C.validateSchema(o,!0);else if(a)o=a.call(C,n,t.keyword,i,e);else if(!(o=t.definition.validate))return;if(void 0===o)throw new Error('custom keyword "'+t.keyword+'"failed to compile');return{code:"customRule"+(t=S.length),validate:S[t]=o}}}},3969:function(t,i,e){var n=e(7533),r=e(2303),o=e(3724),s=e(4293),a=e(500);function h(t,i,e){var n,r,o,a=this._refs[e];if("string"==typeof a){if(!this._refs[a])return h.call(this,t,i,a);a=this._refs[a]}return(a=a||this._schemas[e])instanceof s?f(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a):((e=c.call(this,i,e))&&(n=e.schema,i=e.root,o=e.baseId),n instanceof s?r=n.validate||t.call(this,n.schema,i,void 0,o):void 0!==n&&(r=f(n,this._opts.inlineRefs)?n:t.call(this,n,i,void 0,o)),r)}function c(t,i){var e=n.parse(i),r=p(e),o=g(this._getId(t.schema));if(0===Object.keys(t.schema).length||r!==o){var a=I(r);if("string"==typeof(r=this._refs[a]))return function(t,i,e){var n=c.call(this,t,i);if(n){var r=n.schema;return i=n.baseId,t=n.root,(n=this._getId(r))&&(i=b(i,n)),u.call(this,e,i,r,t)}}.call(this,t,r,e);if(r instanceof s)r.validate||this._compile(r),t=r;else{if(!((r=this._schemas[a])instanceof s))return;if(r.validate||this._compile(r),a==I(i))return{schema:r,root:t,baseId:o};t=r}if(!t.schema)return;o=g(this._getId(t.schema))}return u.call(this,e,o,t.schema,t)}(t.exports=h).normalizeId=I,h.fullPath=g,h.url=b,h.ids=function(t){var i=I(this._getId(t)),e={"":i},s={"":g(i,!1)},h={},c=this;return a(t,{allKeys:!0},(function(t,i,a,l,u,d,f){if(""!==i){var g=c._getId(t),p=e[l];if(u=s[l]+"/"+u,void 0!==f&&(u+="/"+("number"==typeof f?f:o.escapeFragment(f))),"string"==typeof g)if(g=p=I(p?n.resolve(p,g):g),(f="string"==typeof(f=c._refs[g])?c._refs[f]:f)&&f.schema){if(!r(t,f.schema))throw new Error('id "'+g+'" resolves to more than one schema')}else if(g!=I(u))if("#"==g[0]){if(h[g]&&!r(t,h[g]))throw new Error('id "'+g+'" resolves to more than one schema');h[g]=t}else c._refs[g]=u;e[i]=p,s[i]=u}})),h},h.inlineRef=f,h.schema=c;var l=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function u(t,i,e,n){if(t.fragment=t.fragment||"","/"==t.fragment.slice(0,1)){for(var r=t.fragment.split("/"),s=1;s<r.length;s++){var a=r[s];if(a){if(void 0===(e=e[a=o.unescapeFragment(a)]))break;l[a]||((a=this._getId(e))&&(i=b(i,a)),e.$ref&&(a=b(i,e.$ref),(a=c.call(this,n,a))&&(e=a.schema,n=a.root,i=a.baseId)))}}return void 0!==e&&e!==n.schema?{schema:e,root:n,baseId:i}:void 0}}var d=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function f(t,i){return!1!==i&&(void 0===i||!0===i?function t(i){var e;if(Array.isArray(i)){for(var n=0;n<i.length;n++)if("object"==typeof(e=i[n])&&!t(e))return!1}else for(var r in i){if("$ref"==r)return!1;if("object"==typeof(e=i[r])&&!t(e))return!1}return!0}(t):i?function t(i){var e,n=0;if(Array.isArray(i)){for(var r=0;r<i.length;r++)if("object"==typeof(e=i[r])&&(n+=t(e)),n==1/0)return 1/0}else for(var o in i){if("$ref"==o)return 1/0;if(d[o])n++;else if("object"==typeof(e=i[o])&&(n+=t(e)+1),n==1/0)return 1/0}return n}(t)<=i:void 0)}function g(t,i){return!1!==i&&(t=I(t)),p(n.parse(t))}function p(t){return n.serialize(t).split("#")[0]+"#"}var m=/#\/?$/;function I(t){return t?t.replace(m,""):""}function b(t,i){return i=I(i),n.resolve(t,i)}},742:function(t,i,e){var n=e(9646),r=e(3724).toHash;t.exports=function(){var t=[{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"]}],i=["type","$comment"];return t.all=r(i),t.types=r(["number","integer","string","array","object","boolean","null"]),t.forEach((function(e){e.rules=e.rules.map((function(e){var r,o;return"object"==typeof e&&(o=e[r=Object.keys(e)[0]],e=r,o.forEach((function(e){i.push(e),t.all[e]=!0}))),i.push(e),t.all[e]={keyword:e,code:n[e],implements:o}})),t.all.$comment={keyword:"$comment",code:n.$comment},e.type&&(t.types[e.type]=e)})),t.keywords=r(i.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),t.custom={},t}},4293:function(t,i,e){var n=e(3724);t.exports=function(t){n.copy(t,this)}},6887:function(t){t.exports=function(t){for(var i,e=0,n=t.length,r=0;r<n;)e++,55296<=(i=t.charCodeAt(r++))&&i<=56319&&r<n&&56320==(64512&(i=t.charCodeAt(r)))&&r++;return e}},3724:function(t,i,e){function n(t,i,e,n){var r=n?" !== ":" === ",o=n?" || ":" && ",s=n?"!":"",a=n?"":"!";switch(t){case"null":return i+r+"null";case"array":return s+"Array.isArray("+i+")";case"object":return"("+s+i+o+"typeof "+i+r+'"object"'+o+a+"Array.isArray("+i+"))";case"integer":return"(typeof "+i+r+'"number"'+o+a+"("+i+" % 1)"+o+i+r+i+(e?o+s+"isFinite("+i+")":"")+")";case"number":return"(typeof "+i+r+'"'+t+'"'+(e?o+s+"isFinite("+i+")":"")+")";default:return"typeof "+i+r+'"'+t+'"'}}t.exports={copy:function(t,i){for(var e in i=i||{},t)i[e]=t[e];return i},checkDataType:n,checkDataTypes:function(t,i,e){if(1===t.length)return n(t[0],i,e,!0);var r,s="";for(r in(t=o(t)).array&&t.object&&(s=t.null?"(":"(!"+i+" || ",s+="typeof "+i+' !== "object")',delete t.null,delete t.array,delete t.object),t.number&&delete t.integer,t)s+=(s?" && ":"")+n(r,i,e,!0);return s},coerceToTypes:function(t,i){if(!Array.isArray(i))return r[i]?[i]:"array"===t&&"array"===i?["array"]:void 0;for(var e=[],n=0;n<i.length;n++){var o=i[n];(r[o]||"array"===t&&"array"===o)&&(e[e.length]=o)}return e.length?e:void 0},toHash:o,getProperty:h,escapeQuotes:c,equal:e(2303),ucs2length:e(6887),varOccurences:function(t,i){return i+="[^0-9]",(i=t.match(new RegExp(i,"g")))?i.length:0},varReplace:function(t,i,e){return i+="([^0-9])",e=e.replace(/\$/g,"$$$$"),t.replace(new RegExp(i,"g"),e+"$1")},schemaHasRules:function(t,i){if("boolean"==typeof t)return!t;for(var e in t)if(i[e])return!0},schemaHasRulesExcept:function(t,i,e){if("boolean"==typeof t)return!t&&"not"!=e;for(var n in t)if(n!=e&&i[n])return!0},schemaUnknownRules:function(t,i){if("boolean"!=typeof t)for(var e in t)if(!i[e])return e},toQuotedString:l,getPathExpr:function(t,i,e,n){return f(t,e?"'/' + "+i+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+i+" + ']'":"'[\\'' + "+i+" + '\\']'")},getPath:function(t,i,e){return f(t,i=l(e?"/"+g(i):h(i)))},getData:function(t,i,e){var n,r,o;if(""===t)return"rootData";if("/"==t[0]){if(!u.test(t))throw new Error("Invalid JSON-pointer: "+t);n=t,r="rootData"}else{if(!(o=t.match(d)))throw new Error("Invalid JSON-pointer: "+t);if(t=+o[1],"#"==(n=o[2])){if(i<=t)throw new Error("Cannot access property/index "+t+" levels up, current level is "+i);return e[i-t]}if(i<t)throw new Error("Cannot access data "+t+" levels up, current level is "+i);if(r="data"+(i-t||""),!n)return r}for(var s=r,a=n.split("/"),c=0;c<a.length;c++){var l=a[c];l&&(s+=" && "+(r+=h(p(l))))}return s},unescapeFragment:function(t){return p(decodeURIComponent(t))},unescapeJsonPointer:p,escapeFragment:function(t){return encodeURIComponent(g(t))},escapeJsonPointer:g};var r=o(["string","number","integer","boolean","null"]);function o(t){for(var i={},e=0;e<t.length;e++)i[t[e]]=!0;return i}var s=/^[a-z$_][a-z$_0-9]*$/i,a=/'|\\/g;function h(t){return"number"==typeof t?"["+t+"]":s.test(t)?"."+t:"['"+c(t)+"']"}function c(t){return t.replace(a,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function l(t){return"'"+c(t)+"'"}var u=/^\/(?:[^~]|~0|~1)*$/,d=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function f(t,i){return'""'==t?i:(t+" + "+i).replace(/([^\\])' \+ '/g,"$1")}function g(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function p(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}},9394:function(t){var i=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];t.exports=function(t,e){for(var n=0;n<e.length;n++){t=JSON.parse(JSON.stringify(t));for(var r=e[n].split("/"),o=t,s=1;s<r.length;s++)o=o[r[s]];for(s=0;s<i.length;s++){var a=i[s],h=o[a];h&&(o[a]={anyOf:[h,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}},5868:function(t,i,e){e=e(38),t.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:e.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:e.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"}]}}}},1796:function(t){t.exports=function(t,i){var e,n,r,o,s,a,h=" ",c=t.level,l=t.dataLevel,u=t.schema[i],d=t.schemaPath+t.util.getProperty(i),f=t.errSchemaPath+"/"+i,g=!t.opts.allErrors,p="data"+(l||""),m=t.opts.$data&&u&&u.$data,I=m?(h+=" var schema"+c+" = "+t.util.getData(u.$data,l,t.dataPathArr)+"; ","schema"+c):u,b="maximum"==i,C=b?"exclusiveMaximum":"exclusiveMinimum",A=t.schema[C],v=t.opts.$data&&A&&A.$data,y=b?"<":">",w=b?">":"<",x=void 0;if(!m&&"number"!=typeof u&&void 0!==u)throw new Error(i+" must be number");if(!v&&void 0!==A&&"number"!=typeof A&&"boolean"!=typeof A)throw new Error(C+" must be number or boolean");v?(e="exclusive"+c,n="exclType"+c,r="exclIsNumber"+c,o="' + "+(s="op"+c)+" + '",h+=" var schemaExcl"+c+" = "+(l=t.util.getData(A.$data,l,t.dataPathArr))+"; ",x=C,(a=a||[]).push(h+=" var "+e+"; var "+n+" = typeof "+(l="schemaExcl"+c)+"; if ("+n+" != 'boolean' && "+n+" != 'undefined' && "+n+" != 'number') { "),h="",!1!==t.createErrors?(h+=" { keyword: '"+(x||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(f)+" , params: {} ",!1!==t.opts.messages&&(h+=" , message: '"+C+" should be boolean' "),t.opts.verbose&&(h+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+p+" "),h+=" } "):h+=" {} ",k=h,h=a.pop(),h+=!t.compositeRule&&g?t.async?" throw new ValidationError(["+k+"]); ":" validate.errors = ["+k+"]; return false; ":" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h+=" } else if ( ",m&&(h+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),h+=" "+n+" == 'number' ? ( ("+e+" = "+I+" === undefined || "+l+" "+y+"= "+I+") ? "+p+" "+w+"= "+l+" : "+p+" "+w+" "+I+" ) : ( ("+e+" = "+l+" === true) ? "+p+" "+w+"= "+I+" : "+p+" "+w+" "+I+" ) || "+p+" !== "+p+") { var op"+c+" = "+e+" ? '"+y+"' : '"+y+"='; ",void 0===u&&(f=t.errSchemaPath+"/"+(x=C),I=l,m=v)):(o=y,(r="number"==typeof A)&&m?(s="'"+o+"'",h+=" if ( ",m&&(h+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),h+=" ( "+I+" === undefined || "+A+" "+y+"= "+I+" ? "+p+" "+w+"= "+A+" : "+p+" "+w+" "+I+" ) || "+p+" !== "+p+") { "):(r&&void 0===u?(e=!0,f=t.errSchemaPath+"/"+(x=C),I=A,w+="="):(r&&(I=Math[b?"min":"max"](A,u)),A===(!r||I)?(e=!0,f=t.errSchemaPath+"/"+(x=C),w+="="):(e=!1,o+="=")),s="'"+o+"'",h+=" if ( ",m&&(h+=" ("+I+" !== undefined && typeof "+I+" != 'number') || "),h+=" "+p+" "+w+" "+I+" || "+p+" !== "+p+") { ")),x=x||i,(a=a||[]).push(h),h="",!1!==t.createErrors?(h+=" { keyword: '"+(x||"_limit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(f)+" , params: { comparison: "+s+", limit: "+I+", exclusive: "+e+" } ",!1!==t.opts.messages&&(h+=" , message: 'should be "+o+" ",h+=m?"' + "+I:I+"'"),t.opts.verbose&&(h+=" , schema: ",h+=m?"validate.schema"+d:""+u,h+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+p+" "),h+=" } "):h+=" {} ";var k=h;return h=a.pop(),h+=!t.compositeRule&&g?t.async?" throw new ValidationError(["+k+"]); ":" validate.errors = ["+k+"]; return false; ":" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h+=" } ",g&&(h+=" else { "),h}},2407:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l=t.opts.$data&&o&&o.$data;if(r=l?(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; ","schema"+n):o,!l&&"number"!=typeof o)throw new Error(i+" must be number");e+="if ( ",l&&(e+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),n=i;var u=u||[];return u.push(e+=" "+c+".length "+("maxItems"==i?">":"<")+" "+r+") { "),e="",!1!==t.createErrors?(e+=" { keyword: '"+(n||"_limitItems")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { limit: "+r+" } ",!1!==t.opts.messages&&(e+=" , message: 'should NOT have ",e+="maxItems"==i?"more":"fewer",e+=" than ",e+=l?"' + "+r+" + '":""+o,e+=" items' "),t.opts.verbose&&(e+=" , schema: ",e+=l?"validate.schema"+s:""+o,e+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+="} ",h&&(e+=" else { "),e}},1250:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l=t.opts.$data&&o&&o.$data;if(r=l?(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; ","schema"+n):o,!l&&"number"!=typeof o)throw new Error(i+" must be number");e+="if ( ",l&&(e+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),e+=!1===t.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",n=i;var u=u||[];return u.push(e+=" "+("maxLength"==i?">":"<")+" "+r+") { "),e="",!1!==t.createErrors?(e+=" { keyword: '"+(n||"_limitLength")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { limit: "+r+" } ",!1!==t.opts.messages&&(e+=" , message: 'should NOT be ",e+="maxLength"==i?"longer":"shorter",e+=" than ",e+=l?"' + "+r+" + '":""+o,e+=" characters' "),t.opts.verbose&&(e+=" , schema: ",e+=l?"validate.schema"+s:""+o,e+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+="} ",h&&(e+=" else { "),e}},2596:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l=t.opts.$data&&o&&o.$data;if(r=l?(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; ","schema"+n):o,!l&&"number"!=typeof o)throw new Error(i+" must be number");e+="if ( ",l&&(e+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),n=i;var u=u||[];return u.push(e+=" Object.keys("+c+").length "+("maxProperties"==i?">":"<")+" "+r+") { "),e="",!1!==t.createErrors?(e+=" { keyword: '"+(n||"_limitProperties")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { limit: "+r+" } ",!1!==t.opts.messages&&(e+=" , message: 'should NOT have ",e+="maxProperties"==i?"more":"fewer",e+=" than ",e+=l?"' + "+r+" + '":""+o,e+=" properties' "),t.opts.verbose&&(e+=" , schema: ",e+=l?"validate.schema"+s:""+o,e+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+="} ",h&&(e+=" else { "),e}},9486:function(t){t.exports=function(t,i){var e=" ",n=t.schema[i],r=t.schemaPath+t.util.getProperty(i),o=t.errSchemaPath+"/"+i,s=!t.opts.allErrors,a=t.util.copy(t),h="";a.level++;var c="valid"+a.level,l=a.baseId,u=!0,d=n;if(d)for(var f,g=-1,p=d.length-1;g<p;)f=d[g+=1],(t.opts.strictKeywords?"object"==typeof f&&0<Object.keys(f).length||!1===f:t.util.schemaHasRules(f,t.RULES.all))&&(u=!1,a.schema=f,a.schemaPath=r+"["+g+"]",a.errSchemaPath=o+"/"+g,e+=" "+t.validate(a)+" ",a.baseId=l,s&&(e+=" if ("+c+") { ",h+="}"));return s&&(e+=u?" if (true) { ":" "+h.slice(0,-1)+" "),e}},5347:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c=(i="data"+(r||""),"valid"+n),l=(r="errs__"+n,t.util.copy(t)),u="";l.level++;var d="valid"+l.level;if(o.every((function(i){return t.opts.strictKeywords?"object"==typeof i&&0<Object.keys(i).length||!1===i:t.util.schemaHasRules(i,t.RULES.all)}))){var f=l.baseId;e+=" var "+r+" = errors; var "+c+" = false; ",n=t.compositeRule,t.compositeRule=l.compositeRule=!0;var g=o;if(g)for(var p,m=-1,I=g.length-1;m<I;)p=g[m+=1],l.schema=p,l.schemaPath=s+"["+m+"]",l.errSchemaPath=a+"/"+m,e+=" "+t.validate(l)+" ",l.baseId=f,e+=" "+c+" = "+c+" || "+d+"; if (!"+c+") { ",u+="}";t.compositeRule=l.compositeRule=n,e+=" "+u+" if (!"+c+") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: {} ",!1!==t.opts.messages&&(e+=" , message: 'should match some schema in anyOf' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+i+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&h&&(e+=t.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),e+=" } else { errors = "+r+"; if (vErrors !== null) { if ("+r+") vErrors.length = "+r+"; else vErrors = null; } ",t.opts.allErrors&&(e+=" } ")}else h&&(e+=" if (true) { ");return e}},923:function(t){t.exports=function(t,i){var e=" ",n=t.schema[i];return i=t.errSchemaPath+"/"+i,n=t.util.toQuotedString(n),!0===t.opts.$comment?e+=" console.log("+n+");":"function"==typeof t.opts.$comment&&(e+=" self._opts.$comment("+n+", "+t.util.toQuotedString(i)+", validate.root.schema);"),e}},2617:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n;(i=t.opts.$data&&o&&o.$data)&&(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; "),i||(e+=" var schema"+n+" = validate.schema"+s+";");var u=u||[];return u.push(e+="var "+l+" = equal("+c+", schema"+n+"); if (!"+l+") { "),e="",!1!==t.createErrors?(e+=" { keyword: 'const' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { allowedValue: schema"+n+" } ",!1!==t.opts.messages&&(e+=" , message: 'should be equal to constant' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" }",h&&(e+=" else { "),e}},2119:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n,u="errs__"+n,d=t.util.copy(t);d.level++;var f="valid"+d.level,g="i"+n,p=d.dataLevel=t.dataLevel+1;i="data"+p,r=t.baseId,e+="var "+u+" = errors;var "+l+";",(n=t.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:t.util.schemaHasRules(o,t.RULES.all))?(l=t.compositeRule,t.compositeRule=d.compositeRule=!0,d.schema=o,d.schemaPath=s,d.errSchemaPath=a,e+=" var "+f+" = false; for (var "+g+" = 0; "+g+" < "+c+".length; "+g+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,g,t.opts.jsonPointers,!0),o=c+"["+g+"]",d.dataPathArr[p]=g,g=t.validate(d),d.baseId=r,t.util.varOccurences(g,i)<2?e+=" "+t.util.varReplace(g,i,o)+" ":e+=" var "+i+" = "+o+"; "+g+" ",e+=" if ("+f+") break; } ",t.compositeRule=d.compositeRule=l,e+=" if (!"+f+") {"):e+=" if ("+c+".length == 0) {";var m=m||[];return m.push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: {} ",!1!==t.opts.messages&&(e+=" , message: 'should contain a valid item' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=m.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } else { ",n&&(e+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } "),t.opts.allErrors&&(e+=" } "),e}},1793:function(t){t.exports=function(t,i){var e,n,r,o=" ",s=t.level,a=t.dataLevel,h=t.schema[i],c=t.schemaPath+t.util.getProperty(i),l=t.errSchemaPath+"/"+i,u=!t.opts.allErrors,d="data"+(a||""),f="valid"+s,g="errs__"+s,p=t.opts.$data&&h&&h.$data,m=p?(o+=" var schema"+s+" = "+t.util.getData(h.$data,a,t.dataPathArr)+"; ","schema"+s):h,I="definition"+s,b=this.definition,C="";if(p&&b.$data){var A="keywordValidate"+s,v=b.validateSchema;o+=" var "+I+" = RULES.custom['"+i+"'].definition; var "+A+" = "+I+".validate;"}else{if(!(y=t.useCustomRule(this,h,t.schema,t)))return;m="validate.schema"+c,A=y.code,e=b.compile,n=b.inline,r=b.macro}var y,w,x,k,j,S=A+".errors",Z="i"+s;if(i="ruleErr"+s,(h=b.async)&&!t.async)throw new Error("async keyword in sync schema");return n||r||(o+=S+" = null;"),o+="var "+g+" = errors;var "+f+";",p&&b.$data&&(C+="}",o+=" if ("+m+" === undefined) { "+f+" = true; } else { ",v&&(C+="}",o+=" "+f+" = "+I+".validateSchema("+m+"); if ("+f+") { ")),n?o+=b.statements?" "+y.validate+" ":" "+f+" = "+y.validate+"; ":r?(C="",(v=t.util.copy(t)).level++,k="valid"+v.level,v.schema=y.validate,v.schemaPath="",I=t.compositeRule,t.compositeRule=v.compositeRule=!0,y=t.validate(v).replace(/validate\.schema/g,A),t.compositeRule=v.compositeRule=I,o+=" "+y):((j=j||[]).push(o),o="",o+=" "+A+".call( ",o+=t.opts.passContext?"this":"self",o+=e||!1===b.schema?" , "+d+" ":" , "+m+" , "+d+" , validate.schema"+t.schemaPath+" ",o+=" , (dataPath || '')",'""'!=t.errorPath&&(o+=" + "+t.errorPath),a=o+=" , "+(w=a?"data"+(a-1||""):"parentData")+" , "+(x=a?t.dataPathArr[a]:"parentDataProperty")+" , rootData ) ",o=j.pop(),!1===b.errors?(o+=" "+f+" = ",h&&(o+="await "),o+=a+"; "):o+=h?" var "+(S="customErrors"+s)+" = null; try { "+f+" = await "+a+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+S+" = e.errors; else throw e; } ":" "+S+" = null; "+f+" = "+a+"; "),b.modifying&&(o+=" if ("+w+") "+d+" = "+w+"["+x+"];"),o+=""+C,b.valid?u&&(o+=" if (true) { "):(o+=" if ( ",void 0===b.valid?(o+=" !",o+=r?""+k:f):o+=" "+!b.valid+" ",k=this.keyword,(j=j||[]).push(o+=") { "),(j=j||[]).push(o=""),o="",!1!==t.createErrors?(o+=" { keyword: '"+(k||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",f=o,o=j.pop(),f=o+=!t.compositeRule&&u?t.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o=j.pop(),n?b.errors?"full"!=b.errors&&(o+=" for (var "+Z+"="+g+"; "+Z+"<errors; "+Z+"++) { var "+i+" = vErrors["+Z+"]; if ("+i+".dataPath === undefined) "+i+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+i+".schemaPath === undefined) { "+i+'.schemaPath = "'+l+'"; } ',t.opts.verbose&&(o+=" "+i+".schema = "+m+"; "+i+".data = "+d+"; "),o+=" } "):!1===b.errors?o+=" "+f+" ":(o+=" if ("+g+" == errors) { "+f+" } else { for (var "+Z+"="+g+"; "+Z+"<errors; "+Z+"++) { var "+i+" = vErrors["+Z+"]; if ("+i+".dataPath === undefined) "+i+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+i+".schemaPath === undefined) { "+i+'.schemaPath = "'+l+'"; } ',t.opts.verbose&&(o+=" "+i+".schema = "+m+"; "+i+".data = "+d+"; "),o+=" } } "):r?(o+=" var err = ",!1!==t.createErrors?(o+=" { keyword: '"+(k||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&u&&(o+=t.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===b.errors?o+=" "+f+" ":(o+=" if (Array.isArray("+S+")) { if (vErrors === null) vErrors = "+S+"; else vErrors = vErrors.concat("+S+"); errors = vErrors.length; for (var "+Z+"="+g+"; "+Z+"<errors; "+Z+"++) { var "+i+" = vErrors["+Z+"]; if ("+i+".dataPath === undefined) "+i+".dataPath = (dataPath || '') + "+t.errorPath+"; "+i+'.schemaPath = "'+l+'"; ',t.opts.verbose&&(o+=" "+i+".schema = "+m+"; "+i+".data = "+d+"; "),o+=" } } else { "+f+" } "),o+=" } ",u&&(o+=" else { ")),o}},9115:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l=(r="errs__"+n,t.util.copy(t)),u="";l.level++;var d,f="valid"+l.level,g={},p={},m=t.opts.ownProperties;for(B in o)"__proto__"!=B&&(W=o[B],(d=Array.isArray(W)?p:g)[B]=W);e+="var "+r+" = errors;";var I=t.errorPath;for(B in e+="var missing"+n+";",p)if((d=p[B]).length){if(e+=" if ( "+c+t.util.getProperty(B)+" !== undefined ",m&&(e+=" && Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(B)+"') "),h){e+=" && ( ";var b=d;if(b)for(var C=-1,A=b.length-1;C<A;)k=b[C+=1],C&&(e+=" || "),e+=" ( ( "+(G=c+(Z=t.util.getProperty(k)))+" === undefined ",m&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(k)+"') "),e+=") && (missing"+n+" = "+t.util.toQuotedString(t.opts.jsonPointers?k:Z)+") ) ";e+=")) { ";var v="missing"+n,y="' + "+v+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(I,v,!0):I+" + "+v);var w=w||[];w.push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { property: '"+t.util.escapeQuotes(B)+"', missingProperty: '"+y+"', depsCount: "+d.length+", deps: '"+t.util.escapeQuotes(1==d.length?d[0]:d.join(", "))+"' } ",!1!==t.opts.messages&&(e+=" , message: 'should have ",e+=1==d.length?"property "+t.util.escapeQuotes(d[0]):"properties "+t.util.escapeQuotes(d.join(", ")),e+=" when property "+t.util.escapeQuotes(B)+" is present' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",v=e,e=w.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{e+=" ) { ";var x=d;if(x)for(var k,j=-1,S=x.length-1;j<S;){k=x[j+=1];var Z=t.util.getProperty(k),G=(y=t.util.escapeQuotes(k),c+Z);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(I,k,t.opts.jsonPointers)),e+=" if ( "+G+" === undefined ",m&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(k)+"') "),e+=") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { property: '"+t.util.escapeQuotes(B)+"', missingProperty: '"+y+"', depsCount: "+d.length+", deps: '"+t.util.escapeQuotes(1==d.length?d[0]:d.join(", "))+"' } ",!1!==t.opts.messages&&(e+=" , message: 'should have ",e+=1==d.length?"property "+t.util.escapeQuotes(d[0]):"properties "+t.util.escapeQuotes(d.join(", ")),e+=" when property "+t.util.escapeQuotes(B)+" is present' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e+=" } ",h&&(u+="}",e+=" else { ")}t.errorPath=I;var B,V=l.baseId;for(B in g){var W=g[B];(t.opts.strictKeywords?"object"==typeof W&&0<Object.keys(W).length||!1===W:t.util.schemaHasRules(W,t.RULES.all))&&(e+=" "+f+" = true; if ( "+c+t.util.getProperty(B)+" !== undefined ",m&&(e+=" && Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(B)+"') "),e+=") { ",l.schema=W,l.schemaPath=s+t.util.getProperty(B),l.errSchemaPath=a+"/"+t.util.escapeFragment(B),e+=" "+t.validate(l)+" ",l.baseId=V,e+=" } ",h&&(e+=" if ("+f+") { ",u+="}"))}return h&&(e+=" "+u+" if ("+r+" == errors) {"),e}},9317:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n;(i=t.opts.$data&&o&&o.$data)&&(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; "),o="schema"+n,i||(e+=" var "+o+" = validate.schema"+s+";"),e+="var "+l+";",i&&(e+=" if (schema"+n+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+n+")) "+l+" = false; else {"),e+=l+" = false;for (var "+(r="i"+n)+"=0; "+r+"<"+o+".length; "+r+"++) if (equal("+c+", "+o+"["+r+"])) { "+l+" = true; break; }",i&&(e+=" } ");var u=u||[];return u.push(e+=" if (!"+l+") { "),e="",!1!==t.createErrors?(e+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { allowedValues: schema"+n+" } ",!1!==t.opts.messages&&(e+=" , message: 'should be equal to one of the allowed values' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" }",h&&(e+=" else { "),e}},8327:function(t){t.exports=function(t,i,e){var n=" ",r=t.level,o=t.dataLevel,s=t.schema[i],a=t.schemaPath+t.util.getProperty(i),h=t.errSchemaPath+"/"+i,c=!t.opts.allErrors,l="data"+(o||"");if(!1===t.opts.format)return c&&(n+=" if (true) { "),n;var u,d=t.opts.$data&&s&&s.$data,f=d?(n+=" var schema"+r+" = "+t.util.getData(s.$data,o,t.dataPathArr)+"; ","schema"+r):s;if(i=t.opts.unknownFormats,o=Array.isArray(i),d)n+=" var "+(u="format"+r)+" = formats["+f+"]; var "+(g="isObject"+r)+" = typeof "+u+" == 'object' && !("+u+" instanceof RegExp) && "+u+".validate; var "+(m="formatType"+r)+" = "+g+" && "+u+".type || 'string'; if ("+g+") { ",t.async&&(n+=" var async"+r+" = "+u+".async; "),n+=" "+u+" = "+u+".validate; } if ( ",d&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=i&&(n+=" ("+f+" && !"+u+" ",o&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+u+" && "+m+" == '"+e+"' && !(typeof "+u+" == 'function' ? ",n+=t.async?" (async"+r+" ? await "+u+"("+l+") : "+u+"("+l+")) ":" "+u+"("+l+") ",n+=" : "+u+".test("+l+"))))) {";else{if(!(u=t.formats[s])){if("ignore"==i)return t.logger.warn('unknown format "'+s+'" ignored in schema at path "'+t.errSchemaPath+'"'),c&&(n+=" if (true) { "),n;if(o&&0<=i.indexOf(s))return c&&(n+=" if (true) { "),n;throw new Error('unknown format "'+s+'" is used in schema at path "'+t.errSchemaPath+'"')}var g,p,m=(g="object"==typeof u&&!(u instanceof RegExp)&&u.validate)&&u.type||"string";if(g&&(p=!0===u.async,u=u.validate),m!=e)return c&&(n+=" if (true) { "),n;if(p){if(!t.async)throw new Error("async format in sync schema");n+=" if (!(await "+(I="formats"+t.util.getProperty(s)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var I="formats"+t.util.getProperty(s);g&&(I+=".validate"),n+="function"==typeof u?" "+I+"("+l+") ":" "+I+".test("+l+") ",n+=") { "}}var b=b||[];return b.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { format: ",n+=d?""+f:""+t.util.toQuotedString(s),n+=" } ",!1!==t.opts.messages&&(n+=" , message: 'should match format \"",n+=d?"' + "+f+" + '":""+t.util.escapeQuotes(s),n+="\"' "),t.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+a:""+t.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",l=n,n=b.pop(),n+=!t.compositeRule&&c?t.async?" throw new ValidationError(["+l+"]); ":" validate.errors = ["+l+"]; return false; ":" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { "),n}},5926:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n,u="errs__"+n,d=t.util.copy(t);d.level++;var f,g="valid"+d.level,p=(i=t.schema.else,r=void 0!==(p=t.schema.then)&&(t.opts.strictKeywords?"object"==typeof p&&0<Object.keys(p).length||!1===p:t.util.schemaHasRules(p,t.RULES.all)),void 0!==i&&(t.opts.strictKeywords?"object"==typeof i&&0<Object.keys(i).length||!1===i:t.util.schemaHasRules(i,t.RULES.all)));return i=d.baseId,r||p?(d.createErrors=!1,d.schema=o,d.schemaPath=s,d.errSchemaPath=a,e+=" var "+u+" = errors; var "+l+" = true; ",o=t.compositeRule,t.compositeRule=d.compositeRule=!0,e+=" "+t.validate(d)+" ",d.baseId=i,d.createErrors=!0,e+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",t.compositeRule=d.compositeRule=o,r?(e+=" if ("+g+") { ",d.schema=t.schema.then,d.schemaPath=t.schemaPath+".then",d.errSchemaPath=t.errSchemaPath+"/then",e+=" "+t.validate(d)+" ",d.baseId=i,e+=" "+l+" = "+g+"; ",r&&p?e+=" var "+(f="ifClause"+n)+" = 'then'; ":f="'then'",e+=" } ",p&&(e+=" else { ")):e+=" if (!"+g+") { ",p&&(d.schema=t.schema.else,d.schemaPath=t.schemaPath+".else",d.errSchemaPath=t.errSchemaPath+"/else",e+=" "+t.validate(d)+" ",d.baseId=i,e+=" "+l+" = "+g+"; ",r&&p?e+=" var "+(f="ifClause"+n)+" = 'else'; ":f="'else'",e+=" } "),e+=" if (!"+l+") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'if' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { failingKeyword: "+f+" } ",!1!==t.opts.messages&&(e+=" , message: 'should match \"' + "+f+" + '\" schema' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&h&&(e+=t.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),e+=" } ",h&&(e+=" else { ")):h&&(e+=" if (true) { "),e}},9646:function(t,i,e){t.exports={$ref:e(2331),allOf:e(9486),anyOf:e(5347),$comment:e(923),const:e(2617),contains:e(2119),dependencies:e(9115),enum:e(9317),format:e(8327),if:e(5926),items:e(392),maximum:e(1796),minimum:e(1796),maxItems:e(2407),minItems:e(2407),maxLength:e(1250),minLength:e(1250),maxProperties:e(2596),minProperties:e(2596),multipleOf:e(6039),not:e(7946),oneOf:e(9344),pattern:e(9737),properties:e(2537),propertyNames:e(2127),required:e(1204),uniqueItems:e(1985),validate:e(1869)}},392:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n,u="errs__"+n,d=t.util.copy(t),f="";d.level++;var g="valid"+d.level,p=(i="i"+n,d.dataLevel=t.dataLevel+1),m="data"+p,I=t.baseId;if(e+="var "+u+" = errors;var "+l+";",Array.isArray(o)){var b;!1===(r=t.schema.additionalItems)&&(e+=" "+l+" = "+c+".length <= "+o.length+"; ",n=a,a=t.errSchemaPath+"/additionalItems",(b=b||[]).push(e+=" if (!"+l+") { "),e="",!1!==t.createErrors?(e+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { limit: "+o.length+" } ",!1!==t.opts.messages&&(e+=" , message: 'should NOT have more than "+o.length+" items' "),t.opts.verbose&&(e+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",l=e,e=b.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+l+"]); ":" validate.errors = ["+l+"]; return false; ":" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } ",a=n,h&&(f+="}",e+=" else { "));var C=o;if(C)for(var A=-1,v=C.length-1;A<v;){var y,w,x=C[A+=1];(t.opts.strictKeywords?"object"==typeof x&&0<Object.keys(x).length||!1===x:t.util.schemaHasRules(x,t.RULES.all))&&(e+=" "+g+" = true; if ("+c+".length > "+A+") { ",y=c+"["+A+"]",d.schema=x,d.schemaPath=s+"["+A+"]",d.errSchemaPath=a+"/"+A,d.errorPath=t.util.getPathExpr(t.errorPath,A,t.opts.jsonPointers,!0),d.dataPathArr[p]=A,w=t.validate(d),d.baseId=I,t.util.varOccurences(w,m)<2?e+=" "+t.util.varReplace(w,m,y)+" ":e+=" var "+m+" = "+y+"; "+w+" ",e+=" } ",h&&(e+=" if ("+g+") { ",f+="}"))}"object"==typeof r&&(t.opts.strictKeywords?"object"==typeof r&&0<Object.keys(r).length||!1===r:t.util.schemaHasRules(r,t.RULES.all))&&(d.schema=r,d.schemaPath=t.schemaPath+".additionalItems",d.errSchemaPath=t.errSchemaPath+"/additionalItems",e+=" "+g+" = true; if ("+c+".length > "+o.length+") { for (var "+i+" = "+o.length+"; "+i+" < "+c+".length; "+i+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,i,t.opts.jsonPointers,!0),y=c+"["+i+"]",d.dataPathArr[p]=i,w=t.validate(d),d.baseId=I,t.util.varOccurences(w,m)<2?e+=" "+t.util.varReplace(w,m,y)+" ":e+=" var "+m+" = "+y+"; "+w+" ",h&&(e+=" if (!"+g+") break; "),e+=" } } ",h&&(e+=" if ("+g+") { ",f+="}"))}else(t.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:t.util.schemaHasRules(o,t.RULES.all))&&(d.schema=o,d.schemaPath=s,d.errSchemaPath=a,e+=" for (var "+i+" = 0; "+i+" < "+c+".length; "+i+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,i,t.opts.jsonPointers,!0),y=c+"["+i+"]",d.dataPathArr[p]=i,w=t.validate(d),d.baseId=I,t.util.varOccurences(w,m)<2?e+=" "+t.util.varReplace(w,m,y)+" ":e+=" var "+m+" = "+y+"; "+w+" ",h&&(e+=" if (!"+g+") break; "),e+=" }");return h&&(e+=" "+f+" if ("+u+" == errors) {"),e}},6039:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l=t.opts.$data&&o&&o.$data;if(r=l?(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; ","schema"+n):o,!l&&"number"!=typeof o)throw new Error(i+" must be number");e+="var division"+n+";if (",l&&(e+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),e+=" (division"+n+" = "+c+" / "+r+", ",e+=t.opts.multipleOfPrecision?" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+t.opts.multipleOfPrecision+" ":" division"+n+" !== parseInt(division"+n+") ",e+=" ) ",l&&(e+=" ) ");var u=u||[];return u.push(e+=" ) { "),e="",!1!==t.createErrors?(e+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { multipleOf: "+r+" } ",!1!==t.opts.messages&&(e+=" , message: 'should be multiple of ",e+=l?"' + "+r:r+"'"),t.opts.verbose&&(e+=" , schema: ",e+=l?"validate.schema"+s:""+o,e+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=u.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+="} ",h&&(e+=" else { "),e}},7946:function(t){t.exports=function(t,i){var e,n,r=" ",o=t.level,s=t.dataLevel,a=t.schema[i],h=t.schemaPath+t.util.getProperty(i),c=t.errSchemaPath+"/"+i,l=!t.opts.allErrors,u="data"+(s||"");return i="errs__"+o,(s=t.util.copy(t)).level++,o="valid"+s.level,(t.opts.strictKeywords?"object"==typeof a&&0<Object.keys(a).length||!1===a:t.util.schemaHasRules(a,t.RULES.all))?(s.schema=a,s.schemaPath=h,s.errSchemaPath=c,r+=" var "+i+" = errors; ",a=t.compositeRule,t.compositeRule=s.compositeRule=!0,s.createErrors=!1,s.opts.allErrors&&(e=s.opts.allErrors,s.opts.allErrors=!1),r+=" "+t.validate(s)+" ",s.createErrors=!0,e&&(s.opts.allErrors=e),t.compositeRule=s.compositeRule=a,(n=n||[]).push(r+=" if ("+o+") { "),r="",!1!==t.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(c)+" , params: {} ",!1!==t.opts.messages&&(r+=" , message: 'should NOT be valid' "),t.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",o=r,r=n.pop(),r+=!t.compositeRule&&l?t.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+i+"; if (vErrors !== null) { if ("+i+") vErrors.length = "+i+"; else vErrors = null; } ",t.opts.allErrors&&(r+=" } ")):(r+=" var err = ",!1!==t.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(c)+" , params: {} ",!1!==t.opts.messages&&(r+=" , message: 'should NOT be valid' "),t.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(r+=" if (false) { ")),r}},9344:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c=(i="data"+(r||""),"valid"+n),l=(r="errs__"+n,t.util.copy(t)),u="";l.level++;var d="valid"+l.level,f=l.baseId,g="prevValid"+n,p="passingSchemas"+n;e+="var "+r+" = errors , "+g+" = false , "+c+" = false , "+p+" = null; ",n=t.compositeRule,t.compositeRule=l.compositeRule=!0;var m=o;if(m)for(var I,b=-1,C=m.length-1;b<C;)I=m[b+=1],(t.opts.strictKeywords?"object"==typeof I&&0<Object.keys(I).length||!1===I:t.util.schemaHasRules(I,t.RULES.all))?(l.schema=I,l.schemaPath=s+"["+b+"]",l.errSchemaPath=a+"/"+b,e+=" "+t.validate(l)+" ",l.baseId=f):e+=" var "+d+" = true; ",b&&(e+=" if ("+d+" && "+g+") { "+c+" = false; "+p+" = ["+p+", "+b+"]; } else { ",u+="}"),e+=" if ("+d+") { "+c+" = "+g+" = true; "+p+" = "+b+"; }";return t.compositeRule=l.compositeRule=n,e+=u+"if (!"+c+") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { passingSchemas: "+p+" } ",!1!==t.opts.messages&&(e+=" , message: 'should match exactly one schema in oneOf' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+i+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&h&&(e+=t.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),e+="} else { errors = "+r+"; if (vErrors !== null) { if ("+r+") vErrors.length = "+r+"; else vErrors = null; }",t.opts.allErrors&&(e+=" } "),e}},9737:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||"");r=(i=t.opts.$data&&o&&o.$data)?(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; ","schema"+n):o,n=i?"(new RegExp("+r+"))":t.usePattern(o),e+="if ( ",i&&(e+=" ("+r+" !== undefined && typeof "+r+" != 'string') || ");var l=l||[];return l.push(e+=" !"+n+".test("+c+") ) { "),e="",!1!==t.createErrors?(e+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { pattern: ",e+=i?""+r:""+t.util.toQuotedString(o),e+=" } ",!1!==t.opts.messages&&(e+=" , message: 'should match pattern \"",e+=i?"' + "+r+" + '":""+t.util.escapeQuotes(o),e+="\"' "),t.opts.verbose&&(e+=" , schema: ",e+=i?"validate.schema"+s:""+t.util.toQuotedString(o),e+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",c=e,e=l.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+c+"]); ":" validate.errors = ["+c+"]; return false; ":" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+="} ",h&&(e+=" else { "),e}},2537:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="errs__"+n,u=t.util.copy(t),d="";u.level++;var f,g="valid"+u.level,p="key"+n,m="idx"+n,I=u.dataLevel=t.dataLevel+1,b="data"+I,C="dataProperties"+n,A=Object.keys(o||{}).filter(B),v=t.schema.patternProperties||{},y=Object.keys(v).filter(B),w=t.schema.additionalProperties,x=A.length||y.length,k=!1===w,j="object"==typeof w&&Object.keys(w).length,S=t.opts.removeAdditional,Z=(i=k||j||S,t.opts.ownProperties),G=t.baseId;function B(t){return"__proto__"!==t}if((r=t.schema.required)&&(!t.opts.$data||!r.$data)&&r.length<t.opts.loopRequired&&(f=t.util.toHash(r)),e+="var "+l+" = errors;var "+g+" = true;",Z&&(e+=" var "+C+" = undefined;"),i){if(e+=Z?" "+C+" = "+C+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+C+".length; "+m+"++) { var "+p+" = "+C+"["+m+"]; ":" for (var "+p+" in "+c+") { ",x){if(e+=" var isAdditional"+n+" = !(false ",A.length)if(8<A.length)e+=" || validate.schema"+s+".hasOwnProperty("+p+") ";else{var V=A;if(V)for(var W=-1,K=V.length-1;W<K;)_=V[W+=1],e+=" || "+p+" == "+t.util.toQuotedString(_)+" "}if(y.length){var T=y;if(T)for(var F=-1,R=T.length-1;F<R;)Q=T[F+=1],e+=" || "+t.usePattern(Q)+".test("+p+") "}e+=" ); if (isAdditional"+n+") { "}"all"==S?e+=" delete "+c+"["+p+"]; ":(O=t.errorPath,n="' + "+p+" + '",t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(t.errorPath,p,t.opts.jsonPointers)),k?S?e+=" delete "+c+"["+p+"]; ":(Y=a,a=t.errSchemaPath+"/additionalProperties",(L=L||[]).push(e+=" "+g+" = false; "),e="",!1!==t.createErrors?(e+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { additionalProperty: '"+n+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is an invalid additional property":"should NOT have additional properties",e+="' "),t.opts.verbose&&(e+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",M=e,e=L.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+M+"]); ":" validate.errors = ["+M+"]; return false; ":" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a=Y,h&&(e+=" break; ")):j&&("failing"==S?(e+=" var "+l+" = errors; ",S=t.compositeRule,t.compositeRule=u.compositeRule=!0,u.schema=w,u.schemaPath=t.schemaPath+".additionalProperties",u.errSchemaPath=t.errSchemaPath+"/additionalProperties",u.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,p,t.opts.jsonPointers),tt=c+"["+p+"]",u.dataPathArr[I]=p,it=t.validate(u),u.baseId=G,t.util.varOccurences(it,b)<2?e+=" "+t.util.varReplace(it,b,tt)+" ":e+=" var "+b+" = "+tt+"; "+it+" ",e+=" if (!"+g+") { errors = "+l+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+p+"]; } ",t.compositeRule=u.compositeRule=S):(u.schema=w,u.schemaPath=t.schemaPath+".additionalProperties",u.errSchemaPath=t.errSchemaPath+"/additionalProperties",u.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,p,t.opts.jsonPointers),tt=c+"["+p+"]",u.dataPathArr[I]=p,it=t.validate(u),u.baseId=G,t.util.varOccurences(it,b)<2?e+=" "+t.util.varReplace(it,b,tt)+" ":e+=" var "+b+" = "+tt+"; "+it+" ",h&&(e+=" if (!"+g+") break; "))),t.errorPath=O),x&&(e+=" } "),e+=" } ",h&&(e+=" if ("+g+") { ",d+="}")}var H=t.opts.useDefaults&&!t.compositeRule;if(A.length){var E=A;if(E)for(var _,N=-1,X=E.length-1;N<X;){var z,J,O,Y,P,L,M,D=o[_=E[N+=1]];(t.opts.strictKeywords?"object"==typeof D&&0<Object.keys(D).length||!1===D:t.util.schemaHasRules(D,t.RULES.all))&&(tt=c+(z=t.util.getProperty(_)),P=H&&void 0!==D.default,u.schema=D,u.schemaPath=s+z,u.errSchemaPath=a+"/"+t.util.escapeFragment(_),u.errorPath=t.util.getPath(t.errorPath,_,t.opts.jsonPointers),u.dataPathArr[I]=t.util.toQuotedString(_),it=t.validate(u),u.baseId=G,t.util.varOccurences(it,b)<2?(it=t.util.varReplace(it,b,tt),J=tt):e+=" var "+(J=b)+" = "+tt+"; ",P?e+=" "+it+" ":(f&&f[_]?(e+=" if ( "+J+" === undefined ",Z&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(_)+"') "),e+=") { "+g+" = false; ",O=t.errorPath,Y=a,P=t.util.escapeQuotes(_),t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(O,_,t.opts.jsonPointers)),a=t.errSchemaPath+"/required",(L=L||[]).push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+P+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+P+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",M=e,e=L.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+M+"]); ":" validate.errors = ["+M+"]; return false; ":" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a=Y,t.errorPath=O,e+=" } else { "):h?(e+=" if ( "+J+" === undefined ",Z&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(_)+"') "),e+=") { "+g+" = true; } else { "):(e+=" if ("+J+" !== undefined ",Z&&(e+=" && Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(_)+"') "),e+=" ) { "),e+=" "+it+" } ")),h&&(e+=" if ("+g+") { ",d+="}")}}if(y.length){var U=y;if(U)for(var Q,$=-1,q=U.length-1;$<q;){var tt,it;D=v[Q=U[$+=1]],(t.opts.strictKeywords?"object"==typeof D&&0<Object.keys(D).length||!1===D:t.util.schemaHasRules(D,t.RULES.all))&&(u.schema=D,u.schemaPath=t.schemaPath+".patternProperties"+t.util.getProperty(Q),u.errSchemaPath=t.errSchemaPath+"/patternProperties/"+t.util.escapeFragment(Q),e+=Z?" "+C+" = "+C+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+C+".length; "+m+"++) { var "+p+" = "+C+"["+m+"]; ":" for (var "+p+" in "+c+") { ",e+=" if ("+t.usePattern(Q)+".test("+p+")) { ",u.errorPath=t.util.getPathExpr(t.errorPath,p,t.opts.jsonPointers),tt=c+"["+p+"]",u.dataPathArr[I]=p,it=t.validate(u),u.baseId=G,t.util.varOccurences(it,b)<2?e+=" "+t.util.varReplace(it,b,tt)+" ":e+=" var "+b+" = "+tt+"; "+it+" ",h&&(e+=" if (!"+g+") break; "),e+=" } ",h&&(e+=" else "+g+" = true; "),e+=" } ",h&&(e+=" if ("+g+") { ",d+="}"))}}return h&&(e+=" "+d+" if ("+l+" == errors) {"),e}},2127:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="errs__"+n,u=t.util.copy(t);u.level++;var d,f,g,p,m,I="valid"+u.level;return e+="var "+l+" = errors;",(t.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:t.util.schemaHasRules(o,t.RULES.all))&&(u.schema=o,u.schemaPath=s,u.errSchemaPath=a,m="idx"+n,f="i"+n,g="' + "+(d="key"+n)+" + '",p="data"+(u.dataLevel=t.dataLevel+1),i="dataProperties"+n,o=t.baseId,(r=t.opts.ownProperties)&&(e+=" var "+i+" = undefined; "),e+=r?" "+i+" = "+i+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+i+".length; "+m+"++) { var "+d+" = "+i+"["+m+"]; ":" for (var "+d+" in "+c+") { ",e+=" var startErrs"+n+" = errors; ",r=d,i=t.compositeRule,t.compositeRule=u.compositeRule=!0,m=t.validate(u),u.baseId=o,t.util.varOccurences(m,p)<2?e+=" "+t.util.varReplace(m,p,r)+" ":e+=" var "+p+" = "+r+"; "+m+" ",t.compositeRule=u.compositeRule=i,e+=" if (!"+I+") { for (var "+f+"=startErrs"+n+"; "+f+"<errors; "+f+"++) { vErrors["+f+"].propertyName = "+d+"; } var err = ",!1!==t.createErrors?(e+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { propertyName: '"+g+"' } ",!1!==t.opts.messages&&(e+=" , message: 'property name \\'"+g+"\\' is invalid' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&h&&(e+=t.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),h&&(e+=" break; "),e+=" } }"),h&&(e+=" if ("+l+" == errors) {"),e}},2331:function(t){t.exports=function(t,i){var e,n,r=" ",o=t.level,s=t.dataLevel,a=t.schema[i],h=t.errSchemaPath+"/"+i,c=!t.opts.allErrors,l="data"+(s||"");if(i="valid"+o,"#"==a||"#/"==a)n=t.isRoot?(e=t.async,"validate"):(e=!0===t.root.schema.$async,"root.refVal[0]");else if(void 0===(o=t.resolveRef(t.baseId,a,t.isRoot))){var u,d=t.MissingRefError.message(t.baseId,a);if("fail"==t.opts.missingRefs){t.logger.error(d),(u=u||[]).push(r),r="",!1!==t.createErrors?(r+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { ref: '"+t.util.escapeQuotes(a)+"' } ",!1!==t.opts.messages&&(r+=" , message: 'can\\'t resolve reference "+t.util.escapeQuotes(a)+"' "),t.opts.verbose&&(r+=" , schema: "+t.util.toQuotedString(a)+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var f=r;r=u.pop(),r+=!t.compositeRule&&c?t.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ")}else{if("ignore"!=t.opts.missingRefs)throw new t.MissingRefError(t.baseId,a,d);t.logger.warn(d),c&&(r+=" if (true) { ")}}else o.inline?((f=t.util.copy(t)).level++,d="valid"+f.level,f.schema=o.schema,f.schemaPath="",f.errSchemaPath=a,r+=" "+t.validate(f).replace(/validate\.schema/g,o.code)+" ",c&&(r+=" if ("+d+") { ")):(e=!0===o.$async||t.async&&!1!==o.$async,n=o.code);if(n)if((u=u||[]).push(r),r="",r+=t.opts.passContext?" "+n+".call(this, ":" "+n+"( ",r+=" "+l+", (dataPath || '')",'""'!=t.errorPath&&(r+=" + "+t.errorPath),s=r+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?t.dataPathArr[s]:"parentDataProperty")+", rootData) ",r=u.pop(),e){if(!t.async)throw new Error("async schema referenced by sync schema");c&&(r+=" var "+i+"; "),r+=" try { await "+s+"; ",c&&(r+=" "+i+" = true; "),r+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(r+=" "+i+" = false; "),r+=" } ",c&&(r+=" if ("+i+") { ")}else r+=" if (!"+s+") { if (vErrors === null) vErrors = "+n+".errors; else vErrors = vErrors.concat("+n+".errors); errors = vErrors.length; } ",c&&(r+=" else { ");return r}},1204:function(t){t.exports=function(t,i){var e=" ",n=t.level,r=t.dataLevel,o=t.schema[i],s=t.schemaPath+t.util.getProperty(i),a=t.errSchemaPath+"/"+i,h=!t.opts.allErrors,c="data"+(r||""),l="valid"+n;if((i=t.opts.$data&&o&&o.$data)&&(e+=" var schema"+n+" = "+t.util.getData(o.$data,r,t.dataPathArr)+"; "),r="schema"+n,!i)if(o.length<t.opts.loopRequired&&t.schema.properties&&Object.keys(t.schema.properties).length){var u=[],d=o;if(d)for(var f=-1,g=d.length-1;f<g;){var p=d[f+=1],m=t.schema.properties[p];m&&(t.opts.strictKeywords?"object"==typeof m&&0<Object.keys(m).length||!1===m:t.util.schemaHasRules(m,t.RULES.all))||(u[u.length]=p)}}else u=o;if(i||u.length){var I=t.errorPath,b=(o=i||u.length>=t.opts.loopRequired,t.opts.ownProperties);if(h)if(e+=" var missing"+n+"; ",o){i||(e+=" var "+r+" = validate.schema"+s+"; ");var C="' + "+(k="schema"+n+"["+(w="i"+n)+"]")+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(I,k,t.opts.jsonPointers)),e+=" var "+l+" = true; ",i&&(e+=" if (schema"+n+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+n+")) "+l+" = false; else {"),e+=" for (var "+w+" = 0; "+w+" < "+r+".length; "+w+"++) { "+l+" = "+c+"["+r+"["+w+"]] !== undefined ",b&&(e+=" && Object.prototype.hasOwnProperty.call("+c+", "+r+"["+w+"]) "),e+="; if (!"+l+") break; } ",i&&(e+=" } "),(v=v||[]).push(e+=" if (!"+l+") { "),e="",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+C+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+C+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ";var A=e;e=v.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } else { "}else{e+=" if ( ";var v,y=u;if(y)for(var w=-1,x=y.length-1;w<x;)S=y[w+=1],w&&(e+=" || "),e+=" ( ( "+(V=c+(B=t.util.getProperty(S)))+" === undefined ",b&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(S)+"') "),e+=") && (missing"+n+" = "+t.util.toQuotedString(t.opts.jsonPointers?S:B)+") ) ";e+=") { ",C="' + "+(k="missing"+n)+" + '",t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(I,k,!0):I+" + "+k),(v=v||[]).push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+C+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+C+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",A=e,e=v.pop(),e+=!t.compositeRule&&h?t.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } else { "}else if(o){var k;i||(e+=" var "+r+" = validate.schema"+s+"; "),C="' + "+(k="schema"+n+"["+(w="i"+n)+"]")+" + '",t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(I,k,t.opts.jsonPointers)),i&&(e+=" if ("+r+" && !Array.isArray("+r+")) { var err = ",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+C+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+C+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+r+" !== undefined) { "),e+=" for (var "+w+" = 0; "+w+" < "+r+".length; "+w+"++) { if ("+c+"["+r+"["+w+"]] === undefined ",b&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+r+"["+w+"]) "),e+=") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+C+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+C+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",i&&(e+=" } ")}else{var j=u;if(j)for(var S,Z=-1,G=j.length-1;Z<G;){S=j[Z+=1];var B=t.util.getProperty(S),V=(C=t.util.escapeQuotes(S),c+B);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(I,S,t.opts.jsonPointers)),e+=" if ( "+V+" === undefined ",b&&(e+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(S)+"') "),e+=") { var err = ",!1!==t.createErrors?(e+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(a)+" , params: { missingProperty: '"+C+"' } ",!1!==t.opts.messages&&(e+=" , message: '",e+=t.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+C+"\\'",e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),e+=" } "):e+=" {} ",e+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t.errorPath=I}else h&&(e+=" if (true) {");return e}},1985:function(t){t.exports=function(t,i){var e,n=" ",r=t.level,o=t.dataLevel,s=t.schema[i],a=t.schemaPath+t.util.getProperty(i),h=t.errSchemaPath+"/"+i,c=!t.opts.allErrors,l="data"+(o||""),u="valid"+r;return o=(i=t.opts.$data&&s&&s.$data)?(n+=" var schema"+r+" = "+t.util.getData(s.$data,o,t.dataPathArr)+"; ","schema"+r):s,(s||i)&&!1!==t.opts.uniqueItems?(i&&(n+=" var "+u+"; if ("+o+" === false || "+o+" === undefined) "+u+" = true; else if (typeof "+o+" != 'boolean') "+u+" = false; else { "),n+=" var i = "+l+".length , "+u+" = true , j; if (i > 1) { ",r=t.schema.items&&t.schema.items.type,o=Array.isArray(r),!r||"object"==r||"array"==r||o&&(0<=r.indexOf("object")||0<=r.indexOf("array"))?n+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+l+"[i], "+l+"[j])) { "+u+" = false; break outer; } } } ":(n+=" var itemIndices = {}, item; for (;i--;) { var item = "+l+"[i]; ",n+=" if ("+t.util["checkDataType"+(o?"s":"")](r,"item",t.opts.strictNumbers,!0)+") continue; ",o&&(n+=" if (typeof item == 'string') item = '\"' + item; "),n+=" if (typeof itemIndices[item] == 'number') { "+u+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),n+=" } ",i&&(n+=" } "),(e=e||[]).push(n+=" if (!"+u+") { "),n="",!1!==t.createErrors?(n+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==t.opts.messages&&(n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),t.opts.verbose&&(n+=" , schema: ",n+=i?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",l=n,n=e.pop(),n+=!t.compositeRule&&c?t.async?" throw new ValidationError(["+l+"]); ":" validate.errors = ["+l+"]; return false; ":" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { ")):c&&(n+=" if (true) { "),n}},1869:function(t){t.exports=function(t,i){var e="",n=!0===t.schema.$async,r=t.util.schemaHasRulesExcept(t.schema,t.RULES.all,"$ref"),o=t.self._getId(t.schema);if(t.opts.strictKeywords){var s=t.util.schemaUnknownRules(t.schema,t.RULES.keywords);if(s){if(s="unknown keyword: "+s,"log"!==t.opts.strictKeywords)throw new Error(s);t.logger.warn(s)}}if(t.isTop&&(e+=" var validate = ",n&&(t.async=!0,e+="async "),e+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(t.opts.sourceCode||t.opts.processCode)&&(e+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof t.schema||!r&&!t.schema.$ref){var a=t.level,h=t.dataLevel,c=t.schema[i="false schema"],l=t.schemaPath+t.util.getProperty(i),u=t.errSchemaPath+"/"+i,d=!t.opts.allErrors,f="data"+(h||""),g="valid"+a;return!1===t.schema?(t.isTop?d=!0:e+=" var "+g+" = false; ",(X=X||[]).push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(u)+" , params: {} ",!1!==t.opts.messages&&(e+=" , message: 'boolean schema is false' "),t.opts.verbose&&(e+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),e+=" } "):e+=" {} ",G=e,e=X.pop(),e+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+G+"]); ":" validate.errors = ["+G+"]; return false; ":" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):e+=t.isTop?n?" return data; ":" validate.errors = null; return true; ":" var "+g+" = true; ",t.isTop&&(e+=" }; return validate; "),e}if(t.isTop){var p=t.isTop;if(a=t.level=0,h=t.dataLevel=0,f="data",t.rootId=t.resolve.fullPath(t.self._getId(t.root.schema)),t.baseId=t.baseId||t.rootId,delete t.isTop,t.dataPathArr=[""],void 0!==t.schema.default&&t.opts.useDefaults&&t.opts.strictDefaults){var m="default is ignored in the schema root";if("log"!==t.opts.strictDefaults)throw new Error(m);t.logger.warn(m)}e+=" var vErrors = null; ",e+=" var errors = 0; ",e+=" if (rootData === undefined) rootData = data; "}else{if(a=t.level,f="data"+((h=t.dataLevel)||""),o&&(t.baseId=t.resolve.url(t.baseId,o)),n&&!t.async)throw new Error("async schema in sync schema");e+=" var errs_"+a+" = errors;"}g="valid"+a,d=!t.opts.allErrors;var I,b="",C="",A=t.schema.type,v=Array.isArray(A);if(A&&t.opts.nullable&&!0===t.schema.nullable&&(v?-1==A.indexOf("null")&&(A=A.concat("null")):"null"!=A&&(A=[A,"null"],v=!0)),v&&1==A.length&&(A=A[0],v=!1),t.schema.$ref&&r){if("fail"==t.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+t.errSchemaPath+'" (see option extendRefs)');!0!==t.opts.extendRefs&&(r=!1,t.logger.warn('$ref: keywords ignored in schema at path "'+t.errSchemaPath+'"'))}if(t.schema.$comment&&t.opts.$comment&&(e+=" "+t.RULES.all.$comment.code(t,"$comment")),A){t.opts.coerceTypes&&(I=t.util.coerceToTypes(t.opts.coerceTypes,A));var y=t.RULES.types[A];if(I||v||!0===y||y&&!P(y)){if(l=t.schemaPath+".type",u=t.errSchemaPath+"/type",l=t.schemaPath+".type",u=t.errSchemaPath+"/type",e+=" if ("+t.util[v?"checkDataTypes":"checkDataType"](A,f,t.opts.strictNumbers,!0)+") { ",I){var w="dataType"+a,x="coerced"+a;e+=" var "+w+" = typeof "+f+"; var "+x+" = undefined; ","array"==t.opts.coerceTypes&&(e+=" if ("+w+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+w+" = typeof "+f+"; if ("+t.util.checkDataType(t.schema.type,f,t.opts.strictNumbers)+") "+x+" = "+f+"; } "),e+=" if ("+x+" !== undefined) ; ";var k=I;if(k)for(var j,S=-1,Z=k.length-1;S<Z;)"string"==(j=k[S+=1])?e+=" else if ("+w+" == 'number' || "+w+" == 'boolean') "+x+" = '' + "+f+"; else if ("+f+" === null) "+x+" = ''; ":"number"==j||"integer"==j?(e+=" else if ("+w+" == 'boolean' || "+f+" === null || ("+w+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(e+=" && !("+f+" % 1)"),e+=")) "+x+" = +"+f+"; "):"boolean"==j?e+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+x+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+x+" = true; ":"null"==j?e+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+x+" = null; ":"array"==t.opts.coerceTypes&&"array"==j&&(e+=" else if ("+w+" == 'string' || "+w+" == 'number' || "+w+" == 'boolean' || "+f+" == null) "+x+" = ["+f+"]; ");(X=X||[]).push(e+=" else { "),e="",!1!==t.createErrors?(e+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(u)+" , params: { type: '",e+=v?""+A.join(","):""+A,e+="' } ",!1!==t.opts.messages&&(e+=" , message: 'should be ",e+=v?""+A.join(","):""+A,e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),e+=" } "):e+=" {} ";var G=e;e=X.pop(),e+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+G+"]); ":" validate.errors = ["+G+"]; return false; ":" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } if ("+x+" !== undefined) { ",o=h?"data"+(h-1||""):"parentData",e+=" "+f+" = "+x+"; ",h||(e+="if ("+o+" !== undefined)"),e+=" "+o+"["+(h?t.dataPathArr[h]:"parentDataProperty")+"] = "+x+"; } "}else(X=X||[]).push(e),e="",!1!==t.createErrors?(e+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(u)+" , params: { type: '",e+=v?""+A.join(","):""+A,e+="' } ",!1!==t.opts.messages&&(e+=" , message: 'should be ",e+=v?""+A.join(","):""+A,e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),e+=" } "):e+=" {} ",G=e,e=X.pop(),e+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+G+"]); ":" validate.errors = ["+G+"]; return false; ":" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";e+=" } "}}if(t.schema.$ref&&!r)e+=" "+t.RULES.all.$ref.code(t,"$ref")+" ",d&&(e+=" } if (errors === ",e+=p?"0":"errs_"+a,e+=") { ",C+="}");else{var B=t.RULES;if(B)for(var V=-1,W=B.length-1;V<W;)if(P(y=B[V+=1])){if(y.type&&(e+=" if ("+t.util.checkDataType(y.type,f,t.opts.strictNumbers)+") { "),t.opts.useDefaults)if("object"==y.type&&t.schema.properties){c=t.schema.properties;var K=Object.keys(c);if(K)for(var T,F=-1,R=K.length-1;F<R;)if(void 0!==(_=c[T=K[F+=1]]).default){var H=f+t.util.getProperty(T);if(t.compositeRule){if(t.opts.strictDefaults){if(m="default is ignored for: "+H,"log"!==t.opts.strictDefaults)throw new Error(m);t.logger.warn(m)}}else e+=" if ("+H+" === undefined ","empty"==t.opts.useDefaults&&(e+=" || "+H+" === null || "+H+" === '' "),e+=" ) "+H+" = ",e+="shared"==t.opts.useDefaults?" "+t.useDefault(_.default)+" ":" "+JSON.stringify(_.default)+" ",e+="; "}}else if("array"==y.type&&Array.isArray(t.schema.items)){var E=t.schema.items;if(E){S=-1;for(var _,N=E.length-1;S<N;)if(void 0!==(_=E[S+=1]).default)if(H=f+"["+S+"]",t.compositeRule){if(t.opts.strictDefaults){if(m="default is ignored for: "+H,"log"!==t.opts.strictDefaults)throw new Error(m);t.logger.warn(m)}}else e+=" if ("+H+" === undefined ","empty"==t.opts.useDefaults&&(e+=" || "+H+" === null || "+H+" === '' "),e+=" ) "+H+" = ",e+="shared"==t.opts.useDefaults?" "+t.useDefault(_.default)+" ":" "+JSON.stringify(_.default)+" ",e+="; "}}var X,z=y.rules;if(z)for(var J,O=-1,Y=z.length-1;O<Y;)!L(J=z[O+=1])||(J=J.code(t,J.keyword,y.type))&&(e+=" "+J+" ",d&&(b+="}"));d&&(e+=" "+b+" ",b=""),y.type&&(e+=" } ",A&&A===y.type&&!I&&(l=t.schemaPath+".type",u=t.errSchemaPath+"/type",(X=X||[]).push(e+=" else { "),e="",!1!==t.createErrors?(e+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(u)+" , params: { type: '",e+=v?""+A.join(","):""+A,e+="' } ",!1!==t.opts.messages&&(e+=" , message: 'should be ",e+=v?""+A.join(","):""+A,e+="' "),t.opts.verbose&&(e+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),e+=" } "):e+=" {} ",G=e,e=X.pop(),e+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+G+"]); ":" validate.errors = ["+G+"]; return false; ":" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",e+=" } ")),d&&(e+=" if (errors === ",e+=p?"0":"errs_"+a,e+=") { ",C+="}")}}function P(t){for(var i=t.rules,e=0;e<i.length;e++)if(L(i[e]))return 1}function L(i){return void 0!==t.schema[i.keyword]||i.implements&&function(i){for(var e=i.implements,n=0;n<e.length;n++)if(void 0!==t.schema[e[n]])return 1}(i)}return d&&(e+=" "+C+" "),p?(n?(e+=" if (errors === 0) return data; ",e+=" else throw new ValidationError(vErrors); "):(e+=" validate.errors = vErrors; ",e+=" return errors === 0; "),e+=" }; return validate;"):e+=" var "+g+" = errors === errs_"+a+";",e}},7931:function(t,i,e){var n=/^[a-z_$][a-z0-9_$-]*$/i,r=e(1793),o=e(5868);t.exports={add:function(t,i){var e=this.RULES;if(e.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!n.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(i){this.validateKeyword(i,!0);var o=i.type;if(Array.isArray(o))for(var s=0;s<o.length;s++)h(t,o[s],i);else h(t,o,i);var a=i.metaSchema;a&&(i.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),i.validateSchema=this.compile(a,!0))}function h(t,i,n){for(var o,s=0;s<e.length;s++){var a=e[s];if(a.type==i){o=a;break}}o||e.push(o={type:i,rules:[]}),o.rules.push(n={keyword:t,definition:n,custom:!0,code:r,implements:n.implements}),e.custom[t]=n}return e.keywords[t]=e.all[t]=!0,this},get:function(t){var i=this.RULES.custom[t];return i?i.definition:this.RULES.keywords[t]||!1},remove:function(t){var i=this.RULES;delete i.keywords[t],delete i.all[t],delete i.custom[t];for(var e=0;e<i.length;e++)for(var n=i[e].rules,r=0;r<n.length;r++)if(n[r].keyword==t){n.splice(r,1);break}return this},validate:function t(i,e){t.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(o,!0);if(n(i))return!0;if(t.errors=n.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}}},2303:function(t){t.exports=function t(i,e){if(i===e)return!0;if(i&&e&&"object"==typeof i&&"object"==typeof e){if(i.constructor!==e.constructor)return!1;var n,r,o;if(Array.isArray(i)){if((n=i.length)!=e.length)return!1;for(r=n;0!=r--;)if(!t(i[r],e[r]))return!1;return!0}if(i.constructor===RegExp)return i.source===e.source&&i.flags===e.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===e.toString();if((n=(o=Object.keys(i)).length)!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=n;0!=r--;){var s=o[r];if(!t(i[s],e[s]))return!1}return!0}return i!=i&&e!=e}},3508:function(t){t.exports=function(t,i){var e,n="boolean"==typeof(i="function"==typeof(i=i||{})?{cmp:i}:i).cycles&&i.cycles,r=i.cmp&&(e=i.cmp,function(t){return function(i,n){return e(i={key:i,value:t[i]},n={key:n,value:t[n]})}}),o=[];return function t(i){if(void 0!==(i=i&&i.toJSON&&"function"==typeof i.toJSON?i.toJSON():i)){if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);if(Array.isArray(i)){for(a="[",h=0;h<i.length;h++)h&&(a+=","),a+=t(i[h])||"null";return a+"]"}if(null===i)return"null";if(-1!==o.indexOf(i)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var e=o.push(i)-1,s=Object.keys(i).sort(r&&r(i)),a="",h=0;h<s.length;h++){var c=s[h],l=t(i[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(e,1),"{"+a+"}"}}(t)}},233:function(t){t.exports=function t(i,e){function n(i){return t.insensitive&&(""+i).toLowerCase()||""+i}var r,o,s=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,h=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,l=/^0/,u=(i=n(i).replace(a,"")||"",a=n(e).replace(a,"")||"",i.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")),d=a.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0");if(i=parseInt(i.match(c),16)||1!==u.length&&i.match(h)&&Date.parse(i),a=parseInt(a.match(c),16)||i&&a.match(h)&&Date.parse(a)||null){if(i<a)return-1;if(a<i)return 1}for(var f=0,g=Math.max(u.length,d.length);f<g;f++){if(r=!(u[f]||"").match(l)&&parseFloat(u[f])||u[f]||0,o=!(d[f]||"").match(l)&&parseFloat(d[f])||d[f]||0,isNaN(r)!==isNaN(o))return isNaN(r)?1:-1;if(typeof r!=typeof o&&(r+="",o+=""),r<o)return-1;if(o<r)return 1}return 0}},5156:function(t,i){!function(t){function i(t){return null!==t&&"[object Array]"===Object.prototype.toString.call(t)}function e(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t,r){if(t===r)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(r))return!1;if(!0===i(t)){if(t.length!==r.length)return!1;for(var o=0;o<t.length;o++)if(!1===n(t[o],r[o]))return!1;return!0}if(!0!==e(t))return!1;var s,a,h={};for(s in t)if(hasOwnProperty.call(t,s)){if(!1===n(t[s],r[s]))return!1;h[s]=!0}for(a in r)if(hasOwnProperty.call(r,a)&&!0!==h[a])return!1;return!0}function r(t){if(""===t||!1===t||null===t)return!0;if(i(t)&&0===t.length)return!0;if(e(t)){for(var n in t)if(t.hasOwnProperty(n))return!1;return!0}return!1}var o="function"==typeof String.prototype.trimLeft?function(t){return t.trimLeft()}:function(t){return t.match(/^\s*(.*)/)[1]},s=0,a=2,h="UnquotedIdentifier",c="QuotedIdentifier",l="Rbracket",u="Rparen",d="Comma",f="Colon",g="Rbrace",p="Number",m="Current",I="Expref",b="Pipe",C="Flatten",A="Star",v="Filter",y="Lbrace",w="Lbracket",x="Lparen",k="Literal",j={".":"Dot","*":A,",":d,":":f,"{":y,"}":g,"]":l,"(":x,")":u,"@":m},S={"<":!0,">":!0,"=":!0,"!":!0},Z={" ":!0,"\t":!0,"\n":!0};function G(t){return"0"<=t&&t<="9"||"-"===t}function B(){}B.prototype={tokenize:function(t){var i,e,n,r=[];for(this._current=0;this._current<t.length;)if("a"<=(n=t[this._current])&&n<="z"||"A"<=n&&n<="Z"||"_"===n)o=this._current,i=this._consumeUnquotedIdentifier(t),r.push({type:h,value:i,start:o});else if(void 0!==j[t[this._current]])r.push({type:j[t[this._current]],value:t[this._current],start:this._current}),this._current++;else if(G(t[this._current]))e=this._consumeNumber(t),r.push(e);else if("["===t[this._current])e=this._consumeLBracket(t),r.push(e);else if('"'===t[this._current])o=this._current,i=this._consumeQuotedIdentifier(t),r.push({type:c,value:i,start:o});else if("'"===t[this._current])o=this._current,i=this._consumeRawStringLiteral(t),r.push({type:k,value:i,start:o});else if("`"===t[this._current]){var o=this._current,s=this._consumeLiteral(t);r.push({type:k,value:s,start:o})}else if(void 0!==S[t[this._current]])r.push(this._consumeOperator(t));else if(void 0!==Z[t[this._current]])this._current++;else if("&"===t[this._current])o=this._current,this._current++,"&"===t[this._current]?(this._current++,r.push({type:"And",value:"&&",start:o})):r.push({type:I,value:"&",start:o});else{if("|"!==t[this._current])throw(s=new Error("Unknown character:"+t[this._current])).name="LexerError",s;o=this._current,this._current++,"|"===t[this._current]?(this._current++,r.push({type:"Or",value:"||",start:o})):r.push({type:b,value:"|",start:o})}return r},_consumeUnquotedIdentifier:function(t){var i,e=this._current;for(this._current++;this._current<t.length&&("a"<=(i=t[this._current])&&i<="z"||"A"<=i&&i<="Z"||"0"<=i&&i<="9"||"_"===i);)this._current++;return t.slice(e,this._current)},_consumeQuotedIdentifier:function(t){var i=this._current;this._current++;for(var e=t.length;'"'!==t[this._current]&&this._current<e;){var n=this._current;"\\"!==t[n]||"\\"!==t[n+1]&&'"'!==t[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(t.slice(i,this._current))},_consumeRawStringLiteral:function(t){var i=this._current;this._current++;for(var e=t.length;"'"!==t[this._current]&&this._current<e;){var n=this._current;"\\"!==t[n]||"\\"!==t[n+1]&&"'"!==t[n+1]?n++:n+=2,this._current=n}return this._current++,t.slice(i+1,this._current-1).replace("\\'","'")},_consumeNumber:function(t){var i=this._current;this._current++;for(var e=t.length;G(t[this._current])&&this._current<e;)this._current++;var n=parseInt(t.slice(i,this._current));return{type:p,value:n,start:i}},_consumeLBracket:function(t){var i=this._current;return this._current++,"?"===t[this._current]?(this._current++,{type:v,value:"[?",start:i}):"]"===t[this._current]?(this._current++,{type:C,value:"[]",start:i}):{type:w,value:"[",start:i}},_consumeOperator:function(t){var i=this._current,e=t[i];return this._current++,"!"===e?"="===t[this._current]?(this._current++,{type:"NE",value:"!=",start:i}):{type:"Not",value:"!",start:i}:"<"===e?"="===t[this._current]?(this._current++,{type:"LTE",value:"<=",start:i}):{type:"LT",value:"<",start:i}:">"===e?"="===t[this._current]?(this._current++,{type:"GTE",value:">=",start:i}):{type:"GT",value:">",start:i}:"="===e&&"="===t[this._current]?(this._current++,{type:"EQ",value:"==",start:i}):void 0},_consumeLiteral:function(t){this._current++;for(var i=this._current,e=t.length;"`"!==t[this._current]&&this._current<e;){var n=this._current;"\\"!==t[n]||"\\"!==t[n+1]&&"`"!==t[n+1]?n++:n+=2,this._current=n}return i=(i=o(t.slice(i,this._current))).replace("\\`","`"),i=this._looksLikeJSON(i)?JSON.parse(i):JSON.parse('"'+i+'"'),this._current++,i},_looksLikeJSON:function(t){if(""===t)return!1;if(0<='[{"'.indexOf(t[0]))return!0;if(0<=["true","false","null"].indexOf(t))return!0;if(!(0<="-0123456789".indexOf(t[0])))return!1;try{return JSON.parse(t),!0}catch(t){return!1}}};var V={};function W(){}function K(t){this.runtime=t}function T(t){this._interpreter=t,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,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:[a]},{types:[a]}]},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:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,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}]}}}V.EOF=0,V[h]=0,V[c]=0,V[l]=0,V[u]=0,V[d]=0,V[g]=0,V[p]=0,V[m]=0,V[I]=0,V.Pipe=1,V.Or=2,V.And=3,V.EQ=5,V.GT=5,V.LT=5,V.GTE=5,V.LTE=5,V.NE=5,V[C]=9,V.Star=20,V[v]=21,V.Dot=40,V.Not=45,V[y]=50,V[w]=55,V[x]=60,W.prototype={parse:function(t){if(this._loadTokens(t),this.index=0,t=this.expression(0),"EOF"===this._lookahead(0))return t;throw t=this._lookaheadToken(0),(t=new Error("Unexpected token type: "+t.type+", value: "+t.value)).name="ParserError",t},_loadTokens:function(t){var i=(new B).tokenize(t);i.push({type:"EOF",value:"",start:t.length}),this.tokens=i},expression:function(t){var i=this._lookaheadToken(0);this._advance();for(var e=this.nud(i),n=this._lookahead(0);t<V[n];)this._advance(),e=this.led(n,e),n=this._lookahead(0);return e},_lookahead:function(t){return this.tokens[this.index+t].type},_lookaheadToken:function(t){return this.tokens[this.index+t]},_advance:function(){this.index++},nud:function(t){var i,e;switch(t.type){case k:return{type:"Literal",value:t.value};case h:return{type:"Field",name:t.value};case c:var n={type:"Field",name:t.value};if(this._lookahead(0)===x)throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[i=this.expression(V.Not)]};case A:return i=null,{type:"ValueProjection",children:[{type:"Identity"},i=this._lookahead(0)===l?{type:"Identity"}:this._parseProjectionRHS(V.Star)]};case v:return this.led(t.type,{type:"Identity"});case y:return this._parseMultiselectHash();case C:return{type:"Projection",children:[{type:C,children:[{type:"Identity"}]},i=this._parseProjectionRHS(V.Flatten)]};case w:return this._lookahead(0)===p||this._lookahead(0)===f?(i=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},i)):this._lookahead(0)===A&&this._lookahead(1)===l?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},i=this._parseProjectionRHS(V.Star)]}):this._parseMultiselectList();case m:return{type:m};case I:return{type:"ExpressionReference",children:[e=this.expression(V.Expref)]};case x:for(var r=[];this._lookahead(0)!==u;)this._lookahead(0)===m?(e={type:m},this._advance()):e=this.expression(0),r.push(e);return this._match(u),r[0];default:this._errorToken(t)}},led:function(t,i){var e;switch(t){case"Dot":var n=V.Dot;return this._lookahead(0)!==A?{type:"Subexpression",children:[i,e=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[i,e=this._parseProjectionRHS(n)]});case b:return e=this.expression(V.Pipe),{type:b,children:[i,e]};case"Or":return{type:"OrExpression",children:[i,e=this.expression(V.Or)]};case"And":return{type:"AndExpression",children:[i,e=this.expression(V.And)]};case x:n=i.name;for(var r,o=[];this._lookahead(0)!==u;)this._lookahead(0)===m?(r={type:m},this._advance()):r=this.expression(0),this._lookahead(0)===d&&this._match(d),o.push(r);return this._match(u),{type:"Function",name:n,children:o};case v:var s=this.expression(0);return this._match(l),{type:"FilterProjection",children:[i,e=this._lookahead(0)===C?{type:"Identity"}:this._parseProjectionRHS(V.Filter),s]};case C:return{type:"Projection",children:[{type:C,children:[i]},this._parseProjectionRHS(V.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(i,t);case w:return(s=this._lookaheadToken(0)).type===p||s.type===f?(e=this._parseIndexExpression(),this._projectIfSlice(i,e)):(this._match(A),this._match(l),{type:"Projection",children:[i,e=this._parseProjectionRHS(V.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(t){if(this._lookahead(0)!==t){var i=this._lookaheadToken(0);throw(i=new Error("Expected "+t+", got: "+i.type)).name="ParserError",i}this._advance()},_errorToken:function(t){throw(t=new Error("Invalid token ("+t.type+'): "'+t.value+'"')).name="ParserError",t},_parseIndexExpression:function(){if(this._lookahead(0)===f||this._lookahead(1)===f)return this._parseSliceExpression();var t={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(l),t},_projectIfSlice:function(t,i){return t={type:"IndexExpression",children:[t,i]},"Slice"===i.type?{type:"Projection",children:[t,this._parseProjectionRHS(V.Star)]}:t},_parseSliceExpression:function(){for(var t=[null,null,null],i=0,e=this._lookahead(0);e!==l&&i<3;){if(e===f)i++,this._advance();else{if(e!==p){var n=this._lookahead(0);throw(n=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")")).name="Parsererror",n}t[i]=this._lookaheadToken(0).value,this._advance()}e=this._lookahead(0)}return this._match(l),{type:"Slice",children:t}},_parseComparator:function(t,i){return{type:"Comparator",name:i,children:[t,this.expression(V[i])]}},_parseDotRHS:function(t){var i=this._lookahead(0);return 0<=[h,c,A].indexOf(i)?this.expression(t):i===w?(this._match(w),this._parseMultiselectList()):i===y?(this._match(y),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(t){var i;if(V[this._lookahead(0)]<10)i={type:"Identity"};else if(this._lookahead(0)===w)i=this.expression(t);else if(this._lookahead(0)===v)i=this.expression(t);else{if("Dot"!==this._lookahead(0)){var e=this._lookaheadToken(0);throw(e=new Error("Sytanx error, unexpected token: "+e.value+"("+e.type+")")).name="ParserError",e}this._match("Dot"),i=this._parseDotRHS(t)}return i},_parseMultiselectList:function(){for(var t=[];this._lookahead(0)!==l;){var i=this.expression(0);if(t.push(i),this._lookahead(0)===d&&(this._match(d),this._lookahead(0)===l))throw new Error("Unexpected token Rbracket")}return this._match(l),{type:"MultiSelectList",children:t}},_parseMultiselectHash:function(){for(var t,i,e=[],n=[h,c];;){if(i=this._lookaheadToken(0),n.indexOf(i.type)<0)throw new Error("Expecting an identifier token, got: "+i.type);if(t=i.value,this._advance(),this._match(f),i=this.expression(0),e.push({type:"KeyValuePair",name:t,value:i}),this._lookahead(0)===d)this._match(d);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:e}}},K.prototype={search:function(t,i){return this.visit(t,i)},visit:function(t,o){var s,a,h,c,l;switch(t.type){case"Field":return null!==o&&e(o)&&void 0!==(d=o[t.name])?d:null;case"Subexpression":for(p=this.visit(t.children[0],o),w=1;w<t.children.length;w++)if(null===(p=this.visit(t.children[1],p)))return null;return p;case"IndexExpression":return B=this.visit(t.children[0],o),this.visit(t.children[1],B);case"Index":return i(o)?void 0===(p=o[u=(u=t.value)<0?o.length+u:u])?null:p:null;case"Slice":if(!i(o))return null;var u,d=t.children.slice(0),f=(d=(u=this.computeSliceParams(o.length,d))[0],u[1]),g=u[2],p=[];if(0<g)for(w=d;w<f;w+=g)p.push(o[w]);else for(w=d;f<w;w+=g)p.push(o[w]);return p;case"Projection":var A=this.visit(t.children[0],o);if(!i(A))return null;for(v=[],w=0;w<A.length;w++)null!==(a=this.visit(t.children[1],A[w]))&&v.push(a);return v;case"ValueProjection":if(!e(A=this.visit(t.children[0],o)))return null;for(var v=[],y=function(t){for(var i=Object.keys(t),e=[],n=0;n<i.length;n++)e.push(t[i[n]]);return e}(A),w=0;w<y.length;w++)null!==(a=this.visit(t.children[1],y[w]))&&v.push(a);return v;case"FilterProjection":if(!i(A=this.visit(t.children[0],o)))return null;var x=[],k=[];for(w=0;w<A.length;w++)r(s=this.visit(t.children[2],A[w]))||x.push(A[w]);for(var j=0;j<x.length;j++)null!==(a=this.visit(t.children[1],x[j]))&&k.push(a);return k;case"Comparator":switch(h=this.visit(t.children[0],o),c=this.visit(t.children[1],o),t.name){case"EQ":p=n(h,c);break;case"NE":p=!n(h,c);break;case"GT":p=c<h;break;case"GTE":p=c<=h;break;case"LT":p=h<c;break;case"LTE":p=h<=c;break;default:throw new Error("Unknown comparator: "+t.name)}return p;case C:var S=this.visit(t.children[0],o);if(!i(S))return null;var Z=[];for(w=0;w<S.length;w++)i(a=S[w])?Z.push.apply(Z,a):Z.push(a);return Z;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(v=[],w=0;w<t.children.length;w++)v.push(this.visit(t.children[w],o));return v;case"MultiSelectHash":if(null===o)return null;for(v={},w=0;w<t.children.length;w++)v[(l=t.children[w]).name]=this.visit(l.value,o);return v;case"OrExpression":return r(s=this.visit(t.children[0],o))?this.visit(t.children[1],o):s;case"AndExpression":return!0===r(h=this.visit(t.children[0],o))?h:this.visit(t.children[1],o);case"NotExpression":return r(h=this.visit(t.children[0],o));case"Literal":return t.value;case b:return B=this.visit(t.children[0],o),this.visit(t.children[1],B);case m:return o;case"Function":var G=[];for(w=0;w<t.children.length;w++)G.push(this.visit(t.children[w],o));return this.runtime.callFunction(t.name,G);case"ExpressionReference":var B=t.children[0];return B.jmespathType=I,B;default:throw new Error("Unknown node type: "+t.type)}},computeSliceParams:function(t,i){var e=i[0],n=i[1],r=i[2];if(i=[null,null,null],null===r)r=1;else if(0===r){var o=new Error("Invalid slice, step cannot be 0");throw o.name="RuntimeError",o}return o=r<0,e=null===e?o?t-1:0:this.capSliceRange(t,e,r),n=null===n?o?-1:t:this.capSliceRange(t,n,r),i[0]=e,i[1]=n,i[2]=r,i},capSliceRange:function(t,i,e){return i<0?(i+=t)<0&&(i=e<0?-1:0):t<=i&&(i=e<0?t-1:t),i}},T.prototype={callFunction:function(t,i){var e=this.functionTable[t];if(void 0===e)throw new Error("Unknown function: "+t+"()");return this._validateArgs(t,i,e._signature),e._func.call(this,i)},_validateArgs:function(t,i,e){var n;if(e[e.length-1].variadic){if(i.length<e.length)throw n=1===e.length?" argument":" arguments",new Error("ArgumentError: "+t+"() takes at least"+e.length+n+" but received "+i.length)}else if(i.length!==e.length)throw n=1===e.length?" argument":" arguments",new Error("ArgumentError: "+t+"() takes "+e.length+n+" but received "+i.length);for(var r=0;r<e.length;r++){for(var o=!1,s=e[r].types,a=this._getTypeName(i[r]),h=0;h<s.length;h++)if(this._typeMatches(a,s[h],i[r])){o=!0;break}if(!o)throw new Error("TypeError: "+t+"() expected argument "+(r+1)+" to be type "+s+" but received type "+a+" instead.")}},_typeMatches:function(t,i,e){if(1===i)return!0;if(9!==i&&8!==i&&3!==i)return t===i;if(3===i)return 3===t;if(3===t){var n;8===i?n=s:9===i&&(n=a);for(var r=0;r<e.length;r++)if(!this._typeMatches(this._getTypeName(e[r]),n,e[r]))return!1;return!0}},_getTypeName:function(t){switch(Object.prototype.toString.call(t)){case"[object String]":return a;case"[object Number]":return s;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return t.jmespathType===I?6:4}},_functionStartsWith:function(t){return 0===t[0].lastIndexOf(t[1])},_functionEndsWith:function(t){var i=t[0];return-1!==i.indexOf(t=t[1],i.length-t.length)},_functionReverse:function(t){if(this._getTypeName(t[0])===a){for(var i=t[0],e="",n=i.length-1;0<=n;n--)e+=i[n];return e}return(t=t[0].slice(0)).reverse(),t},_functionAbs:function(t){return Math.abs(t[0])},_functionCeil:function(t){return Math.ceil(t[0])},_functionAvg:function(t){for(var i=0,e=t[0],n=0;n<e.length;n++)i+=e[n];return i/e.length},_functionContains:function(t){return 0<=t[0].indexOf(t[1])},_functionFloor:function(t){return Math.floor(t[0])},_functionLength:function(t){return(e(t[0])?Object.keys(t[0]):t[0]).length},_functionMap:function(t){for(var i=[],e=this._interpreter,n=t[0],r=t[1],o=0;o<r.length;o++)i.push(e.visit(n,r[o]));return i},_functionMerge:function(t){for(var i={},e=0;e<t.length;e++){var n,r=t[e];for(n in r)i[n]=r[n]}return i},_functionMax:function(t){if(0<t[0].length){if(this._getTypeName(t[0][0])===s)return Math.max.apply(Math,t[0]);for(var i=t[0],e=i[0],n=1;n<i.length;n++)e.localeCompare(i[n])<0&&(e=i[n]);return e}return null},_functionMin:function(t){if(0<t[0].length){if(this._getTypeName(t[0][0])===s)return Math.min.apply(Math,t[0]);for(var i=t[0],e=i[0],n=1;n<i.length;n++)i[n].localeCompare(e)<0&&(e=i[n]);return e}return null},_functionSum:function(t){for(var i=0,e=t[0],n=0;n<e.length;n++)i+=e[n];return i},_functionType:function(t){switch(this._getTypeName(t[0])){case s:return"number";case a:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(t){return Object.keys(t[0])},_functionValues:function(t){for(var i=t[0],e=Object.keys(i),n=[],r=0;r<e.length;r++)n.push(i[e[r]]);return n},_functionJoin:function(t){return t[1].join(t[0])},_functionToArray:function(t){return 3===this._getTypeName(t[0])?t[0]:[t[0]]},_functionToString:function(t){return this._getTypeName(t[0])===a?t[0]:JSON.stringify(t[0])},_functionToNumber:function(t){var i,e=this._getTypeName(t[0]);return e===s?t[0]:e!==a||(i=+t[0],isNaN(i))?null:i},_functionNotNull:function(t){for(var i=0;i<t.length;i++)if(7!==this._getTypeName(t[i]))return t[i];return null},_functionSort:function(t){return(t=t[0].slice(0)).sort(),t},_functionSortBy:function(t){var i=t[0].slice(0);if(0===i.length)return i;var e=this._interpreter,n=t[1],r=this._getTypeName(e.visit(n,i[0]));if([s,a].indexOf(r)<0)throw new Error("TypeError");for(var o=this,h=[],c=0;c<i.length;c++)h.push([c,i[c]]);h.sort((function(t,i){var s=e.visit(n,t[1]),a=e.visit(n,i[1]);if(o._getTypeName(s)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(s));if(o._getTypeName(a)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(a));return a<s?1:s<a?-1:t[0]-i[0]}));for(var l=0;l<h.length;l++)i[l]=h[l][1];return i},_functionMaxBy:function(t){for(var i,e,n=t[0],r=this.createKeyFunction(t[1],[s,a]),o=-1/0,h=0;h<n.length;h++)o<(e=r(n[h]))&&(o=e,i=n[h]);return i},_functionMinBy:function(t){for(var i,e,n=t[0],r=this.createKeyFunction(t[1],[s,a]),o=1/0,h=0;h<n.length;h++)(e=r(n[h]))<o&&(o=e,i=n[h]);return i},createKeyFunction:function(t,i){var e=this,n=this._interpreter;return function(r){var o=n.visit(t,r);if(i.indexOf(e._getTypeName(o))<0)throw r="TypeError: expected one of "+i+", received "+e._getTypeName(o),new Error(r);return o}}},t.tokenize=function(t){return(new B).tokenize(t)},t.compile=function(t){return(new W).parse(t)},t.search=function(t,i){var e=new W,n=new T,r=new K(n);return n._interpreter=r,i=e.parse(i),r.search(i,t)},t.strictDeepEqual=n}(i)},500:function(t){var i=t.exports=function(t,n,r){"function"==typeof n&&(r=n,n={}),function t(n,r,o,s,a,h,c,l,u,d){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var f in r(s,a,h,c,l,u,d),s){var g=s[f];if(Array.isArray(g)){if(f in i.arrayKeywords)for(var p=0;p<g.length;p++)t(n,r,o,g[p],a+"/"+f+"/"+p,h,a,f,s,p)}else if(f in i.propsKeywords){if(g&&"object"==typeof g)for(var m in g)t(n,r,o,g[m],a+"/"+f+"/"+e(m),h,a,f,s,m)}else(f in i.keywords||n.allKeys&&!(f in i.skipKeywords))&&t(n,r,o,g,a+"/"+f,h,a,f,s)}o(s,a,h,c,l,u,d)}}(n,"function"==typeof(r=n.cb||r)?r:r.pre||function(){},r.post||function(){},t,"",t)};function e(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}i.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},i.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},i.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},i.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}},7026:function(t,i){var e={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},n="a".charCodeAt();i.parse=function(t,i,r){var o={},s=0,a=0,h=0,c=r&&r.bigint&&"undefined"!=typeof BigInt;return{data:function i(e,n){var r;l(),I(e,"value");var o=f();switch(o){case"t":d("rue"),r=!0;break;case"f":d("alse"),r=!1;break;case"n":d("ull"),r=null;break;case'"':r=u();break;case"[":r=function(t){l();var e=[],n=0;if("]"==f())return e;for(g();;){var r=t+"/"+n;if(e.push(i(r)),l(),"]"==(r=f()))break;","!=r&&v(),l(),n++}return e}(e);break;case"{":r=function(t){l();var e={};if("}"==f())return e;for(g();;){var n=C();'"'!=f()&&v();var r=u(),o=t+"/"+p(r);if(b(o,"key",n),I(o,"keyEnd"),l(),":"!=f()&&v(),l(),e[r]=i(o),l(),"}"==(o=f()))break;","!=o&&v(),l()}return e}(e);break;default:g(),0<="-0123456789".indexOf(o)?r=function(){var i="",e=!0;"-"==t[h]&&(i+=f()),i+=("0"==t[h]?f:m)(),"."==t[h]&&(i+=f()+m(),e=!1),"e"!=t[h]&&"E"!=t[h]||(i+=f(),"+"!=t[h]&&"-"!=t[h]||(i+=f()),i+=m(),e=!1);var n=+i;return c&&e&&(n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)?BigInt(i):n}():A()}return I(e,"valueEnd"),l(),n&&h<t.length&&A(),r}("",!0),pointers:o};function l(){t:for(;h<t.length;){switch(t[h]){case" ":a++;break;case"\t":a+=4;break;case"\r":a=0;break;case"\n":a=0,s++;break;default:break t}h++}}function u(){for(var t,i="";'"'!=(t=f());)"\\"==t?(t=f())in e?i+=e[t]:"u"==t?i+=function(){for(var t=4,i=0;t--;){i<<=4;var e=f().toLowerCase();"a"<=e&&e<="f"?i+=e.charCodeAt()-n+10:"0"<=e&&e<="9"?i+=+e:v()}return String.fromCharCode(i)}():v():i+=t;return i}function d(t){for(var i=0;i<t.length;i++)f()!==t[i]&&v()}function f(){y();var i=t[h];return h++,a++,i}function g(){h--,a--}function m(){for(var i="";"0"<=t[h]&&t[h]<="9";)i+=f();if(i.length)return i;y(),A()}function I(t,i){b(t,i,C())}function b(t,i,e){o[t]=o[t]||{},o[t][i]=e}function C(){return{line:s,column:a,pos:h}}function A(){throw new SyntaxError("Unexpected token "+t[h]+" in JSON at position "+h)}function v(){g(),A()}function y(){if(h>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},i.stringify=function(t,i,e){if(o(t)){var n=0;switch(typeof(s="object"==typeof e?e.space:e)){case"number":var r=10<s?10:s<0?0:Math.floor(s),s=r&&v(r," "),a=r,h=r;break;case"string":s=s.slice(0,10);for(var c=h=a=0;c<s.length;c++){switch(s[c]){case" ":h++;break;case"\t":h+=4;break;case"\r":h=0;break;case"\n":h=0,n++;break;default:throw new Error("whitespace characters not allowed in JSON")}a++}break;default:s=void 0}var l="",u={},f=0,g=0,m=0,I=e&&e.es6&&"function"==typeof Map;return function t(i,e,n){switch(A(n,"value"),typeof i){case"number":case"bigint":case"boolean":b(""+i);break;case"string":b(d(i));break;case"object":null===i?b("null"):"function"==typeof i.toJSON?b(d(i.toJSON())):Array.isArray(i)?r():I?i.constructor.BYTES_PER_ELEMENT?r():i instanceof Map?h():i instanceof Set?h(!0):a():a()}function r(){if(i.length){b("[");for(var r=e+1,s=0;s<i.length;s++){s&&b(","),C(r);var a=o(i[s])?i[s]:null;t(a,r,n+"/"+s)}C(e),b("]")}else b("[]")}function a(){var r=Object.keys(i);if(r.length){b("{");for(var a=e+1,h=0;h<r.length;h++){var c,l=r[h],u=i[l];o(u)&&(h&&b(","),c=n+"/"+p(l),C(a),A(c,"key"),b(d(l)),A(c,"keyEnd"),b(":"),s&&b(" "),t(u,a,c))}C(e),b("}")}else b("{}")}function h(r){if(i.size){b("{");for(var a=e+1,h=!0,c=i.entries(),l=c.next();!l.done;){var u=l.value,f=u[0],g=!!r||u[1];o(g)&&(h||b(","),h=!1,u=n+"/"+p(f),C(a),A(u,"key"),b(d(f)),A(u,"keyEnd"),b(":"),s&&b(" "),t(g,a,u)),l=c.next()}C(e),b("}")}else b("{}")}A(n,"valueEnd")}(t,0,""),{json:l,pointers:u}}function b(t){g+=t.length,m+=t.length,l+=t}function C(t){if(s){for(l+="\n"+v(t,s),f++,g=0;t--;)n?(f+=n,g=h):g+=h,m+=a;m+=1}}function A(t,i){u[t]=u[t]||{},u[t][i]={line:f,column:g,pos:m}}function v(t,i){return Array(t+1).join(i)}};var r=["number","bigint","boolean","string","object"];function o(t){return 0<=r.indexOf(typeof t)}var s=/"|\\/g,a=/[\b]/g,h=/\f/g,c=/\n/g,l=/\r/g,u=/\t/g;function d(t){return'"'+(t=t.replace(s,"\\$&").replace(h,"\\f").replace(a,"\\b").replace(c,"\\n").replace(l,"\\r").replace(u,"\\t"))+'"'}var f=/~/g,g=/\//g;function p(t){return t.replace(f,"~0").replace(g,"~1")}},5755:function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),((i.default=function t(i,e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.message=i+" (char "+e+")",this.char=e,this.stack=(new Error).stack}).prototype=new Error).constructor=Error},8909:function(t,i,e){t.exports=e(8107).default},8107:function(t,i,e){i.default=function(t){f="",g=0,p=(d=t).charAt(0),m="",I=s,v();var i=I;if(x(),y(),""===m)return f;if(i===I&&A()){for(var e="";i===I&&A();)e+=f=(0,o.insertBeforeLastWhitespace)(f,","),f="",x(),y();return"[\n".concat(e).concat(f,"\n]")}throw new r.default("Unexpected characters",g-m.length)};var n,r=(n=e(5755))&&n.__esModule?n:{default:n},o=e(1536),s=6,a={"":!0,"{":!0,"}":!0,"[":!0,"]":!0,":":!0,",":!0,"(":!0,")":!0,";":!0,"+":!0},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},c={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},l={null:"null",true:"true",false:"false"},u={None:"null",True:"true",False:"false"},d="",f="",g=0,p="",m="",I=s;function b(){g++,p=d.charAt(g)}function C(){b(),"\\"===p&&b()}function A(){return 0===I&&("["===m||"{"===m)||2===I||1===I||3===I}function v(){f+=m,I=s,m="",a[p]?(I=0,m=p,b()):function(){if((0,o.isDigit)(p)||"-"===p){if(I=1,"-"===p){if(m+=p,b(),!(0,o.isDigit)(p))throw new r.default("Invalid number, digit expected",g)}else"0"===p&&(m+=p,b());for(;(0,o.isDigit)(p);)m+=p,b();if("."===p){if(m+=p,b(),!(0,o.isDigit)(p))throw new r.default("Invalid number, digit expected",g);for(;(0,o.isDigit)(p);)m+=p,b()}if("e"===p||"E"===p){if(m+=p,b(),"+"!==p&&"-"!==p||(m+=p,b()),!(0,o.isDigit)(p))throw new r.default("Invalid number, digit expected",g);for(;(0,o.isDigit)(p);)m+=p,b()}}else"\\"===p&&'"'===d.charAt(g+1)?(b(),w(C)):w(b)}(),4===I&&(m=(0,o.normalizeWhitespace)(m),v()),5===I&&(I=s,m="",v())}function y(){","===m&&(m="",I=s,v())}function w(t){if((0,o.isQuote)(p)){var i=(0,o.normalizeQuote)(p),e=(0,o.isSingleQuote)(p)?o.isSingleQuote:o.isDoubleQuote;for(m+='"',I=2,t();""!==p&&!e(p);)if("\\"===p)if(t(),void 0!==h[p])m+="\\"+p,t();else if("u"===p){m+="\\u",t();for(var n=0;n<4;n++){if(!(0,o.isHex)(p))throw new r.default("Invalid unicode character",g-m.length);m+=p,t()}}else{if("'"!==p)throw new r.default('Invalid escape character "\\'+p+'"',g);m+="'",t()}else m+=c[p]?c[p]:'"'===p?'\\"':p,t();if((0,o.normalizeQuote)(p)!==i)throw new r.default("End of string expected",g-m.length);return m+='"',void t()}!function(){if((0,o.isAlpha)(p))for(I=3;(0,o.isAlpha)(p)||(0,o.isDigit)(p)||"$"===p;)m+=p,b();else!function(){if((0,o.isWhitespace)(p)||(0,o.isSpecialWhitespace)(p))for(I=4;(0,o.isWhitespace)(p)||(0,o.isSpecialWhitespace)(p);)m+=p,b();else!function(){if("/"!==p||"*"!==d[g+1])if("/"!==p||"/"!==d[g+1])!function(){for(I=s;""!==p;)m+=p,b();throw new r.default('Syntax error in part "'+m+'"',g-m.length)}();else for(I=5;""!==p&&"\n"!==p;)m+=p,b();else{for(I=5;""!==p&&("*"!==p||"*"===p&&"/"!==d[g+1]);)m+=p,b();"*"===p&&"/"===d[g+1]&&(m+=p,b(),m+=p,b())}}()}()}()}function x(){if(0!==I||"{"!==m)!function(){if(0!==I||"["!==m)!function(){if(2!==I)(1!==I?function(){if(3!==I)!function(){throw new r.default(""===m?"Unexpected end of json string":"Value expected",g-m.length)}();else if(l[m])v();else{if(u[m])return m=u[m],v();var t=m,i=f.length;if(m="",v(),0===I&&"("===m)return m="",v(),x(),0===I&&")"===m&&(m="",v(),0===I&&";"===m&&(m="",v()));for(f=(0,o.insertAtIndex)(f,'"'.concat(t),i);3===I||1===I;)v();f+='"'}}:v)();else for(v();0===I&&"+"===m;){var t;m="",v(),2===I&&(t=f.lastIndexOf('"'),f=f.substring(0,t)+m.substring(1),m="",v())}}();else if(v(),0!==I||"]"!==m){for(;;)if(x(),0===I&&","===m){if(v(),0===I&&"]"===m){f=(0,o.stripLastOccurrence)(f,",");break}if(""===m){f=(0,o.stripLastOccurrence)(f,",");break}}else{if(!A())break;f=(0,o.insertBeforeLastWhitespace)(f,",")}0===I&&"]"===m?v():f=(0,o.insertBeforeLastWhitespace)(f,"]")}else v()}();else if(v(),0!==I||"}"!==m){for(;;){if(3!==I&&1!==I||(I=2,m='"'.concat(m,'"')),2!==I)throw new r.default("Object key expected",g-m.length);if(v(),0===I&&":"===m)v();else{if(!A())throw new r.default("Colon expected",g-m.length);f=(0,o.insertBeforeLastWhitespace)(f,":")}if(x(),0===I&&","===m){if(v(),0===I&&"}"===m){f=(0,o.stripLastOccurrence)(f,",");break}if(""===m){f=(0,o.stripLastOccurrence)(f,",");break}}else{if(2!==I&&1!==I&&3!==I)break;f=(0,o.insertBeforeLastWhitespace)(f,",")}}0===I&&"}"===m?v():f=(0,o.insertBeforeLastWhitespace)(f,"}")}else v()}},1536:function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isAlpha=function(t){return r.test(t)},i.isHex=function(t){return o.test(t)},i.isDigit=function(t){return s.test(t)},i.isWhitespace=a,i.isSpecialWhitespace=h,i.normalizeWhitespace=function(t){for(var i="",e=0;e<t.length;e++){var n=t[e];i+=h(n)?" ":n}return i},i.isQuote=function(t){return!0===e[t]||!0===n[t]},i.isSingleQuote=function(t){return!0===e[t]},i.isDoubleQuote=function(t){return!0===n[t]},i.normalizeQuote=function(t){return!0!==e[t]?!0!==n[t]?t:'"':"'"},i.stripLastOccurrence=function(t,i){return-1!==(i=t.lastIndexOf(i))?t.substring(0,i)+t.substring(i+1):t},i.insertBeforeLastWhitespace=function(t,i){var e=t.length;if(!a(t[e-1]))return t+i;for(;a(t[e-1]);)e--;return t.substring(0,e)+i+t.substring(e)},i.insertAtIndex=function(t,i,e){return t.substring(0,e)+i+t.substring(e)};var e={"'":!0,"‘":!0,"’":!0,"`":!0,"´":!0},n={'"':!0,"“":!0,"”":!0},r=/^[a-zA-Z_]$/,o=/^[0-9a-fA-F]$/,s=/^[0-9]$/;function a(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function h(t){return" "===t||" "<=t&&t<=" "||" "===t||" "===t||" "===t}},483:function(t,i){var e;void 0===(e="function"==typeof(e=function(){function t(t){return"object"==typeof Node?t instanceof Node:t&&"object"==typeof t&&"number"==typeof t.nodeType}function i(){var t=[];return{watch:t.push.bind(t),trigger:function(i,e){for(var n=!0,r={detail:e,preventDefault:function(){n=!1}},o=0;o<t.length;o++)t[o](i,r);return n}}}function e(t){return"none"===window.getComputedStyle(t).display}function n(t){this.elem=t}function r(t,i){return n.make(t("parent")).clazz("pico-overlay").clazz(t("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(t("overlayStyles",{opacity:.5,background:"#000"})).onClick((function(){t("overlayClose",!0)&&i()}))}n.make=function(t,i){"string"==typeof t&&(t=document.querySelector(t));var e=document.createElement(i||"div");return(t||document.body).appendChild(e),new n(e)},n.prototype={child:function(t){return n.make(this.elem,t)},stylize:function(t){for(var i in void 0!==(t=t||{}).opacity&&(t.filter="alpha(opacity="+100*t.opacity+")"),t)t.hasOwnProperty(i)&&(this.elem.style[i]=t[i]);return this},clazz:function(t){return this.elem.className+=" "+t,this},html:function(i){return t(i)?this.elem.appendChild(i):this.elem.innerHTML=i,this},onClick:function(t){return this.elem.addEventListener("click",t),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(t,i){return void 0!==i&&this.elem.setAttribute(t,i),this},anyAncestor:function(t){for(var i=this.elem;i;){if(t(new n(i)))return!0;i=i.parentNode}return!1},isVisible:function(){return!e(this.elem)}};var o=1;function s(t,i){var e=t("width","auto");"number"==typeof e&&(e+="px");var r=t("modalId","pico-"+o++);return n.make(t("parent")).clazz("pico-content").clazz(t("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:e,"-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(t("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(t("content")).attr("id",r).attr("role","dialog").attr("aria-labelledby",t("ariaLabelledBy")).attr("aria-describedby",t("ariaDescribedBy",r)).onClick((function(t){new n(t.target).anyAncestor((function(t){return/\bpico-close\b/.test(t.elem.className)}))&&i()}))}function a(t,i){if(i("closeButton",!0))return t.child("button").html(i("closeHtml","&#xD7;")).clazz("pico-close").clazz(i("closeClass","")).stylize(i("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",i("close-label","Close"))}function h(t){return function(){return t().elem}}var c=i(),l=i();function u(t,i){function n(t,i){return(t.msMatchesSelector||t.webkitMatchesSelector||t.matches).call(t,i)}function r(t){return!(e(t)||n(t,":disabled")||t.hasAttribute("contenteditable"))&&(t.hasAttribute("tabindex")||n(t,"input,select,textarea,button,a[href],area[href],iframe"))}function o(t){for(var i=t.getElementsByTagName("*"),e=0;e<i.length;e++)if(r(i[e]))return i[e]}function s(t){for(var i=t.getElementsByTagName("*"),e=i.length;e--;)if(r(i[e]))return i[e]}var a;t.beforeShow((function(){a=document.activeElement})),t.afterShow((function(){if(i()){var e=o(t.modalElem());e&&e.focus()}})),t.afterClose((function(){i()&&a&&a.focus(),a=null})),l.watch((function(e){if(i()&&t.isVisible()){var n=o(t.modalElem()),r=s(t.modalElem());(e.shiftKey?n:r)===document.activeElement&&((e.shiftKey?r:n).focus(),e.preventDefault())}}))}function d(t,i){var e,r=new n(document.body);t.beforeShow((function(){e=r.elem.style.overflow,i()&&r.stylize({overflow:"hidden"})})),t.afterClose((function(){r.stylize({overflow:e})}))}return document.documentElement.addEventListener("keydown",(function(t){var i=t.which||t.keyCode;27===i?c.trigger():9===i&&l.trigger(t)})),function(e){(function(t){return"string"==typeof t}(e)||t(e))&&(e={content:e});var n=i(),o=i(),l=i(),f=i(),g=i();function p(t,i){var n=e[t];return"function"==typeof n&&(n=n(i)),void 0===n?i:n}var m,I,b=x.bind(window,"modal"),C=x.bind(window,"overlay"),A=x.bind(window,"close");function v(t){C().hide(),b().hide(),g.trigger(m,t)}function y(t){f.trigger(m,t)&&v(t)}function w(t){return function(){return t.apply(this,arguments),m}}function x(t,i){if(!I){var e=s(p,y);I={modal:e,overlay:r(p,y),close:a(e,p)},n.trigger(m,i)}return I[t]}return u(m={modalElem:h(b),closeElem:h(A),overlayElem:h(C),buildDom:w(x.bind(null,null)),isVisible:function(){return!!(I&&b&&b().isVisible())},show:function(t){return o.trigger(m,t)&&(C().show(),A(),b().show(),l.trigger(m,t)),this},close:w(y),forceClose:w(v),destroy:function(){b().destroy(),C().destroy(),C=b=A=void 0},options:function(t){Object.keys(t).map((function(i){e[i]=t[i]}))},afterCreate:w(n.watch),beforeShow:w(o.watch),afterShow:w(l.watch),beforeClose:w(f.watch),afterClose:w(g.watch)},p.bind(null,"focus",!0)),d(m,p.bind(null,"bodyOverflow",!0)),c.watch((function(){p("escCloses",!0)&&m.isVisible()&&m.close()})),m}})?e.apply(i,[]):e)||(t.exports=e)},7533:function(t,i){
39
39
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
40
- !function(t){function i(){for(var t=arguments.length,i=Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length>1){i[0]=i[0].slice(0,-1);for(var n=i.length-1,r=1;r<n;++r)i[r]=i[r].slice(1,-1);return i[n]=i[n].slice(1),i.join("")}return i[0]}function e(t){return"(?:"+t+")"}function n(t){return void 0===t?"undefined":null===t?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function r(t){return t.toUpperCase()}function o(t){var n="[A-Za-z]",r="[0-9]",o=i(r,"[A-Fa-f]"),s=e(e("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+e("%[89A-Fa-f]"+o+"%"+o+o)+"|"+e("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",h=i("[\\:\\/\\?\\#\\[\\]\\@]",a),c=t?"[\\uE000-\\uF8FF]":"[]",l=i(n,r,"[\\-\\.\\_\\~]",t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");e(n+i(n,r,"[\\+\\-\\.]")+"*"),e(e(s+"|"+i(l,a,"[\\:]"))+"*");var u=e(e("25[0-5]")+"|"+e("2[0-4]"+r)+"|"+e("1"+r+r)+"|"+e("0?[1-9]"+r)+"|0?0?"+r),d=e(u+"\\."+u+"\\."+u+"\\."+u),f=e(o+"{1,4}"),g=e(e(f+"\\:"+f)+"|"+d),p=e(e(f+"\\:")+"{6}"+g),m=e("\\:\\:"+e(f+"\\:")+"{5}"+g),I=e(e(f)+"?\\:\\:"+e(f+"\\:")+"{4}"+g),b=e(e(e(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+e(f+"\\:")+"{3}"+g),C=e(e(e(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+e(f+"\\:")+"{2}"+g),A=e(e(e(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+g),v=e(e(e(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+g),y=e(e(e(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),w=e(e(e(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),x=e([p,m,I,b,C,A,v,y,w].join("|")),k=e(e(l+"|"+s)+"+");e("[vV]"+o+"+\\."+i(l,a,"[\\:]")+"+"),e(e(s+"|"+i(l,a))+"*");var j=e(s+"|"+i(l,a,"[\\:\\@]"));return e(e(s+"|"+i(l,a,"[\\@]"))+"+"),e(e(j+"|"+i("[\\/\\?]",c))+"*"),{NOT_SCHEME:new RegExp(i("[^]",n,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(i("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(i("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(i("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(i("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(i("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(i("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(i("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(i("[^\\%]",l,h),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+e(e("\\%25|\\%(?!"+o+"{2})")+"("+k+")")+"?\\]?$")}}var s=o(!1),a=o(!0),h=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(e.push(s.value),!i||e.length!==i);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,u=/^xn--/,d=/[^\0-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function I(t){throw new RangeError(g[t])}function b(t,i){var e=t.split("@"),n="";return e.length>1&&(n=e[0]+"@",t=e[1]),n+function(t,i){for(var e=[],n=t.length;n--;)e[n]=i(t[n]);return e}((t=t.replace(f,".")).split("."),i).join(".")}function C(t){for(var i=[],e=0,n=t.length;e<n;){var r=t.charCodeAt(e++);if(r>=55296&&r<=56319&&e<n){var o=t.charCodeAt(e++);56320==(64512&o)?i.push(((1023&r)<<10)+(1023&o)+65536):(i.push(r),e--)}else i.push(r)}return i}var A=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l},v=function(t,i){return t+22+75*(t<26)-((0!=i)<<5)},y=function(t,i,e){var n=0;for(t=e?p(t/700):t>>1,t+=p(t/i);t>455;n+=l)t=p(t/35);return p(n+36*t/(t+38))},w=function(t){var i=[],e=t.length,n=0,r=128,o=72,s=t.lastIndexOf("-");s<0&&(s=0);for(var a=0;a<s;++a)t.charCodeAt(a)>=128&&I("not-basic"),i.push(t.charCodeAt(a));for(var h=s>0?s+1:0;h<e;){for(var u=n,d=1,f=l;;f+=l){h>=e&&I("invalid-input");var g=A(t.charCodeAt(h++));(g>=l||g>p((c-n)/d))&&I("overflow"),n+=g*d;var m=f<=o?1:f>=o+26?26:f-o;if(g<m)break;var b=l-m;d>p(c/b)&&I("overflow"),d*=b}var C=i.length+1;o=y(n-u,C,0==u),p(n/C)>c-r&&I("overflow"),r+=p(n/C),n%=C,i.splice(n++,0,r)}return String.fromCodePoint.apply(String,i)},x=function t(i){var e=[],n=(i=C(i)).length,r=128,o=0,s=72,a=!0,h=!1,u=void 0;try{for(var d,f=i[Symbol.iterator]();!(a=(d=f.next()).done);a=!0){var g=d.value;g<128&&e.push(m(g))}}catch(t){h=!0,u=t}finally{try{!a&&f.return&&f.return()}finally{if(h)throw u}}var b=e.length,A=b;for(b&&e.push("-");A<n;){var w=c,x=!0,k=!1,j=void 0;try{for(var S,Z=i[Symbol.iterator]();!(x=(S=Z.next()).done);x=!0){var G=S.value;G>=r&&G<w&&(w=G)}}catch(t){k=!0,j=t}finally{try{!x&&Z.return&&Z.return()}finally{if(k)throw j}}var B=A+1;w-r>p((c-o)/B)&&I("overflow"),o+=(w-r)*B,r=w;var V=!0,W=!1,K=void 0;try{for(var T,F=i[Symbol.iterator]();!(V=(T=F.next()).done);V=!0){var R=T.value;if(R<r&&++o>c&&I("overflow"),R==r){for(var H=o,E=l;;E+=l){var _=E<=s?1:E>=s+26?26:E-s;if(H<_)break;var N=H-_,X=l-_;e.push(m(v(_+N%X,0))),H=p(N/X)}e.push(m(v(H,0))),s=y(o,B,A==b),o=0,++A}}}catch(t){W=!0,K=t}finally{try{!V&&F.return&&F.return()}finally{if(W)throw K}}++o,++r}return e.join("")},k=function(t){return b(t,(function(t){return d.test(t)?"xn--"+x(t):t}))},j=function(t){return b(t,(function(t){return u.test(t)?w(t.slice(4).toLowerCase()):t}))},S={};function Z(t){var i=t.charCodeAt(0);return i<16?"%0"+i.toString(16).toUpperCase():i<128?"%"+i.toString(16).toUpperCase():i<2048?"%"+(i>>6|192).toString(16).toUpperCase()+"%"+(63&i|128).toString(16).toUpperCase():"%"+(i>>12|224).toString(16).toUpperCase()+"%"+(i>>6&63|128).toString(16).toUpperCase()+"%"+(63&i|128).toString(16).toUpperCase()}function G(t){for(var i="",e=0,n=t.length;e<n;){var r=parseInt(t.substr(e+1,2),16);if(r<128)i+=String.fromCharCode(r),e+=3;else if(r>=194&&r<224){if(n-e>=6){var o=parseInt(t.substr(e+4,2),16);i+=String.fromCharCode((31&r)<<6|63&o)}else i+=t.substr(e,6);e+=6}else if(r>=224){if(n-e>=9){var s=parseInt(t.substr(e+4,2),16),a=parseInt(t.substr(e+7,2),16);i+=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}else i+=t.substr(e,9);e+=9}else i+=t.substr(e,3),e+=3}return i}function B(t,i){function e(t){var e=G(t);return e.match(i.UNRESERVED)?e:t}return t.scheme&&(t.scheme=String(t.scheme).replace(i.PCT_ENCODED,e).toLowerCase().replace(i.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(i.PCT_ENCODED,e).replace(i.NOT_USERINFO,Z).replace(i.PCT_ENCODED,r)),void 0!==t.host&&(t.host=String(t.host).replace(i.PCT_ENCODED,e).toLowerCase().replace(i.NOT_HOST,Z).replace(i.PCT_ENCODED,r)),void 0!==t.path&&(t.path=String(t.path).replace(i.PCT_ENCODED,e).replace(t.scheme?i.NOT_PATH:i.NOT_PATH_NOSCHEME,Z).replace(i.PCT_ENCODED,r)),void 0!==t.query&&(t.query=String(t.query).replace(i.PCT_ENCODED,e).replace(i.NOT_QUERY,Z).replace(i.PCT_ENCODED,r)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(i.PCT_ENCODED,e).replace(i.NOT_FRAGMENT,Z).replace(i.PCT_ENCODED,r)),t}function V(t){return t.replace(/^0*(.*)/,"$1")||"0"}function W(t,i){var e=t.match(i.IPV4ADDRESS)||[],n=h(e,2)[1];return n?n.split(".").map(V).join("."):t}function K(t,i){var e=t.match(i.IPV6ADDRESS)||[],n=h(e,3),r=n[1],o=n[2];if(r){for(var s=r.toLowerCase().split("::").reverse(),a=h(s,2),c=a[0],l=a[1],u=l?l.split(":").map(V):[],d=c.split(":").map(V),f=i.IPV4ADDRESS.test(d[d.length-1]),g=f?7:8,p=d.length-g,m=Array(g),I=0;I<g;++I)m[I]=u[I]||d[p+I]||"";f&&(m[g-1]=W(m[g-1],i));var b=m.reduce((function(t,i,e){if(!i||"0"===i){var n=t[t.length-1];n&&n.index+n.length===e?n.length++:t.push({index:e,length:1})}return t}),[]).sort((function(t,i){return i.length-t.length}))[0],C=void 0;if(b&&b.length>1){var A=m.slice(0,b.index),v=m.slice(b.index+b.length);C=A.join(":")+"::"+v.join(":")}else C=m.join(":");return o&&(C+="%"+o),C}return t}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,F=void 0==="".match(/(){0}/)[1];function R(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e={},n=!1!==i.iri?a:s;"suffix"===i.reference&&(t=(i.scheme?i.scheme+":":"")+"//"+t);var r=t.match(T);if(r){F?(e.scheme=r[1],e.userinfo=r[3],e.host=r[4],e.port=parseInt(r[5],10),e.path=r[6]||"",e.query=r[7],e.fragment=r[8],isNaN(e.port)&&(e.port=r[5])):(e.scheme=r[1]||void 0,e.userinfo=-1!==t.indexOf("@")?r[3]:void 0,e.host=-1!==t.indexOf("//")?r[4]:void 0,e.port=parseInt(r[5],10),e.path=r[6]||"",e.query=-1!==t.indexOf("?")?r[7]:void 0,e.fragment=-1!==t.indexOf("#")?r[8]:void 0,isNaN(e.port)&&(e.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),e.host&&(e.host=K(W(e.host,n),n)),e.reference=void 0!==e.scheme||void 0!==e.userinfo||void 0!==e.host||void 0!==e.port||e.path||void 0!==e.query?void 0===e.scheme?"relative":void 0===e.fragment?"absolute":"uri":"same-document",i.reference&&"suffix"!==i.reference&&i.reference!==e.reference&&(e.error=e.error||"URI is not a "+i.reference+" reference.");var o=S[(i.scheme||e.scheme||"").toLowerCase()];if(i.unicodeSupport||o&&o.unicodeSupport)B(e,n);else{if(e.host&&(i.domainHost||o&&o.domainHost))try{e.host=k(e.host.replace(n.PCT_ENCODED,G).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to ASCII via punycode: "+t}B(e,s)}o&&o.parse&&o.parse(e,i)}else e.error=e.error||"URI can not be parsed.";return e}function H(t,i){var e=!1!==i.iri?a:s,n=[];return void 0!==t.userinfo&&(n.push(t.userinfo),n.push("@")),void 0!==t.host&&n.push(K(W(String(t.host),e),e).replace(e.IPV6ADDRESS,(function(t,i,e){return"["+i+(e?"%25"+e:"")+"]"}))),"number"!=typeof t.port&&"string"!=typeof t.port||(n.push(":"),n.push(String(t.port))),n.length?n.join(""):void 0}var E=/^\.\.?\//,_=/^\/\.(\/|$)/,N=/^\/\.\.(\/|$)/,X=/^\/?(?:.|\n)*?(?=\/|$)/;function z(t){for(var i=[];t.length;)if(t.match(E))t=t.replace(E,"");else if(t.match(_))t=t.replace(_,"/");else if(t.match(N))t=t.replace(N,"/"),i.pop();else if("."===t||".."===t)t="";else{var e=t.match(X);if(!e)throw new Error("Unexpected dot segment condition");var n=e[0];t=t.slice(n.length),i.push(n)}return i.join("")}function J(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=i.iri?a:s,n=[],r=S[(i.scheme||t.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(t,i),t.host)if(e.IPV6ADDRESS.test(t.host));else if(i.domainHost||r&&r.domainHost)try{t.host=i.iri?j(t.host):k(t.host.replace(e.PCT_ENCODED,G).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+e}B(t,e),"suffix"!==i.reference&&t.scheme&&(n.push(t.scheme),n.push(":"));var o=H(t,i);if(void 0!==o&&("suffix"!==i.reference&&n.push("//"),n.push(o),t.path&&"/"!==t.path.charAt(0)&&n.push("/")),void 0!==t.path){var h=t.path;i.absolutePath||r&&r.absolutePath||(h=z(h)),void 0===o&&(h=h.replace(/^\/\//,"/%2F")),n.push(h)}return void 0!==t.query&&(n.push("?"),n.push(t.query)),void 0!==t.fragment&&(n.push("#"),n.push(t.fragment)),n.join("")}function O(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(t=R(J(t,e),e),i=R(J(i,e),e)),!(e=e||{}).tolerant&&i.scheme?(n.scheme=i.scheme,n.userinfo=i.userinfo,n.host=i.host,n.port=i.port,n.path=z(i.path||""),n.query=i.query):(void 0!==i.userinfo||void 0!==i.host||void 0!==i.port?(n.userinfo=i.userinfo,n.host=i.host,n.port=i.port,n.path=z(i.path||""),n.query=i.query):(i.path?("/"===i.path.charAt(0)?n.path=z(i.path):(n.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+i.path:i.path:"/"+i.path,n.path=z(n.path)),n.query=i.query):(n.path=t.path,n.query=void 0!==i.query?i.query:t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=i.fragment,n}function Y(t,i){return t&&t.toString().replace(i&&i.iri?a.PCT_ENCODED:s.PCT_ENCODED,G)}var P={scheme:"http",domainHost:!0,parse:function(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function(t){var i="https"===String(t.scheme).toLowerCase();return t.port!==(i?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},L={scheme:"https",domainHost:P.domainHost,parse:P.parse,serialize:P.serialize};function M(t){return"boolean"==typeof t.secure?t.secure:"wss"===String(t.scheme).toLowerCase()}var D={scheme:"ws",domainHost:!0,parse:function(t){var i=t;return i.secure=M(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i},serialize:function(t){if(t.port!==(M(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){var i=t.resourceName.split("?"),e=h(i,2),n=e[0],r=e[1];t.path=n&&"/"!==n?n:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}},U={scheme:"wss",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize},Q={},$="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",q="[0-9A-Fa-f]",tt=e(e("%[EFef]"+q+"%"+q+q+"%"+q+q)+"|"+e("%[89A-Fa-f]"+q+"%"+q+q)+"|"+e("%"+q+q)),it=i("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),et=new RegExp($,"g"),nt=new RegExp(tt,"g"),rt=new RegExp(i("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',it),"g"),ot=new RegExp(i("[^]",$,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),st=ot;function at(t){var i=G(t);return i.match(et)?i:t}var ht={scheme:"mailto",parse:function t(i,e){var n=i,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,s={},a=n.query.split("&"),h=0,c=a.length;h<c;++h){var l=a[h].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),d=0,f=u.length;d<f;++d)r.push(u[d]);break;case"subject":n.subject=Y(l[1],e);break;case"body":n.body=Y(l[1],e);break;default:o=!0,s[Y(l[0],e)]=Y(l[1],e)}}o&&(n.headers=s)}n.query=void 0;for(var g=0,p=r.length;g<p;++g){var m=r[g].split("@");if(m[0]=Y(m[0]),e.unicodeSupport)m[1]=Y(m[1],e).toLowerCase();else try{m[1]=k(Y(m[1],e).toLowerCase())}catch(t){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}r[g]=m.join("@")}return n},serialize:function t(i,e){var n=i,o=function(t){return null!=t?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}(i.to);if(o){for(var s=0,a=o.length;s<a;++s){var h=String(o[s]),c=h.lastIndexOf("@"),l=h.slice(0,c).replace(nt,at).replace(nt,r).replace(rt,Z),u=h.slice(c+1);try{u=e.iri?j(u):k(Y(u,e).toLowerCase())}catch(t){n.error=n.error||"Email address's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+t}o[s]=l+"@"+u}n.path=o.join(",")}var d=i.headers=i.headers||{};i.subject&&(d.subject=i.subject),i.body&&(d.body=i.body);var f=[];for(var g in d)d[g]!==Q[g]&&f.push(g.replace(nt,at).replace(nt,r).replace(ot,Z)+"="+d[g].replace(nt,at).replace(nt,r).replace(st,Z));return f.length&&(n.query=f.join("&")),n}},ct=/^([^\:]+)\:(.*)/,lt={scheme:"urn",parse:function(t,i){var e=t.path&&t.path.match(ct),n=t;if(e){var r=i.scheme||n.scheme||"urn",o=e[1].toLowerCase(),s=e[2],a=S[r+":"+(i.nid||o)];n.nid=o,n.nss=s,n.path=void 0,a&&(n=a.parse(n,i))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(t,i){var e=t.nid,n=S[(i.scheme||t.scheme||"urn")+":"+(i.nid||e)];n&&(t=n.serialize(t,i));var r=t;return r.path=(e||i.nid)+":"+t.nss,r}},ut=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,dt={scheme:"urn:uuid",parse:function(t,i){var e=t;return e.uuid=e.nss,e.nss=void 0,i.tolerant||e.uuid&&e.uuid.match(ut)||(e.error=e.error||"UUID is not valid."),e},serialize:function(t){var i=t;return i.nss=(t.uuid||"").toLowerCase(),i}};S[P.scheme]=P,S[L.scheme]=L,S[D.scheme]=D,S[U.scheme]=U,S[ht.scheme]=ht,S[lt.scheme]=lt,S[dt.scheme]=dt,t.SCHEMES=S,t.pctEncChar=Z,t.pctDecChars=G,t.parse=R,t.removeDotSegments=z,t.serialize=J,t.resolveComponents=O,t.resolve=function(t,i,e){var n=function(t,i){var e=t;if(i)for(var n in i)e[n]=i[n];return e}({scheme:"null"},e);return J(O(R(t,n),R(i,n),n,!0),n)},t.normalize=function(t,i){return"string"==typeof t?t=J(R(t,i),i):"object"===n(t)&&(t=R(J(t,i),i)),t},t.equal=function(t,i,e){return"string"==typeof t?t=J(R(t,e),e):"object"===n(t)&&(t=J(t,e)),"string"==typeof i?i=J(R(i,e),e):"object"===n(i)&&(i=J(i,e)),t===i},t.escapeComponent=function(t,i){return t&&t.toString().replace(i&&i.iri?a.ESCAPE:s.ESCAPE,Z)},t.unescapeComponent=Y,Object.defineProperty(t,"__esModule",{value:!0})}(i)},4049:function(t){t.exports=function(){var t=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(i,e,n){return e&&t(i.prototype,e),n&&t(i,n),i}}(),e=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(e.push(s.value),!i||e.length!==i);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,i){for(var e=this;e.length<t;)e=i+e;return e};var n={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 r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(i>0?t.toFixed(i).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var o=function(){function o(i,n,r,s){t(this,o);var a=this;if(void 0===i);else if(Array.isArray(i))this.rgba=i;else if(void 0===r){var h=i&&""+i;h&&function(t){if(t.startsWith("hsl")){var i=t.match(/([\-\d\.e]+)/g).map(Number),n=e(i,4),r=n[0],s=n[1],h=n[2],c=n[3];void 0===c&&(c=1),a.hsla=[r/=360,s/=100,h/=100,c]}else if(t.startsWith("rgb")){var l=t.match(/([\-\d\.e]+)/g).map(Number),u=e(l,4),d=u[3];void 0===d&&(d=1),a.rgba=[u[0],u[1],u[2],d]}else a.rgba=t.startsWith("#")?o.hexToRgb(t):o.nameToRgb(t)||o.hexToRgb(t)}(h.toLowerCase())}else this.rgba=[i,n,r,void 0===s?1:s]}return i(o,[{key:"printRGB",value:function(t){var i=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,i){return r(t,3===i?3:0)}));return t?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(t){var i=[360,100,100,1],e=["","%","%",""],n=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,n){return r(t*i[n],3===n?3:1)+e[n]}));return t?"hsla("+n+")":"hsl("+n+")"}},{key:"printHex",value:function(t){var i=this.hex;return t?i:i.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(t){3===t.length&&(t[3]=1),this._rgba=t,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(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,i){return i<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(t){this.rgba=o.hexToRgb(t)}}],[{key:"hexToRgb",value:function(t){var i=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!i.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var e=i.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return e[3]=e[3]/255,e}},{key:"nameToRgb",value:function(t){var i=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),e=n[i];return void 0===e?e:o.hexToRgb(e.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var i=e(t,4),n=i[0],r=i[1],o=i[2],s=i[3];n/=255,r/=255,o/=255;var a=Math.max(n,r,o),h=Math.min(n,r,o),c=void 0,l=void 0,u=(a+h)/2;if(a===h)c=l=0;else{var d=a-h;switch(l=u>.5?d/(2-a-h):d/(a+h),a){case n:c=(r-o)/d+(r<o?6:0);break;case r:c=(o-n)/d+2;break;case o:c=(n-r)/d+4}c/=6}return[c,l,u,s]}},{key:"hslToRgb",value:function(t){var i=e(t,4),n=i[0],r=i[1],o=i[2],s=i[3],a=void 0,h=void 0,c=void 0;if(0===r)a=h=c=o;else{var l=function(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t},u=o<.5?o*(1+r):o+r-o*r,d=2*o-u;a=l(d,u,n+1/3),h=l(d,u,n),c=l(d,u,n-1/3)}var f=[255*a,255*h,255*c].map(Math.round);return f[3]=s,f}}]),o}(),s=function(){function e(){t(this,e),this._events=[]}return i(e,[{key:"add",value:function(t,i,e){t.addEventListener(i,e,!1),this._events.push({target:t,type:i,handler:e})}},{key:"remove",value:function(t,i,n){this._events=this._events.filter((function(r){var o=!0;return t&&t!==r.target&&(o=!1),i&&i!==r.type&&(o=!1),n&&n!==r.handler&&(o=!1),o&&e._doRemove(r.target,r.type,r.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(t){return e._doRemove(t.target,t.type,t.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,i,e){t.removeEventListener(i,e,!1)}}]),e}();function a(t,i,e){var n=!1;function r(t,i,e){return Math.max(i,Math.min(t,e))}function o(t,o,s){if(s&&(n=!0),n){t.preventDefault();var a=i.getBoundingClientRect(),h=a.width,c=a.height,l=o.clientY,u=r(o.clientX-a.left,0,h),d=r(l-a.top,0,c);e(u/h,d/c)}}function s(t,i){1===(void 0===t.buttons?t.which:t.buttons)?o(t,t,i):n=!1}function a(t,i){1===t.touches.length?o(t,t.touches[0],i):n=!1}t.add(i,"mousedown",(function(t){s(t,!0)})),t.add(i,"touchstart",(function(t){a(t,!0)})),t.add(window,"mousemove",s),t.add(i,"touchmove",a),t.add(window,"mouseup",(function(){n=!1})),t.add(i,"touchend",(function(){n=!1})),t.add(i,"touchcancel",(function(){n=!1}))}var h="keydown",c="mousedown",l="focusin";function u(t,i){return(i||document).querySelector(t)}function d(t){t.preventDefault(),t.stopPropagation()}function f(t,i,e,n,r){t.add(i,h,(function(t){e.indexOf(t.key)>=0&&(r&&d(t),n(t))}))}var g=document.createElement("style");return g.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:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:stretch;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;-webkit-box-ordinal-group:2;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{-webkit-box-ordinal-group:2;order:1;-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{-webkit-box-ordinal-group:2;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 dodgerblue}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:whitesmoke;background-image:-webkit-gradient(linear, left bottom, left top, from(gainsboro), to(transparent));background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:-webkit-gradient(linear, left bottom, left top, from(transparent), to(gainsboro));background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:white}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;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:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));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:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));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, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;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,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(g),function(){function e(i){t(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new s,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(i)}return i(e,[{key:"setOptions",value:function(t){var i=this;if(t){var e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(this._events.remove(e.parent),this._popupInited=!1),function(t,i,e){for(var n in t)e&&e.indexOf(n)>=0||(i[n]=t[n])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var n=t.color||t.colour;n&&this._setColor(n)}var r=e.parent;if(r&&e.popup&&!this._popupInited){var o=function(t){return i.openHandler(t)};this._events.add(r,"click",o),f(this._events,r,[" ","Spacebar","Enter"],o),this._popupInited=!0}else t.parent&&!e.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var i=t&&t.type===h?this._domEdit:this.domElement;setTimeout((function(){return i.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var i=t&&t.type,e=!1;t?i===c||i===l?t.timeStamp>(this.__containedEvent||0)+100&&(e=!0):(d(t),e=!0):e=!0,e&&this.hide()&&(this.settings.parent.style.pointerEvents="",i!==c&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,i){this.closeHandler(),this.setOptions(t),i&&this.openHandler()}},{key:"setColor",value:function(t,i){this._setColor(t,{silent:i})}},{key:"_setColor",value:function t(i,e){if("string"==typeof i&&(i=i.trim()),i){e=e||{};var n=void 0;try{n=new o(i)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,i){this.setColor(t,i)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var i=function(t){var i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}(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>');return this.domElement=i,this._domH=u(".picker_hue",i),this._domSL=u(".picker_sl",i),this._domA=u(".picker_alpha",i),this._domEdit=u(".picker_editor input",i),this._domSample=u(".picker_sample",i),this._domOkay=u(".picker_done button",i),this._domCancel=u(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.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 t=this,i=this,e=this.domElement,n=this._events;function r(t,i,e){n.add(t,i,e)}r(e,"click",(function(t){return t.preventDefault()})),a(n,this._domH,(function(t){return i._setHSLA(t)})),a(n,this._domSL,(function(t,e){return i._setHSLA(null,t,1-e)})),this.settings.alpha&&a(n,this._domA,(function(t,e){return i._setHSLA(null,null,null,1-e)}));var o=this._domEdit;r(o,"input",(function(){i._setColor(this.value,{fromEditor:!0,failSilently:!0})})),r(o,"focus",(function(){var t=this;t.selectionStart===t.selectionEnd&&t.select()})),this._ifPopup((function(){var i=function(i){return t.closeHandler(i)};r(window,c,i),r(window,l,i),f(n,e,["Esc","Escape"],i);var o=function(i){t.__containedEvent=i.timeStamp};r(e,c,o),r(e,l,o),r(t._domCancel,"click",i)}));var s=function(i){t._ifPopup((function(){return t.closeHandler(i)})),t.onDone&&t.onDone(t.colour)};r(this._domOkay,"click",s),f(n,e,["Enter"],s)}},{key:"_setPosition",value:function(){var t=this.settings.parent,i=this.domElement;t!==i.parentNode&&t.appendChild(i),this._ifPopup((function(e){"static"===getComputedStyle(t).position&&(t.style.position="relative");var n=!0===e?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===n?i.classList.add(t):i.classList.remove(t)})),i.classList.add(n)}))}},{key:"_setHSLA",value:function(t,i,e,n,r){r=r||{};var o=this.colour,s=o.hsla;[t,i,e,n].forEach((function(t,i){(t||0===t)&&(s[i]=t)})),o.hsla=s,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(o)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var i=this.colour,e=i.hsla,n="hsl("+360*e[0]+", 100%, 50%)",r=i.hslString,o=i.hslaString,s=this._domH,a=this._domSL,h=this._domA,c=u(".picker_selector",s),l=u(".picker_selector",a),d=u(".picker_selector",h);I(0,c,e[0]),this._domSL.style.backgroundColor=this._domH.style.color=n,I(0,l,e[1]),b(0,l,1-e[2]),a.style.color=r,b(0,d,1-e[3]);var f=r,g=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.backgroundImage="linear-gradient("+[f,g]+"), url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!t.fromEditor){var p=this.settings.alpha,m=void 0;switch(this.settings.editorFormat){case"rgb":m=i.printRGB(p);break;case"hsl":m=i.printHSL(p);break;default:m=i.printHex(p)}this._domEdit.value=m}this._domSample.style.color=o}function I(t,i,e){i.style.left=100*e+"%"}function b(t,i,e){i.style.top=100*e+"%"}}},{key:"_ifPopup",value:function(t,i){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):i&&i()}},{key:"_toggleDOM",value:function(t){var i=this.domElement;if(!i)return!1;var e=t?"":"none",n=i.style.display!==e;return n&&(i.style.display=e),n}}],[{key:"StyleElement",get:function(){return g}}]),e}()}()}},e={},t.amdD=function(){throw new Error("define cannot be used indirect")},t.n=function(i){var e=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(e,{a:e}),e},t.d=function(i,e){for(var n in e)t.o(e,n)&&!t.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:e[n]})},t.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},t(3161);function t(n){var r=e[n];return void 0!==r||(r=e[n]={id:n,loaded:!1,exports:{}},i[n].call(r.exports,r,r.exports,t),r.loaded=!0),r.exports}var i,e}()}))),d=class{constructor(e){t(this,e),this.validityChanged=i(this,"validityChanged",7),this.inputBlurred=i(this,"inputBlurred",7),this.inputFocused=i(this,"inputFocused",7),this.inputChanged=i(this,"inputChanged",7),this.validators=[]}onRequireChanged(){this.validate()}onReadonlyChanged(){setTimeout((()=>this.componentDidLoad()),300)}componentWillLoad(){h(this)}componentDidLoad(){this.containerEl&&(this.jsonEditor=new u(this.containerEl,{mode:this.readonly?"view":"text",modes:["code","form","text","tree","view"],onChange:this.readonly?null:()=>this.onChange()}),this.jsonEditor.set(this.value?this.value:{})),this.copyButtonEl&&(this.copyIntance=new l(this.copyButtonEl,{text:()=>{try{const t=this.jsonEditor.get();return JSON.stringify(t,null,4)}catch(t){}}}))}disconnectedCallback(){this.jsonEditor&&this.jsonEditor.destroy(),this.copyIntance&&this.copyIntance.destroy()}onChange(){try{const t=this.jsonEditor.get();c(t,this)}catch(t){}}onChangeMode(t){this.jsonEditor&&this.jsonEditor.setMode(t)}validate(){let t=!0;return this.required&&!this.value&&(t=!1),this.validity&&this.validity===t||(this.validity=t,this.validityChanged.emit(t)),this.validity}renderBase(){return[e("div",{class:"toolbar"},e("yoo-header",{class:"transparent"},e("yoo-navbar",null,e("yoo-items",{class:"icons",slot:"start"},e("yoo-tooltip",{placement:"bottom",content:s("YOOBICFORM")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("form")},e("yoo-icon",{size:"small",name:"list-view"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICTEXT")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("text")},e("yoo-icon",{size:"small",name:"align-left"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICTREE")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("tree")},e("yoo-icon",{size:"small",name:"single-choice"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICVIEW")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("view")},e("yoo-icon",{size:"small",name:"eye"}))),e("yoo-tooltip",{placement:"bottom",content:s("COPYTOCLIPBOARD")},e("yoo-button",{color:"light-to-dark",size:"medium",ref:t=>this.copyButtonEl=t},e("yoo-icon",{size:"small",name:"duplicate"}))))))),e("div",{class:"container swiper-no-swiping",ref:t=>this.containerEl=t})]}renderReadonly(){const t=a(this.value);return t&&e("pre",null,e("span",{innerHTML:t}))}renderEditable(){return this.renderBase()}render(){return this.readonly?this.renderReadonly():this.renderEditable()}static get watchers(){return{required:["onRequireChanged"],readonly:["onReadonlyChanged"]}}};d.style=':root {\n --ease-in-back: cubic-bezier(0.36, 0, 0.66, -0.56);\n --ease-in-circ: cubic-bezier(0.55, 0, 1, 0.45);\n --ease-in-cubic: cubic-bezier(0.32, 0, 0.67, 0);\n --ease-in-expo: cubic-bezier(0.7, 0, 0.84, 0);\n --ease-in-quad: cubic-bezier(0.11, 0, 0.5, 0);\n --ease-in-quart: cubic-bezier(0.5, 0, 0.75, 0);\n --ease-in-quint: cubic-bezier(0.64, 0, 0.78, 0);\n --ease-in-sine: cubic-bezier(0.12, 0, 0.39, 0);\n --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);\n --ease-out-circ: cubic-bezier(0, 0.55, 0.45, 1);\n --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);\n --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);\n --ease-out-quad: cubic-bezier(0.5, 1, 0.89, 1);\n --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);\n --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);\n --ease-out-sine: cubic-bezier(0.61, 1, 0.88, 1);\n --ease-in-out-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);\n --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);\n --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);\n --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);\n --ease-in-out-quad: cubic-bezier(0.45, 0, 0.55, 1);\n --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);\n --ease-in-out-quint: cubic-bezier(0.83, 0, 0.17, 1);\n --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);\n}\n\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n/* Z-Index (Ionic)\n--------------------------------------------------\nGrouped by elements which would be siblings */\n/* Hairlines width */\n/* Default Colors\n---------------------------------- */\n/* Private color variables */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff;*/\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* Color map should provide\n- base: main color to be used.\n- contrast: Color that will provide readable text against the base color\n- shade: 12% darker version of the base color (mix with black)\n- tint: 10% lighter version of the base color (mix with white) */\n/* Themed Colors\n\n Default Foreground and Background Colors values\n Allows users to override an foreground / background colors\n $background-color-value: $light !default;\n $background-color-rgb: 255, 255, 255 !default; */\n/* Default Foreground and Background Colors\n-------------------------------------------------- */\n/* Default General Colors\n-------------------------------------------------- */\n/* Default List & List Items\n-------------------------------------------------- */\n/* Item Divider */\n/* iOS List & List Items\n-------------------------------------------------- */\n/* Default Toolbar\n--------------------------------------------------*/\n/* iOS Toolbar\n--------------------------------------------------*/\n/* Default Tabs & Tab bar\n--------------------------------------------------*/\n/* iOS Tabs & Tab bar\n--------------------------------------------------*/\n/* Function related variables\n--------------------------------------------------*/\n/* Gets the active color\'s css variable from a variation. Alpha is optional.\n--------------------------------------------------------------------------------------------\nExample usage:\ncurrent-color(base) => var(--ion-color-base)\ncurrent-color(contrast, 0.1) => rgba(var(--ion-color-contrast-rgb), 0.1)\n--------------------------------------------------------------------------------------------*/\n/* Gets the specific color\'s css variable from the name and variation. Alpha/rgb are optional.\n--------------------------------------------------------------------------------------------\nExample usage:\nion-color(primary, base) => var(--ion-color-primary, #3880ff)\nion-color(secondary, contrast) => var(--ion-color-secondary-contrast)\nion-color(primary, base, 0.5) => rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.5)\n--------------------------------------------------------------------------------------------*/\n/* Mixes a color with black to create its shade.\n--------------------------------------------------------------------------------------------*/\n/*Mixes a color with white to create its tint.\n--------------------------------------------------------------------------------------------*/\n/* Converts a color to a comma separated rgb.\n--------------------------------------------------------------------------------------------*/\n/* Creates a pulse animation.\n @param {color} $begin-color [stable-20] - starting color for pulse.\n @param {color} $end-color [stable-20] - ending color for pulse.\n @author Ben Morgan\n @author Damien Arondel \n*/\n/* Execute a content if the hover state is supported.\n\n @content the content to execute if relevant\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Properly hide overflow on rounded corner elements for Webkit based browsers.\n This mixin must be used at the same level as `overflow: hidden` and `border-radius: ...`.\n\n @link https://gist.github.com/ayamflow/b602ab436ac9f05660d9c15190f4fd7\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Truncate every overflown elements with an ellipsis.\n This mixin does not work with flex box on the same level.\n\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Truncate text at a specific number of lines.\n */\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n/* https://web-design-weekly.com/2013/05/12/handy-sass-mixins/ */\n/* Single side border-radius */\n/* Text Direction - ltr / rtl\n$app-direction: multi | rtl | ltr | null (default)\nmulti: Both [dir=ltr] and [dir=rtl] are applied to css selectors.\nrtl: Always assumes rtl and only includes rtl css. No [dir] selectors.\nltr: Always assumes ltr and only includes ltr css. No [dir] selectors.\nnull: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override ltr defaults.\n---------------------------------------------------------- */\n/* Add property horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add property for all directions\n @param {string} $prop\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n @param {boolean} $content include content or use default\n----------------------------------------------------------*/\n/* Add margin for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/* Add padding for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/*Font smoothing\n--------------------------------------------------*/\n/* SVG Background Image Mixin\n @param {string} $svg\n----------------------------------------------------------*/\n/* Add padding horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add margin horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add safe area padding horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add border radius for all directions\n @param {string} $top-start\n @param {string} $top-end\n @param {string} $bottom-end\n @param {string} $bottom-start\n----------------------------------------------------------*/\n/* Sets correct text align with support for old browsers\n @param {string} $direction - text direction\n @param {string} $decorator - !important\n----------------------------------------------------------*/\n/* Add position for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/* Add position horizontal\n @param {string} $start - amount to position start\n @param {string} $end - amount to left: 0; end\n----------------------------------------------------------*/\n/* aspect ratios => use mixins\n aspect-ratio value can be "16,9", "3,2", "4,3", "1,1", "3,4", "2,3"\n Example:\n img {\n @include aspect-ratio(16,9);\n }\n*/\n/**\n * NOTE DO NOT USE FOR NEW COMPONENTS\n * LEGACY CODE -- Styles maintained only to prevent breaking changes\n * For all Font Sizes please use the appropreate font-size-XX Variables.\n */\n/**\n* Global style mixin for being able to change the background / font-color and border-color\n* programmatically using global classes\n*/\n.tippy-box,\n.tippy-popper {\n white-space: pre-wrap;\n}\n.tippy-box .tippy-tooltip,\n.tippy-popper .tippy-tooltip {\n padding: var(--spacing-02, 0.125rem);\n}\n\n.tippy-box {\n -webkit-box-shadow: var(--shadow-03, 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.1));\n box-shadow: var(--shadow-03, 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.1));\n}\n.tippy-box .tippy-content.editable {\n padding: 0;\n}\n.tippy-box .tippy-content .flex {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n.tippy-box .tippy-content .hidden {\n display: none;\n}\n.tippy-box .tippy-content .editable-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n color: var(--dark, #000000);\n}\n.tippy-box .tippy-content .editable-content .text-content {\n min-width: 5rem;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.tippy-box .tippy-content .editable-content .text-content > div {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.tippy-box .tippy-content .editable-content.readonly {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .maxchar-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-item-align: end;\n align-self: flex-end;\n height: var(--spacing-24, 1.5rem);\n padding-right: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .action-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n}\n.tippy-box .tippy-content .editable-content .action-content yoo-button {\n padding: 0 var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .action-content .edit-content {\n -ms-flex-align: center;\n align-items: center;\n}\n.tippy-box .tippy-content .editable-content .action-content .edit-content yoo-icon {\n padding-left: var(--spacing-08, 0.5rem);\n cursor: pointer;\n}\n.tippy-box .tippy-content .editable-content .edit-content > * {\n cursor: pointer;\n}\n.tippy-box .tippy-content .request-access {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .request-access .title {\n margin-bottom: var(--spacing-08, 0.5rem);\n font-weight: var(--font-weight-700, 700);\n}\n.tippy-box .tippy-content .request-access .sub-title {\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--spacing-08, 0.5rem);\n font-weight: var(--font-weight-300, 300);\n font-size: var(--font-size-14, 0.875rem);\n}\n.tippy-box .tippy-content .request-access .sub-title yoo-avatar {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n.tippy-box .tippy-content .request-access yoo-button {\n max-width: 8rem;\n}\n\n.tippy-box[data-theme~=startameeting] .tippy-content {\n padding: 0;\n border-radius: var(--border-radius-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=large] {\n font-size: var(--font-size-16, 1rem);\n}\n.tippy-box[data-theme~=large] .tippy-content {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content {\n padding: var(--spacing-04, 0.25rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content .text-content {\n padding-right: var(--spacing-16, 1rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content yoo-icon {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=small] {\n font-size: var(--font-size-16, 1rem);\n}\n.tippy-box[data-theme~=small] .tippy-content {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content {\n padding: var(--spacing-04, 0.25rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content .text-content {\n padding-right: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content yoo-icon {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=accent] {\n background-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=accent] .tippy-svg-arrow {\n fill: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--accent, #276ef1);\n}\n\n.tippy-box[data-theme~=anthracite] {\n background-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=anthracite] .tippy-svg-arrow {\n fill: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--anthracite, #1a1a1a);\n}\n\n.tippy-box[data-theme~=app-color] {\n background-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=app-color] .tippy-svg-arrow {\n fill: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--app-color);\n}\n\n.tippy-box[data-theme~=danger] {\n background-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=danger] .tippy-svg-arrow {\n fill: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--danger, #d44333);\n}\n\n.tippy-box[data-theme~=danger-light] {\n background-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=danger-light] .tippy-svg-arrow {\n fill: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--danger-light, #f46885);\n}\n\n.tippy-box[data-theme~=dark] {\n background-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=dark] .tippy-svg-arrow {\n fill: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--dark, #000000);\n}\n\n.tippy-box[data-theme~=energized] {\n background-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=energized] .tippy-svg-arrow {\n fill: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--energized, #fed05b);\n}\n\n.tippy-box[data-theme~=info] {\n background-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=info] .tippy-svg-arrow {\n fill: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--info, #fc459e);\n}\n\n.tippy-box[data-theme~=light] {\n background-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light] .tippy-svg-arrow {\n fill: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light, #ffffff);\n}\n\n.tippy-box[data-theme~=light-orange] {\n background-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light-orange] .tippy-svg-arrow {\n fill: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light-orange, #fcae49);\n}\n\n.tippy-box[data-theme~=light-to-text-color] {\n background-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light-to-text-color] .tippy-svg-arrow {\n fill: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light-to-text-color, #ffffff);\n}\n\n.tippy-box[data-theme~=royal] {\n background-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=royal] .tippy-svg-arrow {\n fill: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--royal, #7577ff);\n}\n\n.tippy-box[data-theme~=stable] {\n background-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable] .tippy-svg-arrow {\n fill: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable, #adadad);\n}\n\n.tippy-box[data-theme~=stable-alt] {\n background-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-alt] .tippy-svg-arrow {\n fill: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-alt, #d0d0d0);\n}\n\n.tippy-box[data-theme~=stable-light] {\n background-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-light] .tippy-svg-arrow {\n fill: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-light, #f1f1f1);\n}\n\n.tippy-box[data-theme~=stable-ultralight] {\n background-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-ultralight] .tippy-svg-arrow {\n fill: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-ultralight, #fafafa);\n}\n\n.tippy-box[data-theme~=success] {\n background-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=success] .tippy-svg-arrow {\n fill: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--success, #3aa76d);\n}\n\n.tippy-box[data-theme~=text-color] {\n background-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=text-color] .tippy-svg-arrow {\n fill: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--text-color, #807f83);\n}\n\n.tippy-box[data-theme~=warning] {\n background-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=warning] .tippy-svg-arrow {\n fill: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--warning, #ff6402);\n}\n\n.tippy-box[data-theme~=anthracite-to-text-color] {\n background-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=anthracite-to-text-color] .tippy-svg-arrow {\n fill: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n:root {\n --safe-area-inset-top: 0;\n --safe-area-inset-right: 0;\n --safe-area-inset-bottom: 0;\n --safe-area-inset-left: 0;\n}\n@supports (top: constant(safe-area-inset-top)) {\n :root {\n --safe-area-inset-top: constant(safe-area-inset-top);\n --safe-area-inset-right: constant(safe-area-inset-right);\n --safe-area-inset-bottom: constant(safe-area-inset-bottom);\n --safe-area-inset-left: constant(safe-area-inset-left);\n }\n}\n@supports (top: env(safe-area-inset-top)) {\n :root {\n --safe-area-inset-top: env(safe-area-inset-top);\n --safe-area-inset-right: env(safe-area-inset-right);\n --safe-area-inset-bottom: env(safe-area-inset-bottom);\n --safe-area-inset-left: env(safe-area-inset-left);\n }\n}\n\n.fr-popup.fr-active {\n z-index: 30004 !important;\n display: block !important;\n opacity: 1 !important;\n}\n\n:host {\n width: 100%;\n .jsoneditor input,.jsoneditor input:not([type]),.jsoneditor input[type=search],.jsoneditor input[type=text],.jsoneditor-modal input,.jsoneditor-modal input:not([type]),.jsoneditor-modal input[type=search],.jsoneditor-modal input[type=text]{height:auto;border:inherit;-webkit-box-shadow:none;box-shadow:none;font-size:inherit;-webkit-box-sizing:inherit;box-sizing:inherit;padding:inherit;font-family:inherit;-webkit-transition:none;transition:none;line-height:inherit}.jsoneditor input:focus,.jsoneditor input:not([type]):focus,.jsoneditor input[type=search]:focus,.jsoneditor input[type=text]:focus,.jsoneditor-modal input:focus,.jsoneditor-modal input:not([type]):focus,.jsoneditor-modal input[type=search]:focus,.jsoneditor-modal input[type=text]:focus{border:inherit;-webkit-box-shadow:inherit;box-shadow:inherit}.jsoneditor textarea,.jsoneditor-modal textarea{height:inherit}.jsoneditor select,.jsoneditor-modal select{display:inherit;height:inherit}.jsoneditor label,.jsoneditor-modal label{font-size:inherit;font-weight:inherit;color:inherit}.jsoneditor table,.jsoneditor-modal table{border-collapse:collapse;width:auto}.jsoneditor td,.jsoneditor th,.jsoneditor-modal td,.jsoneditor-modal th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.jsoneditor .autocomplete.dropdown{position:absolute;background:#fff;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);border:1px solid #d3d3d3;overflow-x:hidden;overflow-y:auto;cursor:default;margin:0;padding:5px;text-align:left;outline:0;font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt}.jsoneditor .autocomplete.dropdown .item{color:#1a1a1a}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ebebeb}.jsoneditor .autocomplete.hint{color:#a1a1a1;top:4px;left:4px}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;z-index:2}.jsoneditor-contextmenu .jsoneditor-menu{position:relative;left:0;top:0;width:128px;height:auto;background:#fff;border:1px solid #d3d3d3;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 8px 0 0;margin:0;width:128px;height:auto;border:none;cursor:pointer;color:#4d4d4d;background:0 0;font-size:10pt;font-family:arial,sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:left}.jsoneditor-contextmenu .jsoneditor-menu button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-default{width:96px}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu .jsoneditor-menu li{overflow:hidden}.jsoneditor-contextmenu .jsoneditor-menu li ul{display:none;position:relative;left:-10px;top:0;border:none;-webkit-box-shadow:inset 0 0 10px rgba(128,128,128,.5);box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu .jsoneditor-menu li ul .jsoneditor-icon{margin-left:24px}.jsoneditor-contextmenu .jsoneditor-menu li ul li button{padding-left:24px;-webkit-animation:all ease-in-out 1s;animation:all ease-in-out 1s}.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(img/jsoneditor-icons.svg);background-position:0 -72px}.jsoneditor-contextmenu .jsoneditor-icon{position:absolute;top:0;left:0;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(img/jsoneditor-icons.svg)}.jsoneditor-contextmenu .jsoneditor-text{padding:4px 0 4px 24px;word-wrap:break-word}.jsoneditor-contextmenu .jsoneditor-text.jsoneditor-right-margin{padding-right:24px}.jsoneditor-contextmenu .jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.jsoneditor-remove .jsoneditor-icon{background-position:-24px 0}.jsoneditor-contextmenu button.jsoneditor-append .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-insert .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-duplicate .jsoneditor-icon{background-position:-48px 0}.jsoneditor-contextmenu button.jsoneditor-sort-asc .jsoneditor-icon{background-position:-168px 0}.jsoneditor-contextmenu button.jsoneditor-sort-desc .jsoneditor-icon{background-position:-192px 0}.jsoneditor-contextmenu button.jsoneditor-transform .jsoneditor-icon{background-position:-216px 0}.jsoneditor-contextmenu button.jsoneditor-extract .jsoneditor-icon{background-position:0 -24px}.jsoneditor-contextmenu button.jsoneditor-type-string .jsoneditor-icon{background-position:-144px 0}.jsoneditor-contextmenu button.jsoneditor-type-auto .jsoneditor-icon{background-position:-120px 0}.jsoneditor-contextmenu button.jsoneditor-type-object .jsoneditor-icon{background-position:-72px 0}.jsoneditor-contextmenu button.jsoneditor-type-array .jsoneditor-icon{background-position:-96px 0}.jsoneditor-contextmenu button.jsoneditor-type-modes .jsoneditor-icon{background-image:none;width:6px}.jsoneditor-contextmenu li,.jsoneditor-contextmenu ul{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative}.jsoneditor-contextmenu .jsoneditor-menu button:focus,.jsoneditor-contextmenu .jsoneditor-menu button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:focus,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}.jsoneditor-contextmenu .jsoneditor-menu li ul li button:focus,.jsoneditor-contextmenu .jsoneditor-menu li ul li button:hover{background-color:#f5f5f5}.jsoneditor-modal{max-width:95%;border-radius:2px!important;padding:45px 15px 15px 15px!important;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);color:#4d4d4d;line-height:1.3em}.jsoneditor-modal.jsoneditor-modal-transform{width:600px!important}.jsoneditor-modal .pico-modal-header{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;width:100%;padding:0 10px;height:30px;line-height:30px;font-family:arial,sans-serif;font-size:11pt;background:#3883fa;color:#fff}.jsoneditor-modal table{width:100%}.jsoneditor-modal table td{padding:3px 0}.jsoneditor-modal table td.jsoneditor-modal-input{text-align:right;padding-right:0;white-space:nowrap}.jsoneditor-modal table td.jsoneditor-modal-actions{padding-top:15px}.jsoneditor-modal table th{vertical-align:middle}.jsoneditor-modal p:first-child{margin-top:0}.jsoneditor-modal a{color:#3883fa}.jsoneditor-modal .jsoneditor-jmespath-block{margin-bottom:10px}.jsoneditor-modal .pico-close{background:0 0!important;font-size:24px!important;top:7px!important;right:7px!important;color:#fff}.jsoneditor-modal input{padding:4px}.jsoneditor-modal input[type=text]{cursor:inherit}.jsoneditor-modal input[disabled]{background:#d3d3d3;color:grey}.jsoneditor-modal .jsoneditor-select-wrapper{position:relative;display:inline-block}.jsoneditor-modal .jsoneditor-select-wrapper:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #666;position:absolute;right:8px;top:14px;pointer-events:none}.jsoneditor-modal select{padding:3px 24px 3px 10px;min-width:180px;max-width:350px;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:0;text-overflow:"";font-size:10pt;line-height:1.5em}.jsoneditor-modal select::-ms-expand{display:none}.jsoneditor-modal .jsoneditor-button-group input{padding:4px 10px;margin:0;border-radius:0;border-left-style:none}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left-style:solid}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.jsoneditor-modal .jsoneditor-transform-preview{background:#f5f5f5;height:200px}.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error{color:#ee422e}.jsoneditor-modal .jsoneditor-jmespath-wizard{line-height:1.2em;width:100%;padding:0;border-radius:3px}.jsoneditor-modal .jsoneditor-jmespath-label{font-weight:700;color:#1e90ff;margin-top:20px;margin-bottom:5px}.jsoneditor-modal .jsoneditor-jmespath-wizard-table{width:100%;border-collapse:collapse}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px 0}.jsoneditor-modal .jsoneditor-inline{position:relative;display:inline-block;width:100%;padding-top:2px;padding-bottom:2px}.jsoneditor-modal .jsoneditor-inline:not(:last-child){padding-right:2px}.jsoneditor-modal .jsoneditor-jmespath-filter{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.jsoneditor-modal .jsoneditor-jmespath-filter-field{width:180px}.jsoneditor-modal .jsoneditor-jmespath-filter-relation{width:100px}.jsoneditor-modal .jsoneditor-jmespath-filter-value{min-width:180px;-ms-flex:1;flex:1}.jsoneditor-modal .jsoneditor-jmespath-sort-field{width:170px}.jsoneditor-modal .jsoneditor-jmespath-sort-order{width:150px}.jsoneditor-modal .jsoneditor-jmespath-select-fields{width:100%}.jsoneditor-modal .selectr-selected{border-color:#d3d3d3;padding:4px 28px 4px 8px}.jsoneditor-modal .selectr-selected .selectr-tag{background-color:#3883fa;border-radius:5px}.jsoneditor-modal table td,.jsoneditor-modal table th{text-align:left;vertical-align:middle;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal input[type=text]:focus,.jsoneditor-modal select,.jsoneditor-modal textarea{background:#fff;border:1px solid #d3d3d3;color:#4d4d4d;border-radius:3px;padding:4px}.jsoneditor-modal,.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal option,.jsoneditor-modal select,.jsoneditor-modal table td,.jsoneditor-modal table th,.jsoneditor-modal textarea{font-size:10.5pt;font-family:arial,sans-serif}.jsoneditor-modal #query,.jsoneditor-modal .jsoneditor-transform-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.jsoneditor-modal input[type=button],.jsoneditor-modal input[type=submit]{background:#f5f5f5;padding:4px 20px}.jsoneditor-modal input,.jsoneditor-modal select{cursor:pointer}.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc{background:#3883fa;border-color:#3883fa;color:#fff}.jsoneditor{color:#1a1a1a;border:thin solid #3883fa;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;position:relative;padding:0;line-height:100%}div.jsoneditor-default,div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-value.jsoneditor-empty::after{content:"value"}div.jsoneditor-value.jsoneditor-string{color:#006000}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ed0}div.jsoneditor-value.jsoneditor-color-value{color:#1a1a1a}div.jsoneditor-value.jsoneditor-invalid{color:#1a1a1a}div.jsoneditor-readonly{min-width:16px;color:grey}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty::after{content:"field"}div.jsoneditor td{vertical-align:top}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:grey}div.jsoneditor td.jsoneditor-tree{vertical-align:top}div.jsoneditor.busy pre.jsoneditor-preview{background:#f5f5f5;color:grey}div.jsoneditor.busy div.jsoneditor-busy{display:inherit}div.jsoneditor code.jsoneditor-preview{background:0 0}div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview{width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;padding:2px;margin:0;white-space:pre-wrap;word-break:break-all}div.jsoneditor-default{color:grey;padding-left:10px}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background-color:transparent;background-image:url(img/jsoneditor-icons.svg)}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu-button{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background-image:url(img/jsoneditor-icons.svg);background-position:-72px -72px;cursor:move}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree div.jsoneditor-show-more{display:inline-block;padding:3px 4px;margin:2px 0;background-color:#e5e5e5;border-radius:3px;color:grey;font-family:arial,sans-serif;font-size:10pt}div.jsoneditor-tree div.jsoneditor-show-more a{display:inline-block;color:grey}div.jsoneditor-tree div.jsoneditor-color{display:inline-block;width:12px;height:12px;margin:4px;border:1px solid grey;cursor:pointer}div.jsoneditor-tree div.jsoneditor-date{background:#a1a1a1;color:#fff;font-family:arial,sans-serif;border-radius:3px;display:inline-block;padding:3px;margin:0 3px}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%}div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}div.jsoneditor-outer{position:static;width:100%;height:100%;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}div.jsoneditor-outer.has-nav-bar{margin-top:-26px;padding-top:26px}div.jsoneditor-outer.has-nav-bar.has-main-menu-bar{margin-top:-61px;padding-top:61px}div.jsoneditor-outer.has-status-bar{margin-bottom:-26px;padding-bottom:26px}div.jsoneditor-outer.has-main-menu-bar{margin-top:-35px;padding-top:35px}div.jsoneditor-busy{position:absolute;top:15%;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;text-align:center;display:none}div.jsoneditor-busy span{background-color:#ffffab;border:1px solid #fe0;border-radius:3px;padding:5px 15px;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4);box-shadow:0 0 5px rgba(0,0,0,.4)}div.jsoneditor-field.jsoneditor-empty::after,div.jsoneditor-value.jsoneditor-empty::after{pointer-events:none;color:#d3d3d3;font-size:8pt}a.jsoneditor-value.jsoneditor-url,div.jsoneditor-value.jsoneditor-url{color:#006000;text-decoration:underline}a.jsoneditor-value.jsoneditor-url{display:inline-block;padding:2px;margin:2px}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#ffffab;border:1px solid #fe0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px}div.jsoneditor-tree button.jsoneditor-contextmenu-button.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu-button:focus,div.jsoneditor-tree button.jsoneditor-contextmenu-button:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button{background-position:-48px -48px}div.jsoneditor-tree div.jsoneditor-show-more a:focus,div.jsoneditor-tree div.jsoneditor-show-more a:hover{color:#ee422e}.ace-jsoneditor,textarea.jsoneditor-text{min-height:150px}.ace-jsoneditor *,textarea.jsoneditor-text *{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif}textarea.jsoneditor-text{width:100%;height:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#d3d3d3}tr.jsoneditor-selected button.jsoneditor-contextmenu-button,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}.jsoneditor-popover,.jsoneditor-schema-error,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value,pre.jsoneditor-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;color:#1a1a1a}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}.jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4);box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;padding:7px 10px;position:absolute;cursor:auto;width:200px}.jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;right:-14px;left:inherit;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;left:-14px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:"";display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-text-errors tr.jump-to-line:hover{text-decoration:underline;cursor:pointer}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;-webkit-animation:fade-in .3s linear 1,move-up .3s linear 1;animation:fade-in .3s linear 1,move-up .3s linear 1}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-validation-errors-container{max-height:130px;overflow-y:auto}.jsoneditor .jsoneditor-validation-errors{width:100%;overflow:hidden}.jsoneditor .jsoneditor-additional-errors{position:absolute;margin:auto;bottom:31px;left:calc(50% - 92px);color:grey;background-color:#ebebeb;padding:7px 15px;border-radius:8px}.jsoneditor .jsoneditor-additional-errors.visible{visibility:visible;opacity:1;-webkit-transition:opacity 2s linear;transition:opacity 2s linear}.jsoneditor .jsoneditor-additional-errors.hidden{visibility:hidden;opacity:0;-webkit-transition:visibility 0s 2s,opacity 2s linear;transition:visibility 0s 2s,opacity 2s linear}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;border-top:1px solid #ffc700}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor .jsoneditor-text-errors td pre{margin:0;white-space:normal}.jsoneditor .jsoneditor-text-errors tr{background-color:#ffffab}.jsoneditor .jsoneditor-text-errors tr.parse-error{background-color:#ee2e2e70}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;cursor:pointer}.jsoneditor-text-errors tr .jsoneditor-schema-error{background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background-image:url(img/jsoneditor-icons.svg);background-position:-25px 0;background-color:transparent}.jsoneditor-anchor{cursor:pointer}.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.jsoneditor-modal input[type=search].selectr-input{border:1px solid #d3d3d3;width:calc(100% - 4px);margin:2px;padding:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.jsoneditor-modal button.selectr-input-clear{right:8px}.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}.jsoneditor-menu>.jsoneditor-modes>button,.jsoneditor-menu>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background-color:transparent;background-image:url(img/jsoneditor-icons.svg);color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}.jsoneditor-menu>.jsoneditor-modes>button:hover,.jsoneditor-menu>button:hover{background-color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:rgba(255,255,255,.3)}.jsoneditor-menu>.jsoneditor-modes>button:disabled,.jsoneditor-menu>button:disabled{opacity:.5;background-color:transparent;border:none}.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}.jsoneditor-menu>button.jsoneditor-sort{background-position:-120px -96px}.jsoneditor-menu>button.jsoneditor-transform{background-position:-144px -96px}.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-transform,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-transform{display:none}.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}.jsoneditor-menu>button.jsoneditor-repair{background-position:-96px -96px}.jsoneditor-menu>.jsoneditor-modes{display:inline-block;float:left}.jsoneditor-menu>.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor-menu>.jsoneditor-modes>button.jsoneditor-separator,.jsoneditor-menu>button.jsoneditor-separator{margin-left:10px}.jsoneditor-menu a{font-family:arial,sans-serif;font-size:10pt;color:#fff;opacity:.8;vertical-align:middle}.jsoneditor-menu a:hover{opacity:1}.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor-navigation-bar{width:100%;height:26px;line-height:26px;padding:0;margin:0;border-bottom:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:grey;background-color:#ebebeb;overflow:hidden;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-search{font-family:arial,sans-serif;position:absolute;right:4px;top:4px;border-collapse:collapse;border-spacing:0;display:-ms-flexbox;display:flex}.jsoneditor-search input{color:#1a1a1a;width:120px;border:none;outline:0;margin:1px;line-height:20px;font-family:arial,sans-serif}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(img/jsoneditor-icons.svg);vertical-align:top}.jsoneditor-search button:hover{background-color:transparent}.jsoneditor-search button.jsoneditor-refresh{width:18px;background-position:-99px -73px}.jsoneditor-search button.jsoneditor-next{cursor:pointer;background-position:-124px -73px}.jsoneditor-search button.jsoneditor-next:hover{background-position:-124px -49px}.jsoneditor-search button.jsoneditor-previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor-search button.jsoneditor-previous:hover{background-position:-148px -49px}.jsoneditor-results{font-family:arial,sans-serif;color:#fff;padding-right:5px;line-height:26px}.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}.jsoneditor-statusbar{line-height:26px;height:26px;color:grey;background-color:#ebebeb;border-top:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:10pt}.jsoneditor-statusbar>.jsoneditor-curserinfo-val{margin-right:12px}.jsoneditor-statusbar>.jsoneditor-curserinfo-count{margin-left:4px}.jsoneditor-statusbar>.jsoneditor-validation-error-icon{float:right;width:24px;height:24px;padding:0;margin-top:1px;background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-validation-error-count{float:right;margin:0 4px 0 0;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-parse-error-icon{float:right;width:24px;height:24px;padding:0;margin:1px;background-image:url(img/jsoneditor-icons.svg);background-position:-25px 0}.jsoneditor-statusbar .jsoneditor-array-info a{color:inherit}div.jsoneditor-statusbar>.jsoneditor-curserinfo-label,div.jsoneditor-statusbar>.jsoneditor-size-info{margin:0 4px}.jsoneditor-treepath{padding:0 5px;overflow:hidden;white-space:nowrap;outline:0}.jsoneditor-treepath.show-all{word-wrap:break-word;white-space:normal;position:absolute;background-color:#ebebeb;z-index:1;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3)}.jsoneditor-treepath.show-all span.jsoneditor-treepath-show-all-btn{display:none}.jsoneditor-treepath div.jsoneditor-contextmenu-root{position:absolute;left:0}.jsoneditor-treepath .jsoneditor-treepath-show-all-btn{position:absolute;background-color:#ebebeb;left:0;height:20px;padding:0 3px;cursor:pointer}.jsoneditor-treepath .jsoneditor-treepath-element{margin:1px;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-treepath .jsoneditor-treepath-seperator{margin:2px;font-size:9pt;font-family:arial,sans-serif}.jsoneditor-treepath span.jsoneditor-treepath-element:hover,.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover{cursor:pointer;text-decoration:underline}/*!\n * Selectr 2.4.0\n * https://github.com/Mobius1/Selectr\n *\n * Released under the MIT license\n */.selectr-container{position:relative}.selectr-container li{list-style:none}.selectr-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:-1px;padding:0;border:0 none}.selectr-visible{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:11}.selectr-desktop.multiple .selectr-visible{display:none}.selectr-desktop.multiple.native-open .selectr-visible{top:100%;min-height:200px!important;height:auto;opacity:1;display:block}.selectr-container.multiple.selectr-mobile .selectr-selected{z-index:0}.selectr-selected{position:relative;z-index:1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:7px 28px 7px 14px;cursor:pointer;border:1px solid #999;border-radius:3px;background-color:#fff}.selectr-selected::before{position:absolute;top:50%;right:10px;width:0;height:0;content:"";-o-transform:rotate(0) translate3d(0,-50%,0);-ms-transform:rotate(0) translate3d(0,-50%,0);-moz-transform:rotate(0) translate3d(0,-50%,0);-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0);border-width:4px 4px 0 4px;border-style:solid;border-color:#6c7a86 transparent transparent}.selectr-container.native-open .selectr-selected::before,.selectr-container.open .selectr-selected::before{border-width:0 4px 4px 4px;border-style:solid;border-color:transparent transparent #6c7a86}.selectr-label{display:none;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.selectr-placeholder{color:#6c7a86}.selectr-tags{margin:0;padding:0;white-space:normal}.has-selected .selectr-tags{margin:0 0 -2px}.selectr-tag{list-style:none;position:relative;float:left;padding:2px 25px 2px 8px;margin:0 2px 2px 0;cursor:default;color:#fff;border:medium none;border-radius:10px;background:#acb7bf none repeat scroll 0 0}.selectr-container.multiple.has-selected .selectr-selected{padding:5px 28px 5px 5px}.selectr-options-container{position:absolute;z-index:10000;top:calc(100% - 1px);left:0;display:none;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;border-width:0 1px 1px;border-style:solid;border-color:transparent #999 #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.open .selectr-options-container{display:block}.selectr-input-container{position:relative;display:none}.selectr-clear,.selectr-input-clear,.selectr-tag-remove{position:absolute;top:50%;right:22px;width:20px;height:20px;padding:0;cursor:pointer;-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);border:medium none;background-color:transparent;z-index:11}.selectr-clear,.selectr-input-clear{display:none}.selectr-container.has-selected .selectr-clear,.selectr-input-container.active .selectr-input-clear{display:block}.selectr-selected .selectr-tag-remove{right:2px}.selectr-clear::after,.selectr-clear::before,.selectr-input-clear::after,.selectr-input-clear::before,.selectr-tag-remove::after,.selectr-tag-remove::before{position:absolute;top:5px;left:9px;width:2px;height:10px;content:" ";background-color:#6c7a86}.selectr-tag-remove::after,.selectr-tag-remove::before{top:4px;width:3px;height:12px;background-color:#fff}.selectr-clear:before,.selectr-input-clear::before,.selectr-tag-remove::before{-o-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.selectr-clear:after,.selectr-input-clear::after,.selectr-tag-remove::after{-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.selectr-input-container.active,.selectr-input-container.active .selectr-clear{display:block}.selectr-input{top:5px;left:5px;-webkit-box-sizing:border-box;box-sizing:border-box;width:calc(100% - 30px);margin:10px 15px;padding:7px 30px 7px 9px;border:1px solid #999;border-radius:3px}.selectr-notice{display:none;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.notice .selectr-notice{display:block}.selectr-container.notice .selectr-selected{border-radius:3px 3px 0 0}.selectr-options{position:relative;top:calc(100% + 2px);display:none;overflow-x:auto;overflow-y:scroll;max-height:200px;margin:0;padding:0}.selectr-container.notice .selectr-options-container,.selectr-container.open .selectr-input-container,.selectr-container.open .selectr-options{display:block}.selectr-option{position:relative;display:block;padding:5px 20px;list-style:outside none none;cursor:pointer;font-weight:400}.selectr-options.optgroups>.selectr-option{padding-left:25px}.selectr-optgroup{font-weight:700;padding:0}.selectr-optgroup--label{font-weight:700;margin-top:10px;padding:5px 15px}.selectr-match{text-decoration:underline}.selectr-option.selected{background-color:#ddd}.selectr-option.active{color:#fff;background-color:#5897fb}.selectr-option.disabled{opacity:.4}.selectr-option.excluded{display:none}.selectr-container.open .selectr-selected{border-color:#999 #999 transparent #999;border-radius:3px 3px 0 0}.selectr-container.open .selectr-selected::after{-o-transform:rotate(180deg) translate3d(0,50%,0);-ms-transform:rotate(180deg) translate3d(0,50%,0);-moz-transform:rotate(180deg) translate3d(0,50%,0);-webkit-transform:rotate(180deg) translate3d(0,50%,0);transform:rotate(180deg) translate3d(0,50%,0)}.selectr-disabled{opacity:.6}.has-selected .selectr-placeholder,.selectr-empty{display:none}.has-selected .selectr-label{display:block}.taggable .selectr-selected{padding:4px 28px 4px 4px}.taggable .selectr-selected::after{display:table;content:" ";clear:both}.taggable .selectr-label{width:auto}.taggable .selectr-tags{float:left;display:block}.taggable .selectr-placeholder{display:none}.input-tag{float:left;min-width:90px;width:auto}.selectr-tag-input{border:medium none;padding:3px 10px;width:100%;font-family:inherit;font-weight:inherit;font-size:inherit}.selectr-input-container.loading::after{position:absolute;top:50%;right:20px;width:20px;height:20px;content:"";-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-o-transform-origin:50% 0 0;-ms-transform-origin:50% 0 0;-moz-transform-origin:50% 0 0;-webkit-transform-origin:50% 0 0;transform-origin:50% 0 0;-moz-animation:.5s linear 0s normal forwards infinite running selectr-spin;-webkit-animation:.5s linear 0s normal forwards infinite running selectr-spin;animation:.5s linear 0s normal forwards infinite running selectr-spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}@keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}.selectr-container.open.inverted .selectr-selected{border-color:transparent #999 #999;border-radius:0 0 3px 3px}.selectr-container.inverted .selectr-options-container{border-width:1px 1px 0;border-color:#999 #999 transparent;border-radius:3px 3px 0 0;background-color:#fff}.selectr-container.inverted .selectr-options-container{top:auto;bottom:calc(100% - 1px)}.selectr-container ::-webkit-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-moz-placeholder{color:#6c7a86;opacity:1}.selectr-container :-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::placeholder{color:#6c7a86;opacity:1}\n}\n:host yoo-navbar {\n --top-container-padding: 0;\n}\n:host div.jsoneditor-menu a.jsoneditor-poweredBy {\n display: none;\n}\n:host div.jsoneditor {\n border: 0.0625rem solid var(--stable-alt, #d0d0d0);\n}\n:host div.jsoneditor html,\n:host div.jsoneditor body,\n:host div.jsoneditor div:not([class^=fr-]),\n:host div.jsoneditor span:not([class^=fr-]),\n:host div.jsoneditor img:not([class^=fr-]),\n:host div.jsoneditor applet,\n:host div.jsoneditor object,\n:host div.jsoneditor iframe,\n:host div.jsoneditor h1,\n:host div.jsoneditor h2,\n:host div.jsoneditor h3,\n:host div.jsoneditor h4,\n:host div.jsoneditor h5,\n:host div.jsoneditor h6,\n:host div.jsoneditor p,\n:host div.jsoneditor blockquote,\n:host div.jsoneditor pre,\n:host div.jsoneditor a,\n:host div.jsoneditor abbr,\n:host div.jsoneditor acronym,\n:host div.jsoneditor address,\n:host div.jsoneditor big,\n:host div.jsoneditor cite,\n:host div.jsoneditor code,\n:host div.jsoneditor del,\n:host div.jsoneditor dfn,\n:host div.jsoneditor em,\n:host div.jsoneditor font,\n:host div.jsoneditor ins,\n:host div.jsoneditor kbd,\n:host div.jsoneditor q,\n:host div.jsoneditor s,\n:host div.jsoneditor samp,\n:host div.jsoneditor small,\n:host div.jsoneditor strike,\n:host div.jsoneditor strong,\n:host div.jsoneditor sub,\n:host div.jsoneditor sup,\n:host div.jsoneditor tt,\n:host div.jsoneditor var,\n:host div.jsoneditor dl,\n:host div.jsoneditor dt,\n:host div.jsoneditor dd,\n:host div.jsoneditor ol,\n:host div.jsoneditor ul,\n:host div.jsoneditor li,\n:host div.jsoneditor fieldset,\n:host div.jsoneditor form,\n:host div.jsoneditor label,\n:host div.jsoneditor legend,\n:host div.jsoneditor table,\n:host div.jsoneditor caption,\n:host div.jsoneditor tbody,\n:host div.jsoneditor tfoot,\n:host div.jsoneditor thead,\n:host div.jsoneditor tr,\n:host div.jsoneditor th {\n margin: 0;\n padding: 0;\n font-weight: inherit;\n font-size: 100%;\n font-family: inherit;\n font-style: inherit;\n vertical-align: baseline;\n border: 0;\n outline: 0;\n -webkit-margin-before: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n}\n:host div.jsoneditor .jsoneditor-outer {\n display: -ms-flexbox;\n display: flex;\n}\n:host div.jsoneditor .jsoneditor-outer textarea {\n -ms-flex: 1;\n flex: 1;\n min-height: 100px;\n font-size: var(--font-size-16, 1rem);\n border: none;\n border-bottom: 0.0625rem solid var(--stable-alt, #d0d0d0);\n resize: auto;\n}\n:host div.jsoneditor-validation-errors-container {\n color: var(--danger, #d44333);\n}\n:host div.jsoneditor-menu {\n display: none;\n background: var(--dark-to-light, #000000);\n border-bottom: 0.0625rem solid var(--dark-to-light, #000000);\n}\n:host div.jsoneditor-statusbar {\n background: var(--stable-light, #f1f1f1);\n border-top: 0.0625rem solid var(--stable-alt, #d0d0d0);\n}\n:host div.jsoneditor-menu > button,\n:host div.jsoneditor-menu > div.jsoneditor-modes > button {\n color: var(--dark-to-light, #000000);\n}\n:host .readonly {\n word-break: break-word;\n}\n:host pre {\n display: block;\n width: 100%;\n margin: 0;\n font-size: var(--font-size-14, 0.875rem);\n font-family: var(--font-family, "Lato");\n}\n:host pre .string {\n color: var(--success, #3aa76d);\n}\n:host pre .number {\n color: var(--warning, #ff6402);\n}\n:host pre .boolean {\n color: var(--accent, #276ef1);\n}\n:host pre .null {\n color: var(--royal, #7577ff);\n}\n:host pre .key {\n color: var(--danger, #d44333);\n}';export{d as yoo_form_json}
40
+ !function(t){function i(){for(var t=arguments.length,i=Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length>1){i[0]=i[0].slice(0,-1);for(var n=i.length-1,r=1;r<n;++r)i[r]=i[r].slice(1,-1);return i[n]=i[n].slice(1),i.join("")}return i[0]}function e(t){return"(?:"+t+")"}function n(t){return void 0===t?"undefined":null===t?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function r(t){return t.toUpperCase()}function o(t){var n="[A-Za-z]",r="[0-9]",o=i(r,"[A-Fa-f]"),s=e(e("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+e("%[89A-Fa-f]"+o+"%"+o+o)+"|"+e("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",h=i("[\\:\\/\\?\\#\\[\\]\\@]",a),c=t?"[\\uE000-\\uF8FF]":"[]",l=i(n,r,"[\\-\\.\\_\\~]",t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");e(n+i(n,r,"[\\+\\-\\.]")+"*"),e(e(s+"|"+i(l,a,"[\\:]"))+"*");var u=e(e("25[0-5]")+"|"+e("2[0-4]"+r)+"|"+e("1"+r+r)+"|"+e("0?[1-9]"+r)+"|0?0?"+r),d=e(u+"\\."+u+"\\."+u+"\\."+u),f=e(o+"{1,4}"),g=e(e(f+"\\:"+f)+"|"+d),p=e(e(f+"\\:")+"{6}"+g),m=e("\\:\\:"+e(f+"\\:")+"{5}"+g),I=e(e(f)+"?\\:\\:"+e(f+"\\:")+"{4}"+g),b=e(e(e(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+e(f+"\\:")+"{3}"+g),C=e(e(e(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+e(f+"\\:")+"{2}"+g),A=e(e(e(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+g),v=e(e(e(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+g),y=e(e(e(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),w=e(e(e(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),x=e([p,m,I,b,C,A,v,y,w].join("|")),k=e(e(l+"|"+s)+"+");e("[vV]"+o+"+\\."+i(l,a,"[\\:]")+"+"),e(e(s+"|"+i(l,a))+"*");var j=e(s+"|"+i(l,a,"[\\:\\@]"));return e(e(s+"|"+i(l,a,"[\\@]"))+"+"),e(e(j+"|"+i("[\\/\\?]",c))+"*"),{NOT_SCHEME:new RegExp(i("[^]",n,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(i("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(i("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(i("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(i("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(i("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(i("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(i("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(i("[^\\%]",l,h),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+e(e("\\%25|\\%(?!"+o+"{2})")+"("+k+")")+"?\\]?$")}}var s=o(!1),a=o(!0),h=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(e.push(s.value),!i||e.length!==i);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,u=/^xn--/,d=/[^\0-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function I(t){throw new RangeError(g[t])}function b(t,i){var e=t.split("@"),n="";return e.length>1&&(n=e[0]+"@",t=e[1]),n+function(t,i){for(var e=[],n=t.length;n--;)e[n]=i(t[n]);return e}((t=t.replace(f,".")).split("."),i).join(".")}function C(t){for(var i=[],e=0,n=t.length;e<n;){var r=t.charCodeAt(e++);if(r>=55296&&r<=56319&&e<n){var o=t.charCodeAt(e++);56320==(64512&o)?i.push(((1023&r)<<10)+(1023&o)+65536):(i.push(r),e--)}else i.push(r)}return i}var A=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l},v=function(t,i){return t+22+75*(t<26)-((0!=i)<<5)},y=function(t,i,e){var n=0;for(t=e?p(t/700):t>>1,t+=p(t/i);t>455;n+=l)t=p(t/35);return p(n+36*t/(t+38))},w=function(t){var i=[],e=t.length,n=0,r=128,o=72,s=t.lastIndexOf("-");s<0&&(s=0);for(var a=0;a<s;++a)t.charCodeAt(a)>=128&&I("not-basic"),i.push(t.charCodeAt(a));for(var h=s>0?s+1:0;h<e;){for(var u=n,d=1,f=l;;f+=l){h>=e&&I("invalid-input");var g=A(t.charCodeAt(h++));(g>=l||g>p((c-n)/d))&&I("overflow"),n+=g*d;var m=f<=o?1:f>=o+26?26:f-o;if(g<m)break;var b=l-m;d>p(c/b)&&I("overflow"),d*=b}var C=i.length+1;o=y(n-u,C,0==u),p(n/C)>c-r&&I("overflow"),r+=p(n/C),n%=C,i.splice(n++,0,r)}return String.fromCodePoint.apply(String,i)},x=function t(i){var e=[],n=(i=C(i)).length,r=128,o=0,s=72,a=!0,h=!1,u=void 0;try{for(var d,f=i[Symbol.iterator]();!(a=(d=f.next()).done);a=!0){var g=d.value;g<128&&e.push(m(g))}}catch(t){h=!0,u=t}finally{try{!a&&f.return&&f.return()}finally{if(h)throw u}}var b=e.length,A=b;for(b&&e.push("-");A<n;){var w=c,x=!0,k=!1,j=void 0;try{for(var S,Z=i[Symbol.iterator]();!(x=(S=Z.next()).done);x=!0){var G=S.value;G>=r&&G<w&&(w=G)}}catch(t){k=!0,j=t}finally{try{!x&&Z.return&&Z.return()}finally{if(k)throw j}}var B=A+1;w-r>p((c-o)/B)&&I("overflow"),o+=(w-r)*B,r=w;var V=!0,W=!1,K=void 0;try{for(var T,F=i[Symbol.iterator]();!(V=(T=F.next()).done);V=!0){var R=T.value;if(R<r&&++o>c&&I("overflow"),R==r){for(var H=o,E=l;;E+=l){var _=E<=s?1:E>=s+26?26:E-s;if(H<_)break;var N=H-_,X=l-_;e.push(m(v(_+N%X,0))),H=p(N/X)}e.push(m(v(H,0))),s=y(o,B,A==b),o=0,++A}}}catch(t){W=!0,K=t}finally{try{!V&&F.return&&F.return()}finally{if(W)throw K}}++o,++r}return e.join("")},k=function(t){return b(t,(function(t){return d.test(t)?"xn--"+x(t):t}))},j=function(t){return b(t,(function(t){return u.test(t)?w(t.slice(4).toLowerCase()):t}))},S={};function Z(t){var i=t.charCodeAt(0);return i<16?"%0"+i.toString(16).toUpperCase():i<128?"%"+i.toString(16).toUpperCase():i<2048?"%"+(i>>6|192).toString(16).toUpperCase()+"%"+(63&i|128).toString(16).toUpperCase():"%"+(i>>12|224).toString(16).toUpperCase()+"%"+(i>>6&63|128).toString(16).toUpperCase()+"%"+(63&i|128).toString(16).toUpperCase()}function G(t){for(var i="",e=0,n=t.length;e<n;){var r=parseInt(t.substr(e+1,2),16);if(r<128)i+=String.fromCharCode(r),e+=3;else if(r>=194&&r<224){if(n-e>=6){var o=parseInt(t.substr(e+4,2),16);i+=String.fromCharCode((31&r)<<6|63&o)}else i+=t.substr(e,6);e+=6}else if(r>=224){if(n-e>=9){var s=parseInt(t.substr(e+4,2),16),a=parseInt(t.substr(e+7,2),16);i+=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}else i+=t.substr(e,9);e+=9}else i+=t.substr(e,3),e+=3}return i}function B(t,i){function e(t){var e=G(t);return e.match(i.UNRESERVED)?e:t}return t.scheme&&(t.scheme=String(t.scheme).replace(i.PCT_ENCODED,e).toLowerCase().replace(i.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(i.PCT_ENCODED,e).replace(i.NOT_USERINFO,Z).replace(i.PCT_ENCODED,r)),void 0!==t.host&&(t.host=String(t.host).replace(i.PCT_ENCODED,e).toLowerCase().replace(i.NOT_HOST,Z).replace(i.PCT_ENCODED,r)),void 0!==t.path&&(t.path=String(t.path).replace(i.PCT_ENCODED,e).replace(t.scheme?i.NOT_PATH:i.NOT_PATH_NOSCHEME,Z).replace(i.PCT_ENCODED,r)),void 0!==t.query&&(t.query=String(t.query).replace(i.PCT_ENCODED,e).replace(i.NOT_QUERY,Z).replace(i.PCT_ENCODED,r)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(i.PCT_ENCODED,e).replace(i.NOT_FRAGMENT,Z).replace(i.PCT_ENCODED,r)),t}function V(t){return t.replace(/^0*(.*)/,"$1")||"0"}function W(t,i){var e=t.match(i.IPV4ADDRESS)||[],n=h(e,2)[1];return n?n.split(".").map(V).join("."):t}function K(t,i){var e=t.match(i.IPV6ADDRESS)||[],n=h(e,3),r=n[1],o=n[2];if(r){for(var s=r.toLowerCase().split("::").reverse(),a=h(s,2),c=a[0],l=a[1],u=l?l.split(":").map(V):[],d=c.split(":").map(V),f=i.IPV4ADDRESS.test(d[d.length-1]),g=f?7:8,p=d.length-g,m=Array(g),I=0;I<g;++I)m[I]=u[I]||d[p+I]||"";f&&(m[g-1]=W(m[g-1],i));var b=m.reduce((function(t,i,e){if(!i||"0"===i){var n=t[t.length-1];n&&n.index+n.length===e?n.length++:t.push({index:e,length:1})}return t}),[]).sort((function(t,i){return i.length-t.length}))[0],C=void 0;if(b&&b.length>1){var A=m.slice(0,b.index),v=m.slice(b.index+b.length);C=A.join(":")+"::"+v.join(":")}else C=m.join(":");return o&&(C+="%"+o),C}return t}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,F=void 0==="".match(/(){0}/)[1];function R(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e={},n=!1!==i.iri?a:s;"suffix"===i.reference&&(t=(i.scheme?i.scheme+":":"")+"//"+t);var r=t.match(T);if(r){F?(e.scheme=r[1],e.userinfo=r[3],e.host=r[4],e.port=parseInt(r[5],10),e.path=r[6]||"",e.query=r[7],e.fragment=r[8],isNaN(e.port)&&(e.port=r[5])):(e.scheme=r[1]||void 0,e.userinfo=-1!==t.indexOf("@")?r[3]:void 0,e.host=-1!==t.indexOf("//")?r[4]:void 0,e.port=parseInt(r[5],10),e.path=r[6]||"",e.query=-1!==t.indexOf("?")?r[7]:void 0,e.fragment=-1!==t.indexOf("#")?r[8]:void 0,isNaN(e.port)&&(e.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),e.host&&(e.host=K(W(e.host,n),n)),e.reference=void 0!==e.scheme||void 0!==e.userinfo||void 0!==e.host||void 0!==e.port||e.path||void 0!==e.query?void 0===e.scheme?"relative":void 0===e.fragment?"absolute":"uri":"same-document",i.reference&&"suffix"!==i.reference&&i.reference!==e.reference&&(e.error=e.error||"URI is not a "+i.reference+" reference.");var o=S[(i.scheme||e.scheme||"").toLowerCase()];if(i.unicodeSupport||o&&o.unicodeSupport)B(e,n);else{if(e.host&&(i.domainHost||o&&o.domainHost))try{e.host=k(e.host.replace(n.PCT_ENCODED,G).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to ASCII via punycode: "+t}B(e,s)}o&&o.parse&&o.parse(e,i)}else e.error=e.error||"URI can not be parsed.";return e}function H(t,i){var e=!1!==i.iri?a:s,n=[];return void 0!==t.userinfo&&(n.push(t.userinfo),n.push("@")),void 0!==t.host&&n.push(K(W(String(t.host),e),e).replace(e.IPV6ADDRESS,(function(t,i,e){return"["+i+(e?"%25"+e:"")+"]"}))),"number"!=typeof t.port&&"string"!=typeof t.port||(n.push(":"),n.push(String(t.port))),n.length?n.join(""):void 0}var E=/^\.\.?\//,_=/^\/\.(\/|$)/,N=/^\/\.\.(\/|$)/,X=/^\/?(?:.|\n)*?(?=\/|$)/;function z(t){for(var i=[];t.length;)if(t.match(E))t=t.replace(E,"");else if(t.match(_))t=t.replace(_,"/");else if(t.match(N))t=t.replace(N,"/"),i.pop();else if("."===t||".."===t)t="";else{var e=t.match(X);if(!e)throw new Error("Unexpected dot segment condition");var n=e[0];t=t.slice(n.length),i.push(n)}return i.join("")}function J(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=i.iri?a:s,n=[],r=S[(i.scheme||t.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(t,i),t.host)if(e.IPV6ADDRESS.test(t.host));else if(i.domainHost||r&&r.domainHost)try{t.host=i.iri?j(t.host):k(t.host.replace(e.PCT_ENCODED,G).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+e}B(t,e),"suffix"!==i.reference&&t.scheme&&(n.push(t.scheme),n.push(":"));var o=H(t,i);if(void 0!==o&&("suffix"!==i.reference&&n.push("//"),n.push(o),t.path&&"/"!==t.path.charAt(0)&&n.push("/")),void 0!==t.path){var h=t.path;i.absolutePath||r&&r.absolutePath||(h=z(h)),void 0===o&&(h=h.replace(/^\/\//,"/%2F")),n.push(h)}return void 0!==t.query&&(n.push("?"),n.push(t.query)),void 0!==t.fragment&&(n.push("#"),n.push(t.fragment)),n.join("")}function O(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(t=R(J(t,e),e),i=R(J(i,e),e)),!(e=e||{}).tolerant&&i.scheme?(n.scheme=i.scheme,n.userinfo=i.userinfo,n.host=i.host,n.port=i.port,n.path=z(i.path||""),n.query=i.query):(void 0!==i.userinfo||void 0!==i.host||void 0!==i.port?(n.userinfo=i.userinfo,n.host=i.host,n.port=i.port,n.path=z(i.path||""),n.query=i.query):(i.path?("/"===i.path.charAt(0)?n.path=z(i.path):(n.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+i.path:i.path:"/"+i.path,n.path=z(n.path)),n.query=i.query):(n.path=t.path,n.query=void 0!==i.query?i.query:t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=i.fragment,n}function Y(t,i){return t&&t.toString().replace(i&&i.iri?a.PCT_ENCODED:s.PCT_ENCODED,G)}var P={scheme:"http",domainHost:!0,parse:function(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function(t){var i="https"===String(t.scheme).toLowerCase();return t.port!==(i?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},L={scheme:"https",domainHost:P.domainHost,parse:P.parse,serialize:P.serialize};function M(t){return"boolean"==typeof t.secure?t.secure:"wss"===String(t.scheme).toLowerCase()}var D={scheme:"ws",domainHost:!0,parse:function(t){var i=t;return i.secure=M(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i},serialize:function(t){if(t.port!==(M(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){var i=t.resourceName.split("?"),e=h(i,2),n=e[0],r=e[1];t.path=n&&"/"!==n?n:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}},U={scheme:"wss",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize},Q={},$="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",q="[0-9A-Fa-f]",tt=e(e("%[EFef]"+q+"%"+q+q+"%"+q+q)+"|"+e("%[89A-Fa-f]"+q+"%"+q+q)+"|"+e("%"+q+q)),it=i("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),et=new RegExp($,"g"),nt=new RegExp(tt,"g"),rt=new RegExp(i("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',it),"g"),ot=new RegExp(i("[^]",$,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),st=ot;function at(t){var i=G(t);return i.match(et)?i:t}var ht={scheme:"mailto",parse:function t(i,e){var n=i,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,s={},a=n.query.split("&"),h=0,c=a.length;h<c;++h){var l=a[h].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),d=0,f=u.length;d<f;++d)r.push(u[d]);break;case"subject":n.subject=Y(l[1],e);break;case"body":n.body=Y(l[1],e);break;default:o=!0,s[Y(l[0],e)]=Y(l[1],e)}}o&&(n.headers=s)}n.query=void 0;for(var g=0,p=r.length;g<p;++g){var m=r[g].split("@");if(m[0]=Y(m[0]),e.unicodeSupport)m[1]=Y(m[1],e).toLowerCase();else try{m[1]=k(Y(m[1],e).toLowerCase())}catch(t){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}r[g]=m.join("@")}return n},serialize:function t(i,e){var n=i,o=function(t){return null!=t?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}(i.to);if(o){for(var s=0,a=o.length;s<a;++s){var h=String(o[s]),c=h.lastIndexOf("@"),l=h.slice(0,c).replace(nt,at).replace(nt,r).replace(rt,Z),u=h.slice(c+1);try{u=e.iri?j(u):k(Y(u,e).toLowerCase())}catch(t){n.error=n.error||"Email address's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+t}o[s]=l+"@"+u}n.path=o.join(",")}var d=i.headers=i.headers||{};i.subject&&(d.subject=i.subject),i.body&&(d.body=i.body);var f=[];for(var g in d)d[g]!==Q[g]&&f.push(g.replace(nt,at).replace(nt,r).replace(ot,Z)+"="+d[g].replace(nt,at).replace(nt,r).replace(st,Z));return f.length&&(n.query=f.join("&")),n}},ct=/^([^\:]+)\:(.*)/,lt={scheme:"urn",parse:function(t,i){var e=t.path&&t.path.match(ct),n=t;if(e){var r=i.scheme||n.scheme||"urn",o=e[1].toLowerCase(),s=e[2],a=S[r+":"+(i.nid||o)];n.nid=o,n.nss=s,n.path=void 0,a&&(n=a.parse(n,i))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(t,i){var e=t.nid,n=S[(i.scheme||t.scheme||"urn")+":"+(i.nid||e)];n&&(t=n.serialize(t,i));var r=t;return r.path=(e||i.nid)+":"+t.nss,r}},ut=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,dt={scheme:"urn:uuid",parse:function(t,i){var e=t;return e.uuid=e.nss,e.nss=void 0,i.tolerant||e.uuid&&e.uuid.match(ut)||(e.error=e.error||"UUID is not valid."),e},serialize:function(t){var i=t;return i.nss=(t.uuid||"").toLowerCase(),i}};S[P.scheme]=P,S[L.scheme]=L,S[D.scheme]=D,S[U.scheme]=U,S[ht.scheme]=ht,S[lt.scheme]=lt,S[dt.scheme]=dt,t.SCHEMES=S,t.pctEncChar=Z,t.pctDecChars=G,t.parse=R,t.removeDotSegments=z,t.serialize=J,t.resolveComponents=O,t.resolve=function(t,i,e){var n=function(t,i){var e=t;if(i)for(var n in i)e[n]=i[n];return e}({scheme:"null"},e);return J(O(R(t,n),R(i,n),n,!0),n)},t.normalize=function(t,i){return"string"==typeof t?t=J(R(t,i),i):"object"===n(t)&&(t=R(J(t,i),i)),t},t.equal=function(t,i,e){return"string"==typeof t?t=J(R(t,e),e):"object"===n(t)&&(t=J(t,e)),"string"==typeof i?i=J(R(i,e),e):"object"===n(i)&&(i=J(i,e)),t===i},t.escapeComponent=function(t,i){return t&&t.toString().replace(i&&i.iri?a.ESCAPE:s.ESCAPE,Z)},t.unescapeComponent=Y,Object.defineProperty(t,"__esModule",{value:!0})}(i)},4049:function(t){t.exports=function(){var t=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(i,e,n){return e&&t(i.prototype,e),n&&t(i,n),i}}(),e=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(e.push(s.value),!i||e.length!==i);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,i){for(var e=this;e.length<t;)e=i+e;return e};var n={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 r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(i>0?t.toFixed(i).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var o=function(){function o(i,n,r,s){t(this,o);var a=this;if(void 0===i);else if(Array.isArray(i))this.rgba=i;else if(void 0===r){var h=i&&""+i;h&&function(t){if(t.startsWith("hsl")){var i=t.match(/([\-\d\.e]+)/g).map(Number),n=e(i,4),r=n[0],s=n[1],h=n[2],c=n[3];void 0===c&&(c=1),a.hsla=[r/=360,s/=100,h/=100,c]}else if(t.startsWith("rgb")){var l=t.match(/([\-\d\.e]+)/g).map(Number),u=e(l,4),d=u[3];void 0===d&&(d=1),a.rgba=[u[0],u[1],u[2],d]}else a.rgba=t.startsWith("#")?o.hexToRgb(t):o.nameToRgb(t)||o.hexToRgb(t)}(h.toLowerCase())}else this.rgba=[i,n,r,void 0===s?1:s]}return i(o,[{key:"printRGB",value:function(t){var i=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,i){return r(t,3===i?3:0)}));return t?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(t){var i=[360,100,100,1],e=["","%","%",""],n=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,n){return r(t*i[n],3===n?3:1)+e[n]}));return t?"hsla("+n+")":"hsl("+n+")"}},{key:"printHex",value:function(t){var i=this.hex;return t?i:i.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(t){3===t.length&&(t[3]=1),this._rgba=t,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(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,i){return i<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(t){this.rgba=o.hexToRgb(t)}}],[{key:"hexToRgb",value:function(t){var i=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!i.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var e=i.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return e[3]=e[3]/255,e}},{key:"nameToRgb",value:function(t){var i=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),e=n[i];return void 0===e?e:o.hexToRgb(e.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var i=e(t,4),n=i[0],r=i[1],o=i[2],s=i[3];n/=255,r/=255,o/=255;var a=Math.max(n,r,o),h=Math.min(n,r,o),c=void 0,l=void 0,u=(a+h)/2;if(a===h)c=l=0;else{var d=a-h;switch(l=u>.5?d/(2-a-h):d/(a+h),a){case n:c=(r-o)/d+(r<o?6:0);break;case r:c=(o-n)/d+2;break;case o:c=(n-r)/d+4}c/=6}return[c,l,u,s]}},{key:"hslToRgb",value:function(t){var i=e(t,4),n=i[0],r=i[1],o=i[2],s=i[3],a=void 0,h=void 0,c=void 0;if(0===r)a=h=c=o;else{var l=function(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t},u=o<.5?o*(1+r):o+r-o*r,d=2*o-u;a=l(d,u,n+1/3),h=l(d,u,n),c=l(d,u,n-1/3)}var f=[255*a,255*h,255*c].map(Math.round);return f[3]=s,f}}]),o}(),s=function(){function e(){t(this,e),this._events=[]}return i(e,[{key:"add",value:function(t,i,e){t.addEventListener(i,e,!1),this._events.push({target:t,type:i,handler:e})}},{key:"remove",value:function(t,i,n){this._events=this._events.filter((function(r){var o=!0;return t&&t!==r.target&&(o=!1),i&&i!==r.type&&(o=!1),n&&n!==r.handler&&(o=!1),o&&e._doRemove(r.target,r.type,r.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(t){return e._doRemove(t.target,t.type,t.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,i,e){t.removeEventListener(i,e,!1)}}]),e}();function a(t,i,e){var n=!1;function r(t,i,e){return Math.max(i,Math.min(t,e))}function o(t,o,s){if(s&&(n=!0),n){t.preventDefault();var a=i.getBoundingClientRect(),h=a.width,c=a.height,l=o.clientY,u=r(o.clientX-a.left,0,h),d=r(l-a.top,0,c);e(u/h,d/c)}}function s(t,i){1===(void 0===t.buttons?t.which:t.buttons)?o(t,t,i):n=!1}function a(t,i){1===t.touches.length?o(t,t.touches[0],i):n=!1}t.add(i,"mousedown",(function(t){s(t,!0)})),t.add(i,"touchstart",(function(t){a(t,!0)})),t.add(window,"mousemove",s),t.add(i,"touchmove",a),t.add(window,"mouseup",(function(){n=!1})),t.add(i,"touchend",(function(){n=!1})),t.add(i,"touchcancel",(function(){n=!1}))}var h="keydown",c="mousedown",l="focusin";function u(t,i){return(i||document).querySelector(t)}function d(t){t.preventDefault(),t.stopPropagation()}function f(t,i,e,n,r){t.add(i,h,(function(t){e.indexOf(t.key)>=0&&(r&&d(t),n(t))}))}var g=document.createElement("style");return g.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:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:stretch;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;-webkit-box-ordinal-group:2;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{-webkit-box-ordinal-group:2;order:1;-webkit-box-flex:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{-webkit-box-ordinal-group:2;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 dodgerblue}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:whitesmoke;background-image:-webkit-gradient(linear, left bottom, left top, from(gainsboro), to(transparent));background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:-webkit-gradient(linear, left bottom, left top, from(transparent), to(gainsboro));background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:white}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;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:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));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:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));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, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;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,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(g),function(){function e(i){t(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new s,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(i)}return i(e,[{key:"setOptions",value:function(t){var i=this;if(t){var e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(this._events.remove(e.parent),this._popupInited=!1),function(t,i,e){for(var n in t)e&&e.indexOf(n)>=0||(i[n]=t[n])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var n=t.color||t.colour;n&&this._setColor(n)}var r=e.parent;if(r&&e.popup&&!this._popupInited){var o=function(t){return i.openHandler(t)};this._events.add(r,"click",o),f(this._events,r,[" ","Spacebar","Enter"],o),this._popupInited=!0}else t.parent&&!e.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var i=t&&t.type===h?this._domEdit:this.domElement;setTimeout((function(){return i.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var i=t&&t.type,e=!1;t?i===c||i===l?t.timeStamp>(this.__containedEvent||0)+100&&(e=!0):(d(t),e=!0):e=!0,e&&this.hide()&&(this.settings.parent.style.pointerEvents="",i!==c&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,i){this.closeHandler(),this.setOptions(t),i&&this.openHandler()}},{key:"setColor",value:function(t,i){this._setColor(t,{silent:i})}},{key:"_setColor",value:function t(i,e){if("string"==typeof i&&(i=i.trim()),i){e=e||{};var n=void 0;try{n=new o(i)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,i){this.setColor(t,i)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var i=function(t){var i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}(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>');return this.domElement=i,this._domH=u(".picker_hue",i),this._domSL=u(".picker_sl",i),this._domA=u(".picker_alpha",i),this._domEdit=u(".picker_editor input",i),this._domSample=u(".picker_sample",i),this._domOkay=u(".picker_done button",i),this._domCancel=u(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.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 t=this,i=this,e=this.domElement,n=this._events;function r(t,i,e){n.add(t,i,e)}r(e,"click",(function(t){return t.preventDefault()})),a(n,this._domH,(function(t){return i._setHSLA(t)})),a(n,this._domSL,(function(t,e){return i._setHSLA(null,t,1-e)})),this.settings.alpha&&a(n,this._domA,(function(t,e){return i._setHSLA(null,null,null,1-e)}));var o=this._domEdit;r(o,"input",(function(){i._setColor(this.value,{fromEditor:!0,failSilently:!0})})),r(o,"focus",(function(){var t=this;t.selectionStart===t.selectionEnd&&t.select()})),this._ifPopup((function(){var i=function(i){return t.closeHandler(i)};r(window,c,i),r(window,l,i),f(n,e,["Esc","Escape"],i);var o=function(i){t.__containedEvent=i.timeStamp};r(e,c,o),r(e,l,o),r(t._domCancel,"click",i)}));var s=function(i){t._ifPopup((function(){return t.closeHandler(i)})),t.onDone&&t.onDone(t.colour)};r(this._domOkay,"click",s),f(n,e,["Enter"],s)}},{key:"_setPosition",value:function(){var t=this.settings.parent,i=this.domElement;t!==i.parentNode&&t.appendChild(i),this._ifPopup((function(e){"static"===getComputedStyle(t).position&&(t.style.position="relative");var n=!0===e?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===n?i.classList.add(t):i.classList.remove(t)})),i.classList.add(n)}))}},{key:"_setHSLA",value:function(t,i,e,n,r){r=r||{};var o=this.colour,s=o.hsla;[t,i,e,n].forEach((function(t,i){(t||0===t)&&(s[i]=t)})),o.hsla=s,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(o)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var i=this.colour,e=i.hsla,n="hsl("+360*e[0]+", 100%, 50%)",r=i.hslString,o=i.hslaString,s=this._domH,a=this._domSL,h=this._domA,c=u(".picker_selector",s),l=u(".picker_selector",a),d=u(".picker_selector",h);I(0,c,e[0]),this._domSL.style.backgroundColor=this._domH.style.color=n,I(0,l,e[1]),b(0,l,1-e[2]),a.style.color=r,b(0,d,1-e[3]);var f=r,g=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.backgroundImage="linear-gradient("+[f,g]+"), url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!t.fromEditor){var p=this.settings.alpha,m=void 0;switch(this.settings.editorFormat){case"rgb":m=i.printRGB(p);break;case"hsl":m=i.printHSL(p);break;default:m=i.printHex(p)}this._domEdit.value=m}this._domSample.style.color=o}function I(t,i,e){i.style.left=100*e+"%"}function b(t,i,e){i.style.top=100*e+"%"}}},{key:"_ifPopup",value:function(t,i){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):i&&i()}},{key:"_toggleDOM",value:function(t){var i=this.domElement;if(!i)return!1;var e=t?"":"none",n=i.style.display!==e;return n&&(i.style.display=e),n}}],[{key:"StyleElement",get:function(){return g}}]),e}()}()}},e={},t.amdD=function(){throw new Error("define cannot be used indirect")},t.n=function(i){var e=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(e,{a:e}),e},t.d=function(i,e){for(var n in e)t.o(e,n)&&!t.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:e[n]})},t.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},t(3161);function t(n){var r=e[n];return void 0!==r||(r=e[n]={id:n,loaded:!1,exports:{}},i[n].call(r.exports,r,r.exports,t),r.loaded=!0),r.exports}var i,e}()}))),d=class{constructor(e){t(this,e),this.validityChanged=i(this,"validityChanged",7),this.inputBlurred=i(this,"inputBlurred",7),this.inputFocused=i(this,"inputFocused",7),this.inputChanged=i(this,"inputChanged",7),this.validators=[]}onRequireChanged(){this.validate()}onReadonlyChanged(){setTimeout((()=>this.componentDidLoad()),300)}componentWillLoad(){h(this)}componentDidLoad(){this.containerEl&&(this.jsonEditor=new u(this.containerEl,{mode:this.readonly?"view":"text",modes:["code","form","text","tree","view"],onChange:this.readonly?null:()=>this.onChange()}),this.jsonEditor.set(this.value?this.value:{})),this.copyButtonEl&&(this.copyIntance=new l(this.copyButtonEl,{text:()=>{try{const t=this.jsonEditor.get();return JSON.stringify(t,null,4)}catch(t){}}}))}disconnectedCallback(){this.jsonEditor&&this.jsonEditor.destroy(),this.copyIntance&&this.copyIntance.destroy()}onChange(){try{const t=this.jsonEditor.get();c(t,this)}catch(t){}}onChangeMode(t){this.jsonEditor&&this.jsonEditor.setMode(t)}validate(){let t=!0;return this.required&&!this.value&&(t=!1),this.validity=t,this.validityChanged.emit(t),this.validity}renderBase(){return[e("div",{class:"toolbar"},e("yoo-header",{class:"transparent"},e("yoo-navbar",null,e("yoo-items",{class:"icons",slot:"start"},e("yoo-tooltip",{placement:"bottom",content:s("YOOBICFORM")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("form")},e("yoo-icon",{size:"small",name:"list-view"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICTEXT")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("text")},e("yoo-icon",{size:"small",name:"align-left"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICTREE")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("tree")},e("yoo-icon",{size:"small",name:"single-choice"}))),e("yoo-tooltip",{placement:"bottom",content:s("YOOBICVIEW")},e("yoo-button",{color:"light-to-dark",size:"medium",onClick:()=>this.onChangeMode("view")},e("yoo-icon",{size:"small",name:"eye"}))),e("yoo-tooltip",{placement:"bottom",content:s("COPYTOCLIPBOARD")},e("yoo-button",{color:"light-to-dark",size:"medium",ref:t=>this.copyButtonEl=t},e("yoo-icon",{size:"small",name:"duplicate"}))))))),e("div",{class:"container swiper-no-swiping",ref:t=>this.containerEl=t})]}renderReadonly(){const t=a(this.value);return t&&e("pre",null,e("span",{innerHTML:t}))}renderEditable(){return this.renderBase()}render(){return this.readonly?this.renderReadonly():this.renderEditable()}static get watchers(){return{required:["onRequireChanged"],readonly:["onReadonlyChanged"]}}};d.style=':root {\n --ease-in-back: cubic-bezier(0.36, 0, 0.66, -0.56);\n --ease-in-circ: cubic-bezier(0.55, 0, 1, 0.45);\n --ease-in-cubic: cubic-bezier(0.32, 0, 0.67, 0);\n --ease-in-expo: cubic-bezier(0.7, 0, 0.84, 0);\n --ease-in-quad: cubic-bezier(0.11, 0, 0.5, 0);\n --ease-in-quart: cubic-bezier(0.5, 0, 0.75, 0);\n --ease-in-quint: cubic-bezier(0.64, 0, 0.78, 0);\n --ease-in-sine: cubic-bezier(0.12, 0, 0.39, 0);\n --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);\n --ease-out-circ: cubic-bezier(0, 0.55, 0.45, 1);\n --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);\n --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);\n --ease-out-quad: cubic-bezier(0.5, 1, 0.89, 1);\n --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);\n --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);\n --ease-out-sine: cubic-bezier(0.61, 1, 0.88, 1);\n --ease-in-out-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);\n --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);\n --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);\n --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);\n --ease-in-out-quad: cubic-bezier(0.45, 0, 0.55, 1);\n --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);\n --ease-in-out-quint: cubic-bezier(0.83, 0, 0.17, 1);\n --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);\n}\n\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n/* Z-Index (Ionic)\n--------------------------------------------------\nGrouped by elements which would be siblings */\n/* Hairlines width */\n/* Default Colors\n---------------------------------- */\n/* Private color variables */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff;*/\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* #3880ff; */\n/* Color map should provide\n- base: main color to be used.\n- contrast: Color that will provide readable text against the base color\n- shade: 12% darker version of the base color (mix with black)\n- tint: 10% lighter version of the base color (mix with white) */\n/* Themed Colors\n\n Default Foreground and Background Colors values\n Allows users to override an foreground / background colors\n $background-color-value: $light !default;\n $background-color-rgb: 255, 255, 255 !default; */\n/* Default Foreground and Background Colors\n-------------------------------------------------- */\n/* Default General Colors\n-------------------------------------------------- */\n/* Default List & List Items\n-------------------------------------------------- */\n/* Item Divider */\n/* iOS List & List Items\n-------------------------------------------------- */\n/* Default Toolbar\n--------------------------------------------------*/\n/* iOS Toolbar\n--------------------------------------------------*/\n/* Default Tabs & Tab bar\n--------------------------------------------------*/\n/* iOS Tabs & Tab bar\n--------------------------------------------------*/\n/* Function related variables\n--------------------------------------------------*/\n/* Gets the active color\'s css variable from a variation. Alpha is optional.\n--------------------------------------------------------------------------------------------\nExample usage:\ncurrent-color(base) => var(--ion-color-base)\ncurrent-color(contrast, 0.1) => rgba(var(--ion-color-contrast-rgb), 0.1)\n--------------------------------------------------------------------------------------------*/\n/* Gets the specific color\'s css variable from the name and variation. Alpha/rgb are optional.\n--------------------------------------------------------------------------------------------\nExample usage:\nion-color(primary, base) => var(--ion-color-primary, #3880ff)\nion-color(secondary, contrast) => var(--ion-color-secondary-contrast)\nion-color(primary, base, 0.5) => rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.5)\n--------------------------------------------------------------------------------------------*/\n/* Mixes a color with black to create its shade.\n--------------------------------------------------------------------------------------------*/\n/*Mixes a color with white to create its tint.\n--------------------------------------------------------------------------------------------*/\n/* Converts a color to a comma separated rgb.\n--------------------------------------------------------------------------------------------*/\n/* Creates a pulse animation.\n @param {color} $begin-color [stable-20] - starting color for pulse.\n @param {color} $end-color [stable-20] - ending color for pulse.\n @author Ben Morgan\n @author Damien Arondel \n*/\n/* Execute a content if the hover state is supported.\n\n @content the content to execute if relevant\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Properly hide overflow on rounded corner elements for Webkit based browsers.\n This mixin must be used at the same level as `overflow: hidden` and `border-radius: ...`.\n\n @link https://gist.github.com/ayamflow/b602ab436ac9f05660d9c15190f4fd7\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Truncate every overflown elements with an ellipsis.\n This mixin does not work with flex box on the same level.\n\n @author Ben Morgan\n @author Damien Arondel\n*/\n/* Truncate text at a specific number of lines.\n */\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n/* https://web-design-weekly.com/2013/05/12/handy-sass-mixins/ */\n/* Single side border-radius */\n/* Text Direction - ltr / rtl\n$app-direction: multi | rtl | ltr | null (default)\nmulti: Both [dir=ltr] and [dir=rtl] are applied to css selectors.\nrtl: Always assumes rtl and only includes rtl css. No [dir] selectors.\nltr: Always assumes ltr and only includes ltr css. No [dir] selectors.\nnull: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override ltr defaults.\n---------------------------------------------------------- */\n/* Add property horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add property for all directions\n @param {string} $prop\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n @param {boolean} $content include content or use default\n----------------------------------------------------------*/\n/* Add margin for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/* Add padding for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/*Font smoothing\n--------------------------------------------------*/\n/* SVG Background Image Mixin\n @param {string} $svg\n----------------------------------------------------------*/\n/* Add padding horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add margin horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add safe area padding horizontal\n @param {string} $start\n @param {string} $end\n----------------------------------------------------------*/\n/* Add border radius for all directions\n @param {string} $top-start\n @param {string} $top-end\n @param {string} $bottom-end\n @param {string} $bottom-start\n----------------------------------------------------------*/\n/* Sets correct text align with support for old browsers\n @param {string} $direction - text direction\n @param {string} $decorator - !important\n----------------------------------------------------------*/\n/* Add position for all directions\n @param {string} $top\n @param {string} $end\n @param {string} $bottom\n @param {string} $start\n----------------------------------------------------------*/\n/* Add position horizontal\n @param {string} $start - amount to position start\n @param {string} $end - amount to left: 0; end\n----------------------------------------------------------*/\n/* aspect ratios => use mixins\n aspect-ratio value can be "16,9", "3,2", "4,3", "1,1", "3,4", "2,3"\n Example:\n img {\n @include aspect-ratio(16,9);\n }\n*/\n/**\n * NOTE DO NOT USE FOR NEW COMPONENTS\n * LEGACY CODE -- Styles maintained only to prevent breaking changes\n * For all Font Sizes please use the appropreate font-size-XX Variables.\n */\n/**\n* Global style mixin for being able to change the background / font-color and border-color\n* programmatically using global classes\n*/\n.tippy-box,\n.tippy-popper {\n white-space: pre-wrap;\n}\n.tippy-box .tippy-tooltip,\n.tippy-popper .tippy-tooltip {\n padding: var(--spacing-02, 0.125rem);\n}\n\n.tippy-box {\n -webkit-box-shadow: var(--shadow-03, 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.1));\n box-shadow: var(--shadow-03, 0 0.5rem 1rem 0 rgba(0, 0, 0, 0.1));\n}\n.tippy-box .tippy-content.editable {\n padding: 0;\n}\n.tippy-box .tippy-content .flex {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n.tippy-box .tippy-content .hidden {\n display: none;\n}\n.tippy-box .tippy-content .editable-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n color: var(--dark, #000000);\n}\n.tippy-box .tippy-content .editable-content .text-content {\n min-width: 5rem;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.tippy-box .tippy-content .editable-content .text-content > div {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.tippy-box .tippy-content .editable-content.readonly {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .maxchar-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-item-align: end;\n align-self: flex-end;\n height: var(--spacing-24, 1.5rem);\n padding-right: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .action-content {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n}\n.tippy-box .tippy-content .editable-content .action-content yoo-button {\n padding: 0 var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .editable-content .action-content .edit-content {\n -ms-flex-align: center;\n align-items: center;\n}\n.tippy-box .tippy-content .editable-content .action-content .edit-content yoo-icon {\n padding-left: var(--spacing-08, 0.5rem);\n cursor: pointer;\n}\n.tippy-box .tippy-content .editable-content .edit-content > * {\n cursor: pointer;\n}\n.tippy-box .tippy-content .request-access {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box .tippy-content .request-access .title {\n margin-bottom: var(--spacing-08, 0.5rem);\n font-weight: var(--font-weight-700, 700);\n}\n.tippy-box .tippy-content .request-access .sub-title {\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--spacing-08, 0.5rem);\n font-weight: var(--font-weight-300, 300);\n font-size: var(--font-size-14, 0.875rem);\n}\n.tippy-box .tippy-content .request-access .sub-title yoo-avatar {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n.tippy-box .tippy-content .request-access yoo-button {\n max-width: 8rem;\n}\n\n.tippy-box[data-theme~=startameeting] .tippy-content {\n padding: 0;\n border-radius: var(--border-radius-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=large] {\n font-size: var(--font-size-16, 1rem);\n}\n.tippy-box[data-theme~=large] .tippy-content {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content {\n padding: var(--spacing-04, 0.25rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content .text-content {\n padding-right: var(--spacing-16, 1rem);\n}\n.tippy-box[data-theme~=large] .tippy-content .editable-content yoo-icon {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=small] {\n font-size: var(--font-size-16, 1rem);\n}\n.tippy-box[data-theme~=small] .tippy-content {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content {\n padding: var(--spacing-04, 0.25rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content .text-content {\n padding-right: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=small] .tippy-content .editable-content yoo-icon {\n margin: 0 var(--spacing-04, 0.25rem);\n}\n\n.tippy-box[data-theme~=accent] {\n background-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=accent] .tippy-svg-arrow {\n fill: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--accent, #276ef1);\n}\n.tippy-box[data-theme~=accent][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--accent, #276ef1);\n}\n\n.tippy-box[data-theme~=anthracite] {\n background-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=anthracite] .tippy-svg-arrow {\n fill: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--anthracite, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--anthracite, #1a1a1a);\n}\n\n.tippy-box[data-theme~=app-color] {\n background-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=app-color] .tippy-svg-arrow {\n fill: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--app-color);\n}\n.tippy-box[data-theme~=app-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--app-color);\n}\n\n.tippy-box[data-theme~=danger] {\n background-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=danger] .tippy-svg-arrow {\n fill: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--danger, #d44333);\n}\n.tippy-box[data-theme~=danger][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--danger, #d44333);\n}\n\n.tippy-box[data-theme~=danger-light] {\n background-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=danger-light] .tippy-svg-arrow {\n fill: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--danger-light, #f46885);\n}\n.tippy-box[data-theme~=danger-light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--danger-light, #f46885);\n}\n\n.tippy-box[data-theme~=dark] {\n background-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=dark] .tippy-svg-arrow {\n fill: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--dark, #000000);\n}\n.tippy-box[data-theme~=dark][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--dark, #000000);\n}\n\n.tippy-box[data-theme~=energized] {\n background-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=energized] .tippy-svg-arrow {\n fill: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--energized, #fed05b);\n}\n.tippy-box[data-theme~=energized][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--energized, #fed05b);\n}\n\n.tippy-box[data-theme~=info] {\n background-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=info] .tippy-svg-arrow {\n fill: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--info, #fc459e);\n}\n.tippy-box[data-theme~=info][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--info, #fc459e);\n}\n\n.tippy-box[data-theme~=light] {\n background-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light] .tippy-svg-arrow {\n fill: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light, #ffffff);\n}\n.tippy-box[data-theme~=light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light, #ffffff);\n}\n\n.tippy-box[data-theme~=light-orange] {\n background-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light-orange] .tippy-svg-arrow {\n fill: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light-orange, #fcae49);\n}\n.tippy-box[data-theme~=light-orange][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light-orange, #fcae49);\n}\n\n.tippy-box[data-theme~=light-to-text-color] {\n background-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=light-to-text-color] .tippy-svg-arrow {\n fill: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--light-to-text-color, #ffffff);\n}\n.tippy-box[data-theme~=light-to-text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--light-to-text-color, #ffffff);\n}\n\n.tippy-box[data-theme~=royal] {\n background-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=royal] .tippy-svg-arrow {\n fill: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--royal, #7577ff);\n}\n.tippy-box[data-theme~=royal][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--royal, #7577ff);\n}\n\n.tippy-box[data-theme~=stable] {\n background-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable] .tippy-svg-arrow {\n fill: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable, #adadad);\n}\n.tippy-box[data-theme~=stable][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable, #adadad);\n}\n\n.tippy-box[data-theme~=stable-alt] {\n background-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-alt] .tippy-svg-arrow {\n fill: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-alt, #d0d0d0);\n}\n.tippy-box[data-theme~=stable-alt][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-alt, #d0d0d0);\n}\n\n.tippy-box[data-theme~=stable-light] {\n background-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-light] .tippy-svg-arrow {\n fill: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-light, #f1f1f1);\n}\n.tippy-box[data-theme~=stable-light][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-light, #f1f1f1);\n}\n\n.tippy-box[data-theme~=stable-ultralight] {\n background-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=stable-ultralight] .tippy-svg-arrow {\n fill: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--stable-ultralight, #fafafa);\n}\n.tippy-box[data-theme~=stable-ultralight][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--stable-ultralight, #fafafa);\n}\n\n.tippy-box[data-theme~=success] {\n background-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=success] .tippy-svg-arrow {\n fill: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--success, #3aa76d);\n}\n.tippy-box[data-theme~=success][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--success, #3aa76d);\n}\n\n.tippy-box[data-theme~=text-color] {\n background-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=text-color] .tippy-svg-arrow {\n fill: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--text-color, #807f83);\n}\n.tippy-box[data-theme~=text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--text-color, #807f83);\n}\n\n.tippy-box[data-theme~=warning] {\n background-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=warning] .tippy-svg-arrow {\n fill: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--warning, #ff6402);\n}\n.tippy-box[data-theme~=warning][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--warning, #ff6402);\n}\n\n.tippy-box[data-theme~=anthracite-to-text-color] {\n background-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color] .tippy-tooltip {\n padding: var(--spacing-08, 0.5rem);\n}\n.tippy-box[data-theme~=anthracite-to-text-color] .tippy-svg-arrow {\n fill: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=top] > .tippy-arrow::before {\n border-top-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=left] > .tippy-arrow::before {\n border-left-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n.tippy-box[data-theme~=anthracite-to-text-color][data-placement^=right] > .tippy-arrow::before {\n border-right-color: var(--anthracite-to-text-color, #1a1a1a);\n}\n\n/* app direction */\n/* border-radius */\n/* border-width */\n/* font family */\n/* font-size */\n/* font weights */\n/* icon size */\n/* used for logos */\n/* spacing for padding, margin, etc... */\n/* shadow */\n:root {\n --safe-area-inset-top: 0;\n --safe-area-inset-right: 0;\n --safe-area-inset-bottom: 0;\n --safe-area-inset-left: 0;\n}\n@supports (top: constant(safe-area-inset-top)) {\n :root {\n --safe-area-inset-top: constant(safe-area-inset-top);\n --safe-area-inset-right: constant(safe-area-inset-right);\n --safe-area-inset-bottom: constant(safe-area-inset-bottom);\n --safe-area-inset-left: constant(safe-area-inset-left);\n }\n}\n@supports (top: env(safe-area-inset-top)) {\n :root {\n --safe-area-inset-top: env(safe-area-inset-top);\n --safe-area-inset-right: env(safe-area-inset-right);\n --safe-area-inset-bottom: env(safe-area-inset-bottom);\n --safe-area-inset-left: env(safe-area-inset-left);\n }\n}\n\n.fr-popup.fr-active {\n z-index: 30004 !important;\n display: block !important;\n opacity: 1 !important;\n}\n\n:host {\n width: 100%;\n .jsoneditor input,.jsoneditor input:not([type]),.jsoneditor input[type=search],.jsoneditor input[type=text],.jsoneditor-modal input,.jsoneditor-modal input:not([type]),.jsoneditor-modal input[type=search],.jsoneditor-modal input[type=text]{height:auto;border:inherit;-webkit-box-shadow:none;box-shadow:none;font-size:inherit;-webkit-box-sizing:inherit;box-sizing:inherit;padding:inherit;font-family:inherit;-webkit-transition:none;transition:none;line-height:inherit}.jsoneditor input:focus,.jsoneditor input:not([type]):focus,.jsoneditor input[type=search]:focus,.jsoneditor input[type=text]:focus,.jsoneditor-modal input:focus,.jsoneditor-modal input:not([type]):focus,.jsoneditor-modal input[type=search]:focus,.jsoneditor-modal input[type=text]:focus{border:inherit;-webkit-box-shadow:inherit;box-shadow:inherit}.jsoneditor textarea,.jsoneditor-modal textarea{height:inherit}.jsoneditor select,.jsoneditor-modal select{display:inherit;height:inherit}.jsoneditor label,.jsoneditor-modal label{font-size:inherit;font-weight:inherit;color:inherit}.jsoneditor table,.jsoneditor-modal table{border-collapse:collapse;width:auto}.jsoneditor td,.jsoneditor th,.jsoneditor-modal td,.jsoneditor-modal th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.jsoneditor .autocomplete.dropdown{position:absolute;background:#fff;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);border:1px solid #d3d3d3;overflow-x:hidden;overflow-y:auto;cursor:default;margin:0;padding:5px;text-align:left;outline:0;font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt}.jsoneditor .autocomplete.dropdown .item{color:#1a1a1a}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ebebeb}.jsoneditor .autocomplete.hint{color:#a1a1a1;top:4px;left:4px}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;z-index:2}.jsoneditor-contextmenu .jsoneditor-menu{position:relative;left:0;top:0;width:128px;height:auto;background:#fff;border:1px solid #d3d3d3;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 8px 0 0;margin:0;width:128px;height:auto;border:none;cursor:pointer;color:#4d4d4d;background:0 0;font-size:10pt;font-family:arial,sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:left}.jsoneditor-contextmenu .jsoneditor-menu button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-default{width:96px}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu .jsoneditor-menu li{overflow:hidden}.jsoneditor-contextmenu .jsoneditor-menu li ul{display:none;position:relative;left:-10px;top:0;border:none;-webkit-box-shadow:inset 0 0 10px rgba(128,128,128,.5);box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu .jsoneditor-menu li ul .jsoneditor-icon{margin-left:24px}.jsoneditor-contextmenu .jsoneditor-menu li ul li button{padding-left:24px;-webkit-animation:all ease-in-out 1s;animation:all ease-in-out 1s}.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(img/jsoneditor-icons.svg);background-position:0 -72px}.jsoneditor-contextmenu .jsoneditor-icon{position:absolute;top:0;left:0;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(img/jsoneditor-icons.svg)}.jsoneditor-contextmenu .jsoneditor-text{padding:4px 0 4px 24px;word-wrap:break-word}.jsoneditor-contextmenu .jsoneditor-text.jsoneditor-right-margin{padding-right:24px}.jsoneditor-contextmenu .jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.jsoneditor-remove .jsoneditor-icon{background-position:-24px 0}.jsoneditor-contextmenu button.jsoneditor-append .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-insert .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-duplicate .jsoneditor-icon{background-position:-48px 0}.jsoneditor-contextmenu button.jsoneditor-sort-asc .jsoneditor-icon{background-position:-168px 0}.jsoneditor-contextmenu button.jsoneditor-sort-desc .jsoneditor-icon{background-position:-192px 0}.jsoneditor-contextmenu button.jsoneditor-transform .jsoneditor-icon{background-position:-216px 0}.jsoneditor-contextmenu button.jsoneditor-extract .jsoneditor-icon{background-position:0 -24px}.jsoneditor-contextmenu button.jsoneditor-type-string .jsoneditor-icon{background-position:-144px 0}.jsoneditor-contextmenu button.jsoneditor-type-auto .jsoneditor-icon{background-position:-120px 0}.jsoneditor-contextmenu button.jsoneditor-type-object .jsoneditor-icon{background-position:-72px 0}.jsoneditor-contextmenu button.jsoneditor-type-array .jsoneditor-icon{background-position:-96px 0}.jsoneditor-contextmenu button.jsoneditor-type-modes .jsoneditor-icon{background-image:none;width:6px}.jsoneditor-contextmenu li,.jsoneditor-contextmenu ul{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative}.jsoneditor-contextmenu .jsoneditor-menu button:focus,.jsoneditor-contextmenu .jsoneditor-menu button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:focus,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}.jsoneditor-contextmenu .jsoneditor-menu li ul li button:focus,.jsoneditor-contextmenu .jsoneditor-menu li ul li button:hover{background-color:#f5f5f5}.jsoneditor-modal{max-width:95%;border-radius:2px!important;padding:45px 15px 15px 15px!important;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3);color:#4d4d4d;line-height:1.3em}.jsoneditor-modal.jsoneditor-modal-transform{width:600px!important}.jsoneditor-modal .pico-modal-header{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;width:100%;padding:0 10px;height:30px;line-height:30px;font-family:arial,sans-serif;font-size:11pt;background:#3883fa;color:#fff}.jsoneditor-modal table{width:100%}.jsoneditor-modal table td{padding:3px 0}.jsoneditor-modal table td.jsoneditor-modal-input{text-align:right;padding-right:0;white-space:nowrap}.jsoneditor-modal table td.jsoneditor-modal-actions{padding-top:15px}.jsoneditor-modal table th{vertical-align:middle}.jsoneditor-modal p:first-child{margin-top:0}.jsoneditor-modal a{color:#3883fa}.jsoneditor-modal .jsoneditor-jmespath-block{margin-bottom:10px}.jsoneditor-modal .pico-close{background:0 0!important;font-size:24px!important;top:7px!important;right:7px!important;color:#fff}.jsoneditor-modal input{padding:4px}.jsoneditor-modal input[type=text]{cursor:inherit}.jsoneditor-modal input[disabled]{background:#d3d3d3;color:grey}.jsoneditor-modal .jsoneditor-select-wrapper{position:relative;display:inline-block}.jsoneditor-modal .jsoneditor-select-wrapper:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #666;position:absolute;right:8px;top:14px;pointer-events:none}.jsoneditor-modal select{padding:3px 24px 3px 10px;min-width:180px;max-width:350px;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:0;text-overflow:"";font-size:10pt;line-height:1.5em}.jsoneditor-modal select::-ms-expand{display:none}.jsoneditor-modal .jsoneditor-button-group input{padding:4px 10px;margin:0;border-radius:0;border-left-style:none}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left-style:solid}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.jsoneditor-modal .jsoneditor-transform-preview{background:#f5f5f5;height:200px}.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error{color:#ee422e}.jsoneditor-modal .jsoneditor-jmespath-wizard{line-height:1.2em;width:100%;padding:0;border-radius:3px}.jsoneditor-modal .jsoneditor-jmespath-label{font-weight:700;color:#1e90ff;margin-top:20px;margin-bottom:5px}.jsoneditor-modal .jsoneditor-jmespath-wizard-table{width:100%;border-collapse:collapse}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px 0}.jsoneditor-modal .jsoneditor-inline{position:relative;display:inline-block;width:100%;padding-top:2px;padding-bottom:2px}.jsoneditor-modal .jsoneditor-inline:not(:last-child){padding-right:2px}.jsoneditor-modal .jsoneditor-jmespath-filter{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.jsoneditor-modal .jsoneditor-jmespath-filter-field{width:180px}.jsoneditor-modal .jsoneditor-jmespath-filter-relation{width:100px}.jsoneditor-modal .jsoneditor-jmespath-filter-value{min-width:180px;-ms-flex:1;flex:1}.jsoneditor-modal .jsoneditor-jmespath-sort-field{width:170px}.jsoneditor-modal .jsoneditor-jmespath-sort-order{width:150px}.jsoneditor-modal .jsoneditor-jmespath-select-fields{width:100%}.jsoneditor-modal .selectr-selected{border-color:#d3d3d3;padding:4px 28px 4px 8px}.jsoneditor-modal .selectr-selected .selectr-tag{background-color:#3883fa;border-radius:5px}.jsoneditor-modal table td,.jsoneditor-modal table th{text-align:left;vertical-align:middle;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal input[type=text]:focus,.jsoneditor-modal select,.jsoneditor-modal textarea{background:#fff;border:1px solid #d3d3d3;color:#4d4d4d;border-radius:3px;padding:4px}.jsoneditor-modal,.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal option,.jsoneditor-modal select,.jsoneditor-modal table td,.jsoneditor-modal table th,.jsoneditor-modal textarea{font-size:10.5pt;font-family:arial,sans-serif}.jsoneditor-modal #query,.jsoneditor-modal .jsoneditor-transform-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.jsoneditor-modal input[type=button],.jsoneditor-modal input[type=submit]{background:#f5f5f5;padding:4px 20px}.jsoneditor-modal input,.jsoneditor-modal select{cursor:pointer}.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc{background:#3883fa;border-color:#3883fa;color:#fff}.jsoneditor{color:#1a1a1a;border:thin solid #3883fa;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;position:relative;padding:0;line-height:100%}div.jsoneditor-default,div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-value.jsoneditor-empty::after{content:"value"}div.jsoneditor-value.jsoneditor-string{color:#006000}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ed0}div.jsoneditor-value.jsoneditor-color-value{color:#1a1a1a}div.jsoneditor-value.jsoneditor-invalid{color:#1a1a1a}div.jsoneditor-readonly{min-width:16px;color:grey}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty::after{content:"field"}div.jsoneditor td{vertical-align:top}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:grey}div.jsoneditor td.jsoneditor-tree{vertical-align:top}div.jsoneditor.busy pre.jsoneditor-preview{background:#f5f5f5;color:grey}div.jsoneditor.busy div.jsoneditor-busy{display:inherit}div.jsoneditor code.jsoneditor-preview{background:0 0}div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview{width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;padding:2px;margin:0;white-space:pre-wrap;word-break:break-all}div.jsoneditor-default{color:grey;padding-left:10px}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background-color:transparent;background-image:url(img/jsoneditor-icons.svg)}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu-button{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background-image:url(img/jsoneditor-icons.svg);background-position:-72px -72px;cursor:move}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree div.jsoneditor-show-more{display:inline-block;padding:3px 4px;margin:2px 0;background-color:#e5e5e5;border-radius:3px;color:grey;font-family:arial,sans-serif;font-size:10pt}div.jsoneditor-tree div.jsoneditor-show-more a{display:inline-block;color:grey}div.jsoneditor-tree div.jsoneditor-color{display:inline-block;width:12px;height:12px;margin:4px;border:1px solid grey;cursor:pointer}div.jsoneditor-tree div.jsoneditor-date{background:#a1a1a1;color:#fff;font-family:arial,sans-serif;border-radius:3px;display:inline-block;padding:3px;margin:0 3px}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%}div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}div.jsoneditor-outer{position:static;width:100%;height:100%;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}div.jsoneditor-outer.has-nav-bar{margin-top:-26px;padding-top:26px}div.jsoneditor-outer.has-nav-bar.has-main-menu-bar{margin-top:-61px;padding-top:61px}div.jsoneditor-outer.has-status-bar{margin-bottom:-26px;padding-bottom:26px}div.jsoneditor-outer.has-main-menu-bar{margin-top:-35px;padding-top:35px}div.jsoneditor-busy{position:absolute;top:15%;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;text-align:center;display:none}div.jsoneditor-busy span{background-color:#ffffab;border:1px solid #fe0;border-radius:3px;padding:5px 15px;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4);box-shadow:0 0 5px rgba(0,0,0,.4)}div.jsoneditor-field.jsoneditor-empty::after,div.jsoneditor-value.jsoneditor-empty::after{pointer-events:none;color:#d3d3d3;font-size:8pt}a.jsoneditor-value.jsoneditor-url,div.jsoneditor-value.jsoneditor-url{color:#006000;text-decoration:underline}a.jsoneditor-value.jsoneditor-url{display:inline-block;padding:2px;margin:2px}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#ffffab;border:1px solid #fe0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px}div.jsoneditor-tree button.jsoneditor-contextmenu-button.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu-button:focus,div.jsoneditor-tree button.jsoneditor-contextmenu-button:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button{background-position:-48px -48px}div.jsoneditor-tree div.jsoneditor-show-more a:focus,div.jsoneditor-tree div.jsoneditor-show-more a:hover{color:#ee422e}.ace-jsoneditor,textarea.jsoneditor-text{min-height:150px}.ace-jsoneditor *,textarea.jsoneditor-text *{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif}textarea.jsoneditor-text{width:100%;height:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#d3d3d3}tr.jsoneditor-selected button.jsoneditor-contextmenu-button,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}.jsoneditor-popover,.jsoneditor-schema-error,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value,pre.jsoneditor-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;color:#1a1a1a}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}.jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4);box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;padding:7px 10px;position:absolute;cursor:auto;width:200px}.jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;right:-14px;left:inherit;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;left:-14px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:"";display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-text-errors tr.jump-to-line:hover{text-decoration:underline;cursor:pointer}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;-webkit-animation:fade-in .3s linear 1,move-up .3s linear 1;animation:fade-in .3s linear 1,move-up .3s linear 1}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-validation-errors-container{max-height:130px;overflow-y:auto}.jsoneditor .jsoneditor-validation-errors{width:100%;overflow:hidden}.jsoneditor .jsoneditor-additional-errors{position:absolute;margin:auto;bottom:31px;left:calc(50% - 92px);color:grey;background-color:#ebebeb;padding:7px 15px;border-radius:8px}.jsoneditor .jsoneditor-additional-errors.visible{visibility:visible;opacity:1;-webkit-transition:opacity 2s linear;transition:opacity 2s linear}.jsoneditor .jsoneditor-additional-errors.hidden{visibility:hidden;opacity:0;-webkit-transition:visibility 0s 2s,opacity 2s linear;transition:visibility 0s 2s,opacity 2s linear}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;border-top:1px solid #ffc700}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor .jsoneditor-text-errors td pre{margin:0;white-space:normal}.jsoneditor .jsoneditor-text-errors tr{background-color:#ffffab}.jsoneditor .jsoneditor-text-errors tr.parse-error{background-color:#ee2e2e70}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;cursor:pointer}.jsoneditor-text-errors tr .jsoneditor-schema-error{background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background-image:url(img/jsoneditor-icons.svg);background-position:-25px 0;background-color:transparent}.jsoneditor-anchor{cursor:pointer}.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.jsoneditor-modal input[type=search].selectr-input{border:1px solid #d3d3d3;width:calc(100% - 4px);margin:2px;padding:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.jsoneditor-modal button.selectr-input-clear{right:8px}.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}.jsoneditor-menu>.jsoneditor-modes>button,.jsoneditor-menu>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background-color:transparent;background-image:url(img/jsoneditor-icons.svg);color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}.jsoneditor-menu>.jsoneditor-modes>button:hover,.jsoneditor-menu>button:hover{background-color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:rgba(255,255,255,.3)}.jsoneditor-menu>.jsoneditor-modes>button:disabled,.jsoneditor-menu>button:disabled{opacity:.5;background-color:transparent;border:none}.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}.jsoneditor-menu>button.jsoneditor-sort{background-position:-120px -96px}.jsoneditor-menu>button.jsoneditor-transform{background-position:-144px -96px}.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-transform,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-transform{display:none}.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}.jsoneditor-menu>button.jsoneditor-repair{background-position:-96px -96px}.jsoneditor-menu>.jsoneditor-modes{display:inline-block;float:left}.jsoneditor-menu>.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor-menu>.jsoneditor-modes>button.jsoneditor-separator,.jsoneditor-menu>button.jsoneditor-separator{margin-left:10px}.jsoneditor-menu a{font-family:arial,sans-serif;font-size:10pt;color:#fff;opacity:.8;vertical-align:middle}.jsoneditor-menu a:hover{opacity:1}.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor-navigation-bar{width:100%;height:26px;line-height:26px;padding:0;margin:0;border-bottom:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:grey;background-color:#ebebeb;overflow:hidden;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-search{font-family:arial,sans-serif;position:absolute;right:4px;top:4px;border-collapse:collapse;border-spacing:0;display:-ms-flexbox;display:flex}.jsoneditor-search input{color:#1a1a1a;width:120px;border:none;outline:0;margin:1px;line-height:20px;font-family:arial,sans-serif}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(img/jsoneditor-icons.svg);vertical-align:top}.jsoneditor-search button:hover{background-color:transparent}.jsoneditor-search button.jsoneditor-refresh{width:18px;background-position:-99px -73px}.jsoneditor-search button.jsoneditor-next{cursor:pointer;background-position:-124px -73px}.jsoneditor-search button.jsoneditor-next:hover{background-position:-124px -49px}.jsoneditor-search button.jsoneditor-previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor-search button.jsoneditor-previous:hover{background-position:-148px -49px}.jsoneditor-results{font-family:arial,sans-serif;color:#fff;padding-right:5px;line-height:26px}.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}.jsoneditor-statusbar{line-height:26px;height:26px;color:grey;background-color:#ebebeb;border-top:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:10pt}.jsoneditor-statusbar>.jsoneditor-curserinfo-val{margin-right:12px}.jsoneditor-statusbar>.jsoneditor-curserinfo-count{margin-left:4px}.jsoneditor-statusbar>.jsoneditor-validation-error-icon{float:right;width:24px;height:24px;padding:0;margin-top:1px;background-image:url(img/jsoneditor-icons.svg);background-position:-168px -48px;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-validation-error-count{float:right;margin:0 4px 0 0;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-parse-error-icon{float:right;width:24px;height:24px;padding:0;margin:1px;background-image:url(img/jsoneditor-icons.svg);background-position:-25px 0}.jsoneditor-statusbar .jsoneditor-array-info a{color:inherit}div.jsoneditor-statusbar>.jsoneditor-curserinfo-label,div.jsoneditor-statusbar>.jsoneditor-size-info{margin:0 4px}.jsoneditor-treepath{padding:0 5px;overflow:hidden;white-space:nowrap;outline:0}.jsoneditor-treepath.show-all{word-wrap:break-word;white-space:normal;position:absolute;background-color:#ebebeb;z-index:1;-webkit-box-shadow:2px 2px 12px rgba(128,128,128,.3);box-shadow:2px 2px 12px rgba(128,128,128,.3)}.jsoneditor-treepath.show-all span.jsoneditor-treepath-show-all-btn{display:none}.jsoneditor-treepath div.jsoneditor-contextmenu-root{position:absolute;left:0}.jsoneditor-treepath .jsoneditor-treepath-show-all-btn{position:absolute;background-color:#ebebeb;left:0;height:20px;padding:0 3px;cursor:pointer}.jsoneditor-treepath .jsoneditor-treepath-element{margin:1px;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-treepath .jsoneditor-treepath-seperator{margin:2px;font-size:9pt;font-family:arial,sans-serif}.jsoneditor-treepath span.jsoneditor-treepath-element:hover,.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover{cursor:pointer;text-decoration:underline}/*!\n * Selectr 2.4.0\n * https://github.com/Mobius1/Selectr\n *\n * Released under the MIT license\n */.selectr-container{position:relative}.selectr-container li{list-style:none}.selectr-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:-1px;padding:0;border:0 none}.selectr-visible{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:11}.selectr-desktop.multiple .selectr-visible{display:none}.selectr-desktop.multiple.native-open .selectr-visible{top:100%;min-height:200px!important;height:auto;opacity:1;display:block}.selectr-container.multiple.selectr-mobile .selectr-selected{z-index:0}.selectr-selected{position:relative;z-index:1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:7px 28px 7px 14px;cursor:pointer;border:1px solid #999;border-radius:3px;background-color:#fff}.selectr-selected::before{position:absolute;top:50%;right:10px;width:0;height:0;content:"";-o-transform:rotate(0) translate3d(0,-50%,0);-ms-transform:rotate(0) translate3d(0,-50%,0);-moz-transform:rotate(0) translate3d(0,-50%,0);-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0);border-width:4px 4px 0 4px;border-style:solid;border-color:#6c7a86 transparent transparent}.selectr-container.native-open .selectr-selected::before,.selectr-container.open .selectr-selected::before{border-width:0 4px 4px 4px;border-style:solid;border-color:transparent transparent #6c7a86}.selectr-label{display:none;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.selectr-placeholder{color:#6c7a86}.selectr-tags{margin:0;padding:0;white-space:normal}.has-selected .selectr-tags{margin:0 0 -2px}.selectr-tag{list-style:none;position:relative;float:left;padding:2px 25px 2px 8px;margin:0 2px 2px 0;cursor:default;color:#fff;border:medium none;border-radius:10px;background:#acb7bf none repeat scroll 0 0}.selectr-container.multiple.has-selected .selectr-selected{padding:5px 28px 5px 5px}.selectr-options-container{position:absolute;z-index:10000;top:calc(100% - 1px);left:0;display:none;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;border-width:0 1px 1px;border-style:solid;border-color:transparent #999 #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.open .selectr-options-container{display:block}.selectr-input-container{position:relative;display:none}.selectr-clear,.selectr-input-clear,.selectr-tag-remove{position:absolute;top:50%;right:22px;width:20px;height:20px;padding:0;cursor:pointer;-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);border:medium none;background-color:transparent;z-index:11}.selectr-clear,.selectr-input-clear{display:none}.selectr-container.has-selected .selectr-clear,.selectr-input-container.active .selectr-input-clear{display:block}.selectr-selected .selectr-tag-remove{right:2px}.selectr-clear::after,.selectr-clear::before,.selectr-input-clear::after,.selectr-input-clear::before,.selectr-tag-remove::after,.selectr-tag-remove::before{position:absolute;top:5px;left:9px;width:2px;height:10px;content:" ";background-color:#6c7a86}.selectr-tag-remove::after,.selectr-tag-remove::before{top:4px;width:3px;height:12px;background-color:#fff}.selectr-clear:before,.selectr-input-clear::before,.selectr-tag-remove::before{-o-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.selectr-clear:after,.selectr-input-clear::after,.selectr-tag-remove::after{-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.selectr-input-container.active,.selectr-input-container.active .selectr-clear{display:block}.selectr-input{top:5px;left:5px;-webkit-box-sizing:border-box;box-sizing:border-box;width:calc(100% - 30px);margin:10px 15px;padding:7px 30px 7px 9px;border:1px solid #999;border-radius:3px}.selectr-notice{display:none;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.notice .selectr-notice{display:block}.selectr-container.notice .selectr-selected{border-radius:3px 3px 0 0}.selectr-options{position:relative;top:calc(100% + 2px);display:none;overflow-x:auto;overflow-y:scroll;max-height:200px;margin:0;padding:0}.selectr-container.notice .selectr-options-container,.selectr-container.open .selectr-input-container,.selectr-container.open .selectr-options{display:block}.selectr-option{position:relative;display:block;padding:5px 20px;list-style:outside none none;cursor:pointer;font-weight:400}.selectr-options.optgroups>.selectr-option{padding-left:25px}.selectr-optgroup{font-weight:700;padding:0}.selectr-optgroup--label{font-weight:700;margin-top:10px;padding:5px 15px}.selectr-match{text-decoration:underline}.selectr-option.selected{background-color:#ddd}.selectr-option.active{color:#fff;background-color:#5897fb}.selectr-option.disabled{opacity:.4}.selectr-option.excluded{display:none}.selectr-container.open .selectr-selected{border-color:#999 #999 transparent #999;border-radius:3px 3px 0 0}.selectr-container.open .selectr-selected::after{-o-transform:rotate(180deg) translate3d(0,50%,0);-ms-transform:rotate(180deg) translate3d(0,50%,0);-moz-transform:rotate(180deg) translate3d(0,50%,0);-webkit-transform:rotate(180deg) translate3d(0,50%,0);transform:rotate(180deg) translate3d(0,50%,0)}.selectr-disabled{opacity:.6}.has-selected .selectr-placeholder,.selectr-empty{display:none}.has-selected .selectr-label{display:block}.taggable .selectr-selected{padding:4px 28px 4px 4px}.taggable .selectr-selected::after{display:table;content:" ";clear:both}.taggable .selectr-label{width:auto}.taggable .selectr-tags{float:left;display:block}.taggable .selectr-placeholder{display:none}.input-tag{float:left;min-width:90px;width:auto}.selectr-tag-input{border:medium none;padding:3px 10px;width:100%;font-family:inherit;font-weight:inherit;font-size:inherit}.selectr-input-container.loading::after{position:absolute;top:50%;right:20px;width:20px;height:20px;content:"";-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-o-transform-origin:50% 0 0;-ms-transform-origin:50% 0 0;-moz-transform-origin:50% 0 0;-webkit-transform-origin:50% 0 0;transform-origin:50% 0 0;-moz-animation:.5s linear 0s normal forwards infinite running selectr-spin;-webkit-animation:.5s linear 0s normal forwards infinite running selectr-spin;animation:.5s linear 0s normal forwards infinite running selectr-spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}@keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}.selectr-container.open.inverted .selectr-selected{border-color:transparent #999 #999;border-radius:0 0 3px 3px}.selectr-container.inverted .selectr-options-container{border-width:1px 1px 0;border-color:#999 #999 transparent;border-radius:3px 3px 0 0;background-color:#fff}.selectr-container.inverted .selectr-options-container{top:auto;bottom:calc(100% - 1px)}.selectr-container ::-webkit-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-moz-placeholder{color:#6c7a86;opacity:1}.selectr-container :-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::placeholder{color:#6c7a86;opacity:1}\n}\n:host yoo-navbar {\n --top-container-padding: 0;\n}\n:host div.jsoneditor-menu a.jsoneditor-poweredBy {\n display: none;\n}\n:host div.jsoneditor {\n border: 0.0625rem solid var(--stable-alt, #d0d0d0);\n}\n:host div.jsoneditor html,\n:host div.jsoneditor body,\n:host div.jsoneditor div:not([class^=fr-]),\n:host div.jsoneditor span:not([class^=fr-]),\n:host div.jsoneditor img:not([class^=fr-]),\n:host div.jsoneditor applet,\n:host div.jsoneditor object,\n:host div.jsoneditor iframe,\n:host div.jsoneditor h1,\n:host div.jsoneditor h2,\n:host div.jsoneditor h3,\n:host div.jsoneditor h4,\n:host div.jsoneditor h5,\n:host div.jsoneditor h6,\n:host div.jsoneditor p,\n:host div.jsoneditor blockquote,\n:host div.jsoneditor pre,\n:host div.jsoneditor a,\n:host div.jsoneditor abbr,\n:host div.jsoneditor acronym,\n:host div.jsoneditor address,\n:host div.jsoneditor big,\n:host div.jsoneditor cite,\n:host div.jsoneditor code,\n:host div.jsoneditor del,\n:host div.jsoneditor dfn,\n:host div.jsoneditor em,\n:host div.jsoneditor font,\n:host div.jsoneditor ins,\n:host div.jsoneditor kbd,\n:host div.jsoneditor q,\n:host div.jsoneditor s,\n:host div.jsoneditor samp,\n:host div.jsoneditor small,\n:host div.jsoneditor strike,\n:host div.jsoneditor strong,\n:host div.jsoneditor sub,\n:host div.jsoneditor sup,\n:host div.jsoneditor tt,\n:host div.jsoneditor var,\n:host div.jsoneditor dl,\n:host div.jsoneditor dt,\n:host div.jsoneditor dd,\n:host div.jsoneditor ol,\n:host div.jsoneditor ul,\n:host div.jsoneditor li,\n:host div.jsoneditor fieldset,\n:host div.jsoneditor form,\n:host div.jsoneditor label,\n:host div.jsoneditor legend,\n:host div.jsoneditor table,\n:host div.jsoneditor caption,\n:host div.jsoneditor tbody,\n:host div.jsoneditor tfoot,\n:host div.jsoneditor thead,\n:host div.jsoneditor tr,\n:host div.jsoneditor th {\n margin: 0;\n padding: 0;\n font-weight: inherit;\n font-size: 100%;\n font-family: inherit;\n font-style: inherit;\n vertical-align: baseline;\n border: 0;\n outline: 0;\n -webkit-margin-before: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n}\n:host div.jsoneditor .jsoneditor-outer {\n display: -ms-flexbox;\n display: flex;\n}\n:host div.jsoneditor .jsoneditor-outer textarea {\n -ms-flex: 1;\n flex: 1;\n min-height: 100px;\n font-size: var(--font-size-16, 1rem);\n border: none;\n border-bottom: 0.0625rem solid var(--stable-alt, #d0d0d0);\n resize: auto;\n}\n:host div.jsoneditor-validation-errors-container {\n color: var(--danger, #d44333);\n}\n:host div.jsoneditor-menu {\n display: none;\n background: var(--dark-to-light, #000000);\n border-bottom: 0.0625rem solid var(--dark-to-light, #000000);\n}\n:host div.jsoneditor-statusbar {\n background: var(--stable-light, #f1f1f1);\n border-top: 0.0625rem solid var(--stable-alt, #d0d0d0);\n}\n:host div.jsoneditor-menu > button,\n:host div.jsoneditor-menu > div.jsoneditor-modes > button {\n color: var(--dark-to-light, #000000);\n}\n:host .readonly {\n word-break: break-word;\n}\n:host pre {\n display: block;\n width: 100%;\n margin: 0;\n font-size: var(--font-size-14, 0.875rem);\n font-family: var(--font-family, "Lato");\n}\n:host pre .string {\n color: var(--success, #3aa76d);\n}\n:host pre .number {\n color: var(--warning, #ff6402);\n}\n:host pre .boolean {\n color: var(--accent, #276ef1);\n}\n:host pre .null {\n color: var(--royal, #7577ff);\n}\n:host pre .key {\n color: var(--danger, #d44333);\n}';export{d as yoo_form_json}