@bull-board/ui 6.21.1 → 6.21.2
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.
- package/dist/index.ejs +1 -1
- package/dist/static/js/6693.47be15e9.js +12 -0
- package/dist/static/js/async/{10518.e5ba10f5.js → 10518.b0a21f0d.js} +1 -1
- package/dist/static/js/async/51125.8b45fd61.js +56 -0
- package/dist/static/js/async/90409.1795e0fb.js +1 -0
- package/dist/static/js/async/highlight-worker.722eeead.js +1 -0
- package/dist/static/js/lib-react.719eb9c0.js +2 -0
- package/dist/static/js/{main.2f738b10.js → main.f9b83451.js} +1 -1
- package/package.json +16 -15
- package/dist/static/js/6693.47a4f9db.js +0 -12
- package/dist/static/js/async/51125.fe204459.js +0 -56
- package/dist/static/js/async/90409.2254a36e.js +0 -1
- package/dist/static/js/async/highlight-worker.41f67098.js +0 -1
- package/dist/static/js/lib-react.f1fbffc9.js +0 -2
- /package/dist/static/js/{6693.47a4f9db.js.LICENSE.txt → 6693.47be15e9.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{51125.fe204459.js.LICENSE.txt → 51125.8b45fd61.js.LICENSE.txt} +0 -0
- /package/dist/static/js/{lib-react.f1fbffc9.js.LICENSE.txt → lib-react.719eb9c0.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*! For license information please see 51125.8b45fd61.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["51125"],{95716(e){"u">typeof self&&self,e.exports=(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return"#"===e||""===e||Array.isArray(e)&&0===e.length||!1}e.r(t),e.d(t,{default:()=>x,get:()=>h,isRoot:()=>n,join:()=>k,remove:()=>g,removeUndefinedItems:()=>m,set:()=>d,split:()=>u,splitLast:()=>D});let r=/~1/g,i=/~0/g,s=/\/+/g,o=/(^[#/]*|\/+$)/g;function l(e){return e.replace(r,"/").replace(i,"~")}function a(e){return l(decodeURIComponent(e))}function u(e){if(null==e||"string"!=typeof e||n(e))return Array.isArray(e)?e:[];let t=e.indexOf("#")>=0?a:l,r=(e=(e=e.replace(s,"/")).replace(o,"")).split("/");for(let e=0,n=r.length;e<n;e+=1)r[e]=t(r[e]);return r}function h(e,t,r){if(null==t||null==e)return r;if(n(t))return e;let i=function e(t,n){let r=n.shift();if(void 0!==t)return void 0!==r?e(t[r],n):t}(e,u(t));return void 0===i?r:i}let c=/^\[.*\]$/,f=/^\[(.+)\]$/;function d(e,t,n){if(null==t)return e;let r=u(t);if(0===r.length)return e;null==e&&(e=c.test(r[0])?[]:{});let i,s,o=e;for(;r.length>1;){var l;i=r.shift(),s=c.test(r[0]),"__proto__"===(l=i)||"constructor"==l&&r.length>0&&"prototype"==r[0]||(o=function(e,t,n){if(null!=e[t])return e[t];let r=n?[]:{};return p(e,t,r),r}(o,i,s))}return p(o,i=r.pop(),n),e}function p(e,t,n){let r=t.match(f);"[]"===t&&Array.isArray(e)?e.push(n):r?e[r.pop()]=n:e[t]=n}function m(e){let t=0,n=0;for(;t+n<e.length;)void 0===e[t+n]&&(n+=1),e[t]=e[t+n],t+=1;return e.length=e.length-n,e}function g(e,t,n){let r=u(t),i=r.pop(),s=h(e,r);return s&&delete s[i],Array.isArray(s)&&!0!==n&&m(s),e}let y=/\/+/g,b=/~/g,v=/\//g;function w(e,t){if(0===e.length)return t?"#":"";for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(b,"~0").replace(v,"~1"),t&&(e[n]=encodeURIComponent(e[n]));return((t?"#/":"/")+e.join("/")).replace(y,"/")}function k(e){let t=[];if(Array.isArray(e))return w(e,!0===arguments[1]);let n=arguments[arguments.length-1],r="boolean"==typeof n?n:e&&"#"===e[0];for(let e=0,n=arguments.length;e<n;e+=1)t.push.apply(t,u(arguments[e]));let i=[];for(let e=0,n=t.length;e<n;e+=1)if(".."===t[e]){if(0===i.length)return r?"#":"";i.pop()}else i.push(t[e]);return w(i,r)}function D(e){let t=u(e);if(0===t.length)return"string"==typeof e&&"#"===e[0]?["#",t[0]]:["",void 0];if(1===t.length)return"#"===e[0]?["#",t[0]]:["",t[0]];let n=t.pop();return[k(t,"#"===e[0]),n]}let x={get:h,set:d,remove:g,join:k,split:u,splitLast:D,isRoot:n,removeUndefinedItems:m};return t})()},21060(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.stripComments=t.enableErrorLogging=t.disableErrorLogging=t.setErrorLogger=void 0;let n=console.error;function r(e){let t=[],n=!1,r="",i=!1,s=!1,o=!1,l=!1,a=!1,u=0;for(let h of e){if(n){if(i){i=!1,t.push(h);continue}if("\\"===h){i=!0,t.push(h);continue}if(h===r){n=!1,t.push(h);continue}t.push(h);continue}if(s){"\n"===h&&(s=!1);continue}let e=t.length,c=0===e?"":t[e-1];if(o){if("*"===h){l=!0;continue}if(l&&"/"===h){o=!1;continue}l=!1;continue}if(a){if("-"===h){u++;continue}if(u>=2&&">"===h){a=!1;continue}u=0;continue}if("/"===c&&"/"===h){t.pop(),s=!0;continue}if("/"===c&&"*"===h){t.pop(),o=!0,l=!1;continue}if('"'===h||"'"===h||"`"===h){n=!0,r=h,i=!1,t.push(h);continue}if(e>=4&&"-"===h&&"-"===t[e-1]&&"!"===t[e-2]&&"<"===t[e-3]){a=!0,t.pop(),t.pop(),t.pop();continue}t.push(h)}return t.join("")}function i(e){if(void 0!==e){if(null===e)return null;if(""===e)return"";e=(e=r(e)).replace(/\\+$/,e=>e.length%2==0?e:e.slice(0,-1));try{return JSON.parse(e)}catch(r){let[t,n]=":"===e.trimLeft()[0]?s(e,r):s(e,r,m);if(i.lastParseReminding=n,i.onExtraToken&&n.length>0){let r=n.trimRight();i.lastParseReminding=r,r.length>0&&i.onExtraToken(e,t,r)}return t}}}function s(e,t,r){let i=o[e[0]]||r;if(!i)throw n(`no parser registered for ${JSON.stringify(e[0])}:`,{s:e}),t;return i(e,t)}t.setErrorLogger=function(e){n=e},t.disableErrorLogging=function(){n=()=>{}},t.enableErrorLogging=function(){n=console.error},t.stripComments=r,t.parse=i,(i=t.parse||(t.parse={})).onExtraToken=(e,t,r)=>{n("parsed json with extra tokens:",{text:e,data:t,reminding:r})};let o={};function l(e){return e.trimLeft()}function a(e,t){return s(e=l(e),t)}for(let e of(o[" "]=a,o["\r"]=a,o["\n"]=a,o[" "]=a,o["["]=function(e,t){e=e.substr(1);let n=[];for(e=l(e);e.length>0;){if("]"===e[0]){e=e.substr(1);break}let r=s(e,t,(e,t)=>m(e,t,[",","]"]));n.push(r[0]),","===(e=l(e=r[1]))[0]&&(e=l(e=e.substring(1)))}return[n,e]},"0123456789.-".slice()))o[e]=u;function u(e){for(let t=0;t<e.length;t++){if(o[e[t]]===u)continue;let n=e.substring(0,t);return e=e.substring(t),[h(n),e]}return[h(e),""]}function h(e){if("-"===e)return -0;let t=+e;return Number.isNaN(t)?e:t}function c(e){for(let t=1;t<e.length;t++){let n=e[t];if("\\"===n){t++;continue}if('"'===n){let n=f(e.substring(0,t+1));return e=e.substring(t+1),[JSON.parse(n),e]}}return[JSON.parse(f(e)+'"'),""]}function f(e){return e.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}function d(e){for(let t=1;t<e.length;t++){let n=e[t];if("\\"===n){t++;continue}if("'"===n){let n=f(e.substring(0,t+1));return e=e.substring(t+1),[JSON.parse('"'+n.slice(1,-1)+'"'),e]}}return[JSON.parse('"'+f(e.slice(1))+'"'),""]}function p(e){let t=[],n=!1,r=0;for(let i=1;i<e.length;i++){let s=e[i];if(n){t.push(s),n=!1;continue}if("\\"===s){n=!0,r++;continue}if("`"===s){let n=t.join("");return e=e.substring(n.length+r+2),[n,e]}t.push(s)}return[t.join(""),e.slice(1)]}function m(e,t,n=[" "]){let r=Math.min(...n.map(t=>{let n=e.indexOf(t);return -1===n?e.length:n}));return[e.substring(0,r).trim(),e.substring(r)]}function g(e,t,r,i){for(let n=t.length;n>=1;n--)if(e.startsWith(t.slice(0,n)))return[r,e.slice(n)];{let r=JSON.stringify(e.slice(0,t.length));throw n(`unknown token starting with ${r}:`,{s:e}),i}}o['"']=c,o["'"]=d,o["`"]=p,o["{"]=function(e,t){e=e.substr(1);let n={};for(e=l(e);e.length>0;){var r,i;if("}"===e[0]){e=e.substr(1);break}let o=(i=[":","}"],'"'===(r=e)[0]?c(r):"'"===r[0]?d(r):"`"===r[0]?p(r):m(r,t,i)),a=o[0];if(":"!==(e=l(e=o[1]))[0]||0===(e=l(e=e.substr(1))).length){n[a]=void 0;break}let u=s(e,t);n[a]=u[0],","===(e=l(e=u[1]))[0]&&(e=l(e=e.substr(1)))}return[n,e]},o.t=function(e,t){return g(e,"true",!0,t)},o.f=function(e,t){return g(e,"false",!1,t)},o.n=function(e,t){return g(e,"null",null,t)}},52743(e){"use strict";var t=function(e){var t,r,i;return!!(t=e)&&"object"==typeof t&&(r=e,"[object RegExp]"!==(i=Object.prototype.toString.call(r))&&"[object Date]"!==i&&r.$$typeof!==n)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,t):e}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=r;var u,h,c=Array.isArray(n);return c!==Array.isArray(e)?r(n,a):c?a.arrayMerge(e,n,a):(h={},(u=a).isMergeableObject(e)&&s(e).forEach(function(t){h[t]=r(e[t],u)}),s(n).forEach(function(t){o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))||(o(e,t)&&u.isMergeableObject(n[t])?h[t]=(function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l})(t,u)(e[t],n[t],u):h[t]=r(n[t],u))}),h)}l.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e.exports=l},44574(e,t,n){"use strict";var r;let i=n(42899);!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new i.Parser(e.RULES,{debug:!1});let t=/^(!|&)/,n=/(\?|\+|\*)$/,r=/^%/;function s(e){let s=[];return e.grammarRules.forEach(o=>{if(!/^%/.test(o.name)){let l=o.recover?" /* { recoverUntil="+o.recover+" } */":"";s.push(o.name+" ::= "+function e(s,o){let l=i.findRuleByName(s,o);return l?l.bnf.map(s=>s.map(s=>(function(s,o){if("string"!=typeof s)return s.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]");if(t.test(s))return"";if(r.test(s)){var l,a;let t,r=n.exec(s),u=r?r[0]+" ":"";return(l=s,a=o,(t=i.findRuleByName(l,a))&&1==t.bnf.length&&1==t.bnf[0].length&&(t.bnf[0][0]instanceof RegExp||'"'==t.bnf[0][0][0]||"'"==t.bnf[0][0][0]))?e(s,o)+u:"("+e(s,o)+")"+u}return s})(s,o)).join(" ")).join(" | "):"RULE_NOT_FOUND {"+s+"}"}(o.name,e)+l)}}),s.join("\n")}e.emit=s;let o=0;function l(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function a(t,n=e.defaultParser){let r=n.getAST(t);if(!r)throw Error("Could not parse "+t);if(r.errors&&r.errors.length)throw r.errors[0];let i=[];return r.children.filter(e=>"Production"==e.type).map(e=>{let t=e.children.filter(e=>"NCName"==e.type)[0].text;!function e(t,n,r){let i=n.children.filter(e=>"SequenceOrDifference"==e.type).map(n=>{let i,s;return i=null,s=[],n.children.forEach((a,u)=>{if("Minus"==a.type)throw console.log("reberia restar "+a+" a "+i),Error("Difference not supported yet");let h=n.children[u+1];switch(h=h&&"PrimaryDecoration"==h.type&&h.text||"",a.type){case"SubItem":let c="%"+(r+o++);e(t,a,c),s.push(""+c+h);break;case"NCName":case"StringLiteral":s.push(""+a.text+h);break;case"CharCode":case"CharClass":if(h){let e={name:"%"+(r+o++),bnf:[[l(a.text)]]};t.push(e),s.push(""+e.name+h)}else s.push(l(a.text));break;case"PrimaryDecoration":break;default:throw Error(" HOW SHOULD I PARSE THIS? "+a.type+" -> "+JSON.stringify(a.text))}i=a}),s}),s={name:r,bnf:i},a=null;i.forEach(e=>{a=a||e.recover,delete e.recover}),0==r.indexOf("%")&&(s.fragment=!0),a&&(s.recover=a),t.push(s)}(i,e,t)}),i}e.getRules=a,e.Transform=function(t,n=e.defaultParser){return a(t.join(""),n)};class u extends i.Parser{constructor(t,n){super(a(t,n&&!0===n.debugRulesParser?new i.Parser(e.RULES,{debug:!0}):e.defaultParser),n)}emitSource(){return s(this)}}e.Parser=u}(r||(r={})),t.default=r},42899(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=t.findRuleByName=t.parseRuleName=t.escapeRegExp=t.readToken=void 0;let r=/^[A-Z0-9_]+$/,i=/(\?|\+|\*)$/,s=/^(@|&|!)/,o=n(89849);function l(e,t){let n=t.exec(e);return n&&0==n.index?0==n[0].length&&t.source.length>0?null:{type:null,text:n[0],rest:e.substr(n[0].length),start:0,end:n[0].length-1,fullText:n[0],errors:[],children:[],parent:null}:null}function a(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function u(e){let t=i.exec(e),n=s.exec(e),r=t&&t[0]||"",o=n&&n[0]||"",l={raw:e,name:e.replace(i,"").replace(s,""),isOptional:"?"==r||"*"==r,allowRepetition:"+"==r||"*"==r,atLeastOne:"+"==r,lookupPositive:"&"==o,lookupNegative:"!"==o,pinned:"@"==o,lookup:!1,isLiteral:!1};return l.isLiteral="'"==l.name[0]||'"'==l.name[0],l.lookup=l.lookupNegative||l.lookupPositive,l}function h(e,t){let n=u(e);return t.cachedRules[n.name]||null}function c(e,t){if(e.children){let n=e.children.filter(e=>e.type&&t.test(e.type));for(let t=0;t<n.length;t++){let r=e.children.indexOf(n[t]);-1!=r&&e.children.splice(r,1)}e.children.forEach(e=>c(e,t))}}t.readToken=l,t.escapeRegExp=a,t.parseRuleName=u,t.findRuleByName=h;let f=["EOF"];class d{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=!!t&&!0===t.debug;let n=[],r=[];if(e.forEach(e=>{let t=u(e.name);if(t.name in this.cachedRules)return void n.push("Duplicated rule "+t.name);if(this.cachedRules[t.name]=e,e.bnf&&e.bnf.length)e.bnf.forEach(t=>{if("string"==typeof t[0]&&u(t[0]).name==e.name){let t="Left recursion is not allowed, rule: "+e.name;-1==n.indexOf(t)&&n.push(t)}t.forEach(e=>{if("string"==typeof e){let t=u(e);t.isLiteral||-1!=r.indexOf(t.name)||-1!=f.indexOf(t.name)||r.push(t.name)}})});else{let t="Missing rule content, rule: "+e.name;-1==n.indexOf(t)&&n.push(t)}"WS"==e.name&&(e.implicitWs=!1),e.implicitWs&&-1==r.indexOf("WS")&&r.push("WS"),e.recover&&-1==r.indexOf(e.recover)&&r.push(e.recover)}),r.forEach(e=>{e in this.cachedRules||n.push("Missing rule "+e)}),n.length)throw Error(n.join("\n"))}getAST(e,t){t||(t=this.grammarRules.filter(e=>!e.fragment&&0!=e.name.indexOf("%"))[0].name);let n=this.parse(e,t);if(n){!function e(t,n){n.errors&&n.errors.length&&n.errors.forEach(e=>t.push(e)),n.children&&n.children.forEach(n=>e(t,n))}(n.errors,n),function e(t,n){t.start+=n,t.end+=n,t.children&&t.children.forEach(n=>e(n,t.start))}(n,0),c(n,/^%/),this.options&&this.options.keepUpperRules||c(n,r);let e=n.rest;e&&new o.TokenError("Unexpected end of input: \n"+e,n),function e(t){t.rest="",t.children&&t.children.forEach(t=>e(t))}(n),n.rest=e}return n}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(e,t,n=0){let i,s=null,c=u(t),f=this.debug&&!r.test(c.name);f&&console.log(Array(n).join("│ ")+"Trying to get "+t+" from "+JSON.stringify(e.split("\n")[0]));let d=c.name,p=h(c.name,this);if("EOF"==c.name){if(e.length)return null;else if(0==e.length)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!p&&c.isLiteral){let t=c.name.trim();if(t.startsWith('"')?t=JSON.parse(t):t.startsWith("'")&&(t=t.replace(/^'(.+)'$/,"$1").replace(/\\'/g,"'")),""===t)return{type:"%%EMPTY%%",text:"",rest:e,start:0,end:0,fullText:"",errors:[],children:[],parent:null};i=new RegExp(a(t)),d=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(i){let t=l(e,i);if(t)return t.type=d,t}else{let t=p.bnf;t instanceof Array&&t.forEach(t=>{if(s)return;let r=null,i={type:c.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:e};p.fragment&&(i.fragment=!0);let a=e,h=0,d=t.length>0,m=!1;for(let e=0;e<t.length;e++)if("string"==typeof t[e]){let l,c=u(t[e]);d=d&&c.isOptional;let g=!1;do{if(l=null,p.implicitWs&&!(l=this.parse(a,c.name,n+1))){let e;do if(e=this.parse(a,"WS",n+1))i.text=i.text+e.text,i.end=i.text.length,e.parent=i,i.children.push(e),a=a.substr(e.text.length),h+=e.text.length;else break;while(e&&e.text.length)}if(l=l||this.parse(a,c.name,n+1),c.lookupNegative){if(l)return;break}if(c.lookupPositive&&!l)return;if(!l&&(c.isOptional||c.atLeastOne&&g))break;if(l&&p.pinned==e+1&&(r=l,f&&console.log(Array(n+1).join("│ ")+"└─ "+l.type+" PINNED")),l||(l=this.parseRecovery(p,a,n+1)),!l)if(!r)return;else s=i,l={type:"SyntaxError",text:a,children:[],end:a.length,errors:[],fullText:"",parent:null,start:0,rest:""},a.length?new o.TokenError(`Unexpected end of input. Expecting ${c.name} Got: ${a}`,l):new o.TokenError(`Unexpected end of input. Missing ${c.name}`,l),f&&console.log(Array(n+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text));if(g=!0,m=!0,"%%EMPTY%%"==l.type)break;l.start+=h,l.end+=h,!c.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach(e=>{e.start+=h,e.end+=h,e.parent=i,i.children.push(e)}):(l.parent=i,i.children.push(l))),c.lookup&&(l.lookup=!0),f&&console.log(Array(n+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text)),c.lookup||l.lookup||(i.text=i.text+l.text,i.end=i.text.length,a=a.substr(l.text.length),h+=l.text.length),i.rest=a}while(l&&c.allowRepetition&&a.length&&!l.lookup)}else{let r=l(a,t[e]);if(!r)return;f&&console.log(Array(n+1).join("│ ")+"└> "+JSON.stringify(r.text)+t[e].source),m=!0,r.start+=h,r.end+=h,i.text=i.text+r.text,i.end=i.text.length,a=a.substr(r.text.length),h+=r.text.length,i.rest=a}m&&(s=i,f&&console.log(Array(n).join("│ ")+"├<─┴< PUSHING "+s.type+" "+JSON.stringify(s.text)))}),s&&p.simplifyWhenOneChildren&&1==s.children.length&&(s=s.children[0])}return!s&&f&&console.log(t+" NOT RESOLVED FROM "+e),s}parseRecovery(e,t,n){if(e.recover&&t.length){let r,i=this.debug;i&&console.log(Array(n+1).join("│ ")+"Trying to recover until token "+e.recover+" from "+JSON.stringify(t.split("\n")[0]+t.split("\n")[1]));let s={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""};do{if(r=this.parse(t,e.recover,n+1)){new o.TokenError('Unexpected input: "'+s.text+`" Expecting: ${e.name}`,s);break}s.text=s.text+t[0],s.end=s.text.length,t=t.substr(1)}while(!r&&t.length>0);if(s.text.length>0&&r)return i&&console.log(Array(n+1).join("│ ")+"Recovered text: "+JSON.stringify(s.text)),s}return null}}t.Parser=d,t.default=d},89849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenError=void 0,t.TokenError=class extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,t&&t.errors)t.errors.push(this);else throw this}inspect(){return"SyntaxError: "+this.message}}},38792(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;0!=i--;){var r,i,s,o=s[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},88696(e){e.exports=function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t,n,r,i,s,o,l,a,u,h,c,f,d,p,m=e(function(e){var t=e.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),g=e(function(e){var t=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=t)});g.version;var y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},b=function(e){if(!y(e))throw TypeError(e+" is not an object!");return e},v=function(e){try{return!!e()}catch(e){return!0}},w=!v(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),k=m.document,D=y(k)&&y(k.createElement),x=!w&&!v(function(){return 7!=Object.defineProperty(D?k.createElement("div"):{},"a",{get:function(){return 7}}).a}),A=function(e,t){var n,r;if(!y(e))return e;if(t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e))||"function"==typeof(n=e.valueOf)&&!y(r=n.call(e))||!t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},C=Object.defineProperty,E=w?Object.defineProperty:function(e,t,n){if(b(e),t=A(t,!0),b(n),x)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e},S=w?function(e,t,n){return E(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}:function(e,t,n){return e[t]=n,e},_={}.hasOwnProperty,O=function(e,t){return _.call(e,t)},F=0,P=Math.random(),T=e(function(e){var t="__core-js_shared__",n=m[t]||(m[t]={});(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:g.version,mode:"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),B=e(function(e){var t="Symbol(".concat("src",")_",(++F+P).toString(36)),n="toString",r=(""+T).split(n);g.inspectSource=function(e){return T.call(e)},(e.exports=function(e,n,i,s){var o="function"==typeof i;o&&(O(i,"name")||S(i,"name",n)),e[n]!==i&&(o&&(O(i,t)||S(i,t,e[n]?""+e[n]:r.join(String(n)))),e===m?e[n]=i:s?e[n]?e[n]=i:S(e,n,i):(delete e[n],S(e,n,i)))})(Function.prototype,n,function(){return"function"==typeof this&&this[t]||T.call(this)})}),M=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},I=function(e,t,n){if(M(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},N="prototype",L=function(e,t,n){var r,i,s,o,l=e&L.F,a=e&L.G,u=e&L.S,h=e&L.P,c=e&L.B,f=a?m:u?m[t]||(m[t]={}):(m[t]||{})[N],d=a?g:g[t]||(g[t]={}),p=d[N]||(d[N]={});for(r in a&&(n=t),n)s=((i=!l&&f&&void 0!==f[r])?f:n)[r],o=c&&i?I(s,m):h&&"function"==typeof s?I(Function.call,s):s,f&&B(f,r,s,e&L.U),d[r]!=s&&S(d,r,o),h&&p[r]!=s&&(p[r]=s)};m.core=g,L.F=1,L.G=2,L.S=4,L.P=8,L.B=16,L.W=32,L.U=64,L.R=128;var $=Math.ceil,R=Math.floor,j=function(e){return isNaN(e*=1)?0:(e>0?R:$)(e)},z=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},q=function(e,t){var n,r,i=String(z(e)),s=j(t),o=i.length;return s<0||s>=o?void 0:(n=i.charCodeAt(s))<55296||n>56319||s+1===o||(r=i.charCodeAt(s+1))<56320||r>57343?n:(n-55296<<10)+(r-56320)+65536};L(L.P,"String",{codePointAt:function(e){return q(this,e)}}),g.String.codePointAt;var U=Math.max,V=Math.min,H=String.fromCharCode,W=String.fromCodePoint;L(L.S+L.F*(!!W&&1!=W.length),"String",{fromCodePoint:function(e){for(var t,n,r=arguments,i=[],s=arguments.length,o=0;s>o;){if(((t=j(t=n=+r[o++]))<0?U(t+1114111,0):V(t,1114111))!==n)throw RangeError(n+" is not a valid code point");i.push(n<65536?H(n):H(((n-=65536)>>10)+55296,n%1024+56320))}return i.join("")}}),g.String.fromCodePoint;var K=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,G=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,J=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Y=function(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||G.test(e))},Z=function(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||""===e||""===e||J.test(e))},Q=function(e){return"string"==typeof e&&/[0-9]/.test(e)},X=function(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)};function ee(){if(t[i])return String.fromCodePoint(t.codePointAt(i))}function et(){var e=ee();return"\n"===e?(s++,o=0):e?o+=e.length:o++,e&&(i+=e.length),e}var en={default:function(){var e;switch(p){case" ":case"\v":case"\f":case" ":case"\xa0":case"\uFEFF":case"\n":case"\r":case"\u2028":case"\u2029":et();return;case"/":et(),h="comment";return;case void 0:return et(),er("eof")}return"string"==typeof(e=p)&&K.test(e)?void et():en[n]()},comment:function(){switch(p){case"*":et(),h="multiLineComment";return;case"/":et(),h="singleLineComment";return}throw eu(et())},multiLineComment:function(){switch(p){case"*":et(),h="multiLineCommentAsterisk";return;case void 0:throw eu(et())}et()},multiLineCommentAsterisk:function(){switch(p){case"*":et();return;case"/":et(),h="default";return;case void 0:throw eu(et())}et(),h="multiLineComment"},singleLineComment:function(){switch(p){case"\n":case"\r":case"\u2028":case"\u2029":et(),h="default";return;case void 0:return et(),er("eof")}et()},value:function(){switch(p){case"{":case"[":return er("punctuator",et());case"n":return et(),ei("ull"),er("null",null);case"t":return et(),ei("rue"),er("boolean",!0);case"f":return et(),ei("alse"),er("boolean",!1);case"-":case"+":"-"===et()&&(d=-1),h="sign";return;case".":c=et(),h="decimalPointLeading";return;case"0":c=et(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=et(),h="decimalInteger";return;case"I":return et(),ei("nfinity"),er("numeric",1/0);case"N":return et(),ei("aN"),er("numeric",NaN);case'"':case"'":f='"'===et(),c="",h="string";return}throw eu(et())},identifierNameStartEscape:function(){if("u"!==p)throw eu(et());et();var e=es();switch(e){case"$":case"_":break;default:if(!Y(e))throw ec()}c+=e,h="identifierName"},identifierName:function(){switch(p){case"$":case"_":case"":case"":c+=et();return;case"\\":et(),h="identifierNameEscape";return}if(Z(p)){c+=et();return}return er("identifier",c)},identifierNameEscape:function(){if("u"!==p)throw eu(et());et();var e=es();switch(e){case"$":case"_":case"":case"":break;default:if(!Z(e))throw ec()}c+=e,h="identifierName"},sign:function(){switch(p){case".":c=et(),h="decimalPointLeading";return;case"0":c=et(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=et(),h="decimalInteger";return;case"I":return et(),ei("nfinity"),er("numeric",1/0*d);case"N":return et(),ei("aN"),er("numeric",NaN)}throw eu(et())},zero:function(){switch(p){case".":c+=et(),h="decimalPoint";return;case"e":case"E":c+=et(),h="decimalExponent";return;case"x":case"X":c+=et(),h="hexadecimal";return}return er("numeric",0*d)},decimalInteger:function(){switch(p){case".":c+=et(),h="decimalPoint";return;case"e":case"E":c+=et(),h="decimalExponent";return}if(Q(p)){c+=et();return}return er("numeric",d*Number(c))},decimalPointLeading:function(){if(Q(p)){c+=et(),h="decimalFraction";return}throw eu(et())},decimalPoint:function(){switch(p){case"e":case"E":c+=et(),h="decimalExponent";return}if(Q(p)){c+=et(),h="decimalFraction";return}return er("numeric",d*Number(c))},decimalFraction:function(){switch(p){case"e":case"E":c+=et(),h="decimalExponent";return}if(Q(p)){c+=et();return}return er("numeric",d*Number(c))},decimalExponent:function(){switch(p){case"+":case"-":c+=et(),h="decimalExponentSign";return}if(Q(p)){c+=et(),h="decimalExponentInteger";return}throw eu(et())},decimalExponentSign:function(){if(Q(p)){c+=et(),h="decimalExponentInteger";return}throw eu(et())},decimalExponentInteger:function(){if(Q(p)){c+=et();return}return er("numeric",d*Number(c))},hexadecimal:function(){if(X(p)){c+=et(),h="hexadecimalInteger";return}throw eu(et())},hexadecimalInteger:function(){if(X(p)){c+=et();return}return er("numeric",d*Number(c))},string:function(){switch(p){case"\\":et(),c+=function(){switch(ee()){case"b":return et(),"\b";case"f":return et(),"\f";case"n":return et(),"\n";case"r":return et(),"\r";case"t":return et()," ";case"v":return et(),"\v";case"0":if(et(),Q(ee()))throw eu(et());return"\0";case"x":return et(),function(){var e="",t=ee();if(!X(t)||(e+=et(),!X(t=ee())))throw eu(et());return String.fromCodePoint(parseInt(e+=et(),16))}();case"u":return et(),es();case"\n":case"\u2028":case"\u2029":return et(),"";case"\r":return et(),"\n"===ee()&&et(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw eu(et())}return et()}();return;case'"':if(f)return et(),er("string",c);c+=et();return;case"'":if(!f)return et(),er("string",c);c+=et();return;case"\n":case"\r":case void 0:throw eu(et());case"\u2028":case"\u2029":console.warn("JSON5: '"+ef(p)+"' in strings is not valid ECMAScript; consider escaping")}c+=et()},start:function(){switch(p){case"{":case"[":return er("punctuator",et())}h="value"},beforePropertyName:function(){switch(p){case"$":case"_":c=et(),h="identifierName";return;case"\\":et(),h="identifierNameStartEscape";return;case"}":return er("punctuator",et());case'"':case"'":f='"'===et(),h="string";return}if(Y(p)){c+=et(),h="identifierName";return}throw eu(et())},afterPropertyName:function(){if(":"===p)return er("punctuator",et());throw eu(et())},beforePropertyValue:function(){h="value"},afterPropertyValue:function(){switch(p){case",":case"}":return er("punctuator",et())}throw eu(et())},beforeArrayValue:function(){if("]"===p)return er("punctuator",et());h="value"},afterArrayValue:function(){switch(p){case",":case"]":return er("punctuator",et())}throw eu(et())},end:function(){throw eu(et())}};function er(e,t){return{type:e,value:t,line:s,column:o}}function ei(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ee()!==n)throw eu(et());et()}}function es(){for(var e="",t=4;t-- >0;){if(!X(ee()))throw eu(et());e+=et()}return String.fromCodePoint(parseInt(e,16))}var eo={start:function(){if("eof"===l.type)throw eh();el()},beforePropertyName:function(){switch(l.type){case"identifier":case"string":a=l.value,n="afterPropertyName";return;case"punctuator":ea();return;case"eof":throw eh()}},afterPropertyName:function(){if("eof"===l.type)throw eh();n="beforePropertyValue"},beforePropertyValue:function(){if("eof"===l.type)throw eh();el()},beforeArrayValue:function(){if("eof"===l.type)throw eh();"punctuator"===l.type&&"]"===l.value?ea():el()},afterPropertyValue:function(){if("eof"===l.type)throw eh();switch(l.value){case",":n="beforePropertyName";return;case"}":ea()}},afterArrayValue:function(){if("eof"===l.type)throw eh();switch(l.value){case",":n="beforeArrayValue";return;case"]":ea()}},end:function(){}};function el(){var e;switch(l.type){case"punctuator":switch(l.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=l.value}if(void 0===u)u=e;else{var t=r[r.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,a,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(null!==e&&"object"==typeof e)r.push(e),n=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{var i=r[r.length-1];n=null==i?"end":Array.isArray(i)?"afterArrayValue":"afterPropertyValue"}}function ea(){r.pop();var e=r[r.length-1];n=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}function eu(e){return void 0===e?ed("JSON5: invalid end of input at "+s+":"+o):ed("JSON5: invalid character '"+ef(e)+"' at "+s+":"+o)}function eh(){return ed("JSON5: invalid end of input at "+s+":"+o)}function ec(){return o-=5,ed("JSON5: invalid identifier character at "+s+":"+o)}function ef(e){var t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){var n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function ed(e){var t=SyntaxError(e);return t.lineNumber=s,t.columnNumber=o,t}return{parse:function(e,m){t=String(e),n="start",r=[],i=0,s=1,o=0,l=void 0,a=void 0,u=void 0;do l=function(){for(h="default",c="",f=!1,d=1;;){p=ee();var e=en[h]();if(e)return e}}(),eo[n]();while("eof"!==l.type);return"function"==typeof m?function e(t,n,r){var i=t[n];if(null!=i&&"object"==typeof i)if(Array.isArray(i))for(var s=0;s<i.length;s++){var o=String(s),l=e(i,o,r);void 0===l?delete i[o]:Object.defineProperty(i,o,{value:l,writable:!0,enumerable:!0,configurable:!0})}else for(var a in i){var u=e(i,a,r);void 0===u?delete i[a]:Object.defineProperty(i,a,{value:u,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,n,i)}({"":u},"",m):u},stringify:function(e,t,n){var r,i,s,o=[],l="",a="";if(null==t||"object"!=typeof t||Array.isArray(t)||(n=t.space,s=t.quote,t=t.replacer),"function"==typeof t)i=t;else if(Array.isArray(t)){r=[];for(var u=0,h=t;u<h.length;u+=1){var c=h[u],f=void 0;"string"==typeof c?f=c:("number"==typeof c||c instanceof String||c instanceof Number)&&(f=String(c)),void 0!==f&&0>r.indexOf(f)&&r.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),"number"==typeof n?n>0&&(n=Math.min(10,Math.floor(n)),a=" ".substr(0,n)):"string"==typeof n&&(a=n.substr(0,10)),function e(t,n){var s=n[t];switch(null!=s&&("function"==typeof s.toJSON5?s=s.toJSON5(t):"function"==typeof s.toJSON&&(s=s.toJSON(t))),i&&(s=i.call(n,t,s)),s instanceof Number?s=Number(s):s instanceof String?s=String(s):s instanceof Boolean&&(s=s.valueOf()),s){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof s?d(s,!1):"number"==typeof s?String(s):"object"==typeof s?Array.isArray(s)?function(t){if(o.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");o.push(t);var n,r=l;l+=a;for(var i=[],s=0;s<t.length;s++){var u=e(String(s),t);i.push(void 0!==u?u:"null")}if(0===i.length)n="[]";else if(""===a)n="["+i.join(",")+"]";else{var h=",\n"+l,c=i.join(h);n="[\n"+l+c+",\n"+r+"]"}return o.pop(),l=r,n}(s):function(t){if(o.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");o.push(t);var n,i,s=l;l+=a;for(var u=r||Object.keys(t),h=[],c=0;c<u.length;c+=1){var f=u[c],p=e(f,t);if(void 0!==p){var m=function(e){if(0===e.length)return d(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!Y(t))return d(e,!0);for(var n=t.length;n<e.length;n++)if(!Z(String.fromCodePoint(e.codePointAt(n))))return d(e,!0);return e}(f)+":";""!==a&&(m+=" "),m+=p,h.push(m)}}if(0===h.length)n="{}";else if(""===a)n="{"+(i=h.join(","))+"}";else{var g=",\n"+l;i=h.join(g),n="{\n"+l+i+",\n"+s+"}"}return o.pop(),l=s,n}(s):void 0}("",{"":e});function d(e){for(var t={"'":.1,'"':.2},n={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},r="",i=0;i<e.length;i++){var o=e[i];switch(o){case"'":case'"':t[o]++,r+=o;continue;case"\0":if(Q(e[i+1])){r+="\\x00";continue}}if(n[o]){r+=n[o];continue}if(o<" "){var l=o.charCodeAt(0).toString(16);r+="\\x"+("00"+l).substring(l.length);continue}r+=o}var a=s||Object.keys(t).reduce(function(e,n){return t[e]<t[n]?e:n});return r=r.replace(RegExp(a,"g"),n[a]),a+r+a}}}}()},55880(e){!function(t,n){"use strict";"function"==typeof define&&define.amd?define(n):e.exports?e.exports=n():t.log=n()}(this,function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},s=null;function o(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(){for(var n=this.getLevel(),i=0;i<r.length;i++){var s=r[i];this[s]=i<n?e:this.methodFactory(s,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(a.call(this),this[e].apply(this,arguments))}}function h(r,i,s){var a;return"debug"===(a=r)&&(a="log"),typeof console!==t&&("trace"===a&&n?l:void 0!==console[a]?o(console,a):void 0!==console.log?o(console,"log"):e)||u.apply(this,arguments)}function c(e,n){var o,l,u,c=this,f="loglevel";function d(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===c.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==c.levels[t.toUpperCase()]&&(t=c.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=c.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?f+=":"+e:"symbol"==typeof e&&(f=void 0),c.name=e,c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=n||h,c.getLevel=function(){return null!=u?u:null!=l?l:o},c.setLevel=function(e,n){return u=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+n+";"}catch(e){}}}(u),a.call(c)},c.setDefaultLevel=function(e){l=p(e),d()||c.setLevel(e,!1)},c.resetLevel=function(){if(u=null,typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}a.call(c)},c.enableAll=function(e){c.setLevel(c.levels.TRACE,e)},c.disableAll=function(e){c.setLevel(c.levels.SILENT,e)},c.rebuild=function(){if(s!==c&&(o=p(s.getLevel())),a.call(c),s===c)for(var e in i)i[e].rebuild()},o=p(s?s.getLevel():"WARN");var m=d();null!=m&&(u=p(m)),a.call(c)}(s=new c).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new c(e,s.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=f),s},s.getLoggers=function(){return i},s.default=s,s})},63662(e){var t;t=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach(function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)})}function i(){this.reset("")}function s(e,t,s){if(e instanceof r)var o=e,s=t;else var o=r.fromCompiled(e,t);for(var l in this.grammar=o,this.options={keepHistory:!1,lexer:o.lexer||new i},s||{})this.options[l]=s[l];this.lexer=this.options.lexer,this.lexerState=void 0;var a=new n(o,0);this.table=[a],a.wants[o.start]=[],a.predict(o.start),a.process(),this.current=0}function o(e){var t=typeof e;if("string"===t)return e;if("object"===t)if(e.literal)return JSON.stringify(e.literal);else if(e instanceof RegExp)return e.toString();else if(e.type)return"%"+e.type;else if(e.test)return"<"+String(e.test)+">";else throw Error("Unknown symbol type: "+e)}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(o).join(" "):this.symbols.slice(0,e).map(o).join(" ")+" ● "+this.symbols.slice(e).map(o).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do e.push(t.right.data),t=t.left;while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,i=0;i<t.length;i++){var o=t[i];if(o.isComplete){if(o.finish(),o.data!==s.fail){for(var l=o.wantedBy,a=l.length;a--;){var u=l[a];this.complete(u,o)}if(o.reference===this.index){var h=o.rule.name;(this.completed[h]=this.completed[h]||[]).push(o)}}}else{var h=o.rule.symbols[o.dot];if("string"!=typeof h){this.scannable.push(o);continue}if(n[h]){if(n[h].push(o),r.hasOwnProperty(h))for(var c=r[h],a=0;a<c.length;a++){var f=c[a];this.complete(o,f)}}else n[h]=[o],this.predict(h)}}},n.prototype.predict=function(e){for(var n=this.grammar.byName[e]||[],r=0;r<n.length;r++){var i=n[r],s=this.wants[e],o=new t(i,0,this.index,s);this.states.push(o)}},n.prototype.complete=function(e,t){var n=e.nextState(t);this.states.push(n)},r.fromCompiled=function(t,n){var i=t.Lexer;t.ParserStart&&(n=t.ParserStart,t=t.ParserRules);var t=t.map(function(t){return new e(t.name,t.symbols,t.postprocess)}),s=new r(t,n);return s.lexer=i,s},i.prototype.reset=function(e,t){this.buffer=e,this.index=0,this.line=t?t.line:1,this.lastLineBreak=t?-t.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var e=this.buffer[this.index++];return"\n"===e&&(this.line+=1,this.lastLineBreak=this.index),{value:e}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(e,t){var n=this.buffer;if("string"!=typeof n)return t+" at index "+(this.index-1);var r=n.split("\n").slice(Math.max(0,this.line-5),this.line),i=n.indexOf("\n",this.index);-1===i&&(i=n.length);var s=this.index-this.lastLineBreak,o=String(this.line).length;return t+=" at line "+this.line+" col "+s+":\n\n",t+=r.map(function(e,t){return l(this.line-r.length+t+1,o)+" "+e},this).join("\n"),t+="\n"+l("",o+s)+"^\n";function l(e,t){var n=String(e);return Array(t-n.length+1).join(" ")+n}},s.fail={},s.prototype.feed=function(e){var t,r=this.lexer;for(r.reset(e,this.lexerState);;){try{if(!(t=r.next()))break}catch(e){var s=new n(this.grammar,this.current+1);this.table.push(s);var o=Error(this.reportLexerError(e));throw o.offset=this.current,o.token=e.token,o}var l=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var a=this.current+1,s=new n(this.grammar,a);this.table.push(s);for(var u=void 0!==t.text?t.text:t.value,h=r.constructor===i?t.value:t,c=l.scannable,f=c.length;f--;){var d=c[f],p=d.rule.symbols[d.dot];if(p.test?p.test(h):p.type?p.type===t.type:p.literal===u){var m=d.nextState({data:h,token:t,isToken:!0,reference:a-1});s.states.push(m)}}if(s.process(),0===s.states.length){var o=Error(this.reportError(t));throw o.offset=this.current,o.token=t,o}this.options.keepHistory&&(l.lexerState=r.save()),this.current++}return l&&(this.lexerState=r.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(e){var t,n,r=e.token;return r?(t="input "+JSON.stringify(r.text[0])+" (lexer error)",n=this.lexer.formatError(r,"Syntax error")):(t="input (lexer error)",n=e.message),this.reportErrorCommon(n,t)},s.prototype.reportError=function(e){var t=(e.type?e.type+" token: ":"")+JSON.stringify(void 0!==e.value?e.value:e),n=this.lexer.formatError(e,"Syntax error");return this.reportErrorCommon(n,t)},s.prototype.reportErrorCommon=function(e,t){var n=[];n.push(e);var r=this.table.length-2,i=this.table[r],s=i.states.filter(function(e){var t=e.rule.symbols[e.dot];return t&&"string"!=typeof t});return 0===s.length?(n.push("Unexpected "+t+". I did not expect any more input. Here is the state of my parse table:\n"),this.displayStateStack(i.states,n)):(n.push("Unexpected "+t+". Instead, I was expecting to see one of the following:\n"),s.map(function(e){return this.buildFirstStateStack(e,[])||[e]},this).forEach(function(e){var t=e[0],r=t.rule.symbols[t.dot],i=this.getSymbolDisplay(r);n.push("A "+i+" based on:"),this.displayStateStack(e,n)},this)),n.push(""),n.join("\n")},s.prototype.displayStateStack=function(e,t){for(var n,r=0,i=0;i<e.length;i++){var s=e[i],o=s.rule.toString(s.dot);o===n?r++:(r>0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+o)),n=o}},s.prototype.getSymbolDisplay=function(e){var t=e,n=typeof t;if("string"===n)return t;if("object"===n)if(t.literal)return JSON.stringify(t.literal);else if(t instanceof RegExp)return"character matching "+t;else if(t.type)return t.type+" token";else if(t.test)return"token matching "+String(t.test);else throw Error("Unknown symbol type: "+t)},s.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),i=this.buildFirstStateStack(n,r);return null===i?null:[e].concat(i)},s.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},s.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},s.prototype.rewind=function(e){if(!this.options.keepHistory)throw Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},s.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach(function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==s.fail&&e.push(n)}),e.map(function(e){return e.data})},{Parser:s,Grammar:r,Rule:e}},e.exports?e.exports=t():this.nearley=t()},38931(e,t){"use strict";function n(e){return e[0]}Object.defineProperty(t,"__esModule",{value:!0});let r=e=>[].concat(...e.map(e=>Array.isArray(e)?r(e):e));function i(e){return e?Array.isArray(e)?r(e).join(""):e:""}t.default={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:e=>e.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(e){return e.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(e){return e.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:n},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:n},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:e=>e[0].concat([e[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:n},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:e=>e[0].concat([e[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:n},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(e){return{DomainName:i(e[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(e){return{AddressLiteral:i(e[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(e){return{localPart:i(e[0]),domainPart:i(e[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(e){return{DotString:i(e[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(e){return{QuotedString:i(e[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:e=>e[0].concat([e[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:e=>e[0].concat([e[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:n},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(e){return e.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:e=>e[0].concat([e[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:n},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:n},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:e=>e.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:n},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:n},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:e=>e.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:n},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:n},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:n},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:n},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:n},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:n},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:n},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:n}],ParserStart:"Reverse_path"}},85626(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;let i=n(63662),s=r(n(38931));s.default.ParserStart="Mailbox";let o=i.Grammar.fromCompiled(s.default);function l(e){let t=new i.Parser(o);if(t.feed(e),1!==t.results.length)throw Error("address parsing failed: ambiguous grammar");return t.results[0]}function a(e){let t;return(-1===(t=e.indexOf("+"))?e:e.substr(0,t)).replace(/\./g,"").toLowerCase()}function u(e){let t=e.substr(1).substr(0,e.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1");return`"${t}"`}t.parse=l,t.normalize_dot_string=a,t.normalize=function(e){var t,n;let r=l(e),i=null!=(t=r.domainPart.AddressLiteral)?t:r.domainPart.DomainName.toLowerCase(),s=null!=(n=r.localPart.QuotedString)?n:a(r.localPart.DotString);return`${s}@${i}`},t.canonicalize_quoted_string=u,t.canonicalize=function(e){var t;let n=l(e),r=null!=(t=n.domainPart.AddressLiteral)?t:n.domainPart.DomainName.toLowerCase(),i=n.localPart.QuotedString?u(n.localPart.QuotedString):n.localPart.DotString;return`${i}@${r}`}},47112(e,t,n){!function(e){"use strict";e.exports.is_uri=n,e.exports.is_http_uri=r,e.exports.is_https_uri=i,e.exports.is_web_uri=s,e.exports.isUri=n,e.exports.isHttpUri=r,e.exports.isHttpsUri=i,e.exports.isWebUri=s;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function n(e){if(!(!e||/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)||/%[^0-9a-f]/i.test(e)||/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e))){var n=[],r="",i="",s="",o="",l="",a="";if(r=(n=t(e))[1],i=n[2],s=n[3],o=n[4],l=n[5],r&&r.length&&s.length>=0){if(i&&i.length){if(!(0===s.length||/^\//.test(s)))return}else if(/^\/\//.test(s))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(r.toLowerCase()))return a+=r+":",i&&i.length&&(a+="//"+i),a+=s,o&&o.length&&(a+="?"+o),l&&l.length&&(a+="#"+l),a}}}function r(e,r){if(n(e)){var i=[],s="",o="",l="",a="",u="",h="",c="";if(s=(i=t(e))[1],o=i[2],l=i[3],u=i[4],h=i[5],s){if(r){if("https"!=s.toLowerCase())return}else if("http"!=s.toLowerCase())return;if(o)return/:(\d+)$/.test(o)&&(a=o.match(/:(\d+)$/)[0],o=o.replace(/:\d+$/,"")),c+=s+":",c+="//"+o,a&&(c+=a),c+=l,u&&u.length&&(c+="?"+u),h&&h.length&&(c+="#"+h),c}}}function i(e){return r(e,!0)}function s(e){return r(e)||i(e)}}(e=n.nmd(e))},77213(e,t,n){"use strict";n.d(t,{Bc:()=>ey,Gw:()=>es,OO:()=>ex,wm:()=>ec,yU:()=>eD});var r=n(24509),i=n(50511),s=n(29587);class o{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=(0,s.mv)(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(h(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}class a{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function u(e){return e.selection.main.from}function h(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],s="$"!=r[r.length-1];return i||s?RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,null!=(n=e.flags)?n:e.ignoreCase?"i":""):e}let c=r.YH.define(),f=new WeakMap;function d(e){if(!Array.isArray(e))return e;let t=f.get(e);return t||f.set(e,t=function(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=l(t)+l(n)+"*$";return[RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}(e)),t}let p=r.Pe.define(),m=r.Pe.define();class g{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=(0,r.vS)(e,t),i=(0,r.Fh)(n);this.chars.push(n);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push((0,r.vS)(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:s,byWord:o}=this;if(1==t.length){let i=(0,r.vS)(e,0),s=(0,r.Fh)(i),o=s==e.length?0:-100;if(i==t[0]);else{if(i!=n[0])return null;o+=-200}return this.ret(o,[0,s])}let l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,u=0;if(l<0){for(let s=0,o=Math.min(e.length,200);s<o&&u<a;){let o=(0,r.vS)(e,s);(o==t[u]||o==n[u])&&(i[u++]=s),s+=(0,r.Fh)(o)}if(u<a)return null}let h=0,c=0,f=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),y=!0;for(let i=0,u=Math.min(e.length,200),b=0;i<u&&c<a;){let u=(0,r.vS)(e,i);l<0&&(h<a&&u==t[h]&&(s[h++]=i),d<a&&(u==t[d]||u==n[d]?(0==d&&(p=i),m=i+1,d++):d=0));let v,w=u<255?u>=48&&u<=57||u>=97&&u<=122?2:+(u>=65&&u<=90):(v=(0,r.MK)(u))!=v.toLowerCase()?1:2*(v!=v.toUpperCase());(!i||1==w&&g||0==b&&0!=w)&&(t[c]==u||n[c]==u&&(f=!0)?o[c++]=i:o.length&&(y=!1)),b=w,i+=(0,r.Fh)(u)}return c==a&&0==o[0]&&y?this.result(-100+(f?-200:0),o,e):d==a&&0==p?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,m]):c==a?this.result(-100+(f?-200:0)+-700+(y?0:-1100),o,e):2==t.length?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],s=0;for(let e of t){let t=e+(this.astral?(0,r.Fh)((0,r.vS)(n,e)):1);s&&i[s-1]==e?i[s-1]=t:(i[s++]=e,i[s++]=t)}return this.ret(e-n.length,i)}}class y{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}let b=r.sj.define({combine:e=>(0,r.QR)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:w,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>v(e(n),t(n)),optionClass:(e,t)=>n=>v(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function v(e,t){return e?t?e+" "+t:e:t}function w(e,t,n,r,s,o){let l=e.textDirection==i.OP.RTL,a=l,u=!1,h="top",c,f,d=t.left-s.left,p=s.right-t.right,m=r.right-r.left,g=r.bottom-r.top;if(a&&d<Math.min(m,p)?a=!1:!a&&p<Math.min(m,d)&&(a=!0),m<=(a?d:p))c=Math.max(s.top,Math.min(n.top,s.bottom-g))-t.top,f=Math.min(400,a?d:p);else{u=!0,f=Math.min(400,(l?t.right:s.right-t.left)-30);let e=s.bottom-t.bottom;e>=g||e>t.top?c=n.bottom-t.top:(h="bottom",c=t.bottom-n.top)}let y=(t.bottom-t.top)/o.offsetHeight,b=(t.right-t.left)/o.offsetWidth;return{style:`${h}: ${c/y}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":a?"left":"right")}}let k=r.Pe.define();function D(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class x{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:s}=r.open,o=e.state.facet(b);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(s.slice(o,t)));let l=i.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(s.slice(t,n))),l.className="cm-completionMatchedText",o=n}return o<s.length&&i.appendChild(document.createTextNode(s.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=D(i.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:k.of(t)}),n.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(b).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:m.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:s,disabled:o}=n.open;r.open&&r.open.options==i||(this.range=D(i.length,s,e.state.facet(b).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=(null==(t=r.open)?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=D(t.options.length,t.selected,this.view.state.facet(b).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:s}=r;if(!s)return;let o="string"==typeof s?document.createTextNode(s):s(r);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>(0,i.c_)(this.view.state,e,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let r,i,s,o=null;for(let t=this.list.firstChild,n=this.range.from;t;t=t.nextSibling,n++)"LI"==t.nodeName&&t.id?n==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),o=t):t.hasAttribute("aria-selected")&&(t.removeAttribute("aria-selected"),t.removeAttribute("aria-describedby")):n--;return o&&(t=this.list,n=o,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=r.height/t.offsetHeight,i.top<r.top?t.scrollTop-=(r.top-i.top)/s:i.bottom>r.bottom&&(t.scrollTop+=(i.bottom-r.bottom)/s)),o}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(b).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let i=null;for(let s=n.from;s<n.to;s++){let{completion:o,match:l}=e[s],{section:a}=o;if(a){let e="string"==typeof a?a:a.name;e!=i&&(s>n.from||0==n.from)&&(i=e,"string"!=typeof a&&a.header?r.appendChild(a.header(a)):r.appendChild(document.createElement("completion-section")).textContent=e)}let u=r.appendChild(document.createElement("li"));u.id=t+"-"+s,u.setAttribute("role","option");let h=this.optionClass(o);for(let e of(h&&(u.className=h),this.optionContent)){let t=e(o,this.view.state,this.view,l);t&&u.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function A(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class C{constructor(e,t,n,r,i,s){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new C(this.options,O(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i,s){if(r&&!s&&e.some(e=>e.isPending))return r.setDisabled();let o=function(e,t){let n=[],r=null,i=null,s=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},o=t.facet(b);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)s(new a(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),l,u=o.filterStrict?new y(n):new g(n);for(let t of r.result.options)if(l=u.match(t.label)){let n=t.displayLabel?e?e(t,l.matched):[]:l.matched,o=l.score+(t.boost||0);if(s(new a(t,r.source,n,o)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0;for(let n of r.sort((e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?i[t.name]-i[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1)))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let l=[],u=null,h=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||h(e.completion,t.completion))){let t=e.completion;u&&u.label==t.label&&u.detail==t.detail&&(null==u.type||null==t.type||u.type==t.type)&&u.apply==t.apply&&u.boost==t.boost?A(e.completion)>A(u)&&(l[l.length-1]=e):l.push(e),u=e.completion}return l}(e,t);if(!o.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let l=t.facet(b).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){l=t;break}}return new C(o,O(n,l),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:L,above:i.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new C(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new C(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class E{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new E(F,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(b),r=(n.override||t.languageDataAt("autocomplete",u(t)).map(d)).map(t=>(this.active.find(e=>e.source==t)||new T(t,+!!this.active.some(e=>0!=e.state))).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open,s=e.effects.some(e=>e.is(M));for(let o of(i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,s=r==t.length;if(i||s)return i==s;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||s?i=C.build(r,t,this.id,i,n,s):i&&i.disabled&&!r.some(e=>e.isPending)&&(i=null),!i&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new T(e.source,0):e)),e.effects))o.is(k)&&(i=i&&i.setSelected(o.value,this.id));return r==this.active&&i==this.open?this:new E(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?S:_}}let S={"aria-autocomplete":"list"},_={};function O(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let F=[];function P(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(c);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:16*!!e.docChanged}class T{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=P(e,t),r=this;for(let t of((8&n||16&n&&this.touches(e))&&(r=new T(r.source,0)),4&n&&0==r.state&&(r=new T(this.source,1)),r=r.updateFor(e,n),e.effects))if(t.is(p))r=new T(r.source,1,t.value);else if(t.is(m))r=new T(r.source,0);else if(t.is(M))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(u(e.state))}}class B extends T{constructor(e,t,n,r,i,s){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=s}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=u(e.state);if(l>s||!r||2&t&&(u(e.startState)==this.from||l<this.limit))return new T(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):h(e,!0).test(i)}(r.validFor,e.state,i,s)?r.update&&(r=r.update(r,i,s,new o(e.state,l,!1)))?new B(this.source,this.explicit,a,r,r.from,null!=(n=r.to)?n:u(e.state)):new T(this.source,1,this.explicit):new B(this.source,this.explicit,a,r,i,s)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new B(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new T(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let M=r.Pe.define({map:(e,t)=>e.map(e=>e.map(t))}),I=r.sU.define({create:()=>E.start(),update:(e,t)=>e.update(t),provide:e=>[i.DK.from(e,e=>e.tooltip),i.Lz.contentAttributes.from(e,e=>e.attrs)]});function N(e,t){let n=t.completion.apply||t.completion.label,i=e.state.field(I).active.find(e=>e.source==t.source);return i instanceof B&&("string"==typeof n?e.dispatch({...function(e,t,n,i){let{main:s}=e.selection,o=n-s.from,l=i-s.from;return{...e.changeByRange(a=>{if(a!=s&&n!=i&&e.sliceDoc(a.from+o,a.from+l)!=e.sliceDoc(n,i))return{range:a};let u=e.toText(t);return{changes:{from:a.from+o,to:i==s.from?a.to:a.from+l,insert:u},range:r.OF.cursor(a.from+o+u.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(e.state,n,i.from,i.to),annotations:c.of(t.completion)}):n(e,t.completion,i.from,i.to),!0)}let L=e=>new x(e,I,N);function $(e,t="option"){return n=>{let r=n.state.field(I,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(b).interactionDelay)return!1;let s=1,o;"page"==t&&(o=(0,i.Eg)(n,r.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=r.open.options,a=r.open.selected>-1?r.open.selected+s*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:k.of(a)}),!0}}let R=e=>!!e.state.field(I,!1)&&(e.dispatch({effects:p.of(!0)}),!0);class j{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let z=i.Z9.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,e.state.field(I).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(I),n=e.state.facet(b);if(!e.selectionSet&&!e.docChanged&&e.startState.field(I)==t)return;let r=e.transactions.some(e=>{let t=P(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,i.c_)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(p)))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),s):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(I);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(b).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=u(t),r=new o(t,n,e.explicit,this.view),s=new j(e,r);this.running.push(s),Promise.resolve(e.source(r)).then(e=>{s.context.aborted||(s.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:m.of(null)}),(0,i.c_)(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(b).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(b),r=this.view.state.field(I);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(void 0===s.done)continue;if(this.running.splice(i--,1),s.done){let r=u(s.updates.length?s.updates[0].startState:this.view.state),i=Math.min(r,s.done.from+ +!s.active.explicit),o=new B(s.active.source,s.active.explicit,i,s.done,s.done.from,null!=(e=s.done.to)?e:r);for(let e of s.updates)o=o.update(e,n);if(o.hasResult()){t.push(o);continue}}let o=r.active.find(e=>e.source==s.active.source);if(o&&o.isPending)if(null==s.done){let e=new T(s.active.source,0);for(let t of s.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(o)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:M.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(I,!1);if(t&&t.tooltip&&this.view.state.facet(b).closeOnBlur){let n=t.open&&(0,i.Eg)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:m.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:p.of(!1)}),20),this.composing=0}}}),q="object"==typeof navigator&&/Win/.test(navigator.platform),U=r.Nb.highest(i.Lz.domEventHandlers({keydown(e,t){let n=t.state.field(I,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(q&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&N(t,r),!1}})),V=i.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class H{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class W{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,r.iR.TrackDel),n=e.mapPos(this.to,1,r.iR.TrackDel);return null==t||null==n?null:new W(this.field,t,n)}}class K{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,l=/^\t*/.exec(i)[0].length;for(let t=0;t<l;t++)n+=e.facet(s.Xt);r.push(t+n.length-l),i=n+i.slice(l)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new W(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t=[],n=[],r=[],i;for(let s of e.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let e=i[1]?+i[1]:null,o=i[2]||i[3]||"",l=-1,a=o.replace(/\\[{}]/g,e=>e[1]);for(let n=0;n<t.length;n++)(null!=e?t[n].seq==e:a&&t[n].name==a)&&(l=n);if(l<0){let n=0;for(;n<t.length&&(null==e||null!=t[n].seq&&t[n].seq<e);)n++;for(let i of(t.splice(n,0,{seq:e,name:a}),l=n,r))i.field>=l&&i.field++}for(let e of r)if(e.line==n.length&&e.from>i.index){let t=i[2]?3+(i[1]||"").length:2;e.from-=t,e.to-=t}r.push(new H(l,n.length,i.index,i.index+a.length)),s=s.slice(0,i.index)+o+s.slice(i.index+i[0].length)}s=s.replace(/\\([{}])/g,(e,t,i)=>{for(let e of r)e.line==n.length&&e.from>i&&(e.from--,e.to--);return t}),n.push(s)}return new K(n,r)}}let G=i.NZ.widget({widget:new class extends i.xO{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),J=i.NZ.mark({class:"cm-snippetField"});class Y{constructor(e,t){this.ranges=e,this.active=t,this.deco=i.NZ.set(e.map(e=>(e.from==e.to?G:J).range(e.from,e.to)),!0)}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new Y(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}let Z=r.Pe.define({map:(e,t)=>e&&e.map(t)}),Q=r.Pe.define(),X=r.sU.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(Z))return n.value;if(n.is(Q)&&e)return new Y(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>i.Lz.decorations.from(e,e=>e?e.deco:i.NZ.none)});function ee(e,t){return r.OF.create(e.filter(e=>e.field==t).map(e=>r.OF.range(e.from,e.to)))}function et(e){return({state:t,dispatch:n})=>{let r=t.field(X,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,s=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:ee(r.ranges,i),effects:Z.of(s?null:new Y(r.ranges,i)),scrollIntoView:!0})),!0}}let en=[{key:"Tab",run:et(1),shift:et(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(X,!1)&&(t(e.update({effects:Z.of(null)})),!0)}],er=r.sj.define({combine:e=>e.length?e[0]:en}),ei=r.Nb.highest(i.w4.compute([er],e=>e.facet(er)));function es(e,t){let n;return{...t,apply:(n=K.parse(e),(e,t,i,s)=>{let{text:o,ranges:l}=n.instantiate(e.state,i),{main:a}=e.state.selection,u={changes:{from:i,to:s==a.from?a.to:s,insert:r.EY.of(o)},scrollIntoView:!0,annotations:t?[c.of(t),r.ZX.userEvent.of("input.complete")]:void 0};if(l.length&&(u.selection=ee(l,0)),l.some(e=>e.field>0)){let t=new Y(l,0),n=u.effects=[Z.of(t)];void 0===e.state.field(X,!1)&&n.push(r.Pe.appendConfig.of([X,ei,eo,V]))}e.dispatch(e.state.update(u))})}}let eo=i.Lz.domEventHandlers({mousedown(e,t){let n=t.state.field(X,!1),r;if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!!i&&i.field!=n.active&&(t.dispatch({selection:ee(n.ranges,i.field),effects:Z.of(n.ranges.some(e=>e.field>i.field)?new Y(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),el={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ea=r.Pe.define({map(e,t){let n=t.mapPos(e,-1,r.iR.TrackAfter);return null==n?void 0:n}}),eu=new class extends r.FB{};eu.startSide=1,eu.endSide=-1;let eh=r.sU.define({create:()=>r.om.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(ea)&&(e=e.update({add:[eu.range(n.value,n.value+1)]}));return e}});function ec(){return[eg,eh]}let ef="()[]{}<>\xab\xbb\xbb\xab[]{}";function ed(e){for(let t=0;t<ef.length;t+=2)if(ef.charCodeAt(t)==e)return ef.charAt(t+1);return(0,r.MK)(e<128?e:e+1)}function ep(e,t){return e.languageDataAt("closeBrackets",t)[0]||el}let em="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),eg=i.Lz.inputHandler.of((e,t,n,i)=>{if((em?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(i.length>2||2==i.length&&1==(0,r.Fh)((0,r.vS)(i,0))||t!=o.from||n!=o.to)return!1;let l=function(e,t){let n=ep(e,e.selection.main.head),i=n.brackets||el.brackets;for(let o of i){let l=ed((0,r.vS)(o,0));if(t==o)return l==o?function(e,t,n,i){let o=i.stringPrefixes||el.stringPrefixes,l=null,a=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:ea.of(i.to+t.length),range:r.OF.range(i.anchor+t.length,i.head+t.length)};let a=i.head,u=ev(e.doc,a),h;if(u==t){if(ew(e,a))return{changes:{insert:t+t,from:a},effects:ea.of(a+t.length),range:r.OF.cursor(a+t.length)};else if(eb(e,a)){let i=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+i.length,insert:i},range:r.OF.cursor(a+i.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(h=ek(e,a-2*t.length,o))>-1&&ew(e,h))return{changes:{insert:t+t+t+t,from:a},effects:ea.of(a+t.length),range:r.OF.cursor(a+t.length)};else if(e.charCategorizer(a)(u)!=r.Je.Word&&ek(e,a,o)>-1&&!function(e,t,n,r){let i=(0,s.mv)(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=i.to==t&&i.parent;if(!a)break;i=a}return!1}(e,a,t,o))return{changes:{insert:t+t,from:a},effects:ea.of(a+t.length),range:r.OF.cursor(a+t.length)};return{range:l=i}});return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,i.indexOf(o+o+o)>-1,n):function(e,t,n,i){let s=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:ea.of(o.to+t.length),range:r.OF.range(o.anchor+t.length,o.head+t.length)};let l=ev(e.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:t+n,from:o.head},effects:ea.of(o.head+t.length),range:r.OF.cursor(o.head+t.length)}:{range:s=o}});return s?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,l,n.before||el.before);if(t==l&&eb(e,e.selection.main.from))return function(e,t){let n=null,i=e.changeByRange(i=>i.empty&&ev(e.doc,i.head)==t?{changes:{from:i.head,to:i.head+t.length,insert:t},range:r.OF.cursor(i.head+t.length)}:n={range:i});return n?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}(e,l)}return null}(e.state,i);return!!l&&(e.dispatch(l),!0)}),ey=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=ep(e,e.selection.main.head).brackets||el.brackets,i=null,s=e.changeByRange(t=>{if(t.empty){var s,o;let i,l=(s=e.doc,o=t.head,i=s.sliceString(o-2,o),(0,r.Fh)((0,r.vS)(i,0))==i.length?i:i.slice(1));for(let i of n)if(i==l&&ev(e.doc,t.head)==ed((0,r.vS)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:r.OF.cursor(t.head-i.length)}}return{range:i=t}});return i||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function eb(e,t){let n=!1;return e.field(eh).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function ev(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,r.Fh)((0,r.vS)(n,0)))}function ew(e,t){let n=(0,s.mv)(e).resolveInner(t+1);return n.parent&&n.from==t}function ek(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=r.Je.Word)return t;for(let s of n){let n=t-s.length;if(e.sliceDoc(n,t)==s&&i(e.sliceDoc(n-1,n))!=r.Je.Word)return n}return -1}function eD(e={}){return[U,I,b.of(e),z,eA,V]}let ex=[{key:"Ctrl-Space",run:R},{mac:"Alt-`",run:R},{mac:"Alt-i",run:R},{key:"Escape",run:e=>{let t=e.state.field(I,!1);return!!t&&!!t.active.some(e=>0!=e.state)&&(e.dispatch({effects:m.of(null)}),!0)}},{key:"ArrowDown",run:$(!0)},{key:"ArrowUp",run:$(!1)},{key:"PageDown",run:$(!0,"page")},{key:"PageUp",run:$(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(I,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(b).interactionDelay)&&N(e,t.open.options[t.open.selected])}}],eA=r.Nb.highest(i.w4.computeN([b],e=>e.facet(b).defaultKeymap?[ex]:[]))},47143(e,t,n){"use strict";n.d(t,{b6:()=>b,cL:()=>T,pw:()=>e_});var r=n(24509),i=n(50511),s=n(29587),o=n(79066);function l(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}let a=l(function(e,t,n=t.selection.ranges){let r=[],i=-1;e:for(let{from:e,to:s}of n){let n=r.length,o=1e9,l;for(let n=e;n<=s;){let a=t.doc.lineAt(n);if(void 0==l&&!(l=c(t,a.from).line))continue e;if(a.from>i&&(e==s||s>a.from)){i=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<o&&(o=e),r.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:s,single:o}of r)(o||!s)&&e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,s=r+i.length;" "==t.text[s-t.from]&&s++,e.push({from:r,to:s})}return{changes:e}}return null},0),u=l(f,0),h=l((e,t)=>f(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let s=t.length-1;s>=0&&t[s].to>r.from?t[s].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function c(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}function f(e,t,n=t.selection.ranges){let r=n.map(e=>c(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>(function(e,{open:t,close:n},r,i){let s,o,l=e.sliceDoc(r-50,r),a=e.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,h=/^\s*/.exec(a)[0].length,c=l.length-u;if(l.slice(c-t.length,c)==t&&a.slice(h,h+n.length)==n)return{open:{pos:r-u,margin:u&&1},close:{pos:i+h,margin:h&&1}};i-r<=100?s=o=e.sliceDoc(r,i):(s=e.sliceDoc(r,r+50),o=e.sliceDoc(i-50,i));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-n.length;return s.slice(f,f+t.length)==t&&o.slice(p,p+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(s.charAt(f+t.length))},close:{pos:i-d-n.length,margin:+!!/\s/.test(o.charAt(p-1))}}:null})(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:s,close:o}=n;e.push({from:s.pos-i.open.length,to:s.pos+s.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}let d=r.YH.define(),p=r.YH.define(),m=r.sj.define(),g=r.sj.define({combine:e=>(0,r.QR)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),y=r.sU.define({create:()=>P.empty,update(e,t){let n=t.state.facet(g),i=t.annotation(d);if(i){let r=A.fromTransaction(t,i.selection),s=i.side,o=0==s?e.undone:e.done;return o=r?C(o,o.length,n.minDepth,r):_(o,t.startState.selection),new P(0==s?i.rest:o,0==s?o:i.rest)}let s=t.annotation(p);if(("full"==s||"before"==s)&&(e=e.isolate()),!1===t.annotation(r.ZX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=A.fromTransaction(t),l=t.annotation(r.ZX.time),a=t.annotation(r.ZX.userEvent);return o?e=e.addChanges(o,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),("full"==s||"after"==s)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new P(e.done.map(A.fromJSON),e.undone.map(A.fromJSON))});function b(e={}){return[y,g.of(e),i.Lz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?w:"historyRedo"==e.inputType?k:null;return!!n&&(e.preventDefault(),n(t))}})]}function v(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(y,!1);if(!i)return!1;let s=i.pop(e,n,t);return!!s&&(r(s),!0)}}let w=v(0,!1),k=v(1,!1),D=v(0,!0),x=v(1,!0);class A{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new A(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null==(e=this.changes)?void 0:e.toJSON(),mapped:null==(t=this.mapped)?void 0:t.toJSON(),startSelection:null==(n=this.startSelection)?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new A(e.changes&&r.VR.fromJSON(e.changes),[],e.mapped&&r.Gu.fromJSON(e.mapped),e.startSelection&&r.OF.fromJSON(e.startSelection),e.selectionsAfter.map(r.OF.fromJSON))}static fromTransaction(e,t){let n=S;for(let t of e.startState.facet(m)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new A(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,S)}static selection(e){return new A(void 0,S,void 0,void 0,e)}}function C(e,t,n,r){let i=e.slice(t+1>n+20?t-n-1:0,t);return i.push(r),i}function E(e,t){return e.length?t.length?e.concat(t):e:t}let S=[];function _(e,t){if(!e.length)return[A.selection([t])];{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),C(e,e.length-1,1e9,n.setSelAfter(r)))}}function O(e,t){if(!e.length)return e;let n=e.length,i=S;for(;n;){let s=function(e,t,n){let i=E(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):S,n);if(!e.changes)return A.selection(i);let s=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new A(s,r.Pe.mapEffects(e.effects,t),l,e.startSelection.map(o),i)}(e[n-1],t,i);if(s.changes&&!s.changes.empty||s.effects.length){let t=e.slice(0,n);return t[n-1]=s,t}t=s.mapped,n--,i=s.selectionsAfter}return i.length?[A.selection(i)]:S}let F=/^(input\.type|delete)($|\.)/;class P{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new P(this.done,this.undone):this}addChanges(e,t,n,i,s){var o,l;let a,u,h=this.done,c=h[h.length-1];return new P(h=c&&c.changes&&!c.changes.empty&&e.changes&&(!n||F.test(n))&&(!c.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,(o=c.changes,l=e.changes,a=[],u=!1,o.iterChangedRanges((e,t)=>a.push(e,t)),l.iterChangedRanges((e,t,n,r)=>{for(let e=0;e<a.length;){let t=a[e++],i=a[e++];r>=t&&n<=i&&(u=!0)}}),u))||"input.type.compose"==n)?C(h,h.length-1,i.minDepth,new A(e.changes.compose(c.changes),E(r.Pe.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,S)):C(h,h.length,i.minDepth,e),S,t,n)}addSelection(e,t,n,r){var i;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:S;return s.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=s[s.length-1],i.ranges.length==e.ranges.length&&0===i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length)?this:new P(_(this.done,e),this.undone,t,n)}addMapping(e){return new P(O(this.done,e),O(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length){let n,o;return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:d.of({side:e,rest:(n=r[r.length-1],(o=r.slice())[r.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),o),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}{if(!i.changes)return null;let n=1==r.length?S:r.slice(0,r.length-1);return i.mapped&&(n=O(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:d.of({side:e,rest:n,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}P.empty=new P(S,S);let T=[{key:"Mod-z",run:w,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:k,preventDefault:!0},{linux:"Ctrl-Shift-z",run:k,preventDefault:!0},{key:"Mod-u",run:D,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:x,preventDefault:!0}];function B(e,t){return r.OF.create(e.ranges.map(t),e.mainIndex)}function M(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function I({state:e,dispatch:t},n){let r=B(e.selection,n);return!r.eq(e.selection,!0)&&(t(M(e,r)),!0)}function N(e,t){return r.OF.cursor(t?e.to:e.from)}function L(e,t){return I(e,n=>n.empty?e.moveByChar(n,t):N(n,t))}function $(e){return e.textDirectionAt(e.state.selection.main.head)==i.OP.LTR}let R=e=>L(e,!$(e)),j=e=>L(e,$(e));function z(e,t){return I(e,n=>n.empty?e.moveByGroup(n,t):N(n,t))}function q(e,t,n){let i,l,a=(0,s.mv)(e).resolveInner(t.head),u=n?o.uY.closedBy:o.uY.openedBy;for(let r=t.head;;){let t=n?a.childAfter(r):a.childBefore(r);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,u)?r=n?t.to:t.from:a=t}return l=a.type.prop(u)&&(i=n?(0,s.jU)(e,a.from,1):(0,s.jU)(e,a.to,-1))&&i.matched?n?i.end.to:i.end.from:n?a.to:a.from,r.OF.cursor(l,n?-1:1)}function U(e,t){return I(e,n=>{if(!n.empty)return N(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"u">typeof Intl&&Intl.Segmenter;let V=e=>U(e,!1),H=e=>U(e,!0);function W(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,s;if(t){for(let t of e.state.facet(i.Lz.scrollMargins)){let i=t(e);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(r=Math.max(null==i?void 0:i.bottom,r))}s=e.scrollDOM.clientHeight-n-r}else s=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,s-5)}}function K(e,t){let n,r=W(e),{state:s}=e,o=B(s.selection,n=>n.empty?e.moveVertically(n,t,r.height):N(n,t));if(o.eq(s.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(s.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+r.marginTop,u=l.bottom-r.marginBottom;t&&t.top>a&&t.bottom<u&&(n=i.Lz.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(M(s,o),{effects:n}),!0}let G=e=>K(e,!1),J=e=>K(e,!0);function Y(e,t,n){let i=e.lineBlockAt(t.head),s=e.moveToLineBoundary(t,n);if(s.head==t.head&&s.head!=(n?i.to:i.from)&&(s=e.moveToLineBoundary(t,n,!1)),!n&&s.head==i.from&&i.length){let n=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&t.head!=i.from+n&&(s=r.OF.cursor(i.from+n))}return s}function Z(e,t){let n=B(e.state.selection,e=>{let n=t(e);return r.OF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return!n.eq(e.state.selection)&&(e.dispatch(M(e.state,n)),!0)}function Q(e,t){return Z(e,n=>e.moveByChar(n,t))}let X=e=>Q(e,!$(e)),ee=e=>Q(e,$(e));function et(e,t){return Z(e,n=>e.moveByGroup(n,t))}function en(e,t){return Z(e,n=>e.moveVertically(n,t))}let er=e=>en(e,!1),ei=e=>en(e,!0);function es(e,t){return Z(e,n=>e.moveVertically(n,t,W(e).height))}let eo=e=>es(e,!1),el=e=>es(e,!0),ea=({state:e,dispatch:t})=>(t(M(e,{anchor:0})),!0),eu=({state:e,dispatch:t})=>(t(M(e,{anchor:e.doc.length})),!0),eh=({state:e,dispatch:t})=>(t(M(e,{anchor:e.selection.main.anchor,head:0})),!0),ec=({state:e,dispatch:t})=>(t(M(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ef(e,t){let{state:n}=e,i=n.selection,s=n.selection.ranges.slice();for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head);if(t?i.to<e.state.doc.length:i.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<i.from||r.head>i.to){s.some(e=>e.head==r.head)||s.push(r);break}if(r.head==n.head)break;n=r}}return s.length!=i.ranges.length&&(e.dispatch(M(n,r.OF.create(s,s.length-1))),!0)}function ed(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:s}=e,o=s.changeByRange(i=>{let{from:s,to:o}=i;if(s==o){let r=t(i);r<s?(n="delete.backward",r=ep(e,r,!1)):r>s&&(n="delete.forward",r=ep(e,r,!0)),s=Math.min(s,r),o=Math.max(o,r)}else s=ep(e,s,!1),o=ep(e,o,!0);return s==o?{range:i}:{changes:{from:s,to:o},range:r.OF.cursor(s,s<i.head?-1:1)}});return!o.changes.empty&&(e.dispatch(s.update(o,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?i.Lz.announce.of(s.phrase("Selection deleted")):void 0})),!0)}function ep(e,t,n){if(e instanceof i.Lz)for(let r of e.state.facet(i.Lz.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}let em=(e,t,n)=>ed(e,i=>{let o=i.from,{state:l}=e,a=l.doc.lineAt(o),u,h;if(n&&!t&&o>a.from&&o<a.from+200&&!/[^ \t]/.test(u=a.text.slice(0,o-a.from))){if(" "==u[u.length-1])return o-1;let e=(0,r.y$)(u,l.tabSize)%(0,s.tp)(l)||(0,s.tp)(l);for(let t=0;t<e&&" "==u[u.length-1-t];t++)o--;h=o}else(h=(0,r.zK)(a.text,o-a.from,t,t)+a.from)==o&&a.number!=(t?l.doc.lines:1)?h+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(h-a.from,o-a.from))&&(h=(0,r.zK)(a.text,h-a.from,!1,!1)+a.from);return h}),eg=e=>em(e,!1,!0),ey=e=>em(e,!0,!1),eb=(e,t)=>ed(e,n=>{let i=n.head,{state:s}=e,o=s.doc.lineAt(i),l=s.charCategorizer(i);for(let e=null;;){if(i==(t?o.to:o.from)){i==n.head&&o.number!=(t?s.doc.lines:1)&&(i+=t?1:-1);break}let a=(0,r.zK)(o.text,i-o.from,t)+o.from,u=o.text.slice(Math.min(i,a)-o.from,Math.max(i,a)-o.from),h=l(u);if(null!=e&&h!=e)break;(" "!=u||i!=n.head)&&(e=h),i=a}return i}),ev=e=>eb(e,!1);function ew(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),s=e.doc.lineAt(r.to);if(r.empty||r.to!=s.from||(s=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(r)}else t.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return t}function ek(e,t,n){if(e.readOnly)return!1;let i=[],s=[];for(let t of ew(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),l=o.length+1;if(n)for(let n of(i.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))s.push(r.OF.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)));else for(let n of(i.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))s.push(r.OF.range(n.anchor-l,n.head-l))}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:r.OF.create(s,e.selection.mainIndex),userEvent:"move.line"})),!0)}function eD(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of ew(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}let ex=eC(!1),eA=eC(!0);function eC(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(n=>{let{from:i,to:l}=n,a=t.doc.lineAt(i),u=!e&&i==l&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=(0,s.mv)(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),l;return r&&i&&r.to<=t&&i.from>=t&&(l=r.type.prop(o.uY.closedBy))&&l.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}(t,i);e&&(i=l=(l<=a.to?a:t.doc.lineAt(l)).to);let h=new s.KB(t,{simulateBreak:i,simulateDoubleBreak:!!u}),c=(0,s._v)(h,i);for(null==c&&(c=(0,r.y$)(/^\s*/.exec(t.doc.lineAt(i).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;u?{from:i,to:l}=u:i>a.from&&i<a.from+100&&!/\S/.test(a.text.slice(0,i))&&(i=a.from);let f=["",(0,s.EI)(t,c)];return u&&f.push((0,s.EI)(t,h.lineIndent(a.from,-1))),{changes:{from:i,to:l,insert:r.EY.of(f)},range:r.OF.cursor(i+1+f[1].length)}});return n(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function eE(e,t){let n=-1;return e.changeByRange(i=>{let s=[];for(let r=i.from;r<=i.to;){let o=e.doc.lineAt(r);o.number>n&&(i.empty||i.to>o.from)&&(t(o,s,i),n=o.number),r=o.to+1}let o=e.changes(s);return{changes:s,range:r.OF.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}let eS=[{key:"Ctrl-b",run:R,shift:X,preventDefault:!0},{key:"Ctrl-f",run:j,shift:ee},{key:"Ctrl-p",run:V,shift:er},{key:"Ctrl-n",run:H,shift:ei},{key:"Ctrl-a",run:e=>I(e,t=>r.OF.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>Z(e,t=>r.OF.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>I(e,t=>r.OF.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>Z(e,t=>r.OF.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:ey},{key:"Ctrl-h",run:eg},{key:"Ctrl-k",run:e=>ed(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:ev},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:r.EY.of(["",""])},range:r.OF.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,i=e.doc.lineAt(n),s=n==i.from?n-1:(0,r.zK)(i.text,n-i.from,!1)+i.from,o=n==i.to?n+1:(0,r.zK)(i.text,n-i.from,!0)+i.from;return{changes:{from:s,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(s,n))},range:r.OF.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:J}],e_=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>I(e,t=>q(e.state,t,!$(e))),shift:e=>Z(e,t=>q(e.state,t,!$(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>I(e,t=>q(e.state,t,$(e))),shift:e=>Z(e,t=>q(e.state,t,$(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>ek(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>eD(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>ek(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>eD(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>ef(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>ef(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,i=null;return n.ranges.length>1?i=r.OF.create([n.main]):n.main.empty||(i=r.OF.create([r.OF.cursor(n.main.head)])),!!i&&(t(M(e,i)),!0)}},{key:"Mod-Enter",run:eA},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=ew(e).map(({from:t,to:n})=>r.OF.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:r.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=B(e.selection,t=>{let n=(0,s.mv)(e),i=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=i.node.from&&e.node.to<=i.node.to&&(i=e)}for(let e=i;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return r.OF.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(M(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(eE(e,(t,n)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let o=(0,r.y$)(i,e.tabSize),l=0,a=(0,s.EI)(e,Math.max(0,o-(0,s.tp)(e)));for(;l<i.length&&l<a.length&&i.charCodeAt(l)==a.charCodeAt(l);)l++;n.push({from:t.from+l,to:t.from+i.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(eE(e,(t,n)=>{n.push({from:t.from,insert:e.facet(s.Xt)})}),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new s.KB(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=eE(e,(t,i,o)=>{let l=(0,s._v)(r,t.from);if(null==l)return;/\S/.test(t.text)||(l=0);let a=/^\s*/.exec(t.text)[0],u=(0,s.EI)(e,l);(a!=u||o.from<t.from+a.length)&&(n[t.from]=l,i.push({from:t.from,to:t.from+a.length,insert:u}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(ew(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=B(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let n,i;return n=!1,i=B(e.selection,t=>{let i=(0,s.jU)(e,t.head,-1)||(0,s.jU)(e,t.head,1)||t.head>0&&(0,s.jU)(e,t.head-1,1)||t.head<e.doc.length&&(0,s.jU)(e,t.head+1,-1);if(!i||!i.end)return t;n=!0;let o=i.start.from==t.head?i.end.to:i.end.from;return r.OF.cursor(o)}),!!n&&(t(M(e,i)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=c(e.state,n.from);return r.line?a(e):!!r.block&&h(e)}},{key:"Alt-A",run:u},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:R,shift:X,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>z(e,!$(e)),shift:e=>et(e,!$(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>I(e,t=>Y(e,t,!$(e))),shift:e=>Z(e,t=>Y(e,t,!$(e))),preventDefault:!0},{key:"ArrowRight",run:j,shift:ee,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>z(e,$(e)),shift:e=>et(e,$(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>I(e,t=>Y(e,t,$(e))),shift:e=>Z(e,t=>Y(e,t,$(e))),preventDefault:!0},{key:"ArrowUp",run:V,shift:er,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ea,shift:eh},{mac:"Ctrl-ArrowUp",run:G,shift:eo},{key:"ArrowDown",run:H,shift:ei,preventDefault:!0},{mac:"Cmd-ArrowDown",run:eu,shift:ec},{mac:"Ctrl-ArrowDown",run:J,shift:el},{key:"PageUp",run:G,shift:eo},{key:"PageDown",run:J,shift:el},{key:"Home",run:e=>I(e,t=>Y(e,t,!1)),shift:e=>Z(e,t=>Y(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:ea,shift:eh},{key:"End",run:e=>I(e,t=>Y(e,t,!0)),shift:e=>Z(e,t=>Y(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:eu,shift:ec},{key:"Enter",run:ex,shift:ex},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:eg,shift:eg,preventDefault:!0},{key:"Delete",run:ey,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:ev,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>eb(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>ed(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>ed(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(eS.map(e=>({mac:e.key,run:e.run,shift:e.shift}))))},29587(e,t,n){"use strict";n.d(t,{EI:()=>_,KB:()=>F,Lv:()=>es,Oh:()=>P,SG:()=>ek,WD:()=>N,Xt:()=>E,Yy:()=>A,_v:()=>O,b_:()=>$,bj:()=>d,cr:()=>el,f7:()=>Y,jU:()=>eC,mv:()=>p,mz:()=>I,tp:()=>S,y9:()=>ec,yd:()=>R});var r,i=n(79066),s=n(24509),o=n(50511),l=n(49913),a=n(98104);let u=new i.uY,h=new i.uY;class c{constructor(e,t,n=[],r=""){this.data=e,this.name=r,s.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(s.$t.prototype,"tree",{get(){return p(this)}}),this.parser=t,this.extension=[x.of(this),s.$t.languageData.of((e,t,n)=>{let r=f(e,t,n),i=r.type.prop(u);if(!i)return[];let s=e.facet(i),o=r.type.prop(h);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(s)}}return s})].concat(n)}isActiveAt(e,t,n=-1){return f(e,t,n).type.prop(u)==this.data}findRegions(e){let t=e.facet(x);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(u)==this.data)return void n.push({from:t,to:t+e.length});let s=e.prop(i.uY.mounted);if(s){if(s.tree.prop(u)==this.data){if(s.overlay)for(let e of s.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(s.overlay){let e=n.length;if(r(s.tree,s.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let s=e.children[n];s instanceof i.PH&&r(s,e.positions[n]+t)}};return r(p(e),0),n}get allowsNesting(){return!0}}function f(e,t,n){let r=e.facet(x),s=p(e).topNode;if(!r||r.allowsNesting)for(let e=s;e;e=e.enter(t,n,i.Qj.ExcludeBuffers|i.Qj.EnterBracketed))e.type.isTop&&(s=e);return s}c.setState=s.Pe.define();class d extends c{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){var t;let n=(t=e.languageData,s.sj.define({combine:t?e=>e.concat(t):void 0}));return new d(n,e.parser.configure({props:[u.add(e=>e.isTop?n:void 0)]}),e.name)}configure(e,t){return new d(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(e){let t=e.field(c.state,!1);return t?t.tree:i.PH.empty}class m{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g=null;class y{constructor(e,t,n=[],r,i,s,o,l){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new y(e,t,[],i.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=i.PH.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(i.rr.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!=(n=this.parse.stoppedAt)?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(i.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g;g=this;try{return e()}finally{g=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=b(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=i.rr.applyChanges(n,t),r=i.PH.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length)for(let t of(l=[],this.skipped)){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&l.push({from:n,to:r})}}return new y(this.parser,t,n,r,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=b(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends i.iX{createParse(t,n,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let t=g;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new i.PH(i.Z6.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return g}}function b(e,t,n){return i.rr.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class v{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new v(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=y.create(e.facet(x).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new v(n)}}c.state=s.sU.define({create:v.init,update(e,t){for(let e of t.effects)if(e.is(c.setState))return e.value;return t.startState.facet(x)!=t.state.facet(x)?v.init(t.state):e.apply(t)}});let w=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"u">typeof requestIdleCallback&&(w=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let k="u">typeof navigator&&(null==(r=navigator.scheduling)?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,D=o.Z9.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(c.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(c.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=w(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(c.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!k?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,l=i.context.work(()=>k&&k()||Date.now()>s,r+1e5*!o);this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:c.setState.of(new v(i.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>(0,o.c_)(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),x=s.sj.define({combine:e=>e.length?e[0]:null,enables:e=>[c.state,D,o.Lz.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class A{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let C=s.sj.define(),E=s.sj.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function S(e){let t=e.facet(E);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function _(e,t){let n="",r=e.tabSize,i=e.facet(E)[0];if(" "==i){for(;t>=r;)n+=" ",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function O(e,t){for(let n of(e instanceof s.$t&&(e=new F(e)),e.state.facet(C))){let r=n(e,t);if(void 0!==r)return r}let n=p(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return T(r,e,n)}(e,n,t):null}class F{constructor(e,t={}){this.state=e,this.options=t,this.unit=S(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;if(null!=r&&r>=n.from&&r<=n.to)if(i&&r==e)return{text:"",from:e};else if(t<0?r<e:r<=e)return{text:n.text.slice(r-n.from),from:r};else return{text:n.text.slice(0,r-n.from),from:n.from};return n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),s=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return s>-1&&(i+=s-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return(0,s.y$)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let P=new i.uY;function T(e,t,n){for(let r=e;r;r=r.next){let e=function(e){let t=e.type.prop(P);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(i.uY.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>(function(e,t,n,r){let i=e.textAfter,s=i.match(/^\s*/)[0].length,o=n&&i.slice(s,s+n.length)==n||r==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),o=null==i||i<=s.from?s.to:Math.min(s.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}(e):null;return l?o?e.column(l.from):e.column(l.to):e.baseIndent+(o?0:+e.unit)})(e,!0,void 0,n&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?B:null}(r.node);if(e)return e(M.create(t,n,r))}return 0}function B(){return 0}class M extends F{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new M(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return T(this.context.next,this.base,this.pos)}}function I({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}function N(){return s.$t.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let s=n.sliceString(i.from,r);if(!t.some(e=>e.test(s)))return e;let{state:o}=e,l=-1,a=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=O(o,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=_(o,n);r!=i&&a.push({from:t.from,to:t.from+r.length,insert:i})}return a.length?[e,{changes:a,sequential:!0}]:e})}let L=s.sj.define(),$=new i.uY;function R(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function j(e,t,n){for(let r of e.facet(L)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=p(e);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(s&&i.from<t)break;let l=i.type.prop($);if(l&&(i.to<r.length-50||r.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(i))){let r=l(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(s=r)}}return s}(e,t,n)}function z(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}let q=s.Pe.define({map:z}),U=s.Pe.define({map:z});function V(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let H=s.sU.define({create:()=>o.NZ.none,update(e,t){for(let n of(t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,n)=>e=W(e,t,n)),e=e.map(t.changes),t.effects))if(n.is(q)&&!function(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(Q),i=r?o.NZ.replace({widget:new en(r(t.state,n.value))}):et;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(U)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=W(e,t.selection.main.head)),e},provide:e=>o.Lz.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid JSON for fold state");t.push(et.range(r,i))}return o.NZ.set(t,!0)}});function W(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function K(e,t,n){var r;let i=null;return null==(r=e.field(H,!1))||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function G(e,t){return e.field(H,!1)?t:t.concat(s.Pe.appendConfig.of(X()))}function J(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return o.Lz.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}let Y=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of V(e)){let n=j(e.state,t.from,t.to);if(n)return e.dispatch({effects:G(e.state,[q.of(n),J(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(H,!1))return!1;let t=[];for(let n of V(e)){let r=K(e.state,n.from,n.to);r&&t.push(U.of(r),J(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),s=j(t,i.from,i.to);s&&n.push(q.of(s)),r=(s?e.lineBlockAt(s.to):i).to+1}return n.length&&e.dispatch({effects:G(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(H,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(U.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],Z={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Q=s.sj.define({combine:e=>(0,s.QR)(e,Z)});function X(e){let t=[H,eo];return e&&t.push(Q.of(e)),t}function ee(e,t){let{state:n}=e,r=n.facet(Q),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=K(e.state,n.from,n.to);r&&e.dispatch({effects:U.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}let et=o.NZ.replace({widget:new class extends o.xO{toDOM(e){return ee(e,null)}}});class en extends o.xO{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ee(e,this.value)}}let er={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ei extends o.wJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function es(e={}){let t={...er,...e},n=new ei(t,!0),r=new ei(t,!1),i=o.Z9.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(x)!=e.state.facet(x)||e.startState.field(H,!1)!=e.state.field(H,!1)||p(e.startState)!=p(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new s.vB;for(let i of e.viewportLineBlocks){let s=K(e.state,i.from,i.to)?r:j(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:l}=t;return[i,(0,o.cU)({class:"cm-foldGutter",markers(e){var t;return(null==(t=e.plugin(i))?void 0:t.markers)||s.om.empty},initialSpacer:()=>new ei(t,!1),domEventHandlers:{...l,click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let r=K(e.state,t.from,t.to);if(r)return e.dispatch({effects:U.of(r)}),!0;let i=j(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:q.of(i)}),!0)}}}),X()]}let eo=o.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class el{constructor(e,t){let n;function r(e){let t=a.G.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,s=t.scope;this.scope=s instanceof c?e=>e.prop(u)==s.data:s?e=>e==s:void 0,this.style=(0,l.az)(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new a.G(n):null,this.themeType=t.themeType}static define(e,t){return new el(e,t||{})}}let ea=s.sj.define(),eu=s.sj.define({combine:e=>e.length?[e[0]]:null});function eh(e){let t=e.facet(ea);return t.length?t:e.facet(eu)}function ec(e,t){let n=[ef],r;return e instanceof el&&(e.module&&n.push(o.Lz.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(eu.of(e)):r?n.push(ea.computeN([o.Lz.darkTheme],t=>t.facet(o.Lz.darkTheme)==("dark"==r)?[e]:[])):n.push(ea.of(e)),n}let ef=s.Nb.high(o.Z9.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=p(e.state),this.decorations=this.buildDeco(e,eh(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=p(e.state),n=eh(e.state),r=n!=eh(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&s>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return o.NZ.none;let n=new s.vB;for(let{from:r,to:i}of e.visibleRanges)(0,l.DM)(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=o.NZ.mark({class:r})))},r,i);return n.finish()}},{decorations:e=>e.decorations}));l._A.meta,l._A.link,l._A.heading,l._A.emphasis,l._A.strong,l._A.strikethrough,l._A.keyword,l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName,l._A.literal,l._A.inserted,l._A.string,l._A.deleted,l._A.regexp,l._A.escape,l._A.string,l._A.variableName,l._A.variableName,l._A.typeName,l._A.namespace,l._A.className,l._A.variableName,l._A.macroName,l._A.propertyName,l._A.comment,l._A.invalid;let ed=o.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ep="()[]{}",em=s.sj.define({combine:e=>(0,s.QR)(e,{afterCursor:!0,brackets:ep,maxScanDistance:1e4,renderMatch:eb})}),eg=o.NZ.mark({class:"cm-matchingBracket"}),ey=o.NZ.mark({class:"cm-nonmatchingBracket"});function eb(e){let t=[],n=e.matched?eg:ey;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function ev(e){let t=[],n=e.facet(em);for(let r of e.selection.ranges){if(!r.empty)continue;let i=eC(e,r.head,-1,n)||r.head>0&&eC(e,r.head-1,1,n)||n.afterCursor&&(eC(e,r.head,1,n)||r.head<e.doc.length&&eC(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return o.NZ.set(t,!0)}let ew=[o.Z9.fromClass(class{constructor(e){this.paused=!1,this.decorations=ev(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=ev(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),ed];function ek(e={}){return[em.of(e),ew]}let eD=new i.uY;function ex(e,t,n){let r=e.prop(t<0?i.uY.openedBy:i.uY.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function eA(e){let t=e.type.prop(eD);return t?t(e.node):e}function eC(e,t,n,r={}){let i=r.maxScanDistance||1e4,s=r.brackets||ep,o=p(e),l=o.resolveInner(t,n);for(let e=l;e;e=e.parent){let r=ex(e.type,n,s);if(r&&e.from<e.to){let i=eA(e);if(i&&(n>0?t>=i.from&&t<i.to:t>i.from&&t<=i.to))return function(e,t,n,r,i){let s=t.parent,o={from:n.from,to:n.to},l=0,a=null==s?void 0:s.cursor();if(a&&(e<0?a.childBefore(t.from):a.childAfter(t.to)))do if(e<0?a.to<=t.from:a.from>=t.to){if(0==l&&r.indexOf(a.type.name)>-1&&a.from<a.to){let e=eA(a);return{start:o,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(ex(a.type,e,i))l++;else if(ex(a.type,-e,i)){if(0==l){let e=eA(a);return{start:o,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(e<0?a.prevSibling():a.nextSibling());return{start:o,matched:!1}}(n,e,i,r,s)}}return function(e,t,n,r,i,s,o){if(n<0?!t:t==e.doc.length)return null;let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=o.indexOf(l);if(a<0||a%2==0!=n>0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},h=e.doc.iterRange(t,n>0?e.doc.length:0),c=0;for(let e=0;!h.next().done&&e<=s;){let s=h.value;n<0&&(e+=s.length);let l=t+e*n;for(let e=n>0?0:s.length-1,t=n>0?s.length:-1;e!=t;e+=n){let t=o.indexOf(s[e]);if(!(t<0)&&r.resolveInner(l+e,1).type==i)if(t%2==0==n>0)c++;else{if(1==c)return{start:u,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};c--}}n>0&&(e+=s.length)}return h.done?{start:u,matched:!1}:null}(e,t,n,o,l.type,i,s)}let eE=Object.create(null),eS=[i.Z6.none],e_=[],eO=Object.create(null),eF=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])eF[e]=function(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||l._A[n];r?"function"==typeof r?t.length?t=t.map(r):eP(n,`Modifier ${n} used at start of tag`):t.length?eP(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:eP(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),s=r+" "+n.map(e=>e.id),o=eO[s];if(o)return o.id;let a=eO[s]=i.Z6.define({id:eS.length,name:r,props:[(0,l.pn)({[r]:n})]});return eS.push(a),a.id}(eE,t);function eP(e,t){e_.indexOf(e)>-1||(e_.push(e),console.warn(t))}o.OP.RTL,o.OP.LTR},41593(e,t,n){"use strict";n.d(t,{$w:()=>v,pJ:()=>z,bu:()=>x,PL:()=>m});var r=n(50511),i=n(24509);function s(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)!function e(t,n){if("string"==typeof n)t.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)t.appendChild(n);else if(Array.isArray(n))for(var r=0;r<n.length;r++)e(t,n[r]);else throw RangeError("Unsupported child node: "+n)}(e,arguments[t]);return e}class o{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class l{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=n.facet(k).markerFilter;s&&(e=s(e,n));let o=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),u=new i.vB,h=[],c=0,f=n.doc.iter(),d=0,p=n.doc.length;for(let e=0;;){let t,n,i=e==o.length?null:o[e];if(!i&&!h.length)break;if(h.length)t=c,n=h.reduce((e,t)=>Math.min(e,t.to),i&&i.from>t?i.from:1e8);else{if((t=i.from)>p)break;n=i.to,h.push(i),e++}for(;e<o.length;){let r=o[e];if(r.from==t&&(r.to>r.from||r.to==t))h.push(r),e++,n=Math.min(r.to,n);else{n=Math.min(r.from,n);break}}n=Math.min(n,p);let s=!1;if(h.some(e=>e.from==t&&(e.to==n||n==p))&&!(s=t==n)&&n-t<10){let e=t-(d+f.value.length);e>0&&(f.next(e),d=t);for(let e=t;;){if(e>=n){s=!0;break}if(!f.lineBreak&&d+f.value.length>e)break;e=d+f.value.length,d+=f.value.length,f.next()}}let l=T(h);if(s)u.add(t,t,r.NZ.widget({widget:new E(l),diagnostics:h.slice()}));else{let e=h.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");u.add(t,n,r.NZ.mark({class:"cm-lintRange cm-lintRange-"+l+e,diagnostics:h.slice(),inclusiveEnd:h.some(e=>e.to>n)}))}if((c=n)==p)break;for(let e=0;e<h.length;e++)h[e].to<=c&&h.splice(e--,1)}let m=u.finish();return new l(m,t,a(m))}}function a(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&0>i.diagnostics.indexOf(t)))if(r){if(0>i.diagnostics.indexOf(r.diagnostic))return!1;r=new o(r.from,n,r.diagnostic)}else r=new o(e,n,t||i.diagnostics[0])}),r}function u(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(k).hideOn(e,n,r);if(null!=i)return i;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(c))||e.changes.touchesRange(s.from,Math.max(s.to,r)))}function h(e,t){return e.field(p,!1)?t:t.concat(i.Pe.appendConfig.of(R))}let c=i.Pe.define(),f=i.Pe.define(),d=i.Pe.define(),p=i.sU.define({create:()=>new l(r.NZ.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=a(n,e.selected.diagnostic,i)||a(n,null,i)}!n.size&&i&&t.state.facet(k).autoPanel&&(i=null),e=new l(n,i,r)}for(let n of t.effects)if(n.is(c)){let r=t.state.facet(k).autoPanel?n.value.length?_.open:null:e.panel;e=l.init(n.value,r,t.state)}else n.is(f)?e=new l(e.diagnostics,n.value?_.open:null,e.selected):n.is(d)&&(e=new l(e.diagnostics,e.panel,n.value));return e},provide:e=>[r.S7.from(e,e=>e.panel),r.Lz.decorations.from(e,e=>e.diagnostics)]});function m(e){let t=e.field(p,!1);return t?t.diagnostics.size:0}let g=r.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function y(e,t){return s("ul",{class:"cm-tooltip-lint"},t.map(t=>C(e,t,!1)))}let b=e=>{let t=e.state.field(p,!1);return!!t&&!!t.panel&&(e.dispatch({effects:f.of(!1)}),!0)},v=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(p,!1);t&&t.panel||e.dispatch({effects:h(e.state,[f.of(!0)])});let n=(0,r.ld)(e,_.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(p,!1);if(!t)return!1;let n=e.state.selection.main,r=a(t.diagnostics,null,n.to+1);return(!!r||!!(r=a(t.diagnostics,null,0))&&(r.from!=n.from||r.to!=n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],w=r.Z9.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(k);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(k);t.length&&function(e,t,n){let r=[],i=-1;for(let s of e)s.then(n=>{r.push(n),clearTimeout(i),r.length==e.length?t(r):i=setTimeout(()=>t(r),200)},n)}(t.map(e=>Promise.resolve(e(this.view))),t=>{var n,r;this.view.state.doc==e.doc&&this.view.dispatch((n=this.view.state,r=t.reduce((e,t)=>e.concat(t)),{effects:h(n,[c.of(r)])}))},e=>{(0,r.c_)(this.view.state,e)})}}update(e){let t=e.state.facet(k);(e.docChanged||t!=e.startState.facet(k)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),k=i.sj.define({combine:e=>({sources:e.map(e=>e.source).filter(e=>null!=e),...(0,i.QR)(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:D,tooltipFilter:D,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})})});function D(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function x(e,t={}){return[k.of({source:e,config:t}),w,R]}function A(e){let t=[];if(e)t:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue t}}t.push("")}return t}function C(e,t,n){var r;let i=n?A(t.actions):[];return s("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},s("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null==(r=t.actions)?void 0:r.map((n,r)=>{let o=!1,l=r=>{if(r.preventDefault(),o)return;o=!0;let i=a(e.state.field(p).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:u}=n,h=i[r]?u.indexOf(i[r]):-1,c=h<0?u:[u.slice(0,h),s("u",u.slice(h,h+1)),u.slice(h+1)];return s("button",{type:"button",class:"cm-diagnosticAction"+(n.markClass?" "+n.markClass:""),onclick:l,onmousedown:l,"aria-label":` Action: ${u}${h<0?"":` (access key "${i[r]})"`}.`},c)}),t.source&&s("div",{class:"cm-diagnosticSource"},t.source))}class E extends r.xO{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return s("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class S{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(0xffffffff*Math.random()).toString(16),this.dom=C(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class _{constructor(e){this.view=e,this.items=[];let t=t=>{if(!t.ctrlKey&&!t.altKey&&!t.metaKey){if(27==t.keyCode)b(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65)||!(t.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],r=A(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=a(this.view.state.field(p).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}t.preventDefault()}},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=s("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=s("div",{class:"cm-panel-lint"},this.list,s("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>b(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field(p).selected;if(!e)return -1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return -1}update(){let{diagnostics:e,selected:t}=this.view.state.field(p),n=0,r=!1,i=null,s=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:l})=>{for(let e of l.diagnostics){if(s.has(e))continue;s.add(e);let o=-1,l;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(l=new S(this.view,e),this.items.splice(n,0,l),r=!0):(l=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&l.diagnostic==t.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),i=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new S(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=a(this.view.state.field(p).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:d.of(t)})}static open(e){return new _(e)}}function O(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function F(e){return O(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}let P=r.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:F("#d11")},".cm-lintRange-warning":{backgroundImage:F("orange")},".cm-lintRange-info":{backgroundImage:F("#999")},".cm-lintRange-hint":{backgroundImage:F("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function T(e){let t="hint",n=1;for(let i of e){var r;let e="error"==(r=i.severity)?4:"warning"==r?3:"info"==r?2:1;e>n&&(n=e,t=i.severity)}return t}class B extends r.wJ{constructor(e){super(),this.diagnostics=e,this.severity=T(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(j).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>(function(e,t,n){function r(){let r,i=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(i.from)&&e.dispatch({effects:N.of({pos:i.from,above:!1,clip:!1,create:()=>({dom:y(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,r=n=>{let i=t.getBoundingClientRect();if(!(n.clientX>i.left-10)||!(n.clientX<i.right+10)||!(n.clientY>i.top-10)||!(n.clientY<i.bottom+10)){for(let e=n.target;e;e=e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",r),e.state.field(L)&&e.dispatch({effects:N.of(null)})}},window.addEventListener("mousemove",r)}let{hoverTime:i}=e.state.facet(j),s=setTimeout(r,i);t.onmouseout=()=>{clearTimeout(s),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(s),s=setTimeout(r,i)}})(e,t,n)),t}}let M=(0,r.cU)({class:"cm-gutter-lint",markers:e=>e.state.field(I),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(I).between(n.from,n.to,(e,t,i)=>{e>n.from&&e<n.to&&r.push(...i.diagnostics)}),r.length?new B(r):null}}),I=i.sU.define({create:()=>i.om.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(j).markerFilter;for(let r of t.effects)if(r.is(c)){let s=r.value;n&&(s=n(s||[],t.state)),e=function(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new B(n[e]).range(+e));return i.om.of(r,!0)}(t.state.doc,s.slice(0))}return e}}),N=i.Pe.define(),L=i.sU.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=u(t,e)?null:{...e,pos:t.changes.mapPos(e.pos)}),t.effects.reduce((e,t)=>t.is(N)?t.value:e,e)),provide:e=>r.DK.from(e)}),$=r.Lz.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:O('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:O('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:O('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),R=[p,r.Lz.decorations.compute([p],e=>{let{selected:t,panel:n}=e.field(p);return t&&n&&t.from!=t.to?r.NZ.set([g.range(t.from,t.to)]):r.NZ.none}),(0,r.Ux)(function(e,t,n){let{diagnostics:r}=e.state.field(p),i,s=-1,o=-1;r.between(t-(n<0),t+ +(n>0),(e,r,{spec:l})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=l.diagnostics,s=e,o=r,!1});let l=e.state.facet(k).tooltipFilter;return(i&&l&&(i=l(i,e.state)),i)?{pos:s,end:o,above:e.state.doc.lineAt(s).to<o,create:()=>({dom:y(e,i)})}:null},{hideOn:u}),P],j=i.sj.define({combine:e=>(0,i.QR)(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function z(e={}){return[j.of(e),I,M,$,L]}},24509(e,t,n){"use strict";let r;n.d(t,{ZX:()=>ep,kn:()=>ez,MK:()=>A,iR:()=>O,Fh:()=>C,zK:()=>D,sU:()=>G,om:()=>e_,$t:()=>ek,Pe:()=>ed,OF:()=>R,Nb:()=>Y,vS:()=>x,QR:()=>eD,y$:()=>ej,YH:()=>eh,FB:()=>ex,Gu:()=>F,Je:()=>ev,vB:()=>eO,VR:()=>P,EY:()=>d,sj:()=>q});let i=[],s=[],o="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<o.length;e++)(e%2?s:i).push(t+=o[e]);function l(e){return e>=127462&&e<=127487}function a(e,t,n){if(t==e.length)return t;t&&h(e.charCodeAt(t))&&c(e.charCodeAt(t-1))&&t--;let r=u(e,t);for(t+=f(r);t<e.length;){let o=u(e,t);if(8205==r||8205==o||n&&function(e){if(e<768)return!1;for(let t=0,n=i.length;;){let r=t+n>>1;if(e<i[r])n=r;else{if(!(e>=s[r]))return!0;t=r+1}if(t==n)return!1}}(o))t+=f(o),r=o;else if(l(o)){let n=0,r=t-2;for(;r>=0&&l(u(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function u(e,t){let n=e.charCodeAt(t);if(!c(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return h(r)?(n-55296<<10)+(r-56320)+65536:n}function h(e){return e>=56320&&e<57344}function c(e){return e>=55296&&e<56320}function f(e){return e<65536?1:2}class d{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=k(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),m.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=k(this,e,t);let n=[];return this.decompose(e,t,n,0),m.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new y(this),i=new y(e);for(let e=t,s=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(e=1){return new y(this,e)}iterRange(e,t=this.length){return new b(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new v(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new p(e):m.from(p.split(e,[])):d.empty}}class p extends d{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.text[i],o=r+s.length;if((t?n:o)>=e)return new w(r,o,n,s);r=o+1,n++}}decompose(e,t,n,r){var i;let s=e<=0&&t>=this.length?this:new p((i=this.text,g(i,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=g(s.text,e.text.slice(),0,s.length);if(t.length<=32)n.push(new p(t,e.length+s.length));else{let e=t.length>>1;n.push(new p(t.slice(0,e)),new p(t.slice(e)))}}else n.push(s)}replace(e,t,n){var r;if(!(n instanceof p))return super.replace(e,t,n);[e,t]=k(this,e,t);let i=g(this.text,g(n.text,(r=this.text,g(r,[""],0,e))),t),s=this.length+n.length-(t-e);return i.length<=32?new p(i,s):m.from(p.split(i,[]),s)}sliceString(e,t=this.length,n="\n"){[e,t]=k(this,e,t);let r="";for(let i=0,s=0;i<=t&&s<this.text.length;s++){let o=this.text[s],l=i+o.length;i>e&&s&&(r+=n),e<l&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=l+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new p(n,r)),n=[],r=-1);return r>-1&&t.push(new p(n,r)),t}}class m extends d{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.children[i],o=r+s.length,l=n+s.lines-1;if((t?l:o)>=e)return s.lineInner(e,t,n,r);r=o+1,n=l+1}}decompose(e,t,n,r){for(let i=0,s=0;s<=t&&i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e<=l&&t>=s){let i=r&(s<=e|2*(l>=t));s>=e&&l<=t&&!i?n.push(o):o.decompose(e-s,t-s,n,i)}s=l+1}}replace(e,t,n){if([e,t]=k(this,e,t),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let s=this.children[r],o=i+s.length;if(e>=i&&t<=o){let l=s.replace(e-i,t-i,n),a=this.lines-s.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let i=this.children.slice();return i[r]=l,new m(i,this.length-(t-e)+n.length)}return super.replace(i,o,l)}i=o+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=k(this,e,t);let r="";for(let i=0,s=0;i<this.children.length&&s<=t;i++){let o=this.children[i],l=s+o.length;s>e&&i&&(r+=n),e<l&&t>s&&(r+=o.sliceString(e-s,t-s,n)),s=l+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof m))return 0;let n=0,[r,i,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==s||i==o)return n;let l=this.children[r],a=e.children[i];if(l!=a)return n+l.scanIdentical(a,t);n+=l.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new p(n,t)}let r=Math.max(32,n>>5),i=r<<1,s=r>>1,o=[],l=0,a=-1,u=[];function h(){0!=l&&(o.push(1==u.length?u[0]:m.from(u,a)),a=-1,l=u.length=0)}for(let t of e)!function e(t){let n;if(t.lines>i&&t instanceof m)for(let n of t.children)e(n);else t.lines>s&&(l>s||!l)?(h(),o.push(t)):t instanceof p&&l&&(n=u[u.length-1])instanceof p&&t.lines+n.lines<=32?(l+=t.lines,a+=t.length+1,u[u.length-1]=new p(n.text.concat(t.text),n.length+1+t.length)):(l+t.lines>r&&h(),l+=t.lines,a+=t.length+1,u.push(t))}(t);return h(),1==o.length?o[0]:new m(o,t)}}function g(e,t,n=0,r=1e9){for(let i=0,s=0,o=!0;s<e.length&&i<=r;s++){let l=e[s],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(t[t.length-1]+=l,o=!1):t.push(l)),i=a+1}return t}d.empty=new p([""],0);class y{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof p?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],s=i>>1,o=r instanceof p?r.text.length:r.children.length;if(s==(t>0?o:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof p){let i=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[s+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof p?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class b{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new y(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class v{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"u">typeof Symbol&&(d.prototype[Symbol.iterator]=function(){return this.iter()},y.prototype[Symbol.iterator]=b.prototype[Symbol.iterator]=v.prototype[Symbol.iterator]=function(){return this});class w{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function k(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function D(e,t,n=!0,r=!0){return function(e,t,n=!0,r=!0){return(n?a:function(e,t,n){for(;t>0;){let r=a(e,t-2,n);if(r<t)return r;t--}return 0})(e,t,r)}(e,t,n,r)}function x(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return r>=56320&&r<57344?(n-55296<<10)+(r-56320)+65536:n}function A(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function C(e){return e<65536?1:2}let E=/\r\n?|\n/;var S,_,O=((S=O||(O={}))[S.Simple=0]="Simple",S[S.TrackDel=1]="TrackDel",S[S.TrackBefore=2]="TrackBefore",S[S.TrackAfter=3]="TrackAfter",S);class F{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?(e(n,r,i),r+=i):r+=s,n+=i}}iterChangedRanges(e,t=!1){M(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new F(e)}composeDesc(e){return this.empty?e:e.empty?this:N(this,e)}mapDesc(e,t=!1){return e.empty?this:I(this,e,t)}mapPos(e,t=-1,n=O.Simple){let r=0,i=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],l=this.sections[s++],a=r+o;if(l<0){if(a>e)return i+(e-r);i+=o}else{if(n!=O.Simple&&a>=e&&(n==O.TrackDel&&r<e&&a>e||n==O.TrackBefore&&r<e||n==O.TrackAfter&&a>e))return null;if(a>e||a==e&&t<0&&!o)return e==r||t<0?i:i+l;i+=l}r=a}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],s=this.sections[n++],o=r+i;if(s>=0&&r<=t&&o>=e)return!(r<e)||!(o>t)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new F(e)}static create(e){return new F(e)}}class P extends F{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return M(this,(t,n,r,i,s)=>e=e.replace(r,r+(n-t),s),!1),e}mapDesc(e,t=!1){return I(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let s=t[r],o=t[r+1];if(o>=0){t[r]=o,t[r+1]=s;let l=r>>1;for(;n.length<l;)n.push(d.empty);n.push(s?e.slice(i,i+s):d.empty)}i+=s}return new P(t,n)}compose(e){return this.empty?e:e.empty?this:N(this,e,!0)}map(e,t=!1){return e.empty?this:I(this,e,t,!0)}iterChanges(e,t=!1){M(this,e,t)}get desc(){return F.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new L(this);n:for(let s=0,o=0;;){let l=s==e.length?1e9:e[s++];for(;o<l||o==l&&0==i.len;){if(i.done)break n;let e=Math.min(i.len,l-o);T(r,e,-1);let s=-1==i.ins?-1:0==i.off?i.ins:0;T(t,e,s),s>0&&B(n,t,i.text),i.forward(e),o+=e}let a=e[s++];for(;o<a;){if(i.done)break n;let e=Math.min(i.len,a-o);T(t,e,-1),T(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),o+=e}}return{changes:new P(t,n),filtered:F.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],s=0,o=null;function l(e=!1){if(!e&&!r.length)return;s<t&&T(r,t-s,-1);let n=new P(r,i);o=o?o.compose(n.map(o)):n,r=[],i=[],s=0}return!function e(a){if(Array.isArray(a))for(let t of a)e(t);else if(a instanceof P){if(a.length!=t)throw RangeError(`Mismatched change set length (got ${a.length}, expected ${t})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:e,to:o=e,insert:u}=a;if(e>o||e<0||o>t)throw RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let h=u?"string"==typeof u?d.of(u.split(n||E)):u:d.empty,c=h.length;if(e==o&&0==c)return;e<s&&l(),e>s&&T(r,e-s,-1),T(r,o-e,c),B(i,r,h),s=o}}(e),l(!o),o}static empty(e){return new P(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(d.empty);n[r]=d.of(i.slice(1)),t.push(i[0],n[r].length)}}return new P(t,n)}static createSet(e,t){return new P(e,t)}}function T(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function B(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(d.empty);e.push(n)}}function M(e,t,n){let r=e.inserted;for(let i=0,s=0,o=0;o<e.sections.length;){let l=e.sections[o++],a=e.sections[o++];if(a<0)i+=l,s+=l;else{let u=i,h=s,c=d.empty;for(;u+=l,h+=a,a&&r&&(c=c.append(r[o-2>>1])),!n&&o!=e.sections.length&&!(e.sections[o+1]<0);)l=e.sections[o++],a=e.sections[o++];t(i,u,s,h,c),i=u,s=h}}}function I(e,t,n,r=!1){let i=[],s=r?[]:null,o=new L(e),l=new L(t);for(let e=-1;;)if(o.done&&l.len||l.done&&o.len)throw Error("Mismatched change set lengths");else if(-1==o.ins&&-1==l.ins){let e=Math.min(o.len,l.len);T(i,e,-1),o.forward(e),l.forward(e)}else if(l.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(l.len<o.len||l.len==o.len&&!n))){let t=l.len;for(T(i,l.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(T(i,0,o.ins),s&&B(s,i,o.text),e=o.i),o.forward(n),t-=n}l.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(-1==l.ins){let e=Math.min(n,l.len);t+=e,n-=e,l.forward(e)}else if(0==l.ins&&l.len<n)n-=l.len,l.next();else break;T(i,t,e<o.i?o.ins:0),s&&e<o.i&&B(s,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&l.done)return s?P.createSet(i,s):F.create(i);else throw Error("Mismatched change set lengths")}function N(e,t,n=!1){let r=[],i=n?[]:null,s=new L(e),o=new L(t);for(let e=!1;;)if(s.done&&o.done)return i?P.createSet(r,i):F.create(r);else if(0==s.ins)T(r,s.len,0,e),s.next();else if(0!=o.len||o.done)if(s.done||o.done)throw Error("Mismatched change set lengths");else{let t=Math.min(s.len2,o.len),n=r.length;if(-1==s.ins){let n=-1==o.ins?-1:o.off?0:o.ins;T(r,t,n,e),i&&n&&B(i,r,o.text)}else -1==o.ins?(T(r,s.off?0:s.len,t,e),i&&B(i,r,s.textBit(t))):(T(r,s.off?0:s.len,o.off?0:o.ins,e),i&&!o.off&&B(i,r,o.text));e=(s.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),s.forward2(t),o.forward(t)}else T(r,0,o.ins,e),i&&B(i,r,o.text),o.next()}class L{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?d.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?d.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ${constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 0xffffff==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new $(n,r,this.flags)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return R.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return R.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return R.range(e.anchor,e.head)}static create(e,t,n){return new $(e,t,n)}}class R{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:R.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new R([this.main],0)}addRange(e,t=!0){return R.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,R.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new R(e.ranges.map(e=>$.fromJSON(e)),e.main)}static single(e,t=e){return new R([R.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return R.normalized(e.slice(),t);n=i.to}return new R(e,t)}static cursor(e,t=0,n,r){return $.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:0xffffff)<<6)}static range(e,t,n,r,i){let s=(null!=n?n:0xffffff)<<6|(null==r?7:Math.min(6,r));return i||e==t||(i=t<e?1:-1),t<e?$.create(t,e,48|s):$.create(e,t,(i?i<0?8:16:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let s=i.from,o=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?R.range(o,s):R.range(s,o))}}return new R(e,t)}}function j(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let z=0;class q{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=z++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new q(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(!e.combine?U:(e,t)=>e===t),!!e.static,e.enables)}of(e){return new V([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new V(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new V(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function U(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class V{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=z++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,s=e[i]>>1,o=2==this.type,l=!1,a=!1,u=[];for(let n of this.dependencies)"doc"==n?l=!0:"selection"==n?a=!0:((null!=(t=e[n.id])?t:1)&1)==0&&u.push(e[n.id]);return{create:e=>(e.values[s]=n(e),1),update(e,t){if(l&&t.docChanged||a&&(t.docChanged||t.selection)||W(e,u)){let t=n(e);if(o?!H(t,e.values[s],r):!r(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let l,a=t.config.address[i];if(null!=a){let i=en(t,a);if(this.dependencies.every(n=>n instanceof q?t.facet(n)===e.facet(n):!(n instanceof G)||t.field(n,!1)==e.field(n,!1))||(o?H(l=n(e),i,r):r(l=n(e),i)))return e.values[s]=i,0}else l=n(e);return e.values[s]=l,1}}}}function H(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function W(e,t){let n=!1;for(let r of t)1&et(e,r)&&(n=!0);return n}let K=q.define({static:!0});class G{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new G(z++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(K).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(K),i=n.facet(K),s;return(s=r.find(e=>e.field==this))&&s!=i.find(e=>e.field==this)?(e.values[t]=s.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,K.of({field:this,create:e})]}get extension(){return this}}function J(e){return t=>new Z(t,e)}let Y={highest:J(0),high:J(1),default:J(2),low:J(3),lowest:J(4)};class Z{constructor(e,t){this.inner=e,this.prec=t}}class Q{of(e){return new X(this,e)}reconfigure(e){return Q.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class X{constructor(e,t){this.compartment=e,this.inner=t}}class ee{constructor(e,t,n,r,i,s){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){var r,i,s;let o,l,a=[],u=Object.create(null),h=new Map;for(let n of(r=e,i=t,s=h,o=[[],[],[],[],[]],l=new Map,!function e(t,n){let r=l.get(t);if(null!=r){if(r<=n)return;let e=o[r].indexOf(t);e>-1&&o[r].splice(e,1),t instanceof X&&s.delete(t.compartment)}if(l.set(t,n),Array.isArray(t))for(let r of t)e(r,n);else if(t instanceof X){if(s.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let r=i.get(t.compartment)||t.inner;s.set(t.compartment,r),e(r,n)}else if(t instanceof Z)e(t.inner,t.prec);else if(t instanceof G)o[n].push(t),t.provides&&e(t.provides,n);else if(t instanceof V)o[n].push(t),t.facet.extensions&&e(t.facet.extensions,2);else{let r=t.extension;if(!r)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(r,n)}}(r,2),o.reduce((e,t)=>e.concat(t))))n instanceof G?a.push(n):(u[n.facet.id]||(u[n.facet.id]=[])).push(n);let c=Object.create(null),f=[],d=[];for(let e of a)c[e.id]=d.length<<1,d.push(t=>e.slot(t));let p=null==n?void 0:n.config.facets;for(let e in u){let t=u[e],r=t[0].facet,i=p&&p[e]||[];if(t.every(e=>0==e.type))if(c[r.id]=f.length<<1|1,U(i,t))f.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));f.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(c[e.id]=f.length<<1|1,f.push(e.value)):(c[e.id]=d.length<<1,d.push(t=>e.dynamicSlot(t)));c[r.id]=d.length<<1,d.push(e=>(function(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),s=r.filter(e=>!(1&e)),o=e[t.id]>>1;function l(e){let n=[];for(let t=0;t<r.length;t++){let s=en(e,r[t]);if(2==i[t])for(let e of s)n.push(e);else n.push(s)}return t.combine(n)}return{create(e){for(let t of r)et(e,t);return e.values[o]=l(e),1},update(e,n){if(!W(e,s))return 0;let r=l(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let s=W(e,r),a=i.config.facets[t.id],u=i.facet(t);if(a&&!s&&U(n,a))return e.values[o]=u,0;let h=l(e);return t.compare(h,u)?(e.values[o]=u,0):(e.values[o]=h,1)}}})(e,r,t))}}return new ee(e,h,d.map(e=>e(c)),c,f,u)}}function et(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function en(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let er=q.define(),ei=q.define({combine:e=>e.some(e=>e),static:!0}),es=q.define({combine:e=>e.length?e[0]:void 0,static:!0}),eo=q.define(),el=q.define(),ea=q.define(),eu=q.define({combine:e=>!!e.length&&e[0]});class eh{constructor(e,t){this.type=e,this.value=t}static define(){return new ec}}class ec{of(e){return new eh(this,e)}}class ef{constructor(e){this.map=e}of(e){return new ed(this,e)}}class ed{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new ed(this.type,t)}is(e){return this.type==e}static define(e={}){return new ef(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}ed.reconfigure=ed.define(),ed.appendConfig=ed.define();class ep{constructor(e,t,n,r,i,s){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,n&&j(n,t.newLength),i.some(e=>e.type==ep.time)||(this.annotations=i.concat(ep.time.of(Date.now())))}static create(e,t,n,r,i,s){return new ep(e,t,n,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ep.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function em(e,t,n){var r;let i,s,o;return n?(i=t.changes,s=P.empty(t.changes.length),o=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),s=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(i)),{changes:o,selection:t.selection?t.selection.map(s):null==(r=e.selection)?void 0:r.map(i),effects:ed.mapEffects(e.effects,i).concat(ed.mapEffects(t.effects,s)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function eg(e,t,n){let r=t.selection,i=eb(t.annotations);return t.userEvent&&(i=i.concat(ep.userEvent.of(t.userEvent))),{changes:t.changes instanceof P?t.changes:P.of(t.changes||[],n,e.facet(es)),selection:r&&(r instanceof R?r:R.single(r.anchor,r.head)),effects:eb(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}ep.time=eh.define(),ep.userEvent=eh.define(),ep.addToHistory=eh.define(),ep.remote=eh.define();let ey=[];function eb(e){return null==e?ey:Array.isArray(e)?e:[e]}var ev=((_=ev||(ev={}))[_.Word=0]="Word",_[_.Space=1]="Space",_[_.Other=2]="Other",_);let ew=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{r=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class ek{constructor(e,t,n,r,i,s){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)et(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null==n){if(t)throw RangeError("Field is not present in this state");return}return et(this,n),en(this,n)}update(...e){return function e(t,n,r){let i=eg(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(r=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(r=!1);let s=!!n[e].sequential;i=em(i,eg(t,n[e],s?i.changes.newLength:t.doc.length),s)}let s=ep.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(ea),r=e;for(let i=n.length-1;i>=0;i--){let s=n[i](e);s&&Object.keys(s).length&&(r=em(r,eg(t,s,e.changes.newLength),!0))}return r==e?e:ep.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(r?function(t){let n=t.startState,r=!0;for(let e of n.facet(eo)){let n=e(t);if(!1===n){r=!1;break}Array.isArray(n)&&(r=!0===r?n:function(e,t){let n=[];for(let r=0,i=0;;){let s,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))s=e[r++],o=e[r++];else{if(!(i<t.length))return n;s=t[i++],o=t[i++]}!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}(r,n))}if(!0!==r){let e,i;if(!1===r)i=t.changes.invertedDesc,e=P.empty(n.doc.length);else{let n=t.changes.filter(r);e=n.changes,i=n.filtered.mapDesc(n.changes).invertedDesc}t=ep.create(n,e,t.selection&&t.selection.map(i),ed.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let i=n.facet(el);for(let r=i.length-1;r>=0;r--){let s=i[r](t);t=s instanceof ep?s:Array.isArray(s)&&1==s.length&&s[0]instanceof ep?s[0]:e(n,eb(s),!1)}return t}(s):s)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(Q.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(ed.reconfigure)?(n=null,r=t.value):t.is(ed.appendConfig)&&(n=null,r=eb(r).concat(t.value));t=n?e.startState.values.slice():new ek(n=ee.resolve(r,i,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let s=e.startState.facet(ei)?e.newSelection:e.newSelection.asSingle();new ek(n,e.newDoc,s,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:R.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],s=eb(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),l=this.changes(o.changes),a=l.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(a);let u=r.mapDesc(l,!0);i.push(o.range.map(u)),r=r.compose(a),s=ed.mapEffects(s,a).concat(ed.mapEffects(eb(o.effects),u))}return{changes:r,selection:R.create(i,t.mainIndex),effects:s}}changes(e=[]){return e instanceof P?e:P.of(e,this.doc.length,this.facet(ek.lineSeparator))}toText(e){return d.of(e.split(this.facet(ek.lineSeparator)||E))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(et(this,t),en(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof G&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let r=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],s=e[t];r.push(i.init(e=>i.spec.fromJSON(s,e)))}}return ek.create({doc:e.doc,selection:R.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=ee.resolve(e.extensions||[],new Map),n=e.doc instanceof d?e.doc:d.of((e.doc||"").split(t.staticFacet(ek.lineSeparator)||E)),r=e.selection?e.selection instanceof R?e.selection:R.single(e.selection.anchor,e.selection.head):R.single(0);return j(r,n.length),t.staticFacet(ei)||(r=r.asSingle()),new ek(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(ek.tabSize)}get lineBreak(){return this.facet(ek.lineSeparator)||"\n"}get readOnly(){return this.facet(eu)}phrase(e,...t){for(let t of this.facet(ek.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(er))for(let s of i(this,t,n))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){var t;let n=this.languageDataAt("wordChars",e);return t=n.length?n[0]:"",e=>{if(!/\S/.test(e))return ev.Space;if(function(e){if(r)return r.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ew.test(n)))return!0}return!1}(e))return ev.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return ev.Word;return ev.Other}}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-n,o=e-n;for(;s>0;){let e=D(t,s,!1);if(i(t.slice(e,s))!=ev.Word)break;s=e}for(;o<r;){let e=D(t,o);if(i(t.slice(o,e))!=ev.Word)break;o=e}return s==o?null:R.range(s+n,o+n)}}function eD(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],s=r[e];if(void 0===s)r[e]=i;else if(s===i||void 0===i);else if(Object.hasOwnProperty.call(n,e))r[e]=n[e](s,i);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}ek.allowMultipleSelections=ei,ek.tabSize=q.define({combine:e=>e.length?e[0]:4}),ek.lineSeparator=es,ek.readOnly=eu,ek.phrases=q.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),ek.languageData=er,ek.changeFilter=eo,ek.transactionFilter=el,ek.transactionExtender=ea,Q.reconfigure=ed.define();class ex{eq(e){return this==e}range(e,t=e){return eC.create(e,t,this)}}function eA(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}ex.prototype.startSide=ex.prototype.endSide=0,ex.prototype.point=!1,ex.prototype.mapMode=O.TrackDel;class eC{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new eC(e,t,n)}}function eE(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class eS{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let s=r,o=i.length;;){if(s==o)return s;let r=s+o>>1,l=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==s)return l>=0?s:o;l>=0?o=r:s=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),s=this.findIndex(n,1e9,!1,i);i<s;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t){let n=[],r=[],i=[],s=-1,o=-1;for(let l=0;l<this.value.length;l++){let a=this.value[l],u=this.from[l]+e,h=this.to[l]+e,c,f;if(u==h){let e=t.mapPos(u,a.startSide,a.mapMode);if(null==e||(c=f=e,a.startSide!=a.endSide&&(f=t.mapPos(u,a.endSide))<c))continue}else if((c=t.mapPos(u,a.startSide))>(f=t.mapPos(h,a.endSide))||c==f&&a.startSide>0&&a.endSide<=0)continue;0>(f-c||a.endSide-a.startSide)||(s<0&&(s=c),a.point&&(o=Math.max(o,f-c)),n.push(a),r.push(c-s),i.push(f-s))}return{mapped:n.length?new eS(r,i,n,o):null,pos:s}}}class e_{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new e_(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(n&&(t=t.slice().sort(eE)),this.isEmpty)return t.length?e_.of(t):this;let o=new eP(this,null,-1).goto(0),l=0,a=[],u=new eO;for(;o.value||l<t.length;)if(l<t.length&&(o.from-t[l].from||o.startSide-t[l].value.startSide)>=0){let e=t[l++];u.addInner(e.from,e.to,e.value)||a.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(o.chunkIndex)<t[l].from)&&(!s||r>this.chunkEnd(o.chunkIndex)||i<this.chunkPos[o.chunkIndex])&&u.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||r>o.to||i<o.from||s(o.from,o.to,o.value))&&!u.addInner(o.from,o.to,o.value)&&a.push(eC.create(o.from,o.to,o.value)),o.next());return u.finishInner(this.nextLayer.isEmpty&&!a.length?e_.empty:this.nextLayer.update({add:a,filter:s,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i],l=e.touchesRange(s,s+o.length);if(!1===l)r=Math.max(r,o.maxPoint),t.push(o),n.push(e.mapPos(s));else if(!0===l){let{mapped:i,pos:l}=o.map(s,e);i&&(r=Math.max(r,i.maxPoint),t.push(i),n.push(l))}}let i=this.nextLayer.map(e);return 0==t.length?i:new e_(n,t,i||e_.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],s=this.chunk[r];if(t>=i&&e<=i+s.length&&!1===s.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return eT.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return eT.from(e).goto(t)}static compare(e,t,n,r,i=-1){let s=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),l=eF(s,o,n),a=new eM(s,l,i),u=new eM(o,l,i);n.iterGaps((e,t,n)=>eI(a,e,u,t,n,r)),n.empty&&0==n.length&&eI(a,0,u,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=0x3b9ac9ff);let i=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),s=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(i.length!=s.length)return!1;if(!i.length)return!0;let o=eF(i,s),l=new eM(i,o,0).goto(n),a=new eM(s,o,0).goto(n);for(;;){if(l.to!=a.to||!eN(l.active,a.active)||l.point&&(!a.point||!eA(l.point,a.point)))return!1;if(l.to>r)return!0;l.next(),a.next()}}static spans(e,t,n,r,i=-1){let s=new eM(e,null,i).goto(t),o=t,l=s.openStart;for(;;){let e=Math.min(s.to,n);if(s.point){let n=s.activeForPoint(s.to),i=s.pointFrom<t?n.length+1:s.point.startSide<0?n.length:Math.min(n.length,l);r.point(o,e,s.point,n,i,s.pointRank),l=Math.min(s.openEnd(e),n.length)}else e>o&&(r.span(o,e,s.active,l),l=s.openEnd(e));if(s.to>n)return l+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(e,t=!1){let n=new eO;for(let r of e instanceof eC?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(eE(t,r)>0)return e.slice().sort(eE);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return e_.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=e_.empty;r=r.nextLayer)t=new e_(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}e_.empty=new e_([],[],null,-1),e_.empty.nextLayer=e_.empty;class eO{finishChunk(e){this.chunks.push(new eS(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new eO)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(e_.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=e_.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function eF(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let s=r.get(e.chunk[t]);null==s||(n?n.mapPos(s):s)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(s,s+e.chunk[t].length))||i.add(e.chunk[t])}return i}class eP{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class eT{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let s=e[i];!s.isEmpty;s=s.nextLayer)s.maxPoint>=n&&r.push(new eP(s,t,n,i));return 1==r.length?r[0]:new eT(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)eB(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)eB(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),eB(this.heap,0)}}}function eB(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),0>n.compare(i))break;e[r]=n,e[t]=i,t=r}}class eM{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eT.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){eL(this.active,e),eL(this.activeTo,e),eL(this.activeRank,e),this.minActive=eR(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;e$(this.active,t,n),e$(this.activeTo,t,r),e$(this.activeRank,t,i),e&&e$(e,t,this.cursor.from),this.minActive=eR(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&0>(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&eL(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(e.point)if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}else this.addActive(n),this.cursor.next()}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function eI(e,t,n,r,i,s){e.goto(t),n.goto(r);let o=r+i,l=r,a=r-t,u=!!s.boundChange;for(let t=!1;;){let r=e.to+a-n.to,i=r||e.endSide-n.endSide,h=i<0?e.to+a:n.to,c=Math.min(h,o);if(e.point||n.point?(e.point&&n.point&&eA(e.point,n.point)&&eN(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(l,c,e.point,n.point),t=!1):(t&&s.boundChange(l),c>l&&!eN(e.active,n.active)&&s.compareRange(l,c,e.active,n.active),u&&c<o&&(r||e.openEnd(h)!=n.openEnd(h))&&(t=!0)),h>o)break;l=h,i<=0&&e.next(),i>=0&&n.next()}}function eN(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!eA(e[n],t[n]))return!1;return!0}function eL(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function e$(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function eR(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)0>(t[i]-r||e[i].endSide-e[n].endSide)&&(n=i,r=t[i]);return n}function ej(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=D(e,i));return r}function ez(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=D(e,r)}return!0===r?-1:e.length}},50511(e,t,n){"use strict";let r;n.d(t,{Ux:()=>rh,Z9:()=>ej,Eg:()=>rc,Lz:()=>nI,NZ:()=>B,Wu:()=>rU,ld:()=>rp,OP:()=>el,DK:()=>rs,wJ:()=>rv,S7:()=>rb,$K:()=>rR,xO:()=>P,c_:()=>eN,cU:()=>rA,VH:()=>n0,w4:()=>nU});for(var i,s,o,l=n(24509),a=n(98104),u={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},h={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c="u">typeof navigator&&/Mac/.test(navigator.platform),f="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),d=0;d<10;d++)u[48+d]=u[96+d]=String(d);for(var d=1;d<=24;d++)u[d+111]="F"+d;for(var d=65;d<=90;d++)u[d]=String.fromCharCode(d+32),h[d]=String.fromCharCode(d);for(var p in u)h.hasOwnProperty(p)||(h[p]=u[p]);let m="u">typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},g="u">typeof document?document:{documentElement:{style:{}}},y=/Edge\/(\d+)/.exec(m.userAgent),b=/MSIE \d/.test(m.userAgent),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(m.userAgent),w=!!(b||v||y),k=!w&&/gecko\/(\d+)/i.test(m.userAgent),D=!w&&/Chrome\/(\d+)/.exec(m.userAgent),x="webkitFontSmoothing"in g.documentElement.style,A=!w&&/Apple Computer/.test(m.vendor),C=A&&(/Mobile\/\w+/.test(m.userAgent)||m.maxTouchPoints>2);var E={mac:C||/Mac/.test(m.platform),windows:/Win/.test(m.platform),linux:/Linux|X11/.test(m.platform),ie:w,ie_version:b?g.documentMode||6:v?+v[1]:y?+y[1]:0,gecko:k,gecko_version:k?+(/Firefox\/(\d+)/.exec(m.userAgent)||[0,0])[1]:0,chrome:!!D,chrome_version:D?+D[1]:0,ios:C,android:/Android\b/.test(m.userAgent),webkit:x,webkit_version:x?+(/\bAppleWebKit\/(\d+)/.exec(m.userAgent)||[0,0])[1]:0,safari:A,safari_version:A?+(/\bVersion\/(\d+(\.\d+)?)/.exec(m.userAgent)||[0,0])[1]:0,tabSize:null!=g.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function S(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}let _=Object.create(null);function O(e,t,n){if(e==t)return!0;e||(e=_),t||(t=_);let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(-1==i.indexOf(s)||e[s]!==t[s]))return!1;return!0}function F(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}class P{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var T=((i=T||(T={}))[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i);class B extends l.FB{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new M(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new N(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:s}=L(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(s?t?2e8:1:-6e8)+1}return new N(e,n,r,t,e.widget||null,!0)}static line(e){return new I(e)}static set(e,t=!1){return l.om.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}B.none=l.om.empty;class M extends B{constructor(e){let{start:t,end:n}=L(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?S(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||_}eq(e){return this==e||e instanceof M&&this.tagName==e.tagName&&O(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}M.prototype.point=!1;class I extends B{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof I&&this.spec.class==e.spec.class&&O(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}I.prototype.mapMode=l.iR.TrackBefore,I.prototype.point=!0;class N extends B{constructor(e,t,n,r,i,s){super(t,n,i,e),this.block=r,this.isReplace=s,this.mapMode=r?t<=0?l.iR.TrackBefore:l.iR.TrackAfter:l.iR.TrackDel}get type(){return this.startSide!=this.endSide?T.WidgetRange:this.startSide<=0?T.WidgetBefore:T.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,n;return e instanceof N&&(t=this.widget,t==(n=e.widget)||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function L(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function $(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}N.prototype.point=!0;class R extends l.FB{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof R&&this.tagName==e.tagName&&O(this.attributes,e.attributes)}static create(e){return new R(e.tagName,e.attributes||_)}static set(e,t=!1){return l.om.of(e,t)}}function j(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function z(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function q(e,t){if(!t.anchorNode)return!1;try{return z(e,t.anchorNode)}catch(e){return!1}}function U(e){return 3==e.nodeType?et(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function V(e,t,n,r){return!!n&&(K(e,t,n,r,-1)||K(e,t,n,r,1))}function H(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function W(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function K(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:G(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=H(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType||1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?G(e):0}}}function G(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function J(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Y(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.width-e.offsetWidth))&&(n=1),(r>.995&&r<1.005||!isFinite(r)||1>Math.abs(t.height-e.offsetHeight))&&(r=1),{scaleX:n,scaleY:r}}function Z(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let s=e.parentNode;s;)if(s==n.body||(!t||r)&&i)break;else if(1==s.nodeType)!i&&s.scrollHeight>s.clientHeight&&(i=s),t&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(11==s.nodeType)s=s.host;else break;return{x:r,y:i}}R.prototype.startSide=R.prototype.endSide=-1;class Q{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?G(t):0),n,Math.min(e.focusOffset,n?G(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let X=null;function ee(e){if(e.setActive)return e.setActive();if(X)return e.focus(X);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==X?{get preventScroll(){return X={preventScroll:!0},!0}}:void 0),!X){X=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function et(e,t,n=t){let i=r||(r=document.createRange());return i.setEnd(e,n),i.setStart(e,t),i}function en(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,e.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,e.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function er(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function ei(e,t){for(let n=e,r=t;;)if(3==n.nodeType&&r>0)return{node:n,offset:r};else if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;r=G(n=n.childNodes[r-1])}else{if(!n.parentNode||W(n))return null;r=H(n),n=n.parentNode}}function es(e,t){for(let n=e,r=t;;)if(3==n.nodeType&&r<n.nodeValue.length)return{node:n,offset:r};else if(1==n.nodeType&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||W(n))return null;r=H(n)+1,n=n.parentNode}}E.safari&&E.safari_version>=26&&(X=!1);class eo{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new eo(e.parentNode,H(e),t)}static after(e,t){return new eo(e.parentNode,H(e)+1,t)}}var el=((s=el||(el={}))[s.LTR=0]="LTR",s[s.RTL=1]="RTL",s);let ea=el.LTR,eu=el.RTL;function eh(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}let ec=eh("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),ef=eh("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ed=Object.create(null),ep=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);ed[t]=n,ed[n]=-t}function em(e){return e<=247?ec[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?ef[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let eg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ey{get dir(){return this.level%2?eu:ea}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let s=0;s<e.length;s++){let o=e[s];if(o.from<=t&&o.to>=t){if(o.level==n)return s;(i<0||(0!=r?r<0?o.from<t:o.to>t:e[i].level>o.level))&&(i=s)}}if(i<0)throw RangeError("Index out of range");return i}}let eb=[];function ev(e){return[new ey(0,e,0)]}let ew="",ek=l.sj.define(),eD=l.sj.define(),ex=l.sj.define(),eA=l.sj.define(),eC=l.sj.define(),eE=l.sj.define(),eS=l.sj.define(),e_=l.sj.define(),eO=l.sj.define(),eF=l.sj.define({combine:e=>e.some(e=>e)}),eP=l.sj.define({combine:e=>e.some(e=>e)}),eT=l.sj.define();class eB{constructor(e,t,n,r,i,s=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=s}map(e){return e.empty?this:new eB(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new eB(l.OF.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let eM=l.Pe.define({map:(e,t)=>e.map(t)}),eI=l.Pe.define();function eN(e,t,n){let r=e.facet(eA);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}let eL=l.sj.define({combine:e=>!e.length||e[0]}),e$=0,eR=l.sj.define({combine:e=>e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})});class ej{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(eR.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(eR.of({plugin:this,arg:e}))}static define(e,t){let{eventHandlers:n,eventObservers:r,provide:i,decorations:s}=t||{};return new ej(e$++,e,n,r,e=>{let t=[];return s&&t.push(eV.of(t=>{let n=t.plugin(e);return n?s(n):B.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return ej.define((t,n)=>new e(t,n),t)}}class ez{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(eN(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){eN(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null==(t=this.value)?void 0:t.destroy)try{this.value.destroy()}catch(t){eN(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let eq=l.sj.define(),eU=l.sj.define(),eV=l.sj.define(),eH=l.sj.define(),eW=l.sj.define(),eK=l.sj.define(),eG=l.sj.define();function eJ(e,t){let n=e.state.facet(eG);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return l.om.spans(r,t.from,t.to,{point(){},span(e,n,r,s){let o=e-t.from,l=n-t.from,a=i;for(let e=r.length-1;e>=0;e--,s--){let n=r[e].spec.bidiIsolate,i;if(null==n&&(n=function(e,t,n){for(let r=t;r<n;r++){let t=em(e.charCodeAt(r));if(1==t)break;if(2==t||4==t)return eu}return ea}(t.text,o,l)),s>0&&a.length&&(i=a[a.length-1]).to==o&&i.direction==n)i.to=l,a=i.inner;else{let e={from:o,to:l,direction:n,inner:[]};a.push(e),a=e.inner}}}}),i}let eY=l.sj.define();function eZ(e){let t=0,n=0,r=0,i=0;for(let s of e.state.facet(eY)){let o=s(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(n=Math.max(n,o.right)),null!=o.top&&(r=Math.max(r,o.top)),null!=o.bottom&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}let eQ=l.sj.define();class eX{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new eX(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,s=0;;){let o=Math.min(r<e.length?e[r].fromB:1e9,i<t.length?t[i]:1e9);if(1e9==o)break;let l=o+s,a=o,u=l;for(;;)if(i<t.length&&t[i]<=a){let n=t[i+1];i+=2,a=Math.max(a,n);for(let t=r;t<e.length&&e[t].fromB<=a;t++)s=e[t].toA-e[t].toB;u=Math.max(u,n+s)}else if(r<e.length&&e[r].fromB<=a){let t=e[r++];a=Math.max(a,t.toB),u=Math.max(u,t.toA),s=t.toA-t.toB}else break;n.push(new eX(l,u,o,a))}return n}}class e0{constructor(e,t,n){for(let r of(this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=l.VR.empty(this.startState.doc.length),n))this.changes=this.changes.compose(r.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new eX(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new e0(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}let e1=[];class e2{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return e1}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;null==t[r]&&e.removeAttribute(r)}for(let n in t){let r=t[n];"style"==n?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=H(this.dom),r=this.length?e>0:t>0;return new eo(this.parent.dom,n+ +!!r,0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof e5)return e;return null}static get(e){return e.cmTile}}class e3 extends e2{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t=this.dom,n=null,r,i=(null==e?void 0:e.node)==t?e:null,s=0;for(let o of this.children){if(o.sync(e),s+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=e6(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=e6(r);this.length=s}}function e6(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class e5 extends e3{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=e2.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;(n=n.parent).breakAfter&&i++,r=t.pop()}else{let s=n.children[r++];if(s instanceof e8)t.push(r),n=s,r=0;else{let t=i+s.length,n=e(s,i);if(void 0!==n)return n;i=t+s.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,s=-1;if(this.blockTiles((o,l)=>{let a=l+o.length;if(e>=l&&e<=a){if(o.isWidget()&&t>=-1&&t<=1){if(32&o.flags)return!0;16&o.flags&&(n=void 0)}(l<e||e==a&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-l),(a>e||e==l&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,s=e-l)}}),!n&&!i)throw Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:s}}}class e8 extends e3{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let n=new e8(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class e4 extends e3{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,n){let r=new e4(t||document.createElement("div"),e);return t&&n||(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,s=null,o=-1;!function e(l,a){for(let u=0,h=0;u<l.children.length&&h<=a;u++){let c=l.children[u],f=h+c.length;f>=a&&(c.isComposite()?e(c,a-h):(!s||s.isHidden&&(t>0||n&&function(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}(s,c)))&&(f>a||32&c.flags)?(s=c,o=a-h):(h<a||16&c.flags&&!c.isHidden)&&(r=c,i=a-h)),h=f}}(this,e);let l=(t<0?r:s)||r||s;return l?{tile:l,offset:l==r?i:o}:null}coordsIn(e,t){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=U(t);return n[n.length-1]||null}(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new eo(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,16&e.flags?1:32&e.flags?-1:t);let i=n.tile.parent,s=!1;for(let e of i.children){if(s)return new eo(e.dom,0);e==n.tile&&(s=!0)}}return new eo(this.dom,0)}}class e9 extends e3{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let n=new e9(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class e7 extends e2{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,i=e,s=0;0==e&&t<0||e==n&&t>=0?!(E.chrome||E.gecko)&&(e?(r--,s=1):i<n&&(i++,s=-1)):t<0?r--:i<n&&i++;let o=et(this.dom,r,i).getClientRects();if(!o.length)return null;let l=o[(s?s<0:t>=0)?0:o.length-1];return E.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(o,e=>e.width)||l),s?J(l,s<0):l||null}static of(e,t){let n=new e7(t||document.createTextNode(e),e);return t||(n.flags|=2),n}}class te extends e2{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return J(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let i=r?t.length-1:0;n=t[i],e>0?0!=i:i!=t.length-1&&!(n.top<n.bottom);i+=r?-1:1);return J(n,!r)}}get overrideDOMText(){if(!this.length)return l.EY.empty;let{root:e}=this;if(!e)return l.EY.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,n,r,i){return!i&&(i=e.toDOM(t),e.editable||(i.contentEditable="false")),new te(i,n,e,r)}}class tt extends e2{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return l.EY.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class tn{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:s,parents:o}=this;for(;e||t>0;)if(r.isComposite())if(s){if(!e)break;n&&n.break(),e--,s=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),s=!!r.breakAfter,({tile:r,index:i}=o.pop()),i++}else{let l=r.children[i],a=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!n||!1!==n.skip(l,0,l.length)||!l.isComposite)?(s=!!a,i++,e-=l.length):(o.push({tile:r,index:i}),r=l,i=0,n&&l.isComposite()&&n.enter(l))}else if(i==r.length)s=!!r.breakAfter,({tile:r,index:i}=o.pop()),i++;else if(e){let t=Math.min(e,r.length-i);n&&n.skip(r,i,i+t),e-=t,i+=t}else break;return this.tile=r,this.index=i,this.beforeBreak=s,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class tr{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}}class ti{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let s=this.ensureMarks(t,n),o=s.lastChild;o&&o.isText()&&!(8&o.flags)&&o.length+e.length<512?(this.cache.reused.set(o,2),(s.children[s.children.length-1]=new e7(o.dom,o.text+e)).parent=s):s.append(r||e7.of(e,null==(i=this.cache.find(e7))?void 0:i.dom)),this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?tc(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof e9&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(tc(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=e2.get(n.dom);e&&e.setDOM(tc(n.dom))}let e=e9.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=e2.get(e.text);i&&this.cache.reused.set(i,2);let s=new e7(e.text,e.text.nodeValue);s.flags|=8,r.append(s)}addInlineWidget(e,t,n){let r=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);r||this.flushBuffer();let i=this.ensureMarks(t,n);r||16&e.flags||i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=th);let r=e4.start(e,t||(null==(n=this.cache.find(e4))?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let s=e[i],o;if(t>0&&(o=r.lastChild)&&o instanceof e9&&o.mark.eq(s))r=o,t--;else{let e=e9.of(s,null==(n=this.cache.find(e9,e=>e.mark.eq(s)))?void 0:n.dom);r.append(e),r=e,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!tu(this.curLine,!1)||"BR"!=e.dom.nodeName&&e.isWidget()&&!(E.ios&&tu(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(td,0,32)||new te(td.toDOM(),0,td,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new tr(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&0>(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to);)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof e8&&r.wrapper.eq(n.wrapper))t=r;else{let r=e8.of(n.wrapper,null==(e=this.cache.find(e8,e=>e.wrapper.eq(n.wrapper)))?void 0:e.dom);t.append(r),t=r}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(tt,void 0,1);return n&&(n.flags=t),n||new tt(t)}flushBuffer(){this.afterWidget&&!(32&this.afterWidget.flags)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class ts{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error("Ran out of text content when drawing inline views");this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}}let to=[te,e4,e7,e9,tt,e8,e5];for(let e=0;e<to.length;e++)to[e].bucket=e;class tl{constructor(e){this.view=e,this.buckets=to.map(()=>[]),this.index=to.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],s=this.index[r];for(let e=i.length-1;e>=0;e--){let o=(e+s)%i.length,l=i[o];if((!t||t(l))&&!this.reused.has(l))return i.splice(o,1),o<s&&this.index[r]--,this.reused.set(l,n),l}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,s=0;;i++){if(i==r.length){if(s)return null;s=1,i=0}let o=r[i];if(!this.reused.has(o)&&(0==s?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget))){if(r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(497&o.flags)==n)return this.reused.set(o,1),o;return this.reused.set(o,2),new te(o.dom,t,e,-498&o.flags|n)}}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class ta{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new tl(e),this.text=new ts(e.state.doc),this.builder=new ti(this.cache,new e5(e,e.contentDOM),l.om.iter(n)),this.cache.reused.set(t,2),this.old=new tn(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,s=0;;){let o=s<e.length?e[s++]:null,l=o?o.fromA:this.old.root.length;if(l>r){let e=l-r;this.preserve(e,!s,!o),r=l,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=function(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof e9&&t.push(r.mark)}return t}(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let s=n>0||t<e.length?te.of(e.widget,this.view,n-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&s.flags?(s.flags&=-2,this.builder.addBlockWidget(s)):(this.builder.ensureLine(null),this.builder.addInlineWidget(s,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),t||n!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)):this.builder.addText(e.text,r,i,this.cache.reuse(e)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof tt)this.cache.add(e);else{if(!(e instanceof e9))return!1;this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof e9&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&(r.length=i=0):e instanceof e9&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,s=l.om.spans(this.decorations,e,t,{point:(e,t,s,o,l,a)=>{var u,h,c;if(s instanceof N){if(this.disallowBlockEffectsFor[a]){if(s.block)throw RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=o.length,l>o.length)r.continueWidget(t-e);else{let i,a=s.widget||(s.block?tf.block:tf.inline),h=(i=(u=s).isReplace?64*(u.startSide<0)|128*(u.endSide>0):u.startSide>0?32:16,u.block&&(i|=256),i),c=this.cache.findWidget(a,t-e,h)||te.of(a,this.view,t-e,h);s.block?(s.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(c)):(r.ensureLine(n),r.addInlineWidget(c,o,l))}n=null}else{let e,t;h=n,e=(c=s).spec.attributes,t=c.spec.class,(e||t)&&(h||(h={class:"cm-line"}),e&&S(e,h),t&&(h.class+=" "+t)),n=h}t>e&&this.text.skip(t-e)},span:(e,t,i,s)=>{for(let o=e;o<t;){let l=this.text.next(Math.min(512,t-o));null==l?(r.addLineStartIfNotCovered(n),r.addBreak(),o++):(r.ensureLine(n),r.addText(l,i,o==e?s:i.length),o+=l.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=s>i,this.openMarks=s}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=e2.get(r);if(r==this.view.contentDOM)break;e instanceof e9?t.push(e):(null==e?void 0:e.isLine())?n=e:e instanceof e8||("DIV"!=r.nodeName||n||r==this.view.contentDOM?n||t.push(e9.of(new M({tagName:r.nodeName.toLowerCase(),attributes:function(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}(r)}),r)):n=new e4(r,th))}return{line:n,marks:t}}}function tu(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}let th={class:"cm-line"};function tc(e){let t=e2.get(e);return t&&t.setDOM(e.cloneNode()),e}class tf extends P{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}tf.inline=new tf("span"),tf.block=new tf("div");let td=new class extends P{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class tp{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=B.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new e5(e,e.contentDOM),this.updateInner([new eX(0,0,0,e.state.doc.length)],null)}update(e){var t,n,r,i,s,o,a,u,h;let c,f,d,p=e.changedRanges;this.minWidth>0&&p.length&&(p.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let m=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null==(t=this.domChanged)?void 0:t.newSel)?m=this.domChanged.newSel.head:(n=e.changes,r=this.hasComposition,c=!1,r&&n.iterChangedRanges((e,t)=>{e<r.to&&t>r.from&&(c=!0)}),c||e.selectionSet||(m=e.state.selection.main.head)));let g=m>-1?function(e,t,n){let r=tg(e,n);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(r.from,r.to)!=l)return null;let a=t.invertedDesc;return{range:new eX(a.mapPos(s),a.mapPos(o),s,o),text:i}}(this.view,e.changes,m):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:n}=this.hasComposition;p=new eX(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(p.slice())}this.hasComposition=g?{from:g.range.fromB,to:g.range.toB}:null,(E.ie||E.chrome)&&!g&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let y=this.decorations,b=this.blockWrappers;this.updateDeco();let v=(i=y,s=this.decorations,o=e.changes,f=new ty,l.om.compare(i,s,o,f),f.changes);v.length&&(p=eX.extendWithRanges(p,v));let w=(a=b,u=this.blockWrappers,h=e.changes,d=new tb,l.om.compare(a,u,h,d),d.changes);return w.length&&(p=eX.extendWithRanges(p,w)),g&&!p.some(e=>e.fromA<=g.range.fromA&&e.toA>=g.range.toA)&&(p=g.range.addToSet(p.slice())),(!(2&this.tile.flags)||0!=p.length)&&(this.updateInner(p,g),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new ta(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&e2.get(t.text)&&r.cache.reused.set(e2.get(t.text),2),this.tile=r.run(e,t),tm(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=E.chrome||E.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof tv&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){for(let t of(this.editContextFormatting=this.editContextFormatting.map(e.changes),e.transactions))for(let e of t.effects)e.is(eI)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){var n;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(eL)||r.tabIndex>-1)&&q(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let l=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,u,h;if(a.empty?h=u=this.inlineDOMNearPos(a.anchor,a.assoc||1):(h=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),u=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1)),E.gecko&&a.empty&&!this.hasComposition&&1==(n=u).node.nodeType&&n.node.firstChild&&(0==n.offset||"false"==n.node.childNodes[n.offset-1].contentEditable)&&(n.offset==n.node.childNodes.length||"false"==n.node.childNodes[n.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(e,u.node.childNodes[u.offset]||null)),u=h=new eo(e,0),l=!0}let c=this.view.observer.selectionRange;!l&&c.focusNode&&(V(u.node,u.offset,c.anchorNode,c.anchorOffset)&&V(h.node,h.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore(()=>{E.android&&E.chrome&&r.contains(c.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(c.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let e=j(this.view.root);if(e)if(a.empty){if(E.gecko){var t,n;let e=(t=u.node,n=u.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|2*(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable));if(e&&3!=e){let t=(1==e?ei:es)(u.node,u.offset);t&&(u=new eo(t.node,t.offset))}}e.collapse(u.node,u.offset),null!=a.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(u.node,u.offset);try{e.extend(h.node,h.offset)}catch(e){}}else{let t=document.createRange();a.anchor>a.head&&([u,h]=[h,u]),t.setEnd(h.node,h.offset),t.setStart(u.node,u.offset),e.removeAllRanges(),e.addRange(t)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(u,h)),this.impreciseAnchor=u.precise?null:new eo(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new eo(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&V(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=j(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let s=this.lineAt(t.head,t.assoc);if(!s)return;let o=s.posAtStart;if(t.head==o||t.head==o+s.length)return;let l=this.coordsAt(t.head,-1),a=this.coordsAt(t.head,1);if(!l||!a||l.bottom>a.top)return;let u=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=0==G(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!e2.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,s,o=-1,l=!1;return(this.tile.blockTiles((t,a)=>{if(t.isWidget()){if(32&t.flags&&a>=e)return!0;16&t.flags&&(i=!0)}else{let u=a+t.length;if(a<=e&&(n=t,r=e-a,i=u<e),u>=e&&!s&&(s=t,o=e-a,l=a>e),a>e&&s)return!0}}),n||s)?(i&&s?n=null:l&&n&&(s=null),n&&t<0||!s?n.domIn(r,t):s.domIn(o,t)):this.domAtPos(e,t)}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof tv?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);return t.isLine()?function e(t,n){if(t.isComposite())for(let r of t.children){if(r.length>=n){let t=e(r,n);if(t)return t}if((n-=r.length)<0)break}else if(t.isText()&&n<t.length){let e=(0,l.zK)(t.text,n);if(e==n)return null;let r=et(t.dom,n,e).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}(t,n):null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,s=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,l=this.view.textDirection==el.LTR,a=0,u=(e,h,c)=>{for(let f=0;f<e.children.length&&!(h>r);f++){let r=e.children[f],d=h+r.length,p=r.dom.getBoundingClientRect(),{height:m}=p;if(c&&!f&&(a+=p.top-c.top),r instanceof e8)d>n&&u(r,h,p);else if(h>=n&&(a>0&&t.push(-a),t.push(m+a),a=0,s)){let e=r.dom.lastChild,t=e?U(e):[];if(t.length){let e=t[t.length-1],n=l?e.right-p.left:p.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=h,this.minWidthTo=d)}}c&&f==e.children.length-1&&(a+=c.bottom-p.bottom),h=d+r.breakAfter}};return u(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?el.RTL:el.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=U(r.dom);if(1!=e.length)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=U(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],s=i?i.from-1:this.view.state.doc.length;if(s>n){let r=(t.lineBlockAt(s).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(B.replace({widget:new tv(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,s))}if(!i)break;n=i.to+1}return B.set(e)}updateDeco(){let e=1,t=this.view.state.facet(eV).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,r=this.view.state.facet(eW).map((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(l.om.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(eH).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){var t;if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(eT))try{if(t(this.view,e.range,e))return!0}catch(e){eN(this.view.state,e,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,null!=(t=n.assoc)?t:n.empty?0:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=eZ(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;if(!function(e,t,n,r,i,s,o,l){let a=e.ownerDocument,u=a.defaultView||window;for(let h=e,c=!1;h&&!c;)if(1==h.nodeType){let e,f=h==a.body,d=1,p=1;if(f)e=function(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(c=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let t=h.getBoundingClientRect();({scaleX:d,scaleY:p}=Y(h,t)),e={left:t.left,right:t.left+h.clientWidth*d,top:t.top,bottom:t.top+h.clientHeight*p}}let m=0,g=0;if("nearest"==i)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,s=e.bottom-e.top;g=("center"==i&&r<=s?t.top+r/2-s/2:"start"==i||"center"==i&&n<0?t.top-o:t.bottom-s+o)-e.top}if("nearest"==r?t.left<e.left+s?(m=t.left-(e.left+s),n>0&&t.right>e.right+m&&(m=t.right-e.right+s)):t.right>e.right-s&&(m=t.right-e.right+s,n<0&&t.left<e.left+m&&(m=t.left-(e.left+s))):m=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==l?t.left-s:t.right-(e.right-e.left)+s)-e.left,m||g)if(f)u.scrollBy(m,g);else{let e=0,n=0;if(g){let e=h.scrollTop;h.scrollTop+=g/p,n=(h.scrollTop-e)*p}if(m){let t=h.scrollLeft;h.scrollLeft+=m/d,e=(h.scrollLeft-t)*d}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&1>Math.abs(e-m)&&(r="nearest"),n&&1>Math.abs(n-g)&&(i="nearest")}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),h=h.assignedSlot||h.parentNode}else if(11==h.nodeType)h=h.host;else break}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==el.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(n.head,1);e&&e.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){tm(this.tile)}}function tm(e,t){let n=null==t?void 0:t.get(e);if(1!=n)for(let r of(null==n&&e.destroy(),e.children))tm(r,t)}function tg(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=ei(n.focusNode,n.focusOffset),i=es(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let t=e2.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)s=i;else if(e.docView.lastCompositionAfterCursor){let e=e2.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(s=i)}}if(e.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=t-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}let ty=class{constructor(){this.changes=[]}compareRange(e,t){$(e,t,this.changes)}comparePoint(e,t){$(e,t,this.changes)}boundChange(e){$(e,e,this.changes)}};class tb{constructor(){this.changes=[]}compareRange(e,t){$(e,t,this.changes)}comparePoint(){}boundChange(e){$(e,e,this.changes)}}class tv extends P{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function tw(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==T.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function tk(e,t,n,r){let i=e.state.doc.lineAt(t.head),s=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let a=t,u=null;;){let t=function(e,t,n,r,i){var s;let o=r.head-e.from,a=ey.find(t,o,null!=(s=r.bidiLevel)?s:-1,r.assoc),u=t[a],h=u.side(i,n);if(o==h){let e=a+=i?1:-1;if(e<0||e>=t.length)return null;o=(u=t[a=e]).side(!i,n),h=u.side(i,n)}let c=(0,l.zK)(e.text,o,u.forward(i,n));(c<u.from||c>u.to)&&(c=h),ew=e.text.slice(Math.min(o,c),Math.max(o,c));let f=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return f&&c==h&&f.level+ +!i<u.level?l.OF.cursor(f.side(!i,n)+e.from,f.forward(i,n)?1:-1,f.level):l.OF.cursor(c+e.from,u.forward(i,n)?-1:1,u.level)}(i,s,o,a,n),h=ew;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;h="\n",i=e.state.doc.line(i.number+(n?1:-1)),s=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(u){if(!u(h))return a}else{if(!r)return t;u=r(h)}a=t}}function tD(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,s)=>{if(t>e&&t<i){let s=r||n||(t-e<i-t?-1:1);t=s<0?e:i,r=s}});if(!r)return t}}function tx(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],s=null;if(i.empty){let t=tD(e,i.from,0);t!=i.from&&(s=l.OF.cursor(t,-1))}else{let t=tD(e,i.from,-1),n=tD(e,i.to,1);(t!=i.from||n!=i.to)&&(s=l.OF.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}s&&(n||(n=t.ranges.slice()),n[r]=s)}return n?l.OF.create(n,t.mainIndex):t}function tA(e,t,n){let r=tD(e.state.facet(eK).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:l.OF.cursor(r,r<n.from?1:-1)}class tC{constructor(e,t){this.pos=e,this.assoc=t}}function tE(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),s=i.top+e.viewState.paddingTop,{x:o,y:a}=t,u=a-s,h;for(;;){if(u<0)return new tC(0,1);if(u>e.viewState.docHeight)return new tC(e.state.doc.length,-1);if(h=e.elementAtHeight(u),null==r)break;if(h.type==T.Text){if(r<0?h.to<e.viewport.from:h.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(t&&(r<0?t.top<=u+s:t.bottom>=u+s))break}let t=e.viewState.heightOracle.textHeight/2;u=r>0?h.bottom+t:h.top-t}if(e.viewport.from>=h.to||e.viewport.to<=h.from){if(n)return null;if(h.type==T.Text){let t=function(e,t,n,r,i){let s=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;s+=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+(0,l.kn)(o,s,e.state.tabSize)}(e,i,h,o,a);return new tC(t,t==h.from?1:-1)}}if(h.type!=T.Text)return u<(h.top+h.bottom)/2?new tC(h.from,1):new tC(h.to,-1);let c=e.docView.lineAt(h.from,2);return c&&c.length==h.length||(c=e.docView.lineAt(h.from,-2)),new tS(e,o,a,e.textDirectionAt(h.from)).scanTile(c,h.from)}class tS{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[ey.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[ey.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n,r,i=0,s=e.length-1,o=new Set,l=this.bidiIn(e[0],e[s]),a=-1,u=1e9,h;for(;i<s;){let c=s-i,f=i+s>>1;r:if(o.has(f)){let e=i+Math.floor(Math.random()*c);for(let t=0;t<c;t++){if(!o.has(e)){f=e;break r}++e==s&&(e=i)}break}o.add(f);let d=t(f);if(d)for(let t=0;t<d.length;t++){let o=d[t],c=0;if(0!=o.width||!(d.length>1)){if(o.bottom<this.y)(!n||n.bottom<o.bottom)&&(n=o),c=1;else if(o.top>this.y)(!r||r.top>o.top)&&(r=o),c=-1;else{let e=o.left>this.x?this.x-o.left:o.right<this.x?this.x-o.right:0,t=Math.abs(e);t<u&&(a=f,u=t,h=o),e&&(c=e<0==(this.baseDir==el.LTR)?-1:1)}-1==c&&(!l||this.baseDirAt(e[f],1))?s=f:1==c&&(!l||this.baseDirAt(e[f+1],-1))&&(i=f+1)}}}if(!h){let i=n&&(!r||this.y-n.bottom<r.top-this.y)?n:r;return this.y=(i.top+i.bottom)/2,this.scan(e,t)}if(u){if(n&&n.bottom>h.top)return this.y=n.bottom-1,this.scan(e,t);if(r&&r.top<h.bottom)return this.y=r.top+1,this.scan(e,t)}let c=(l?this.dirAt(e[a],1):this.baseDir)==el.LTR;return{i:a,after:this.x>(h.left+h.right)/2==c}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=(0,l.zK)(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,s=n[r+1]-t;return et(e.dom,i,s).getClientRects()});return r.after?new tC(n[r.i+1],-1):new tC(n[r.i],1)}scanTile(e,t){if(!e.length)return new tC(t,1);if(1==e.children.length){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return 48&n.flags?null:(1==n.dom.nodeType?n.dom:et(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],s=n[r.i];return i.isText()?this.scanText(i,s):i.isComposite()?this.scanTile(i,s):r.after?new tC(n[r.i+1],-1):new tC(s,1)}}class t_{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(l.$t.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=e2.get(r),s=r.nextSibling;if(s==t){(null==i?void 0:i.breakAfter)&&!s&&n!=this.view.contentDOM&&this.lineBreak();break}let o=e2.get(s);(i&&o?i.breakAfter:(i?i.breakAfter:W(r))||W(s)&&("BR"!=r.nodeName||(null==i?void 0:i.isWidget()))&&this.text.length>e)&&!function(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=e2.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(n||(n=[])).push(t)}if(n)for(let e of n){let t=e.overrideDOMText;if(null==t?void 0:t.length)return!1}return!0}(s,t)&&this.lineBreak(),r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,s=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,s=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=i+s}}readNode(e){let t=e2.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(!function(e,t,n){for(;;){if(!t||n<G(t))return!1;if(t==e)return!0;n=H(t)+1,t=t.parentNode}}(e,n.node,n.offset)?0:t))}}class tO{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class tF{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:s}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=function e(t,n,r,i){if(t.isComposite()){let s=-1,o=-1,l=-1,a=-1;for(let u=0,h=i,c=i;u<t.children.length;u++){let i=t.children[u],f=h+i.length;if(h<n&&f>r)return e(i,n,r,h);if(f>=n&&-1==s&&(s=u,o=h),h>r&&i.dom.parentNode==t.dom){l=u,a=c;break}c=f,h=f+i.breakAfter}return{from:o,to:a<0?i+t.length:a,startDOM:(s?t.children[s-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:l<t.children.length&&l>=0?t.children[l].dom:null}}return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}(e.docView.tile,t,n,0))){let t=i||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=e.observer.selectionRange;return n&&(t.push(new tO(n,r)),(i!=n||s!=r)&&t.push(new tO(i,s))),t}(e),n=new t_(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?l.OF.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!z(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!z(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((E.ios||E.chrome)&&o.main.empty&&n!=r&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),s=a.from-t,o=a.to-i;(0==s||1==s||0==t)&&(0==o||-1==o||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(l.OF.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=l.OF.create([l.OF.cursor(n,r)])}else this.newSel=l.OF.single(r,n)}}}function tP(e,t){let n,{newSel:r}=t,{state:i}=e,s=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,a=s.from,u=null;(8===o||E.android&&t.text.length<r-e)&&(a=s.to,u="end");let h=i.doc.sliceString(e,r,""),c,f;!s.empty&&s.from>=e&&s.to<=r&&(t.typeOver||h!=t.text)&&h.slice(0,s.from-e)==t.text.slice(0,s.from-e)&&h.slice(s.to-e)==t.text.slice(c=t.text.length-(h.length-(s.to-e)))?n={from:s.from,to:s.to,insert:l.EY.of(t.text.slice(s.from-e,c).split(""))}:(f=tB(h,t.text,a-e,u))&&(E.chrome&&13==o&&f.toB==f.from+2&&""==t.text.slice(f.from,f.toB)&&f.toB--,n={from:e+f.from,to:e+f.toA,insert:l.EY.of(t.text.slice(f.from,f.toB).split(""))})}else r&&(!e.hasFocus&&i.facet(eL)||tM(r,s))&&(r=null);if(!n&&!r)return!1;if((E.mac||E.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=l.OF.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:l.EY.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&e.docView.lineHasWidget(s.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:s.from,to:s.to,insert:i.toText(e.inputState.insertingText)}:E.chrome&&n&&n.from==n.to&&n.from==s.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=l.OF.single(r.main.anchor-1,r.main.head-1)),n={from:s.from,to:s.to,insert:l.EY.of([" "])}),n)return tT(e,n,r,o);if(!r||tM(r,s))return!1;{let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),"select.pointer"==(n=e.inputState.lastSelectionOrigin)&&(r=tx(i.facet(eK).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}}function tT(e,t,n,r=-1){let i;if(E.ios&&e.inputState.flushIOSKey(t))return!0;let s=e.state.selection.main;if(E.android&&(t.to==s.to&&(t.from==s.from||t.from==s.from-1&&" "==e.state.sliceDoc(t.from,s.from))&&1==t.insert.length&&2==t.insert.lines&&en(e.contentDOM,"Enter",13)||(t.from==s.from-1&&t.to==s.to&&0==t.insert.length||8==r&&t.insert.length<t.to-t.from&&t.to>s.head)&&en(e.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&0==t.insert.length&&en(e.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>i||(i=function(e,t,n){let r,i=e.state,s=i.selection.main,o=-1;if(t.from==t.to&&t.from<s.from||t.from>s.to){let n=t.from<s.from?-1:1,r=n<0?s.from:s.to,l=tD(i.facet(eK).map(t=>t(e)),r,n);t.from==l&&(o=l)}if(o>-1)r={changes:t,selection:l.OF.cursor(t.from+t.insert.length,-1)};else if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=s.from<t.from?i.sliceDoc(s.from,t.from):"",o=s.to>t.to?i.sliceDoc(t.to,s.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),a=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=s.to+10&&t.to>=s.to-10){let u=e.state.sliceDoc(t.from,t.to),h,c=n&&tg(e,n.main.head);if(c){let e=t.insert.length-(t.to-t.from);h={from:c.from,to:c.to-e}}else h=e.state.doc.lineAt(s.head);let f=s.to-t.to;r=i.changeByRange(n=>{if(n.from==s.from&&n.to==s.to)return{changes:o,range:a||n.map(o)};let r=n.to-f,c=r-u.length;if(e.state.sliceDoc(c,r)!=u||r>=h.from&&c<=h.to)return{range:n};let d=i.changes({from:c,to:r,insert:t.insert}),p=n.to-s.to;return{changes:d,range:a?l.OF.range(Math.max(0,a.anchor+p),Math.max(0,a.head+p)):n.map(d)}})}else r={changes:o,selection:a&&i.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(eE).some(n=>n(e,t.from,t.to,o,a))||e.dispatch(a()),!0}function tB(e,t,n,r){let i=Math.min(e.length,t.length),s=0;for(;s<i&&e.charCodeAt(s)==t.charCodeAt(s);)s++;if(s==i&&e.length==t.length)return null;let o=e.length,l=t.length;for(;o>0&&l>0&&e.charCodeAt(o-1)==t.charCodeAt(l-1);)o--,l--;if("end"==r){let e=Math.max(0,s-Math.min(o,l));n-=o+e-s}if(o<s&&e.length<t.length){let e=n<=s&&n>=o?s-n:0;s-=e,l=s+(l-o),o=s}else if(l<s){let e=n<=s&&n>=l?s-n:0;s-=e,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function tM(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class tI{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,E.safari&&e.contentDOM.addEventListener("input",()=>null),E.gecko&&function(e){t6.has(e)||(t6.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}(e.contentDOM.ownerDocument)}handleEvent(e){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=e2.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}(this.view,e)||this.ignoreDuringComposition(e)||"keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(tN(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(tN(t.value,r))}}for(let e in tq)n(e).handlers.push(tq[e]);for(let e in tU)n(e).observers.push(tU[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,s=n[e];s&&!s.handlers.length!=i&&(r.removeEventListener(e,this.handleEvent),s=null),s||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){let t;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),!!(9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))||((this.tabFocusMode>0&&27!=e.keyCode&&0>tR.indexOf(e.keyCode)&&(this.tabFocusMode=-1),E.android&&E.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))?(this.view.observer.delayAndroidKey(e.key,e.keyCode),!0):E.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=tL.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||t$.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(229!=e.keyCode&&this.view.observer.forceFlush(),!1))}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||"Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,en(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&!e.synthetic&&(this.composing>0||!!(E.safari&&!E.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function tN(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){eN(n.state,e)}}}let tL=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],t$="dthko",tR=[16,17,18,20,91,92,224,225];function tj(e){return .7*Math.max(0,e)+8}class tz{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Z(e.contentDOM),this.atoms=e.state.facet(eK).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(l.$t.allowMultipleSelections)&&function(e,t){let n=e.state.facet(ek);return n.length?n[0](t):E.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=j(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)&&1==tQ(t)&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>(t=this.startEvent,Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=eZ(this.view);e.clientX-a.left<=i+6?n=-tj(i-e.clientX):e.clientX+a.right>=o-6&&(n=tj(e.clientX-o)),e.clientY-a.top<=s+6?r=-tj(s-e.clientY):e.clientY+a.bottom>=l-6&&(r=tj(e.clientY-l)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=tx(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,!1===this.dragging))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}let tq=Object.create(null),tU=Object.create(null),tV=E.ie&&E.ie_version<15||E.ios&&E.webkit_version<604;function tH(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function tW(e,t){t=tH(e.state,e_,t);let{state:n}=e,r,i=1,s=n.toText(t),o=s.lines==n.selection.ranges.length;if(null!=t0&&n.selection.ranges.every(e=>e.empty)&&t0==s.toString()){let e=-1;r=n.changeByRange(r=>{let a=n.doc.lineAt(r.from);if(a.from==e)return{range:r};e=a.from;let u=n.toText((o?s.line(i++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:u},range:l.OF.cursor(r.from+u.length)}})}else r=o?n.changeByRange(e=>{let t=s.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:l.OF.cursor(e.from+t.length)}}):n.replaceSelection(s);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function tK(e,t,n,r){if(1==r)return l.OF.cursor(t,n);{if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),s=t-i.from;if(0==i.length)return l.OF.cursor(t);0==s?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=(0,l.zK)(i.text,s,!1):a=(0,l.zK)(i.text,s);let u=r(i.text.slice(o,a));for(;o>0;){let e=(0,l.zK)(i.text,o,!1);if(r(i.text.slice(e,o))!=u)break;o=e}for(;a<i.length;){let e=(0,l.zK)(i.text,a);if(r(i.text.slice(a,e))!=u)break;a=e}return l.OF.range(o+i.from,a+i.from)}(e.state,t,n);let i=e.docView.lineAt(t,n),s=e.state.doc.lineAt(i?i.posAtEnd:t),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<e.state.doc.length&&a==s.to&&a++,l.OF.range(o,a)}}tU.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},tU.wheel=tU.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},tq.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),tU.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")},tU.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},tq.mousedown=(e,t)=>{var n,r;let i,s,o;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let a=null;for(let n of e.state.facet(ex))if(a=n(e,t))break;if(a||0!=t.button||(n=e,r=t,i=n.posAndSideAtCoords({x:r.clientX,y:r.clientY},!1),s=tQ(r),o=n.state.selection,a={update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),o=o.map(e.changes))},get(e,t,r){let a=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),u,h=tK(n,a.pos,a.assoc,s);if(i.pos!=a.pos&&!t){let e=tK(n,i.pos,i.assoc,s),t=Math.min(e.from,h.from),r=Math.max(e.to,h.to);h=t<h.from?l.OF.range(t,r,h.assoc):l.OF.range(r,t,h.assoc)}return t?o.replaceRange(o.main.extend(h.from,h.to,h.assoc)):r&&1==s&&o.ranges.length>1&&(u=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return l.OF.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n))}return null}(o,a.pos))?u:r?o.addRange(h):l.OF.create([h])}}),a){let n=!e.hasFocus;e.inputState.startMouseSelection(new tz(e,t,a,n)),n&&e.observer.ignore(()=>{ee(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let r=e.inputState.mouseSelection;if(r)return r.start(t),!1===r.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let tG=E.ie&&E.ie_version<=11,tJ=null,tY=0,tZ=0;function tQ(e){if(!tG)return e.detail;let t=tJ,n=tZ;return tJ=e,tZ=Date.now(),tY=!t||n>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(tY+1)%3:1}function tX(e,t,n,r){let i;if(!(n=tH(e.state,e_,n)))return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,l=r&&o&&((i=e.state.facet(eD)).length?i[0](t):E.mac?!t.altKey:!t.ctrlKey)?{from:o.from,to:o.to}:null,a={from:s,insert:n},u=e.state.changes(l?[l,a]:a);e.focus(),e.dispatch({changes:u,selection:{anchor:u.mapPos(s,-1),head:u.mapPos(s,1)},userEvent:l?"move.drop":"input.drop"}),e.inputState.draggedContent=null}tq.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=l.OF.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",tH(e.state,eO,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},tq.dragend=e=>(e.inputState.draggedContent=null,!1),tq.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&tX(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=s,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),s()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return tX(e,t,n,!0),!0}return!1},tq.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=tV?null:t.clipboardData;return n?(tW(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(!function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),tW(e,n.value)},50)}(e),!1)};let t0=null;tq.copy=tq.cut=(e,t)=>{if(!q(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let s=e.doc.lineAt(r);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:tH(e,eO,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;t0=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=tV?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(!function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};let t1=l.YH.define();function t2(e,t){let n=[];for(let r of e.facet(eS)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:t1.of(!0)}):null}function t3(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=t2(e.state,t);n?e.dispatch(n):e.update([])}},10)}tU.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),t3(e)},tU.blur=e=>{e.observer.clearSelectionRange(),t3(e)},tU.compositionstart=tU.compositionupdate=e=>{!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},tU.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,E.chrome&&E.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},tU.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},tq.beforeinput=(e,t)=>{var n,r;let i;if(("insertText"==t.inputType||"insertCompositionText"==t.inputType)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let r=null==(n=t.dataTransfer)?void 0:n.getData("text/plain"),i=t.getTargetRanges();if(r&&i.length){let t=i[0],n=e.posAtDOM(t.startContainer,t.startOffset),s=e.posAtDOM(t.endContainer,t.endOffset);return tT(e,{from:n,to:s,insert:e.state.toText(r)},null),!0}}if(E.chrome&&E.android&&(i=tL.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let t=(null==(r=window.visualViewport)?void 0:r.height)||0;setTimeout(()=>{var n;((null==(n=window.visualViewport)?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return E.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),E.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>tU.compositionend(e,t),20),!1};let t6=new Set,t5=["pre-wrap","normal","pre-line","break-spaces"],t8=!1;class t4{constructor(e){this.lineWrapping=e,this.doc=l.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return t5.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,s){let o=t5.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let e=0;e<s.length;e++){let t=s[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return l}}class t9{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class t7{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?T.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof N?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new t7(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var ne=((o=ne||(ne={}))[o.ByPos=0]="ByPos",o[o.ByHeight=1]="ByHeight",o[o.ByPosNoHeight=2]="ByPosNoHeight",o);class nt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=2*!!e|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>.001&&(t8=!0),this.height=e)}replace(e,t,n){return nt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,s=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:l,toA:a,fromB:u,toB:h}=r[o],c=i.lineAt(l,ne.ByPosNoHeight,n.setDoc(t),0,0),f=c.to>=a?c:i.lineAt(a,ne.ByPosNoHeight,n,0,0);for(h+=f.to-a,a=f.to;o>0&&c.from<=r[o-1].toA;)l=r[o-1].fromA,u=r[o-1].fromB,o--,l<c.from&&(c=i.lineAt(l,ne.ByPosNoHeight,n,0,0));u+=c.from-l,l=c.from;let d=nu.build(n.setDoc(s),e,u,h);i=nn(i,i.replace(l,a,d))}return i.updateHeight(n,0)}static empty(){return new ns(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else if(i>2*r){let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}else break;else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let s=0;return null==e[t-1]?(s=1,t--):null==e[t]&&(s=1,n++),new nl(nt.of(e.slice(0,t)),s,nt.of(e.slice(n)))}}function nn(e,t){return e==t?e:(e.constructor!=t.constructor&&(t8=!0),t)}nt.prototype.size=1;let nr=B.replace({});class ni extends nt{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new t7(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new t7(r,0,n,this.spaceAbove,nr):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let s=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(s):s}forEachLine(e,t,n,r,i,s){e<=i+this.length&&t>=i&&s(this.lineAt(0,ne.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ns extends ni{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new t7(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof ns||r instanceof no&&4&r.flags)&&10>Math.abs(this.length-r.length)?(r instanceof no?r=new ns(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):nt.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class no extends nt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,s,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);s=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else s=this.height/i;return{firstLine:n,lastLine:r,perLine:s,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:s,perLine:o,perChar:l}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),s=t.doc.lineAt(i),a=o+s.length*l,u=Math.max(n,e-a/2);return new t7(s.from,s.length,u,a,0)}{let r=Math.max(0,Math.min(s-i,Math.floor((e-n)/o))),{from:l,length:a}=t.doc.line(i+r);return new t7(l,a,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==ne.ByHeight)return this.blockAt(e,n,r,i);if(t==ne.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new t7(t,r-t,0,0,0)}let{firstLine:s,perLine:o,perChar:l}=this.heightMetrics(n,i),a=n.doc.lineAt(e),u=o+a.length*l,h=a.number-s,c=r+o*h+l*(a.from-i-h);return new t7(a.from,a.length,Math.max(r,Math.min(c,r+this.height-u)),u,0)}forEachLine(e,t,n,r,i,s){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(n,i);for(let u=e,h=r;u<=t;){let t=n.doc.lineAt(u);if(u==e){let n=t.number-o;h+=l*n+a*(e-i-n)}let r=l+a*t.length;s(new t7(t.from,t.length,h,r,0)),h+=r,u=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof no?n[n.length-1]=new no(e.length+r):n.push(null,new no(r-1))}if(e>0){let t=n[0];t instanceof no?n[0]=new no(e+t.length):n.unshift(new no(e-1),null)}return nt.of(n)}decomposeLeft(e,t){t.push(new no(e-1),null)}decomposeRight(e,t){t.push(null,new no(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],s=Math.max(t,r.from),o=-1;for(r.from>t&&n.push(new no(r.from-t-1).updateHeight(e,t));s<=i&&r.more;){let t=e.doc.lineAt(s).length;n.length&&n.push(null);let i=r.heights[r.index++],l=0;i<0&&(l=-i,i=r.heights[r.index++]),-1==o?o=i:Math.abs(i-o)>=.001&&(o=-2);let a=new ns(t,i,l);a.outdated=!1,n.push(a),s+=t+1}s<=i&&n.push(null,new no(i-s).updateHeight(e,s));let l=nt.of(n);return(o<0||Math.abs(l.height-this.height)>=.001||Math.abs(o-this.heightMetrics(e,t).perLine)>=.001)&&(t8=!0),nn(this,l)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class nl extends nt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let s=r+this.left.height,o=i+this.left.length+this.break,l=t==ne.ByHeight?e<s:e<o,a=l?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,s,o);if(this.break||(l?a.to<o:a.from>o))return a;let u=t==ne.ByPosNoHeight?ne.ByPosNoHeight:ne.ByPos;return l?a.join(this.right.lineAt(o,u,n,s,o)):this.left.lineAt(o,u,n,r,i).join(a)}forEachLine(e,t,n,r,i,s){let o=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,n,r,i,s),t>=l&&this.right.forEachLine(e,t,n,o,l,s);else{let a=this.lineAt(l,ne.ByPos,n,r,i);e<a.from&&this.left.forEachLine(e,a.from-1,n,r,i,s),a.to>=e&&a.from<=t&&s(a),t>a.to&&this.right.forEachLine(a.to+1,t,n,o,l,s)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let s=i.length;for(let e of n)i.push(e);if(e>0&&na(i,s-1),t<this.length){let e=i.length;this.decomposeRight(t,i),na(i,e)}return nt.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?nt.of(this.break?[e,null,t]:[e,t]):(this.left=nn(this.left,e),this.right=nn(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:s}=this,o=t+i.length+this.break,l=null;return(r&&r.from<=t+i.length&&r.more?l=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+s.length&&r.more?l=s=s.updateHeight(e,o,n,r):s.updateHeight(e,o,n),l)?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function na(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof no&&(r=e[t+1])instanceof no&&e.splice(t-1,3,new no(n.length+1+r.length))}class nu{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof ns?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ns(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let s=t-e;n.block?this.addBlock(new ni(s,r,n)):(s||i||r>=5)&&this.addLineDeco(r,i,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new ns(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new no(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ns)return e;let t=new ns(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof ns||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new ns(0,-1,0));let n=e;for(let e of this.nodes)e instanceof ns&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new nu(n,e);return l.om.spans(t,n,r,i,0),i.finish(n)}}class nh{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&$(e,t,this.changes,5)}}class nc{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return B.replace({widget:new nf(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class nf extends P{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class nd{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=ny,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=el.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(eU).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new t4(n),this.stateDeco=nb(t),this.heightMap=nt.empty().applyChanges(this.stateDeco,l.EY.empty,this.heightOracle.setDoc(t.doc),[new eX(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=B.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new np(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ny:new nv(this.heightOracle,this.heightMap,this.viewports),2*!e.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(nw(e,this.scaler))})}update(e,t=null){var n,r;let i;this.state=e.state;let s=this.stateDeco;this.stateDeco=nb(this.state);let o=e.changedRanges,a=eX.extendWithRanges(o,(n=this.stateDeco,r=e?e.changes:l.VR.empty(this.state.doc.length),i=new nh,l.om.compare(s,n,r,i,0),i.changes)),u=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);t8=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=u||t8)&&(e.flags|=2),h?(this.scrollAnchorPos=e.changes.mapPos(h.from,-1),this.scrollAnchorHeight=h.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=u);let c=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let f=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(f||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(eP)&&(this.mustEnforceCursorAssoc=!0)}measure(){var e;let t,n,{view:r}=this,i=r.contentDOM,s=window.getComputedStyle(i),o=this.heightOracle,a=s.whiteSpace;this.defaultTextDirection="rtl"==s.direction?el.RTL:el.LTR;let u=this.heightOracle.mustRefreshForWrapping(a)||"refresh"===this.mustMeasureContent,h=i.getBoundingClientRect(),c=u||this.mustMeasureContent||this.contentDOMHeight!=h.height;this.contentDOMHeight=h.height,this.mustMeasureContent=!1;let f=0,d=0;if(h.width&&h.height){let{scaleX:e,scaleY:t}=Y(i,h);(e>.005&&Math.abs(this.scaleX-e)>.005||t>.005&&Math.abs(this.scaleY-t)>.005)&&(this.scaleX=e,this.scaleY=t,f|=16,u=c=!0)}let p=(parseInt(s.paddingTop)||0)*this.scaleY,m=(parseInt(s.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,f|=18),this.editorWidth!=r.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=r.scrollDOM.clientWidth,f|=16);let g=Z(this.view.contentDOM,!1).y;g!=this.scrollParent&&(this.scrollParent=g,this.scrollAnchorHeight=-1,this.scrollOffset=0);let y=this.getScrollOffset();this.scrollOffset!=y&&(this.scrollAnchorHeight=-1,this.scrollOffset=y),this.scrolledToBottom=er(this.scrollParent||r.win);let b=(this.printing?function(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}:function(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),a=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();s=Math.max(s,r.left),o=Math.min(o,r.right),l=Math.max(l,r.top),a=Math.min(t==e.parentNode?i.innerHeight:a,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else if(11==t.nodeType)t=t.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+t),bottom:Math.max(l,a)-(n.top+t)}})(i,this.paddingTop),v=b.top-this.pixelViewport.top,w=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(c=!0)),!this.inView&&!this.scrollTarget&&(t=(e=r.dom).getBoundingClientRect(),n=e.ownerDocument.defaultView||window,!(t.left<n.innerWidth)||!(t.right>0)||!(t.top<n.innerHeight)||!(t.bottom>0)))return 0;let D=h.width;if((this.contentDOMWidth!=D||this.editorHeight!=r.scrollDOM.clientHeight)&&(this.contentDOMWidth=h.width,this.editorHeight=r.scrollDOM.clientHeight,f|=16),c){let e=r.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(e)&&(u=!0),u||o.lineWrapping&&Math.abs(D-this.contentDOMWidth)>o.charWidth){let{lineHeight:t,charWidth:n,textHeight:i}=r.docView.measureTextSize();(u=t>0&&o.refresh(a,t,n,i,Math.max(5,D/n),e))&&(r.docView.minWidth=0,f|=16)}for(let t of(v>0&&w>0?d=Math.max(v,w):v<0&&w<0&&(d=Math.min(v,w)),t8=!1,this.viewports)){let n=t.from==this.viewport.from?e:r.docView.measureVisibleLineHeights(t);this.heightMap=(u?nt.empty().applyChanges(this.stateDeco,l.EY.empty,this.heightOracle,[new eX(0,0,0,r.state.doc.length)]):this.heightMap).updateHeight(o,0,u,new t9(t.from,n))}t8&&(f|=2)}let x=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(2&f&&(f|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),f|=this.updateForViewport()),(2&f||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(u?[]:this.lineGaps,r)),f|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,r.docView.enforceCursorAssoc()),f}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,l=new np(r.lineAt(s-1e3*n,ne.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,ne.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<l.from||e>l.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,ne.ByPos,i,0,0),o;o="center"==t.y?(s.top+s.bottom)/2-n/2:"start"==t.y||"nearest"==t.y&&e<l.from?s.top:s.bottom-n,l=new np(r.lineAt(o-500,ne.ByHeight,i,0,0).from,r.lineAt(o+n+500,ne.ByHeight,i,0,0).to)}}return l}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new np(this.heightMap.lineAt(n,ne.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,ne.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,ne.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,ne.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:o}=this;return(0==e||r<=s-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>s-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new nc(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,s=r<<1;if(this.defaultTextDirection!=el.LTR&&!n)return[];let o=[],a=(r,s,u,h)=>{if(s-r<i)return;let c=this.state.selection.main,f=[c.from];for(let e of(c.empty||f.push(c.to),f))if(e>r&&e<s){a(r,e-10,u,h),a(e+10,s,u,h);return}let d=function(e,t){for(let n of e)if(t(n))return n}(e,e=>e.from>=u.from&&e.to<=u.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-s)<i&&!f.some(t=>e.from<t&&e.to>t));if(!d){if(s<u.to&&t&&n&&t.visibleRanges.some(e=>e.from<=s&&e.to>=s)){let e=t.moveToLineBoundary(l.OF.cursor(s),!1,!0).head;e>r&&(s=e)}let e=this.gapSize(u,r,s,h),i=n||e<2e6?e:2e6;d=new nc(r,s,e,i)}o.push(d)},u=t=>{var i,o,u;let h,c,f,d,p;if(t.length<s||t.type!=T.Text)return;let m=(i=t.from,o=t.to,u=this.stateDeco,f=[],d=i,p=0,l.om.spans(u,i,o,{span(){},point(e,t){e>d&&(f.push({from:d,to:e}),p+=e-d),d=t}},20),d<o&&(f.push({from:d,to:o}),p+=o-d),{total:p,ranges:f});if(m.total<s)return;let g=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,i=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=g){let r=ng(m,g),s=((this.visibleBottom-this.visibleTop)/2+i)/t.height;e=r-s,n=r+s}else e=(this.visibleTop-t.top-i)/t.height,n=(this.visibleBottom-t.top+i)/t.height;h=nm(m,e),c=nm(m,n)}else{let n,i,s=m.total*this.heightOracle.charWidth,o=r*this.heightOracle.charWidth,l=0;if(s>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+l<this.pixelViewport.left&&(l=n.size-n.displaySize);let a=this.pixelViewport.left+l,u=this.pixelViewport.right+l;if(null!=g){let e=ng(m,g),t=((u-a)/2+o)/s;n=e-t,i=e+t}else n=(a-o)/s,i=(u+o)/s;h=nm(m,n),c=nm(m,i)}h>t.from&&a(t.from,h,t,m),c<t.to&&a(c,t.to,t,m)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(u):u(e);return o}gapSize(e,t,n,r){let i=ng(r,n)-ng(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){nc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=B.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];l.om.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(8&r);t++){let i=this.visibleRanges[t],s=n[t];(i.from!=s.from||i.to!=s.to)&&(r|=4,e&&e.mapPos(i.from,-1)==s.from&&e.mapPos(i.to,1)==s.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||nw(this.heightMap.lineAt(e,ne.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||nw(this.heightMap.lineAt(this.scaler.fromDOM(e),ne.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return nw(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class np{constructor(e,t){this.from=e,this.to=t}}function nm({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],s=i-n;if(r<=s)return n+r;r-=s}}function ng(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}let ny={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function nb(e){let t=e.facet(eV).filter(e=>"function"!=typeof e),n=e.facet(eW).filter(e=>"function"!=typeof e);return n.length&&t.push(l.om.join(n)),t}class nv{constructor(e,t,n){let r=0,i=0,s=0;for(let o of(this.viewports=n.map(({from:n,to:i})=>{let s=t.lineAt(n,ne.ByPos,e,0,0).top,o=t.lineAt(i,ne.ByPos,e,0,0).bottom;return r+=o-s,{from:n,to:i,top:s,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r),this.viewports))o.domTop=s+(o.top-i)*this.scale,s=o.domBottom=o.domTop+(o.bottom-o.top),i=o.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(e){return e instanceof nv&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function nw(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new t7(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>nw(e,t)):e._content)}let nk=l.sj.define({combine:e=>e.join(" ")}),nD=l.sj.define({combine:e=>e.indexOf(!0)>-1}),nx=a.G.newName(),nA=a.G.newName(),nC=a.G.newName(),nE={"&light":"."+nA,"&dark":"."+nC};function nS(e,t,n){return new a.G(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t})}let n_=nS("."+nx,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},nE),nO={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},nF=E.ie&&E.ie_version<=11;class nP{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Q,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(E.ie&&E.ie_version<=11||E.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&E.android&&!1!==e.constructor.EDIT_CONTEXT&&!(E.chrome&&E.chrome_version<126)&&(this.editContext=new nM(e),e.state.facet(eL)&&(e.contentDOM.editContext=this.editContext.editContext)),nF&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null==(e=this.view.docView)?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){for(let t of(this.gapIntersection.disconnect(),e))this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(eL)?n.root.activeElement!=this.dom:!q(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(E.ie&&E.ie_version<=11||E.android&&E.chrome)&&!n.state.selection.main.empty&&r.focusNode&&V(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=j(e.root);if(!t)return!1;let n=E.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return nB(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?nB(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=q(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,G(n));;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:r=G(n=e)}else{if(n==e)return!0;r=H(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(11==n.nodeType)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,nO),nF&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),nF&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&en(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null==(n=this.delayedAndroidKey)?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&q(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new tF(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=tP(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!tM(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let n=nT(t,e.previousSibling||e.target.previousSibling,-1),r=nT(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(eL)!=e.state.facet(eL)&&(e.view.contentDOM.editContext=e.state.facet(eL)?this.editContext.editContext:null))}destroy(){var e,t,n;for(let r of(this.stop(),null==(e=this.intersection)||e.disconnect(),null==(t=this.gapIntersection)||t.disconnect(),null==(n=this.resizeScroll)||n.disconnect(),this.scrollTargets))r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function nT(e,t,n){for(;t;){let r=e2.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function nB(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,s=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return V(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}class nM{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});for(let n in this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:s}=r,o=this.toEditorPos(n.updateRangeStart),a=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let u=a-o>n.text.length;o==this.from&&i<this.from?o=i:a==this.to&&i>this.to&&(a=i);let h=tB(e.state.sliceDoc(o,a),n.text,(u?r.from:r.to)-o,u?"end":null);if(!h){let t=l.OF.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));tM(t,r)||e.dispatch({selection:t,userEvent:"select"});return}let c={from:h.from+o,to:h.toA+o,insert:l.EY.of(n.text.slice(h.from,h.toB).split("\n"))};if((E.mac||E.android)&&c.from==s-1&&/^\. ?$/.test(n.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(c={from:o,to:a,insert:l.EY.of([n.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let t=this.to-this.from+(c.to-c.from+c.insert.length);tT(e,c,l.OF.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from<c.to&&!c.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);t<s;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),s=this.toEditorPos(e.rangeEnd);if(i<s){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(r)?1:2}px`;n.push(B.mark({attributes:{style:e}}).range(i,s))}}}e.dispatch({effects:eI.of(B.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}},this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=j(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,s,o,l,a)=>{if(n)return;let u=a.length-(s-i);if(r&&s>=r.to)if(r.from==i&&r.to==s&&r.insert.eq(a)){r=this.pendingContextChange=null,t+=u,this.to+=u;return}else r=null,this.revertPending(e.state);if(i+=t,(s+=t)<=this.from)this.from+=u,this.to+=u;else if(i<this.to){if(i<this.from||s>this.to||this.to-this.from+a.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(s),a.toString()),this.to+=u}t+=u}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class nI{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;for(let t of(this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new nd(this,e.state||l.$t.create(e)),e.scrollTo&&e.scrollTo.is(eM)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(eR).map(e=>new ez(e)),this.plugins))t.update(this);this.observer=new nP(this),this.inputState=new tI(this),this.inputState.ensureHandlers(this.plugins),this.docView=new tp(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null==(t=document.fonts)?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof l.ZX?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed){this.viewState.state=i;return}let s=this.hasFocus,o=0,a=null;e.some(e=>e.annotation(t1))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,(a=t2(i,s))||(o=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),((h=this.observer.readChange())&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(h=null)):this.observer.clear(),i.facet(l.$t.phrases)!=this.state.facet(l.$t.phrases))return this.setState(i);r=e0.create(this,i,e),r.flags|=o;let c=this.viewState.scrollTarget;try{for(let t of(this.updateState=2,e)){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection,{x:n,y:r}=this.state.facet(nI.cursorScrollMargin);c=new eB(e.empty?e:l.OF.cursor(e.head,e.head>e.anchor?-1:1),"nearest","nearest",r,n)}for(let e of t.effects)e.is(eM)&&(c=e.value.clip(this.state))}this.viewState.update(r,c),this.bidiCache=n$.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(eQ)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(nk)!=r.state.facet(nk)&&(this.viewState.mustMeasureContent=!0),(t||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(eC))try{e(r)}catch(e){eN(this.state,e,"update listener")}(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!tP(this,h)&&u.force&&en(this.contentDOM,u.key,u.keyCode)})}setState(e){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);for(let t of(this.viewState=new nd(this,e),this.plugins=e.facet(eR).map(e=>new ez(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new tp(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(eR),n=e.state.facet(eR);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new ez(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){eN(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(s<0)if(er(n||this.win))i=-1,s=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,s=e.top}this.updateState=1;let o=this.viewState.measure();if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&o||([this.measureRequests,l]=[l,this.measureRequests]);let a=l.map(e=>{try{return e.read(this)}catch(e){return eN(this.state,e),nL}}),u=e0.create(this,this.state,[]),h=!1;u.flags|=o,t?t.flags|=o:t=u,this.updateState=2,!u.empty&&(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),(h=this.docView.update(u))&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(a[e]!=nL)try{let t=l[e];t.write&&t.write(a[e],this)}catch(e){eN(this.state,e)}if(h&&this.docView.updateSelection(!0),!u.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let e=((i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-s)/this.scaleY;if((e>1||e<-1)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?n.scrollTop+=e:this.win.scrollBy(0,e),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(eC))e(t)}get themeClasses(){return nx+" "+(this.state.facet(nD)?nC:nA)+" "+this.state.facet(nk)}updateAttrs(){let e=nR(this,eq,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(eL)?"true":"false",class:"cm-content",style:`${E.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),nR(this,eU,t);let n=this.observer.ignore(()=>{let n=F(this.contentDOM,this.contentAttrs,t),r=F(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)e.is(nI.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(eQ);let e=this.state.facet(nI.cspNonce);a.G.mount(this.root,this.styleModules.concat(n_).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if((this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e)&&!(this.measureRequests.indexOf(e)>-1)){if(null!=e.key){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return tA(this,e,tk(this,e,t,n))}moveByGroup(e,t){return tA(this,e,tk(this,e,t,t=>{var n;let r,i;return n=e.head,i=(r=this.state.charCategorizer(n))(t),e=>{let t=r(e);return i==l.Je.Space&&(i=t),i==t}}))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return l.OF.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=tw(e,t.head,t.assoc||-1),s=r&&i.type==T.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==el.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=o)return l.OF.cursor(o,n?-1:1)}return l.OF.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return tA(this,e,function(e,t,n,r){let i=t.head,s=n?1:-1;if(i==(n?e.state.doc.length:0))return l.OF.cursor(i,t.assoc);let o=t.goalColumn,a,u=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),c=e.documentTop;if(h)null==o&&(o=h.left-u.left),a=s<0?h.top:h.bottom;else{let t=e.viewState.lineBlockAt(i);null==o&&(o=Math.min(u.right-u.left,e.defaultCharacterWidth*(i-t.from))),a=(s<0?t.top:t.bottom)+c}let f=u.left+o,d=e.viewState.heightOracle.textHeight>>1,p=null!=r?r:d;for(let t=0;;t+=d){let r=a+(p+t)*s,i=tE(e,{x:f,y:r},!1,s);if(n?r>u.bottom:r<u.top)return l.OF.cursor(i.pos,i.assoc);let h=e.coordsAtPos(i.pos,i.assoc),c=h?(h.top+h.bottom)/2:0;if(!h||(n?c>a:c<a))return l.OF.cursor(i.pos,i.assoc,void 0,o)}}(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=tE(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),tE(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return J(n,i[ey.find(i,e-r.from,-1,t)].dir==el.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(eF)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>nN)return ev(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||function e(t,n){if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.direction!=s.direction||!e(i.inner,s.inner))return!1}return!0}(r.isolates,n=eJ(this,e))))return r.order;n||(n=eJ(this,e));let r=function(e,t,n){if(!e)return[new ey(0,0,+(t==eu))];if(t==ea&&!n.length&&!eg.test(e))return ev(e.length);if(n.length)for(;e.length>eb.length;)eb[eb.length]=256;let r=[],i=+(t!=ea);return function e(t,n,r,i,s,o,l){let a=n%2?2:1;!function(e,t,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:t,l=s<r.length?r[s].from:n,a=s?256:i;for(let t=o,n=a,r=a;t<l;t++){let i=em(e.charCodeAt(t));512==i?i=n:8==i&&4==r&&(i=16),eb[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=o,t=a,r=a;e<l;e++){let i=eb[e];if(128==i)e<l-1&&t==eb[e+1]&&24&t?i=eb[e]=t:eb[e]=256;else if(64==i){let i=e+1;for(;i<l&&64==eb[i];)i++;let s=e&&8==t||i<n&&8==eb[i]?1==r?1:8:256;for(let t=e;t<i;t++)eb[t]=s;e=i-1}else 8==i&&1==r&&(eb[e]=1);t=i,7&i&&(r=i)}}}(t,s,o,i,a),function(e,t,n,r,i){let s=1==i?2:1;for(let o=0,l=0,a=0;o<=r.length;o++){let u=o?r[o-1].to:t,h=o<r.length?r[o].from:n;for(let t=u,n,r,o;t<h;t++)if(r=ed[n=e.charCodeAt(t)])if(r<0){for(let e=l-3;e>=0;e-=3)if(ep[e+1]==-r){let n=ep[e+2],r=2&n?i:4&n?1&n?s:i:0;r&&(eb[t]=eb[ep[e]]=r),l=e;break}}else if(189==ep.length)break;else ep[l++]=t,ep[l++]=n,ep[l++]=a;else if(2==(o=eb[t])||1==o){let e=o==i;a=+!e;for(let t=l-3;t>=0;t-=3){let n=ep[t+2];if(2&n)break;if(e)ep[t+2]|=2;else{if(4&n)break;ep[t+2]|=4}}}}}(t,s,o,i,a),function(e,t,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:e,l=i<n.length?n[i].from:t;for(let a=o;a<l;){let o=eb[a];if(256==o){let o=a+1;for(;;)if(o==l){if(i==n.length)break;o=n[i++].to,l=i<n.length?n[i].from:t}else if(256==eb[o])o++;else break;let u=1==s,h=u==((o<t?eb[o]:r)==1)?u?1:2:r;for(let t=o,r=i,s=r?n[r-1].to:e;t>a;)t==s&&(t=n[--r].from,s=r?n[r-1].to:e),eb[--t]=h;a=o}else s=o,a++}}}(s,o,i,a),function t(n,r,i,s,o,l,a){let u=s%2?2:1;if(s%2==o%2)for(let h=r,c=0;h<i;){let r=!0,f=!1;if(c==l.length||h<l[c].from){let e=eb[h];e!=u&&(r=!1,f=16==e)}let d=r||1!=u?null:[],p=r?s:s+1,m=h;i:for(;;)if(c<l.length&&m==l[c].from){if(f)break;let t=l[c];if(!r)for(let e=t.to,n=c+1;;){if(e==i)break i;if(n<l.length&&l[n].from==e)e=l[n++].to;else if(eb[e]==u)break i;else break}c++,d?d.push(t):(t.from>h&&a.push(new ey(h,t.from,p)),e(n,t.direction==ea!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,a),h=t.to),m=t.to}else if(m==i||(r?eb[m]!=u:eb[m]==u))break;else m++;d?t(n,h,m,s+1,o,d,a):h<m&&a.push(new ey(h,m,p)),h=m}else for(let h=i,c=l.length;h>r;){let i=!0,f=!1;if(!c||h>l[c-1].to){let e=eb[h-1];e!=u&&(i=!1,f=16==e)}let d=i||1!=u?null:[],p=i?s:s+1,m=h;i:for(;;)if(c&&m==l[c-1].to){if(f)break;let t=l[--c];if(!i)for(let e=t.from,n=c;;){if(e==r)break i;if(n&&l[n-1].to==e)e=l[--n].from;else if(eb[e-1]==u)break i;else break}d?d.push(t):(t.to<h&&a.push(new ey(t.to,h,p)),e(n,t.direction==ea!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,a),h=t.from),m=t.from}else if(m==r||(i?eb[m-1]!=u:eb[m-1]==u))break;else m--;d?t(n,m,h,s+1,o,d,a):m<h&&a.push(new ey(m,h,p)),h=m}}(t,s,o,n,r,i,l)}(e,i,i,n,0,e.length,r),r}(e.text,t,n);return this.bidiCache.push(new n$(e.from,e.to,t,n,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||E.safari&&(null==(e=this.inputState)?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ee(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var n,r,i,s;return eM.of(new eB("number"==typeof e?l.OF.cursor(e):e,null!=(n=t.y)?n:"nearest",null!=(r=t.x)?r:"nearest",null!=(i=t.yMargin)?i:5,null!=(s=t.xMargin)?s:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return eM.of(new eB(l.OF.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ej.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ej.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=a.G.newName(),r=[nk.of(n),eQ.of(nS(`.${n}`,e))];return t&&t.dark&&r.push(nD.of(!0)),r}static baseTheme(e){return l.Nb.lowest(eQ.of(nS("."+nx,e,nE)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&e2.get(n)||e2.get(e);return(null==(t=null==r?void 0:r.root)?void 0:t.view)||null}}nI.styleModule=eQ,nI.inputHandler=eE,nI.clipboardInputFilter=e_,nI.clipboardOutputFilter=eO,nI.scrollHandler=eT,nI.focusChangeEffect=eS,nI.perLineTextDirection=eF,nI.exceptionSink=eA,nI.updateListener=eC,nI.editable=eL,nI.mouseSelectionStyle=ex,nI.dragMovesSelection=eD,nI.clickAddsSelectionRange=ek,nI.decorations=eV,nI.blockWrappers=eH,nI.outerDecorations=eW,nI.atomicRanges=eK,nI.bidiIsolatedRanges=eG,nI.cursorScrollMargin=l.sj.define({combine:e=>{let t=5,n=5;for(let r of e)"number"==typeof r?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),nI.scrollMargins=eY,nI.darkTheme=nD,nI.cspNonce=l.sj.define({combine:e=>e.length?e[0]:""}),nI.contentAttributes=eU,nI.editorAttributes=eq,nI.lineWrapping=nI.contentAttributes.of({class:"cm-lineWrapping"}),nI.announce=l.Pe.define();let nN=4096,nL={};class n${constructor(e,t,n,r,i,s){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=s}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:el.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let s=e[i];s.dir!=r||t.touchesRange(s.from,s.to)||n.push(new n$(t.mapPos(s.from,1),t.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return n}}function nR(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],s="function"==typeof t?t(e):t;s&&S(s,n)}return n}let nj=E.mac?"mac":E.windows?"win":E.linux?"linux":"key";function nz(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}let nq=l.Nb.default(nI.domEventHandlers({keydown:(e,t)=>{let n,r;return function(e,t,n,r){var i;nW=t;let s=("Esc"==(i=!(c&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||f&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?h:u)[t.keyCode]||t.key||"Unidentified")&&(i="Escape"),"Del"==i&&(i="Delete"),"Left"==i&&(i="ArrowLeft"),"Up"==i&&(i="ArrowUp"),"Right"==i&&(i="ArrowRight"),"Down"==i&&(i="ArrowDown"),i),o=(0,l.vS)(s,0),a=(0,l.Fh)(o)==s.length&&" "!=s,d="",p=!1,m=!1,g=!1;nH&&nH.view==n&&nH.scope==r&&(d=nH.prefix+" ",0>tR.indexOf(t.keyCode)&&(m=!0,nH=null));let y=new Set,b=e=>{if(e){for(let t of e.run)if(!y.has(t)&&(y.add(t),t(n)))return e.stopPropagation&&(g=!0),!0;e.preventDefault&&(e.stopPropagation&&(g=!0),m=!0)}return!1},v=e[r],w,k;return v&&(b(v[d+nz(s,t,!a)])?p=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(E.windows&&t.ctrlKey&&t.altKey)&&!(E.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(w=u[t.keyCode])&&w!=s?b(v[d+nz(w,t,!0)])?p=!0:t.shiftKey&&(k=h[t.keyCode])!=s&&k!=w&&b(v[d+nz(k,t,!1)])&&(p=!0):a&&t.shiftKey&&b(v[d+nz(s,t,!0)])&&(p=!0),!p&&b(v._any)&&(p=!0)),m&&(p=!0),p&&g&&t.stopPropagation(),nW=null,p}((n=t.state.facet(nU),(r=nV.get(n))||nV.set(n,r=function(e,t=nj){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},s=(e,r,s,o,l)=>{var a,u;let h=n[e]||(n[e]=Object.create(null)),c=r.split(/ (?!$)/).map(e=>(function(e,t){let n,r,i,s,o=e.split(/-(?!$)/),l=o[o.length-1];"Space"==l&&(l=" ");for(let e=0;e<o.length-1;++e){let l=o[e];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))"mac"==t?s=!0:r=!0;else throw Error("Unrecognized modifier name: "+l)}return n&&(l="Alt-"+l),r&&(l="Ctrl-"+l),s&&(l="Meta-"+l),i&&(l="Shift-"+l),l})(e,t));for(let t=1;t<c.length;t++){let n=c.slice(0,t).join(" ");i(n,!0),h[n]||(h[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=nH={view:t,prefix:n,scope:e};return setTimeout(()=>{nH==r&&(nH=null)},4e3),!0}]})}let f=c.join(" ");i(f,!1);let d=h[f]||(h[f]={preventDefault:!1,stopPropagation:!1,run:(null==(u=null==(a=h._any)?void 0:a.run)?void 0:u.slice())||[]});s&&d.run.push(s),o&&(d.preventDefault=!0),l&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,nW))}let i=r[t]||r.key;if(i)for(let t of e)s(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&s(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(n.reduce((e,t)=>e.concat(t),[]))),r),e,t,"editor")}})),nU=l.sj.define({enables:nq}),nV=new WeakMap,nH=null,nW=null;class nK{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(!n.empty)return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),s=e.textDirection==el.LTR,o=e.contentDOM,l=o.getBoundingClientRect(),a=nG(e),u=o.querySelector(".cm-line"),h=u&&window.getComputedStyle(u),c=l.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),f=l.right-(h?parseInt(h.paddingRight):0),d=tw(e,r,1),p=tw(e,i,-1),m=d.type==T.Text?d:null,g=p.type==T.Text?p:null;if(m&&(e.lineWrapping||d.widgetLineBreaks)&&(m=nJ(e,r,1,m)),g&&(e.lineWrapping||p.widgetLineBreaks)&&(g=nJ(e,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return b(v(n.from,n.to,m));{let t=m?v(n.from,null,m):w(d,!1),r=g?v(null,n.to,g):w(p,!0),i=[];return(m||d).to<(g||p).from-(m&&g?1:0)||d.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(y(c,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==T.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),b(t).concat(i).concat(b(r))}function y(e,n,r,i){return new nK(t,e-a.left,n-a.top,Math.max(0,r-e),i-n)}function b({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(y(n[i],e,n[i+1],t));return r}function v(t,n,r){let i=1e9,o=-1e9,l=[];function a(t,n,a,u,h){let d=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(a,a==r.from?2:-2);d&&p&&(i=Math.min(d.top,p.top,i),o=Math.max(d.bottom,p.bottom,o),h==el.LTR?l.push(s&&n?c:d.left,s&&u?f:p.right):l.push(!s&&u?c:p.left,!s&&n?f:d.right))}let u=null!=t?t:r.from,h=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>u&&r.from<h)for(let i=Math.max(r.from,u),s=Math.min(r.to,h);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,l=o.to+r.from;if(e>=s)break;l>i&&a(Math.max(e,i),null==t&&e<=u,Math.min(l,s),null==n&&l>=h,o.dir)}if((i=r.to+1)>=s)break}return 0==l.length&&a(u,null==t,h,null==n,e.textDirection),{top:i,bottom:o,horizontal:l}}function w(e,t){let n=l.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n);{let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=nG(e);return[new nK(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}}}function nG(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==el.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function nJ(e,t,n,r){let i=e.coordsAtPos(t,2*n);if(!i)return r;let s=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,l=e.posAtCoords({x:s.left+1,y:o}),a=e.posAtCoords({x:s.right-1,y:o});return null==l||null==a?r:{from:Math.max(r.from,Math.min(l,a)),to:Math.min(r.to,Math.max(l,a))}}class nY{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(nZ)!=e.state.facet(nZ)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(nZ);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{var n;return n=this.drawn[t],!(e.constructor==n.constructor&&e.eq(n))})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,E.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let nZ=l.sj.define();function nQ(e){return[ej.define(t=>new nY(t,e)),nZ.of(e)]}let nX=l.sj.define({combine:e=>(0,l.QR)(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function n0(e={}){return[nX.of(e),n2,n6,n5,eP.of(!0)]}function n1(e){return e.startState.facet(nX)!=e.state.facet(nX)}let n2=nQ({above:!0,markers(e){let{state:t}=e,n=t.facet(nX),r=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(s&&E.ios&&n.iosSelectionHandles)){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:l.OF.cursor(i.head,i.assoc);for(let i of nK.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=n1(e);return n&&n3(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){n3(t.state,e)},class:"cm-cursorLayer"});function n3(e,t){t.style.animationDuration=e.facet(nX).cursorBlinkRate+"ms"}let n6=nQ({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let n of r)if(!n.empty)for(let r of nK.forRange(e,"cm-selectionBackground",n))t.push(r);if(E.ios&&!n.empty&&e.state.facet(nX).iosSelectionHandles){for(let r of nK.forRange(e,"cm-selectionHandle cm-selectionHandle-start",l.OF.cursor(n.from,1)))t.push(r);for(let r of nK.forRange(e,"cm-selectionHandle cm-selectionHandle-end",l.OF.cursor(n.to,1)))t.push(r)}return t},update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||n1(e),class:"cm-selectionLayer"}),n5=l.Nb.highest(nI.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));/x/.unicode;let n8="-10000px";class n4{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],l=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(l=e)}if(l<0)s[n]=this.createTooltipView(r,n?s[n-1]:null),o&&(o[n]=!!r.above);else{let r=s[n]=this.tooltipViews[l];o&&(o[n]=t[l]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)0>s.indexOf(e)&&(this.removeTooltipView(e),null==(n=e.destroy)||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=s,!0}}function n9(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}let n7=l.sj.define({combine:e=>{var t,n,r;return{position:E.ios?"absolute":(null==(t=e.find(e=>e.position))?void 0:t.position)||"fixed",parent:(null==(n=e.find(e=>e.parent))?void 0:n.parent)||null,tooltipSpace:(null==(r=e.find(e=>e.tooltipSpace))?void 0:r.tooltipSpace)||n9}}}),re=new WeakMap,rt=ej.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(n7);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new n4(e,rs,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let e of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(e.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(n7);if(r.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=r.position,this.manager.tooltipViews))e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=n8,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;for(let t of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))t.dom.remove(),null==(e=t.destroy)||e.call(t);this.parent&&this.container.remove(),null==(t=this.resizeObserver)||t.disconnect(),null==(n=this.intersectionObserver)||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(E.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=eZ(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(n7).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute)for(let e of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))e.dom.style.position="absolute";let{visible:n,space:r,scaleX:i,scaleY:s}=e,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],u=this.manager.tooltipViews[l],{dom:h}=u,c=e.pos[l],f=e.size[l];if(!c||!1!==a.clip&&(c.bottom<=Math.max(n.top,r.top)||c.top>=Math.min(n.bottom,r.bottom)||c.right<Math.max(n.left,r.left)-.1||c.left>Math.min(n.right,r.right)+.1)){h.style.top=n8;continue}let d=a.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=7*!!d,m=f.right-f.left,g=null!=(t=re.get(u))?t:f.bottom-f.top,y=u.offset||ri,b=this.view.textDirection==el.LTR,v=f.width>r.right-r.left?b?r.left:r.right-f.width:b?Math.max(r.left,Math.min(c.left-14*!!d+y.x,r.right-m)):Math.min(Math.max(r.left,c.left-m+14*!!d-y.x),r.right-m),w=this.above[l];!a.strictSide&&(w?c.top-g-p-y.y<r.top:c.bottom+g+p+y.y>r.bottom)&&w==r.bottom-c.bottom>c.top-r.top&&(w=this.above[l]=!w);let k=(w?c.top-r.top:r.bottom-c.bottom)-p;if(k<g&&!1!==u.resize){if(k<this.view.defaultLineHeight){h.style.top=n8;continue}re.set(u,g),h.style.height=(g=k)/s+"px"}else h.style.height&&(h.style.height="");let D=w?c.top-g-p-y.y:c.bottom+p+y.y,x=v+m;if(!0!==u.overlap)for(let e of o)e.left<x&&e.right>v&&e.top<D+g&&e.bottom>D&&(D=w?e.top-g-2-p:e.bottom+p+2);if("absolute"==this.position?(h.style.top=(D-e.parent.top)/s+"px",rn(h,(v-e.parent.left)/i)):(h.style.top=D/s+"px",rn(h,v/i)),d){let e=c.left+(b?y.x:-y.x)-(v+14-7);d.style.left=e/i+"px"}!0!==u.overlap&&o.push({left:v,top:D,right:x,bottom:D+g}),h.classList.toggle("cm-tooltip-above",w),h.classList.toggle("cm-tooltip-below",!w),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView)&&(this.inView=this.view.inView,!this.inView))for(let e of this.manager.tooltipViews)e.dom.style.top=n8}},{eventObservers:{scroll(){this.maybeMeasure()}}});function rn(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}let rr=nI.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ri={x:0,y:0},rs=l.sj.define({enables:[rt,rr]}),ro=l.sj.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class rl{static create(e){return new rl(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new n4(e,ro,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null==(e=t.destroy)||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r){if(void 0===t)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}let ra=rs.compute([ro],e=>{let t=e.facet(ro);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!=(t=e.end)?t:e.pos})),create:rl.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class ru{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.tile.nearest(t.target);if(!n)return;let r,i=1;if(n.isWidget())r=n.posAtStart;else{if(null==(r=e.posAtCoords(t)))return;let n=e.coordsAtPos(r);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let s=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),o=s&&s.dir==el.RTL?-1:1;i=t.x<n.left?-o:o}let s=this.source(e,r,i);if(null==s?void 0:s.then){let t=this.pending={pos:r};s.then(n=>{this.pending==t&&(this.pending=null,n&&!(Array.isArray(n)&&!n.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))},t=>eN(e.state,t,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(rt),t=e?e.manager.tooltips.findIndex(e=>e.create==rl.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(e,t){let{left:n,right:r,top:i,bottom:s}=e.getBoundingClientRect(),o;if(o=e.querySelector(".cm-tooltip-arrow")){let e=o.getBoundingClientRect();i=Math.min(e.top,i),s=Math.max(e.bottom,s)}return t.clientX>=n-4&&t.clientX<=r+4&&t.clientY>=i-4&&t.clientY<=s+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,s=null!=(n=null==(t=r[0])?void 0:t.end)?n:i;(i==s?this.view.posAtCoords(this.lastMove)!=i:!function(e,t,n,r,i){let s=e.scrollDOM.getBoundingClientRect(),o=e.documentTop+e.documentPadding.top+e.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,o)<i)return!1;let l=e.posAtCoords({x:r,y:i},!1);return l>=t&&l<=n}(this.view,i,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function rh(e,t={}){let n=l.Pe.define(),r=l.sU.define({create:()=>[],update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(r,e))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,l.iR.TrackDel);if(null!=e){let i=Object.assign(Object.create(null),n);i.pos=e,null!=i.end&&(i.end=r.changes.mapPos(i.end)),t.push(i)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(rf)&&(e=[]);return e},provide:e=>ro.from(e)});return{active:r,extension:[r,ej.define(i=>new ru(i,e,r,n,t.hoverTime||300)),ra]}}function rc(e,t){let n=e.plugin(rt);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}let rf=l.Pe.define(),rd=l.sj.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function rp(e,t){let n=e.plugin(rm),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}let rm=ej.fromClass(class{constructor(e){this.input=e.state.facet(rb),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(rd);for(let n of(this.top=new rg(e,!0,t.topContainer),this.bottom=new rg(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top)),this.panels))n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(e){let t=e.state.facet(rd);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new rg(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new rg(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(rb);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],s=[],o=[];for(let n of t){let t=this.specs.indexOf(n),l;t<0?(l=n(e.view),o.push(l)):(l=this.panels[t]).update&&l.update(e),r.push(l),(l.top?i:s).push(l)}for(let e of(this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(s),o))e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>nI.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class rg{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&0>e.indexOf(t)&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ry(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ry(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function ry(e){let t=e.nextSibling;return e.remove(),t}let rb=l.sj.define({enables:rm});class rv extends l.FB{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}rv.prototype.elementClass="",rv.prototype.toDOM=void 0,rv.prototype.mapMode=l.iR.TrackBefore,rv.prototype.startSide=rv.prototype.endSide=-1,rv.prototype.point=!0;let rw=l.sj.define(),rk=l.sj.define(),rD={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>l.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},rx=l.sj.define();function rA(e){return[rE(),rx.of({...rD,...e})]}let rC=l.sj.define({combine:e=>e.some(e=>e)});function rE(e){let t=[rS];return e&&!1===e.fixed&&t.push(rC.of(!0)),t}let rS=ej.fromClass(class{constructor(e){for(let t of(this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(rx).map(t=>new rP(e,t)),this.fixed=!e.state.facet(rC),this.gutters))"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(rC)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=l.om.iter(this.view.state.facet(rw),this.view.viewport.from),r=[],i=this.gutters.map(e=>new rF(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let s of e.type)if(s.type==T.Text&&t){for(let e of(rO(n,r,s.from),i))e.line(this.view,s,r);t=!1}else if(s.widget)for(let e of i)e.widget(this.view,s)}else if(e.type==T.Text)for(let t of(rO(n,r,e.from),i))t.line(this.view,e,r);else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(rx),n=e.state.facet(rx),r=e.docChanged||e.heightChanged||e.viewportChanged||!l.om.eq(e.startState.facet(rw),e.state.facet(rw),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new rP(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),0>i.indexOf(e)&&e.destroy();for(let e of i)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>nI.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==el.LTR?{left:r,right:i}:{right:r,left:i}})});function r_(e){return Array.isArray(e)?e:[e]}function rO(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class rF{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=l.om.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==r.elements.length){let t=new rT(e,s,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,s,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];rO(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let s=this.gutter;(0!=r.length||s.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(rk)){let i=n(e,t.widget,t);i&&(r||(r=[])).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class rP{constructor(e,t){for(let n in this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,s;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=r.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=r_(t.markers(e)),t.initialSpacer&&(this.spacer=new rT(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=r_(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!l.om.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class rT{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),!function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)&&this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,s=0;;){let o=s,l=i<t.length?t[i++]:null,a=!1;if(l){let e=l.elementClass;e&&(n+=" "+e);for(let e=s;e<this.markers.length;e++)if(this.markers[e].compare(l)){o=e,a=!0;break}}else o=this.markers.length;for(;s<o;){let e=this.markers[s++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!l)break;l.toDOM&&(a?r=r.nextSibling:this.dom.insertBefore(l.toDOM(e),r)),a&&s++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}let rB=l.sj.define(),rM=l.sj.define(),rI=l.sj.define({combine:e=>(0,l.QR)(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class rN extends rv{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function rL(e,t){return e.state.facet(rI).formatNumber(t,e.state)}let r$=rx.compute([rI],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(rB),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new rN(rL(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(rM)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(rI)!=e.state.facet(rI),initialSpacer:e=>new rN(rL(e,rj(e.state.doc.lines))),updateSpacer(e,t){let n=rL(t.view,rj(t.view.state.doc.lines));return n==e.number?e:new rN(n)},domEventHandlers:e.facet(rI).domEventHandlers,side:"before"}));function rR(e={}){return[rI.of(e),rE(),r$]}function rj(e){let t=9;for(;t<e;)t=10*t+9;return t}let rz=new class extends rv{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},rq=rw.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(rz.range(i)))}return l.om.of(t)});function rU(){return rq}},79066(e,t,n){"use strict";var r,i;n.d(t,{PH:()=>p,Qj:()=>r,Z6:()=>h,fI:()=>c,iX:()=>B,rr:()=>T,uY:()=>l});let s=0;class o{constructor(e,t){this.from=e,this.to=t}}class l{constructor(e={}){this.id=s++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=h.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}l.closedBy=new l({deserialize:e=>e.split(" ")}),l.openedBy=new l({deserialize:e=>e.split(" ")}),l.group=new l({deserialize:e=>e.split(" ")}),l.isolate=new l({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),l.contextHash=new l({perNode:!0}),l.lookAhead=new l({perNode:!0}),l.mounted=new l({perNode:!0});class a{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[l.mounted.id]}}let u=Object.create(null);class h{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):u,n=!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),r=new h(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(l.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(l.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}h.none=new h("",Object.create(null),0,8);class c{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);if(e){r||(r=Object.assign({},n.props));let t=e[1],i=e[0];i.combine&&i.id in r&&(t=i.combine(r[i.id],t)),r[i.id]=t}}t.push(r?new h(n.name,r,n.id,n.flags):n)}return new c(t)}}let f=new WeakMap,d=new WeakMap;(i=r||(r={}))[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays",i[i.EnterBracketed=16]="EnterBracketed";class p{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length)for(let[e,t]of(this.props=Object.create(null),i))this.props["number"==typeof e?e:e.id]=t}toString(){let e=a.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new S(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new S(f.get(this)||this.topNode);return r.moveTo(e,t),f.set(this,r._tree),r}get topNode(){return new w(this,0,0,null)}resolve(e,t=0){let n=b(f.get(this)||this.topNode,e,t,!1);return f.set(this,n),n}resolveInner(e,t=0){let n=b(d.get(this)||this.topNode,e,t,!0);return d.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof w?r:r.context.parent;e;e=e.parent)if(e.index<0){let s=e.parent;(i||(i=[r])).push(s.resolve(t,n)),e=s}else{let s=a.get(e.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let o=new w(s.tree,s.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(b(o,t,n,!1))}}return i?C(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&r.IncludeAnonymous)>0;for(let e=this.cursor(o|r.IncludeAnonymous);;){let r=!1;if(e.from<=s&&e.to>=i&&(!l&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;r=!0}for(;r&&n&&(l||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:P(h.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new p(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new p(h.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=1024,reused:s=[],minRepeatType:o=r.types.length}=e,a=Array.isArray(n)?new m(n,n.length):n,u=r.types,h=0,c=0;function f(e,t,n,i,s,o,l,a,u){let h=[],c=[];for(;e.length>i;)h.push(e.pop()),c.push(t.pop()+n-s);e.push(d(r.types[l],h,c,o-s,a-o,u)),t.push(s-n)}function d(e,t,n,r,i,s,o){if(s){let e=[l.contextHash,s];o=o?[e].concat(o):[e]}if(i>25){let e=[l.lookAhead,i];o=o?[e].concat(o):[e]}return new p(e,t,n,r,o)}let y=[],b=[];for(;a.pos>0;)!function e(t,n,m,y,b,v){let{id:w,start:k,end:D,size:x}=a,A=c,C=h;if(x<0){if(a.next(),-1==x){let e=s[w];m.push(e),y.push(k-t);return}if(-3==x){h=w;return}if(-4==x){c=w;return}else throw RangeError(`Unrecognized record size: ${x}`)}let E=u[w],S,_,O=k-t;if(D-k<=i&&(_=function(e,t){let n=a.fork(),r=0,s=0,l=0,u=n.end-i,h={size:0,start:0,skip:0};s:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){h.size=r,h.start=s,h.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a<i||n.start<u)break;let c=4*(n.id>=o),f=n.start;for(n.next();n.pos>a;){if(n.size<0)if(-3==n.size||-4==n.size)c+=4;else break s;else n.id>=o&&(c+=4);n.next()}s=f,r+=e,l+=c}return(t<0||r==e)&&(h.size=r,h.start=s,h.skip=l),h.size>4?h:void 0}(a.pos-n,b))){let e=new Uint16Array(_.size-_.skip),n=a.pos-_.size,i=e.length;for(;a.pos>n;)i=function e(t,n,r){let{id:i,start:s,end:l,size:u}=a;if(a.next(),u>=0&&i<o){let o=r;if(u>4){let i=a.pos-(u-4);for(;a.pos>i;)r=e(t,n,r)}n[--r]=o,n[--r]=l-t,n[--r]=s-t,n[--r]=i}else -3==u?h=i:-4==u&&(c=i);return r}(_.start,e,i);S=new g(e,D-_.start,r),O=_.start-t}else{let t=a.pos-x;a.next();let n=[],s=[],u=w>=o?w:-1,h=0,c=D;for(;a.pos>t;)u>=0&&a.id==u&&a.size>=0?(a.end<=c-i&&(f(n,s,k,h,a.end,c,u,A,C),h=n.length,c=a.end),a.next()):v>2500?function(e,t,n,s){let o=[],l=0,u=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:r}=a;if(r>4)a.next();else if(u>-1&&t<u)break;else u<0&&(u=n-i),o.push(e,t,n),l++,a.next()}if(l){let t=new Uint16Array(4*l),i=o[o.length-2];for(let e=o.length-3,n=0;e>=0;e-=3)t[n++]=o[e],t[n++]=o[e+1]-i,t[n++]=o[e+2]-i,t[n++]=n;n.push(new g(t,o[2]-i,r)),s.push(i-e)}}(k,t,n,s):e(k,t,n,s,u,v+1);if(u>=0&&h>0&&h<n.length&&f(n,s,k,h,k,c,u,A,C),n.reverse(),s.reverse(),u>-1&&h>0){let e=function(e,t){return(n,r,i)=>{let s=0,o=n.length-1,a,u;if(o>=0&&(a=n[o])instanceof p){if(!o&&a.type==e&&a.length==i)return a;(u=a.prop(l.lookAhead))&&(s=r[o]+a.length+u)}return d(e,n,r,i,s,t)}}(E,C);S=P(E,n,s,0,n.length,0,D-k,e,e)}else S=d(E,n,s,D-k,A-D,C)}m.push(S),y.push(O)}(e.start||0,e.bufferStart||0,y,b,-1,0);let v=null!=(t=e.length)?t:y.length?b[0]+y[0].length:0;return new p(u[e.topID],y.reverse(),b.reverse(),v)}(e)}}p.empty=new p(h.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class g{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return h.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let s=[];for(;e<n;)s.push(this.childString(e)),e=this.buffer[e+3];return i+"("+s.join(",")+")"}findChild(e,t,n,r,i){let{buffer:s}=this,o=-1;for(let l=e;l!=t&&(!y(i,r,s[l+1],s[l+2])||(o=l,!(n>0)));l=s[l+3]);return o}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),s=0;for(let o=e,l=0;o<t;){i[l++]=r[o++],i[l++]=r[o++]-n;let t=i[l++]=r[o++]-n;i[l++]=r[o++]-e,s=Math.max(s,t)}return new g(i,s,this.set)}}function y(e,t,n,r){switch(e){case -2:return n<t;case -1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function b(e,t,n,i){for(var s;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!i&&e instanceof w&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=i?0:r.IgnoreOverlays;if(i)for(let r=e,i=r.parent;i;i=(r=i).parent)r instanceof w&&r.index<0&&(null==(s=i.enter(t,n,o))?void 0:s.from)!=r.from&&(e=i);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class v{cursor(e=0){return new S(this,e)}getChild(e,t=null,n=null){let r=k(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return k(this,e,t,n)}resolve(e,t=0){return b(this,e,t,!1)}resolveInner(e,t=0){return b(this,e,t,!0)}matchContext(e){return D(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class w extends v{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,s=0){for(let o=this;;){for(let{children:l,positions:u}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let h=l[e],c=u[e]+o.from,f;if(s&r.EnterBracketed&&h instanceof p&&(f=a.get(h))&&!f.overlay&&f.bracketed&&n>=c&&n<=c+h.length||y(i,n,c,c+h.length)){if(h instanceof g){if(s&r.ExcludeBuffers)continue;let l=h.findChild(0,h.buffer.length,t,n-c,i);if(l>-1)return new A(new x(o,h,e,c),null,l)}else if(s&r.IncludeAnonymous||!h.type.isAnonymous||_(h)){let l;if(!(s&r.IgnoreMounts)&&(l=a.get(h))&&!l.overlay)return new w(l.tree,c,e,o);let u=new w(h,c,e,o);return s&r.IncludeAnonymous||!u.type.isAnonymous?u:u.nextChild(t<0?h.children.length-1:0,t,n,i,s)}}}if(s&r.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,!(o=o._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let i;if(!(n&r.IgnoreOverlays)&&(i=a.get(this._tree))&&i.overlay){let s=e-this.from,o=n&r.EnterBracketed&&i.bracketed;for(let{from:e,to:n}of i.overlay)if((t>0||o?e<=s:e<s)&&(t<0||o?n>=s:n>s))return new w(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function k(e,t,n,r){let i=e.cursor(),s=[];if(!i.firstChild())return s;if(null!=n){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return s}for(;;){if(null!=r&&i.type.is(r))return s;if(i.type.is(t)&&s.push(i.node),!i.nextSibling())return null==r?s:[]}}function D(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class x{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class A extends v{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new A(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&r.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new A(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new A(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new A(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let s=n.buffer[this.index+1];e.push(n.slice(r,i,s)),t.push(0)}return new p(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function C(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof w&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new E(i,n)}class E{constructor(e,t){this.heads=e,this.node=t}get next(){return C(this.heads)}}class S{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~r.EnterBracketed,e instanceof w)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof w?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&r.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&r.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&r.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,s=e<0?-1:n._tree.children.length;i!=s;i+=e){let e=n._tree.children[i];if(this.mode&r.IncludeAnonymous||e instanceof g||!e.type.isAnonymous||_(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)s:for(let r=this.index,i=this.stack.length;i>=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;t=s,n=i+1;break s}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new A(this.buffer,t,this.stack[e]);return this.bufferNode=new A(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return D(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return D(this._tree,e,r);let s=n[t.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function _(e){return e.children.some(e=>e instanceof g||!e.type.isAnonymous||_(e))}let O=new WeakMap;function F(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;let n=O.get(t);if(null==n){for(let r of(n=1,t.children)){if(r.type!=e||!(r instanceof p)){n=1;break}n+=F(e,r)}O.set(t,n)}return n}function P(e,t,n,r,i,s,o,l,a){let u=0;for(let n=r;n<i;n++)u+=F(e,t[n]);let h=Math.ceil(1.5*u/8),c=[],f=[];return!function t(n,r,i,o,l){for(let u=i;u<o;){let i=u,d=r[u],p=F(e,n[u]);for(u++;u<o;u++){let t=F(e,n[u]);if(p+t>=h)break;p+=t}if(u==i+1){if(p>h){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+l);continue}c.push(n[i])}else{let t=r[u-1]+n[u-1].length-d;c.push(P(e,n,r,i,u,d,t,null,a))}f.push(d+l-s)}}(t,n,r,i,0),(l||a)(c,f,o)}class T{constructor(e,t,n,r,i=!1,s=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|2*!!s}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new T(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,s=e.length?e[0]:null;for(let o=0,l=0,a=0;;o++){let u=o<t.length?t[o]:null,h=u?u.fromA:1e9;if(h-l>=n)for(;s&&s.from<h;){let t=s;if(l>=t.from||h<=t.to||a){let e=Math.max(t.from,l)-a,n=Math.min(t.to,h)-a;t=e>=n?null:new T(e,n,t.tree,t.offset+a,o>0,!!u)}if(t&&r.push(t),s.to>h)break;s=i<e.length?e[i++]:null}if(!u)break;l=u.toA,a=u.toA-u.toB}return r}}class B{startParse(e,t,n){return"string"==typeof e&&(e=new M(e)),n=n?n.length?n.map(e=>new o(e.from,e.to)):[new o(0,0)]:[new o(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class M{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new l({perNode:!0})},49913(e,t,n){"use strict";n.d(t,{DM:()=>f,_A:()=>O,az:()=>c,pn:()=>a});var r=n(79066);let i=0;class s{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=i++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof s&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new s("string"==typeof e?e:"?",[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new l(e);return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let o=0;class l{constructor(e){this.name=e,this.instances=[],this.id=o++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var r,i;return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]))});if(n)return n;let r=[],i=new s(e.name,r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(l.get(t,e));return i}}function a(e){let t=Object.create(null);for(let n in e){let r=e[n];for(let e of(Array.isArray(r)||(r=[r]),n.split(" ")))if(e){let n=[],i=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!r)throw RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),(t+=r[0].length)==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){i=0;break}if("/"!=o)throw RangeError("Invalid path: "+e);s=e.slice(t)}let o=n.length-1,l=n[o];if(!l)throw RangeError("Invalid path: "+e);let a=new h(r,i,o>0?n.slice(0,o):null);t[l]=a.sort(t[l])}}return u.add(t)}let u=new r.uY({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new h(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class h{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function c(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function f(e,t,n,r=0,i=e.length){let s=new d(r,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),r,i,"",s.highlighters),s.flush(i)}h.empty=new h([],2,null);class d{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,s){let{type:o,from:l,to:a}=e;if(l>=n||a<=t)return;o.isTop&&(s=this.highlighters.filter(e=>!e.scope||e.scope(o)));let c=i,f=function(e){let t=e.type.prop(u);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||h.empty,d=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(s,f.tags);if(d&&(c&&(c+=" "),c+=d,1==f.mode&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(t,l),c),f.opaque)return;let p=e.tree&&e.tree.prop(r.uY.mounted);if(p&&p.overlay){let r=e.node.enter(p.overlay[0].from+l,1),o=this.highlighters.filter(e=>!e.scope||e.scope(p.tree.type)),u=e.firstChild();for(let h=0,f=l;;h++){let d=h<p.overlay.length?p.overlay[h]:null,m=d?d.from+l:a,g=Math.max(t,f),y=Math.min(n,m);if(g<y&&u)for(;e.from<y&&(this.highlightRange(e,g,y,i,s),this.startSpan(Math.min(y,e.to),c),!(e.to>=m)&&e.nextSibling()););if(!d||m>n)break;(f=d.to+l)>t&&(this.highlightRange(r.cursor(),Math.max(t,d.from+l),Math.min(n,f),"",o),this.startSpan(Math.min(n,f),c))}u&&e.parent()}else if(e.firstChild()){p&&(i="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,i,s),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}}let p=s.define,m=p(),g=p(),y=p(g),b=p(g),v=p(),w=p(v),k=p(v),D=p(),x=p(D),A=p(),C=p(),E=p(),S=p(E),_=p(),O={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:g,variableName:p(g),typeName:y,tagName:p(y),propertyName:b,attributeName:p(b),className:p(g),labelName:p(g),namespace:p(g),macroName:p(g),literal:v,string:w,docString:p(w),character:p(w),attributeValue:p(w),number:k,integer:p(k),float:p(k),bool:p(v),regexp:p(v),escape:p(v),color:p(v),url:p(v),keyword:A,self:p(A),null:p(A),atom:p(A),unit:p(A),modifier:p(A),operatorKeyword:p(A),controlKeyword:p(A),definitionKeyword:p(A),moduleKeyword:p(A),operator:C,derefOperator:p(C),arithmeticOperator:p(C),logicOperator:p(C),bitwiseOperator:p(C),compareOperator:p(C),updateOperator:p(C),definitionOperator:p(C),typeOperator:p(C),controlOperator:p(C),punctuation:E,separator:p(E),bracket:S,angleBracket:p(S),squareBracket:p(S),paren:p(S),brace:p(S),content:D,heading:x,heading1:p(x),heading2:p(x),heading3:p(x),heading4:p(x),heading5:p(x),heading6:p(x),contentSeparator:p(D),list:p(D),quote:p(D),emphasis:p(D),strong:p(D),link:p(D),monospace:p(D),strikethrough:p(D),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:_,documentMeta:p(_),annotation:p(_),processingInstruction:p(_),definition:s.defineModifier("definition"),constant:s.defineModifier("constant"),function:s.defineModifier("function"),standard:s.defineModifier("standard"),local:s.defineModifier("local"),special:s.defineModifier("special")};for(let e in O){let t=O[e];t instanceof s&&(t.name=e)}c([{tag:O.link,class:"tok-link"},{tag:O.heading,class:"tok-heading"},{tag:O.emphasis,class:"tok-emphasis"},{tag:O.strong,class:"tok-strong"},{tag:O.keyword,class:"tok-keyword"},{tag:O.atom,class:"tok-atom"},{tag:O.bool,class:"tok-bool"},{tag:O.url,class:"tok-url"},{tag:O.labelName,class:"tok-labelName"},{tag:O.inserted,class:"tok-inserted"},{tag:O.deleted,class:"tok-deleted"},{tag:O.literal,class:"tok-literal"},{tag:O.string,class:"tok-string"},{tag:O.number,class:"tok-number"},{tag:[O.regexp,O.escape,O.special(O.string)],class:"tok-string2"},{tag:O.variableName,class:"tok-variableName"},{tag:O.local(O.variableName),class:"tok-variableName tok-local"},{tag:O.definition(O.variableName),class:"tok-variableName tok-definition"},{tag:O.special(O.variableName),class:"tok-variableName2"},{tag:O.definition(O.propertyName),class:"tok-propertyName tok-definition"},{tag:O.typeName,class:"tok-typeName"},{tag:O.namespace,class:"tok-namespace"},{tag:O.className,class:"tok-className"},{tag:O.macroName,class:"tok-macroName"},{tag:O.propertyName,class:"tok-propertyName"},{tag:O.operator,class:"tok-operator"},{tag:O.comment,class:"tok-comment"},{tag:O.meta,class:"tok-meta"},{tag:O.invalid,class:"tok-invalid"},{tag:O.punctuation,class:"tok-punctuation"}])},60146(e,t,n){"use strict";let r,i,s,o,l;n.d(t,{Og:()=>cI,vK:()=>ep});var a,u,h,c,f,d,p,m,g,y,b,v,w,k,D,x,A,C,E={};n.r(E),n.d(E,{decode:()=>n1,encode:()=>n6,format:()=>n5,parse:()=>ro});var S={};n.r(S),n.d(S,{Any:()=>ru,Cc:()=>rh,Cf:()=>rc,P:()=>rl,S:()=>ra,Z:()=>rf});var _={};n.r(_),n.d(_,{arrayReplaceAt:()=>r_,assign:()=>rS,escapeHtml:()=>rj,escapeRE:()=>rq,fromCodePoint:()=>rF,has:()=>rE,isMdAsciiPunct:()=>rW,isPunctChar:()=>rH,isSpace:()=>rU,isString:()=>rA,isValidEntityCode:()=>rO,isWhiteSpace:()=>rV,lib:()=>rG,normalizeReference:()=>rK,unescapeAll:()=>rI,unescapeMd:()=>rM});var O={};n.r(O),n.d(O,{parseLinkDestination:()=>rY,parseLinkLabel:()=>rJ,parseLinkTitle:()=>rZ});var F={};n.r(F),n.d(F,{boolean:()=>ow,booleanish:()=>ok,commaOrSpaceSeparated:()=>oE,commaSeparated:()=>oC,number:()=>ox,overloadedBoolean:()=>oD,spaceSeparated:()=>oA});var P={};n.r(P),n.d(P,{BOM:()=>hS,DOCUMENT:()=>h_,FLOW_END:()=>hO,SCALAR:()=>hF,createScalarToken:()=>hg,isCollection:()=>hP,isScalar:()=>hT,prettyToken:()=>hB,resolveAsScalar:()=>hm,setScalarValue:()=>hy,stringify:()=>hw,tokenType:()=>hM,visit:()=>hE});var T={};n.r(T),n.d(T,{Alias:()=>aL,CST:()=>P,Composer:()=>hp,Document:()=>uX,Lexer:()=>hz,LineCounter:()=>hq,Pair:()=>ut,Parser:()=>hJ,Scalar:()=>aR,Schema:()=>uQ,YAMLError:()=>u1,YAMLMap:()=>us,YAMLParseError:()=>u2,YAMLSeq:()=>ul,YAMLWarning:()=>u3,isAlias:()=>au,isCollection:()=>am,isDocument:()=>ah,isMap:()=>ac,isNode:()=>ag,isPair:()=>af,isScalar:()=>ad,isSeq:()=>ap,parse:()=>hX,parseAllDocuments:()=>hZ,parseDocument:()=>hQ,stringify:()=>h0,visit:()=>ak,visitAsync:()=>ax});var B=n(77213),M=n(29587),I=n(55880);I.setLevel("silent");let N="String",L="Object",$="Array",R="Property",j="PropertyName",z="JsonText",q={Pair:R,Key:j,BlockSequence:$,BlockMapping:L,FlowSequence:$,FlowMapping:L,QuotedLiteral:N,Literal:N,Stream:z,Document:L},U={File:z},V=[N,"Number","True","False","Null"],H=[L,$,"Item"],W="json5",K="json4",G="yaml",J=(e,t)=>{var n,r;switch(t){case G:return null!=(n=q[e])?n:e;case W:return null!=(r=U[e])?r:e;default:return e}};function Y(e,t,n){let r=[];for(let i=t;null==i?void 0:i.parent;i=i.parent)switch(J(i.parent.name,n)){case R:{let t=el(i.parent,j,n);if(t){let n=et(e,t).replace(/[/~]/g,e=>"~"===e?"~0":"~1");r.unshift(n)}break}case $:if(ei(i,n)){let e=eu(i.parent,i,n);r.unshift(`${e}`)}}return 0===r.length?"":"/"+r.join("/")}let Z=(e,t,n=-1,r)=>Y(e.doc,(0,M.mv)(e).resolve(t,n),r),Q=(e,t)=>{let n=(0,M.mv)(e),r=new Map;return n.iterate({enter:n=>{var i,s,o,l,a,u,h,c;if([j,L].includes(J(n.name,t))){let f=Y(e.doc,n.node,t),{from:d,to:p}=n.node;if(!(null==(s=null==(i=n.node)?void 0:i.nextSibling)?void 0:s.node))return r.set(f,{keyFrom:d,keyTo:p}),!0;let m=t===K?null==(l=null==(o=n.node)?void 0:o.nextSibling)?void 0:l.node:null==(c=null==(h=null==(u=null==(a=n.node)?void 0:a.nextSibling)?void 0:u.node)?void 0:h.nextSibling)?void 0:c.node;if(!m)return r.set(f,{keyFrom:d,keyTo:p}),!0;let{from:g,to:y}=m;return r.set(f,{keyFrom:d,keyTo:p,valueFrom:g,valueTo:y}),!0}}}),r},X=(e,t,n=-1)=>(0,M.mv)(e).resolveInner(t,n),ee=e=>e.replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1"),et=(e,t,n=!0,r=!0)=>{let i=t?e.sliceString(t.from,t.to):"";return n?r?ee(i):i.replace(/(^["'])|(["']$)/g,""):i},en=(e,t)=>{var n,r,i,s;return"⚠"===J(e.name,t)&&(J(null!=(r=null==(n=e.prevSibling)?void 0:n.name)?r:"",t)===j||"PropertyColon"===J(null!=(s=null==(i=e.prevSibling)?void 0:i.name)?s:"",t))},er=(e,t)=>V.includes(J(e.name,t))||en(e,t),ei=(e,t)=>[...V,...H].includes(J(e.name,t))||en(e,t),es=(e,t)=>{var n,r,i,s,o,l;return J(e.name,t)===j||"⚠"===J(e.name,t)&&(J(null!=(r=null==(n=e.prevSibling)?void 0:n.name)?r:"",t)===R||"{"===J(null!=(s=null==(i=e.prevSibling)?void 0:i.name)?s:"",t))||t===G&&J(null!=(l=null==(o=e.parent)?void 0:o.name)?l:"",t)===L},eo=e=>{let t=[],n=e.firstChild;for(;n;)n&&t.push(n),n=null==n?void 0:n.nextSibling;return t},el=(e,t,n)=>{var r;return null!=(r=eo(e).find(e=>J(e.name,n)===t))?r:null},ea=(e,t)=>eo(e).find(e=>er(e,t)),eu=(e,t,n)=>eo(e).filter(e=>V.includes(J(e.name,n))||H.includes(J(e.name,n))).findIndex(e=>e.from===t.from&&e.to===t.to),eh=(e,t,n,r=1/0)=>{let i=e;for(;i&&r>0;){if(J(i.name,n)===t)return i;i=i.parent,r--}return null};var ec=n(24509);let ef=ec.Pe.define(),ed=ec.sU.define({create(){},update(e,t){for(let e of t.effects)if(e.is(ef))return e.value;return e}}),ep=(e,t)=>{e.dispatch({effects:ef.of(t)})},em={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},eg=Object.prototype.toString;function ey(e){let t=eg.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return"file"===t?"object":t}function eb(e,t){return{type:"error",name:e,code:e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),message:function(e,t,n=e){var r;return function(e,t={}){return e.replace(/\{\{\w+\}\}/g,e=>{let n=t[e.replace(/[{}]/g,"")],r=ey(n);return"object"===r||"array"===r?JSON.stringify(n):n})}(null!=(r=em[e])?r:n,t)}(e,t),data:t}}function ev(e){return eb.bind(null,e)}function ew(e,t=[]){for(let n=0;n<e.length;n+=1){let r=e[n];Array.isArray(r)?ew(r,t):t.push(r)}return t}let ek={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:["_id"],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function eD(e,t,n){let r={...t};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:e})}),r}function ex(e){return(null==e?void 0:e.type)==="error"}function eA(e){return ex(e)||e instanceof Promise}let{DECLARATOR_ONEOF:eC}=ek;function eE(e,t,n=e.rootSchema,r="#"){if(null!=t&&n[eC]){let i=[],s=n[eC],o=t[n[eC]];if(void 0===o)return e.errors.missingOneOfPropertyError({property:s,pointer:r,schema:n,value:t});for(let l=0;l<n.oneOf.length;l+=1){let a=e.resolveRef(n.oneOf[l]),u=e.step(s,a,t,r);if(ex(u))return u;let h=ew(e.validate(o,u,r));if(!((h=h.filter(eA)).length>0))return eD(n,a,l);i.push(...h)}return e.errors.oneOfPropertyError({property:s,value:o,pointer:r,schema:n,errors:i})}let i=[],s=[];for(let o=0;o<n.oneOf.length;o+=1){let l=e.resolveRef(n.oneOf[o]),a=ew(e.validate(t,l,r));(a=a.filter(eA)).length>0?s.push(...a):i.push({index:o,schema:l})}return 1===i.length?eD(n,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:r,schema:n,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf,errors:s})}function eS(e,t,n=e.rootSchema,r="#"){if(null!=t&&n[eC]){let i=[],s=n[eC],o=t[n[eC]];if(void 0===o)return e.errors.missingOneOfPropertyError({property:s,pointer:r,schema:n,value:t});for(let l=0;l<n.oneOf.length;l+=1){let a=e.resolveRef(n.oneOf[l]),u=e.step(s,a,t,r);if(ex(u))return u;let h=ew(e.validate(o,u,r));if(!((h=h.filter(eA)).length>0))return eD(n,a,l);i.push(...h)}return e.errors.oneOfPropertyError({property:s,value:o,pointer:r,schema:n,errors:i})}let i=[];for(let s=0;s<n.oneOf.length;s+=1){let o=e.resolveRef(n.oneOf[s]);e.isValid(t,o,r)&&i.push({schema:o,index:s})}if(1===i.length)return eD(n,i[0].schema,i[0].index);if("object"===ey(t)){let i,s=-1,o=0;for(let r=0;r<n.oneOf.length;r+=1){let l=e.resolveRef(n.oneOf[r]),a=function(e,t,n){if(null==n||null==t.properties)return -1;let r=0,i=Object.keys(t.properties);for(let s=0;s<i.length;s+=1){let o=i[s];null!=n[o]&&e.isValid(n[o],t.properties[o],void 0)&&(r+=1)}return r}(e,l,t);o<a&&(o=a,i=n.oneOf[r],s=r)}return void 0===i?e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf}):eD(n,i,s)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}var e_=n(52743),eO=n.n(e_);let eF=(e,t)=>t,eP=(e,t)=>eO()(e,t,{arrayMerge:eF}),eT=(e,t)=>{let n=e.concat(t);return n.filter((e,t)=>n.indexOf(e)===t)};function eB(e,t){if(ey(e)!==ey(t))return e;let n=eO()(e,t,{arrayMerge:eT});return e.getOneOfOrigin?Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}function eM(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),e.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),n}var eI=Function.prototype.toString,eN=Object.create,eL=Object.prototype.toString,e$=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}(),eR="u">typeof WeakMap?function(){return new WeakMap}:function(){return new e$};function ej(e){if(!e)return eN(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:eN(e);if(t&&~eI.call(t).indexOf("[native code]"))try{return new t}catch(e){}return eN(e)}var ez="g"===/test/g.flags?function(e){return e.flags}:function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function eq(e){var t=eL.call(e);return t.substring(8,t.length-1)}var eU="u">typeof Symbol?function(e){return e[Symbol.toStringTag]||eq(e)}:eq,eV=Object.defineProperty,eH=Object.getOwnPropertyDescriptor,eW=Object.getOwnPropertyNames,eK=Object.getOwnPropertySymbols,eG=Object.prototype,eJ=eG.hasOwnProperty,eY=eG.propertyIsEnumerable,eZ="function"==typeof eK,eQ=eZ?function(e){return eW(e).concat(eK(e))}:eW;function eX(e,t,n){for(var r=eQ(e),i=0,s=r.length,o=void 0,l=void 0;i<s;++i)if("callee"!==(o=r[i])&&"caller"!==o){if(!(l=eH(e,o))){t[o]=n.copier(e[o],n);continue}l.get||l.set||(l.value=n.copier(l.value,n));try{eV(t,o,l)}catch(e){t[o]=l.value}}return t}function e0(e,t){return e.slice(0)}function e1(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e,r){n.set(r,t.copier(e,t))}),n}function e2(e,t){return new t.Constructor(e.valueOf())}function e3(e,t){return e}function e6(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e){n.add(t.copier(e,t))}),n}var e5=Array.isArray,e8=Object.assign,e4=Object.getPrototypeOf||function(e){return e.__proto__},e9={array:function(e,t){var n=new t.Constructor;t.cache.set(e,n);for(var r=0,i=e.length;r<i;++r)n[r]=t.copier(e[r],t);return n},arrayBuffer:e0,blob:function(e,t){return e.slice(0,e.size,e.type)},dataView:function(e,t){return new t.Constructor(e0(e.buffer))},date:function(e,t){return new t.Constructor(e.getTime())},error:e3,map:e1,object:eZ?function(e,t){var n=ej(t.prototype);for(var r in t.cache.set(e,n),e)eJ.call(e,r)&&(n[r]=t.copier(e[r],t));for(var i=eK(e),s=0,o=i.length,l=void 0;s<o;++s)l=i[s],eY.call(e,l)&&(n[l]=t.copier(e[l],t));return n}:function(e,t){var n=ej(t.prototype);for(var r in t.cache.set(e,n),e)eJ.call(e,r)&&(n[r]=t.copier(e[r],t));return n},regExp:function(e,t){var n=new t.Constructor(e.source,ez(e));return n.lastIndex=e.lastIndex,n},set:e6},e7=e8({},e9,{array:function(e,t){var n=new t.Constructor;return t.cache.set(e,n),eX(e,n,t)},map:function(e,t){return eX(e,e1(e,t),t)},object:function(e,t){var n=ej(t.prototype);return t.cache.set(e,n),eX(e,n,t)},set:function(e,t){return eX(e,e6(e,t),t)}});function te(e){var t,n={Arguments:(t=e8({},e9,e)).object,Array:t.array,ArrayBuffer:t.arrayBuffer,Blob:t.blob,Boolean:e2,DataView:t.dataView,Date:t.date,Error:t.error,Float32Array:t.arrayBuffer,Float64Array:t.arrayBuffer,Int8Array:t.arrayBuffer,Int16Array:t.arrayBuffer,Int32Array:t.arrayBuffer,Map:t.map,Number:e2,Object:t.object,Promise:e3,RegExp:t.regExp,Set:t.set,String:e2,WeakMap:e3,WeakSet:e3,Uint8Array:t.arrayBuffer,Uint8ClampedArray:t.arrayBuffer,Uint16Array:t.arrayBuffer,Uint32Array:t.arrayBuffer,Uint64Array:t.arrayBuffer},r=n.Array,i=n.Object;function s(e,t){if(t.prototype=t.Constructor=void 0,!e||"object"!=typeof e)return e;if(t.cache.has(e))return t.cache.get(e);if(t.prototype=e4(e),t.Constructor=t.prototype&&t.prototype.constructor,!t.Constructor||t.Constructor===Object)return i(e,t);if(e5(e))return r(e,t);var s=n[eU(e)];return s?s(e,t):"function"==typeof e.then?e:i(e,t)}return function(e){return s(e,{Constructor:void 0,cache:eR(),copier:s,prototype:void 0})}}te(e8({},e7,{}));var tt=te({});function tn(e,t,n){if(null!=t.if){if(!1===t.if)return t.else;if(t.if&&(t.then||t.else)){let r=e.validate(n,e.resolveRef(t.if));if(0===r.length&&t.then)return e.resolveRef(t.then);if(0!==r.length&&t.else)return e.resolveRef(t.else)}}}function tr(e,t,n){var r;let i={...null!=(r=e.resolveRef(t))?r:{}},s=tn(e,i,n);return s||eM(i,"if","then","else")}function ti(e,t,n=e.rootSchema){let r=tt(n);for(let i=0;i<n.allOf.length;i+=1)r=eB(r,tr(e,n.allOf[i],t));return delete r.allOf,r}function ts(e,t){let{allOf:n}=t;if(!Array.isArray(n)||0===n.length)return;let r={};return n.forEach(t=>{r=eB(r,e.resolveRef(t))}),r}function to(e){return"object"===ey(e)}function tl(e,t,n){let{dependencies:r}=t;if(!to(r)||!to(n))return;let i=!1,s={required:[]};if(Object.keys(r).forEach(o=>{var l,a;if(null==n[o]&&!((null==(l=t.required)?void 0:l.includes(o))||(null==(a=s.required)?void 0:a.includes(o))))return;let u=r[o];if(Array.isArray(u)){i=!0,s.required.push(...u);return}if(to(u)){i=!0,s=eB(s,e.resolveRef(u));return}}),i){var o;return s.required=(o=s.required).filter((e,t)=>o.indexOf(e)===t),s}}function ta(e,t,n){let r;if(Array.isArray(t.anyOf)&&0!==t.anyOf.length)return t.anyOf.forEach(t=>{t=e.resolveRef(t),e.isValid(n,t)&&(r=r?eB(r,t):t)}),r}function tu(e,t,n=e.rootSchema,r="#"){let{anyOf:i}=n;if(!Array.isArray(i)||0===i.length)return n;let s=ta(e,n,t);return null==s?e.errors.anyOfError({pointer:r,schema:n,value:t,anyOf:JSON.stringify(i)}):eM(eB(n,s),"anyOf")}let th=["allOf","anyOf","oneOf","dependencies","if","then","else"],tc=["allOf","anyOf","oneOf","dependencies","if"],tf=["allOf","anyOf","oneOf","dependencies","if","then","else"];function td(e,t,n,r){let i=function e(t,n,r,i){let s,o;if((n=t.resolveRef(n)).oneOf){let e=eS(t,r,n,i);ex(e)?o=e:e&&(s=eB(null!=s?s:{},e))}if(Array.isArray(n.allOf)){let o=n.allOf.map(n=>{let s;if(s=Object.keys(n),-1!==tc.findIndex(e=>s.includes(e))){let s=e(t,n,r,i);return s?eM(s=eB(n,s),...th):void 0}return n});o.length>0&&(s=eB(null!=s?s:{},ts(t,{allOf:o})))}let l=ta(t,n,r);l&&(s=eB(null!=s?s:{},l));let a=tl(t,n,r);a&&(s=eB(null!=s?s:{},a));let u=tn(t,n,r);if(u&&(s=eB(null!=s?s:{},u)),null==s)return o;let h=e(t,s,r,i);return h&&(s=eB(s,h)),eM(s,...th)}(e,t,n,r);return i?eM(i=eB(t,i),...tf):t}class tp{constructor(e,t){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=tt(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(t)}get rootSchema(){return this.__rootSchema}set rootSchema(e){null!=e&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,t){this.config.addRemoteSchema(this,e,t)}compileSchema(e){var t;return this.config.compileSchema(this,e,null!=(t=this.rootSchema)?t:e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,t,n,r){return this.config.each(this,e,t,n,r)}eachSchema(e,t=this.rootSchema){return this.config.eachSchema(t,e)}getChildSchemaSelection(e,t){return this.config.getChildSchemaSelection(this,e,t)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,t,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,t,n)}isValid(e,t,n){return this.config.isValid(this,e,t,n)}resolveAnyOf(e,t,n){return this.config.resolveAnyOf(this,e,t,n)}resolveAllOf(e,t){return this.config.resolveAllOf(this,e,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,t,n){return this.config.resolveOneOf(this,e,t,n)}setSchema(e){this.rootSchema=e}step(e,t,n,r){return this.config.step(this,e,t,n,r)}validate(e,t,n){return this.config.validate(this,e,t,n)}}function tm(e,t,n){n.id=n.id||t,e.remotes[t]=e.compileSchema(n)}var tg=n(95716),ty=n.n(tg),tb=n(44574);let tv="[^?/{}*,()#]+",tw=`
|
|
3
|
+
root ::= ("#" recursion | recursion | (query | pattern) recursion* | "#" SEP? | SEP)
|
|
4
|
+
recursion ::= (SEP query | pattern)*
|
|
5
|
+
|
|
6
|
+
query ::= (ESC escaped ESC | property | all | any | regex) typecheck? lookahead?
|
|
7
|
+
property ::= ${tv}
|
|
8
|
+
regex ::= "{" [^}]+ "}"
|
|
9
|
+
SEP ::= "/"
|
|
10
|
+
all ::= "**"
|
|
11
|
+
any ::= "*"
|
|
12
|
+
|
|
13
|
+
typecheck ::= "?:" ("value" | "boolean" | "string" | "number" | "object" | "array")
|
|
14
|
+
lookahead ::= "?" expression ((andExpr | orExpr) expression)*
|
|
15
|
+
andExpr ::= S? "&&" S?
|
|
16
|
+
orExpr ::= S? "||" S?
|
|
17
|
+
|
|
18
|
+
expression ::= (exprProperty | ESC escaped ESC) ((isnot | is) (exprProperty | regex | ESC escaped ESC))*
|
|
19
|
+
exprProperty ::= [a-zA-Z0-9-_ $]+
|
|
20
|
+
escaped ::= [^"]+
|
|
21
|
+
is ::= ":"
|
|
22
|
+
isnot ::= ":!"
|
|
23
|
+
ESC ::= '"'
|
|
24
|
+
|
|
25
|
+
pattern ::= S? "(" (SEP query | pattern (orPattern? pattern)*)* ")" quantifier? S? lookahead?
|
|
26
|
+
quantifier ::= "+" | "*" | [0-9]+
|
|
27
|
+
orPattern ::= S? "," S?
|
|
28
|
+
|
|
29
|
+
S ::= [ ]*
|
|
30
|
+
`,tk=new tb.default.Parser(tw),tD=(e,t)=>`${e}/${t}`,tx=Object.prototype.toString,tA=/Object|Array/,tC=e=>tA.test(tx.call(e));function tE(e){return new RegExp(e.text.replace(/(^{|}$)/g,""))}function tS(e){return Array.isArray(e)?e.map(function(e,t){return`${t}`}):"[object Object]"===Object.prototype.toString.call(e)?Object.keys(e):[]}let t_={mem:[],get(e,t){let n=e[0][t];if(!t_.mem.includes(n))return tC(n)&&t_.mem.push(n),[n,t,e[0],tD(e[3],t)]},reset(){t_.mem.length=0}},tO={any(e,t){let n=t[0];return tS(n).map(e=>[n[e],e,n,tD(t[3],e)])},all(e,t){var n,r;let i=[t];return n=t[0],r=(n,r)=>{let s=t_.get(t,r);s&&i.push(...tO.all(e,s))},Array.isArray(n)?n.forEach(r):"[object Object]"===Object.prototype.toString.call(n)&&Object.keys(n).forEach(function(e){r(n[e],e,n)}),i},regex(e,t){let n=tE(e),r=t[0];return tS(r).filter(e=>n.test(e)).map(e=>[r[e],e,r,tD(t[3],e)])}},tF={escaped:(e,t)=>tF.property(e,t),property:(e,t)=>{let n=e.text;if(t[0]&&void 0!==t[0][n])return[t[0][n],n,t[0],tD(t[3],n)]},typecheck:(e,t)=>{let n,r=e.text.replace(/^\?:/,"");return"value"===r?tC(t[0])?void 0:t:(n=t[0],tx.call(n).match(/\s([^\]]+)\]/).pop().toLowerCase()===r)?t:void 0},lookahead:(e,t)=>{let n=!0,r=!1;return e.children.forEach(e=>{if("expression"===e.type){let i=void 0!==tF.expression(e,t);n=!0===r?n||i:n&&i}else r="orExpr"===e.type}),n?t:void 0},expression:(e,t)=>{let n=e.children[0].text,r=e.children[1],i=e.children[2],s=t[0];if(!1!==tC(s))return!function(e,t,n){let r;if(void 0===t)return void 0!==e;let i=`${e}`;return r="regex"===n.type?tE(n).test(i):i===n.text,"isnot"===t.type&&(r=!1===r&&void 0!==e),r}(s[n],r,i)?void 0:t}},tP={value:e=>e.map(e=>e[0]),pointer:e=>e.map(e=>e[3]),all:e=>e,map:e=>{let t={};return e.forEach(e=>t[e[3]]=e[0]),t}};function tT(e,t,n=y.VALUE){let r;if(null==t)return[];""===(t=t.replace(/(\/$)/g,""))&&(t="#");let i=(r=t,tk.getAST(r));if(null==i)throw Error(`empty ast for '${t}'`);if(""!==i.rest)throw Error(`Failed parsing queryString from: '${i.rest}'`);let s=(t_.reset(),t_.mem.push(e),function e(t,n,r){let i;if("query"===n.type){let e;e=t,n.children.forEach(t=>{if(tO[t.type])e=function(e,t,n,r){let i=[];for(let s=0,o=t.length;s<o;s+=1)i.push(...e(n,t[s],n,r));return i}(tO[t.type],e,t,r);else if(tF[t.type])e=function(e,t,n,r){let i=[];for(let s=0,o=t.length;s<o;s+=1){let o=e(n,t[s],r);o&&i.push(o)}return i}(tF[t.type],e,t,r);else throw Error(`Unknown filter ${t.type}`)}),i=e}else if("pattern"===n.type)i=function(t,n,r){let i=[],s=n.children.find(e=>"quantifier"===e.type),o=function(e){if(null==e)return 1;if("*"===e||"+"===e)return 1/0;let t=parseInt(e);return isNaN(t)?1:t}(s&&s.text),l=t;s&&"*"===s.text&&i.push(...l);let a=0;for(;l.length>0&&a<o;)i.push(...l=function(t,n,r){let i=[],s=t;return n.children.forEach(n=>{if("orPattern"===n.type){i.push(...s),s=t;return}s=e(s,n,r)}),i.push(...s),i}(l,n,r)),a+=1;return i}(t,n,r);else{let s;s=t,n.children.forEach(t=>s=e(s,t,r)),i=s}return t_.reset(),t_.mem.push(t),i}([[e,null,null,"#"]],i));return"function"==typeof n?s.map(e=>n(...e)):tP[n]?tP[n](s):s}(a=y||(y={})).POINTER="pointer",a.VALUE="value",a.ALL="all",a.MAP="map",tT.POINTER=y.POINTER,tT.VALUE=y.VALUE,tT.ALL=y.ALL,tT.MAP=y.MAP;let tB=["root","recursion"],tM=e=>JSON.parse(JSON.stringify(e)),tI=Object.prototype.toString,tN=e=>tI.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase(),tL=RegExp(`^("[^"]+"|${tv})$`),t$=["string","number","boolean","null"],tR=/^\[\d*\]$/,tj=/^\[(\d+)\]$/,tz=/^".+"$/,tq=/(^\[\d*\]$|^\d+$)/;function tU(e){return parseInt(e.replace(/^(\[|\]$)/,""))}function tV(e){return tz.test(e)?e.replace(/(^"|"$)/g,""):e}function tH(e,t,n,r){let i=e[0];if(/^\[\]$/.test(t)){i.push(n);let t=i.length-1;return[i[t],t,i,`${e[3]}/${t}}`]}if(null==r&&"object"===tN(i[t])&&"object"===tN(n))return Object.assign(i[t],n),[i[t],t,i,`${e[3]}/${t}}`];if(r===tW.INSERT_ITEMS||null==r&&tj.test(t)){let r=tU(t);return i.length<=r?i[r]=n:i.splice(r,0,n),[i[r],r,i,`${e[3]}/${r}}`]}if(r===tW.REPLACE_ITEMS||null==r){let r=tU(t);return i[r]=n,[i[r],r,i,`${e[3]}/${r}}`]}throw Error(`Unknown array index '${t}' with force-option '${r}'`)}function tW(e,t,n,r){if(null==t)return tM(e);if(""===(t=t.replace(/(\/$)/g,"")))return tM(n);let i=tM(e),s=[[i,null,null,"#"]],o=function(e){return null==e||""===e?[]:function e(t,n=[]){return tB.includes(t.type)?t.children.forEach(t=>e(t,n)):n.push(t.text),n}(tk.getAST(e))}(t),l=o.pop(),a=tR.test(l)&&!1===tj.test(l);if(!1===tL.test(l)||a)throw Error(`Unsupported query '${t}' ending with non-property`);return o.forEach((e,t)=>{var n,i;if("__proto__"===e||"prototyped"===e||"constructor"===e)return;if(!1===tL.test(e)){let t;t=[],s.forEach(n=>t.push(...tT(n[0],e,y.ALL))),s=t;return}let a=t>=o.length-1?l:o[t+1],u=tq.test(a);n=s,i=tV(i=e),s=n.filter(e=>!!(Array.isArray(e[0])&&tq.test(i))||!1===t$.includes(tN(e[0][i]))).map(e=>{let t=u?[]:{},n=e[0],s=tN(t),o=tN(n[i]);return Array.isArray(n)&&o!==s?tH(e,i,t,r):(n[i]=n[i]||t,[n[i],i,n,`${e[3]}/${i}`])})}),s.forEach(e=>{let t=n;"function"===tN(n)&&(t=n(e[3],l,e[0],`${e[3]}/${l}`));let i=e[0];if(Array.isArray(i))tH(e,l,t,r);else{let e=tV(l);if("__proto__"===e||"prototyped"===e||"constructor"===e)return;i[e]=t}}),i}(u=b||(b={})).REPLACE_ITEMS="replace",u.INSERT_ITEMS="insert",tW.REPLACE_ITEMS=b.REPLACE_ITEMS,tW.INSERT_ITEMS=b.INSERT_ITEMS;let tK={$ref:{type:!1},allOf:{type:!1,definitions:["allOf/*"]},anyOf:{type:!1,definitions:["anyOf/*"]},array:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","items","items/*","additionalItems"],validationKeywords:["minItems","maxItems","uniqueItems"],keywords:["items","additionalItems","minItems","maxItems","uniqueItems"]},boolean:{type:!0},enum:{type:!1},integer:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},not:{type:!1,definitions:["not"]},number:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},null:{type:!0},object:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","properties/*","additionalProperties","patternProperties/*","dependencies/*"],validationKeywords:["minProperties","maxProperties","required"],keywords:["properties","additionalProperties","patternProperties","dependencies","minProperties","maxProperties","required"]},oneOf:{type:!1,definitions:["oneOf/*"]},string:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minLength","maxLength","pattern"]}},tG=Object.keys(tK).filter(e=>!1===tK[e].type),tJ=Object.prototype.hasOwnProperty;function tY(e){if(!1===to(e))return;if(e.enum)return"enum";let t=e.type;if(Array.isArray(t)||tK[t])return t;let n=tG.filter(t=>e[t]);if(1===n.length)return n[0];if(0===n.length){for(let t=0,n=tK.object.keywords.length;t<n;t+=1){let n=tK.object.keywords[t];if(tJ.call(e,n))return"object"}for(let t=0,n=tK.array.keywords.length;t<n;t+=1){let n=tK.array.keywords[t];if(tJ.call(e,n))return"array"}return}throw Error(`Mutiple typeIds [${n.join(", ")}] matched in ${JSON.stringify(e)}`)}function tZ(e,t){!0===this.callback(e,t)||(function(e){let t,n=[],r=tY(e);if(null==r)return n;if(Array.isArray(r)){t={};for(let e=0,n=r.length;e<n;e+=1)Object.assign(t,tK[r[e]])}else t=tK[r];return null==t.definitions||t.definitions.forEach(t=>{tT(e,t,(e,t,r,i)=>{to(e)&&tY(e)&&n.push({pointer:ty().join(ty().split(i),!1),def:e})})}),n})(e).forEach(e=>this.nextTypeDefs(e.def,ty().join(t,e.pointer,!1)))}function tQ(e,t,n,r="definitions"){let i=t[r];Object.keys(i).forEach(t=>{if(!1===i[t]||to(i[t]))return void e.nextTypeDefs(i[t],ty().join(n,r,t,!1))})}function tX(e,t,n="#"){let r={callback:t,nextTypeDefs:tZ};r.nextTypeDefs(e,n),null!=e.definitions&&(r.callback=(e,n)=>{t(e,n),null!=e.definitions&&tQ(r,e,n)},tQ(r,e,n)),null!=e.$defs&&(r.callback=(e,n)=>{t(e,n),null!=e.definitions&&tQ(r,e,n)},tQ(r,e,n,"$defs"))}let t0=/(#|\/)+$/,t1=/#$/,t2=/^[^:]+:\/\/[^/]+\//,t3=/\/[^/]*$/,t6=/#.*$/;function t5(e,t){return null==e&&null==t?"#":null==t?e.replace(t1,""):null==e?t.replace(t1,""):"#"===t[0]?`${e.replace(t6,"")}${t.replace(t0,"")}`:t2.test(t)?t.replace(t1,""):`${e.replace(t3,"")}/${t.replace(t1,"")}`}let t8=/(#|\/)+$/g,t4=["",null,"#"],t9=/(#|\/)+$/g;function t7(e,t,n){let r;if("object"===ey(n)&&(n=n.__ref||n.$ref),null==n)return t;let i=n.replace(t9,"");if(e.remotes[i])return(r=e.remotes[i])&&r.$ref?t7(e,t,r.$ref):r;if(e.ids[n])return(r=(0,tg.get)(t,e.ids[n]))&&r.$ref?t7(e,t,r.$ref):r;let s=function(e){if(t4.includes(e))return[];if(-1===(e=e.replace(t8,"")).indexOf("#")||0===e.indexOf("#"))return[e.replace(t8,"")];let t=e.split("#");return t[0]=t[0].replace(t8,""),t[1]=`#${t[1].replace(t8,"")}`,t}(n);if(0===s.length)return t;if(1===s.length){if(n=s[0],e.remotes[n])return r=e.remotes[n],t7(e,t,r.$ref);if(e.ids[n])return(r=(0,tg.get)(t,e.ids[n]))&&r.$ref?t7(e,t,r.$ref):r}if(2===s.length){let r=s[0];if(n=s[1],e.remotes[r])return e.remotes[r].getRef?e.remotes[r].getRef(n):t7(e,e.remotes[r],n);if(e.ids[r])return t7(e,(0,tg.get)(t,e.ids[r]),n)}return(r=(0,tg.get)(t,e.ids[n]||n))&&r.$ref?t7(e,t,r.$ref):r}let ne="__compiled",nt="__ref",nn=/(#|\/)+$/g;function nr(e,t,n,r=e.rootSchema,i="#"){n(r=e.resolveRef(r),t,i);let s=ey(t);"object"===s?Object.keys(t).forEach(s=>{let o=e.step(s,r,t,i),l=t[s];e.each(l,n,o,`${i}/${s}`)}):"array"===s&&t.forEach((s,o)=>{let l=e.step(o,r,t,i);e.each(s,n,l,`${i}/${o}`)})}let ni={additionalItemsError:ev("AdditionalItemsError"),additionalPropertiesError:ev("AdditionalPropertiesError"),anyOfError:ev("AnyOfError"),allOfError:ev("AllOfError"),constError:ev("ConstError"),containsError:ev("ContainsError"),containsArrayError:ev("ContainsArrayError"),containsAnyError:ev("ContainsAnyError"),enumError:ev("EnumError"),forbiddenPropertyError:ev("ForbiddenPropertyError"),formatURLError:ev("FormatURLError"),formatURIError:ev("FormatURIError"),formatURIReferenceError:ev("FormatURIReferenceError"),formatURITemplateError:ev("FormatURITemplateError"),formatDateError:ev("FormatDateError"),formatDateTimeError:ev("FormatDateTimeError"),formatEmailError:ev("FormatEmailError"),formatHostnameError:ev("FormatHostnameError"),formatIPV4Error:ev("FormatIPV4Error"),formatIPV4LeadingZeroError:ev("FormatIPV4LeadingZeroError"),formatIPV6Error:ev("FormatIPV6Error"),formatIPV6LeadingZeroError:ev("FormatIPV6LeadingZeroError"),formatJsonPointerError:ev("FormatJsonPointerError"),formatRegExError:ev("FormatRegExError"),formatTimeError:ev("FormatTimeError"),invalidSchemaError:ev("InvalidSchemaError"),invalidDataError:ev("InvalidDataError"),invalidTypeError:ev("InvalidTypeError"),invalidPropertyNameError:ev("InvalidPropertyNameError"),maximumError:ev("MaximumError"),maxItemsError:ev("MaxItemsError"),maxLengthError:ev("MaxLengthError"),maxPropertiesError:ev("MaxPropertiesError"),minimumError:ev("MinimumError"),minItemsError:ev("MinItemsError"),minItemsOneError:ev("MinItemsOneError"),minLengthError:ev("MinLengthError"),minLengthOneError:ev("MinLengthOneError"),minPropertiesError:ev("MinPropertiesError"),missingDependencyError:ev("MissingDependencyError"),missingOneOfPropertyError:ev("MissingOneOfPropertyError"),multipleOfError:ev("MultipleOfError"),multipleOneOfError:ev("MultipleOneOfError"),noAdditionalPropertiesError:ev("NoAdditionalPropertiesError"),notError:ev("NotError"),oneOfError:ev("OneOfError"),oneOfPropertyError:ev("OneOfPropertyError"),patternError:ev("PatternError"),patternPropertiesError:ev("PatternPropertiesError"),requiredPropertyError:ev("RequiredPropertyError"),schemaWarning:ev("SchemaWarning"),typeError:ev("TypeError"),undefinedValueError:ev("UndefinedValueError"),uniqueItemsError:ev("UniqueItemsError"),unknownPropertyError:ev("UnknownPropertyError"),valueNotEmptyError:ev("ValueNotEmptyError")};var ns=n(47112),no=n.n(ns),nl=n(85626);let na=RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([Zz])|([\\+|\\-]([01][0-9]|2[0-3]):[0-5][0-9]))$"),nu=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,nh=/^((([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}))|:)))$/i,nc=/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,nf=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,nd=/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,np=[0,31,28,31,30,31,30,31,31,30,31,30,31],nm=/^(?:\/(?:[^~/]|~0|~1)*)*$/,ng=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,ny=/^(?:[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,nb=/^(?:(?:[^\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,nv={date:(e,t,n,r)=>{if("string"!=typeof n||""===n)return;let i=n.match(nf);if(!i)return e.errors.formatDateTimeError({value:n,pointer:r,schema:t});let s=+i[1],o=+i[2],l=+i[3];if(!(o>=1)||!(o<=12)||!(l>=1)||!(l<=(2==o&&s%4==0&&(s%100!=0||s%400==0)?29:np[o])))return e.errors.formatDateError({value:n,pointer:r,schema:t})},"date-time":(e,t,n,r)=>{if("string"==typeof n&&""!==n)return""===n||na.test(n)?"Invalid Date"===new Date(n).toString()?e.errors.formatDateTimeError({value:n,pointer:r,schema:t}):void 0:e.errors.formatDateTimeError({value:n,pointer:r,schema:t})},email:(e,t,n,r)=>{if("string"!=typeof n||""===n)return;if('"'===n[0])return e.errors.formatEmailError({value:n,pointer:r,schema:t});let[i,s,...o]=n.split("@");if(!i||!s||0!==o.length||i.length>64||s.length>253||"."===i[0]||i.endsWith(".")||i.includes("..")||!/^[a-z0-9.-]+$/i.test(s)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(i)||!s.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))return e.errors.formatEmailError({value:n,pointer:r,schema:t})},"idn-email":(e,t,n,r)=>{if("string"==typeof n&&""!==n)try{(0,nl.parse)(n);return}catch(i){return e.errors.formatEmailError({value:n,pointer:r,schema:t})}},hostname:(e,t,n,r)=>{if("string"==typeof n&&!(""===n||nc.test(n)))return e.errors.formatHostnameError({value:n,pointer:r,schema:t})},ipv4:(e,t,n,r)=>"string"!=typeof n||""===n?void 0:n&&"0"===n[0]?e.errors.formatIPV4LeadingZeroError({value:n,pointer:r,schema:t}):n.length<=15&&nu.test(n)?void 0:e.errors.formatIPV4Error({value:n,pointer:r,schema:t}),ipv6:(e,t,n,r)=>"string"!=typeof n||""===n?void 0:n&&"0"===n[0]?e.errors.formatIPV6LeadingZeroError({value:n,pointer:r,schema:t}):n.length<=45&&nh.test(n)?void 0:e.errors.formatIPV6Error({value:n,pointer:r,schema:t}),"json-pointer":(e,t,n,r)=>{if("string"==typeof n&&""!==n&&!nm.test(n))return e.errors.formatJsonPointerError({value:n,pointer:r,schema:t})},"relative-json-pointer":(e,t,n,r)=>{if("string"==typeof n&&""!==n&&!ng.test(n))return e.errors.formatJsonPointerError({value:n,pointer:r,schema:t})},regex:(e,t,n,r)=>{if("string"==typeof n&&!1===/\\Z$/.test(n)){try{new RegExp(n);return}catch(e){}return e.errors.formatRegExError({value:n,pointer:r,schema:t})}if(!("object"==typeof n||"number"==typeof n||Array.isArray(n)))return e.errors.formatRegExError({value:n,pointer:r,schema:t})},time:(e,t,n,r)=>{if("string"==typeof n&&""!==n)return n.match(nd)?void 0:e.errors.formatDateTimeError({value:n,pointer:r,schema:t})},uri:(e,t,n,r)=>{if("string"==typeof n&&""!==n&&!no().isUri(n))return e.errors.formatURIError({value:n,pointer:r,schema:t})},"uri-reference":(e,t,n,r)=>{if("string"==typeof n&&""!==n&&!ny.test(n))return e.errors.formatURIReferenceError({value:n,pointer:r,schema:t})},"uri-template":(e,t,n,r)=>{if("string"==typeof n&&""!==n&&!nb.test(n))return e.errors.formatURITemplateError({value:n,pointer:r,schema:t})},url:(e,t,n,r)=>{if(!(""===n||no().isWebUri(n)))return e.errors.formatURLError({value:n,pointer:r,schema:t})}},nw={};function nk(e,t=nw){let{pointer:n="#",data:r,schema:i=e.rootSchema,withSchemaWarning:s=!1}=t,o=ty().split(n),l=function e(t,n,r,i,s=nw){if(0===r.length)return t.resolveRef(n);let o=r.shift();return ex(n=t.step(o,n,s,i))?n:(s=s[o],e(t,n,r,`${i}/${o}`,s))}(e,e.resolveRef(i),o,"#",r);if(s||(null==l?void 0:l.code)!=="schema-warning")return l}let nD=ek.templateDefaultOptions;function nx(e,t){let{$ref:n}=e;return null==n||(null==r[t]||null==r[t][n]?0:r[t][n])<ek.GET_TEMPLATE_RECURSION_LIMIT}function nA(e,t,n){let{$ref:i}=t;return null==i?t:(r[n]=r[n]||{},r[n][i]=r[n][i]||0,r[n][i]+=1,e.resolveRef(t))}function nC(e,t,n,r,i){if("object"!==ey(t))return Object.assign({pointer:r},t);if(!1===nx(t,r)&&null==n)return!1;let s=tt(nA(e,t,r));if(Array.isArray(t.anyOf)&&t.anyOf.length>0&&(nx(t.anyOf[0],`${r}/anyOf/0`)&&((s=eP(s,nA(e,t.anyOf[0],`${r}/anyOf/0`))).pointer=t.anyOf[0].$ref||s.pointer),delete s.anyOf),Array.isArray(t.allOf)&&t.allOf.map((e,t)=>nx(e,`${r}/allOf/${t}`)).reduceRight((e,t)=>e&&t,!0)){let o=[],l=tt(n);for(let n=0;n<t.allOf.length;n+=1)o.push(tr(e,t.allOf[n],l)),l=nE(e,l,{type:t.type,...o[n]},`${r}/allOf/${n}`,i);let a=ts(e,{allOf:o});a&&(s=eB(s,a))}return s.pointer=s.pointer||t.$ref||r,s}function nE(e,t,n,r,i){var s;let o,l;if(null==n)throw Error(`getTemplate: missing schema for data: ${JSON.stringify(t)}`);if(null==r)throw Error("Missing pointer");let a=nC(e,n,t,r,i);if(!((o=a)&&"object"==typeof o))return;if(r=a.pointer,null==a?void 0:a.const)return a.const;if(Array.isArray(a.oneOf))if(function(e){switch(ey(e)){case"string":case"array":return(null==e?void 0:e.length)===0;case"null":case"undefined":return!0;case"object":return 0===Object.keys(e).length;default:return!1}}(t)){let e=a.oneOf[0].type||a.type||a.const&&typeof a.const||ey(t);a={...a.oneOf[0],type:e}}else{let n=eS(e,t,a);if(ex(n)){if(null!=t&&!0!==i.removeInvalidData)return t;a=a.oneOf[0],t=void 0}else n.type=null!=(s=n.type)?s:a.type,a=n}if(!((l=a)&&"object"==typeof l)||null==a.type)return;if(t instanceof File)return t;let u=Array.isArray(a.type)?function(e,t,n){if(void 0==t){if(null!=n){let t=ey(n);if(e.includes(t))return t}return e[0]}let r=ey(t);return e.includes(r)?r:e[0]}(a.type,t,a.default):a.type,h=ey(t);if(null!=t&&h!==u&&("number"!==h||"integer"!==u)&&(t=function(e,t){if("string"===e)return JSON.stringify(t);if("string"!=typeof t)return null;try{if(typeof(t=JSON.parse(t))===e)return t}catch(e){}return null}(u,t)),null==nS[u]){if(i.removeInvalidData)return;return t}return nS[u](e,a,t,r,i)}let nS={null:(e,t,n)=>n_(t,n,null),string:(e,t,n)=>n_(t,n,""),number:(e,t,n)=>n_(t,n,0),integer:(e,t,n)=>n_(t,n,0),boolean:(e,t,n)=>n_(t,n,!1),object:(e,t,n,r,i)=>{var s;let o=void 0===t.default?{}:t.default,l={},a=!1===i.extendDefaults&&void 0!==t.default?[]:null!=(s=t.required)?s:[];t.properties&&Object.keys(t.properties).forEach(s=>{let u=null==n||null==n[s]?o[s]:n[s],h=a.includes(s);(null!=u||h||i.addOptionalProps)&&(l[s]=nE(e,u,t.properties[s],`${r}/properties/${s}`,i))});let u=tl(e,t,l);u&&(u=eB(t,u),delete u.dependencies,Object.assign(l,nE(e,n,u,`${r}/dependencies`,i))),n&&(!0===i.removeInvalidData&&(!1===t.additionalProperties||"object"===ey(t.additionalProperties))?"object"===ey(t.additionalProperties)&&Object.keys(n).forEach(r=>{null==l[r]&&e.isValid(n[r],t.additionalProperties)&&(l[r]=n[r])}):Object.keys(n).forEach(e=>null==l[e]&&(l[e]=n[e])));let h=tn(e,t,l);if(h){let t=nE(e,l,{type:"object",...h},r,i);Object.assign(l,t)}return l},array:(e,t,n,r,i)=>{var s,o;if(null==t.items)return n||[];let l=void 0===t.default?[]:t.default,a=n||l,u=!1===i.extendDefaults&&void 0!==t.default?0:t.minItems||0;if(Array.isArray(t.items)){for(let n=0,h=Math.max(null!=u?u:0,null!=(o=null==(s=t.items)?void 0:s.length)?o:0);n<h;n+=1)a[n]=nE(e,null==a[n]?l[n]:a[n],t.items[n],`${r}/items/${n}`,i);return a}if("object"!==ey(t.items))return a;let h=nC(e,t.items,n,r,i);if(!1===h)return a;if(r=h.pointer||r,h.oneOf&&0===a.length){let t=h.oneOf[0];for(let n=0;n<u;n+=1)a[n]=nE(e,null==a[n]?l[n]:a[n],t,`${r}/oneOf/0`,i);return a}if(h.oneOf&&a.length>0){let t=Math.max(u,a.length);for(let n=0;n<t;n+=1){let t=null==a[n]?l[n]:a[n],s=eS(e,t,h);null==s||ex(s)?null!=t&&!0!==i.removeInvalidData?a[n]=t:(t=void 0,s=h.oneOf[0],a[n]=nE(e,t,s,`${r}/oneOf/${n}`,i)):a[n]=nE(e,t,s,`${r}/oneOf/${n}`,i)}return a}if(h.type)for(let t=0,n=Math.max(u,a.length);t<n;t+=1)a[t]=nE(e,null==a[t]?l[t]:a[t],h,`${r}/items`,i);return a}};function n_(e,t,n){return null!=t?t:e.const?e.const:void 0===e.default&&Array.isArray(e.enum)?e.enum[0]:void 0===e.default?n:e.default}let nO=(e,t,n=e.rootSchema,i)=>(r={},i)?nE(e,t,n,"#",{...nD,...i}):nE(e,t,n,"#",nD);function nF(e,t,n=e.rootSchema,r="#"){return 0===e.validate(t,n,r).length}function nP(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(64512&r)==56320?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}function nT(e){let t=`${e}`,n=t.indexOf(".");return -1===n?0:t.length-(n+1)}var nB=n(38792),nM=n.n(nB);let nI=Object.prototype.hasOwnProperty,nN=(e,t)=>!(void 0===e[t]||!nI.call(e,t)),nL={additionalProperties:(e,t,n,r)=>{if(!0===t.additionalProperties||null==t.additionalProperties||"object"===ey(t.patternProperties)&&!1===t.additionalProperties)return;let i=[],s=Object.keys(n).filter(e=>!1===ek.propertyBlacklist.includes(e)),o=Object.keys(t.properties||{});if("object"===ey(t.patternProperties)){let e=Object.keys(t.patternProperties).map(e=>new RegExp(e));s=s.filter(t=>{for(let n=0;n<e.length;n+=1)if(e[n].test(t))return!1;return!0})}for(let l=0,a=s.length;l<a;l+=1){let a=s[l];if(-1===o.indexOf(a)){let u=to(t.additionalProperties);if(u&&Array.isArray(t.additionalProperties.oneOf)){let u=e.resolveOneOf(n[a],t.additionalProperties,`${r}/${a}`);ex(u)?i.push(e.errors.additionalPropertiesError({pointer:r,schema:t.additionalProperties,value:n,property:s[l],properties:o,errors:u.data.errors})):i.push(...e.validate(n[a],u,r))}else u?i.push(...e.validate(n[a],t.additionalProperties,`${r}/${a}`)):i.push(e.errors.noAdditionalPropertiesError({pointer:r,schema:t,value:n,property:s[l],properties:o}))}}return i},allOf:(e,t,n,r)=>{let{allOf:i}=t;if(!Array.isArray(i)||0===i.length)return;let s=[];return t.allOf.forEach(t=>{s.push(...e.validate(n,t,r))}),s},anyOf:(e,t,n,r)=>{if(Array.isArray(t.anyOf)&&0!==t.anyOf.length){for(let r=0;r<t.anyOf.length;r+=1)if(e.isValid(n,t.anyOf[r]))return;return e.errors.anyOfError({pointer:r,schema:t,value:n,anyOf:t.anyOf})}},dependencies:(e,t,n,r)=>{if("object"!==ey(t.dependencies))return;let i=[];return Object.keys(n).forEach(s=>{let o;if(void 0===t.dependencies[s]||!0===t.dependencies[s])return;if(!1===t.dependencies[s])return void i.push(e.errors.missingDependencyError({pointer:r,schema:t,value:n}));let l=ey(t.dependencies[s]);if("array"===l)o=t.dependencies[s].filter(e=>void 0===n[e]).map(i=>e.errors.missingDependencyError({missingProperty:i,pointer:r,schema:t,value:n}));else if("object"===l)o=e.validate(n,t.dependencies[s],r);else throw Error(`Invalid dependency definition for ${r}/${s}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0},enum:(e,t,n,r)=>{let i=ey(n);if("object"===i||"array"===i){let e=JSON.stringify(n);for(let n=0;n<t.enum.length;n+=1)if(JSON.stringify(t.enum[n])===e)return}else if(t.enum.includes(n))return;return e.errors.enumError({pointer:r,schema:t,value:n,values:t.enum})},format:(e,t,n,r)=>{if(e.validateFormat[t.format])return e.validateFormat[t.format](e,t,n,r)},items:(e,t,n,r)=>{if(!1===t.items){if(Array.isArray(n)&&0===n.length)return;return e.errors.invalidDataError({pointer:r,value:n,schema:t})}let i=[];for(let s=0;s<n.length;s+=1){let o=n[s],l=e.step(s,t,n,r);if(ex(l))return[l];let a=e.validate(o,l,`${r}/${s}`);i.push(...a)}return i},maximum:(e,t,n,r)=>{if(!isNaN(t.maximum)){if(t.maximum&&t.maximum<n)return e.errors.maximumError({maximum:t.maximum,length:n,value:n,pointer:r,schema:t});if(t.maximum&&!0===t.exclusiveMaximum&&t.maximum===n)return e.errors.maximumError({maximum:t.maximum,length:n,pointer:r,schema:t,value:n})}},maxItems:(e,t,n,r)=>{if(!isNaN(t.maxItems)&&t.maxItems<n.length)return e.errors.maxItemsError({maximum:t.maxItems,length:n.length,schema:t,value:n,pointer:r})},maxLength:(e,t,n,r)=>{if(isNaN(t.maxLength))return;let i=nP(n).length;if(t.maxLength<i)return e.errors.maxLengthError({maxLength:t.maxLength,length:i,pointer:r,schema:t,value:n})},maxProperties:(e,t,n,r)=>{let i=Object.keys(n).length;if(!1===isNaN(t.maxProperties)&&t.maxProperties<i)return e.errors.maxPropertiesError({maxProperties:t.maxProperties,length:i,pointer:r,schema:t,value:n})},minLength:(e,t,n,r)=>{if(isNaN(t.minLength))return;let i=nP(n).length;if(t.minLength>i)return 1===t.minLength?e.errors.minLengthOneError({minLength:t.minLength,length:i,pointer:r,schema:t,value:n}):e.errors.minLengthError({minLength:t.minLength,length:i,pointer:r,schema:t,value:n})},minimum:(e,t,n,r)=>{if(!isNaN(t.minimum)&&(t.minimum>n||!0===t.exclusiveMinimum&&t.minimum===n))return e.errors.minimumError({minimum:t.minimum,length:n,pointer:r,schema:t,value:n})},minItems:(e,t,n,r)=>{if(!isNaN(t.minItems)&&t.minItems>n.length)return 1===t.minItems?e.errors.minItemsOneError({minItems:t.minItems,length:n.length,pointer:r,schema:t,value:n}):e.errors.minItemsError({minItems:t.minItems,length:n.length,pointer:r,schema:t,value:n})},minProperties:(e,t,n,r)=>{if(isNaN(t.minProperties))return;let i=Object.keys(n).length;if(t.minProperties>i)return e.errors.minPropertiesError({minProperties:t.minProperties,length:i,pointer:r,schema:t,value:n})},multipleOf:(e,t,n,r)=>{if(isNaN(t.multipleOf)||"number"!=typeof n)return;let i=nT(n),s=nT(t.multipleOf);if(i>s)return e.errors.multipleOfError({multipleOf:t.multipleOf,value:n,pointer:r,schema:t});let o=Math.pow(10,s);if(Math.round(n*o)%Math.round(t.multipleOf*o)/o!=0)return e.errors.multipleOfError({multipleOf:t.multipleOf,value:n,pointer:r,schema:t})},not:(e,t,n,r)=>{let i=[];return 0===e.validate(n,t.not,r).length&&i.push(e.errors.notError({value:n,not:t.not,pointer:r,schema:t})),i},oneOf:(e,t,n,r)=>{if(Array.isArray(t.oneOf)){let i=e.resolveOneOf(n,t,r);if(ex(i))return i}},pattern:(e,t,n,r)=>{if(!1===RegExp(t.pattern,"u").test(n))return e.errors.patternError({pattern:t.pattern,description:t.patternExample||t.pattern,received:n,schema:t,value:n,pointer:r})},patternProperties:(e,t,n,r)=>{let i=t.properties||{},s=t.patternProperties;if("object"!==ey(s))return;let o=[],l=Object.keys(n),a=Object.keys(s).map(e=>({regex:new RegExp(e),patternSchema:s[e]}));return l.forEach(l=>{let u=!1;for(let t=0,i=a.length;t<i;t+=1)if(a[t].regex.test(l)){u=!0;let i=e.validate(n[l],a[t].patternSchema,`${r}/${l}`);i&&i.length>0&&o.push(...i)}i[l]||!1===u&&!1===t.additionalProperties&&o.push(e.errors.patternPropertiesError({key:l,pointer:r,schema:t,value:n,patterns:Object.keys(s).join(",")}))}),o},properties:(e,t,n,r)=>{let i=[],s=Object.keys(t.properties||{});for(let o=0;o<s.length;o+=1){let l=s[o];if(nN(n,l)){let s=e.step(l,t,n,r),o=e.validate(n[l],s,`${r}/${l}`);i.push(...o)}}return i},propertiesRequired:(e,t,n,r)=>{let i=[],s=Object.keys(t.properties||{});for(let o=0;o<s.length;o+=1){let l=s[o];if(void 0===n[l])i.push(e.errors.requiredPropertyError({key:l,pointer:r,schema:t,value:n}));else{let s=e.step(l,t,n,r),o=e.validate(n[l],s,`${r}/${l}`);i.push(...o)}}return i},required:(e,t,n,r)=>{if(!1!==Array.isArray(t.required))return t.required.map(i=>{if(!nN(n,i))return e.errors.requiredPropertyError({key:i,pointer:r,schema:t,value:n})})},requiredNotEmpty:(e,t,n,r)=>{if(!1!==Array.isArray(t.required))return t.required.map(i=>{if(null==n[i]||""===n[i])return e.errors.valueNotEmptyError({property:i,pointer:`${r}/${i}`,schema:t,value:n})})},uniqueItems:(e,t,n,r)=>{if(!1===(Array.isArray(n)&&t.uniqueItems))return;let i=[],s=[];return n.forEach((o,l)=>{for(let a=l+1;a<n.length;a+=1)nM()(o,n[a])&&!i.includes(a)&&(s.push(e.errors.uniqueItemsError({pointer:`${r}/${a}`,duplicatePointer:`${r}/${l}`,arrayPointer:r,value:JSON.stringify(o),schema:t})),i.push(a))}),s}};function n$(e,t){return null==e||null==e.$ref?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function nR(e){if(void 0===e)return;let t={type:ey(e)};return"object"===t.type&&to(e)&&(t.properties={},Object.keys(e).forEach(n=>t.properties[n]=nR(e[n]))),"array"===t.type&&Array.isArray(e)&&(1===e.length?t.items=nR(e[0]):t.items=e.map(nR)),t}let nj={array:(e,t,n,r,i)=>{let s=null==r?void 0:r[t],o=ey(n.items);if("object"===o)return td(e,n.items,s,`${i}/${t}`)||e.resolveRef(n.items);if("array"===o){if(!0===n.items[t])return nR(s);if(!1===n.items[t])return e.errors.invalidDataError({key:t,value:s,pointer:i,schema:n});if(n.items[t])return e.resolveRef(n.items[t]);if(!1===n.additionalItems)return e.errors.additionalItemsError({key:t,value:s,pointer:i,schema:n});if(!0===n.additionalItems||void 0===n.additionalItems)return nR(s);if("object"===ey(n.additionalItems))return n.additionalItems;throw Error(`Invalid schema ${JSON.stringify(n,null,2)} for ${JSON.stringify(r,null,2)}`)}return!1!==n.additionalItems&&s?nR(s):Error(`Invalid array schema for ${t} at ${i}`)},object:(e,t,n,r,i)=>{var s;let o=null==(s=null==(n=td(e,n,r,i))?void 0:n.properties)?void 0:s[t];if(void 0!==o){if(!1===o)return e.errors.forbiddenPropertyError({property:t,value:r,pointer:i,schema:n});if(!0===o)return nR(null==r?void 0:r[t]);let s=e.resolveRef(o);if(ex(s))return s;if(s&&Array.isArray(s.oneOf)){let n=e.resolveOneOf(r[t],s,`${i}/${t}`);for(let e in s)"oneOf"!==e&&void 0===n[e]&&(n[e]=s[e]);return n}if(s)return s}let{patternProperties:l}=n;if("object"===ey(l)){let e=Object.keys(l);for(let n=0,r=e.length;n<r;n+=1)if(new RegExp(e[n]).test(t))return l[e[n]]}let{additionalProperties:a}=n;return"object"===ey(a)?n.additionalProperties:r&&(void 0===a||!0===a)?nR(r[t]):e.errors.unknownPropertyError({property:t,value:r,pointer:`${i}`,schema:n})}};function nz(e,t,n,r,i="#"){var s;let o=ey(r),l=null!=(s=n.type)?s:o;if(Array.isArray(l)){if(!l.includes(o))return e.errors.typeError({value:r,pointer:i,expected:n.type,received:o,schema:n});l=o}let a=nj[l];if(a){let s=a(e,`${t}`,n,r,i);return void 0===s?e.errors.schemaWarning({pointer:i,value:r,schema:n,key:t}):s}return Error(`Unsupported schema type ${n.type} for key ${t}`)}function nq(e,t,n=e.rootSchema){var r;if(n.oneOf)return n.oneOf.map(t=>e.resolveRef(t));if(null==(r=n.items)?void 0:r.oneOf)return n.items.oneOf.map(t=>e.resolveRef(t));let i=e.step(t,n,{},"#");return ex(i)?i:[i]}function nU(e,t,n=e.rootSchema,r="#"){var i;let s;if("boolean"===ey(n=e.resolveRef(n)))return n?[]:[e.errors.invalidDataError({pointer:r,schema:n,value:t})];if(ex(n))return[n];if(void 0!==n.const)return nM()(n.const,t)?[]:[e.errors.constError({pointer:r,schema:n,value:t,expected:n.const})];let o=(i=n.type,"number"===(s=ey(t))&&("integer"===i||Array.isArray(i)&&i.includes("integer"))?Number.isInteger(t)||isNaN(t)?"integer":"number":s),l=n.type||o;return o===l||Array.isArray(l)&&l.includes(o)?null==e.validateType[o]?[e.errors.invalidTypeError({pointer:r,schema:n,value:t,receivedType:o})]:ew(e.validateType[o](e,n,t,r)).filter(eA):[e.errors.typeError({pointer:r,schema:n,value:t,received:o,expected:l})]}let nV={typeKeywords:{array:["allOf","anyOf","enum","items","maxItems","minItems","not","oneOf","uniqueItems"],boolean:["enum","not","allOf","anyOf","oneOf"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","required","not","oneOf","allOf","anyOf"],string:["allOf","anyOf","enum","format","maxLength","minLength","not","oneOf","pattern"],number:["allOf","anyOf","enum","format","maximum","minimum","multipleOf","not","oneOf"],null:["allOf","anyOf","enum","format","not","oneOf"]},validateKeyword:nL,validateType:{array:(e,t,n,r)=>e.typeKeywords.array.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),object:(e,t,n,r)=>e.typeKeywords.object.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),string:(e,t,n,r)=>e.typeKeywords.string.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),integer:(e,t,n,r)=>e.typeKeywords.number.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),number:(e,t,n,r)=>e.typeKeywords.number.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),boolean:(e,t,n,r)=>e.typeKeywords.boolean.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),null:(e,t,n,r)=>e.typeKeywords.null.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r))},validateFormat:nv,errors:ni,addRemoteSchema:tm,compileSchema:function(e,t,n=t,r=!1){if(!t||void 0!==t[ne])return t;let i={ids:{},remotes:e.remotes},s=JSON.stringify(t),o=JSON.parse(s);if(Object.defineProperty(o,ne,{enumerable:!1,value:!0}),Object.defineProperty(o,"getRef",{enumerable:!1,value:t7.bind(null,i,o)}),!1===r&&!1===s.includes("$ref"))return o;t!==n&&Object.defineProperty(o,"definitions",{enumerable:!1,value:Object.assign({},n.definitions,n.$defs,t.definitions,t.$defs)});let l={},a=()=>o;return tX(o,(e,t)=>{var n;if(e.id){if(e.id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(t)){let r=t.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,"");e.id=null!=(n=(0,tg.get)(o,r).id)?n:e.id}i.ids[e.id.replace(nn,"")]=t}let r=(t=`#${t}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),s=t.replace(/\/[^/]+\/[^/]+$/,""),u=t5(l[r]||l[s],e.id);l[t]=u,null==i.ids[u]&&(i.ids[u]=t),e.$ref&&!e[nt]&&(Object.defineProperty(e,nt,{enumerable:!1,value:t5(u,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:a}))}),o},createSchemaOf:nR,each:nr,eachSchema:tX,getChildSchemaSelection:nq,getSchema:nk,getTemplate:nO,isValid:nF,resolveAllOf:ti,resolveAnyOf:tu,resolveOneOf:eE,resolveRef:n$,step:nz,validate:nU,templateDefaultOptions:ek.templateDefaultOptions};class nH extends tp{constructor(e,t={}){super(eP(nV,t),e)}}let nW="__compiled",nK="__ref",nG=/(#|\/)+$/g,nJ={...nL,contains:(e,t,n,r)=>{if(!1===t.contains)return e.errors.containsArrayError({pointer:r,value:n,schema:t});if(!0===t.contains)return Array.isArray(n)&&0===n.length?e.errors.containsAnyError({pointer:r,value:n,schema:t}):void 0;if("object"===ey(t.contains)){for(let r=0;r<n.length;r+=1)if(e.isValid(n[r],t.contains))return;return e.errors.containsError({pointer:r,schema:t,value:n})}},exclusiveMaximum:(e,t,n,r)=>{if(!isNaN(t.exclusiveMaximum)&&t.exclusiveMaximum<=n)return e.errors.maximumError({maximum:t.exclusiveMaximum,length:n,pointer:r,schema:t,value:n})},exclusiveMinimum:(e,t,n,r)=>{if(!isNaN(t.exclusiveMinimum)&&t.exclusiveMinimum>=n)return e.errors.minimumError({minimum:t.exclusiveMinimum,length:n,pointer:r,schema:t,value:n})},if:(e,t,n,r)=>{let i=tn(e,t,n);if(i)return e.validate(n,i,r)},maximum:(e,t,n,r)=>{if(!isNaN(t.maximum)&&t.maximum&&t.maximum<n)return e.errors.maximumError({maximum:t.maximum,length:n,pointer:r,schema:t,value:n})},minimum:(e,t,n,r)=>{if(!isNaN(t.minimum)&&t.minimum>n)return e.errors.minimumError({minimum:t.minimum,length:n,pointer:r,schema:t,value:n})},patternProperties:(e,t,n,r)=>{let i=t.properties||{},s=t.patternProperties;if("object"!==ey(s))return;let o=[],l=Object.keys(n),a=Object.keys(s).map(e=>({regex:new RegExp(e),patternSchema:s[e]}));return l.forEach(l=>{let u=!1;for(let i=0,h=a.length;i<h;i+=1)if(a[i].regex.test(l)){if(u=!0,!1===a[i].patternSchema)return void o.push(e.errors.patternPropertiesError({key:l,pointer:r,patterns:Object.keys(s).join(","),schema:t,value:n}));let h=e.validate(n[l],a[i].patternSchema,`${r}/${l}`);h&&h.length>0&&o.push(...h)}i[l]||!1===u&&!1===t.additionalProperties&&o.push(e.errors.patternPropertiesError({key:l,pointer:r,patterns:Object.keys(s).join(","),schema:t,value:n}))}),o},propertyNames:(e,t,n,r)=>{if(!1===t.propertyNames){if(0===Object.keys(n).length)return;return e.errors.invalidPropertyNameError({property:Object.keys(n),pointer:r,value:n,schema:t})}if(!0===t.propertyNames||"object"!==ey(t.propertyNames))return;let i=[],s=Object.keys(n),o={...t.propertyNames,type:"string"};return s.forEach(s=>{let l=e.validate(s,o,`${r}/${s}`);l.length>0&&i.push(e.errors.invalidPropertyNameError({property:s,pointer:r,validationError:l[0],value:n[s],schema:t}))}),i}};ek.templateDefaultOptions;let nY={typeKeywords:{array:["allOf","anyOf","contains","enum","if","items","maxItems","minItems","not","oneOf","uniqueItems"],boolean:["allOf","anyOf","enum","not","oneOf"],object:["additionalProperties","allOf","anyOf","dependencies","enum","format","if","maxProperties","minProperties","not","oneOf","patternProperties","properties","propertyNames","required"],string:["allOf","anyOf","enum","format","if","maxLength","minLength","not","oneOf","pattern"],number:["allOf","anyOf","enum","exclusiveMaximum","exclusiveMinimum","format","if","maximum","minimum","multipleOf","not","oneOf"],null:["allOf","anyOf","enum","format","not","oneOf"]},validateKeyword:nJ,validateType:{array:(e,t,n,r)=>e.typeKeywords.array.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),object:(e,t,n,r)=>e.typeKeywords.object.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),string:(e,t,n,r)=>e.typeKeywords.string.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),integer:(e,t,n,r)=>e.typeKeywords.number.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),number:(e,t,n,r)=>e.typeKeywords.number.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),boolean:(e,t,n,r)=>e.typeKeywords.boolean.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r)),null:(e,t,n,r)=>e.typeKeywords.null.filter(e=>t&&null!=t[e]).map(i=>e.validateKeyword[i](e,t,n,r))},validateFormat:nv,errors:ni,addRemoteSchema:tm,compileSchema:function(e,t,n=t,r=!1){if(!0===t||!1===t||void 0===t||void 0!==t[nW])return t;let i={ids:{},remotes:e.remotes},s=JSON.stringify(t),o=JSON.parse(s);if(Object.defineProperty(o,nW,{enumerable:!1,value:!0}),Object.defineProperty(o,"getRef",{enumerable:!1,value:t7.bind(null,i,o)}),!1===r&&!1===s.includes("$ref"))return o;o!==n&&Object.defineProperty(o,"$defs",{enumerable:!0,value:Object.assign({},n.definitions,n.$defs,o.definitions,o.$defs)});let l={},a=()=>o;return tX(o,(e,t)=>{var n;if(e.$id){if(e.$id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(t)){let r=t.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,"");e.$id=null!=(n=(0,tg.get)(o,r).$id)?n:e.$id}i.ids[e.$id.replace(nG,"")]=t}let r=(t=`#${t}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),s=t.replace(/\/[^/]+\/[^/]+$/,""),u=t5(l[r]||l[s],e.$id);l[t]=u,null==i.ids[u]&&(i.ids[u]=t),e.$ref&&!e[nK]&&(Object.defineProperty(e,nK,{enumerable:!1,value:t5(u,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:a}))}),o},createSchemaOf:nR,each:nr,eachSchema:tX,getChildSchemaSelection:nq,getSchema:nk,getTemplate:nO,isValid:nF,resolveAllOf:ti,resolveAnyOf:tu,resolveOneOf:eE,resolveRef:n$,step:nz,validate:nU,templateDefaultOptions:ek.templateDefaultOptions};class nZ extends tp{constructor(e,t={}){super(eP(nY,t),e)}}function nQ(e,t,n=[]){let r=document.createElement(e);return Object.entries(t).forEach(([e,t])=>{if("text"===e){r.innerText=t;return}if("inner"===e){r.innerHTML=t;return}r.setAttribute(e,t)}),n.forEach(e=>r.appendChild(e)),r}({...nY,resolveOneOf:eS,resolveRef:function(e,t){if(null==e||null==e.$ref)return e;let n=Object.assign({},t.getRef(e),e);return delete n.$ref,Object.defineProperty(n,"__ref",{enumerable:!1,value:e.__ref}),Object.defineProperty(n,"getRoot",{enumerable:!1,value:e.getRoot}),n}});let nX={};function n0(e,t){"string"!=typeof t&&(t=n0.defaultChars);let n=function(e){let t=nX[e];if(t)return t;t=nX[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let r=0,i=e.length;r<i;r+=3){let s=parseInt(e.slice(r+1,r+3),16);if(s<128){t+=n[s];continue}if((224&s)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((192&n)==128){let e=s<<6&1984|63&n;e<128?t+="��":t+=String.fromCharCode(e),r+=3;continue}}if((240&s)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((192&n)==128&&(192&i)==128){let e=s<<12&61440|n<<6&4032|63&i;e<2048||e>=55296&&e<=57343?t+="���":t+=String.fromCharCode(e),r+=6;continue}}if((248&s)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((192&n)==128&&(192&i)==128&&(192&o)==128){let e=s<<18&1835008|n<<12&258048|i<<6&4032|63&o;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}return t})}n0.defaultChars=";/?:@&=+$,#",n0.componentChars="";let n1=n0,n2={};function n3(e,t,n){"string"!=typeof t&&(n=t,t=n3.defaultChars),void 0===n&&(n=!0);let r=function(e){let t=n2[e];if(t)return t;t=n2[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t),i="";for(let t=0,s=e.length;t<s;t++){let o=e.charCodeAt(t);if(n&&37===o&&t+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<s){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[t])}return i}n3.defaultChars=";/?:@&=+$,-_.!~*'()#",n3.componentChars="-_.!~*'()";let n6=n3;function n5(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}function n8(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}let n4=/^([a-z0-9.+-]+:)/i,n9=/:[0-9]*$/,n7=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,re=["%","/","?",";","#"].concat(["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "]))),rt=["/","?","#"],rn=/^[+a-z0-9A-Z_-]{0,63}$/,rr=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ri={javascript:!0,"javascript:":!0},rs={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n8.prototype.parse=function(e,t){let n,r,i,s=e;if(s=s.trim(),!t&&1===e.split("#").length){let e=n7.exec(s);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=n4.exec(s);if(o&&(n=(o=o[0]).toLowerCase(),this.protocol=o,s=s.substr(o.length)),(t||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===s.substr(0,2))&&!(o&&ri[o])&&(s=s.substr(2),this.slashes=!0),!ri[o]&&(i||o&&!rs[o])){let e,t,n=-1;for(let e=0;e<rt.length;e++)-1!==(r=s.indexOf(rt[e]))&&(-1===n||r<n)&&(n=r);-1!==(t=-1===n?s.lastIndexOf("@"):s.lastIndexOf("@",n))&&(e=s.slice(0,t),s=s.slice(t+1),this.auth=e),n=-1;for(let e=0;e<re.length;e++)-1!==(r=s.indexOf(re[e]))&&(-1===n||r<n)&&(n=r);-1===n&&(n=s.length),":"===s[n-1]&&n--;let i=s.slice(0,n);s=s.slice(n),this.parseHost(i),this.hostname=this.hostname||"";let o="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(rn)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(rn)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(rr);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(s=i.join(".")+s),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=s.indexOf("#");-1!==l&&(this.hash=s.substr(l),s=s.slice(0,l));let a=s.indexOf("?");return -1!==a&&(this.search=s.substr(a),s=s.slice(0,a)),s&&(this.pathname=s),rs[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n8.prototype.parseHost=function(e){let t=n9.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};let ro=function(e,t){if(e&&e instanceof n8)return e;let n=new n8;return n.parse(e,t),n},rl=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,ra=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,ru=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rh=/[\0-\x1F\x7F-\x9F]/,rc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,rf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,rd=new Uint16Array('ᵁ<\xd5ıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig耻\xc6䃆P耻&䀦cute耻\xc1䃁reve;䄂Āiyx}rc耻\xc2䃂;䐐r;쀀\uD835\uDD04rave耻\xc0䃀pha;䎑acr;䄀d;橓Āgp\x9d\xa1on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻\xc5䃅Ācs\xbe\xc3r;쀀\uD835\uDC9Cign;扔ilde耻\xc3䃃ml耻\xc4䃄Ѐaceforsu\xe5\xfb\xfeėĜĢħĪĀcr\xea\xf2kslash;或Ŷ\xf6\xf8;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘c\xf2ēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻\xa9䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻\xc7䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷\xf2ſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegra\xecȹoɴ\0\0ͻ\xbb͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔e\xe5ˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻\xd0䃐cute耻\xc9䃉ƀaiyӒӗӜron;䄚rc耻\xca䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻\xc8䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻\xcb䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀\uD835\uDD09lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱c\xf2JTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅ\xf2کrok;䄦mpńېۘownHum\xf0įqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻\xcd䃍Āiyܓܘrc耻\xce䃎;䐘ot;䄰r;愑rave耻\xcc䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lie\xf3ϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻\xcf䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\0ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ight\xe1Μs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊight\xe1οight\xe1ϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂ\xf2ࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44c\xf2੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦\xeberyThi\xeetedĀGLଆreaterGreate\xf2ٳessLes\xf3ੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻\xd1䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻\xd3䃓Āiyීrc耻\xd4䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻\xd2䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻\xd8䃘iŬืde耻\xd5䃕es;樷ml耻\xd6䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplan\xe5ڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCACBEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻\xae䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r\xbbཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow\xbbОeftArrow\xbb࢚ightArrow\xbbpArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Th\xe1ྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et\xbbሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻\xde䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻\xda䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻\xdb䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻\xd9䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥own\xe1ϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻\xdc䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻\xdd䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidt\xe8a;䎖r;愨pf;愤cr;쀀\uD835\uDCB5ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻\xe1䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻\xe2䃢te肻\xb4̆;䐰lig耻\xe6䃦Ā;r\xb2ᖺ;쀀\uD835\uDD1Erave耻\xe0䃠ĀepᗊᗖĀfpᗏᗔsym;愵\xe8ᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e\xbbᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢\xbb\xb9arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒ\xf1ᚃing耻\xe5䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;eᚯ\xf1ʈilde耻\xe3䃣ml耻\xe4䃤Āciᛂᛈonin\xf4ɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e\xbbᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰s\xe9ᜌno\xf5ēƀahwᝯᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fgcostuvwឍឝឳេ៕៛ƀaiuបពរ\xf0ݠrc;旯p\xbb፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄e\xe5ᑄ\xe5ᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom\xbbᏌtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻\xa6䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t\xbbpƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁\xeeړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻\xe7䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻\xb8ƭptyv;榲t脀\xa2;eᨭᨮ䂢r\xe4Ʋr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark\xbbᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖\xbbཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it\xbb᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;q\xc7\xc6ɭ\0\0aĀ;t䀬;䁀ƀ;fl戁\xeeᅠeĀmxent\xbbe\xf3ɍǧ\0ᬇĀ;dኻᬂot;橭n\xf4Ɇƀfryᬐᬔᬗ;쀀\uD835\uDD54o\xe4ɔ脀\xa9;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒre\xe3᭳u\xe3᭵ee;拎edge;拏en耻\xa4䂤earrowĀlrᯮ᯳eft\xbbᮀight\xbbᮽe\xe4ᯝĀciᰁᰇonin\xf4Ƿnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍r\xf2ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸\xf2ᄳhĀ;vᱚᱛ怐\xbbऊūᱡᱧarow;椏a\xe3̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻\xb0䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ\xbbࣜ\xbbသʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀\xf7;o᳧ᳰntimes;拇n\xf8᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedg\xe5\xfanƀadhᄮᵝᵧownarrow\xf3ᲃarpoonĀlrᵲᵶef\xf4Ჴigh\xf4ᲶŢᵿᶅkaro\xf7གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃r\xf2Щa\xf2ྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴo\xf4ĀcsḎḔute耻\xe9䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻\xea䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻\xe8䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et\xbbẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on\xbbớ;䏵ȀcsuvỪỳἋἣĀioữḱrc\xbbḮɩỹ\0\0ỻ\xedՈantĀglἂἆtr\xbbṝess\xbbṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯o\xf4͒ĀahὉὋ;䎷耻\xf0䃰Āmrὓὗl耻\xeb䃫o;悬ƀcipὡὤὧl;䀡s\xf4ծĀeoὬὴctatio\xeeՙnential\xe5չৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotse\xf1Ṅy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀\uD835\uDD23lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻\xbd䂽;慓耻\xbc䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻\xbe䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlan\xf4٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox\xbbℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0pro\xf8r;楸qĀlqؿ↖les\xf3₈i\xed٫Āen↣↭rtneqq;쀀≩︀\xc5↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽r\xf2ΠȀilmr⇐⇔⇗⇛rs\xf0ᒄf\xbb․il\xf4کĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it\xbb∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDas\xe8⇴rok;䄧Ābp⊂⊇ull;恃hen\xbbᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻\xed䃭ƀ;iyݱ⊰⊵rc耻\xee䃮;䐸Ācx⊼⊿y;䐵cl耻\xa1䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻\xec䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓in\xe5ގar\xf4ܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝do\xf4⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙er\xf3ᕣ\xe3⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻\xbf䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻\xef䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\0⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼r\xf2\xf2Εail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴ra\xeeࡌbda;䎻gƀ;dlࢎⓁⓃ;榑\xe5ࢎ;檅uo耻\xab䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝\xeb≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼\xecࢰ\xe2┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□a\xe9⓶arpoonĀdu▯▴own\xbbњp\xbb०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoon\xf3quigarro\xf7⇰hreetimes;拋ƀ;qs▋ও◺lan\xf4বʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋ppro\xf8Ⓠot;拖qĀgq♃♅\xf4উgt\xf2⒌\xf4ছi\xedলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖r\xf2◁orne\xf2ᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che\xbb⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox\xbb⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽r\xebࣁgƀlmr⛿✍✔eftĀar০✇ight\xe1৲apsto;柼ight\xe1৽parrowĀlr✥✩ef\xf4⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗\xe1ፎƀ;ef❗❘᠀旊nge\xbb❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇r\xf2ࢨorne\xf2ᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹re\xe5◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀\xc5⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻\xaf䂯Āet⡗⡙;時Ā;e⡞⡟朠se\xbb⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻ow\xeeҌef\xf4ए\xf0Ꮡker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle\xbbᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻\xb5䂵Ȁ;acdᑤ⢽⣀⣄s\xf4ᚧir;櫰ot肻\xb7Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛\xf2−\xf0ઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos\xbbᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la\xbb˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉ro\xf8urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xa0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸ui\xf6ୣĀei⩊⩎ar;椨\xedistĀ;sடr;쀀\uD835\uDD2BȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lan\xf4i\xed௪Ā;rஶ⪁\xbbஷƀAap⪊⪍⪑r\xf2⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹r\xf2⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro\xf7⫁ightarro\xf7⪐ƀ;qs⪺⫪lan\xf4ౕĀ;sౕ⫴\xbbశi\xedౝĀ;rవ⫾iĀ;eచథi\xe4ඐĀpt⬌⬑f;쀀\uD835\uDD5F膀\xac;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lle\xecl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳u\xe5ಥĀ;cಘ⭸Ā;eಒ⭽\xf1ಘȀAait⮈⮋⮝⮧r\xf2⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow\xbb⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉u\xe5;쀀\uD835\uDCC3ortɭ⬅\0\0⯖ar\xe1⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭\xe5\xe5ഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗ\xf1സȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇ\xecௗlde耻\xf1䃱\xe7ృiangleĀlrⱒⱜeftĀ;eచⱚ\xf1దightĀ;eೋⱥ\xf1Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻\xf3䃳ĀiyⴼⵅrĀ;cⵂ耻\xf4䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀\uD835\uDD2Cͯ\0\0\0ⶂn;䋛ave耻\xf2䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨr\xf2᪀Āirⶠr;榾oss;榻n\xe5๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨r\xf2᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f\xbbⷿ耻\xaa䂪耻\xba䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧\xf2⸁ash耻\xf8䃸l;折iŬⸯ⸴de耻\xf5䃵esĀ;aǛ⸺s;樶ml耻\xf6䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀\xb6;l䂶le\xecЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕ma\xf4੶ne;明ƀ;tv⺿⻀⻈䏀chfork\xbb´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎\xf6⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻\xb1ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻\xa3䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷u\xe5໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾ppro\xf8⽃urlye\xf1໙\xf1໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨i\xedໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺\xf0⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴\xefrel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⋢⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei々rnion\xf3ڰnt;樖stĀ;e【】䀿\xf1Ἑ\xf4༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがr\xf2Ⴓ\xf2ϝail;検ar\xf2ᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕i\xe3ᅮmptyv;榳gȀ;del࿑らるろ;榒;榥\xe5࿑uo耻\xbb䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞\xeb≝\xf0✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶al\xf3༞ƀabrョリヮr\xf2៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗\xec\xe2ヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜn\xe5Ⴛar\xf4ྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ\xbbѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭa\xe9トarpoonĀduㆻㆿow\xeeㅾp\xbb႒eftĀah㇊㇐rrow\xf3arpoon\xf3Ցightarrows;應quigarro\xf7ニhreetimes;拌g;䋚ingdotse\xf1ἲƀahm㈍㈐㈓r\xf2a\xf2Ց;怏oustĀ;a㈞掱che\xbbmid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾r\xebဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒ar\xf2㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠re\xe5ㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛qu\xef➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡u\xe5ᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓i\xedሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒\xeb∨Ā;oਸ਼t耻\xa7䂧i;䀻war;椩mĀin㍩\xf0nu\xf3\xf1t;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜i\xe4ᑤara\xec耻\xad䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲ar\xf2ᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetm\xe9㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it\xbb㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍\xf1ᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝\xf1ᆮƀ;afᅻ㒦ְrť㒫ֱ\xbbᅼar\xf2ᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tm\xee\xf1i\xec㐕ar\xe6ᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psilo\xeeỠh\xe9⺯s\xbb⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦ppro\xf8㋺urlye\xf1ᇾ\xf1ᇳƀaes㖂㖈㌛ppro\xf8㌚q\xf1㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻\xb9䂹耻\xb2䂲耻\xb3䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨\xeb∮Ā;oਫwar;椪lig耻\xdf䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄r\xebƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮ppro\xf8im\xbbኬs\xf0ኞĀas㚺㚮\xf0rn耻\xfe䃾Ǭ̟㛆⋧es膀\xd7;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀\xe1⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚\xe1㍢rime;怴ƀaip㜏㜒㝤d\xe5ቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own\xbbᶻeftĀ;e⠀㜾\xf1म;扜ightĀ;e㊪㝋\xf1ၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎x\xf4headĀlr㞗㞠eftarro\xf7ࡏightarrow\xbbཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶r\xf2ϭar;楣Ācr㟜㟢ute耻\xfa䃺\xf2ᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻\xfb䃻;䑃ƀabh㠃㠆㠋r\xf2Ꭽlac;䅱a\xf2ᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻\xf9䃹š㠧㠱rĀlr㠬㠮\xbbॗ\xbbႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r\xbb㡆op;挏ri;旸Āal㡖㡚cr;䅫肻\xa8͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠own\xe1ᎳarpoonĀlr㢈㢌ef\xf4㠭igh\xf4㠯iƀ;hl㢙㢚㢜䏅\xbbᏺon\xbb㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r\xbb㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨\xbb᠓Āam㣯㣲r\xf2㢨l耻\xfc䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠r\xf2ϷarĀ;v㤦㤧櫨;櫩as\xe8ϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖app\xe1␕othin\xe7ẖƀhir㓫⻈㥙op\xf4⾵Ā;hᎷ㥢\xefㆍĀiu㥩㥭gm\xe1㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟et\xe1㚜iangleĀlr㦪㦯eft\xbbथight\xbbၑy;䐲ash\xbbံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨa\xf2ᑩr;쀀\uD835\uDD33tr\xe9㦮suĀbp㧯㧱\xbbജ\xbb൙pf;쀀\uD835\uDD67ro\xf0tr\xe9㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖\xbb㥾nĀEe㦒㨞\xbb㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦at\xe8ᑹcr;쀀\uD835\uDCCCૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtr\xe9៑r;쀀\uD835\uDD35ĀAa㪔㪗r\xf2σr\xf2৶;䎾ĀAa㪡㪤r\xf2θr\xf2৫a\xf0✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69im\xe5ឲĀAa㫇㫊r\xf2ώr\xf2ਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜r\xe9។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻\xfd䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻\xa5䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻\xff䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡tr\xe6ᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),rp=new Uint16Array("Ȁaglq \x15\x18\x1bɭ\x0f\0\0\x12p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),rm=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),rg=null!=(v=String.fromCodePoint)?v:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};function ry(e){return e>=w.ZERO&&e<=w.NINE}(h=w||(w={}))[h.NUM=35]="NUM",h[h.SEMI=59]="SEMI",h[h.EQUALS=61]="EQUALS",h[h.ZERO=48]="ZERO",h[h.NINE=57]="NINE",h[h.LOWER_A=97]="LOWER_A",h[h.LOWER_F=102]="LOWER_F",h[h.LOWER_X=120]="LOWER_X",h[h.LOWER_Z=122]="LOWER_Z",h[h.UPPER_A=65]="UPPER_A",h[h.UPPER_F=70]="UPPER_F",h[h.UPPER_Z=90]="UPPER_Z",(c=k||(k={}))[c.VALUE_LENGTH=49152]="VALUE_LENGTH",c[c.BRANCH_LENGTH=16256]="BRANCH_LENGTH",c[c.JUMP_TABLE=127]="JUMP_TABLE",(f=D||(D={}))[f.EntityStart=0]="EntityStart",f[f.NumericStart=1]="NumericStart",f[f.NumericDecimal=2]="NumericDecimal",f[f.NumericHex=3]="NumericHex",f[f.NamedEntity=4]="NamedEntity",(d=x||(x={}))[d.Legacy=0]="Legacy",d[d.Strict=1]="Strict",d[d.Attribute=2]="Attribute";class rb{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=D.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=x.Strict}startEntity(e){this.decodeMode=e,this.state=D.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case D.EntityStart:if(e.charCodeAt(t)===w.NUM)return this.state=D.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=D.NamedEntity,this.stateNamedEntity(e,t);case D.NumericStart:return this.stateNumericStart(e,t);case D.NumericDecimal:return this.stateNumericDecimal(e,t);case D.NumericHex:return this.stateNumericHex(e,t);case D.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===w.LOWER_X?(this.state=D.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=D.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!ry(i)&&(!((r=i)>=w.UPPER_A)||!(r<=w.UPPER_F))&&(!(r>=w.LOWER_A)||!(r<=w.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!ry(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n,r,i;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===w.SEMI)this.consumed+=1;else if(this.decodeMode===x.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=rm.get(r))?i:r,this.consumed),this.errors&&(e!==w.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&k.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let s=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let i=(t&k.BRANCH_LENGTH)>>7,s=t&k.JUMP_TABLE;if(0===i)return 0!==s&&r===s?n:-1;if(s){let t=r-s;return t<0||t>=i?-1:e[n+t]-1}let o=n,l=o+i-1;for(;o<=l;){let t=o+l>>>1,n=e[t];if(n<r)o=t+1;else{if(!(n>r))return e[t+i];l=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return 0===this.result||this.decodeMode===x.Attribute&&(0===i||function(e){var t;return e===w.EQUALS||(t=e)>=w.UPPER_A&&t<=w.UPPER_Z||t>=w.LOWER_A&&t<=w.LOWER_Z||ry(t)}(s))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&k.VALUE_LENGTH)>>14)){if(s===w.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==x.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&k.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~k.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case D.NamedEntity:return 0!==this.result&&(this.decodeMode!==x.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case D.NumericDecimal:return this.emitNumericEntity(0,2);case D.NumericHex:return this.emitNumericEntity(0,3);case D.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case D.EntityStart:return 0}}}function rv(e){let t="",n=new rb(e,e=>t+=rg(e));return function(e,r){let i=0,s=0;for(;(s=e.indexOf("&",s))>=0;){t+=e.slice(i,s),n.startEntity(r);let o=n.write(e,s+1);if(o<0){i=s+n.end();break}i=s+o,s=0===o?i+1:i}let o=t+e.slice(i);return t="",o}}let rw=rv(rd);function rk(e,t=x.Legacy){return rw(e,t)}rv(rp);let rD=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function rx(e,t){return function(n){let r,i=0,s="";for(;r=e.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=t.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}function rA(e){return"[object String]"===Object.prototype.toString.call(e)}String.prototype.codePointAt,rx(/[&<>'"]/g,rD),rx(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),rx(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),(p=A||(A={}))[p.XML=0]="XML",p[p.HTML=1]="HTML",(m=C||(C={}))[m.UTF8=0]="UTF8",m[m.ASCII=1]="ASCII",m[m.Extensive=2]="Extensive",m[m.Attribute=3]="Attribute",m[m.Text=4]="Text";let rC=Object.prototype.hasOwnProperty;function rE(e,t){return rC.call(e,t)}function rS(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function r_(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function rO(e){return(!(e>=55296)||!(e<=57343))&&(!(e>=64976)||!(e<=65007))&&(65535&e)!=65535&&(65535&e)!=65534&&(!(e>=0)||!(e<=8))&&11!==e&&(!(e>=14)||!(e<=31))&&(!(e>=127)||!(e<=159))&&!(e>1114111)&&!0}function rF(e){return e>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}let rP=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,rT=RegExp(rP.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),rB=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function rM(e){return 0>e.indexOf("\\")?e:e.replace(rP,"$1")}function rI(e){return 0>e.indexOf("\\")&&0>e.indexOf("&")?e:e.replace(rT,function(e,t,n){if(t)return t;if(35===n.charCodeAt(0)&&rB.test(n)){let t="x"===n[1].toLowerCase()?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return rO(t)?rF(t):e}let r=rk(e);return r!==e?r:e})}let rN=/[&<>"]/,rL=/[&<>"]/g,r$={"&":"&","<":"<",">":">",'"':"""};function rR(e){return r$[e]}function rj(e){return rN.test(e)?e.replace(rL,rR):e}let rz=/[.?*+^$[\]\\(){}|-]/g;function rq(e){return e.replace(rz,"\\$&")}function rU(e){switch(e){case 9:case 32:return!0}return!1}function rV(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function rH(e){return rl.test(e)||ra.test(e)}function rW(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function rK(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}let rG={mdurl:E,ucmicro:S};function rJ(e,t,n){let r,i,s,o,l=e.posMax,a=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(s=e.src.charCodeAt(e.pos))&&0==--r){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===s){if(o===e.pos-1)r++;else if(n)return e.pos=a,-1}}let u=-1;return i&&(u=e.pos),e.pos=a,u}function rY(e,t,n){let r,i=t,s={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n&&10!==(r=e.charCodeAt(i))&&60!==r;){if(62===r){s.pos=i+1,s.str=rI(e.slice(t+1,i)),s.ok=!0;break}if(92===r&&i+1<n){i+=2;continue}i++}return s}let o=0;for(;i<n&&32!==(r=e.charCodeAt(i))&&!(r<32)&&127!==r;){if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2;continue}if(40===r&&++o>32)return s;if(41===r){if(0===o)break;o--}i++}return t===i||0!==o||(s.str=rI(e.slice(t,i)),s.pos=i,s.ok=!0),s}function rZ(e,t,n,r){let i,s=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(s>=n)return o;let r=e.charCodeAt(s);if(34!==r&&39!==r&&40!==r)return o;t++,s++,40===r&&(r=41),o.marker=r}for(;s<n;){if((i=e.charCodeAt(s))===o.marker)return o.pos=s+1,o.str+=rI(e.slice(t,s)),o.ok=!0,o;if(40===i&&41===o.marker)return o;92===i&&s+1<n&&s++,s++}return o.can_continue=!0,o.str+=rI(e.slice(t,s)),o}let rQ={};function rX(){this.rules=rS({},rQ)}function r0(){this.__rules__=[],this.__cache__=null}function r1(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function r2(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}rQ.code_inline=function(e,t,n,r,i){let s=e[t];return"<code"+i.renderAttrs(s)+">"+rj(s.content)+"</code>"},rQ.code_block=function(e,t,n,r,i){let s=e[t];return"<pre"+i.renderAttrs(s)+"><code>"+rj(e[t].content)+"</code></pre>\n"},rQ.fence=function(e,t,n,r,i){let s,o=e[t],l=o.info?rI(o.info).trim():"",a="",u="";if(l){let e=l.split(/(\s+)/g);a=e[0],u=e.slice(2).join("")}if(0===(s=n.highlight&&n.highlight(o.content,a,u)||rj(o.content)).indexOf("<pre"))return s+"\n";if(l){let e=o.attrIndex("class"),t=o.attrs?o.attrs.slice():[];return e<0?t.push(["class",n.langPrefix+a]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+a),`<pre><code${i.renderAttrs({attrs:t})}>${s}</code></pre>
|
|
31
|
+
`}return`<pre><code${i.renderAttrs(o)}>${s}</code></pre>
|
|
32
|
+
`},rQ.image=function(e,t,n,r,i){let s=e[t];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(e,t,n)},rQ.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},rQ.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},rQ.text=function(e,t){return rj(e[t].content)},rQ.html_block=function(e,t){return e[t].content},rQ.html_inline=function(e,t){return e[t].content},rX.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(t=0,r="",n=e.attrs.length;t<n;t++)r+=" "+rj(e.attrs[t][0])+'="'+rj(e.attrs[t][1])+'"';return r},rX.prototype.renderToken=function(e,t,n){let r=e[t],i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let s=!1;if(r.block&&(s=!0,1===r.nesting&&t+1<e.length)){let n=e[t+1];"inline"===n.type||n.hidden?s=!1:-1===n.nesting&&n.tag===r.tag&&(s=!1)}return i+(s?">\n":">")},rX.prototype.renderInline=function(e,t,n){let r="",i=this.rules;for(let s=0,o=e.length;s<o;s++){let o=e[s].type;void 0!==i[o]?r+=i[o](e,s,t,n,this):r+=this.renderToken(e,s,t)}return r},rX.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,s=e.length;i<s;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},rX.prototype.render=function(e,t,n){let r="",i=this.rules;for(let s=0,o=e.length;s<o;s++){let o=e[s].type;"inline"===o?r+=this.renderInline(e[s].children,t,n):void 0!==i[o]?r+=i[o](e,s,t,n,this):r+=this.renderToken(e,s,t,n)}return r},r0.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return -1},r0.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},r0.prototype.at=function(e,t,n){let r=this.__find__(e);if(-1===r)throw Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=(n||{}).alt||[],this.__cache__=null},r0.prototype.before=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},r0.prototype.after=function(e,t,n,r){let i=this.__find__(e);if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:(r||{}).alt||[]}),this.__cache__=null},r0.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},r0.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},r0.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},r0.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},r0.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r1.prototype.attrIndex=function(e){if(!this.attrs)return -1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return -1},r1.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},r1.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},r1.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},r1.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},r2.prototype.Token=r1;let r3=/\r\n?|\n/g,r6=/\0/g,r5=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r8=/\((c|tm|r)\)/i,r4=/\((c|tm|r)\)/ig,r9={c:"\xa9",r:"\xae",tm:"™"};function r7(e,t){return r9[t.toLowerCase()]}let ie=/['"]/,it=/['"]/g;function ir(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}let ii=[["normalize",function(e){let t;t=(t=e.src.replace(r3,"\n")).replace(r6,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){let t=e.tokens;if(e.md.options.linkify)for(let i=0,s=t.length;i<s;i++){if("inline"!==t[i].type||!e.md.linkify.pretest(t[i].content))continue;let s=t[i].children,o=0;for(let l=s.length-1;l>=0;l--){let a=s[l];if("link_close"===a.type){for(l--;s[l].level!==a.level&&"link_open"!==s[l].type;)l--;continue}if("html_inline"===a.type){var n,r;n=a.content,/^<a[>\s]/i.test(n)&&o>0&&o--,r=a.content,/^<\/a\s*>/i.test(r)&&o++}if(!(o>0)&&"text"===a.type&&e.md.linkify.test(a.content)){let n=a.content,r=e.md.linkify.match(n),o=[],u=a.level,h=0;r.length>0&&0===r[0].index&&l>0&&"text_special"===s[l-1].type&&(r=r.slice(1));for(let t=0;t<r.length;t++){let i=r[t].url,s=e.md.normalizeLink(i);if(!e.md.validateLink(s))continue;let l=r[t].text;l=r[t].schema?"mailto:"!==r[t].schema||/^mailto:/i.test(l)?e.md.normalizeLinkText(l):e.md.normalizeLinkText("mailto:"+l).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+l).replace(/^http:\/\//,"");let a=r[t].index;if(a>h){let t=new e.Token("text","",0);t.content=n.slice(h,a),t.level=u,o.push(t)}let c=new e.Token("link_open","a",1);c.attrs=[["href",s]],c.level=u++,c.markup="linkify",c.info="auto",o.push(c);let f=new e.Token("text","",0);f.content=l,f.level=u,o.push(f);let d=new e.Token("link_close","a",-1);d.level=--u,d.markup="linkify",d.info="auto",o.push(d),h=r[t].lastIndex}if(h<n.length){let t=new e.Token("text","",0);t.content=n.slice(h),t.level=u,o.push(t)}t[i].children=s=r_(s,l,o)}}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(r8.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"!==r.type||t||(r.content=r.content.replace(r4,r7)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children),r5.test(e.tokens[t].content)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];"text"===r.type&&!t&&r5.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&ie.test(e.tokens[t].content)&&function(e,t){let n,r=[];for(let i=0;i<e.length;i++){let s=e[i],o=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=o);n--);if(r.length=n+1,"text"!==s.type)continue;let l=s.content,a=0,u=l.length;o:for(;a<u;){it.lastIndex=a;let h=it.exec(l);if(!h)break;let c=!0,f=!0;a=h.index+1;let d="'"===h[0],p=32;if(h.index-1>=0)p=l.charCodeAt(h.index-1);else for(n=i-1;n>=0&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(a<u)m=l.charCodeAt(a);else for(n=i+1;n<e.length&&"softbreak"!==e[n].type&&"hardbreak"!==e[n].type;n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let g=rW(p)||rH(String.fromCharCode(p)),y=rW(m)||rH(String.fromCharCode(m)),b=rV(p),v=rV(m);if(v?c=!1:y&&!(b||g)&&(c=!1),b?f=!1:g&&!(v||y)&&(f=!1),34===m&&'"'===h[0]&&p>=48&&p<=57&&(f=c=!1),c&&f&&(c=g,f=y),!c&&!f){d&&(s.content=ir(s.content,h.index,"’"));continue}if(f)for(n=r.length-1;n>=0;n--){let c=r[n];if(r[n].level<o)break;if(c.single===d&&r[n].level===o){let o,f;c=r[n],d?(o=t.md.options.quotes[2],f=t.md.options.quotes[3]):(o=t.md.options.quotes[0],f=t.md.options.quotes[1]),s.content=ir(s.content,h.index,f),e[c.token].content=ir(e[c.token].content,c.pos,o),a+=f.length-1,c.token===i&&(a+=o.length-1),u=(l=s.content).length,r.length=n;continue o}}c?r.push({token:i,pos:h.index,single:d,level:o}):f&&d&&(s.content=ir(s.content,h.index,"’"))}}}(e.tokens[t].children,e)}],["text_join",function(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if("inline"!==r[e].type)continue;let i=r[e].children,s=i.length;for(t=0;t<s;t++)"text_special"===i[t].type&&(i[t].type="text");for(t=n=0;t<s;t++)"text"===i[t].type&&t+1<s&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}]];function is(){this.ruler=new r0;for(let e=0;e<ii.length;e++)this.ruler.push(ii[e][0],ii[e][1])}function io(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,s=i.length,o=!1;t<s;t++){let l=i.charCodeAt(t);if(!o)if(rU(l)){n++,9===l?r+=4-r%4:r++;continue}else o=!0;(10===l||t===s-1)&&(10!==l&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}function il(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function ia(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),s=!1,o=0,l="";for(;r<n;)124===i&&(s?(l+=e.substring(o,r-1),o=r):(t.push(l+e.substring(o,r)),l="",o=r+1)),s=92===i,r++,i=e.charCodeAt(r);return t.push(l+e.substring(o)),t}function iu(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return 42!==i&&45!==i&&43!==i||r<n&&!rU(e.src.charCodeAt(r))?-1:r}function ih(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return -1;let s=e.src.charCodeAt(i++);if(s<48||s>57)return -1;for(;;){if(i>=r)return -1;if((s=e.src.charCodeAt(i++))>=48&&s<=57){if(i-n>=10)return -1;continue}if(41===s||46===s)break;return -1}return i<r&&!rU(s=e.src.charCodeAt(i))?-1:i}is.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},is.prototype.State=r2,io.prototype.push=function(e,t,n){let r=new r1(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},io.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},io.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},io.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&rU(this.src.charCodeAt(e));e++);return e},io.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!rU(this.src.charCodeAt(--e)))return e+1;return e},io.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},io.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},io.prototype.getLines=function(e,t,n,r){if(e>=t)return"";let i=Array(t-e);for(let s=0,o=e;o<t;o++,s++){let e,l=0,a=this.bMarks[o],u=a;for(e=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];u<e&&l<n;){let e=this.src.charCodeAt(u);if(rU(e))9===e?l+=4-(l+this.bsCount[o])%4:l++;else if(u-a<this.tShift[o])l++;else break;u++}l>n?i[s]=Array(l-n+1).join(" ")+this.src.slice(u,e):i[s]=this.src.slice(u,e)}return i.join("")},io.prototype.Token=r1;let ic="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",id="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ip=RegExp("^(?:"+ic+"|"+id+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),im=RegExp("^(?:"+ic+"|"+id+")"),ig=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp("^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))","i"),/^$/,!0],[RegExp(im.source+"\\s*$"),/^$/,!1]],iy=[["table",function(e,t,n,r){let i;if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;let l=e.src.charCodeAt(o++);if(124!==l&&45!==l&&58!==l||o>=e.eMarks[s])return!1;let a=e.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a&&!rU(a)||45===l&&rU(a))return!1;for(;o<e.eMarks[s];){let t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!rU(t))return!1;o++}let u=il(e,t+1),h=u.split("|"),c=[];for(let e=0;e<h.length;e++){let t=h[e].trim();if(!t)if(0===e||e===h.length-1)continue;else return!1;if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?c.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?c.push("left"):c.push("")}if(-1===(u=il(e,t).trim()).indexOf("|")||e.sCount[t]-e.blkIndent>=4)return!1;(h=ia(u)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop();let f=h.length;if(0===f||f!==c.length)return!1;if(r)return!0;let d=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<h.length;t++){let n=e.push("th_open","th",1);c[t]&&(n.attrs=[["style","text-align:"+c[t]]]);let r=e.push("inline","",0);r.content=h[t].trim(),r.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let r=!1;for(let t=0,i=p.length;t<i;t++)if(p[t](e,s,n,!0)){r=!0;break}if(r||!(u=il(e,s).trim())||e.sCount[s]-e.blkIndent>=4||((h=ia(u)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),(y+=f-h.length)>65536))break;s===t+2&&(e.push("tbody_open","tbody",1).map=i=[t+2,0]),e.push("tr_open","tr",1).map=[s,s+1];for(let t=0;t<f;t++){let n=e.push("td_open","td",1);c[t]&&(n.attrs=[["style","text-align:"+c[t]]]);let r=e.push("inline","",0);r.content=h[t]?h[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return i&&(e.push("tbody_close","tbody",-1),i[1]=s),e.push("table_close","table",-1),g[1]=s,e.parentType=d,e.line=s,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){i=++r;continue}break}e.line=i;let s=e.push("code_block","code",0);return s.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}],["fence",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>s)return!1;let o=e.src.charCodeAt(i);if(126!==o&&96!==o)return!1;let l=i,a=(i=e.skipChars(i,o))-l;if(a<3)return!1;let u=e.src.slice(l,i),h=e.src.slice(i,s);if(96===o&&h.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let c=t,f=!1;for(;!(++c>=n)&&(!((i=l=e.bMarks[c]+e.tShift[c])<(s=e.eMarks[c]))||!(e.sCount[c]<e.blkIndent));){;if(!(e.src.charCodeAt(i)!==o||e.sCount[c]-e.blkIndent>=4||(i=e.skipChars(i,o))-l<a)&&!((i=e.skipSpaces(i))<s)){f=!0;break}}a=e.sCount[t],e.line=c+ +!!f;let d=e.push("fence","code",0);return d.info=h,d.content=e.getLines(t+1,c,a,!0),d.markup=u,d.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let i,s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],l=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||62!==e.src.charCodeAt(s))return!1;if(r)return!0;let a=[],u=[],h=[],c=[],f=e.md.block.ruler.getRules("blockquote"),d=e.parentType;e.parentType="blockquote";let p=!1;for(i=t;i<n;i++){let t=e.sCount[i]<e.blkIndent;if((s=e.bMarks[i]+e.tShift[i])>=(o=e.eMarks[i]))break;if(62===e.src.charCodeAt(s++)&&!t){let t,n,r=e.sCount[i]+1;32===e.src.charCodeAt(s)?(s++,r++,n=!1,t=!0):9===e.src.charCodeAt(s)?(t=!0,(e.bsCount[i]+r)%4==3?(s++,r++,n=!1):n=!0):t=!1;let l=r;for(a.push(e.bMarks[i]),e.bMarks[i]=s;s<o;){let t=e.src.charCodeAt(s);if(rU(t))9===t?l+=4-(l+e.bsCount[i]+ +!!n)%4:l++;else break;s++}p=s>=o,u.push(e.bsCount[i]),e.bsCount[i]=e.sCount[i]+1+ +!!t,h.push(e.sCount[i]),e.sCount[i]=l-r,c.push(e.tShift[i]),e.tShift[i]=s-e.bMarks[i];continue}if(p)break;let r=!1;for(let t=0,s=f.length;t<s;t++)if(f[t](e,i,n,!0)){r=!0;break}if(r){e.lineMax=i,0!==e.blkIndent&&(a.push(e.bMarks[i]),u.push(e.bsCount[i]),c.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]-=e.blkIndent);break}a.push(e.bMarks[i]),u.push(e.bsCount[i]),c.push(e.tShift[i]),h.push(e.sCount[i]),e.sCount[i]=-1}let m=e.blkIndent;e.blkIndent=0;let g=e.push("blockquote_open","blockquote",1);g.markup=">";let y=[t,0];g.map=y,e.md.block.tokenize(e,t,i),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=l,e.parentType=d,y[1]=e.line;for(let n=0;n<c.length;n++)e.bMarks[n+t]=a[n],e.tShift[n+t]=c[n],e.sCount[n+t]=h[n],e.bsCount[n+t]=u[n];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(s++);if(42!==o&&45!==o&&95!==o)return!1;let l=1;for(;s<i;){let t=e.src.charCodeAt(s++);if(t!==o&&!rU(t))return!1;t===o&&l++}if(l<3)return!1;if(r)return!0;e.line=t+1;let a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(l+1).join(String.fromCharCode(o)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let i,s,o,l,a,u,h,c=t,f=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let d=!1;if(r&&"paragraph"===e.parentType&&e.sCount[c]>=e.blkIndent&&(d=!0),(h=ih(e,c))>=0){if(a=!0,o=e.bMarks[c]+e.tShift[c],u=Number(e.src.slice(o,h-1)),d&&1!==u)return!1}else{if(!((h=iu(e,c))>=0))return!1;a=!1}if(d&&e.skipSpaces(h)>=e.eMarks[c])return!1;if(r)return!0;let p=e.src.charCodeAt(h-1),m=e.tokens.length;a?(l=e.push("ordered_list_open","ol",1),1!==u&&(l.attrs=[["start",u]])):l=e.push("bullet_list_open","ul",1);let g=[c,0];l.map=g,l.markup=String.fromCharCode(p);let y=!1,b=e.md.block.ruler.getRules("list"),v=e.parentType;for(e.parentType="list";c<n;){let t;s=h,i=e.eMarks[c];let r=e.sCount[c]+h-(e.bMarks[c]+e.tShift[c]),u=r;for(;s<i;){let t=e.src.charCodeAt(s);if(9===t)u+=4-(u+e.bsCount[c])%4;else if(32===t)u++;else break;s++}let d=s;(t=d>=i?1:u-r)>4&&(t=1);let m=r+t;(l=e.push("list_item_open","li",1)).markup=String.fromCharCode(p);let g=[c,0];l.map=g,a&&(l.info=e.src.slice(o,h-1));let v=e.tight,w=e.tShift[c],k=e.sCount[c],D=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[c]=d-e.bMarks[c],e.sCount[c]=u,d>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||y)&&(f=!1),y=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=D,e.tShift[c]=w,e.sCount[c]=k,e.tight=v,(l=e.push("list_item_close","li",-1)).markup=String.fromCharCode(p),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let x=!1;for(let t=0,r=b.length;t<r;t++)if(b[t](e,c,n,!0)){x=!0;break}if(x)break;if(a){if((h=ih(e,c))<0)break;o=e.bMarks[c]+e.tShift[c]}else if((h=iu(e,c))<0)break;if(p!==e.src.charCodeAt(h-1))break}return(l=a?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(p),g[1]=c,e.line=c,e.parentType=v,f&&function(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,m),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let i,s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],l=t+1;if(e.sCount[t]-e.blkIndent>=4||91!==e.src.charCodeAt(s))return!1;function a(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let s=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){s=!0;break}if(e.parentType=i,s)return null}let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];return e.src.slice(i,s+1)}let u=e.src.slice(s,o+1);o=u.length;let h=-1;for(s=1;s<o;s++){let e=u.charCodeAt(s);if(91===e)return!1;if(93===e){h=s;break}if(10===e){let e=a(l);null!==e&&(u+=e,o=u.length,l++)}else if(92===e&&++s<o&&10===u.charCodeAt(s)){let e=a(l);null!==e&&(u+=e,o=u.length,l++)}}if(h<0||58!==u.charCodeAt(h+1))return!1;for(s=h+2;s<o;s++){let e=u.charCodeAt(s);if(10===e){let e=a(l);null!==e&&(u+=e,o=u.length,l++)}else if(rU(e));else break}let c=e.md.helpers.parseLinkDestination(u,s,o);if(!c.ok)return!1;let f=e.md.normalizeLink(c.str);if(!e.md.validateLink(f))return!1;let d=s=c.pos,p=l,m=s;for(;s<o;s++){let e=u.charCodeAt(s);if(10===e){let e=a(l);null!==e&&(u+=e,o=u.length,l++)}else if(rU(e));else break}let g=e.md.helpers.parseLinkTitle(u,s,o);for(;g.can_continue;){let t=a(l);if(null===t)break;u+=t,s=o,o=u.length,l++,g=e.md.helpers.parseLinkTitle(u,s,o,g)}for(s<o&&m!==s&&g.ok?(i=g.str,s=g.pos):(i="",s=d,l=p);s<o&&rU(u.charCodeAt(s));)s++;if(s<o&&10!==u.charCodeAt(s)&&i)for(i="",s=d,l=p;s<o&&rU(u.charCodeAt(s));)s++;if(s<o&&10!==u.charCodeAt(s))return!1;let y=rK(u.slice(1,h));return!!y&&(!!r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[y]&&(e.env.references[y]={title:i,href:f}),e.line=l,!0))}],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||60!==e.src.charCodeAt(i))return!1;let o=e.src.slice(i,s),l=0;for(;l<ig.length&&!ig[l][0].test(o);l++);if(l===ig.length)return!1;if(r)return ig[l][2];let a=t+1;if(!ig[l][1].test(o)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(i=e.bMarks[a]+e.tShift[a],s=e.eMarks[a],o=e.src.slice(i,s),ig[l][1].test(o)){0!==o.length&&a++;break}}e.line=a;let u=e.push("html_block","",0);return u.map=[t,a],u.content=e.getLines(t,a,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(35!==o||i>=s)return!1;let l=1;for(o=e.src.charCodeAt(++i);35===o&&i<s&&l<=6;)l++,o=e.src.charCodeAt(++i);if(l>6||i<s&&!rU(o))return!1;if(r)return!0;s=e.skipSpacesBack(s,i);let a=e.skipCharsBack(s,35,i);a>i&&rU(e.src.charCodeAt(a-1))&&(s=a),e.line=t+1;let u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];let h=e.push("inline","",0);return h.content=e.src.slice(i,s).trim(),h.map=[t,e.line],h.children=[],e.push("heading_close","h"+String(l),-1).markup="########".slice(0,l),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){let r,i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let o=0,l=t+1;for(;l<n&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3)continue;if(e.sCount[l]>=e.blkIndent){let t=e.bMarks[l]+e.tShift[l],n=e.eMarks[l];if(t<n&&(45===(r=e.src.charCodeAt(t))||61===r)&&(t=e.skipChars(t,r),(t=e.skipSpaces(t))>=n)){o=61===r?1:2;break}}if(e.sCount[l]<0)continue;let t=!1;for(let r=0,s=i.length;r<s;r++)if(i[r](e,l,n,!0)){t=!0;break}if(t)break}if(!o)return!1;let a=e.getLines(t,l,e.blkIndent,!1).trim();e.line=l+1;let u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(r),u.map=[t,e.line];let h=e.push("inline","",0);return h.content=a,h.map=[t,e.line-1],h.children=[],e.push("heading_close","h"+String(o),-1).markup=String.fromCharCode(r),e.parentType=s,!0}],["paragraph",function(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),i=e.parentType,s=t+1;for(e.parentType="paragraph";s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}let o=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s,e.push("paragraph_open","p",1).map=[t,e.line];let l=e.push("inline","",0);return l.content=o,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function ib(){this.ruler=new r0;for(let e=0;e<iy.length;e++)this.ruler.push(iy[e][0],iy[e][1],{alt:(iy[e][2]||[]).slice()})}function iv(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}ib.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),i=r.length,s=e.md.options.maxNesting,o=t,l=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n)&&!(e.sCount[o]<e.blkIndent));){if(e.level>=s){e.line=n;break}let t=e.line,a=!1;for(let s=0;s<i;s++)if(a=r[s](e,o,n,!1)){if(t>=e.line)throw Error("block rule didn't increment state.line");break}if(!a)throw Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),(o=e.line)<n&&e.isEmpty(o)&&(l=!0,e.line=++o)}},ib.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},ib.prototype.State=io,iv.prototype.pushPending=function(){let e=new r1("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},iv.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new r1(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},iv.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,s=e;for(;s<n&&this.src.charCodeAt(s)===r;)s++;let o=s-e,l=s<n?this.src.charCodeAt(s):32,a=rW(i)||rH(String.fromCharCode(i)),u=rW(l)||rH(String.fromCharCode(l)),h=rV(i),c=rV(l),f=!c&&(!u||h||a),d=!h&&(!a||c||u);return{can_open:f&&(t||!d||a),can_close:d&&(t||!f||u),length:o}},iv.prototype.Token=r1;let iw=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,ik=[];for(let e=0;e<256;e++)ik.push(0);function iD(e,t){let n,r=[],i=t.length;for(let s=0;s<i;s++){let i=t[s];if(126!==i.marker||-1===i.end)continue;let o=t[i.end];(n=e.tokens[i.token]).type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",(n=e.tokens[o.token]).type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;t!==--i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ik[e.charCodeAt(0)]=1});function ix(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(95!==n.marker&&42!==n.marker||-1===n.end)continue;let i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),l=e.tokens[n.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?o+o:o,l.content="";let a=e.tokens[i.token];a.type=s?"strong_close":"em_close",a.tag=s?"strong":"em",a.nesting=-1,a.markup=s?o+o:o,a.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}let iA=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,iC=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,iE=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,iS=/^&([a-z][a-z0-9]{1,31});/i;function i_(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,s=[];for(let o=0;o<n;o++){let n=e[o];if(s.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[n.marker][3*!!n.open+n.length%3],a=r-s[r]-1,u=a;for(;a>l;a-=s[a]+1){let t=e[a];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=a>0&&!e[a-1].open?s[a-1]+1:0;s[o]=o-a+r,s[a]=r,n.open=!1,t.end=o,t.close=!1,u=-1,i=-2;break}}}-1!==u&&(t[n.marker][3*!!n.open+(n.length||0)%3]=u)}}let iO=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!function(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos;if(n+3>e.posMax||58!==e.src.charCodeAt(n)||47!==e.src.charCodeAt(n+1)||47!==e.src.charCodeAt(n+2))return!1;let r=e.pending.match(iw);if(!r)return!1;let i=r[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;let l=o.length;for(;l>0&&42===o.charCodeAt(l-1);)l--;l!==o.length&&(o=o.slice(0,l));let a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);let t=e.push("link_open","a",1);t.attrs=[["href",a]],t.markup="linkify",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);let n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=o.length-i.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&rU(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos,r=e.posMax;if(92!==e.src.charCodeAt(n)||++n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&rU(i=e.src.charCodeAt(n));)n++;return e.pos=n,!0}let s=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(s+=e.src[n+1],n++)}let o="\\"+s;if(!t){let t=e.push("text_special","",0);i<256&&0!==ik[i]?t.content=s:t.content=o,t.markup=o,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n,r=e.pos;if(96!==e.src.charCodeAt(r))return!1;let i=r;r++;let s=e.posMax;for(;r<s&&96===e.src.charCodeAt(r);)r++;let o=e.src.slice(i,r),l=o.length;if(e.backticksScanned&&(e.backticks[l]||0)<=i)return t||(e.pending+=o),e.pos+=l,!0;let a=r;for(;-1!==(n=e.src.indexOf("`",a));){for(a=n+1;a<s&&96===e.src.charCodeAt(a);)a++;let i=a-n;if(i===l){if(!t){let t=e.push("code_inline","code",0);t.markup=o,t.content=e.src.slice(r,n).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[i]=n}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=l,!0}],["strikethrough",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||126!==r)return!1;let i=e.scanDelims(e.pos,!0),s=i.length,o=String.fromCharCode(r);if(s<2)return!1;s%2&&(e.push("text","",0).content=o,s--);for(let t=0;t<s;t+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["emphasis",function(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||95!==r&&42!==r)return!1;let i=e.scanDelims(e.pos,42===r);for(let t=0;t<i.length;t++)e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}],["link",function(e,t){let n,r,i,s,o="",l="",a=e.pos,u=!0;if(91!==e.src.charCodeAt(e.pos))return!1;let h=e.pos,c=e.posMax,f=e.pos+1,d=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(d<0)return!1;let p=d+1;if(p<c&&40===e.src.charCodeAt(p)){for(u=!1,p++;p<c&&(rU(n=e.src.charCodeAt(p))||10===n);p++);if(p>=c)return!1;if(a=p,(i=e.md.helpers.parseLinkDestination(e.src,p,e.posMax)).ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?p=i.pos:o="",a=p;p<c&&(rU(n=e.src.charCodeAt(p))||10===n);p++);if(i=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&a!==p&&i.ok)for(l=i.str,p=i.pos;p<c&&(rU(n=e.src.charCodeAt(p))||10===n);p++);}(p>=c||41!==e.src.charCodeAt(p))&&(u=!0),p++}if(u){if(void 0===e.env.references)return!1;if(p<c&&91===e.src.charCodeAt(p)?(a=p+1,(p=e.md.helpers.parseLinkLabel(e,p))>=0?r=e.src.slice(a,p++):p=d+1):p=d+1,r||(r=e.src.slice(f,d)),!(s=e.env.references[rK(r)]))return e.pos=h,!1;o=s.href,l=s.title}if(!t){e.pos=f,e.posMax=d;let t=e.push("link_open","a",1),n=[["href",o]];t.attrs=n,l&&n.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}],["image",function(e,t){let n,r,i,s,o,l,a,u,h="",c=e.pos,f=e.posMax;if(33!==e.src.charCodeAt(e.pos)||91!==e.src.charCodeAt(e.pos+1))return!1;let d=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if((s=p+1)<f&&40===e.src.charCodeAt(s)){for(s++;s<f&&(rU(n=e.src.charCodeAt(s))||10===n);s++);if(s>=f)return!1;for(u=s,(l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok&&(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?s=l.pos:h=""),u=s;s<f&&(rU(n=e.src.charCodeAt(s))||10===n);s++);if(l=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<f&&u!==s&&l.ok)for(a=l.str,s=l.pos;s<f&&(rU(n=e.src.charCodeAt(s))||10===n);s++);else a="";if(s>=f||41!==e.src.charCodeAt(s))return e.pos=c,!1;s++}else{if(void 0===e.env.references)return!1;if(s<f&&91===e.src.charCodeAt(s)?(u=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?i=e.src.slice(u,s++):s=p+1):s=p+1,i||(i=e.src.slice(d,p)),!(o=e.env.references[rK(i)]))return e.pos=c,!1;h=o.href,a=o.title}if(!t){r=e.src.slice(d,p);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push("image","img",0),i=[["src",h],["alt",""]];n.attrs=i,n.children=t,n.content=r,a&&i.push(["title",a])}return e.pos=s,e.posMax=f,!0}],["autolink",function(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}let s=e.src.slice(r+1,n);if(iC.test(s)){let n=e.md.normalizeLink(s);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=s.length+2,!0}if(iA.test(s)){let n=e.md.normalizeLink("mailto:"+s);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(s);let r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=s.length+2,!0}return!1}],["html_inline",function(e,t){let n;if(!e.md.options.html)return!1;let r=e.posMax,i=e.pos;if(60!==e.src.charCodeAt(i)||i+2>=r)return!1;let s=e.src.charCodeAt(i+1);if(33!==s&&63!==s&&47!==s&&(!((n=32|s)>=97)||!(n<=122)))return!1;let o=e.src.slice(i).match(ip);if(!o)return!1;if(!t){var l,a;let t=e.push("html_inline","",0);t.content=o[0],l=t.content,/^<a[>\s]/i.test(l)&&e.linkLevel++,a=t.content,/^<\/a\s*>/i.test(a)&&e.linkLevel--}return e.pos+=o[0].length,!0}],["entity",function(e,t){let n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n)||n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){let r=e.src.slice(n).match(iE);if(r){if(!t){let t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=rO(t)?rF(t):rF(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(iS);if(r){let n=rk(r[0]);if(n!==r[0]){if(!t){let t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],iF=[["balance_pairs",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;i_(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&i_(t[e].delimiters)}],["strikethrough",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;iD(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&iD(e,t[r].delimiters)}],["emphasis",function(e){let t=e.tokens_meta,n=e.tokens_meta.length;ix(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ix(e,t[r].delimiters)}],["fragments_join",function(e){let t,n,r=0,i=e.tokens,s=e.tokens.length;for(t=n=0;t<s;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<s&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function iP(){this.ruler=new r0;for(let e=0;e<iO.length;e++)this.ruler.push(iO[e][0],iO[e][1]);this.ruler2=new r0;for(let e=0;e<iF.length;e++)this.ruler2.push(iF[e][0],iF[e][1])}function iT(e){let t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function iB(e){return Object.prototype.toString.call(e)}function iM(e){return"[object Function]"===iB(e)}function iI(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}iP.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,s=e.cache;if(void 0!==s[t]){e.pos=s[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;!o&&e.pos++,s[t]=e.pos},iP.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let s=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1)){if(s>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},iP.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let s=this.ruler2.getRules(""),o=s.length;for(let e=0;e<o;e++)s[e](i)},iP.prototype.State=iv;let iN={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},iL={"http:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.http||(n.re.http=RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r))?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return(n.re.no_http||(n.re.no_http=RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r))?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return(n.re.mailto||(n.re.mailto=RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r))?r.match(n.re.mailto)[0].length:0}}},i$="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function iR(){return function(e,t){t.normalize(e)}}function ij(e){var t;let n,r,i=(t=e.__opts__,t=t||{},(n={}).src_Any=ru.source,n.src_Cc=rh.source,n.src_Z=rf.source,n.src_P=rl.source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|"),n.src_pseudo_letter="(?:(?!"+(r="[><|]")+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+r+"|"+n.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+n.src_ZCc+"|$)|;(?!"+n.src_ZCc+"|$)|\\!+(?!"+n.src_ZCc+"|[!]|$)|\\?(?!"+n.src_ZCc+"|[?]|$))+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",e.re=n),s=e.__tlds__.slice();function o(e){return e.replace("%TLDS%",i.src_tlds)}e.onCompile(),e.__tlds_replaced__||s.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),s.push(i.src_xn),i.src_tlds=s.join("|"),i.email_fuzzy=RegExp(o(i.tpl_email_fuzzy),"i"),i.link_fuzzy=RegExp(o(i.tpl_link_fuzzy),"i"),i.link_no_ip_fuzzy=RegExp(o(i.tpl_link_no_ip_fuzzy),"i"),i.host_fuzzy_test=RegExp(o(i.tpl_host_fuzzy_test),"i");let l=[];function a(e,t){throw Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(null===n)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===iB(n)){if("[object RegExp]"===iB(n.validate)){var i;i=n.validate,r.validate=function(e,t){let n=e.slice(t);return i.test(n)?n.match(i)[0].length:0}}else iM(n.validate)?r.validate=n.validate:a(t,n);iM(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=iR();return}"[object String]"===iB(n)?l.push(t):a(t,n)}),l.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:iR()};let u=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(iI).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+i.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+i.src_ZPCc+"))("+u+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),e.__index__=-1,e.__text_cache__=""}function iz(e,t){let n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function iq(e,t){let n=new iz(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function iU(e,t){if(!(this instanceof iU))return new iU(e,t);!t&&Object.keys(e||{}).reduce(function(e,t){return e||iN.hasOwnProperty(t)},!1)&&(t=e,e={}),this.__opts__=iT({},iN,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=iT({},iL,e),this.__compiled__={},this.__tlds__=i$,this.__tlds_replaced__=!1,this.re={},ij(this)}iU.prototype.add=function(e,t){return this.__schemas__[e]=t,ij(this),this},iU.prototype.set=function(e){return this.__opts__=iT(this.__opts__,e),this},iU.prototype.test=function(e){let t,n,r,i,s,o,l,a;if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;if(this.re.schema_test.test(e)){for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(a=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||a<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(s=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o)),this.__index__>=0},iU.prototype.pretest=function(e){return this.re.pretest.test(e)},iU.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},iU.prototype.match=function(e){let t=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(iq(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(iq(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},iU.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,iq(this,0)):null},iU.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],t)?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),ij(this),this},iU.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},iU.prototype.onCompile=function(){};let iV=/^xn--/,iH=/[^\0-\x7F]/,iW=/[\x2E\u3002\uFF0E\uFF61]/g,iK={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},iG=Math.floor,iJ=String.fromCharCode;function iY(e){throw RangeError(iK[e])}function iZ(e,t){let n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+(function(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n})((e=e.replace(iW,".")).split("."),t).join(".")}let iQ=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},iX=function(e,t,n){let r=0;for(e=n?iG(e/700):e>>1,e+=iG(e/t);e>455;r+=36)e=iG(e/35);return iG(r+36*e/(e+38))},i0=function(e){let t=[],n=e.length,r=0,i=128,s=72,o=e.lastIndexOf("-");o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&iY("not-basic"),t.push(e.charCodeAt(n));for(let a=o>0?o+1:0;a<n;){let o=r;for(let t=1,i=36;;i+=36){var l;a>=n&&iY("invalid-input");let o=(l=e.charCodeAt(a++))>=48&&l<58?26+(l-48):l>=65&&l<91?l-65:l>=97&&l<123?l-97:36;o>=36&&iY("invalid-input"),o>iG((0x7fffffff-r)/t)&&iY("overflow"),r+=o*t;let u=i<=s?1:i>=s+26?26:i-s;if(o<u)break;let h=36-u;t>iG(0x7fffffff/h)&&iY("overflow"),t*=h}let u=t.length+1;s=iX(r-o,u,0==o),iG(r/u)>0x7fffffff-i&&iY("overflow"),i+=iG(r/u),r%=u,t.splice(r++,0,i)}return String.fromCodePoint(...t)},i1=function(e){let t=[],n=(e=function(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(64512&r)==56320?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,r=128,i=0,s=72;for(let n of e)n<128&&t.push(iJ(n));let o=t.length,l=o;for(o&&t.push("-");l<n;){let n=0x7fffffff;for(let t of e)t>=r&&t<n&&(n=t);let a=l+1;for(let u of(n-r>iG((0x7fffffff-i)/a)&&iY("overflow"),i+=(n-r)*a,r=n,e))if(u<r&&++i>0x7fffffff&&iY("overflow"),u===r){let e=i;for(let n=36;;n+=36){let r=n<=s?1:n>=s+26?26:n-s;if(e<r)break;let i=e-r,o=36-r;t.push(iJ(iQ(r+i%o,0))),e=iG(i/o)}t.push(iJ(iQ(e,0))),s=iX(i,a,l===o),i=0,++l}++i,++r}return t.join("")},i2={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},i3=/^(vbscript|javascript|file|data):/,i6=/^data:image\/(gif|png|jpeg|webp);/;function i5(e){let t=e.trim().toLowerCase();return!i3.test(t)||i6.test(t)}let i8=["http:","https:","mailto:"];function i4(e){let t=ro(e,!0);if(t.hostname&&(!t.protocol||i8.indexOf(t.protocol)>=0))try{var n;n=t.hostname,t.hostname=iZ(n,function(e){return iH.test(e)?"xn--"+i1(e):e})}catch(e){}return n6(n5(t))}function i9(e){let t=ro(e,!0);if(t.hostname&&(!t.protocol||i8.indexOf(t.protocol)>=0))try{var n;n=t.hostname,t.hostname=iZ(n,function(e){return iV.test(e)?i0(e.slice(4).toLowerCase()):e})}catch(e){}return n1(n5(t),n1.defaultChars+"%")}function i7(e,t){if(!(this instanceof i7))return new i7(e,t);t||rA(e)||(t=e||{},e="default"),this.inline=new iP,this.block=new ib,this.core=new is,this.renderer=new rX,this.linkify=new iU,this.validateLink=i5,this.normalizeLink=i4,this.normalizeLinkText=i9,this.utils=_,this.helpers=rS({},O),this.options={},this.configure(e),t&&this.set(t)}i7.prototype.set=function(e){return rS(this.options,e),this},i7.prototype.configure=function(e){let t=this;if(rA(e)){let t=e;if(!(e=i2[t]))throw Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},i7.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},i7.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return 0>n.indexOf(e)});if(r.length&&!t)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},i7.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},i7.prototype.parse=function(e,t){if("string"!=typeof e)throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},i7.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},i7.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},i7.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};class se extends Error{constructor(e){super(e),this.name="ShikiError"}}class st extends Error{constructor(e){super(e),this.name="ShikiError"}}function sn(){return"u">typeof performance?performance.now():Date.now()}let sr=(e,t)=>e+(t-e%t)%t;async function si(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let s="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&s)return s.decode(e.subarray(t,i));let o="";for(;t<i;){let n=e[t++];if(!(128&n)){o+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){o+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)o+=String.fromCharCode(n);else{let e=n-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(r.HEAPU8,e,t):""}let l={emscripten_get_now:sn,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let s=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let o=s*(1+.2/r);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,sr(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function a(){let n=await e({env:l,wasi_snapshot_preview1:l});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=o}return await a(),r}var ss=Object.defineProperty,so=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?ss(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};let sl=null;class sa{constructor(e){so(this,"utf16Length"),so(this,"utf8Length"),so(this,"utf16Value"),so(this,"utf8Value"),so(this,"utf16OffsetToUtf8"),so(this,"utf8OffsetToUtf16");const t=e.length,n=sa._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const s=r?new Uint32Array(n+1):null;r&&(s[n]=t);const o=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const a=e.charCodeAt(n);let u=a,h=!1;if(a>=55296&&a<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(u=(a-55296<<10)+65536|t-56320,h=!0)}r&&(i[n]=l,h&&(i[n+1]=l),u<=127?s[l+0]=n:u<=2047?(s[l+0]=n,s[l+1]=n):u<=65535?(s[l+0]=n,s[l+1]=n,s[l+2]=n):(s[l+0]=n,s[l+1]=n,s[l+2]=n,s[l+3]=n)),u<=127?o[l++]=u:(u<=2047?o[l++]=192|(1984&u)>>>6:(u<=65535?o[l++]=224|(61440&u)>>>12:(o[l++]=240|(1835008&u)>>>18,o[l++]=128|(258048&u)>>>12),o[l++]=128|(4032&u)>>>6),o[l++]=128|(63&u)>>>0),h&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),s=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(s=(i-55296<<10)+65536|t-56320,o=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let su=class{constructor(e){if(so(this,"id",++su.LAST_ID),so(this,"_onigBinding"),so(this,"content"),so(this,"utf16Length"),so(this,"utf8Length"),so(this,"utf16OffsetToUtf8"),so(this,"utf8OffsetToUtf16"),so(this,"ptr"),!sl)throw new st("Must invoke loadWasm first.");this._onigBinding=sl,this.content=e;const t=new sa(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!su._sharedPtrInUse?(su._sharedPtr||(su._sharedPtr=sl.omalloc(1e4)),su._sharedPtrInUse=!0,sl.HEAPU8.set(t.utf8Value,su._sharedPtr),this.ptr=su._sharedPtr):this.ptr=t.createString(sl)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===su._sharedPtr?su._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};so(su,"LAST_ID",0),so(su,"_sharedPtr",0),so(su,"_sharedPtrInUse",!1);class sh{constructor(e){if(so(this,"_onigBinding"),so(this,"_ptr"),!sl)throw new st("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new sa(e[r]);t[r]=i.createString(sl),n[r]=i.utf8Length}const r=sl.omalloc(4*e.length);sl.HEAPU32.set(t,r/4);const i=sl.omalloc(4*e.length);sl.HEAPU32.set(n,i/4);const s=sl.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)sl.ofree(t[n]);sl.ofree(i),sl.ofree(r),0===s&&function(e){throw new st(e.UTF8ToString(e.getLastOnigError()))}(sl),this._onigBinding=sl,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new su(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===s)return null;let o=i.HEAPU32,l=s/4,a=o[l++],u=o[l++],h=[];for(let t=0;t<u;t++){let n=e.convertUtf8OffsetToUtf16(o[l++]),r=e.convertUtf8OffsetToUtf16(o[l++]);h[t]={start:n,end:r,length:r-n}}return{index:a,captureIndices:h}}}function sc(e){return t=>WebAssembly.instantiate(e,t)}async function sf(e){return e&&await (i||(i=async function(){sl=await si(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,s,o;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (s=n,e=>WebAssembly.instantiateStreaming(s,e))(t):await (o=n,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"u">typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||"u">typeof Buffer&&Buffer.isBuffer?.(i)||"u">typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"u">typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await sc(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await sc(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())),{createScanner:e=>new sh(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new su(e)}}function sd(e,t=3){}function sp(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var sm=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,sg=class{static hasCaptures(e){return null!==e&&(sm.lastIndex=0,sm.test(e))}static replaceCaptures(e,t,n){return e.replace(sm,(e,r,i,s)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(s){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function sy(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,s;let n=(i=e[r],i<(s=t[r])?-1:+(i>s));if(0!==n)return n}return 0}return n-r}function sb(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function sv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var sw=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},sk=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let l=null;"string"==typeof s.settings.foreground&&sb(s.settings.foreground)&&(l=s.settings.foreground);let a=null;"string"==typeof s.settings.background&&sb(s.settings.background)&&(a=s.settings.background);for(let t=0,s=i.length;t<s;t++){let s=i[t].trim().split(" "),u=s[s.length-1],h=null;s.length>1&&(h=s.slice(0,s.length-1)).reverse(),n[r++]=new sA(u,h,e,o,l,a)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=sy(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let s=new sE(t),o=new sx(n,s.getId(r),s.getId(i)),l=new sO(new s_(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];l.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new sk(s,o,l)}(e,t)}_cachedMatchRoot=new sw(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let s=t[i],o=!1;if(">"===s){if(i===t.length-1)return!1;s=t[++i],o=!0}for(;e&&(n=e.scopeName,!((r=s)===n||n.startsWith(r)&&"."===n[r.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new sx(n.fontStyle,n.foreground,n.background):null}},sD=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},sx=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},sA=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},sC=((g=sC||{})[g.NotSet=-1]="NotSet",g[g.None=0]="None",g[g.Italic=1]="Italic",g[g.Bold=2]="Bold",g[g.Underline=4]="Underline",g[g.Strikethrough=8]="Strikethrough",g),sE=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},sS=Object.freeze([]),s_=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||sS,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},sO=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,s,o){let l,a,u;if(""===n)return void this._doInsertHere(t,r,i,s,o);let h=n.indexOf(".");-1===h?(l=n,a=""):(l=n.substring(0,h),a=n.substring(h+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new e(this._mainRule.clone(),s_.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,a,r,i,s,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===sy(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new s_(e,t,n,r,i))}},sF=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,s,o,l){let a=e.getLanguageId(t),u=e.getTokenType(t),h=+!!e.containsBalancedBrackets(t),c=e.getFontStyle(t),f=e.getForeground(t),d=e.getBackground(t);return 0!==n&&(a=n),8!==r&&(u=r),null!==i&&(h=+!!i),-1!==s&&(c=s),0!==o&&(f=o),0!==l&&(d=l),(a|u<<8|h<<10|c<<11|f<<15|d<<24)>>>0}};function sP(e,t){var n;let r,i,s=[],o=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),l=o.next();for(;null!==l;){let e=0;if(2===l.length&&":"===l.charAt(1)){switch(l.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${l} in scope selector`)}l=o.next()}let t=u();if(s.push({matcher:t,priority:e}),","!==l)break;l=o.next()}return s;function a(){if("-"===l){l=o.next();let e=a();return t=>!!e&&!e(t)}if("("===l){l=o.next();let e=function(){let e=[],t=u();for(;t&&(e.push(t),"|"===l||","===l);){do l=o.next();while("|"===l||","===l);t=u()}return t=>e.some(e=>e(t))}();return")"===l&&(l=o.next()),e}if(sT(l)){let e=[];do e.push(l),l=o.next();while(sT(l));return n=>t(e,n)}return null}function u(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}}function sT(e){return!!e&&!!e.match(/[\w\.:]+/)}function sB(e){"function"==typeof e.dispose&&e.dispose()}var sM=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},sI=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},sN=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},sL=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new sM(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new sN;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof sM?sR({baseGrammar:s,selfGrammar:i},r):s$(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new sM(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof sM){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function s$(e,t,n){t.repository&&t.repository[e]&&sj([t.repository[e]],t,n)}function sR(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&sj(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&sj(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function sj(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?sp({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&sj(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let s=sW(i);switch(s.kind){case 0:sR({...t,selfGrammar:t.baseGrammar},n);break;case 1:sR(t,n);break;case 2:s$(s.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===s.kind?s$(s.ruleName,r,n):sR(r,n)}else 4===s.kind?n.add(new sI(s.scopeName,s.ruleName)):n.add(new sM(s.scopeName))}}}var sz=class{kind=0},sq=class{kind=1},sU=class{constructor(e){this.ruleName=e}kind=2},sV=class{constructor(e){this.scopeName=e}kind=3},sH=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function sW(e){if("$base"===e)return new sz;if("$self"===e)return new sq;let t=e.indexOf("#");return -1===t?new sV(e):0===t?new sU(e.substring(1)):new sH(e.substring(0,t),e.substring(t+1))}var sK=/\\(\d+)/,sG=/\\(\d+)/g;Symbol("RuleId");var sJ=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=sg.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=sg.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?sg.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?sg.replaceCaptures(this._contentName,e,t):this._contentName}},sY=class extends sJ{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},sZ=class extends sJ{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new s2(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new s3,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sQ=class extends sJ{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new s3,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sX=class extends sJ{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,l,a,u){super(e,t,n,r),this._begin=new s2(i,this.id),this.beginCaptures=s,this._end=new s2(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new s3,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},s0=class extends sJ{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,l,a){super(e,t,n,r),this._begin=new s2(i,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new s2(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new s3,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new s3,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},s1=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new sY(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new sZ(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=sp({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new sQ(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new s0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new sX(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>s&&(s=t)}for(let e=0;e<=s;e++)i[e]=null;for(let s in t){if("$vscodeTextmateLocation"===s)continue;let o=parseInt(s,10),l=0;t[s].patterns&&(l=e.getCompiledRuleId(t[s],n,r)),i[o]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;s<o;s++){let o=t[s],l=-1;if(o.include){let t=sW(o.include);switch(t.kind){case 0:case 1:l=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(l=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let s=t.scopeName,a=4===t.kind?t.ruleName:null,u=n.getExternalGrammar(s,r);if(u)if(a){let t=u.repository[a];t&&(l=e.getCompiledRuleId(t,n,u.repository))}else l=e.getCompiledRuleId(u.repository.$self,n,u.repository)}}else l=e.getCompiledRuleId(o,n,r);if(-1!==l){let e=n.getRule(l),t=!1;if((e instanceof sQ||e instanceof sX||e instanceof s0)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},s2=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let s=0;s<t;s++)if("\\"===e.charAt(s)&&s+1<t){const t=e.charAt(s+1);"z"===t?(r.push(e.substring(n,s)),r.push("$(?!\\n)(?<!\\n)"),n=s+2):("A"===t||"G"===t)&&(i=!0),s++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=sK.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return sG.lastIndex=0,this.source.replace(sG,(e,t)=>sv(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],s=[],o=[],l=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,s[e]=n,o[e]=n,l[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="",s[e+1]="",o[e+1]="A",l[e+1]="A"):"G"===r?(i[e+1]="",s[e+1]="G",o[e+1]="",l[e+1]="G"):(i[e+1]=r,s[e+1]=r,o[e+1]=r,l[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:l.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},s3=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new s6(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new s6(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},s6=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},s5=class{constructor(e,t){this.languageId=e,this.tokenType=t}},s8=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new s5(e,8),this._embeddedLanguagesMatcher=new s4(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new s5(0,0);_getBasicScopeAttributes=new sw(e=>new s5(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},s4=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>sv(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};"u">typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var s9=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function s7(e,t,n,r,i,s,o,l){let a=t.content.length,u=!1,h=-1;if(o){let o=function(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1,l=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof s0&&l.push({rule:n,stack:t})}for(let d=l.pop();d;d=l.pop()){var a,u,h,c,f;let{ruleScanner:l,findOptions:p}=(a=d.rule,u=e,h=d.stack.endRule,c=n,f=r===o,{ruleScanner:a.compileWhileAG(u,h,c,f),findOptions:0}),m=l.findNextMatchSync(t,r,p);if(m){if(-2!==m.ruleId){i=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(s.produce(d.stack,m.captureIndices[0].start),ot(e,t,n,d.stack,s,d.rule.whileCaptures,m.captureIndices),s.produce(d.stack,m.captureIndices[0].end),o=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{i=d.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}(e,t,n,r,i,s);i=o.stack,r=o.linePos,n=o.isFirstLine,h=o.anchorPosition}let c=Date.now();for(;!u;){if(0!==l&&Date.now()-c>l)return new s9(i,!0);!function(){let o=function(e,t,n,r,i,s){let o=function(e,t,n,r,i,s){let{ruleScanner:o,findOptions:l}=oe(i.getRule(e),e,i.endRule,n,r===s),a=o.findNextMatchSync(t,r,l);return a?{captureIndices:a.captureIndices,matchedRuleId:a.ruleId}:null}(e,t,n,r,i,s),l=e.getInjections();if(0===l.length)return o;let a=function(e,t,n,r,i,s,o){let l,a=Number.MAX_VALUE,u=null,h=0,c=s.contentNameScopesList.getScopeNames();for(let s=0,f=e.length;s<f;s++){let f=e[s];if(!f.matcher(c))continue;let{ruleScanner:d,findOptions:p}=oe(t.getRule(f.ruleId),t,null,r,i===o),m=d.findNextMatchSync(n,i,p);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=a)&&(a=g,u=m.captureIndices,l=m.ruleId,h=f.priority,a===i))break}return u?{priorityMatch:-1===h,captureIndices:u,matchedRuleId:l}:null}(l,e,t,n,r,i,s);if(!a)return o;if(!o)return a;let u=o.captureIndices[0].start,h=a.captureIndices[0].start;return h<u||a.priorityMatch&&h===u?a:o}(e,t,n,r,i,h);if(!o){s.produce(i,a),u=!0;return}let l=o.captureIndices,c=o.matchedRuleId,f=!!l&&l.length>0&&l[0].end>r;if(-1===c){let o=i.getRule(e);s.produce(i,l[0].start),i=i.withContentNameScopesList(i.nameScopesList),ot(e,t,n,i,s,o.endCaptures,l),s.produce(i,l[0].end);let c=i;if(i=i.parent,h=c.getAnchorPos(),!f&&c.getEnterPos()===r){i=c,s.produce(i,a),u=!0;return}}else{let o=e.getRule(c);s.produce(i,l[0].start);let d=i,p=o.getName(t.content,l),m=i.contentNameScopesList.pushAttributed(p,e);if(i=i.push(c,r,h,l[0].end===a,null,m,m),o instanceof sX){ot(e,t,n,i,s,o.beginCaptures,l),s.produce(i,l[0].end),h=l[0].end;let r=o.getContentName(t.content,l),c=m.pushAttributed(r,e);if(i=i.withContentNameScopesList(c),o.endHasBackReferences&&(i=i.withEndRule(o.getEndWithResolvedBackReferences(t.content,l))),!f&&d.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),u=!0;return}}else if(o instanceof s0){ot(e,t,n,i,s,o.beginCaptures,l),s.produce(i,l[0].end),h=l[0].end;let r=o.getContentName(t.content,l),c=m.pushAttributed(r,e);if(i=i.withContentNameScopesList(c),o.whileHasBackReferences&&(i=i.withEndRule(o.getWhileWithResolvedBackReferences(t.content,l))),!f&&d.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),u=!0;return}}else if(ot(e,t,n,i,s,o.captures,l),s.produce(i,l[0].end),i=i.pop(),!f){i=i.safePop(),s.produce(i,a),u=!0;return}}l[0].end>r&&(r=l[0].end,n=!1)}()}return new s9(i,!1)}function oe(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ot(e,t,n,r,i,s,o){if(0===s.length)return;let l=t.content,a=Math.min(s.length,o.length),u=[],h=o[0].end;for(let t=0;t<a;t++){let a=s[t];if(null===a)continue;let c=o[t];if(0===c.length)continue;if(c.start>h)break;for(;u.length>0&&u[u.length-1].endPos<=c.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,c.start):i.produce(r,c.start),a.retokenizeCapturedWithRuleId){let t=a.getName(l,o),s=r.contentNameScopesList.pushAttributed(t,e),u=a.getContentName(l,o),h=s.pushAttributed(u,e),f=r.push(a.retokenizeCapturedWithRuleId,c.start,-1,!1,null,s,h),d=e.createOnigString(l.substring(0,c.end));s7(e,d,n&&0===c.start,c.start,f,i,!1,0),sB(d);continue}let f=a.getName(l,o);if(null!==f){let t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);u.push(new on(t,c.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var on=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function or(e,t,n,r,i){let s=sP(t,oi),o=s1.getCompiledRuleId(n,r,i.repository);for(let n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function oi(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var os=class{constructor(e,t,n,r,i,s,o,l){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new s8(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=oo(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of sP(e,oi))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)or(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&or(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=oo(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=s1.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==oa.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),s=sF.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?ol.createRootAndLookUpScopeName(o,s,this):ol.createRoot("unknown",s),t=new oa(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let s=this.createOnigString(e),o=s.content.length,l=new oh(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=s7(this,s,i,0,t,l,!0,r);return sB(s),{lineLength:o,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function oo(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ol=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=sD.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new sD(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),s=new sD(null,t),o=r.themeProvider.themeMatch(s),l=e.mergeAttributes(n,i,o);return new e(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,s=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,s=n.backgroundId),sF.set(e,t.languageId,t.tokenType,null,r,i,s)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),l=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},oa=class e{constructor(e,t,n,r,i,s,o,l){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ol.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,l){return new e(this,t,n,r,i,s,o,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=ol.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ol.fromExtension(r,n.contentNameScopesList))}},ou=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):sP(e,oi).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>sP(e,oi).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},oh=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=sF.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=sF.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},oc=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,new os(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},of=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new oc(sk.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(sk.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ou(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let s=new sL(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(e=>this._loadSingleGrammar(e.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},od=oa.NULL;let op=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class om{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function og(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new om(n,r,t)}function oy(e){return e.toLowerCase()}om.prototype.normal={},om.prototype.property={},om.prototype.space=void 0;class ob{constructor(e,t){this.attribute=t,this.property=e}}ob.prototype.attribute="",ob.prototype.booleanish=!1,ob.prototype.boolean=!1,ob.prototype.commaOrSpaceSeparated=!1,ob.prototype.commaSeparated=!1,ob.prototype.defined=!1,ob.prototype.mustUseProperty=!1,ob.prototype.number=!1,ob.prototype.overloadedBoolean=!1,ob.prototype.property="",ob.prototype.spaceSeparated=!1,ob.prototype.space=void 0;let ov=0,ow=oS(),ok=oS(),oD=oS(),ox=oS(),oA=oS(),oC=oS(),oE=oS();function oS(){return 2**++ov}let o_=Object.keys(F);class oO extends ob{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<o_.length;){const e=o_[i];!function(e,t,n){n&&(e[t]=n)}(this,o_[i],(n&F[e])===F[e])}}}function oF(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let s=new oO(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[oy(r)]=r,n[oy(s.attribute)]=r}return new om(t,n,e.space)}oO.prototype.defined=!0;let oP=oF({properties:{ariaActiveDescendant:null,ariaAtomic:ok,ariaAutoComplete:null,ariaBusy:ok,ariaChecked:ok,ariaColCount:ox,ariaColIndex:ox,ariaColSpan:ox,ariaControls:oA,ariaCurrent:null,ariaDescribedBy:oA,ariaDetails:null,ariaDisabled:ok,ariaDropEffect:oA,ariaErrorMessage:null,ariaExpanded:ok,ariaFlowTo:oA,ariaGrabbed:ok,ariaHasPopup:null,ariaHidden:ok,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oA,ariaLevel:ox,ariaLive:null,ariaModal:ok,ariaMultiLine:ok,ariaMultiSelectable:ok,ariaOrientation:null,ariaOwns:oA,ariaPlaceholder:null,ariaPosInSet:ox,ariaPressed:ok,ariaReadOnly:ok,ariaRelevant:null,ariaRequired:ok,ariaRoleDescription:oA,ariaRowCount:ox,ariaRowIndex:ox,ariaRowSpan:ox,ariaSelected:ok,ariaSetSize:ox,ariaSort:null,ariaValueMax:ox,ariaValueMin:ox,ariaValueNow:ox,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function oT(e,t){return t in e?e[t]:t}function oB(e,t){return oT(e,t.toLowerCase())}let oM=oF({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:oC,acceptCharset:oA,accessKey:oA,action:null,allow:null,allowFullScreen:ow,allowPaymentRequest:ow,allowUserMedia:ow,alt:null,as:null,async:ow,autoCapitalize:null,autoComplete:oA,autoFocus:ow,autoPlay:ow,blocking:oA,capture:null,charSet:null,checked:ow,cite:null,className:oA,cols:ox,colSpan:null,content:null,contentEditable:ok,controls:ow,controlsList:oA,coords:ox|oC,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ow,defer:ow,dir:null,dirName:null,disabled:ow,download:oD,draggable:ok,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ow,formTarget:null,headers:oA,height:ox,hidden:oD,high:ox,href:null,hrefLang:null,htmlFor:oA,httpEquiv:oA,id:null,imageSizes:null,imageSrcSet:null,inert:ow,inputMode:null,integrity:null,is:null,isMap:ow,itemId:null,itemProp:oA,itemRef:oA,itemScope:ow,itemType:oA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ow,low:ox,manifest:null,max:null,maxLength:ox,media:null,method:null,min:null,minLength:ox,multiple:ow,muted:ow,name:null,nonce:null,noModule:ow,noValidate:ow,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ow,optimum:ox,pattern:null,ping:oA,placeholder:null,playsInline:ow,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ow,referrerPolicy:null,rel:oA,required:ow,reversed:ow,rows:ox,rowSpan:ox,sandbox:oA,scope:null,scoped:ow,seamless:ow,selected:ow,shadowRootClonable:ow,shadowRootDelegatesFocus:ow,shadowRootMode:null,shape:null,size:ox,sizes:null,slot:null,span:ox,spellCheck:ok,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ox,step:null,style:null,tabIndex:ox,target:null,title:null,translate:null,type:null,typeMustMatch:ow,useMap:null,value:ok,width:ox,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oA,axis:null,background:null,bgColor:null,border:ox,borderColor:null,bottomMargin:ox,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ow,declare:ow,event:null,face:null,frame:null,frameBorder:null,hSpace:ox,leftMargin:ox,link:null,longDesc:null,lowSrc:null,marginHeight:ox,marginWidth:ox,noResize:ow,noHref:ow,noShade:ow,noWrap:ow,object:null,profile:null,prompt:null,rev:null,rightMargin:ox,rules:null,scheme:null,scrolling:ok,standby:null,summary:null,text:null,topMargin:ox,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ox,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ow,disableRemotePlayback:ow,prefix:null,property:null,results:ox,security:null,unselectable:null},space:"html",transform:oB}),oI=oF({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oE,accentHeight:ox,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ox,amplitude:ox,arabicForm:null,ascent:ox,attributeName:null,attributeType:null,azimuth:ox,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ox,by:null,calcMode:null,capHeight:ox,className:oA,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ox,diffuseConstant:ox,direction:null,display:null,dur:null,divisor:ox,dominantBaseline:null,download:ow,dx:null,dy:null,edgeMode:null,editable:null,elevation:ox,enableBackground:null,end:null,event:null,exponent:ox,externalResourcesRequired:null,fill:null,fillOpacity:ox,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:oC,g2:oC,glyphName:oC,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ox,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ox,horizOriginX:ox,horizOriginY:ox,id:null,ideographic:ox,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ox,k:ox,k1:ox,k2:ox,k3:ox,k4:ox,kernelMatrix:oE,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ox,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ox,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ox,overlineThickness:ox,paintOrder:null,panose1:null,path:null,pathLength:ox,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:oA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ox,pointsAtY:ox,pointsAtZ:ox,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oE,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oE,rev:oE,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oE,requiredFeatures:oE,requiredFonts:oE,requiredFormats:oE,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ox,specularExponent:ox,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ox,strikethroughThickness:ox,string:null,stroke:null,strokeDashArray:oE,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ox,strokeOpacity:ox,strokeWidth:null,style:null,surfaceScale:ox,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oE,tabIndex:ox,tableValues:null,target:null,targetX:ox,targetY:ox,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oE,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ox,underlineThickness:ox,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ox,values:null,vAlphabetic:ox,vMathematical:ox,vectorEffect:null,vHanging:ox,vIdeographic:ox,version:null,vertAdvY:ox,vertOriginX:ox,vertOriginY:ox,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ox,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oT}),oN=oF({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),oL=oF({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oB}),o$=oF({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),oR=og([oP,oM,oN,oL,o$],"html"),oj=og([oP,oI,oN,oL,o$],"svg"),oz={}.hasOwnProperty,oq=/["&'<>`]/g,oU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oV=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,oH=/[|\\{}()[\]^$+*?.]/g,oW=new WeakMap,oK=/[\dA-Fa-f]/,oG=/\d/,oJ=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],oY={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},oZ=["cent","copy","divide","gt","lt","not","para","times"],oQ={}.hasOwnProperty,oX={};for(o in oY)oQ.call(oY,o)&&(oX[oY[o]]=o);let o0=/[^\dA-Za-z]/;function o1(e,t,n){var r,i;let s,o,l=(r=n.omitOptionalSemicolons,s="&#x"+e.toString(16).toUpperCase(),r&&t&&!oK.test(String.fromCharCode(t))?s:s+";");if((n.useNamedReferences||n.useShortestReferences)&&(o=function(e,t,n,r){let i=String.fromCharCode(e);if(oQ.call(oX,i)){let e=oX[i],s="&"+e;return n&&oJ.includes(e)&&!oZ.includes(e)&&(!r||t&&61!==t&&o0.test(String.fromCharCode(t)))?s:s+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let r,s=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!oG.test(String.fromCharCode(t))?r:r+";");s.length<l.length&&(l=s)}return o&&(!n.useShortestReferences||o.length<l.length)?o:l}function o2(e,t){let n;var r,i=e,s=Object.assign({format:o1},t);if(i=i.replace(s.subset?(r=s.subset,(n=oW.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(oH,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),oW.set(r,n)),n):oq,o),s.subset||s.escapeOnly)return i;return i.replace(oU,function(e,t,n){return s.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),s)}).replace(oV,o);function o(e,t,n){return s.format(e.charCodeAt(0),n.charCodeAt(t+1),s)}}let o3=/^>|^->|<!--|-->|--!>|<!-$/g,o6=[">"],o5=["<",">"];function o8(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let o4=/[A-Z]/g,o9=/-[a-z]/g,o7=/^data[-\w.:]+$/i;function le(e){return"-"+e.toLowerCase()}function lt(e){return e.charAt(1).toUpperCase()}let ln=/[ \t\n\f\r]/g;function lr(e){return"object"==typeof e?"text"===e.type&&li(e.value):li(e)}function li(e){return""===e.replace(ln,"")}let ls=la(1),lo=la(-1),ll=[];function la(e){return function(t,n,r){let i=t?t.children:ll,s=(n||0)+e,o=i[s];if(!r)for(;o&&lr(o);)s+=e,o=i[s];return o}}let lu={}.hasOwnProperty;function lh(e){return function(t,n,r){return lu.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let lc=lh({body:function(e,t,n){let r=ls(n,t);return!r||"comment"!==r.type},caption:lf,colgroup:lf,dd:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=ls(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:lf,html:function(e,t,n){let r=ls(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=ls(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:ld,rt:ld,tbody:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:lp,tfoot:function(e,t,n){return!ls(n,t)},th:lp,thead:function(e,t,n){let r=ls(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function lf(e,t,n){let r=ls(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&lr(r.value.charAt(0)))}function ld(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function lp(e,t,n){let r=ls(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let lm=lh({body:function(e){let t=ls(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&lr(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=lo(n,t),i=ls(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&lc(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=ls(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=lo(n,t),i=ls(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&lc(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),lg={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},ly=["<","&"];function lb(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:o2(e.value,Object.assign({},r.settings.characterReferences,{subset:ly}))}let lv=function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,s=r.handlers;if(t&&oz.call(t,e)){let n=String(t[e]);i=oz.call(s,n)?s[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+o2(e.value,Object.assign({},r.settings.characterReferences,{subset:o6}))+">":"\x3c!--"+e.value.replace(o3,function(e){return o2(e,Object.assign({},r.settings.characterReferences,{subset:o5}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,s=r.schema,o="svg"!==s.space&&r.settings.omitOptionalTags,l="svg"===s.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),a=[];"html"===s.space&&"svg"===e.tagName&&(r.schema=oj);let u=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=function(e,t){let n=oy(t),r=t,i=ob;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&o7.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(o9,lt);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!o9.test(e)){let n=e.replace(o4,le);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=oO}return new i(r,t)}(e.schema,t),s=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,l=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let a=o2(i.attribute,Object.assign({},e.settings.characterReferences,{subset:lg.name[s][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?function(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}:function(e){return e.join(" ").trim()})(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(r=o2(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:lg.unquoted[s][o]}))),r!==n&&(e.settings.quoteSmart&&o8(n,l)>o8(n,e.alternative)&&(l=e.alternative),r=l+o2(n,Object.assign({},e.settings.characterReferences,{subset:("'"===l?lg.single:lg.double)[s][o],attribute:!0}))+l),a+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),h=r.all("html"===s.space&&"template"===e.tagName?e.content:e);return r.schema=s,h&&(l=!1),!u&&o&&lm(e,t,n)||(a.push("<",e.tagName,u?" "+u:""),l&&("svg"===s.space||r.settings.closeSelfClosing)&&(i=u.charAt(u.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&a.push(" "),a.push("/")),a.push(">")),a.push(h),l||o&&lc(e,t,n)||a.push("</"+e.tagName+">"),a.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:lb(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:lb}}),lw={},lk={},lD=[];function lx(e,t,n){return lv(e,t,n,this)}function lA(e){let t=[],n=e&&e.children||lD,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function lC(e,t=!1){let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let s=t?n[e]+(n[e+1]||""):n[e];i.push([s,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function lE(e){return!e||["plaintext","txt","text","plain"].includes(e)}function lS(e){return"none"===e}function l_(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}async function lO(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function lF(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function lP(e,t){return e&&t?.[e?.toLowerCase()]||e}function lT(e){let t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&sC.Italic&&(t["font-style"]="italic"),e.fontStyle&sC.Bold&&(t["font-weight"]="bold"),e.fontStyle&sC.Underline&&(t["text-decoration"]="underline")),t}class lB extends Error{constructor(e){super(e),this.name="ShikiError"}}let lM=new WeakMap;function lI(e,t){lM.set(e,t)}function lN(e){return lM.get(e)}class lL{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new lL(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,od])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}get scopes(){return sd("GrammarState.scopes is deprecated, use GrammarState.getScopes() instead"),l$(this._stacks[this.theme])}getScopes(e=this.theme){return l$(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function l$(e){let t=[],n=new Set;return!function e(r){if(n.has(r))return;n.add(r);let i=r?.nameScopesList?.scopeName;i&&t.push(i),r.parent&&e(r.parent)}(e),t}let lR=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let r,i=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new lB(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...s.indexToPos(e),offset:e}}{let t=s.lines[e.line];if(void 0===t)throw new lB(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${s.lines.length}`);if(e.character<0||e.character>t.length)throw new lB(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,offset:s.posToIndex(e.line,e.character)}}},s={lines:r=lC(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:r.length-1,character:r[r.length-1].length};let t=e,i=0;for(let e of r){if(t<e.length)break;t-=e.length,i++}return{line:i,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=r[t].length;return n+t}},o=(t.options.decorations||[]).map(e=>({...e,start:i(e.start),end:i(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new lB(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<t.start.offset&&t.start.offset<n.end.offset,s=n.start.offset<t.end.offset&&t.end.offset<n.end.offset,o=t.start.offset<n.start.offset&&n.start.offset<t.end.offset,l=t.start.offset<n.end.offset&&n.end.offset<t.end.offset;if(i||s||o||l){if(s&&s||o&&l)continue;throw new lB(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:s,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){let n;if(!this.options.decorations?.length)return;let r=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);return(n=Array.from(r instanceof Set?r:new Set(r)).sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let r=0,i=[];for(let n of t)n>r&&i.push({...e,content:e.content.slice(r,n),offset:e.offset+r}),r=n;return r<e.content.length&&i.push({...e,content:e.content.slice(r),offset:e.offset+r}),i})):e},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new lB(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let o=r[e],l="",a=-1,u=-1;if(0===t&&(a=0),0===n&&(u=0),n===1/0&&(u=o.children.length),-1===a||-1===u)for(let e=0;e<o.children.length;e++)l+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===a&&l.length===t&&(a=e+1),-1===u&&l.length===n&&(u=e+1);if(-1===a)throw new lB(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new lB(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let h=o.children.slice(a,u);if(i.alwaysWrap||h.length!==o.children.length)if(i.alwaysWrap||1!==h.length||"element"!==h[0].type){let e={type:"element",tagName:"span",properties:{},children:h};s(e,i,"wrapper"),o.children.splice(a,h.length,e)}else s(h[0],i,"token");else s(o,i,"line")}function s(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&l_(e,t.properties.class),e=i(e,n)||e}let o=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)o.unshift(()=>{var t;r[t=i]=s(r[t],e,"line")});i(n.line,0,n.character,e)}}o.forEach(e=>e())}}}()];function lj(e){return[...e.transformers||[],...lR]}var lz=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],lq={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function lU(e,t){let n,r=1,i=e[t+r++];if("2"===i){let i=[e[t+r++],e[t+r++],e[t+r]].map(e=>Number.parseInt(e));3!==i.length||i.some(e=>Number.isNaN(e))||(n={type:"rgb",rgb:i})}else if("5"===i){let i=Number.parseInt(e[t+r]);Number.isNaN(i)||(n={type:"table",index:Number(i)})}return[r,n]}var lV={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function lH(e,t,n={}){var r,i,s,o,l;let a,u,{lang:h="text",theme:c=e.getLoadedThemes()[0]}=n;if(lE(h)||lS(c))return lC(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:f,colorMap:d}=e.setTheme(c);if("ansi"===h){let e,r,i,s,o,l,a;return e=lF(f,n),r=lC(t),i=function(e=lV){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<lz.length;n++)t.push(e[lz[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let s=0;s<6;s++)t.push(n([r[e],r[i],r[s]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(lz.map(e=>[e,f.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]]))),s=null,o=null,l=new Set,a={parse(e){let t=[],n=0;do{let r=function(e,t){let n=e.indexOf("\x1b[",t);if(-1!==n){let t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),i=r.sequence?e.substring(n,r.startPosition):e.substring(n);if(i.length>0&&t.push({value:i,foreground:s,background:o,decorations:new Set(l)}),r.sequence){let e=function(e){let t=[];for(let n=0;n<e.length;n++){let r=Number.parseInt(e[n]);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)lq[r]&&t.push({type:"setDecoration",value:lq[r]});else if(r<=29){let e=lq[r-20];e&&t.push({type:"resetDecoration",value:e})}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:lz[r-30]}});else if(38===r){let[r,i]=lU(e,n);i&&t.push({type:"setForegroundColor",value:i}),n+=r}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:lz[r-40]}});else if(48===r){let[r,i]=lU(e,n);i&&t.push({type:"setBackgroundColor",value:i}),n+=r}else 49===r?t.push({type:"resetBackgroundColor"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:lz[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:lz[r-100+8]}})}return t}(r.sequence);for(let t of e)"resetAll"===t.type?(s=null,o=null,l.clear()):"resetForegroundColor"===t.type?s=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&l.delete(t.value);for(let t of e)"setForegroundColor"===t.type?s=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&l.add(t.value)}n=r.position}while(n<e.length);return t}},r.map(t=>a.parse(t[0]).map(n=>{let r,s;n.decorations.has("reverse")?(r=n.background?i.value(n.background):f.bg,s=n.foreground?i.value(n.foreground):f.fg):(r=n.foreground?i.value(n.foreground):f.fg,s=n.background?i.value(n.background):void 0),r=lP(r,e),s=lP(s,e),n.decorations.has("dim")&&(r=function(e){let t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){let e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}else if(t[2])return`#${t[1]}${t[2]}80`;else return`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`;let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let o=sC.None;return n.decorations.has("bold")&&(o|=sC.Bold),n.decorations.has("italic")&&(o|=sC.Italic),n.decorations.has("underline")&&(o|=sC.Underline),{content:n.value,offset:t[1],color:r,bgColor:s,fontStyle:o}}))}let p=e.getLanguage(h);if(n.grammarState){if(n.grammarState.lang!==p.name)throw new se(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${p.name}"`);if(!n.grammarState.themes.includes(f.name))throw new se(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${f.name}"`)}return a=lW(r=t,i=p,s=f,o=d,l=n),u=new lL(lW(r,i,s,o,l).stateStack,i.name,s.name),lI(a.tokens,u),a.tokens}function lW(e,t,n,r,i){let s=lF(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:l=500}=i,a=lC(e),u=i.grammarState?function(e,t){if(!(e instanceof lL))throw new lB("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??od:null!=i.grammarContextCode?lW(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:od,h=[],c=[];for(let e=0,f=a.length;e<f;e++){let f,d,[p,m]=a[e];if(""===p){h=[],c.push([]);continue}if(o>0&&p.length>=o){h=[],c.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(f=t.tokenizeLine(p,u).tokens,d=0);let g=t.tokenizeLine2(p,u,l),y=g.tokens.length/2;for(let e=0;e<y;e++){let t=g.tokens[2*e],o=e+1<y?g.tokens[2*e+2]:p.length;if(t===o)continue;let l=g.tokens[2*e+1],a=lP(r[sF.getForeground(l)],s),u=sF.getFontStyle(l),c={content:p.substring(t,o),offset:m+t,color:a,fontStyle:u};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}c.explanation=[];let r=0;for(;t+r<o;){let t=f[d],n=p.substring(t.startIndex,t.endIndex);r+=n.length,c.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:s}of e)for(let e of i)if(function(e,t,n){if(!lK(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)lK(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(s);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),d+=1}}h.push(c)}c.push(h),h=[],u=g.ruleStack}return{tokens:c,stateStack:u}}function lK(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function lG(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=lH(e,t,{...n,theme:r.theme}),s=lN(i);return{tokens:i,state:s,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),s=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),s=t.map(()=>[]);t.forEach((e,t)=>e.push(s[t]));let o=i.map(()=>0),l=i.map(e=>e[0]);for(;l.every(e=>e);){let e=Math.min(...l.map(e=>e.content.length));for(let t=0;t<n;t++){let n=l[t];n.content.length===e?(s[t].push(n),o[t]+=1,l[t]=i[t][o[t]]):(s[t].push({...n,content:n.content.slice(0,e)}),l[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...i.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:l,offset:a,...u}=e[t][i];o.variants[r[n].color]=u}),o})),l=i[0].state?new lL(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return l&&lI(o,l),o}function lJ(e,t,n){let r,i,s,o,l,a;if("themes"in n){let{defaultColor:u="light",cssVariablePrefix:h="--shiki-"}=n,c=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===c.length)throw new se("`themes` option must not be empty");let f=lG(e,t,n);if(a=lN(f),u&&!c.find(e=>e.color===u))throw new se(`\`themes\` option must contain the defaultColor key \`${u}\``);let d=c.map(t=>e.getTheme(t.theme)),p=c.map(e=>e.color);s=f.map(e=>e.map(e=>{var t,n,r,i;let s,o,l,a;return t=e,n=p,r=h,i=u,s={content:t.content,explanation:t.explanation,offset:t.offset},l=new Set((o=n.map(e=>lT(t.variants[e]))).flatMap(e=>Object.keys(e))),a={},o.forEach((e,t)=>{for(let s of l){let o=e[s]||"inherit";if(0===t&&i)a[s]=o;else{let e="color"===s?"":"background-color"===s?"-bg":`-${s}`;a[r+n[t]+("color"===s?"":e)]=o}}}),s.htmlStyle=a,s})),a&&lI(s,a);let m=c.map(e=>lF(e.theme,n));i=c.map((e,t)=>(0===t&&u?"":`${h+e.color}:`)+(lP(d[t].fg,m[t])||"inherit")).join(";"),r=c.map((e,t)=>(0===t&&u?"":`${h+e.color}-bg:`)+(lP(d[t].bg,m[t])||"inherit")).join(";"),o=`shiki-themes ${d.map(e=>e.name).join(" ")}`,l=u?void 0:[i,r].join(";")}else if("theme"in n){let l=lF(n.theme,n);s=lH(e,t,n);let u=e.getTheme(n.theme);r=lP(u.bg,l),i=lP(u.fg,l),o=u.name,a=lN(s)}else throw new se("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:l,grammarState:a}}function lY(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>lY(e,t,n),codeToTokens:(t,n)=>lJ(e,t,n)}){let i=t;for(let e of lj(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:l,themeName:a,rootStyle:u,grammarState:h}=lJ(e,i,n),{mergeWhitespaces:c=!0}=n;!0===c?s=s.map(e=>{let t=[],n="",r=0;return e.forEach((i,s)=>{let o=!(i.fontStyle&&i.fontStyle&sC.Underline);o&&i.content.match(/^\s+$/)&&e[s+1]?(r||(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=0,n=""):t.push(i)}),t}):"never"===c&&(s=s.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let s=[{...e,offset:e.offset+n.length,content:r}];return n&&s.unshift({content:n,offset:e.offset}),i&&s.push({content:i,offset:e.offset+n.length+r.length}),s})));let f={...r,get source(){return i}};for(let e of lj(n))s=e.tokens?.call(f,s)||s;return function(e,t,n,r=lN(e)){let i=lj(t),s=[],o={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=t,u={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==a&&null!=a?{tabindex:a.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},h={type:"element",tagName:"code",properties:{},children:s},c=[],f={...n,structure:l,addClassToHast:l_,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return h},get lines(){return c}};if(e.forEach((e,t)=>{t&&("inline"===l?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===l&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let s of e){var a;let e={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]};"string"==typeof s.htmlStyle&&sd("`htmlStyle` as a string is deprecated. Use an object instead.");let u="string"==typeof(a=s.htmlStyle||lT(s))?a:Object.entries(a).map(([e,t])=>`${e}:${t}`).join(";");for(let o of(u&&(e.properties.style=u),i))e=o?.span?.call(f,e,t+1,r,n,s)||e;"inline"===l?o.children.push(e):"classic"===l&&n.children.push(e),r+=s.content.length}if("classic"===l){for(let e of i)n=e?.line?.call(f,n,t+1)||n;c.push(n),s.push(n)}}),"classic"===l){for(let e of i)h=e?.code?.call(f,h)||h;for(let e of(u.children.push(h),i))u=e?.pre?.call(f,u)||u;o.children.push(u)}let d=o;for(let e of i)d=e?.root?.call(f,d)||d;return r&&lI(d,r),d}(s,{...n,fg:o,bg:l,themeName:a,rootStyle:u},f,h)}let lZ="__shiki_resolved";function lQ(e){if(e?.[lZ])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,s=new Map;function o(e){if(s.has(e))return s.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(s.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,lZ,{enumerable:!1,writable:!1,value:!0}),t}async function lX(e){return Array.from(new Set((await Promise.all(e.filter(e=>!("ansi"===e||lE(e))).map(async e=>await lO(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function l0(e){return(await Promise.all(e.map(async e=>lS(e)?null:lQ(await lO(e))))).filter(e=>!!e)}class l1 extends of{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=lQ(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=sk.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){let t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new lB(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new lB(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(let t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class l2{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let l3=0;async function l6(e={}){e.loadWasm&&sd("`loadWasm` option is deprecated. Use `engine: createOnigurumaEngine(loadWasm)` instead.");let[t,n,r]=await Promise.all([l0(e.themes||[]),lX(e.langs||[]),e.engine||sf(e.loadWasm||s)]);return function(e){let t;l3+=1,!1!==e.warnings&&l3>=10&&l3%10==0&&console.warn(`[Shiki] ${l3} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new lB("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(lQ),s=new l1(new l2(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();let t=s.getTheme(e);if(!t)throw new lB(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(...e){u(),s.loadLanguages(e.flat(1))}function a(...e){for(let t of(u(),e.flat(1)))s.loadTheme(t)}function u(){if(n)throw new lB("Shiki instance has been disposed")}function h(){n||(n=!0,s.dispose(),l3-=1)}return{setTheme:function(e){u();let n=o(e);return t!==e&&(s.setTheme(n),t=e),{theme:n,colorMap:s.getColorMap()}},getTheme:o,getLanguage:function(e){u();let t=s.getGrammar("string"==typeof e?e:e.name);if(!t)throw new lB(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),s.getLoadedThemes()},getLoadedLanguages:function(){return u(),s.getLoadedLanguages()},loadLanguage:async function(...e){return l(await lX(e))},loadLanguageSync:l,loadTheme:async function(...e){return u(),a(await l0(e))},loadThemeSync:a,dispose:h,[Symbol.dispose]:h}}({...e,loadWasm:void 0,themes:t,langs:n,engine:r})}async function l5(e={}){let t=await l6(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return lN(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(lE(i)||lS(s))throw new se("Plain language does not have grammar state");if("ansi"===i)throw new se("ANSI language does not have grammar state");let{theme:o,colorMap:l}=t.setTheme(s),a=t.getLanguage(i);return new lL(lW(n,a,o,l,r).stateStack,a.name,o.name)})(t,...e),codeToTokensBase:(e,n)=>lH(t,e,n),codeToTokensWithThemes:(e,n)=>lG(t,e,n),codeToTokens:(e,n)=>lJ(t,e,n),codeToHast:(e,n)=>lY(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>lY(e,t,n),codeToTokens:(t,n)=>lJ(e,t,n)},i=function(e){let t=lw.quote||'"';if('"'!==t&&"'"!==t)throw Error("Invalid quote `"+t+"`, expected `'` or `\"`");return({one:lx,all:lA,settings:{omitOptionalTags:lw.omitOptionalTags||!1,allowParseErrors:lw.allowParseErrors||!1,allowDangerousCharacters:lw.allowDangerousCharacters||!1,quoteSmart:lw.quoteSmart||!1,preferUnquoted:lw.preferUnquoted||!1,tightAttributes:lw.tightAttributes||!1,upperDoctype:lw.upperDoctype||!1,tightDoctype:lw.tightDoctype||!1,bogusComments:lw.bogusComments||!1,tightCommaSeparatedLists:lw.tightCommaSeparatedLists||!1,tightSelfClosing:lw.tightSelfClosing||!1,collapseEmptyAttributes:lw.collapseEmptyAttributes||!1,allowDangerousHtml:lw.allowDangerousHtml||!1,voids:lw.voids||op,characterReferences:lw.characterReferences||lk,closeSelfClosing:lw.closeSelfClosing||!1,closeEmptyElements:lw.closeEmptyElements||!1},schema:"svg"===lw.space?oj:oR,quote:t,alternative:'"'===t?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}(lY(e,t,n,r));for(let e of lj(n))i=e.postprocess?.call(r,i,n)||i;return i})(t,e,n),...t,getInternalContext:()=>t}}let l8=i7({linkify:!0,typographer:!0});function l4(e,t=!0){return t?l8.renderInline(e):l8.render(e)}(async()=>{var e;let t=await l5({themes:[n.e("14939").then(n.bind(n,20150)),n.e("42215").then(n.bind(n,40826))],langs:[n.e("79921").then(n.bind(n,73096))]});l8.use((e={themes:{light:"vitesse-light",dark:"vitesse-dark"}},function(n){!function(e,t,n){let{parseMetaString:r,trimEndingNewline:i=!0,defaultLanguage:s="text",fallbackLanguage:o}=n,l=t.getLoadedLanguages();e.options.highlight=(e,a="text",u)=>{""===a&&(a=s),o&&!l.includes(a)&&(a=o);let h=r?.(u,e,a)||{},c={...n,lang:a,meta:{...n.meta,...h,__raw:u}},f=[];return f.push({name:"@shikijs/markdown-it:block-class",code(e){e.properties.class=`language-${a}`}}),i&&e.endsWith("\n")&&(e=e.slice(0,-1)),t.codeToHtml(e,{...c,transformers:[...f,...c.transformers||[]]})}}(n,t,e)}))})();var l9=n(21060);function l7(e){let t=null;try{t=JSON.parse(e.doc.toString())}catch(n){try{t=(0,l9.parse)(e.doc.toString())}catch(e){}}return{data:t,pointers:Q(e,K)}}var ae=n(88696);function at(e){let t=e.doc.toString(),n=null;try{n=ae.parse(t)}catch(e){try{n=(0,l9.parse)(t)}catch(e){}}return{data:n,pointers:Q(e,W)}}let an=Symbol.for("yaml.alias"),ar=Symbol.for("yaml.document"),ai=Symbol.for("yaml.map"),as=Symbol.for("yaml.pair"),ao=Symbol.for("yaml.scalar"),al=Symbol.for("yaml.seq"),aa=Symbol.for("yaml.node.type"),au=e=>!!e&&"object"==typeof e&&e[aa]===an,ah=e=>!!e&&"object"==typeof e&&e[aa]===ar,ac=e=>!!e&&"object"==typeof e&&e[aa]===ai,af=e=>!!e&&"object"==typeof e&&e[aa]===as,ad=e=>!!e&&"object"==typeof e&&e[aa]===ao,ap=e=>!!e&&"object"==typeof e&&e[aa]===al;function am(e){if(e&&"object"==typeof e)switch(e[aa]){case ai:case al:return!0}return!1}function ag(e){if(e&&"object"==typeof e)switch(e[aa]){case an:case ai:case ao:case al:return!0}return!1}let ay=e=>(ad(e)||am(e))&&!!e.anchor,ab=Symbol("break visit"),av=Symbol("skip children"),aw=Symbol("remove node");function ak(e,t){let n=aC(t);ah(e)?aD(null,e.contents,n,Object.freeze([e]))===aw&&(e.contents=null):aD(null,e,n,Object.freeze([]))}function aD(e,t,n,r){let i=aE(e,t,n,r);if(ag(i)||af(i))return aS(e,r,i),aD(e,i,n,r);if("symbol"!=typeof i){if(am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=aD(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===ab)return ab;i===aw&&(t.items.splice(e,1),e-=1)}}}else if(af(t)){r=Object.freeze(r.concat(t));let e=aD("key",t.key,n,r);if(e===ab)return ab;e===aw&&(t.key=null);let i=aD("value",t.value,n,r);if(i===ab)return ab;i===aw&&(t.value=null)}}return i}async function ax(e,t){let n=aC(t);ah(e)?await aA(null,e.contents,n,Object.freeze([e]))===aw&&(e.contents=null):await aA(null,e,n,Object.freeze([]))}async function aA(e,t,n,r){let i=await aE(e,t,n,r);if(ag(i)||af(i))return aS(e,r,i),aA(e,i,n,r);if("symbol"!=typeof i){if(am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await aA(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===ab)return ab;i===aw&&(t.items.splice(e,1),e-=1)}}}else if(af(t)){r=Object.freeze(r.concat(t));let e=await aA("key",t.key,n,r);if(e===ab)return ab;e===aw&&(t.key=null);let i=await aA("value",t.value,n,r);if(i===ab)return ab;i===aw&&(t.value=null)}}return i}function aC(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function aE(e,t,n,r){return"function"==typeof n?n(e,t,r):ac(t)?n.Map?.(e,t,r):ap(t)?n.Seq?.(e,t,r):af(t)?n.Pair?.(e,t,r):ad(t)?n.Scalar?.(e,t,r):au(t)?n.Alias?.(e,t,r):void 0}function aS(e,t,n){let r=t[t.length-1];if(am(r))r.items[e]=n;else if(af(r))"key"===e?r.key=n:r.value=n;else if(ah(r))r.contents=n;else{let e=au(r)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}ak.BREAK=ab,ak.SKIP=av,ak.REMOVE=aw,ax.BREAK=ab,ax.SKIP=av,ax.REMOVE=aw;let a_={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},aO=e=>e.replace(/[!,[\]{}]/g,e=>a_[e]);class aF{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},aF.defaultYaml,e),this.tags=Object.assign({},aF.defaultTags,t)}clone(){let e=new aF(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new aF(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:aF.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},aF.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:aF.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},aF.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let n=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,n),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+aO(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);if(e&&r.length>0&&ag(e.contents)){let n={};ak(e.contents,(e,t)=>{ag(t)&&t.tag&&(n[t.tag]=!0)}),t=Object.keys(n)}else t=[];for(let[i,s]of r)("!!"!==i||"tag:yaml.org,2002:"!==s)&&(!e||t.some(e=>e.startsWith(s)))&&n.push(`%TAG ${i} ${s}`);return n.join("\n")}}function aP(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function aT(e){let t=new Set;return ak(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function aB(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function aM(e,t,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=aM(e,r,String(t),n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=aM(e,r,t,n);void 0===i?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=aM(e,r,t,t);void 0===n?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=aM(e,r,t,n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function aI(e,t,n){if(Array.isArray(e))return e.map((e,t)=>aI(e,String(t),n));if(e&&"function"==typeof e.toJSON){if(!n||!ay(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return"bigint"!=typeof e||n?.keep?e:Number(e)}aF.defaultYaml={explicit:!1,version:"1.2"},aF.defaultTags={"!!":"tag:yaml.org,2002:"};class aN{constructor(e){Object.defineProperty(this,aa,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!ah(e))throw TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=aI(this,"",s);if("function"==typeof r)for(let{count:e,res:t}of s.anchors.values())r(t,e);return"function"==typeof i?aM(i,{"":o},"",o):o}}class aL extends aN{constructor(e){super(an),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let n,r;for(let i of(t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ak(e,{Node:(e,t)=>{(au(t)||ay(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n)),n)){if(i===this)break;i.anchor===this.source&&(r=i)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,s=this.resolve(r,t);if(!s)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let o=n.get(s);if(o||(aI(s,null,t),o=n.get(s)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=function e(t,n,r){if(au(n)){let e=n.resolve(t),i=r&&e&&r.get(e);return i?i.count*i.aliasCount:0}if(am(n)){let i=0;for(let s of n.items){let n=e(t,s,r);n>i&&(i=n)}return i}return af(n)?Math.max(e(t,n.key,r),e(t,n.value,r)):1}(r,s,n)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(aP(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${r} `}return r}}let a$=e=>!e||"function"!=typeof e&&"object"!=typeof e;class aR extends aN{constructor(e){super(ao),this.value=e}toJSON(e,t){return t?.keep?this.value:aI(this.value,e,t)}toString(){return String(this.value)}}function aj(e,t,n){let r;if(ah(e)&&(e=e.contents),ag(e))return e;if(af(e)){let t=n.schema[ai].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:s,onTagObj:o,schema:l,sourceObjects:a}=n;if(i&&e&&"object"==typeof e){if(r=a.get(e))return r.anchor??(r.anchor=s(e)),new aL(r.anchor);r={anchor:null,node:null},a.set(e,r)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(e,t,l.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new aR(e);return r&&(r.node=t),t}u=e instanceof Map?l[ai]:Symbol.iterator in Object(e)?l[al]:l[ai]}o&&(o(u),delete n.onTagObj);let h=u?.createNode?u.createNode(n.schema,e,n):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(n.schema,e,n):new aR(e);return t?h.tag=t:u.default||(h.tag=u.tag),r&&(r.node=h),h}function az(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return aj(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}aR.BLOCK_FOLDED="BLOCK_FOLDED",aR.BLOCK_LITERAL="BLOCK_LITERAL",aR.PLAIN="PLAIN",aR.QUOTE_DOUBLE="QUOTE_DOUBLE",aR.QUOTE_SINGLE="QUOTE_SINGLE";let aq=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class aU extends aN{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ag(t)||af(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(aq(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(am(i))i.addIn(r,t);else if(void 0===i&&this.schema)this.set(n,az(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let r=this.get(t,!0);if(am(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return 0===r.length?!t&&ad(i)?i.value:i:am(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!af(t))return!1;let n=t.value;return null==n||e&&ad(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let r=this.get(t,!0);return!!am(r)&&r.hasIn(n)}setIn(e,t){let[n,...r]=e;if(0===r.length)this.set(n,t);else{let e=this.get(n,!0);if(am(e))e.setIn(r,t);else if(void 0===e&&this.schema)this.set(n,az(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}let aV=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function aH(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let aW=(e,t,n)=>e.endsWith("\n")?aH(n,t):n.includes("\n")?"\n"+aH(n,t):(e.endsWith(" ")?"":" ")+n,aK="block",aG="quoted";function aJ(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:l}={}){let a,u,h;if(!i||i<0)return e;i<s&&(s=0);let c=Math.max(1+s,1+i-t.length);if(e.length<=c)return e;let f=[],d={},p=i-t.length;"number"==typeof r&&(r>i-Math.max(2,s)?f.push(0):p=i-r);let m=!1,g=-1,y=-1,b=-1;for(n===aK&&-1!==(g=aY(e,g,t.length))&&(p=g+c);h=e[g+=1];){if(n===aG&&"\\"===h){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===h)n===aK&&(g=aY(e,g,t.length)),p=g+t.length+c,a=void 0;else{if(" "===h&&u&&" "!==u&&"\n"!==u&&" "!==u){let t=e[g+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(a=g)}if(g>=p)if(a)f.push(a),p=a+c,a=void 0;else if(n===aG){for(;" "===u||" "===u;)u=h,h=e[g+=1],m=!0;let t=g>b+1?g-2:y-1;if(d[t])return e;f.push(t),d[t]=!0,p=t+c,a=void 0}else m=!0}u=h}if(m&&l&&l(),0===f.length)return e;o&&o();let v=e.slice(0,f[0]);for(let r=0;r<f.length;++r){let i=f[r],s=f[r+1]||e.length;0===i?v=`
|
|
33
|
+
${t}${e.slice(0,s)}`:(n===aG&&d[i]&&(v+=`${e[i]}\\`),v+=`
|
|
34
|
+
${t}${e.slice(i+1,s)}`)}return v}function aY(e,t,n){let r=t,i=t+1,s=e[i];for(;" "===s||" "===s;)if(t<i+n)s=e[++t];else{do s=e[++t];while(s&&"\n"!==s);r=t,s=e[i=t+1]}return r}let aZ=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function aQ(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),o="",l=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(o+=n.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{o+=n.slice(l,e);let t=n.substr(e+2,4);switch(t){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:"00"===t.substr(0,2)?o+="\\x"+t.substr(2):o+=n.substr(e,6)}e+=5,l=e+1}break;case"n":if(r||'"'===n[e+2]||n.length<i)e+=1;else{for(o+=n.slice(l,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)o+="\n",e+=2;o+=s," "===n[e+2]&&(o+="\\"),e+=1,l=e+1}break;default:e+=1}return o=l?o+n.slice(l):n,r?o:aJ(o,s,"quoted",aZ(t,!1))}function aX(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return aQ(e,t);let n=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
35
|
+
${n}`)+"'";return t.implicitKey?r:aJ(r,n,"flow",aZ(t,!1))}function a0(e,t){let n,{singleQuote:r}=t.options;if(!1===r)n=aQ;else{let t=e.includes('"'),i=e.includes("'");n=t&&!i?aX:i&&!t?aQ:r?aX:aQ}return n(e,t)}try{l=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{l=/\n+(?!\n|$)/g}function a1({comment:e,type:t,value:n},r,i,s){let o,a,u,h,{blockQuote:c,commentString:f,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n))return a0(n,r);let p=r.indent||(r.forceBlockIndent||(h=n,/^(%|---|\.\.\.)/m.test(h))?" ":""),m="literal"===c||"folded"!==c&&t!==aR.BLOCK_FOLDED&&(t===aR.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>r)return!0;if(i-(n=t+1)<=r)return!1}return!0}(n,d,p.length));if(!n)return m?"|\n":">\n";for(a=n.length;a>0;--a){let e=n[a-1];if("\n"!==e&&" "!==e&&" "!==e)break}let g=n.substring(a),y=g.indexOf("\n");-1===y?o="-":n===g||y!==g.length-1?(o="+",s&&s()):o="",g&&(n=n.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(l,`$&${p}`));let b=!1,v=-1;for(u=0;u<n.length;++u){let e=n[u];if(" "===e)b=!0;else if("\n"===e)v=u;else break}let w=n.substring(0,v<u?v+1:u);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${p}`));let k=p?"2":"1",D=(b?k:"")+o;if(e&&(D+=" "+f(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!m){let e=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),i=!1,s=aZ(r,!0);"folded"!==c&&t!==aR.BLOCK_FOLDED&&(s.onOverflow=()=>{i=!0});let o=aJ(`${w}${e}${g}`,p,"block",s);if(!i)return`>${D}
|
|
36
|
+
${p}${o}`}return n=n.replace(/\n+/g,`$&${p}`),`|${D}
|
|
37
|
+
${p}${w}${n}${g}`}function a2(e,t,n,r){let{implicitKey:i,inFlow:s}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:l}=e;l!==aR.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=aR.QUOTE_DOUBLE);let a=e=>{switch(e){case aR.BLOCK_FOLDED:case aR.BLOCK_LITERAL:return i||s?a0(o.value,t):a1(o,t,n,r);case aR.QUOTE_DOUBLE:return aQ(o.value,t);case aR.QUOTE_SINGLE:return aX(o.value,t);case aR.PLAIN:return function(e,t,n,r){let{type:i,value:s}=e,{actualString:o,implicitKey:l,indent:a,indentStep:u,inFlow:h}=t;if(l&&s.includes("\n")||h&&/[[\]{},]/.test(s))return a0(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||h||!s.includes("\n")?a0(s,t):a1(e,t,n,r);if(!l&&!h&&i!==aR.PLAIN&&s.includes("\n"))return a1(e,t,n,r);if(/^(%|---|\.\.\.)/m.test(s)){if(""===a)return t.forceBlockIndent=!0,a1(e,t,n,r);else if(l&&a===u)return a0(s,t)}let c=s.replace(/\n+/g,`$&
|
|
38
|
+
${a}`);if(o){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(c),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return a0(s,t)}return l?c:aJ(c,a,"flow",aZ(t,!1))}(o,t,n,r);default:return null}},u=a(l);if(null===u){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(null===(u=a(r)))throw Error(`Unsupported default string type ${r}`)}return u}function a3(e,t){let n,r=Object.assign({blockQuote:!0,commentString:aV,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function a6(e,t,n,r){let i;if(af(e))return e.toString(t,n,r);if(au(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s=ag(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){let n,r;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}if(ad(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return r}(t.doc.schema.tags,s));let o=function(e,t,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],s=(ad(e)||am(e))&&e.anchor;s&&aP(s)&&(n.add(s),i.push(`&${s}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}(s,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let l="function"==typeof i.stringify?i.stringify(s,t,n,r):ad(s)?a2(s,t,n,r):s.toString(t,n,r);return o?ad(s)||"{"===l[0]||"["===l[0]?`${o} ${l}`:`${o}
|
|
39
|
+
${t.indent}${l}`:l}function a5(e,t){("debug"===e||"warn"===e)&&console.warn(t)}let a8={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new aR(Symbol("<<")),{addToJSMap:a4}),stringify:()=>"<<"};function a4(e,t,n){if(ap(n=e&&au(n)?n.resolve(e.doc):n))for(let r of n.items)a9(e,t,r);else if(Array.isArray(n))for(let r of n)a9(e,t,r);else a9(e,t,n)}function a9(e,t,n){let r=e&&au(n)?n.resolve(e.doc):n;if(!ac(r))throw Error("Merge sources must be maps or map aliases");for(let[n,i]of r.toJSON(null,e,Map))t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function a7(e,t,{key:n,value:r}){if(ag(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if((a8.identify(n)||ad(n)&&(!n.type||n.type===aR.PLAIN)&&a8.identify(n.value))&&e?.doc.schema.tags.some(e=>e.tag===a8.tag&&e.default))a4(e,t,r);else{let i=aI(n,"",e);if(t instanceof Map)t.set(i,aI(r,i,e));else if(t instanceof Set)t.add(i);else{let s=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(ag(e)&&n?.doc){let t=a3(n.doc,{});for(let e of(t.anchors=new Set,n.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),a5(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,i,e),o=aI(r,s,e);s in t?Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[s]=o}}return t}function ue(e,t,n){return new ut(aj(e,void 0,n),aj(t,void 0,n))}class ut{constructor(e,t=null){Object.defineProperty(this,aa,{value:as}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return ag(t)&&(t=t.clone(e)),ag(n)&&(n=n.clone(e)),new ut(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return a7(t,n,this)}toString(e,t,n){return e?.doc?function({key:e,value:t},n,r,i){let s,o,l,{allNullValues:a,doc:u,indent:h,indentStep:c,options:{commentString:f,indentSeq:d,simpleKeys:p}}=n,m=ag(e)&&e.comment||null;if(p){if(m)throw Error("With simple keys, key nodes cannot have comments");if(am(e)||!ag(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let g=!p&&(!e||m&&null==t&&!n.inFlow||am(e)||(ad(e)?e.type===aR.BLOCK_FOLDED||e.type===aR.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(p||!a),indent:h+c});let y=!1,b=!1,v=a6(e,n,()=>y=!0,()=>b=!0);if(!g&&!n.inFlow&&v.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(a||null==t)return y&&r&&r(),""===v?"?":g?`? ${v}`:v}else if(a&&!p||null==t&&g)return v=`? ${v}`,m&&!y?v+=aW(v,n.indent,f(m)):b&&i&&i(),v;y&&(m=null),g?(m&&(v+=aW(v,n.indent,f(m))),v=`? ${v}
|
|
40
|
+
${h}:`):(v=`${v}:`,m&&(v+=aW(v,n.indent,f(m)))),ag(t)?(s=!!t.spaceBefore,o=t.commentBefore,l=t.comment):(s=!1,o=null,l=null,t&&"object"==typeof t&&(t=u.createNode(t))),n.implicitKey=!1,!g&&!m&&ad(t)&&(n.indentAtStart=v.length+1),b=!1,!(!d&&c.length>=2&&!n.inFlow&&!g&&ap(t))||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let w=!1,k=a6(t,n,()=>w=!0,()=>b=!0),D=" ";if(m||s||o){if(D=s?"\n":"",o){let e=f(o);D+=`
|
|
41
|
+
${aH(e,n.indent)}`}""!==k||n.inFlow?D+=`
|
|
42
|
+
${n.indent}`:"\n"===D&&l&&(D="\n\n")}else if(!g&&am(t)){let e=k[0],r=k.indexOf("\n"),i=-1!==r,s=n.inFlow??t.flow??0===t.items.length;if(i||!s){let t=!1;if(i&&("&"===e||"!"===e)){let n=k.indexOf(" ");"&"===e&&-1!==n&&n<r&&"!"===k[n+1]&&(n=k.indexOf(" ",n+1)),(-1===n||r<n)&&(t=!0)}t||(D=`
|
|
43
|
+
${n.indent}`)}}else(""===k||"\n"===k[0])&&(D="");return v+=D+k,n.inFlow?w&&r&&r():l&&!w?v+=aW(v,n.indent,f(l)):b&&i&&i(),v}(this,e,t,n):JSON.stringify(this)}}function un(e,t,n){return(t.inFlow??e.flow?function({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:l}}=t,a=Object.assign({},t,{indent:r+=s,inFlow:!0,type:null}),u=!1,h=0,c=[];for(let n=0;n<e.length;++n){let i=e[n],s=null;if(ag(i))i.spaceBefore&&c.push(""),ur(t,c,i.commentBefore,!1),i.comment&&(s=i.comment);else if(af(i)){let e=ag(i.key)?i.key:null;e&&(e.spaceBefore&&c.push(""),ur(t,c,e.commentBefore,!1),e.comment&&(u=!0));let n=ag(i.value)?i.value:null;n?(n.comment&&(s=n.comment),n.commentBefore&&(u=!0)):null==i.value&&e?.comment&&(s=e.comment)}s&&(u=!0);let o=a6(i,a,()=>s=null);u||(u=c.length>h||o.includes("\n")),n<e.length-1?o+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(u||(u=c.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),u&&(o+=",")),s&&(o+=aW(o,r,l(s))),c.push(o),h=c.length}let{start:f,end:d}=n;if(0===c.length)return f+d;if(!u){let e=c.reduce((e,t)=>e+t.length+2,2);u=t.options.lineWidth>0&&e>t.options.lineWidth}if(!u)return`${f}${o}${c.join(" ")}${o}${d}`;{let e=f;for(let t of c)e+=t?`
|
|
44
|
+
${s}${i}${t}`:"\n";return`${e}
|
|
45
|
+
${i}${d}`}}:function({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:l}){let a,{indent:u,options:{commentString:h}}=n,c=Object.assign({},n,{indent:s,type:null}),f=!1,d=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(ag(i))!f&&i.spaceBefore&&d.push(""),ur(n,d,i.commentBefore,f),i.comment&&(o=i.comment);else if(af(i)){let e=ag(i.key)?i.key:null;e&&(!f&&e.spaceBefore&&d.push(""),ur(n,d,e.commentBefore,f))}f=!1;let l=a6(i,c,()=>o=null,()=>f=!0);o&&(l+=aW(l,s,h(o))),f&&o&&(f=!1),d.push(r+l)}if(0===d.length)a=i.start+i.end;else{a=d[0];for(let e=1;e<d.length;++e){let t=d[e];a+=t?`
|
|
46
|
+
${u}${t}`:"\n"}}return e?(a+="\n"+aH(h(e),u),l&&l()):f&&o&&o(),a})(e,t,n)}function ur({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let i=aH(t(r),e);n.push(i.trimStart())}}function ui(e,t){let n=ad(t)?t.value:t;for(let r of e)if(af(r)&&(r.key===t||r.key===n||ad(r.key)&&r.key.value===n))return r}class us extends aU{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ai,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,s=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||r)&&s.items.push(ue(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(let e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&s.items.sort(e.sortMapEntries),s}add(e,t){let n;n=af(e)?e:e&&"object"==typeof e&&"key"in e?new ut(e.key,e.value):new ut(e,e?.value);let r=ui(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);ad(r.value)&&a$(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>0>i(n,e));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=ui(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=ui(this.items,e),r=n?.value;return(!t&&ad(r)?r.value:r)??void 0}has(e){return!!ui(this.items,e)}set(e,t){this.add(new ut(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(r),this.items))a7(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!af(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),un(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}let uo={collection:"map",default:!0,nodeClass:us,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(ac(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>us.from(e,t,n)};class ul extends aU{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(al,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ua(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=ua(e);if("number"!=typeof n)return;let r=this.items[n];return!t&&ad(r)?r.value:r}has(e){let t=ua(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=ua(e);if("number"!=typeof n)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];ad(r)&&a$(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(aI(e,String(r++),t));return n}toString(e,t,n){return e?un(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let s of t){if("function"==typeof r){let n=t instanceof Set?s:String(e++);s=r.call(t,n,s)}i.items.push(aj(s,void 0,n))}}return i}}function ua(e){let t=ad(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let uu={collection:"seq",default:!0,nodeClass:ul,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(ap(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>ul.from(e,t,n)},uh={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,r)=>a2(e,t=Object.assign({actualString:!0},t),n,r)},uc={identify:e=>null==e,createNode:()=>new aR(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new aR(null),stringify:({source:e},t)=>"string"==typeof e&&uc.test.test(e)?e:t.options.nullStr},uf={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new aR("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&uf.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};function ud({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);let i="number"==typeof r?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let n=t-(s.length-e-1);for(;n-- >0;)s+="0"}return s}let up={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:ud},um={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ud(e)}},ug={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new aR(parseFloat(e)),n=e.indexOf(".");return -1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:ud},uy=e=>"bigint"==typeof e||Number.isInteger(e),ub=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function uv(e,t,n){let{value:r}=e;return uy(r)&&r>=0?n+r.toString(t):ud(e)}let uw={identify:e=>uy(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>ub(e,2,8,n),stringify:e=>uv(e,8,"0o")},uk={identify:uy,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ub(e,0,10,n),stringify:ud},uD={identify:e=>uy(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ub(e,2,16,n),stringify:e=>uv(e,16,"0x")},ux=[uo,uu,uh,uc,uf,uw,uk,uD,up,um,ug];function uA(e){return"bigint"==typeof e||Number.isInteger(e)}let uC=({value:e})=>JSON.stringify(e),uE=[uo,uu].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:uC},{identify:e=>null==e,createNode:()=>new aR(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:uC},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:uC},{identify:uA,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>uA(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:uC}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),uS={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}},stringify({comment:e,type:t,value:n},r,i,s){let o;if(!n)return"";if("function"==typeof btoa){let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);o=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=aR.BLOCK_LITERAL),t!==aR.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(o.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=o.substr(r,e);o=i.join(t===aR.BLOCK_LITERAL?"\n":" ")}return a2({comment:e,type:t,value:o},r,i,s)}};function u_(e,t){if(ap(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!af(r)){if(ac(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let e=r.items[0]||new ut(new aR(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}
|
|
47
|
+
${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}
|
|
48
|
+
${t.comment}`:r.comment}r=e}e.items[n]=af(r)?r:new ut(r)}}else t("Expected a sequence for this tag");return e}function uO(e,t,n){let{replacer:r}=n,i=new ul(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,l;if("function"==typeof r&&(e=r.call(t,String(s++),e)),Array.isArray(e))if(2===e.length)o=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[o=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(ue(o,l,n))}return i}let uF={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:u_,createNode:uO};class uP extends ul{constructor(){super(),this.add=us.prototype.add.bind(this),this.delete=us.prototype.delete.bind(this),this.get=us.prototype.get.bind(this),this.has=us.prototype.has.bind(this),this.set=us.prototype.set.bind(this),this.tag=uP.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;for(let e of(t?.onCreate&&t.onCreate(n),this.items)){let r,i;if(af(e)?(r=aI(e.key,"",t),i=aI(e.value,r,t)):r=aI(e,"",t),n.has(r))throw Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}static from(e,t,n){let r=uO(e,t,n),i=new this;return i.items=r.items,i}}uP.tag="tag:yaml.org,2002:omap";let uT={collection:"seq",identify:e=>e instanceof Map,nodeClass:uP,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=u_(e,t),r=[];for(let{key:e}of n.items)ad(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new uP,n)},createNode:(e,t,n)=>uP.from(e,t,n)};function uB({value:e,source:t},n){return t&&(e?uM:uI).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let uM={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new aR(!0),stringify:uB},uI={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new aR(!1),stringify:uB},uN=e=>"bigint"==typeof e||Number.isInteger(e);function uL(e,t,n,{intAsBigInt:r}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let s=parseInt(e,n);return"-"===i?-1*s:s}function u$(e,t,n){let{value:r}=e;if(uN(r)){let e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return ud(e)}class uR extends us{constructor(e){super(e),this.tag=uR.tag}add(e){let t;t=af(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new ut(e.key,null):new ut(e,null),ui(this.items,t.key)||this.items.push(t)}get(e,t){let n=ui(this.items,e);return!t&&af(n)?ad(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ui(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new ut(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error("Set items must all have null values")}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof r&&(e=r.call(t,e,e)),i.items.push(ue(e,null,n));return i}}uR.tag="tag:yaml.org,2002:set";let uj={collection:"map",identify:e=>e instanceof Set,nodeClass:uR,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>uR.from(e,t,n),resolve(e,t){if(ac(e))if(e.hasAllNullValues(!0))return Object.assign(new uR,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};function uz(e,t){let n=e[0],r="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),s=r.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===n?i(-1)*s:s}function uq(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return ud(e);let r="";t<0&&(r="-",t*=n(-1));let i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let uU={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>uz(e,n),stringify:uq},uV={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>uz(e,!1),stringify:uq},uH={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(uH.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,s,o,l]=t.map(Number),a=Date.UTC(n,r-1,i,s||0,o||0,l||0,t[7]?Number((t[7]+"00").substr(1,3)):0),u=t[8];if(u&&"Z"!==u){let e=uz(u,!1);30>Math.abs(e)&&(e*=60),a-=6e4*e}return new Date(a)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},uW=[uo,uu,uh,uc,uM,uI,{identify:uN,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>uL(e,2,2,n),stringify:e=>u$(e,2,"0b")},{identify:uN,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>uL(e,1,8,n),stringify:e=>u$(e,8,"0")},{identify:uN,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>uL(e,0,10,n),stringify:ud},{identify:uN,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>uL(e,2,16,n),stringify:e=>u$(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:ud},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ud(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new aR(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){let r=e.substring(n+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:ud},uS,a8,uT,uF,uj,uU,uV,uH],uK=new Map([["core",ux],["failsafe",[uo,uu,uh]],["json",uE],["yaml11",uW],["yaml-1.1",uW]]),uG={binary:uS,bool:uf,float:ug,floatExp:um,floatNaN:up,floatTime:uV,int:uk,intHex:uD,intOct:uw,intTime:uU,map:uo,merge:a8,null:uc,omap:uT,pairs:uF,seq:uu,set:uj,timestamp:uH},uJ={"tag:yaml.org,2002:binary":uS,"tag:yaml.org,2002:merge":a8,"tag:yaml.org,2002:omap":uT,"tag:yaml.org,2002:pairs":uF,"tag:yaml.org,2002:set":uj,"tag:yaml.org,2002:timestamp":uH};function uY(e,t,n){let r=uK.get(t);if(r&&!e)return n&&!r.includes(a8)?r.concat(a8):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(uK.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return n&&(i=i.concat(a8)),i.reduce((e,t)=>{let n="string"==typeof t?uG[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(uG).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}let uZ=(e,t)=>e.key<t.key?-1:+(e.key>t.key);class uQ{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(e)?uY(e,"compat"):e?uY(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=r?uJ:{},this.tags=uY(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,ai,{value:uo}),Object.defineProperty(this,ao,{value:uh}),Object.defineProperty(this,al,{value:uu}),this.sortMapEntries="function"==typeof s?s:!0===s?uZ:null}clone(){let e=Object.create(uQ.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class uX{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,aa,{value:ar});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:s}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new aF({version:s}),this.setSchema(s,n),this.contents=void 0===e?null:this.createNode(e,r,n)}clone(){let e=Object.create(uX.prototype,{[aa]:{value:ar}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ag(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){u0(this.contents)&&this.contents.add(e)}addIn(e,t){u0(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=aT(this);e.anchor=!t||n.has(t)?aB(t||"a",n):t}return new aL(e.anchor)}createNode(e,t,n){var r,i;let s,o,l,a;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),s=t}else void 0===n&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:u,anchorPrefix:h,flow:c,keepUndefined:f,onTagObj:d,tag:p}=n??{},{onAnchor:m,setAnchors:g,sourceObjects:y}=(r=this,i=h||"a",o=[],l=new Map,a=null,{onAnchor:e=>{o.push(e),a??(a=aT(r));let t=aB(i,a);return a.add(t),t},setAnchors:()=>{for(let e of o){let t=l.get(e);if("object"==typeof t&&t.anchor&&(ad(t.node)||am(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:l}),b={aliasDuplicateObjects:u??!0,keepUndefined:f??!1,onAnchor:m,onTagObj:d,replacer:s,schema:this.schema,sourceObjects:y},v=aj(e,p,b);return c&&am(v)&&(v.flow=!0),g(),v}createPair(e,t,n={}){return new ut(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return!!u0(this.contents)&&this.contents.delete(e)}deleteIn(e){return aq(e)?null!=this.contents&&(this.contents=null,!0):!!u0(this.contents)&&this.contents.deleteIn(e)}get(e,t){return am(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return aq(e)?!t&&ad(this.contents)?this.contents.value:this.contents:am(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!am(this.contents)&&this.contents.has(e)}hasIn(e){return aq(e)?void 0!==this.contents:!!am(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=az(this.schema,[e],t):u0(this.contents)&&this.contents.set(e,t)}setIn(e,t){aq(e)?this.contents=t:null==this.contents?this.contents=az(this.schema,Array.from(e),t):u0(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new aF({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new aF({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new uQ(Object.assign(n,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},l=aI(this.contents,t??"",o);if("function"==typeof i)for(let{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof s?aM(s,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let n=[],r=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");let i=a3(e,t),{commentString:s}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");let t=s(e.commentBefore);n.unshift(aH(t,""))}let o=!1,l=null;if(e.contents){if(ag(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){let t=s(e.contents.commentBefore);n.push(aH(t,""))}i.forceBlockIndent=!!e.comment,l=e.contents.comment}let t=l?void 0:()=>o=!0,a=a6(e.contents,i,()=>l=null,t);l&&(a+=aW(a,"",s(l))),("|"===a[0]||">"===a[0])&&"---"===n[n.length-1]?n[n.length-1]=`--- ${a}`:n.push(a)}else n.push(a6(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=s(e.comment);t.includes("\n")?(n.push("..."),n.push(aH(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,"")),t&&((!o||l)&&""!==n[n.length-1]&&n.push(""),n.push(aH(s(t),"")))}return n.join("\n")+"\n"}(this,e)}}function u0(e){if(am(e))return!0;throw Error("Expected a YAML collection as document contents")}class u1 extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}class u2 extends u1{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class u3 extends u1{constructor(e,t,n){super("YAMLWarning",e,t,n)}}let u6=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let e=Math.min(s-39,o.length-79);o="…"+o.substring(e),s-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-s)));let l=" ".repeat(s)+"^".repeat(e);n.message+=`:
|
|
49
|
+
|
|
50
|
+
${o}
|
|
51
|
+
${l}
|
|
52
|
+
`}};function u5(e,{flow:t,indicator:n,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:l}){let a=!1,u=l,h=l,c="",f="",d=!1,p=!1,m=null,g=null,y=null,b=null,v=null,w=null,k=null;for(let i of e)switch(p&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(u&&"comment"!==i.type&&"newline"!==i.type&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":!t&&("doc-start"!==n||r?.type!=="flow-collection")&&i.source.includes(" ")&&(m=i),h=!0;break;case"comment":{h||s(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=i.source.substring(1)||" ";c?c+=f+e:c=e,f="",u=!1;break}case"newline":u?c?c+=i.source:w&&"seq-item-ind"===n||(a=!0):f+=i.source,u=!0,d=!0,(g||y)&&(b=i),h=!0;break;case"anchor":g&&s(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&s(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=i,k??(k=i.offset),u=!1,h=!1,p=!0;break;case"tag":y&&s(i,"MULTIPLE_TAGS","A node can have at most one tag"),y=i,k??(k=i.offset),u=!1,h=!1,p=!0;break;case n:(g||y)&&s(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),w&&s(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),w=i,u="seq-item-ind"===n||"explicit-key-ind"===n,h=!1;break;case"comma":if(t){v&&s(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=i,u=!1,h=!1;break}default:s(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),u=!1,h=!1}let D=e[e.length-1],x=D?D.offset+D.source.length:i;return p&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:w,spaceBefore:a,comment:c,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:x,start:k??x}}function u8(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(u8(t.key)||u8(t.value))return!0}return!1;default:return!0}}function u4(e,t,n){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&("]"===r.source||"}"===r.source)&&u8(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function u9(e,t,n){let{uniqueKeys:r}=e.options;if(!1===r)return!1;let i="function"==typeof r?r:(e,t)=>e===t||ad(e)&&ad(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}let u7="All mapping items must start at the same column";function he(e,t,n,r){let i="";if(e){let s=!1,o="";for(let l of e){let{source:e,type:a}=l;switch(a){case"space":s=!0;break;case"comment":{n&&!s&&r(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),s=!0;break;default:r(l,"UNEXPECTED_TOKEN",`Unexpected ${a} at node end`)}t+=e.length}}return{comment:i,offset:t}}let ht="Block collections are not allowed within flow collections",hn=e=>e&&("block-map"===e.type||"block-seq"===e.type);function hr(e,t,n,r,i,s){let o="block-map"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,s){let o=new(s?.nodeClass??us)(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,a=null;for(let s of r.items){let{start:u,key:h,sep:c,value:f}=s,d=u5(u,{indicator:"explicit-key-ind",next:h??c?.[0],offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),p=!d.found;if(p){if(h&&("block-seq"===h.type?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(l,"BAD_INDENT",u7)),!d.anchor&&!d.tag&&!c){a=d.end,d.comment&&(o.comment?o.comment+="\n"+d.comment:o.comment=d.comment);continue}(d.newlineAfterProp||u8(h))&&i(h??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==r.indent&&i(l,"BAD_INDENT",u7);n.atKey=!0;let m=d.end,g=h?e(n,h,d,i):t(n,m,u,null,d,i);n.schema.compat&&u4(r.indent,h,i),n.atKey=!1,u9(n,o.items,g)&&i(m,"DUPLICATE_KEY","Map keys must be unique");let y=u5(c??[],{indicator:"map-value-ind",next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||"block-scalar"===h.type});if(l=y.end,y.found){p&&(f?.type!=="block-map"||y.hasNewline||i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&d.start<y.found.offset-1024&&i(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let a=f?e(n,f,y,i):t(n,l,c,null,y,i);n.schema.compat&&u4(r.indent,f,i),l=a.range[2];let u=new ut(g,a);n.options.keepSourceTokens&&(u.srcToken=s),o.items.push(u)}else{p&&i(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);let e=new ut(g);n.options.keepSourceTokens&&(e.srcToken=s),o.items.push(e)}}return a&&a<l&&i(a,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,l,a??l],o}(e,t,n,r,s):"block-seq"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,s){let o=new(s?.nodeClass??ul)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,a=null;for(let{start:s,value:u}of r.items){let h=u5(s,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||u)u?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{a=h.end,h.comment&&(o.comment=h.comment);continue}let c=u?e(n,u,h,i):t(n,h.end,s,null,h,i);n.schema.compat&&u4(r.indent,u,i),l=c.range[2],o.items.push(c)}return o.range=[r.offset,l,a??l],o}(e,t,n,r,s):function({composeNode:e,composeEmptyNode:t},n,r,i,s){let o="{"===r.start.source,l=o?"flow map":"flow sequence",a=new(s?.nodeClass??(o?us:ul))(n.schema);a.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=r.offset+r.start.source.length;for(let s=0;s<r.items.length;++s){let u=r.items[s],{start:c,key:f,sep:d,value:p}=u,m=u5(c,{flow:l,indicator:"explicit-key-ind",next:f??d?.[0],offset:h,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!d&&!p){0===s&&m.comma?i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):s<r.items.length-1&&i(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),m.comment&&(a.comment?a.comment+="\n"+m.comment:a.comment=m.comment),h=m.end;continue}!o&&n.options.strict&&u8(f)&&i(f,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)m.comma&&i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(m.comma||i(m.start,"MISSING_CHAR",`Missing , between ${l} items`),m.comment){let e="";l:for(let t of c)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break l;default:break l}if(e){let t=a.items[a.items.length-1];af(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(o||d||m.found){n.atKey=!0;let s=m.end,g=f?e(n,f,m,i):t(n,s,c,null,m,i);hn(f)&&i(g.range,"BLOCK_IN_FLOW",ht),n.atKey=!1;let y=u5(d??[],{flow:l,indicator:"map-value-ind",next:p,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(y.found){if(!o&&!m.found&&n.options.strict){if(d)for(let e of d){if(e===y.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<y.found.offset-1024&&i(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else p&&("source"in p&&p.source?.[0]===":"?i(p,"MISSING_CHAR",`Missing space after : in ${l}`):i(y.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let b=p?e(n,p,y,i):y.found?t(n,y.end,d,null,y,i):null;b?hn(p)&&i(b.range,"BLOCK_IN_FLOW",ht):y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);let v=new ut(g,b);if(n.options.keepSourceTokens&&(v.srcToken=u),o)u9(n,a.items,g)&&i(s,"DUPLICATE_KEY","Map keys must be unique"),a.items.push(v);else{let e=new us(n.schema);e.flow=!0,e.items.push(v);let t=(b??g).range;e.range=[g.range[0],t[1],t[2]],a.items.push(e)}h=b?b.range[2]:y.end}else{let r=p?e(n,p,m,i):t(n,m.end,d,null,m,i);a.items.push(r),h=r.range[2],hn(p)&&i(r.range,"BLOCK_IN_FLOW",ht)}}let c=o?"}":"]",[f,...d]=r.end,p=h;if(f?.source===c)p=f.offset+f.source.length;else{let e=l[0].toUpperCase()+l.substring(1),t=u?`${e} must end with a ${c}`:`${e} in block collection must be sufficiently indented and end with a ${c}`;i(h,u?"MISSING_CHAR":"BAD_INDENT",t),f&&1!==f.source.length&&d.unshift(f)}if(d.length>0){let e=he(d,p,n.options.strict,i);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[r.offset,p,e.offset]}else a.range=[r.offset,p,p];return a}(e,t,n,r,s),l=o.constructor;return"!"===i||i===l.tagName?o.tag=l.tagName:i&&(o.tag=i),o}function hi(e,t,n){let r=t.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],o=0,l="",a=-1;for(let t=1;t<i.length;++t){let n=i[t];if(l||"-"!==n&&"+"!==n){let r=Number(n);!o&&r?o=r:-1===a&&(a=e+t)}else l=n}-1!==a&&r(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,h="",c=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":u=!0;case"newline":c+=i.source.length;break;case"comment":n&&!u&&r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),c+=i.source.length,h=i.source.substring(1);break;case"error":r(i,"UNEXPECTED_TOKEN",i.message),c+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;r(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(c+=t.length)}}}return{mode:s,indent:o,chomp:l,comment:h,length:c}}(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let s=">"===i.mode?aR.BLOCK_FOLDED:aR.BLOCK_LITERAL,o=t.source?function(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[],l=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===i.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"",n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:s,comment:i.comment,range:[r,n,n]}}let a=t.indent+i.indent,u=t.offset+i.length,h=0;for(let t=0;t<l;++t){let[r,s]=o[t];if(""===s||"\r"===s)0===i.indent&&r.length>a&&(a=r.length);else{r.length<a&&n(u+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(a=r.length),h=t,0!==a||e.atRoot||n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=r.length+s.length+1}for(let e=o.length-1;e>=l;--e)o[e][0].length>a&&(l=e+1);let c="",f="",d=!1;for(let e=0;e<h;++e)c+=o[e][0].slice(a)+"\n";for(let e=h;e<l;++e){let[t,r]=o[e];u+=t.length+r.length+1;let l="\r"===r[r.length-1];if(l&&(r=r.slice(0,-1)),r&&t.length<a){let e=i.indent?"explicit indentation indicator":"first line",s=`Block scalar lines must not be less indented than their ${e}`;n(u-r.length-(l?2:1),"BAD_INDENT",s),t=""}s===aR.BLOCK_LITERAL?(c+=f+t.slice(a)+r,f="\n"):t.length>a||" "===r[0]?(" "===f?f="\n":d||"\n"!==f||(f="\n\n"),c+=f+t.slice(a)+r,f="\n",d=!0):""===r?"\n"===f?c+="\n":f="\n":(c+=f+r,f=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=l;e<o.length;++e)c+="\n"+o[e][0].slice(a);"\n"!==c[c.length-1]&&(c+="\n");break;default:c+="\n"}let p=r+i.length+t.source.length;return{value:c,type:s,comment:i.comment,range:[r,p,p]}}function hs(e,t,n){let r,i,{offset:s,type:o,source:l,end:a}=e,u=(e,t,r)=>n(s+e,t,r);switch(o){case"scalar":r=aR.PLAIN,i=function(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ho(e)}(l,u);break;case"single-quoted-scalar":var h,c;r=aR.QUOTE_SINGLE,h=l,c=u,("'"!==h[h.length-1]||1===h.length)&&c(h.length,"MISSING_CHAR","Missing closing 'quote"),i=ho(h.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":r=aR.QUOTE_DOUBLE,i=function(e,t){let n="";for(let r=1;r<e.length-1;++r){let i=e[r];if("\r"!==i||"\n"!==e[r+1])if("\n"===i){let{fold:t,offset:i}=function(e,t){let n="",r=e[t+1];for(;(" "===r||" "===r||"\n"===r||"\r"===r)&&("\r"!==r||"\n"===e[t+2]);)"\n"===r&&(n+="\n"),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}(e,r);n+=t,r=i}else if("\\"===i){let i=e[++r],s=hl[i];if(s)n+=s;else if("\n"===i)for(i=e[r+1];" "===i||" "===i;)i=e[++r+1];else if("\r"===i&&"\n"===e[r+1])for(i=e[++r+1];" "===i||" "===i;)i=e[++r+1];else if("x"===i||"u"===i||"U"===i){let s={x:2,u:4,U:8}[i];n+=function(e,t,n,r){let i=e.substr(t,n),s=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(s)){let i=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(s)}(e,r+1,s,t),r+=s}else{let i=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||" "===i){let t=r,s=e[r+1];for(;" "===s||" "===s;)s=e[++r+1];"\n"!==s&&("\r"!==s||"\n"!==e[r+2])&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(l,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[s,s+l.length,s+l.length]}}let f=s+l.length,d=he(a,f,t,n);return{value:i,type:r,comment:d.comment,range:[s,f,d.offset]}}function ho(e){let t,n;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),n=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],s=" ",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)""===r[1]?"\n"===s?i+=s:s="\n":(i+=s+r[1],s=" "),o=n.lastIndex;let l=/[ \t]*(.*)/sy;return l.lastIndex=o,r=l.exec(e),i+s+(r?.[1]??"")}let hl={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ha(e,t,n,r){let i,s,{value:o,type:l,comment:a,range:u}="block-scalar"===t.type?hi(e,t,r):hs(t,e.options.strict,r),h=n?e.directives.tagName(n.source,e=>r(n,"TAG_RESOLVE_FAILED",e)):null;i=e.options.stringKeys&&e.atKey?e.schema[ao]:h?function(e,t,n,r,i){if("!"===n)return e[ao];let s=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(!t.default||!t.test)return t;else s.push(t);for(let e of s)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[ao])}(e.schema,o,h,n,r):"scalar"===t.type?function({atKey:e,directives:t,schema:n},r,i,s){let o=n.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(r))||n[ao];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[ao];if(o.tag!==e.tag){let n=t.tagString(o.tag),r=t.tagString(e.tag);s(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n} or ${r}`,!0)}}return o}(e,o,t,r):e.schema[ao];try{let l=i.resolve(o,e=>r(n??t,"TAG_RESOLVE_FAILED",e),e.options);s=ad(l)?l:new aR(l)}catch(e){r(n??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),s=new aR(o)}return s.range=u,s.source=o,l&&(s.type=l),h&&(s.tag=h),i.format&&(s.format=i.format),a&&(s.comment=a),s}let hu={composeNode:hh,composeEmptyNode:hc};function hh(e,t,n,r){let i,s=e.atKey,{spaceBefore:o,comment:l,anchor:a,tag:u}=n,h=!0;switch(t.type){case"alias":i=function({options:e},{offset:t,source:n,end:r},i){let s=new aL(n.substring(1));""===s.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+n.length,l=he(r,o,e.strict,i);return s.range=[t,o,l.offset],l.comment&&(s.comment=l.comment),s}(e,t,r),(a||u)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":i=ha(e,t,u,r),a&&(i.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{i=function(e,t,n,r,i){let s=r.tag,o=s?t.directives.tagName(s.source,e=>i(s,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===n.type){let{anchor:e,newlineAfterProp:t}=r,n=e&&s?e.offset>s.offset?e:s:e??s;n&&(!t||t.offset<n.offset)&&i(n,"MISSING_CHAR","Missing newline after block sequence props")}let l="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!s||!o||"!"===o||o===us.tagName&&"map"===l||o===ul.tagName&&"seq"===l)return hr(e,t,n,i,o);let a=t.schema.tags.find(e=>e.tag===o&&e.collection===l);if(!a){let r=t.schema.knownTags[o];if(r?.collection!==l)return r?i(s,"BAD_COLLECTION_TYPE",`${r.tag} used for ${l} collection, but expects ${r.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),hr(e,t,n,i,o);t.schema.tags.push(Object.assign({},r,{default:!1})),a=r}let u=hr(e,t,n,i,o,a),h=a.resolve?.(u,e=>i(s,"TAG_RESOLVE_FAILED",e),t.options)??u,c=ag(h)?h:new aR(h);return c.range=u.range,c.tag=o,a?.format&&(c.format=a.format),c}(hu,e,t,n,r),a&&(i.anchor=a.source.substring(1))}catch(e){r(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",e),h=!1}}return i??(i=hc(e,t.offset,void 0,null,n,r)),a&&""===i.anchor&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!ad(i)||"string"!=typeof i.value||i.tag&&"tag:yaml.org,2002:str"!==i.tag)&&r(u??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(i.spaceBefore=!0),l&&("scalar"===t.type&&""===t.source?i.comment=l:i.commentBefore=l),e.options.keepSourceTokens&&h&&(i.srcToken=t),i}function hc(e,t,n,r,{spaceBefore:i,comment:s,anchor:o,tag:l,end:a},u){let h=ha(e,{type:"scalar",offset:function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];n?.type==="space";)e+=n.source.length,n=t[++r];break}}return e}(t,n,r),indent:-1,source:""},l,u);return o&&(h.anchor=o.source.substring(1),""===h.anchor&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=a),h}function hf(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function hd(e){let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){let s=e[i];switch(s[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(s.substring(1)||" "),n=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class hp{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=hf(e);r?this.warnings.push(new u3(i,t,n)):this.errors.push(new u2(i,t,n))},this.directives=new aF({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=hd(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
53
|
+
${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(am(i)&&!i.flow&&i.items.length>0){let e=i.items[0];af(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
|
|
54
|
+
${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
|
|
55
|
+
${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:hd(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let i=hf(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:n,start:r,value:i,end:s},o){let l=new uX(void 0,Object.assign({_directives:t},e)),a={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=u5(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&("block-map"===i.type||"block-seq"===i.type)&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?hh(a,i,u,o):hc(a,u.end,r,null,u,o);let h=l.contents.range[2],c=he(s,h,!1,o);return c.comment&&(l.comment=c.comment),l.range=[n,h,c.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new u2(hf(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new u2(hf(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=he(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
|
|
56
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new u2(hf(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new uX(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}function hm(e,t=!0,n){if(e){let r=(e,t,r)=>{let i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,r);else throw new u2([i,i+1],t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return hs(e,t,r);case"block-scalar":return hi({options:{strict:t}},e,r)}}return null}function hg(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=t,l=a2({type:o,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(l[0]){case"|":case">":{let e=l.indexOf("\n"),t=l.substring(0,e),n=l.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:s,indent:r,source:t}];return hb(i,a)||i.push({type:"newline",offset:-1,indent:r,source:"\n"}),{type:"block-scalar",offset:s,indent:r,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:l,end:a};default:return{type:"scalar",offset:s,indent:r,source:l,end:a}}}function hy(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,l="indent"in e?e.indent:null;if(r&&"number"==typeof l&&(l+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");o=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let a=a2({type:o,value:t},{implicitKey:i||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":!function(e,t){let n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=r,e.source=i}else{let{offset:t}=e,n="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:t,indent:n,source:r}];for(let t of(hb(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:n,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:s,source:i})}}(e,a);break;case'"':hv(e,a,"double-quoted-scalar");break;case"'":hv(e,a,"single-quoted-scalar");break;default:hv(e,a,"scalar")}}function hb(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function hv(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),i=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length),r))t.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}let hw=e=>"type"in e?hk(e):hD(e);function hk(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=hk(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=hD(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=hD(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=hD(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function hD({start:e,key:t,sep:n,value:r}){let i="";for(let t of e)i+=t.source;if(t&&(i+=hk(t)),n)for(let e of n)i+=e.source;return r&&(i+=hk(r)),i}let hx=Symbol("break visit"),hA=Symbol("skip children"),hC=Symbol("remove item");function hE(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,n,r){let i=r(n,t);if("symbol"==typeof i)return i;for(let s of["key","value"]){let o=n[s];if(o&&"items"in o){for(let n=0;n<o.items.length;++n){let i=e(Object.freeze(t.concat([[s,n]])),o.items[n],r);if("number"==typeof i)n=i-1;else{if(i===hx)return hx;i===hC&&(o.items.splice(n,1),n-=1)}}"function"==typeof i&&"key"===s&&(i=i(n,t))}}return"function"==typeof i?i(n,t):i}(Object.freeze([]),e,t)}hE.BREAK=hx,hE.SKIP=hA,hE.REMOVE=hC,hE.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},hE.parentCollection=(e,t)=>{let n=hE.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw Error("Parent collection not found")};let hS="\uFEFF",h_="\x02",hO="\x18",hF="\x1f",hP=e=>!!e&&"items"in e,hT=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function hB(e){switch(e){case hS:return"<BOM>";case h_:return"<DOC>";case hO:return"<FLOW_END>";case hF:return"<SCALAR>";default:return JSON.stringify(e)}}function hM(e){switch(e){case hS:return"byte-order-mark";case h_:return"doc-mode";case hO:return"flow-error-end";case hF:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function hI(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let hN=new Set("0123456789ABCDEFabcdef"),hL=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),h$=new Set(",[]{}"),hR=new Set(" ,[]{}\n\r "),hj=e=>!e||hR.has(e);class hz{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){let t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"!==t&&!(n>=this.indentNext)&&(t||this.atEnd)?-1:e+n}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&hI(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===hS&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){let r=e[n-1];if(" "===r||" "===r){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){let n=e[t-1];if(" "===n||" "===n)t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield h_,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&hI(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!hI(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&hI(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(hj),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(null===r)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&hI(r[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==r[0]&&"}"!==r[0]))return this.flowLevel=0,yield hO,yield*this.parseLineStart();let i=0;for(;","===r[i];)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r[i+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(hj),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||hI(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){let e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>hI(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,n=0;l:for(let r=this.pos;e=this.buffer[r];++r)switch(e){case" ":n+=1;break;case"\n":t=r,n=0;break;case"\r":{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break l}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(e=this.buffer[r];" "===e;)e=this.buffer[++r];if(" "===e){for(;" "===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);let i=e;for(;" "===r;)r=this.buffer[--e];if("\n"===r&&e>=this.pos&&e+1+n>i)t=e;else break}return yield hF,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,n=this.pos-1,r=this.pos-1;for(;e=this.buffer[++r];)if(":"===e){let e=this.buffer[r+1];if(hI(e)||t&&h$.has(e))break;n=r}else if(hI(e)){let i=this.buffer[r+1];if("\r"===e&&("\n"===i?(r+=1,e="\n",i=this.buffer[r+1]):n=r),"#"===i||t&&h$.has(i))break;if("\n"===e){let e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(t&&h$.has(e))break;n=r}return e||this.atEnd?(yield hF,yield*this.pushToIndex(n+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(hj))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(hI(t)||e&&h$.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!hI(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(hL.has(t))t=this.buffer[++e];else if("%"===t&&hN.has(this.buffer[e+1])&&hN.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do t=this.buffer[++n];while(" "===t||e&&" "===t);let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class hq{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}function hU(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function hV(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function hH(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function hW(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function hK(e){if(0===e.length)return[];let t=e.length;l:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break l}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function hG(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||hU(t.start,"explicit-key-ind")||hU(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,hH(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class hJ{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new hz,this.onNewLine=e}*parse(e,t=!1){for(let n of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=hM(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&hG(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===hV(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==hV(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,n=hK(hW(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case"newline":n.push(r);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(hU(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(hH(t.key)&&!hU(t.sep,"newline")){let e=hK(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(hU(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=hK(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):hU(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if("block-seq"===r.type){if(!t.explicitKey&&t.sep&&!hU(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||hU(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let n=hK(hW(t));hG(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=hK(hW(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=hK(hW(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function hY(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new hq||null,prettyErrors:t}}function hZ(e,t={}){let{lineCounter:n,prettyErrors:r}=hY(t),i=new hJ(n?.addNewLine),s=new hp(t),o=Array.from(s.compose(i.parse(e)));if(r&&n)for(let t of o)t.errors.forEach(u6(e,n)),t.warnings.forEach(u6(e,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function hQ(e,t={}){let{lineCounter:n,prettyErrors:r}=hY(t),i=new hJ(n?.addNewLine),s=new hp(t),o=null;for(let t of s.compose(i.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new u2(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=t;return r&&n&&(o.errors.forEach(u6(e,n)),o.warnings.forEach(u6(e,n))),o}function hX(e,t,n){let r;"function"==typeof t?r=t:void 0===n&&t&&"object"==typeof t&&(n=t);let i=hQ(e,n);if(!i)return null;if(i.warnings.forEach(e=>a5(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:r},n))}function h0(e,t,n){let r=null;if("function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??t??{};if(!e)return}return ah(e)&&!r?e.toString(n):new uX(e,r,n).toString(n)}function h1(e){let t=null;try{t=T.parse(e.doc.toString())}catch(e){}return{data:t,pointers:Q(e,G)}}let h2=e=>{switch(e){case K:return l7;case W:return at;case G:return h1}};var h3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};class h6{constructor(){this.completions=new Map,this.reservedKeys=new Set}reserve(e){this.reservedKeys.add(e)}add(e){this.reservedKeys.has(e.label)||this.completions.set(e.label,e)}}function h5(e){return!(!e||ex(e)||"UnknownPropertyError"===e.name||"undefined"===e.type)}class h8{constructor(e){var t,n,r;this.opts=e,this.originalSchema=null,this.schema=null,this.laxSchema=null,this.mode=K,this.mode=null!=(t=e.mode)?t:K,this.parser=null!=(r=null==(n=this.opts)?void 0:n.jsonParser)?r:h2(this.mode)}doComplete(e){var t;let n=e.state.field(ed);if(this.originalSchema!==n&&(this.schema=null!=(t=h9(n,n))?t:n,this.laxSchema=function e(t,n){if("string"==typeof t||"object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(t=>e(t,n));if(t instanceof Map){let r=new Map;for(let[i,s]of t){let t=e(s,n);r.set(i,t)}return r}if(t instanceof Set){let r=new Set;for(let i of t){let t=e(i,n);r.add(t)}return r}let r={};function i(t,i,s,o){s===t&&o===i?r[s]=e(i,n):r[s]=o}for(let[e,r]of Object.entries(t)){let t=n(e,r);if(2===t.length&&"string"==typeof t[0])i(e,r,t[0],t[1]);else for(let[n,s]of t)i(e,r,n,s)}return r}(this.schema,(e,t)=>"additionalProperties"===e&&!1===t||"required"===e&&Array.isArray(t)||"unevaluatedProperties"===e&&!1===t||"unevaluatedItems"===e&&!1===t?[]:[e,t])),!this.schema||!this.laxSchema)return[];I.log("xxx","trying with original schema");let r=this.doCompleteForSchema(e,this.schema);return 0!==r.options.length?r:(I.log("xxx","no completions with original schema, trying with lax schema"),this.doCompleteForSchema(e,this.laxSchema))}doCompleteForSchema(e,t){var n,r;let i={from:e.pos,to:e.pos,options:[],filter:!1},s=e.state.doc.sliceString(0),o=X(e.state,e.pos),l=e.state.sliceDoc(o.from,e.pos).replace(/^(["'])/,"");if(I.log("xxx","node",o,"prefix",l,"ctx",e),!(er(o,this.mode)||es(o,this.mode))&&!e.explicit)return I.log("xxx","no completions for non-word/primitive",o),i;let a=et(e.state.doc,o),u=et(e.state.doc,o,!1);if(o&&(er(o,this.mode)||es(o,this.mode)))i.from=o.from,i.to=o.to;else{let t=e.matchBefore(/[A-Za-z0-9._]*/),r=e.pos-a.length;I.log("xxx","overwriteStart after",r,"ctx.pos",e.pos,"word",t,"currentWord",a,"=>",s[r-1],"..",s[r],"..",s),i.from="⚠"===o.name?null!=(n=null==t?void 0:t.from)?n:e.pos:r,i.to=e.pos}let h=new h6,c=!0,f=eh(o,j,this.mode);if(f&&(I.log("xxx","closestPropertyNameNode",f,"node",o),o=f),es(o,this.mode)){I.log("xxx","isPropertyNameNode",o);let e=o.parent;if(e){let t=ea(e,this.mode);c=!t||"⚠"===t.name&&t.from-t.to==0||!!t.parent&&eo(t.parent).length<=1,I.log("xxx","addValue",c,ea(e,this.mode),o),o=null!=(r=eh(e,L,this.mode))?r:null}}if(I.log("xxx",o,a,e,"node at pos",X(e.state,e.pos)),o&&[L,z].includes(J(o.name,this.mode))&&(es(X(e.state,e.pos),this.mode)||f)){if(o.from===e.pos)return I.log("xxx","no completions for just before opening brace"),i;this.getPropertyCompletions(t,e,o,h,c,u)}else{let n=this.getValueCompletions(t,e,{},h);I.log("xxx","getValueCompletions res",n)}return i.options=Array.from(h.completions.values()).filter(e=>ee(e.label).startsWith(l)),I.log("xxx","result",i,"prefix",l,"collector.completions",h.completions,"reservedKeys",h.reservedKeys),i}applySnippetCompletion(e){return(0,B.Gw)("string"!=typeof e.apply?e.label:e.apply,e)}getPropertyCompletions(e,t,n,r,i,s){let o,l=(o=this.mode,eo(n).filter(e=>J(e.name,o)===R));I.log("xxx","getPropertyCompletions",n,t,l),l.forEach(e=>{let n=et(t.state.doc,el(e,j,this.mode));r.reserve(ee(n))});let a=this.getSchemas(e,t);I.log("xxx","propertyCompletion schemas",a),a.forEach(t=>{if("object"!=typeof t)return;let n=t.properties;n&&Object.entries(n).forEach(([t,n])=>{var o,l;if("object"==typeof n){let a=null!=(o=n.description)?o:"",u=null!=(l=n.type)?l:"",h=Array.isArray(u)?u.toString():u,c={label:t,apply:this.getInsertTextForProperty(t,i,s,e,n),type:"property",detail:h,info:()=>nQ("div",{inner:l4(a)})};r.add(this.applySnippetCompletion(c))}});let o=t.propertyNames;if("object"==typeof o&&(o.enum&&o.enum.forEach(t=>{let n=null==t?void 0:t.toString();if(n){let t={label:n,apply:this.getInsertTextForProperty(n,i,s,e),type:"property"};r.add(this.applySnippetCompletion(t))}}),o.const)){let t=o.const.toString(),n={label:t,apply:this.getInsertTextForProperty(t,i,s,e),type:"property"};r.add(this.applySnippetCompletion(n))}})}getInsertTextForProperty(e,t,n,r,i){let s;i=i?h9(i,r):i;let o=this.getInsertTextForPropertyName(e,n);if(!t)return o;o+=": ";let l=0;if("object"==typeof i){if(void 0!==i.default)s||(s=this.getInsertTextForGuessedValue(i.default,"")),l++;else if(i.enum&&(s||1!==i.enum.length||(s=this.getInsertTextForGuessedValue(i.enum[0],"")),l+=i.enum.length),void 0!==i.const&&(s||(s=this.getInsertTextForGuessedValue(i.const,"")),l++),Array.isArray(i.examples)&&i.examples.length&&(s||(s=this.getInsertTextForGuessedValue(i.examples[0],"")),l+=i.examples.length),void 0===s&&0===l){let e=Array.isArray(i.type)?i.type[0]:i.type;switch(!e&&(i.properties?e="object":i.items&&(e="array")),e){case"boolean":default:s="#{}";break;case"string":s=this.getInsertTextForString("");break;case"object":switch(this.mode){case W:s="{#{}}";break;case G:s="#{}";break;default:s="{#{}}"}break;case"array":s="[#{}]";break;case"number":case"integer":s="#{0}";break;case"null":s="#{null}"}}}return(!s||l>1)&&(I.log("xxx","value",s,"nValueProposals",l,i),s="#{}"),o+s}getInsertTextForPropertyName(e,t){switch(this.mode){case W:case G:if(t.startsWith('"'))return`"${e}"`;if(t.startsWith("'"))return`'${e}'`;return e;default:return`"${e}"`}}getInsertTextForString(e,t="#"){switch(this.mode){case W:return`'${t}{${e}}'`;case G:return`${t}{${e}}`;default:return`"${t}{${e}}"`}}getInsertTextForGuessedValue(e,t=""){switch(typeof e){case"object":if(null===e)return"${null}"+t;break;case"string":{let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),this.getInsertTextForString(n,"$")+t}case"number":case"boolean":return"${"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getInsertTextForPlainText(e){return e.replace(/[\\$}]/g,"\\$&")}getInsertTextForValue(e,t){let n=JSON.stringify(e,null," ");return"{}"===n?"{#{}}"+t:"[]"===n?"[#{}]"+t:this.getInsertTextForPlainText(n+t)}getValueCompletions(e,t,n,r){let i,s=(0,M.mv)(t.state).resolveInner(t.pos,-1),o=null;if(I.log("xxx","getValueCompletions",s,t),s&&er(s,this.mode)&&(o=s,s=s.parent),!s)return void this.addSchemaValueCompletions(e,n,r);if(J(s.name,this.mode)===R){let e=el(s,j,this.mode);e&&(i=et(t.state.doc,e),s=s.parent)}if(I.log("xxx","node",s,"parentKey",i),s&&(void 0!==i||J(s.name,this.mode)===$))for(let l of this.getSchemas(e,t)){if("object"!=typeof l)return;if(J(s.name,this.mode)===$&&l.items){let e=r;if(l.uniqueItems&&(e=Object.assign(Object.assign({},e),{add(t){e.completions.has(t.label)||r.add(t)},reserve(e){r.reserve(e)}})),Array.isArray(l.items)){let t=0;if(o){let e=eu(s,o,this.mode);e>=0&&(t=e)}let r=l.items[t];r&&this.addSchemaValueCompletions(r,n,e)}else this.addSchemaValueCompletions(l.items,n,e)}if((null==l.type||"object"!==l.type)&&this.addSchemaValueCompletions(l,n,r),void 0!==i){let e=!1;if(l.properties){let t=l.properties[i];t&&(e=!0,this.addSchemaValueCompletions(t,n,r))}if(l.patternProperties&&!e)for(let t of Object.keys(l.patternProperties)){let s=this.extendedRegExp(t);if(null==s?void 0:s.test(i)){e=!0;let i=l.patternProperties[t];i&&this.addSchemaValueCompletions(i,n,r)}}if(l.additionalProperties&&!e){let e=l.additionalProperties;this.addSchemaValueCompletions(e,n,r)}}n.boolean&&(this.addBooleanValueCompletion(!0,r),this.addBooleanValueCompletion(!1,r)),n.null&&this.addNullValueCompletion(r)}return{valuePrefix:o?et(t.state.doc,o,!0,!1):""}}addSchemaValueCompletions(e,t,n){"object"==typeof e&&(this.addEnumValueCompletions(e,n),this.addDefaultValueCompletions(e,n),this.collectTypes(e,t),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n)))}addDefaultValueCompletions(e,t,n=0){let r=!1;if(void 0!==e.default){let i=e.type,s=e.default;for(let e=n;e>0;e--)s=[s],i="array";let o=Object.assign(Object.assign({type:null==i?void 0:i.toString()},this.getAppliedValue(s)),{detail:"Default value"});t.add(o),r=!0}Array.isArray(e.examples)&&e.examples.forEach(i=>{let s=e.type,o=i;for(let e=n;e>0;e--)o=[o],s="array";t.add(Object.assign({type:null==s?void 0:s.toString()},this.getAppliedValue(o))),r=!0}),r||"object"!=typeof e.items||Array.isArray(e.items)||!(n<5)||this.addDefaultValueCompletions(e.items,t,n+1)}addEnumValueCompletions(e,t){var n,r;if(void 0!==e.const&&t.add(Object.assign(Object.assign({type:null==(n=e.type)?void 0:n.toString()},this.getAppliedValue(e.const)),{info:e.description})),Array.isArray(e.enum))for(let n=0,i=e.enum.length;n<i;n++){let i=e.enum[n];t.add(Object.assign(Object.assign({type:null==(r=e.type)?void 0:r.toString()},this.getAppliedValue(i)),{info:e.description}))}}addBooleanValueCompletion(e,t){t.add({type:"boolean",label:e?"true":"false"})}addNullValueCompletion(e){e.add({type:"null",label:"null"})}collectTypes(e,t){if(Array.isArray(e.enum)||void 0!==e.const)return;let n=e.type;Array.isArray(n)?n.forEach(e=>t[e]=!0):n&&(t[n]=!0)}getSchemas(e,t){var n,r,i;let{data:s}=this.parser(t.state),o=new nZ(e),l=Z(t.state,t.pos,-1,this.mode);if(""===l&&(l=void 0),null!=l&&l.endsWith("/")){let t=h4(e,s,l=l.substring(0,l.length-1));if(null!=t)return[t]}let a=null!=l?l.replace(/\/[^/]*$/,""):void 0;""===a&&(a=void 0);let u=h4(e,s,a),h=null==l?void 0:l.split("/").pop(),c=null==h||h in(null!=(n=null==u?void 0:u.properties)?n:{}),f=o.getSchema({pointer:l,data:null!=s?s:void 0});return(c||(null==f?void 0:f.type)!=="null"||"yaml"!==this.mode||(f=void 0),I.log("xxxx","draft.getSchema",f,"data",s,"pointer",l,"pointerPointsToKnownProperty",c),ex(f)&&(f=null==(r=f.data)?void 0:r.schema),!h5(f)&&u)?[u]:(h5(f)||(f=o.getSchema({pointer:a}),l=a),I.log("xxx","pointer..",JSON.stringify(l)),h5(f)||l&&"/"!==l||(f=null!=(i=h9(e,e))?i:e),I.log("xxx","subSchema..",f),f)?Array.isArray(f.allOf)?[f,...f.allOf.map(t=>h9(t,e))]:Array.isArray(f.oneOf)?[f,...f.oneOf.map(t=>h9(t,e))]:Array.isArray(f.anyOf)?[f,...f.anyOf.map(t=>h9(t,e))]:[f]:[]}getAppliedValue(e){let t=ee(JSON.stringify(e));switch(this.mode){case W:return{label:t,apply:JSON.stringify(e).replace(/^"(.*)"$/,"'$1'")};case G:return{label:t,apply:t};default:return{label:t,apply:JSON.stringify(e)}}}getValueFromLabel(e){return JSON.parse(e)}extendedRegExp(e){let t="";e.startsWith("(?i)")&&(e=e.substring(4),t="i");try{return RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}}function h4(e,t,n){let r=new nZ(e),i=r.getSchema({pointer:n,data:null!=t?t:void 0});if(!h5(i))return;let s=function e(t,n){if("object"!=typeof(n=h9(n,t.rootSchema))||null==n)return[];let r=[];function i(n){let i=e(t,n);r.push(...i)}if("object"==typeof n.properties&&null!=n.properties&&r.push(...Object.keys(n.properties)),"object"==typeof n.then&&null!=n.then&&i(n.then),Array.isArray(n.allOf))for(let e of n.allOf)i(e);if(Array.isArray(n.anyOf))for(let e of n.anyOf)i(e);if(Array.isArray(n.oneOf))for(let e of n.oneOf)i(e);return r}(r,i),o={};for(let e of s){var l,a;let i=(l=n,a=e,void 0===l?`/${a}`:`${l}/${a}`),s=r.getSchema({pointer:i,data:null!=t?t:void 0});h5(s)&&Object.assign(o,{[e]:s})}if(0===s.length||0===Object.keys(o).length)return;let{allOf:u,anyOf:h,oneOf:c}=i;return Object.assign(Object.assign({},h3(i,["allOf","anyOf","oneOf"])),{properties:o})}function h9(e,t){if("object"==typeof e&&e.$ref){var n;let r,i,s=(n=t,r=e.$ref.split("/"),i=n,r.forEach(e=>{if(e){if("#"===e){i=n;return}"object"==typeof i&&(i=i[e])}}),i);if("object"==typeof s){let t=Object.assign(Object.assign({},e),s);return Reflect.deleteProperty(t,"$ref"),t}}return e}let h7=(e,t)=>{let n=e.length>2,r=e.map((n,r)=>{let i="`"+(t?t(n):n)+"`";return r===e.length-1?"or "+i:i});return n?r.join(", "):r.join(" ")},ce=e=>e.startState.field(ed)!==e.state.field(ed),ct=["NoAdditionalPropertiesError","RequiredPropertyError","InvalidPropertyNameError","ForbiddenPropertyError","UndefinedValueError"];class cn{constructor(e){var t,n,r,i;this.options=e,this.schema=null,this.mode=K,this.rewriteError=e=>{var t,n,r,i,s;let o=null==e?void 0:e.data,l=null==o?void 0:o.errors;return"one-of-error"===e.code&&(null==l?void 0:l.length)?`Expected one of ${h7(l,e=>e.data.expected)}`:"type-error"===e.code?`Expected \`${(null==(t=null==e?void 0:e.data)?void 0:t.expected)&&Array.isArray(null==(n=null==e?void 0:e.data)?void 0:n.expected)?h7(null==(r=null==e?void 0:e.data)?void 0:r.expected):null==(i=null==e?void 0:e.data)?void 0:i.expected}\` but received \`${null==(s=null==e?void 0:e.data)?void 0:s.received}\``:e.message.replaceAll("in `#` ","").replaceAll("at `#`","").replaceAll("/",".").replaceAll("#.","")},this.mode=null!=(n=null==(t=this.options)?void 0:t.mode)?n:K,this.parser=null!=(i=null==(r=this.options)?void 0:r.jsonParser)?i:h2(this.mode)}get schemaTitle(){var e,t,n;return null!=(n=null==(t=null==(e=this.schema)?void 0:e.getSchema())?void 0:t.title)?n:"json-schema"}doValidation(e){let t=e.state.field(ed);if(!t||(this.schema=new nH(t),!this.schema))return[];let n=e.state.doc.toString();if(!(null==n?void 0:n.length))return[];let r=this.parser(e.state);if(null==r.data)return[];let i=[];try{i=this.schema.validate(r.data)}catch(e){}return(I.log("xxx","validation errors",i,r.data),i.length)?i.reduce((e,t)=>{var n,i,s;let o=()=>{let n=this.rewriteError(t);e.push({from:0,to:0,message:n,severity:"error",source:this.schemaTitle,renderMessage:()=>{let e=nQ("div",{});return e.innerHTML=l4(n),e}})},l=(null==(n=null==t?void 0:t.data)?void 0:n.pointer)&&(null==(i=null==t?void 0:t.data)?void 0:i.pointer)!=="#"?t.data.pointer.slice(1):(null==(s=null==t?void 0:t.data)?void 0:s.property)?`/${t.data.property}`:"",a=r.pointers.get(l);if("MaxPropertiesError"===t.name||"MinPropertiesError"===t.name||""===l)o();else if(a){let n=ct.includes(t.name),r=this.rewriteError(t),i=n?a.keyFrom:a.valueFrom,s=n?a.keyTo:a.valueTo;void 0!==s&&void 0!==i&&e.push({from:i,to:s,message:r,renderMessage:()=>{let e=nQ("div",{});return e.innerHTML=l4(r),e},severity:"error",source:this.schemaTitle})}else o();return e},[]):[]}}function cr(e){return e.type?e.$ref?`${e.$ref} (${e.type})`:e.type:e.$ref?`${e.$ref}`:void 0}function ci(e,t,n){return`${t}: ${h7(e[t].map(e=>{try{let{data:t}=n.resolveRef({data:e,pointer:e.$ref});if(t)return cr(t);return cr(e)}catch(t){return e.type}}))}`}class cs{constructor(e){var t,n;this.opts=e,this.schema=null,this.mode=K,this.opts=Object.assign({parser:JSON.parse},this.opts),this.mode=null!=(n=null==(t=this.opts)?void 0:t.mode)?n:K}getDataForCursor(e,t,n){let r,i=e.state.field(ed);if(!i)return null;this.schema=new nH(i);let s=Z(e.state,t,n,this.mode);try{r=this.opts.parser(e.state.doc.toString())}catch(e){}if(!s)return null;let o=this.schema.getSchema({pointer:s,data:r,withSchemaWarning:!0});return ex(o)&&(o=(null==o?void 0:o.data.schema.$ref)?this.schema.resolveRef(o):null==o?void 0:o.data.schema),{schema:o,pointer:s}}formatMessage(e){let{message:t,typeInfo:n}=e;return t?nQ("div",{class:"cm6-json-schema-hover"},[nQ("div",{class:"cm6-json-schema-hover--description",inner:l4(t,!1)}),nQ("div",{class:"cm6-json-schema-hover--code-wrapper"},[nQ("div",{class:"cm6-json-schema-hover--code",inner:l4(n,!1)})])]):nQ("div",{class:"cm6-json-schema-hover"},[nQ("div",{class:"cm6-json-schema-hover--code-wrapper"},[nQ("code",{class:"cm6-json-schema-hover--code",inner:l4(n,!1)})])])}getHoverTexts(e,t){let n="",r=null,{schema:i}=e;return i.oneOf&&(n=ci(i,"oneOf",t)),i.anyOf&&(n=ci(i,"anyOf",t)),i.allOf&&(n=ci(i,"allOf",t)),i.type&&(n=Array.isArray(i.type)?h7(i.type):i.type),i.$ref&&(n=` Reference: ${i.$ref}`),i.enum&&(n=`\`enum\`: ${h7(i.enum)}`),i.format&&(n+=`\`format\`: ${i.format}`),i.pattern&&(n+=`\`pattern\`: ${i.pattern}`),i.description&&(r=i.description),{message:r,typeInfo:n}}async doHover(e,t,n){var r,i,s,o;try{let l=this.getDataForCursor(e,t,n);if(I.log("cursorData",l),!(null==l?void 0:l.schema))return null;let a=(null!=(i=null==(r=this.opts)?void 0:r.getHoverTexts)?i:this.getHoverTexts)(l,this.schema),u=(null!=(o=null==(s=this.opts)?void 0:s.formatHover)?o:this.formatMessage)(a);return{pos:t,end:t,arrow:!0,above:!0,create:e=>({dom:u})}}catch(e){return I.log(e),null}}}var co=n(79066);class cl{constructor(e,t,n,r,i,s,o,l,a,u=0,h){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=s,this.buffer=o,this.bufferBase=l,this.curContext=a,this.lookAhead=u,this.parent=h}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new cl(e,[],t,n,n,0,[],0,r?new ca(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n){this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(r,this.reducePos);return}let l=this.stack.length-(n-1)*3-(262144&e?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(null==(t=this.p.parser.nodeSet.types[r])?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let h=l?this.stack[l-1]:0,c=this.bufferBase+this.buffer.length-h;if(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,a,e,c+4,!0)}if(262144&e)this.state=this.stack[l];else{let e=this.stack[l-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(0==r&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&(0!=this.buffer[i-4]||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:i}=this.p;this.pos=r;let s=i.stateFlag(e,1);!s&&(r>n||t<=i.maxNode)&&(this.reducePos=r),this.pushState(e,s?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new cl(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new cu(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||0>e.getGoto(this.stack[i],r,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new ca(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ca{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class cu{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}}class ch{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new ch(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new ch(this.stack,this.pos,this.index)}}function cc(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let s=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){s=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),s+=i,n)break;s*=46}n?n[i++]=s:n=new t(s)}return n}class cf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let cd=new cf;class cp{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cd,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((n=t)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=cd,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class cm{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;cg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}function cg(e,t,n,r,i,s){let o=0,l=1<<r,{dialect:a}=n.p.parser;s:for(;(l&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&l)>0){let n=e[r];if(a.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,r){let i=cy(n,r,t);return i<0||cy(n,r,e)<i}(n,t.token.value,i,s))){t.acceptToken(n);break}}let r=t.next,u=0,h=e[o+2];if(t.next<0&&h>u&&65535==e[n+3*h-3]){o=e[n+3*h-1];continue}for(;u<h;){let i=u+h>>1,s=n+i+(i<<1),l=e[s],a=e[s+1]||65536;if(r<l)h=i;else if(r>=a)u=i+1;else{o=e[s+2],t.advance();continue s}}break}}function cy(e,t,n){for(let r=t,i;65535!=(i=e[r]);r++)if(i==n)return r-t;return -1}cm.prototype.contextual=cm.prototype.fallback=cm.prototype.extend=!1,(class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?cc(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(cg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}).prototype.contextual=cm.prototype.fallback=cm.prototype.extend=!1;let cb="u">typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),cv=null;function cw(e,t,n){let r=e.cursor(co.Qj.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class ck{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?cw(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?cw(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],s=this.start[t]+n.positions[r];if(s>e)return this.nextStart=s,null;if(i instanceof co.PH){if(s==e){if(s<this.safeFrom)return null;let e=s+i.length;if(e<=this.safeTo){let t=i.prop(co.uY.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,s+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+i.length}}}class cD{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new cf)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,s=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let r=0;r<i.length;r++){if((1<<r&s)==0)continue;let a=i[r],u=this.tokens[r];if((!n||a.fallback)&&((a.contextual||u.start!=e.pos||u.mask!=s||u.context!=o)&&(this.updateCachedToken(u,a,e),u.mask=s,u.context=o),u.lookAhead>u.end+25&&(l=Math.max(u.lookAhead,l)),0!=u.value)){let r=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!a.extend&&(n=u,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),n||e.pos!=this.stream.end||((n=new cf).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new cf,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){(1&i)==0?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:s}=e.p,{data:o}=s;for(let e=0;e<2;e++)for(let l=s.stateSlot(i,e?2:1);;l+=3){if(65535==o[l])if(1==o[l+1])l=cS(o,l+2);else{0==r&&2==o[l+1]&&(r=this.putAction(cS(o,l+2),t,n,r));break}o[l]==t&&(r=this.putAction(cS(o,l+1),t,n,r))}return r}}class cx{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new cp(t,r),this.tokens=new cD(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[cl.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new ck(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<n.length;s++){let o=n[s];for(;;){if(this.tokens.mainToken=null,o.pos>r)i.push(o);else{if(this.advanceStack(o,i,n))continue;e||(e=[],t=[]),e.push(o);let r=this.tokens.getMainToken(o);t.push(r.value,r.end)}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return cb&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw cb&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return cb&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){a:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500)if((t.score-r.score||t.buffer.length-r.buffer.length)>0)i.splice(n--,1);else{i.splice(e--,1);continue a}}}i.length>12&&(i.sort((e,t)=>t.score-e.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,s=cb?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(co.uY.contextHash)||0)==n))return e.useNode(o,r),cb&&console.log(s+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof co.PH)||0==o.children.length||o.positions[0]>0)break;let l=o.children[0];if(l instanceof co.PH&&0==o.positions[0])o=l;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),cb&&console.log(s+this.stackID(e)+` (via always-reduce ${i.getName(65535&o)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let o=0;o<l.length;){let a=l[o++],u=l[o++],h=l[o++],c=o==l.length||!n,f=c?e:e.split(),d=this.tokens.mainToken;if(f.apply(a,u,d?d.start:f.pos,h),cb&&console.log(s+this.stackID(f)+` (via ${(65536&a)==0?"shift":`reduce of ${i.getName(65535&a)}`} for ${i.getName(u)} @ ${r}${f==e?"":", split"})`),c)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return cA(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let s=0;s<e.length;s++){let o=e[s],l=t[s<<1],a=t[(s<<1)+1],u=cb?this.stackID(o)+" -> ":"";if(o.deadEnd&&(i||(i=!0,o.restart(),cb&&console.log(u+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let h=o.split(),c=u;for(let e=0;e<10&&h.forceReduce()&&(cb&&console.log(c+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));e++)cb&&(c=this.stackID(h)+" -> ");for(let e of o.recoverByInsert(l))cb&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>o.pos?(a==o.pos&&(a++,l=0),o.recoverByDelete(l,a),cb&&console.log(u+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),cA(o,n)):(!r||r.score<h.score)&&(r=h)}return r}stackToTree(e){return e.close(),co.PH.build({buffer:ch.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(cv||(cv=new WeakMap)).get(e);return t||cv.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function cA(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class cC{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class cE extends co.iX{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=co.uY[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let s=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,s);n++}}}this.nodeSet=new co.fI(t.map((t,i)=>co.Z6.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let s=cc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(c_),this.states=cc(e.states,Uint32Array),this.data=cc(e.stateData),this.goto=cc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new cm(s,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new cx(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return -1;for(let i=r[t+1];;){let t=r[i++],s=1&t,o=r[i++];if(s&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(s)return -1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),s;;i+=3){if(65535==(s=n[i]))if(1==n[i+1])s=n[i=cS(n,i+2)];else if(2==n[i+1])return cS(n,i+2);else break;if(s==t||0==s)return cS(n,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=cS(this.data,n+2);else break;r=t(cS(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=cS(this.data,n+2);else break;if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(cE.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let s=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=c_(s),s})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;65535!=(i=this.data[n++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new cC(e,n,r)}static deserialize(e){return new cE(e)}}function cS(e,t){return e[t]|e[t+1]<<16}function c_(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var cO=n(49913);let cF=(0,cO.pn)({String:cO._A.string,Number:cO._A.number,"True False":cO._A.bool,PropertyName:cO._A.propertyName,Null:cO._A.null,", :":cO._A.separator,"[ ]":cO._A.squareBracket,"{ }":cO._A.brace}),cP=cE.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[cF],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),cT=M.bj.define({name:"json",parser:cP.configure({props:[M.Oh.add({Object:(0,M.mz)({except:/^\s*\}/}),Array:(0,M.mz)({except:/^\s*\]/})}),M.b_.add({"Object Array":M.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});var cB=n(50511),cM=n(41593);function cI(e){let t,n;return[new M.Yy(cT),(0,cM.bu)(e=>{try{JSON.parse(e.state.doc.toString())}catch(i){var t;let n;if(!(i instanceof SyntaxError))throw i;let r=(t=e.state.doc,(n=i.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=i.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0);return[{from:r,message:i.message,severity:"error",to:r}]}return[]}),(0,cM.bu)((t=new cn(void 0),e=>t.doValidation(e)),{needsRefresh:ce}),cT.data.of({autocomplete:function(e={}){let t=new h8(e);return function(e){return t.doComplete(e)}}()}),(0,cB.Ux)((n=new cs(void 0),async function(e,t,r){return n.doHover(e,t,r)})),[ed.init(()=>e)]]}},98104(e,t,n){"use strict";n.d(t,{G:()=>o});let r="u"<typeof Symbol?"__ͼ":Symbol.for("ͼ"),i="u"<typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="u">typeof globalThis?globalThis:"u">typeof window?window:{};class o{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,i,s,o){let l=[],a=/^@(\w+)\b/.exec(t[0]),u=a&&"keyframes"==a[1];if(a&&null==i)return s.push(t[0]+";");for(let n in i){let o=i[n];if(/&/.test(n))e(n.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),o,s);else if(o&&"object"==typeof o){if(!a)throw RangeError("The value of a property ("+n+") should be a primitive value.");e(r(n),o,l,u)}else null!=o&&l.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(l.length||u)&&s.push((n&&!a&&!o?t.map(n):t).join(", ")+" {"+l.join(" ")+"}")}(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=s[r]||1;return s[r]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[i],s=n&&n.nonce;r?s&&r.setNonce(s):r=new a(e,s),r.mount(Array.isArray(t)?t:[t],e)}}let l=new Map;class a{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=l.get(n);if(t)return e[i]=t;this.sheet=new r.CSSStyleSheet,l.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[i]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let s=e[t],o=this.modules.indexOf(s);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),n)for(let e=0;e<s.rules.length;e++)n.insertRule(s.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}}}]);
|