@wonderwhy-er/desktop-commander
Version:
MCP server for terminal operations and file editing
464 lines • 1.17 MB
JavaScript
"use strict";(()=>{var HM=Object.create;var sl=Object.defineProperty;var qM=Object.getOwnPropertyDescriptor;var WM=Object.getOwnPropertyNames;var VM=Object.getPrototypeOf,JM=Object.prototype.hasOwnProperty;var KM=(e,t,n)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zi=(e,t)=>{for(var n in t)sl(e,n,{get:t[n],enumerable:!0})},GM=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of WM(t))!JM.call(e,r)&&r!==n&&sl(e,r,{get:()=>t[r],enumerable:!(i=qM(t,r))||i.enumerable});return e};var ey=(e,t,n)=>(n=e!=null?HM(VM(e)):{},GM(t||!e||!e.__esModule?sl(n,"default",{value:e,enumerable:!0}):n,e));var At=(e,t,n)=>KM(e,typeof t!="symbol"?t+"":t,n);var Y$=Qv((xQ,X$)=>{function F$(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&F$(n)}),e}var Vu=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function B$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ir(e,...t){let n=Object.create(null);for(let i in e)n[i]=e[i];return t.forEach(function(i){for(let r in i)n[r]=i[r]}),n}var v8="</span>",N$=e=>!!e.scope,y8=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`},Dm=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=B$(t)}openNode(t){if(!N$(t))return;let n=y8(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){N$(t)&&(this.buffer+=v8)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},D$=(e={})=>{let t={children:[]};return Object.assign(t,e),t},Om=class e{constructor(){this.rootNode=D$(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=D$({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Rm=class extends Om{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new Dm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Xs(e){return e?typeof e=="string"?e:e.source:null}function U$(e){return ui("(?=",e,")")}function x8(e){return ui("(?:",e,")*")}function k8(e){return ui("(?:",e,")?")}function ui(...e){return e.map(n=>Xs(n)).join("")}function _8(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Lm(...e){return"("+(_8(e).capture?"":"?:")+e.map(i=>Xs(i)).join("|")+")"}function j$(e){return new RegExp(e.toString()+"|").exec("").length-1}function w8(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S8=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Fm(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;let r=n,o=Xs(i),s="";for(;o.length>0;){let a=S8.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+r):(s+=a[0],a[0]==="("&&n++)}return s}).map(i=>`(${i})`).join(t)}var E8=/\b\B/,Z$="[a-zA-Z]\\w*",Bm="[a-zA-Z_]\\w*",H$="\\b\\d+(\\.\\d+)?",q$="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",W$="\\b(0b[01]+)",$8="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",C8=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ui(t,/.*\b/,e.binary,/\b.*/)),Ir({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},Ys={begin:"\\\\[\\s\\S]",relevance:0},T8={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ys]},I8={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ys]},A8={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Ku=function(e,t,n={}){let i=Ir({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let r=Lm("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:ui(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},z8=Ku("//","$"),M8=Ku("/\\*","\\*/"),N8=Ku("#","$"),D8={scope:"number",begin:H$,relevance:0},O8={scope:"number",begin:q$,relevance:0},R8={scope:"number",begin:W$,relevance:0},P8={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ys,{begin:/\[/,end:/\]/,relevance:0,contains:[Ys]}]},L8={scope:"title",begin:Z$,relevance:0},F8={scope:"title",begin:Bm,relevance:0},B8={begin:"\\.\\s*"+Bm,relevance:0},U8=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Wu=Object.freeze({__proto__:null,APOS_STRING_MODE:T8,BACKSLASH_ESCAPE:Ys,BINARY_NUMBER_MODE:R8,BINARY_NUMBER_RE:W$,COMMENT:Ku,C_BLOCK_COMMENT_MODE:M8,C_LINE_COMMENT_MODE:z8,C_NUMBER_MODE:O8,C_NUMBER_RE:q$,END_SAME_AS_BEGIN:U8,HASH_COMMENT_MODE:N8,IDENT_RE:Z$,MATCH_NOTHING_RE:E8,METHOD_GUARD:B8,NUMBER_MODE:D8,NUMBER_RE:H$,PHRASAL_WORDS_MODE:A8,QUOTE_STRING_MODE:I8,REGEXP_MODE:P8,RE_STARTERS_RE:$8,SHEBANG:C8,TITLE_MODE:L8,UNDERSCORE_IDENT_RE:Bm,UNDERSCORE_TITLE_MODE:F8});function j8(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Z8(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function H8(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=j8,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function q8(e,t){Array.isArray(e.illegal)&&(e.illegal=Lm(...e.illegal))}function W8(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function V8(e,t){e.relevance===void 0&&(e.relevance=1)}var J8=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ui(n.beforeMatch,U$(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},K8=["of","and","for","in","not","or","if","then","parent","list","value"],G8="keyword";function V$(e,t,n=G8){let i=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(o){Object.assign(i,V$(e[o],t,o))}),i;function r(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){let l=a.split("|");i[l[0]]=[o,X8(l[0],l[1])]})}}function X8(e,t){return t?Number(t):Y8(e)?0:1}function Y8(e){return K8.includes(e.toLowerCase())}var O$={},li=e=>{console.error(e)},R$=(e,...t)=>{console.log(`WARN: ${e}`,...t)},co=(e,t)=>{O$[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),O$[`${e}/${t}`]=!0)},Ju=new Error;function J$(e,t,{key:n}){let i=0,r=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+i]=r[a],o[a+i]=!0,i+=j$(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Q8(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw li("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ju;if(typeof e.beginScope!="object"||e.beginScope===null)throw li("beginScope must be object"),Ju;J$(e,e.begin,{key:"beginScope"}),e.begin=Fm(e.begin,{joinWith:""})}}function e9(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw li("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ju;if(typeof e.endScope!="object"||e.endScope===null)throw li("endScope must be object"),Ju;J$(e,e.end,{key:"endScope"}),e.end=Fm(e.end,{joinWith:""})}}function t9(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function n9(e){t9(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Q8(e),e9(e)}function r9(e){function t(s,a){return new RegExp(Xs(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=j$(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(l=>l[1]);this.matcherRe=t(Fm(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(a);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(s){let a=new i;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){let l=s;if(s.isCompiled)return l;[Z8,W8,n9,J8].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[H8,q8,V8].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=V$(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=Xs(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return i9(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.starts,a),l.matcher=r(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ir(e.classNameAliases||{}),o(e)}function K$(e){return e?e.endsWithParent||K$(e.starts):!1}function i9(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ir(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:K$(e)?Ir(e,{starts:e.starts?Ir(e.starts):null}):Object.isFrozen(e)?Ir(e):e}var o9="11.11.1",Pm=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},Nm=B$,P$=Ir,L$=Symbol("nomatch"),s9=7,G$=function(e){let t=Object.create(null),n=Object.create(null),i=[],r=!0,o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Rm};function l(A){return a.noHighlightRe.test(A)}function u(A){let Z=A.className+" ";Z+=A.parentNode?A.parentNode.className:"";let q=a.languageDetectRe.exec(Z);if(q){let re=z(q[1]);return re||(R$(o.replace("{}",q[1])),R$("Falling back to no-highlight mode for this block.",A)),re?q[1]:"no-highlight"}return Z.split(/\s+/).find(re=>l(re)||z(re))}function c(A,Z,q){let re="",pe="";typeof Z=="object"?(re=A,q=Z.ignoreIllegals,pe=Z.language):(co("10.7.0","highlight(lang, code, ...args) has been deprecated."),co("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),pe=A,re=Z),q===void 0&&(q=!0);let _={code:re,language:pe};ve("before:highlight",_);let S=_.result?_.result:d(_.language,_.code,q);return S.code=_.code,ve("after:highlight",S),S}function d(A,Z,q,re){let pe=Object.create(null);function _($,D){return $.keywords[D]}function S(){if(!le.keywords){st.addText(Ae);return}let $=0;le.keywordPatternRe.lastIndex=0;let D=le.keywordPatternRe.exec(Ae),U="";for(;D;){U+=Ae.substring($,D.index);let ue=Ye.case_insensitive?D[0].toLowerCase():D[0],Se=_(le,ue);if(Se){let[at,Mn]=Se;if(st.addText(U),U="",pe[ue]=(pe[ue]||0)+1,pe[ue]<=s9&&(Gr+=Mn),at.startsWith("_"))U+=D[0];else{let Xr=Ye.classNameAliases[at]||at;oe(D[0],Xr)}}else U+=D[0];$=le.keywordPatternRe.lastIndex,D=le.keywordPatternRe.exec(Ae)}U+=Ae.substring($),st.addText(U)}function O(){if(Ae==="")return;let $=null;if(typeof le.subLanguage=="string"){if(!t[le.subLanguage]){st.addText(Ae);return}$=d(le.subLanguage,Ae,!0,Vo[le.subLanguage]),Vo[le.subLanguage]=$._top}else $=p(Ae,le.subLanguage.length?le.subLanguage:null);le.relevance>0&&(Gr+=$.relevance),st.__addSublanguage($._emitter,$.language)}function L(){le.subLanguage!=null?O():S(),Ae=""}function oe($,D){$!==""&&(st.startScope(D),st.addText($),st.endScope())}function ee($,D){let U=1,ue=D.length-1;for(;U<=ue;){if(!$._emit[U]){U++;continue}let Se=Ye.classNameAliases[$[U]]||$[U],at=D[U];Se?oe(at,Se):(Ae=at,S(),Ae=""),U++}}function $e($,D){return $.scope&&typeof $.scope=="string"&&st.openNode(Ye.classNameAliases[$.scope]||$.scope),$.beginScope&&($.beginScope._wrap?(oe(Ae,Ye.classNameAliases[$.beginScope._wrap]||$.beginScope._wrap),Ae=""):$.beginScope._multi&&(ee($.beginScope,D),Ae="")),le=Object.create($,{parent:{value:le}}),le}function ft($,D,U){let ue=w8($.endRe,U);if(ue){if($["on:end"]){let Se=new Vu($);$["on:end"](D,Se),Se.isMatchIgnored&&(ue=!1)}if(ue){for(;$.endsParent&&$.parent;)$=$.parent;return $}}if($.endsWithParent)return ft($.parent,D,U)}function ke($){return le.matcher.regexIndex===0?(Ae+=$[0],1):(ji=!0,0)}function Re($){let D=$[0],U=$.rule,ue=new Vu(U),Se=[U.__beforeBegin,U["on:begin"]];for(let at of Se)if(at&&(at($,ue),ue.isMatchIgnored))return ke(D);return U.skip?Ae+=D:(U.excludeBegin&&(Ae+=D),L(),!U.returnBegin&&!U.excludeBegin&&(Ae=D)),$e(U,$),U.returnBegin?0:D.length}function vt($){let D=$[0],U=Z.substring($.index),ue=ft(le,$,U);if(!ue)return L$;let Se=le;le.endScope&&le.endScope._wrap?(L(),oe(D,le.endScope._wrap)):le.endScope&&le.endScope._multi?(L(),ee(le.endScope,$)):Se.skip?Ae+=D:(Se.returnEnd||Se.excludeEnd||(Ae+=D),L(),Se.excludeEnd&&(Ae=D));do le.scope&&st.closeNode(),!le.skip&&!le.subLanguage&&(Gr+=le.relevance),le=le.parent;while(le!==ue.parent);return ue.starts&&$e(ue.starts,$),Se.returnEnd?0:D.length}function It(){let $=[];for(let D=le;D!==Ye;D=D.parent)D.scope&&$.unshift(D.scope);$.forEach(D=>st.openNode(D))}let Xe={};function Ne($,D){let U=D&&D[0];if(Ae+=$,U==null)return L(),0;if(Xe.type==="begin"&&D.type==="end"&&Xe.index===D.index&&U===""){if(Ae+=Z.slice(D.index,D.index+1),!r){let ue=new Error(`0 width match regex (${A})`);throw ue.languageName=A,ue.badRule=Xe.rule,ue}return 1}if(Xe=D,D.type==="begin")return Re(D);if(D.type==="illegal"&&!q){let ue=new Error('Illegal lexeme "'+U+'" for mode "'+(le.scope||"<unnamed>")+'"');throw ue.mode=le,ue}else if(D.type==="end"){let ue=vt(D);if(ue!==L$)return ue}if(D.type==="illegal"&&U==="")return Ae+=`
`,1;if(Ui>1e5&&Ui>D.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=U,U.length}let Ye=z(A);if(!Ye)throw li(o.replace("{}",A)),new Error('Unknown language: "'+A+'"');let Bi=r9(Ye),An="",le=re||Bi,Vo={},st=new a.__emitter(a);It();let Ae="",Gr=0,zn=0,Ui=0,ji=!1;try{if(Ye.__emitTokens)Ye.__emitTokens(Z,st);else{for(le.matcher.considerAll();;){Ui++,ji?ji=!1:le.matcher.considerAll(),le.matcher.lastIndex=zn;let $=le.matcher.exec(Z);if(!$)break;let D=Z.substring(zn,$.index),U=Ne(D,$);zn=$.index+U}Ne(Z.substring(zn))}return st.finalize(),An=st.toHTML(),{language:A,value:An,relevance:Gr,illegal:!1,_emitter:st,_top:le}}catch($){if($.message&&$.message.includes("Illegal"))return{language:A,value:Nm(Z),illegal:!0,relevance:0,_illegalBy:{message:$.message,index:zn,context:Z.slice(zn-100,zn+100),mode:$.mode,resultSoFar:An},_emitter:st};if(r)return{language:A,value:Nm(Z),illegal:!1,relevance:0,errorRaised:$,_emitter:st,_top:le};throw $}}function f(A){let Z={value:Nm(A),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return Z._emitter.addText(A),Z}function p(A,Z){Z=Z||a.languages||Object.keys(t);let q=f(A),re=Z.filter(z).filter(ce).map(L=>d(L,A,!1));re.unshift(q);let pe=re.sort((L,oe)=>{if(L.relevance!==oe.relevance)return oe.relevance-L.relevance;if(L.language&&oe.language){if(z(L.language).supersetOf===oe.language)return 1;if(z(oe.language).supersetOf===L.language)return-1}return 0}),[_,S]=pe,O=_;return O.secondBest=S,O}function h(A,Z,q){let re=Z&&n[Z]||q;A.classList.add("hljs"),A.classList.add(`language-${re}`)}function m(A){let Z=null,q=u(A);if(l(q))return;if(ve("before:highlightElement",{el:A,language:q}),A.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",A);return}if(A.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(A)),a.throwUnescapedHTML))throw new Pm("One of your code blocks includes unescaped HTML.",A.innerHTML);Z=A;let re=Z.textContent,pe=q?c(re,{language:q,ignoreIllegals:!0}):p(re);A.innerHTML=pe.value,A.dataset.highlighted="yes",h(A,q,pe.language),A.result={language:pe.language,re:pe.relevance,relevance:pe.relevance},pe.secondBest&&(A.secondBest={language:pe.secondBest.language,relevance:pe.secondBest.relevance}),ve("after:highlightElement",{el:A,result:pe,text:re})}function b(A){a=P$(a,A)}let g=()=>{k(),co("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){k(),co("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function k(){function A(){k()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",A,!1),x=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function E(A,Z){let q=null;try{q=Z(e)}catch(re){if(li("Language definition for '{}' could not be registered.".replace("{}",A)),r)li(re);else throw re;q=s}q.name||(q.name=A),t[A]=q,q.rawDefinition=Z.bind(null,e),q.aliases&&H(q.aliases,{languageName:A})}function C(A){delete t[A];for(let Z of Object.keys(n))n[Z]===A&&delete n[Z]}function M(){return Object.keys(t)}function z(A){return A=(A||"").toLowerCase(),t[A]||t[n[A]]}function H(A,{languageName:Z}){typeof A=="string"&&(A=[A]),A.forEach(q=>{n[q.toLowerCase()]=Z})}function ce(A){let Z=z(A);return Z&&!Z.disableAutodetect}function Ze(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=Z=>{A["before:highlightBlock"](Object.assign({block:Z.el},Z))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=Z=>{A["after:highlightBlock"](Object.assign({block:Z.el},Z))})}function Fe(A){Ze(A),i.push(A)}function Ie(A){let Z=i.indexOf(A);Z!==-1&&i.splice(Z,1)}function ve(A,Z){let q=A;i.forEach(function(re){re[q]&&re[q](Z)})}function Y(A){return co("10.7.0","highlightBlock will be removed entirely in v12.0"),co("10.7.0","Please use highlightElement now."),m(A)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:k,highlightElement:m,highlightBlock:Y,configure:b,initHighlighting:g,initHighlightingOnLoad:v,registerLanguage:E,unregisterLanguage:C,listLanguages:M,getLanguage:z,registerAliases:H,autoDetection:ce,inherit:P$,addPlugin:Fe,removePlugin:Ie}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=o9,e.regex={concat:ui,lookahead:U$,either:Lm,optional:k8,anyNumberOfTimes:x8};for(let A in Wu)typeof Wu[A]=="object"&&F$(Wu[A]);return Object.assign(e,Wu),e},fo=G$({});fo.newInstance=()=>G$({});X$.exports=fo;fo.HighlightJS=fo;fo.default=fo});var Az=Qv((Sle,Iz)=>{var Tv=!0,Cz=!1,Tz=!1;Iz.exports=function(e,t){t&&(Tv=!t.enabled,Cz=!!t.label,Tz=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var i=n.tokens,r=2;r<i.length;r++)sq(i,r)&&(aq(i[r],n.Token),$z(i[r-2],"class","task-list-item"+(Tv?"":" enabled")),$z(i[oq(i,r-2)],"class","contains-task-list"))})};function $z(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function oq(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function sq(e,t){return fq(e[t])&&pq(e[t-1])&&hq(e[t-2])&&mq(e[t])}function aq(e,t){if(e.children.unshift(lq(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Cz)if(Tz){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(dq(e.content,n,t))}else e.children.unshift(uq(t)),e.children.push(cq(t))}function lq(e,t){var n=new t("html_inline","",0),i=Tv?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),n}function uq(e){var t=new e("html_inline","",0);return t.content="<label>",t}function cq(e){var t=new e("html_inline","",0);return t.content="</label>",t}function dq(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}function fq(e){return e.type==="inline"}function pq(e){return e.type==="paragraph_open"}function hq(e){return e.type==="list_item_open"}function mq(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var vV=Object.freeze({status:"aborted"});function I(e,t,n){function i(a,l){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,l);for(let c in s.prototype)c in a||Object.defineProperty(a,c,{value:s.prototype[c].bind(a)});a._zod.constr=s,a._zod.def=l}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(a){var l;let u=n?.Parent?new o:this;i(u,a),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Xn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},al={};function sn(e){return e&&Object.assign(al,e),al}var Ce={};Zi(Ce,{BIGINT_FORMAT_RANGES:()=>ny,Class:()=>Sf,NUMBER_FORMAT_RANGES:()=>Mf,aborted:()=>Qr,allowsEval:()=>If,assert:()=>t3,assertEqual:()=>XM,assertIs:()=>QM,assertNever:()=>e3,assertNotEqual:()=>YM,assignProp:()=>Tf,cached:()=>Go,captureStackTrace:()=>ul,cleanEnum:()=>h3,cleanRegex:()=>Yo,clone:()=>Nn,createTransparentProxy:()=>a3,defineLazy:()=>Be,esc:()=>Yr,escapeRegex:()=>_r,extend:()=>c3,finalizeIssue:()=>En,floatSafeRemainder:()=>Cf,getElementAtPath:()=>n3,getEnumValues:()=>Ef,getLengthableOrigin:()=>Qo,getParsedType:()=>s3,getSizableOrigin:()=>ry,isObject:()=>Hi,isPlainObject:()=>qi,issue:()=>Nf,joinValues:()=>ll,jsonStringifyReplacer:()=>$f,merge:()=>d3,normalizeParams:()=>ne,nullish:()=>Xo,numKeys:()=>o3,omit:()=>u3,optionalKeys:()=>zf,partial:()=>f3,pick:()=>l3,prefixIssues:()=>Dn,primitiveTypes:()=>ty,promiseAllObject:()=>r3,propertyKeyTypes:()=>Af,randomString:()=>i3,required:()=>p3,stringifyPrimitive:()=>cl,unwrapMessage:()=>Ko});function XM(e){return e}function YM(e){return e}function QM(e){}function e3(e){throw new Error}function t3(e){}function Ef(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function ll(e,t="|"){return e.map(n=>cl(n)).join(t)}function $f(e,t){return typeof t=="bigint"?t.toString():t}function Go(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Xo(e){return e==null}function Yo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Cf(e,t){let n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(e.toFixed(r).replace(".","")),s=Number.parseInt(t.toFixed(r).replace(".",""));return o%s/10**r}function Be(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}throw new Error("cached value already set")},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Tf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function n3(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function r3(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function i3(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Yr(e){return JSON.stringify(e)}var ul=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Hi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var If=Go(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function qi(e){if(Hi(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Hi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var s3=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Af=new Set(["string","number","symbol"]),ty=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _r(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nn(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function a3(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function cl(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function zf(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Mf={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ny={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function l3(e,t){let n={},i=e._zod.def;for(let r in t){if(!(r in i.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(n[r]=i.shape[r])}return Nn(e,{...e._zod.def,shape:n,checks:[]})}function u3(e,t){let n={...e._zod.def.shape},i=e._zod.def;for(let r in t){if(!(r in i.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete n[r]}return Nn(e,{...e._zod.def,shape:n,checks:[]})}function c3(e,t){if(!qi(t))throw new Error("Invalid input to extend: expected a plain object");let n={...e._zod.def,get shape(){let i={...e._zod.def.shape,...t};return Tf(this,"shape",i),i},checks:[]};return Nn(e,n)}function d3(e,t){return Nn(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Tf(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function f3(e,t,n){let i=t._zod.def.shape,r={...i};if(n)for(let o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(let o in i)r[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Nn(t,{...t._zod.def,shape:r,checks:[]})}function p3(e,t,n){let i=t._zod.def.shape,r={...i};if(n)for(let o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)r[o]=new e({type:"nonoptional",innerType:i[o]});return Nn(t,{...t._zod.def,shape:r,checks:[]})}function Qr(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Dn(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Ko(e){return typeof e=="string"?e:e?.message}function En(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=Ko(e.inst?._zod.def?.error?.(e))??Ko(t?.error?.(e))??Ko(n.customError?.(e))??Ko(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function ry(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Qo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nf(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function h3(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Sf=class{constructor(...t){}};var iy=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,$f,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dl=I("$ZodError",iy),Df=I("$ZodError",iy,{Parent:Error});function oy(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function sy(e,t){let n=t||function(o){return o.message},i={_errors:[]},r=o=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>r({issues:a}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)i._errors.push(n(s));else{let a=i,l=0;for(;l<s.path.length;){let u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return r(e),i}var ay=e=>(t,n,i,r)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Xn;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>En(l,o,sn())));throw ul(a,r?.callee),a}return s.value};var ly=e=>async(t,n,i,r)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>En(l,o,sn())));throw ul(a,r?.callee),a}return s.value};var Of=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Xn;return o.issues.length?{success:!1,error:new(e??dl)(o.issues.map(s=>En(s,r,sn())))}:{success:!0,data:o.value}},es=Of(Df),Rf=e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>En(s,r,sn())))}:{success:!0,data:o.value}},fl=Rf(Df);var uy=/^[cC][^\s-]{8,}$/,cy=/^[0-9a-z]+$/,dy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fy=/^[0-9a-vA-V]{20}$/,py=/^[A-Za-z0-9]{27}$/,hy=/^[a-zA-Z0-9_-]{21}$/,my=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var gy=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var by=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var g3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vy(){return new RegExp(g3,"u")}var yy=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,ky=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,_y=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Lf=/^[A-Za-z0-9_-]*$/,Sy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Ey=/^\+(?:[0-9]){6,14}[0-9]$/,$y="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Cy=new RegExp(`^${$y}$`);function Ty(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Iy(e){return new RegExp(`^${Ty(e)}$`)}function Ay(e){let t=Ty({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${$y}T(?:${i})$`)}var zy=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var My=/^\d+$/,Ny=/^-?\d+(?:\.\d+)?/i,Dy=/true|false/i,Oy=/null/i;var Ry=/^[^A-Z]*$/,Py=/^[^a-z]*$/;var zt=I("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ly={number:"number",bigint:"bigint",object:"date"},Bf=I("$ZodCheckLessThan",(e,t)=>{zt.init(e,t);let n=Ly[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Uf=I("$ZodCheckGreaterThan",(e,t)=>{zt.init(e,t);let n=Ly[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fy=I("$ZodCheckMultipleOf",(e,t)=>{zt.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Cf(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),By=I("$ZodCheckNumberFormat",(e,t)=>{zt.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Mf[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=o,n&&(a.pattern=My)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}});var Uy=I("$ZodCheckMaxLength",(e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Xo(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let s=Qo(r);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jy=I("$ZodCheckMinLength",(e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Xo(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let s=Qo(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zy=I("$ZodCheckLengthEquals",(e,t)=>{var n;zt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Xo(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let s=Qo(r),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),ts=I("$ZodCheckStringFormat",(e,t)=>{var n,i;zt.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Hy=I("$ZodCheckRegex",(e,t)=>{ts.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qy=I("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ry),ts.init(e,t)}),Wy=I("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Py),ts.init(e,t)}),Vy=I("$ZodCheckIncludes",(e,t)=>{zt.init(e,t);let n=_r(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Jy=I("$ZodCheckStartsWith",(e,t)=>{zt.init(e,t);let n=new RegExp(`^${_r(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Ky=I("$ZodCheckEndsWith",(e,t)=>{zt.init(e,t);let n=new RegExp(`.*${_r(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});var Gy=I("$ZodCheckOverwrite",(e,t)=>{zt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var pl=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
`).filter(s=>s),r=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
`))}};var Yy={major:4,minor:0,patch:0};var Ue=I("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yy;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(o,s,a)=>{let l=Qr(o),u;for(let c of s){if(c._zod.def.when){if(!c._zod.def.when(o))continue}else if(l)continue;let d=o.issues.length,f=c._zod.check(o);if(f instanceof Promise&&a?.async===!1)throw new Xn;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,o.issues.length!==d&&(l||(l=Qr(o,d)))});else{if(o.issues.length===d)continue;l||(l=Qr(o,d))}}return u?u.then(()=>o):o};e._zod.run=(o,s)=>{let a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new Xn;return a.then(l=>r(l,i,s))}return r(a,i,s)}}e["~standard"]={validate:r=>{try{let o=es(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return fl(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),ml=I("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??zy(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),He=I("$ZodStringFormat",(e,t)=>{ts.init(e,t),ml.init(e,t)}),l1=I("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gy),He.init(e,t)}),u1=I("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Pf(i))}else t.pattern??(t.pattern=Pf());He.init(e,t)}),c1=I("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=by),He.init(e,t)}),d1=I("$ZodURL",(e,t)=>{He.init(e,t),e._zod.check=n=>{try{let i=n.value,r=new URL(i),o=r.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Sy.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),!i.endsWith("/")&&o.endsWith("/")?n.value=o.slice(0,-1):n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),f1=I("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vy()),He.init(e,t)}),p1=I("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hy),He.init(e,t)}),h1=I("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=uy),He.init(e,t)}),m1=I("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cy),He.init(e,t)}),g1=I("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dy),He.init(e,t)}),b1=I("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fy),He.init(e,t)}),v1=I("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=py),He.init(e,t)}),y1=I("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ay(t)),He.init(e,t)}),x1=I("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cy),He.init(e,t)}),k1=I("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iy(t)),He.init(e,t)}),_1=I("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=my),He.init(e,t)}),w1=I("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yy),He.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format="ipv4"})}),S1=I("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xy),He.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),E1=I("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ky),He.init(e,t)}),$1=I("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_y),He.init(e,t),e._zod.check=n=>{let[i,r]=n.value.split("/");try{if(!r)throw new Error;let o=Number(r);if(`${o}`!==r)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function C1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var T1=I("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=wy),He.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{C1(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function b3(e){if(!Lf.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return C1(n)}var I1=I("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Lf),He.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{b3(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),A1=I("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ey),He.init(e,t)});function v3(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var z1=I("$ZodJWT",(e,t)=>{He.init(e,t),e._zod.check=n=>{v3(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}});var Zf=I("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ny,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),M1=I("$ZodNumber",(e,t)=>{By.init(e,t),Zf.init(e,t)}),N1=I("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=Dy,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}});var D1=I("$ZodNull",(e,t)=>{Ue.init(e,t),e._zod.pattern=Oy,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}});var O1=I("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=n=>n}),R1=I("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Qy(e,t,n){e.issues.length&&t.issues.push(...Dn(n,e.issues)),t.value[n]=e.value}var P1=I("$ZodArray",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],l=t.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(u=>Qy(u,n,s))):Qy(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function hl(e,t,n){e.issues.length&&t.issues.push(...Dn(n,e.issues)),t.value[n]=e.value}function e1(e,t,n,i){e.issues.length?i[n]===void 0?n in i?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...Dn(n,e.issues)):e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}var L1=I("$ZodObject",(e,t)=>{Ue.init(e,t);let n=Go(()=>{let d=Object.keys(t.shape);for(let p of d)if(!(t.shape[p]instanceof Ue))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);let f=zf(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});Be(e._zod,"propValues",()=>{let d=t.shape,f={};for(let p in d){let h=d[p]._zod;if(h.values){f[p]??(f[p]=new Set);for(let m of h.values)f[p].add(m)}}return f});let i=d=>{let f=new pl(["shape","payload","ctx"]),p=n.value,h=v=>{let x=Yr(v);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),b=0;for(let v of p.keys)m[v]=`key_${b++}`;f.write("const newResult = {}");for(let v of p.keys)if(p.optionalKeys.has(v)){let x=m[v];f.write(`const ${x} = ${h(v)};`);let k=Yr(v);f.write(`
if (${x}.issues.length) {
if (input[${k}] === undefined) {
if (${k} in input) {
newResult[${k}] = undefined;
}
} else {
payload.issues = payload.issues.concat(
${x}.issues.map((iss) => ({
...iss,
path: iss.path ? [${k}, ...iss.path] : [${k}],
}))
);
}
} else if (${x}.value === undefined) {
if (${k} in input) newResult[${k}] = undefined;
} else {
newResult[${k}] = ${x}.value;
}
`)}else{let x=m[v];f.write(`const ${x} = ${h(v)};`),f.write(`
if (${x}.issues.length) payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
...iss,
path: iss.path ? [${Yr(v)}, ...iss.path] : [${Yr(v)}]
})));`),f.write(`newResult[${Yr(v)}] = ${x}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let g=f.compile();return(v,x)=>g(d,v,x)},r,o=Hi,s=!al.jitless,l=s&&If.value,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let p=d.value;if(!o(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;let h=[];if(s&&l&&f?.async===!1&&f.jitless!==!0)r||(r=i(t.shape)),d=r(d,f);else{d.value={};let x=c.shape;for(let k of c.keys){let E=x[k],C=E._zod.run({value:p[k],issues:[]},f),M=E._zod.optin==="optional"&&E._zod.optout==="optional";C instanceof Promise?h.push(C.then(z=>M?e1(z,d,k,p):hl(z,d,k))):M?e1(C,d,k,p):hl(C,d,k)}}if(!u)return h.length?Promise.all(h).then(()=>d):d;let m=[],b=c.keySet,g=u._zod,v=g.def.type;for(let x of Object.keys(p)){if(b.has(x))continue;if(v==="never"){m.push(x);continue}let k=g.run({value:p[x],issues:[]},f);k instanceof Promise?h.push(k.then(E=>hl(E,d,x))):hl(k,d,x)}return m.length&&d.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:e}),h.length?Promise.all(h).then(()=>d):d}});function t1(e,t,n,i){for(let r of e)if(r.issues.length===0)return t.value=r.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(r=>r.issues.map(o=>En(o,i,sn())))}),t}var Hf=I("$ZodUnion",(e,t)=>{Ue.init(e,t),Be(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Yo(i.source)).join("|")})$`)}}),e._zod.parse=(n,i)=>{let r=!1,o=[];for(let s of t.options){let a=s._zod.run({value:n.value,issues:[]},i);if(a instanceof Promise)o.push(a),r=!0;else{if(a.issues.length===0)return a;o.push(a)}}return r?Promise.all(o).then(s=>t1(s,n,e,i)):t1(o,n,e,i)}}),F1=I("$ZodDiscriminatedUnion",(e,t)=>{Hf.init(e,t);let n=e._zod.parse;Be(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of l)r[a].add(u)}}return r});let i=Go(()=>{let r=t.options,o=new Map;for(let s of r){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!Hi(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),r)}}),B1=I("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([l,u])=>n1(n,l,u)):n1(n,o,s)}});function jf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qi(e)&&qi(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=jf(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=jf(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function n1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Qr(e))return e;let i=jf(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var U1=I("$ZodRecord",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!qi(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;n.value={};for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){let u=t.valueType._zod.run({value:r[l],issues:[]},i);u instanceof Promise?o.push(u.then(c=>{c.issues.length&&n.issues.push(...Dn(l,c.issues)),n.value[l]=c.value})):(u.issues.length&&n.issues.push(...Dn(l,u.issues)),n.value[l]=u.value)}let a;for(let l in r)s.has(l)||(a=a??[],a.push(l));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:a})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>En(u,i,sn())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}let l=t.valueType._zod.run({value:r[s],issues:[]},i);l instanceof Promise?o.push(l.then(u=>{u.issues.length&&n.issues.push(...Dn(s,u.issues)),n.value[a.value]=u.value})):(l.issues.length&&n.issues.push(...Dn(s,l.issues)),n.value[a.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}});var j1=I("$ZodEnum",(e,t)=>{Ue.init(e,t);let n=Ef(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(i=>Af.has(typeof i)).map(i=>typeof i=="string"?_r(i):i.toString()).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),Z1=I("$ZodLiteral",(e,t)=>{Ue.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?_r(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}});var H1=I("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.parse=(n,i)=>{let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Xn;return n.value=r,n}}),q1=I("$ZodOptional",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Yo(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(n,i):n.value===void 0?n:t.innerType._zod.run(n,i)}),W1=I("$ZodNullable",(e,t)=>{Ue.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Yo(n.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),V1=I("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>r1(o,t)):r1(r,t)}});function r1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var J1=I("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),K1=I("$ZodNonOptional",(e,t)=>{Ue.init(e,t),Be(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>i1(o,e)):i1(r,e)}});function i1(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var G1=I("$ZodCatch",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>En(s,i,sn()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>En(o,i,sn()))},input:n.value}),n.issues=[]),n)}});var X1=I("$ZodPipe",(e,t)=>{Ue.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,i)=>{let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>o1(o,t,i)):o1(r,t,i)}});function o1(e,t,n){return Qr(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var Y1=I("$ZodReadonly",(e,t)=>{Ue.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s1):s1(r)}});function s1(e){return e.value=Object.freeze(e.value),e}var Q1=I("$ZodCustom",(e,t)=>{zt.init(e,t),Ue.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>a1(o,n,i,e));a1(r,n,i,e)}});function a1(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Nf(r))}}var y3=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},x3=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${y3(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${cl(i.values[0])}`:`Invalid option: expected one of ${ll(i.values,"|")}`;case"too_big":{let r=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${r}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${r}${i.maximum.toString()}`}case"too_small":{let r=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${r}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${r}${i.minimum.toString()}`}case"invalid_format":{let r=i;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${ll(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function ex(){return{localeError:x3()}}var qf=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){let i=n[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function k3(){return new qf}var ns=k3();function tx(e,t){return new e({type:"string",...ne(t)})}function nx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ne(t)})}function Wf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ne(t)})}function rx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ne(t)})}function ix(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ne(t)})}function ox(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ne(t)})}function sx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ne(t)})}function ax(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}function lx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ne(t)})}function ux(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ne(t)})}function cx(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ne(t)})}function dx(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ne(t)})}function fx(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ne(t)})}function px(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ne(t)})}function hx(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ne(t)})}function mx(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ne(t)})}function gx(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ne(t)})}function bx(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ne(t)})}function vx(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ne(t)})}function yx(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ne(t)})}function xx(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ne(t)})}function kx(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ne(t)})}function _x(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ne(t)})}function wx(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ne(t)})}function Sx(e,t){return new e({type:"string",format:"date",check:"string_format",...ne(t)})}function Ex(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ne(t)})}function $x(e,t){return new e({type:"string",format:"duration",check:"string_format",...ne(t)})}function Cx(e,t){return new e({type:"number",checks:[],...ne(t)})}function Tx(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}function Ix(e,t){return new e({type:"boolean",...ne(t)})}function Ax(e,t){return new e({type:"null",...ne(t)})}function zx(e){return new e({type:"unknown"})}function Mx(e,t){return new e({type:"never",...ne(t)})}function gl(e,t){return new Bf({check:"less_than",...ne(t),value:e,inclusive:!1})}function rs(e,t){return new Bf({check:"less_than",...ne(t),value:e,inclusive:!0})}function bl(e,t){return new Uf({check:"greater_than",...ne(t),value:e,inclusive:!1})}function is(e,t){return new Uf({check:"greater_than",...ne(t),value:e,inclusive:!0})}function vl(e,t){return new Fy({check:"multiple_of",...ne(t),value:e})}function yl(e,t){return new Uy({check:"max_length",...ne(t),maximum:e})}function Wi(e,t){return new jy({check:"min_length",...ne(t),minimum:e})}function xl(e,t){return new Zy({check:"length_equals",...ne(t),length:e})}function Vf(e,t){return new Hy({check:"string_format",format:"regex",...ne(t),pattern:e})}function Jf(e){return new qy({check:"string_format",format:"lowercase",...ne(e)})}function Kf(e){return new Wy({check:"string_format",format:"uppercase",...ne(e)})}function Gf(e,t){return new Vy({check:"string_format",format:"includes",...ne(t),includes:e})}function Xf(e,t){return new Jy({check:"string_format",format:"starts_with",...ne(t),prefix:e})}function Yf(e,t){return new Ky({check:"string_format",format:"ends_with",...ne(t),suffix:e})}function ei(e){return new Gy({check:"overwrite",tx:e})}function Qf(e){return ei(t=>t.normalize(e))}function ep(){return ei(e=>e.trim())}function tp(){return ei(e=>e.toLowerCase())}function np(){return ei(e=>e.toUpperCase())}function Nx(e,t,n){return new e({type:"array",element:t,...ne(n)})}function Dx(e,t,n){let i=ne(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Ox(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ne(n)})}function kl(e){return!!e._zod}function _l(e,t){return kl(e)?es(e,t):e.safeParse(t)}function Rx(e){if(!e)return;let t;if(kl(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Px(e){if(kl(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let i=e.value;if(i!==void 0)return i}var as={};Zi(as,{ZodISODate:()=>Fx,ZodISODateTime:()=>Lx,ZodISODuration:()=>Ux,ZodISOTime:()=>Bx,date:()=>ip,datetime:()=>rp,duration:()=>sp,time:()=>op});var Lx=I("ZodISODateTime",(e,t)=>{y1.init(e,t),Ve.init(e,t)});function rp(e){return wx(Lx,e)}var Fx=I("ZodISODate",(e,t)=>{x1.init(e,t),Ve.init(e,t)});function ip(e){return Sx(Fx,e)}var Bx=I("ZodISOTime",(e,t)=>{k1.init(e,t),Ve.init(e,t)});function op(e){return Ex(Bx,e)}var Ux=I("ZodISODuration",(e,t)=>{_1.init(e,t),Ve.init(e,t)});function sp(e){return $x(Ux,e)}var jx=(e,t)=>{dl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sy(e,n)},flatten:{value:n=>oy(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},dJ=I("ZodError",jx),ls=I("ZodError",jx,{Parent:Error});var Zx=ay(ls),Hx=ly(ls),qx=Of(ls),Wx=Rf(ls);var et=I("ZodType",(e,t)=>(Ue.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(n,i)=>Nn(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Zx(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>qx(e,n,i),e.parseAsync=async(n,i)=>Hx(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Wx(e,n,i),e.spa=e.safeParseAsync,e.refine=(n,i)=>e.check(vN(n,i)),e.superRefine=n=>e.check(yN(n)),e.overwrite=n=>e.check(ei(n)),e.optional=()=>Qe(e),e.nullable=()=>Kx(e),e.nullish=()=>Qe(Kx(e)),e.nonoptional=n=>dN(e,n),e.array=()=>we(e),e.or=n=>je([e,n]),e.and=n=>Sl(e,n),e.transform=n=>lp(e,ek(n)),e.default=n=>lN(e,n),e.prefault=n=>cN(e,n),e.catch=n=>pN(e,n),e.pipe=n=>lp(e,n),e.readonly=()=>gN(e),e.describe=n=>{let i=e.clone();return ns.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return ns.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ns.get(e);let i=e.clone();return ns.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Gx=I("_ZodString",(e,t)=>{ml.init(e,t),et.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(Vf(...i)),e.includes=(...i)=>e.check(Gf(...i)),e.startsWith=(...i)=>e.check(Xf(...i)),e.endsWith=(...i)=>e.check(Yf(...i)),e.min=(...i)=>e.check(Wi(...i)),e.max=(...i)=>e.check(yl(...i)),e.length=(...i)=>e.check(xl(...i)),e.nonempty=(...i)=>e.check(Wi(1,...i)),e.lowercase=i=>e.check(Jf(i)),e.uppercase=i=>e.check(Kf(i)),e.trim=()=>e.check(ep()),e.normalize=(...i)=>e.check(Qf(...i)),e.toLowerCase=()=>e.check(tp()),e.toUpperCase=()=>e.check(np())}),A3=I("ZodString",(e,t)=>{ml.init(e,t),Gx.init(e,t),e.email=n=>e.check(nx(z3,n)),e.url=n=>e.check(ax(M3,n)),e.jwt=n=>e.check(_x(V3,n)),e.emoji=n=>e.check(lx(N3,n)),e.guid=n=>e.check(Wf(Vx,n)),e.uuid=n=>e.check(rx(wl,n)),e.uuidv4=n=>e.check(ix(wl,n)),e.uuidv6=n=>e.check(ox(wl,n)),e.uuidv7=n=>e.check(sx(wl,n)),e.nanoid=n=>e.check(ux(D3,n)),e.guid=n=>e.check(Wf(Vx,n)),e.cuid=n=>e.check(cx(O3,n)),e.cuid2=n=>e.check(dx(R3,n)),e.ulid=n=>e.check(fx(P3,n)),e.base64=n=>e.check(yx(H3,n)),e.base64url=n=>e.check(xx(q3,n)),e.xid=n=>e.check(px(L3,n)),e.ksuid=n=>e.check(hx(F3,n)),e.ipv4=n=>e.check(mx(B3,n)),e.ipv6=n=>e.check(gx(U3,n)),e.cidrv4=n=>e.check(bx(j3,n)),e.cidrv6=n=>e.check(vx(Z3,n)),e.e164=n=>e.check(kx(W3,n)),e.datetime=n=>e.check(rp(n)),e.date=n=>e.check(ip(n)),e.time=n=>e.check(op(n)),e.duration=n=>e.check(sp(n))});function T(e){return tx(A3,e)}var Ve=I("ZodStringFormat",(e,t)=>{He.init(e,t),Gx.init(e,t)}),z3=I("ZodEmail",(e,t)=>{c1.init(e,t),Ve.init(e,t)});var Vx=I("ZodGUID",(e,t)=>{l1.init(e,t),Ve.init(e,t)});var wl=I("ZodUUID",(e,t)=>{u1.init(e,t),Ve.init(e,t)});var M3=I("ZodURL",(e,t)=>{d1.init(e,t),Ve.init(e,t)});var N3=I("ZodEmoji",(e,t)=>{f1.init(e,t),Ve.init(e,t)});var D3=I("ZodNanoID",(e,t)=>{p1.init(e,t),Ve.init(e,t)});var O3=I("ZodCUID",(e,t)=>{h1.init(e,t),Ve.init(e,t)});var R3=I("ZodCUID2",(e,t)=>{m1.init(e,t),Ve.init(e,t)});var P3=I("ZodULID",(e,t)=>{g1.init(e,t),Ve.init(e,t)});var L3=I("ZodXID",(e,t)=>{b1.init(e,t),Ve.init(e,t)});var F3=I("ZodKSUID",(e,t)=>{v1.init(e,t),Ve.init(e,t)});var B3=I("ZodIPv4",(e,t)=>{w1.init(e,t),Ve.init(e,t)});var U3=I("ZodIPv6",(e,t)=>{S1.init(e,t),Ve.init(e,t)});var j3=I("ZodCIDRv4",(e,t)=>{E1.init(e,t),Ve.init(e,t)});var Z3=I("ZodCIDRv6",(e,t)=>{$1.init(e,t),Ve.init(e,t)});var H3=I("ZodBase64",(e,t)=>{T1.init(e,t),Ve.init(e,t)});var q3=I("ZodBase64URL",(e,t)=>{I1.init(e,t),Ve.init(e,t)});var W3=I("ZodE164",(e,t)=>{A1.init(e,t),Ve.init(e,t)});var V3=I("ZodJWT",(e,t)=>{z1.init(e,t),Ve.init(e,t)});var Xx=I("ZodNumber",(e,t)=>{Zf.init(e,t),et.init(e,t),e.gt=(i,r)=>e.check(bl(i,r)),e.gte=(i,r)=>e.check(is(i,r)),e.min=(i,r)=>e.check(is(i,r)),e.lt=(i,r)=>e.check(gl(i,r)),e.lte=(i,r)=>e.check(rs(i,r)),e.max=(i,r)=>e.check(rs(i,r)),e.int=i=>e.check(Jx(i)),e.safe=i=>e.check(Jx(i)),e.positive=i=>e.check(bl(0,i)),e.nonnegative=i=>e.check(is(0,i)),e.negative=i=>e.check(gl(0,i)),e.nonpositive=i=>e.check(rs(0,i)),e.multipleOf=(i,r)=>e.check(vl(i,r)),e.step=(i,r)=>e.check(vl(i,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ze(e){return Cx(Xx,e)}var J3=I("ZodNumberFormat",(e,t)=>{M1.init(e,t),Xx.init(e,t)});function Jx(e){return Tx(J3,e)}var K3=I("ZodBoolean",(e,t)=>{N1.init(e,t),et.init(e,t)});function pt(e){return Ix(K3,e)}var G3=I("ZodNull",(e,t)=>{D1.init(e,t),et.init(e,t)});function up(e){return Ax(G3,e)}var X3=I("ZodUnknown",(e,t)=>{O1.init(e,t),et.init(e,t)});function Je(){return zx(X3)}var Y3=I("ZodNever",(e,t)=>{R1.init(e,t),et.init(e,t)});function Q3(e){return Mx(Y3,e)}var eN=I("ZodArray",(e,t)=>{P1.init(e,t),et.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(Wi(n,i)),e.nonempty=n=>e.check(Wi(1,n)),e.max=(n,i)=>e.check(yl(n,i)),e.length=(n,i)=>e.check(xl(n,i)),e.unwrap=()=>e.element});function we(e,t){return Nx(eN,e,t)}var Yx=I("ZodObject",(e,t)=>{L1.init(e,t),et.init(e,t),Ce.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>qt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Je()}),e.loose=()=>e.clone({...e._zod.def,catchall:Je()}),e.strict=()=>e.clone({...e._zod.def,catchall:Q3()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ce.extend(e,n),e.merge=n=>Ce.merge(e,n),e.pick=n=>Ce.pick(e,n),e.omit=n=>Ce.omit(e,n),e.partial=(...n)=>Ce.partial(tk,e,n[0]),e.required=(...n)=>Ce.required(nk,e,n[0])});function W(e,t){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...e}),this.shape},...Ce.normalizeParams(t)};return new Yx(n)}function Ft(e,t){return new Yx({type:"object",get shape(){return Ce.assignProp(this,"shape",{...e}),this.shape},catchall:Je(),...Ce.normalizeParams(t)})}var Qx=I("ZodUnion",(e,t)=>{Hf.init(e,t),et.init(e,t),e.options=t.options});function je(e,t){return new Qx({type:"union",options:e,...Ce.normalizeParams(t)})}var tN=I("ZodDiscriminatedUnion",(e,t)=>{Qx.init(e,t),F1.init(e,t)});function cp(e,t,n){return new tN({type:"union",options:t,discriminator:e,...Ce.normalizeParams(n)})}var nN=I("ZodIntersection",(e,t)=>{B1.init(e,t),et.init(e,t)});function Sl(e,t){return new nN({type:"intersection",left:e,right:t})}var rN=I("ZodRecord",(e,t)=>{U1.init(e,t),et.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ke(e,t,n){return new rN({type:"record",keyType:e,valueType:t,...Ce.normalizeParams(n)})}var ap=I("ZodEnum",(e,t)=>{j1.init(e,t),et.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ap({...t,checks:[],...Ce.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new ap({...t,checks:[],...Ce.normalizeParams(r),entries:o})}});function qt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ap({type:"enum",entries:n,...Ce.normalizeParams(t)})}var iN=I("ZodLiteral",(e,t)=>{Z1.init(e,t),et.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function X(e,t){return new iN({type:"literal",values:Array.isArray(e)?e:[e],...Ce.normalizeParams(t)})}var oN=I("ZodTransform",(e,t)=>{H1.init(e,t),et.init(e,t),e._zod.parse=(n,i)=>{n.addIssue=o=>{if(typeof o=="string")n.issues.push(Ce.issue(o,n.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),n.issues.push(Ce.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function ek(e){return new oN({type:"transform",transform:e})}var tk=I("ZodOptional",(e,t)=>{q1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Qe(e){return new tk({type:"optional",innerType:e})}var sN=I("ZodNullable",(e,t)=>{W1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Kx(e){return new sN({type:"nullable",innerType:e})}var aN=I("ZodDefault",(e,t)=>{V1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lN(e,t){return new aN({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var uN=I("ZodPrefault",(e,t)=>{J1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cN(e,t){return new uN({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var nk=I("ZodNonOptional",(e,t)=>{K1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function dN(e,t){return new nk({type:"nonoptional",innerType:e,...Ce.normalizeParams(t)})}var fN=I("ZodCatch",(e,t)=>{G1.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pN(e,t){return new fN({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var hN=I("ZodPipe",(e,t)=>{X1.init(e,t),et.init(e,t),e.in=t.in,e.out=t.out});function lp(e,t){return new hN({type:"pipe",in:e,out:t})}var mN=I("ZodReadonly",(e,t)=>{Y1.init(e,t),et.init(e,t)});function gN(e){return new mN({type:"readonly",innerType:e})}var rk=I("ZodCustom",(e,t)=>{Q1.init(e,t),et.init(e,t)});function bN(e){let t=new zt({check:"custom"});return t._zod.check=e,t}function ik(e,t){return Dx(rk,e??(()=>!0),t)}function vN(e,t={}){return Ox(rk,e,t)}function yN(e){let t=bN(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ce.issue(i,n.value,t._zod.def));else{let r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Ce.issue(r))}},e(n.value,n)));return t}function dp(e,t){return lp(ek(e),t)}sn(ex());var wr="io.modelcontextprotocol/related-task",$l="2.0",yt=ik(e=>e!==null&&(typeof e=="object"||typeof e=="function")),ok=je([T(),ze().int()]),sk=T(),iK=Ft({ttl:je([ze(),up()]).optional(),pollInterval:ze().optional()}),xN=W({ttl:ze().optional()}),kN=W({taskId:T()}),pp=Ft({progressToken:ok.optional(),[wr]:kN.optional()}),Yt=W({_meta:pp.optional()}),us=Yt.extend({task:xN.optional()}),ak=e=>us.safeParse(e).success,xt=W({method:T(),params:Yt.loose().optional()}),an=W({_meta:pp.optional()}),ln=W({method:T(),params:an.loose().optional()}),kt=Ft({_meta:pp.optional()}),Ji=je([T(),ze().int()]),lk=W({jsonrpc:X($l),id:Ji,...xt.shape}).strict(),hp=e=>lk.safeParse(e).success,uk=W({jsonrpc:X($l),...ln.shape}).strict(),ck=e=>uk.safeParse(e).success,mp=W({jsonrpc:X($l),id:Ji,result:kt}).strict(),cs=e=>mp.safeParse(e).success;var Me;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Me||(Me={}));var gp=W({jsonrpc:X($l),id:Ji.optional(),error:W({code:ze().int(),message:T(),data:Je().optional()})}).strict();var dk=e=>gp.safeParse(e).success;var fk=je([lk,uk,mp,gp]),oK=je([mp,gp]),Cl=kt.strict(),_N=an.extend({requestId:Ji.optional(),reason:T().optional()}),Tl=ln.extend({method:X("notifications/cancelled"),params:_N}),wN=W({src:T(),mimeType:T().optional(),sizes:we(T()).optional(),theme:qt(["light","dark"]).optional()}),ds=W({icons:we(wN).optional()}),Vi=W({name:T(),title:T().optional()}),fs=Vi.extend({...Vi.shape,...ds.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),SN=Sl(W({applyDefaults:pt().optional()}),Ke(T(),Je())),EN=dp(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Sl(W({form:SN.optional(),url:yt.optional()}),Ke(T(),Je()).optional())),$N=Ft({list:yt.optional(),cancel:yt.optional(),requests:Ft({sampling:Ft({createMessage:yt.optional()}).optional(),elicitation:Ft({create:yt.optional()}).optional()}).optional()}),CN=Ft({list:yt.optional(),cancel:yt.optional(),requests:Ft({tools:Ft({call:yt.optional()}).optional()}).optional()}),TN=W({experimental:Ke(T(),yt).optional(),sampling:W({context:yt.optional(),tools:yt.optional()}).optional(),elicitation:EN.optional(),roots:W({listChanged:pt().optional()}).optional(),tasks:$N.optional()}),IN=Yt.extend({protocolVersion:T(),capabilities:TN,clientInfo:fs}),AN=xt.extend({method:X("initialize"),params:IN});var zN=W({experimental:Ke(T(),yt).optional(),logging:yt.optional(),completions:yt.optional(),prompts:W({listChanged:pt().optional()}).optional(),resources:W({subscribe:pt().optional(),listChanged:pt().optional()}).optional(),tools:W({listChanged:pt().optional()}).optional(),tasks:CN.optional()}),MN=kt.extend({protocolVersion:T(),capabilities:zN,serverInfo:fs,instructions:T().optional()}),NN=ln.extend({method:X("notifications/initialized"),params:an.optional()});var Ki=xt.extend({method:X("ping"),params:Yt.optional()}),DN=W({progress:ze(),total:Qe(ze()),message:Qe(T())}),ON=W({...an.shape,...DN.shape,progressToken:ok}),Il=ln.extend({method:X("notifications/progress"),params:ON}),RN=Yt.extend({cursor:sk.optional()}),ps=xt.extend({params:RN.optional()}),hs=kt.extend({nextCursor:sk.optional()}),PN=qt(["working","input_required","completed","failed","cancelled"]),ms=W({taskId:T(),status:PN,ttl:je([ze(),up()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:Qe(ze()),statusMessage:Qe(T())}),Al=kt.extend({task:ms}),LN=an.merge(ms),gs=ln.extend({method:X("notifications/tasks/status"),params:LN}),zl=xt.extend({method:X("tasks/get"),params:Yt.extend({taskId:T()})}),Ml=kt.merge(ms),Nl=xt.extend({method:X("tasks/result"),params:Yt.extend({taskId:T()})}),sK=kt.loose(),Dl=ps.extend({method:X("tasks/list")}),Ol=hs.extend({tasks:we(ms)}),Rl=xt.extend({method:X("tasks/cancel"),params:Yt.extend({taskId:T()})}),pk=kt.merge(ms),hk=W({uri:T(),mimeType:Qe(T()),_meta:Ke(T(),Je()).optional()}),mk=hk.extend({text:T()}),bp=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),gk=hk.extend({blob:bp}),bs=qt(["user","assistant"]),Gi=W({audience:we(bs).optional(),priority:ze().min(0).max(1).optional(),lastModified:as.datetime({offset:!0}).optional()}),bk=W({...Vi.shape,...ds.shape,uri:T(),description:Qe(T()),mimeType:Qe(T()),annotations:Gi.optional(),_meta:Qe(Ft({}))}),FN=W({...Vi.shape,...ds.shape,uriTemplate:T(),description:Qe(T()),mimeType:Qe(T()),annotations:Gi.optional(),_meta:Qe(Ft({}))}),BN=ps.extend({method:X("resources/list")}),UN=hs.extend({resources:we(bk)}),jN=ps.extend({method:X("resources/templates/list")}),ZN=hs.extend({resourceTemplates:we(FN)}),vp=Yt.extend({uri:T()}),HN=vp,qN=xt.extend({method:X("resources/read"),params:HN}),WN=kt.extend({contents:we(je([mk,gk]))}),VN=ln.extend({method:X("notifications/resources/list_changed"),params:an.optional()}),JN=vp,KN=xt.extend({method:X("resources/subscribe"),params:JN}),GN=vp,XN=xt.extend({method:X("resources/unsubscribe"),params:GN}),YN=an.extend({uri:T()}),QN=ln.extend({method:X("notifications/resources/updated"),params:YN}),eD=W({name:T(),description:Qe(T()),required:Qe(pt())}),tD=W({...Vi.shape,...ds.shape,description:Qe(T()),arguments:Qe(we(eD)),_meta:Qe(Ft({}))}),nD=ps.extend({method:X("prompts/list")}),rD=hs.extend({prompts:we(tD)}),iD=Yt.extend({name:T(),arguments:Ke(T(),T()).optional()}),oD=xt.extend({method:X("prompts/get"),params:iD}),yp=W({type:X("text"),text:T(),annotations:Gi.optional(),_meta:Ke(T(),Je()).optional()}),xp=W({type:X("image"),data:bp,mimeType:T(),annotations:Gi.optional(),_meta:Ke(T(),Je()).optional()}),kp=W({type:X("audio"),data:bp,mimeType:T(),annotations:Gi.optional(),_meta:Ke(T(),Je()).optional()}),sD=W({type:X("tool_use"),name:T(),id:T(),input:Ke(T(),Je()),_meta:Ke(T(),Je()).optional()}),aD=W({type:X("resource"),resource:je([mk,gk]),annotations:Gi.optional(),_meta:Ke(T(),Je()).optional()}),lD=bk.extend({type:X("resource_link")}),Xi=je([yp,xp,kp,lD,aD]),uD=W({role:bs,content:Xi}),cD=kt.extend({description:T().optional(),messages:we(uD)}),dD=ln.extend({method:X("notifications/prompts/list_changed"),params:an.optional()}),fD=W({title:T().optional(),readOnlyHint:pt().optional(),destructiveHint:pt().optional(),idempotentHint:pt().optional(),openWorldHint:pt().optional()}),pD=W({taskSupport:qt(["required","optional","forbidden"]).optional()}),Pl=W({...Vi.shape,...ds.shape,description:T().optional(),inputSchema:W({type:X("object"),properties:Ke(T(),yt).optional(),required:we(T()).optional()}).catchall(Je()),outputSchema:W({type:X("object"),properties:Ke(T(),yt).optional(),required:we(T()).optional()}).catchall(Je()).optional(),annotations:fD.optional(),execution:pD.optional(),_meta:Ke(T(),Je()).optional()}),_p=ps.extend({method:X("tools/list")}),hD=hs.extend({tools:we(Pl)}),Yi=kt.extend({content:we(Xi).default([]),structuredContent:Ke(T(),Je()).optional(),isError:pt().optional()}),aK=Yi.or(kt.extend({toolResult:Je()})),mD=us.extend({name:T(),arguments:Ke(T(),Je()).optional()}),wp=xt.extend({method:X("tools/call"),params:mD}),gD=ln.extend({method:X("notifications/tools/list_changed"),params:an.optional()}),lK=W({autoRefresh:pt().default(!0),debounceMs:ze().int().nonnegative().default(300)}),vk=qt(["debug","info","notice","warning","error","critical","alert","emergency"]),bD=Yt.extend({level:vk}),vD=xt.extend({method:X("logging/setLevel"),params:bD}),yD=an.extend({level:vk,logger:T().optional(),data:Je()}),xD=ln.extend({method:X("notifications/message"),params:yD}),kD=W({name:T().optional()}),_D=W({hints:we(kD).optional(),costPriority:ze().min(0).max(1).optional(),speedPriority:ze().min(0).max(1).optional(),intelligencePriority:ze().min(0).max(1).optional()}),wD=W({mode:qt(["auto","required","none"]).optional()}),SD=W({type:X("tool_result"),toolUseId:T().describe("The unique identifier for the corresponding tool call."),content:we(Xi).default([]),structuredContent:W({}).loose().optional(),isError:pt().optional(),_meta:Ke(T(),Je()).optional()}),ED=cp("type",[yp,xp,kp]),El=cp("type",[yp,xp,kp,sD,SD]),$D=W({role:bs,content:je([El,we(El)]),_meta:Ke(T(),Je()).optional()}),CD=us.extend({messages:we($D),modelPreferences:_D.optional(),systemPrompt:T().optional(),includeContext:qt(["none","thisServer","allServers"]).optional(),temperature:ze().optional(),maxTokens:ze().int(),stopSequences:we(T()).optional(),metadata:yt.optional(),tools:we(Pl).optional(),toolChoice:wD.optional()}),TD=xt.extend({method:X("sampling/createMessage"),params:CD}),ID=kt.extend({model:T(),stopReason:Qe(qt(["endTurn","stopSequence","maxTokens"]).or(T())),role:bs,content:ED}),AD=kt.extend({model:T(),stopReason:Qe(qt(["endTurn","stopSequence","maxTokens","toolUse"]).or(T())),role:bs,content:je([El,we(El)])}),zD=W({type:X("boolean"),title:T().optional(),description:T().optional(),default:pt().optional()}),MD=W({type:X("string"),title:T().optional(),description:T().optional(),minLength:ze().optional(),maxLength:ze().optional(),format:qt(["email","uri","date","date-time"]).optional(),default:T().optional()}),ND=W({type:qt(["number","integer"]),title:T().optional(),description:T().optional(),minimum:ze().optional(),maximum:ze().optional(),default:ze().optional()}),DD=W({type:X("string"),title:T().optional(),description:T().optional(),enum:we(T()),default:T().optional()}),OD=W({type:X("string"),title:T().optional(),description:T().optional(),oneOf:we(W({const:T(),title:T()})),default:T().optional()}),RD=W({type:X("string"),title:T().optional(),description:T().optional(),enum:we(T()),enumNames:we(T()).optional(),default:T().optional()}),PD=je([DD,OD]),LD=W({type:X("array"),title:T().optional(),description:T().optional(),minItems:ze().optional(),maxItems:ze().optional(),items:W({type:X("string"),enum:we(T())}),default:we(T()).optional()}),FD=W({type:X("array"),title:T().optional(),description:T().optional(),minItems:ze().optional(),maxItems:ze().optional(),items:W({anyOf:we(W({const:T(),title:T()}))}),default:we(T()).optional()}),BD=je([LD,FD]),UD=je([RD,PD,BD]),jD=je([UD,zD,MD,ND]),ZD=us.extend({mode:X("form").optional(),message:T(),requestedSchema:W({type:X("object"),properties:Ke(T(),jD),required:we(T()).optional()})}),HD=us.extend({mode:X("url"),message:T(),elicitationId:T(),url:T().url()}),qD=je([ZD,HD]),WD=xt.extend({method:X("elicitation/create"),params:qD}),VD=an.extend({elicitationId:T()}),JD=ln.extend({method:X("notifications/elicitation/complete"),params:VD}),KD=kt.extend({action:qt(["accept","decline","cancel"]),content:dp(e=>e===null?void 0:e,Ke(T(),je([T(),ze(),pt(),we(T())])).optional())}),GD=W({type:X("ref/resource"),uri:T()});var XD=W({type:X("ref/prompt"),name:T()}),YD=Yt.extend({ref:je([XD,GD]),argument:W({name:T(),value:T()}),context:W({arguments:Ke(T(),T()).optional()}).optional()}),QD=xt.extend({method:X("completion/complete"),params:YD});var eO=kt.extend({completion:Ft({values:we(T()).max(100),total:Qe(ze().int()),hasMore:Qe(pt())})}),tO=W({uri:T().startsWith("file://"),name:T().optional(),_meta:Ke(T(),Je()).optional()}),nO=xt.extend({method:X("roots/list"),params:Yt.optional()}),rO=kt.extend({roots:we(tO)}),iO=ln.extend({method:X("notifications/roots/list_changed"),params:an.optional()}),uK=je([Ki,AN,QD,vD,oD,nD,BN,jN,qN,KN,XN,wp,_p,zl,Nl,Dl,Rl]),cK=je([Tl,Il,NN,iO,gs]),dK=je([Cl,ID,AD,KD,rO,Ml,Ol,Al]),fK=je([Ki,TD,WD,nO,zl,Nl,Dl,Rl]),pK=je([Tl,Il,xD,QN,VN,gD,dD,gs,JD]),hK=je([Cl,MN,eO,cD,rD,UN,ZN,WN,Yi,hD,Ml,Ol,Al]),Ee=class e extends Error{constructor(t,n,i){super(`MCP error ${t}: ${n}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,n,i){if(t===Me.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new fp(r.elicitations,n)}return new e(t,n,i)}},fp=class extends Ee{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(Me.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Sr(e){return e==="completed"||e==="failed"||e==="cancelled"}var VK=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Sp(e){let n=Rx(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=Px(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Ep(e,t){let n=_l(e,t);if(!n.success)throw n.error;return n.data}var cO=6e4,Ll=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Tl,n=>{this._oncancel(n)}),this.setNotificationHandler(Il,n=>{this._onprogress(n)}),this.setRequestHandler(Ki,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(zl,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new Ee(Me.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Nl,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(a.type==="response"||a.type==="error"){let l=a.message,u=l.id,c=this._requestResolvers.get(u);if(c)if(this._requestResolvers.delete(u),a.type==="response")c(l);else{let d=l,f=new Ee(d.error.code,d.error.message,d.error.data);c(f)}else{let d=a.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:i.requestId})}}let s=await this._taskStore.getTask(o,i.sessionId);if(!s)throw new Ee(Me.InvalidParams,`Task not found: ${o}`);if(!Sr(s.status))return await this._waitForTaskUpdate(o,i.signal),await r();if(Sr(s.status)){let a=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...a,_meta:{...a._meta,[wr]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(Dl,async(n,i)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,i.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new Ee(Me.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Rl,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new Ee(Me.InvalidParams,`Task not found: ${n.params.taskId}`);if(Sr(r.status))throw new Ee(Me.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new Ee(Me.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof Ee?r:new Ee(Me.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,i,r,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Ee.fromError(Me.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,s)=>{r?.(o,s),cs(o)||dk(o)?this._onresponse(o):hp(o)?this._onrequest(o,s):ck(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();let n=Ee.fromError(Me.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of t.values())i(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,n){let i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,o=t.params?._meta?.[wr]?.taskId;if(i===void 0){let c={jsonrpc:"2.0",id:t.id,error:{code:Me.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:c,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(c).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=ak(t.params)?t.params.task:void 0,l=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,u={signal:s.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async c=>{let d={relatedRequestId:t.id};o&&(d.relatedTask={taskId:o}),await this.notification(c,d)},sendRequest:async(c,d,f)=>{let p={...f,relatedRequestId:t.id};o&&!p.relatedTask&&(p.relatedTask={taskId:o});let h=p.relatedTask?.taskId??o;return h&&l&&await l.updateTaskStatus(h,"input_required"),await this.request(c,d,p)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,taskStore:l,taskRequestedTtl:a?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,u)).then(async c=>{if(s.signal.aborted)return;let d={result:c,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async c=>{if(s.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(c.code)?c.code:Me.InternalError,message:c.message??"Internal error",...c.data!==void 0&&{data:c.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(c=>this._onerror(new Error(`Failed to send response: ${c}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...i}=t.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(r),a=this._timeoutInfo.get(r);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(l){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),s(l);return}o(i)}_onresponse(t){let n=Number(t.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),cs(t))i(t);else{let s=new Ee(t.error.code,t.error.message,t.error.data);i(s)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(cs(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(o=!0,this._taskProgressTokens.set(a.taskId,n))}}if(o||this._progressHandlers.delete(n),cs(t))r(t);else{let s=Ee.fromError(t.error.code,t.error.message,t.error.data);r(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,i){let{task:r}=i??{};if(!r){try{yield{type:"result",result:await this.request(t,n,i)}}catch(s){yield{type:"error",error:s instanceof Ee?s:new Ee(Me.InternalError,String(s))}}return}let o;try{let s=await this.request(t,Al,i);if(s.task)o=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new Ee(Me.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:a},Sr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:a.status==="failed"?yield{type:"error",error:new Ee(Me.InternalError,`Task ${o} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new Ee(Me.InternalError,`Task ${o} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)};return}let l=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,l)),i?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof Ee?s:new Ee(Me.InternalError,String(s))}}}request(t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s,task:a,relatedTask:l}=i??{};return new Promise((u,c)=>{let d=v=>{c(v)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(v){d(v);return}i?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...t,jsonrpc:"2.0",id:f};i?.onprogress&&(this._progressHandlers.set(f,i.onprogress),p.params={...t.params,_meta:{...t.params?._meta||{},progressToken:f}}),a&&(p.params={...p.params,task:a}),l&&(p.params={...p.params,_meta:{...p.params?._meta||{},[wr]:l}});let h=v=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(v)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s}).catch(k=>this._onerror(new Error(`Failed to send cancellation: ${k}`)));let x=v instanceof Ee?v:new Ee(Me.RequestTimeout,String(v));c(x)};this._responseHandlers.set(f,v=>{if(!i?.signal?.aborted){if(v instanceof Error)return c(v);try{let x=_l(n,v.result);x.success?u(x.data):c(x.error)}catch(x){c(x)}}}),i?.signal?.addEventListener("abort",()=>{h(i?.signal?.reason)});let m=i?.timeout??cO,b=()=>h(Ee.fromError(Me.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(f,m,i?.maxTotalTimeout,b,i?.resetTimeoutOnProgress??!1);let g=l?.taskId;if(g){let v=x=>{let k=this._responseHandlers.get(f);k?k(x):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,v),this._enqueueTaskMessage(g,{type:"request",message:p,timestamp:Date.now()}).catch(x=>{this._cleanupTimeout(f),c(x)})}else this._transport.send(p,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(f),c(v)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},Ml,n)}async getTaskResult(t,n,i){return this.request({method:"tasks/result",params:t},n,i)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},Ol,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},pk,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let i=n?.relatedTask?.taskId;if(i){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[wr]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[wr]:n.relatedTask}}}),this._transport?.send(a,n).catch(l=>this._onerror(l))});return}let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[wr]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(t,n){let i=Sp(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let s=Ep(t,r);return Promise.resolve(n(s,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let i=Sp(t);this._notificationHandlers.set(i,r=>{let o=Ep(t,r);return Promise.resolve(n(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,i,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(t,n);for(let r of i)if(r.type==="request"&&hp(r.message)){let o=r.message.id,s=this._requestResolvers.get(o);s?(s(new Ee(Me.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let i=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(i=r.pollInterval)}catch{}return new Promise((r,o)=>{if(n.aborted){o(new Ee(Me.InvalidRequest,"Request cancelled"));return}let s=setTimeout(r,i);n.addEventListener("abort",()=>{clearTimeout(s),o(new Ee(Me.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await i.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let o=await i.getTask(r,n);if(!o)throw new Ee(Me.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,s)=>{await i.storeTaskResult(r,o,s,n);let a=await i.getTask(r,n);if(a){let l=gs.parse({method:"notifications/tasks/status",params:a});await this.notification(l),Sr(a.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>i.getTaskResult(r,n),updateTaskStatus:async(r,o,s)=>{let a=await i.getTask(r,n);if(!a)throw new Ee(Me.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Sr(a.status))throw new Ee(Me.InvalidParams,`Cannot update task "${r}" from terminal status "${a.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(r,o,s,n);let l=await i.getTask(r,n);if(l){let u=gs.parse({method:"notifications/tasks/status",params:l});await this.notification(u),Sr(l.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};var dO=Object.defineProperty,tr=(e,t)=>{for(var n in t)dO(e,n,{get:t[n],enumerable:!0,configurable:!0,set:i=>t[n]=()=>i})},$p=class{constructor(t=window.parent,n){At(this,"eventTarget");At(this,"eventSource");At(this,"messageListener");At(this,"onclose");At(this,"onerror");At(this,"onmessage");At(this,"sessionId");At(this,"setProtocolVersion");this.eventTarget=t,this.eventSource=n,this.messageListener=i=>{if(n&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=fk.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,n){console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}},fO="2026-01-26";var y={};tr(y,{xor:()=>YE,xid:()=>kE,void:()=>WE,uuidv7:()=>pE,uuidv6:()=>fE,uuidv4:()=>dE,uuid:()=>cE,util:()=>ye,url:()=>hE,uppercase:()=>lu,unknown:()=>ii,union:()=>Lu,undefined:()=>HE,ulid:()=>xE,uint64:()=>jE,uint32:()=>FE,tuple:()=>nm,trim:()=>hu,treeifyError:()=>Yk,transform:()=>Bu,toUpperCase:()=>gu,toLowerCase:()=>mu,toJSONSchema:()=>j2,templateLiteral:()=>d$,symbol:()=>ZE,superRefine:()=>Im,success:()=>l$,stringbool:()=>v$,stringFormat:()=>ME,string:()=>Xl,strictObject:()=>GE,startsWith:()=>cu,slugify:()=>bu,size:()=>Rs,setErrorMap:()=>zL,set:()=>r$,safeParseAsync:()=>Q2,safeParse:()=>Y2,safeEncodeAsync:()=>sE,safeEncode:()=>iE,safeDecodeAsync:()=>aE,safeDecode:()=>oE,registry:()=>sh,regexes:()=>si,regex:()=>su,refine:()=>Tm,record:()=>rm,readonly:()=>_m,property:()=>zh,promise:()=>f$,prettifyError:()=>e_,preprocess:()=>x$,prefault:()=>mm,positive:()=>Ch,pipe:()=>Es,partialRecord:()=>e$,parseAsync:()=>X2,parse:()=>G2,overwrite:()=>rr,optional:()=>ws,object:()=>KE,number:()=>Bh,nullish:()=>a$,nullable:()=>Ss,null:()=>qh,normalize:()=>pu,nonpositive:()=>Ih,nonoptional:()=>gm,nonnegative:()=>Ah,never:()=>Ru,negative:()=>Th,nativeEnum:()=>i$,nanoid:()=>bE,nan:()=>u$,multipleOf:()=>ro,minSize:()=>Cr,minLength:()=>ri,mime:()=>fu,meta:()=>g$,maxSize:()=>lo,maxLength:()=>Ps,map:()=>n$,mac:()=>SE,lte:()=>cn,lt:()=>Er,lowercase:()=>au,looseRecord:()=>t$,looseObject:()=>XE,locales:()=>oh,literal:()=>o$,length:()=>Ls,lazy:()=>Em,ksuid:()=>_E,keyof:()=>JE,jwt:()=>zE,json:()=>y$,iso:()=>Dh,ipv6:()=>EE,ipv4:()=>wE,intersection:()=>em,int64:()=>UE,int32:()=>LE,int:()=>Yl,instanceof:()=>b$,includes:()=>uu,httpUrl:()=>mE,hostname:()=>NE,hex:()=>DE,hash:()=>OE,guid:()=>uE,gte:()=>Wt,gt:()=>$r,globalRegistry:()=>un,getErrorMap:()=>ML,function:()=>Ql,fromJSONSchema:()=>RL,formatError:()=>Fp,float64:()=>PE,float32:()=>RE,flattenError:()=>Lp,file:()=>s$,exactOptional:()=>cm,enum:()=>Fu,endsWith:()=>du,encodeAsync:()=>nE,encode:()=>eE,emoji:()=>gE,email:()=>lE,e164:()=>AE,discriminatedUnion:()=>QE,describe:()=>m$,decodeAsync:()=>rE,decode:()=>tE,date:()=>VE,custom:()=>h$,cuid2:()=>yE,cuid:()=>vE,core:()=>Lk,config:()=>Nt,coerce:()=>_$,codec:()=>c$,clone:()=>fn,cidrv6:()=>CE,cidrv4:()=>$E,check:()=>p$,catch:()=>ym,boolean:()=>Uh,bigint:()=>BE,base64url:()=>IE,base64:()=>TE,array:()=>qs,any:()=>qE,_function:()=>Ql,_default:()=>pm,_ZodString:()=>vu,ZodXor:()=>Xh,ZodXID:()=>Eu,ZodVoid:()=>Kh,ZodUnknown:()=>Vh,ZodUnion:()=>Vs,ZodUndefined:()=>Zh,ZodUUID:()=>On,ZodURL:()=>Us,ZodULID:()=>Su,ZodType:()=>he,ZodTuple:()=>tm,ZodTransform:()=>lm,ZodTemplateLiteral:()=>wm,ZodSymbol:()=>jh,ZodSuccess:()=>bm,ZodStringFormat:()=>Le,ZodString:()=>Bs,ZodSet:()=>om,ZodRecord:()=>Js,ZodRealError:()=>en,ZodReadonly:()=>km,ZodPromise:()=>$m,ZodPrefault:()=>hm,ZodPipe:()=>Zu,ZodOptional:()=>Uu,ZodObject:()=>Ws,ZodNumberFormat:()=>ai,ZodNumber:()=>js,ZodNullable:()=>dm,ZodNull:()=>Hh,ZodNonOptional:()=>ju,ZodNever:()=>Jh,ZodNanoID:()=>ku,ZodNaN:()=>xm,ZodMap:()=>im,ZodMAC:()=>Fh,ZodLiteral:()=>sm,ZodLazy:()=>Sm,ZodKSUID:()=>$u,ZodJWT:()=>Du,ZodIssueCode:()=>AL,ZodIntersection:()=>Qh,ZodISOTime:()=>Ph,ZodISODuration:()=>Lh,ZodISODateTime:()=>Oh,ZodISODate:()=>Rh,ZodIPv6:()=>Tu,ZodIPv4:()=>Cu,ZodGUID:()=>_s,ZodFunction:()=>Cm,ZodFirstPartyTypeKind:()=>Dp,ZodFile:()=>am,ZodExactOptional:()=>um,ZodError:()=>IL,ZodEnum:()=>ao,ZodEmoji:()=>xu,ZodEmail:()=>yu,ZodE164:()=>Nu,ZodDiscriminatedUnion:()=>Yh,ZodDefault:()=>fm,ZodDate:()=>Pu,ZodCustomStringFormat:()=>uo,ZodCustom:()=>Ks,ZodCodec:()=>Hu,ZodCatch:()=>vm,ZodCUID2:()=>wu,ZodCUID:()=>_u,ZodCIDRv6:()=>Au,ZodCIDRv4:()=>Iu,ZodBoolean:()=>Zs,ZodBigIntFormat:()=>Ou,ZodBigInt:()=>Hs,ZodBase64URL:()=>Mu,ZodBase64:()=>zu,ZodArray:()=>Gh,ZodAny:()=>Wh,TimePrecision:()=>kS,NEVER:()=>Fk,$output:()=>gS,$input:()=>bS,$brand:()=>Bk});var Lk={};tr(Lk,{version:()=>Q_,util:()=>ye,treeifyError:()=>Yk,toJSONSchema:()=>j2,toDotPath:()=>Qk,safeParseAsync:()=>n_,safeParse:()=>t_,safeEncodeAsync:()=>HO,safeEncode:()=>jO,safeDecodeAsync:()=>qO,safeDecode:()=>ZO,registry:()=>sh,regexes:()=>si,process:()=>De,prettifyError:()=>e_,parseAsync:()=>Ap,parse:()=>Ip,meta:()=>n2,locales:()=>oh,isValidJWT:()=>Sw,isValidBase64URL:()=>kw,isValidBase64:()=>Yp,initializeContext:()=>io,globalRegistry:()=>un,globalConfig:()=>Zl,formatError:()=>Fp,flattenError:()=>Lp,finalize:()=>so,extractDefs:()=>oo,encodeAsync:()=>BO,encode:()=>LO,describe:()=>t2,decodeAsync:()=>UO,decode:()=>FO,createToJSONSchemaMethod:()=>i2,createStandardJSONSchemaMethod:()=>ks,config:()=>Nt,clone:()=>fn,_xor:()=>oL,_xid:()=>bh,_void:()=>qS,_uuidv7:()=>dh,_uuidv6:()=>ch,_uuidv4:()=>uh,_uuid:()=>lh,_url:()=>ou,_uppercase:()=>lu,_unknown:()=>ZS,_union:()=>iL,_undefined:()=>BS,_ulid:()=>gh,_uint64:()=>LS,_uint32:()=>MS,_tuple:()=>lL,_trim:()=>hu,_transform:()=>mL,_toUpperCase:()=>gu,_toLowerCase:()=>mu,_templateLiteral:()=>SL,_symbol:()=>FS,_superRefine:()=>QS,_success:()=>xL,_stringbool:()=>r2,_stringFormat:()=>Fs,_string:()=>vS,_startsWith:()=>cu,_slugify:()=>bu,_size:()=>Rs,_set:()=>dL,_safeParseAsync:()=>zs,_safeParse:()=>As,_safeEncodeAsync:()=>Wp,_safeEncode:()=>Hp,_safeDecodeAsync:()=>Vp,_safeDecode:()=>qp,_regex:()=>su,_refine:()=>YS,_record:()=>uL,_readonly:()=>wL,_property:()=>zh,_promise:()=>$L,_positive:()=>Ch,_pipe:()=>_L,_parseAsync:()=>Is,_parse:()=>Ts,_overwrite:()=>rr,_optional:()=>gL,_number:()=>$S,_nullable:()=>bL,_null:()=>US,_normalize:()=>pu,_nonpositive:()=>Ih,_nonoptional:()=>yL,_nonnegative:()=>Ah,_never:()=>HS,_negative:()=>Th,_nativeEnum:()=>pL,_nanoid:()=>ph,_nan:()=>JS,_multipleOf:()=>ro,_minSize:()=>Cr,_minLength:()=>ri,_min:()=>Wt,_mime:()=>fu,_maxSize:()=>lo,_maxLength:()=>Ps,_max:()=>cn,_map:()=>cL,_mac:()=>xS,_lte:()=>cn,_lt:()=>Er,_lowercase:()=>au,_literal:()=>hL,_length:()=>Ls,_lazy:()=>EL,_ksuid:()=>vh,_jwt:()=>$h,_isoTime:()=>SS,_isoDuration:()=>ES,_isoDateTime:()=>_S,_isoDate:()=>wS,_ipv6:()=>xh,_ipv4:()=>yh,_intersection:()=>aL,_int64:()=>PS,_int32:()=>zS,_int:()=>TS,_includes:()=>uu,_guid:()=>Gl,_gte:()=>Wt,_gt:()=>$r,_float64:()=>AS,_float32:()=>IS,_file:()=>GS,_enum:()=>fL,_endsWith:()=>du,_encodeAsync:()=>jp,_encode:()=>Bp,_emoji:()=>fh,_email:()=>ah,_e164:()=>Eh,_discriminatedUnion:()=>sL,_default:()=>vL,_decodeAsync:()=>Zp,_decode:()=>Up,_date:()=>WS,_custom:()=>XS,_cuid2:()=>mh,_cuid:()=>hh,_coercedString:()=>yS,_coercedNumber:()=>CS,_coercedDate:()=>VS,_coercedBoolean:()=>DS,_coercedBigint:()=>RS,_cidrv6:()=>_h,_cidrv4:()=>kh,_check:()=>e2,_catch:()=>kL,_boolean:()=>NS,_bigint:()=>OS,_base64url:()=>Sh,_base64:()=>wh,_array:()=>KS,_any:()=>jS,TimePrecision:()=>kS,NEVER:()=>Fk,JSONSchemaGenerator:()=>Np,JSONSchema:()=>TL,Doc:()=>Vl,$output:()=>gS,$input:()=>bS,$constructor:()=>w,$brand:()=>Bk,$ZodXor:()=>jw,$ZodXID:()=>uw,$ZodVoid:()=>Ow,$ZodUnknown:()=>Nw,$ZodUnion:()=>iu,$ZodUndefined:()=>Aw,$ZodUUID:()=>tw,$ZodURL:()=>rw,$ZodULID:()=>lw,$ZodType:()=>fe,$ZodTuple:()=>nh,$ZodTransform:()=>Xw,$ZodTemplateLiteral:()=>lS,$ZodSymbol:()=>Iw,$ZodSuccess:()=>rS,$ZodStringFormat:()=>Pe,$ZodString:()=>Os,$ZodSet:()=>Vw,$ZodRegistry:()=>Kl,$ZodRecord:()=>qw,$ZodRealError:()=>Qt,$ZodReadonly:()=>aS,$ZodPromise:()=>cS,$ZodPrefault:()=>tS,$ZodPipe:()=>sS,$ZodOptional:()=>rh,$ZodObjectJIT:()=>Uw,$ZodObject:()=>Bw,$ZodNumberFormat:()=>Cw,$ZodNumber:()=>Qp,$ZodNullable:()=>Qw,$ZodNull:()=>zw,$ZodNonOptional:()=>nS,$ZodNever:()=>Dw,$ZodNanoID:()=>ow,$ZodNaN:()=>oS,$ZodMap:()=>Ww,$ZodMAC:()=>bw,$ZodLiteral:()=>Kw,$ZodLazy:()=>dS,$ZodKSUID:()=>cw,$ZodJWT:()=>Ew,$ZodIntersection:()=>Hw,$ZodISOTime:()=>pw,$ZodISODuration:()=>hw,$ZodISODateTime:()=>dw,$ZodISODate:()=>fw,$ZodIPv6:()=>gw,$ZodIPv4:()=>mw,$ZodGUID:()=>ew,$ZodFunction:()=>uS,$ZodFile:()=>Gw,$ZodExactOptional:()=>Yw,$ZodError:()=>Pp,$ZodEnum:()=>Jw,$ZodEncodeError:()=>eo,$ZodEmoji:()=>iw,$ZodEmail:()=>nw,$ZodE164:()=>ww,$ZodDiscriminatedUnion:()=>Zw,$ZodDefault:()=>eS,$ZodDate:()=>Rw,$ZodCustomStringFormat:()=>$w,$ZodCustom:()=>fS,$ZodCodec:()=>ih,$ZodCheckUpperCase:()=>W_,$ZodCheckStringFormat:()=>Ds,$ZodCheckStartsWith:()=>J_,$ZodCheckSizeEquals:()=>B_,$ZodCheckRegex:()=>H_,$ZodCheckProperty:()=>G_,$ZodCheckOverwrite:()=>Y_,$ZodCheckNumberFormat:()=>R_,$ZodCheckMultipleOf:()=>O_,$ZodCheckMinSize:()=>F_,$ZodCheckMinLength:()=>j_,$ZodCheckMimeType:()=>X_,$ZodCheckMaxSize:()=>L_,$ZodCheckMaxLength:()=>U_,$ZodCheckLowerCase:()=>q_,$ZodCheckLessThan:()=>Gp,$ZodCheckLengthEquals:()=>Z_,$ZodCheckIncludes:()=>V_,$ZodCheckGreaterThan:()=>Xp,$ZodCheckEndsWith:()=>K_,$ZodCheckBigIntFormat:()=>P_,$ZodCheck:()=>Ge,$ZodCatch:()=>iS,$ZodCUID2:()=>aw,$ZodCUID:()=>sw,$ZodCIDRv6:()=>yw,$ZodCIDRv4:()=>vw,$ZodBoolean:()=>eh,$ZodBigIntFormat:()=>Tw,$ZodBigInt:()=>th,$ZodBase64URL:()=>_w,$ZodBase64:()=>xw,$ZodAsyncError:()=>Qn,$ZodArray:()=>Pw,$ZodAny:()=>Mw});var Fk=Object.freeze({status:"aborted"});function w(e,t,n){function i(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);let u=s.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){let f=c[d];f in a||(a[f]=u[f].bind(a))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(a){var l;let u=n?.Parent?new o:this;i(u,a),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Bk=Symbol("zod_brand"),Qn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},eo=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Zl={};function Nt(e){return e&&Object.assign(Zl,e),Zl}var ye={};tr(ye,{unwrapMessage:()=>xs,uint8ArrayToHex:()=>PO,uint8ArrayToBase64url:()=>OO,uint8ArrayToBase64:()=>Gk,stringifyPrimitive:()=>ie,slugify:()=>jk,shallowClone:()=>Hk,safeExtend:()=>IO,required:()=>MO,randomString:()=>_O,propertyKeyTypes:()=>ql,promiseAllObject:()=>kO,primitiveTypes:()=>qk,prefixIssues:()=>$n,pick:()=>$O,partial:()=>zO,parsedType:()=>se,optionalKeys:()=>Wk,omit:()=>CO,objectClone:()=>vO,numKeys:()=>wO,nullish:()=>oi,normalizeParams:()=>F,mergeDefs:()=>nr,merge:()=>AO,jsonStringifyReplacer:()=>Hl,joinValues:()=>R,issue:()=>Wl,isPlainObject:()=>ni,isObject:()=>to,hexToUint8Array:()=>RO,getSizableOrigin:()=>nu,getParsedType:()=>SO,getLengthableOrigin:()=>ru,getEnumValues:()=>Op,getElementAtPath:()=>xO,floatSafeRemainder:()=>Uk,finalizeIssue:()=>dn,extend:()=>TO,escapeRegex:()=>er,esc:()=>Cp,defineLazy:()=>ge,createTransparentProxy:()=>EO,cloneDef:()=>yO,clone:()=>fn,cleanRegex:()=>tu,cleanEnum:()=>NO,captureStackTrace:()=>Rp,cached:()=>Cs,base64urlToUint8Array:()=>DO,base64ToUint8Array:()=>Kk,assignProp:()=>Tr,assertNotEqual:()=>hO,assertNever:()=>gO,assertIs:()=>mO,assertEqual:()=>pO,assert:()=>bO,allowsEval:()=>Zk,aborted:()=>ti,NUMBER_FORMAT_RANGES:()=>Vk,Class:()=>Tp,BIGINT_FORMAT_RANGES:()=>Jk});function pO(e){return e}function hO(e){return e}function mO(e){}function gO(e){throw Error("Unexpected value in exhaustive check")}function bO(e){}function Op(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function R(e,t="|"){return e.map(n=>ie(n)).join(t)}function Hl(e,t){return typeof t=="bigint"?t.toString():t}function Cs(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function oi(e){return e==null}function tu(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Uk(e,t){let n=(e.toString().split(".")[1]||"").length,i=t.toString(),r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}let o=n>r?n:r,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}var yk=Symbol("evaluating");function ge(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==yk)return i===void 0&&(i=yk,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function vO(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Tr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function yO(e){return nr(e._zod.def)}function xO(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function kO(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function _O(e=10){let t="";for(let n=0;n<e;n++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t}function Cp(e){return JSON.stringify(e)}function jk(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Rp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function to(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Zk=Cs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function ni(e){if(to(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(to(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Hk(e){return ni(e)?{...e}:Array.isArray(e)?[...e]:e}function wO(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var SO=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${t}`)}},ql=new Set(["string","number","symbol"]),qk=new Set(["string","number","bigint","boolean","symbol","undefined"]);function er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fn(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function F(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function EO(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function ie(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Wk(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Vk={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Jk={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function $O(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let r=nr(e._zod.def,{get shape(){let o={};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=n.shape[s])}return Tr(this,"shape",o),o},checks:[]});return fn(e,r)}function CO(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let r=nr(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return Tr(this,"shape",o),o},checks:[]});return fn(e,r)}function TO(e,t){if(!ni(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let r=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=nr(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Tr(this,"shape",r),r}});return fn(e,i)}function IO(e,t){if(!ni(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Tr(this,"shape",i),i}});return fn(e,n)}function AO(e,t){let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Tr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return fn(e,n)}function zO(e,t,n){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let r=nr(t._zod.def,{get shape(){let o=t._zod.def.shape,s={...o};if(n)for(let a in n){if(!(a in o))throw Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(let a in o)s[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return Tr(this,"shape",s),s},checks:[]});return fn(t,r)}function MO(e,t,n){let i=nr(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let s in n){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)o[s]=new e({type:"nonoptional",innerType:r[s]});return Tr(this,"shape",o),o}});return fn(t,i)}function ti(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function $n(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function xs(e){return typeof e=="string"?e:e?.message}function dn(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=xs(e.inst?._zod.def?.error?.(e))??xs(t?.error?.(e))??xs(n.customError?.(e))??xs(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,!t?.reportInput&&delete i.input,i}function nu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ru(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function se(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Wl(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function NO(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Kk(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Gk(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function DO(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Kk(t+n)}function OO(e){return Gk(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RO(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function PO(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Tp=class{constructor(...t){}},Xk=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pp=w("$ZodError",Xk),Qt=w("$ZodError",Xk,{Parent:Error});function Lp(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Fp(e,t=n=>n.message){let n={_errors:[]},i=r=>{for(let o of r.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let s=n,a=0;for(;a<o.path.length;){let l=o.path[a];a!==o.path.length-1?s[l]=s[l]||{_errors:[]}:(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(o))),s=s[l],a++}}};return i(e),n}function Yk(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var s,a;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>i({issues:u},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let u=[...o,...l.path];if(u.length===0){n.errors.push(t(l));continue}let c=n,d=0;for(;d<u.length;){let f=u[d],p=d===u.length-1;typeof f=="string"?(c.properties??(c.properties={}),(s=c.properties)[f]??(s[f]={errors:[]}),c=c.properties[f]):(c.items??(c.items=[]),(a=c.items)[f]??(a[f]={errors:[]}),c=c.items[f]),p&&c.errors.push(t(l)),d++}}};return i(e),n}function Qk(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function e_(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Qk(i.path)}`);return t.join(`
`)}var Ts=e=>(t,n,i,r)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Qn;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>dn(l,o,Nt())));throw Rp(a,r?.callee),a}return s.value},Ip=Ts(Qt),Is=e=>async(t,n,i,r)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>dn(l,o,Nt())));throw Rp(a,r?.callee),a}return s.value},Ap=Is(Qt),As=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Qn;return o.issues.length?{success:!1,error:new(e??Pp)(o.issues.map(s=>dn(s,r,Nt())))}:{success:!0,data:o.value}},t_=As(Qt),zs=e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>dn(s,r,Nt())))}:{success:!0,data:o.value}},n_=zs(Qt),Bp=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ts(e)(t,n,r)},LO=Bp(Qt),Up=e=>(t,n,i)=>Ts(e)(t,n,i),FO=Up(Qt),jp=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Is(e)(t,n,r)},BO=jp(Qt),Zp=e=>async(t,n,i)=>Is(e)(t,n,i),UO=Zp(Qt),Hp=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return As(e)(t,n,r)},jO=Hp(Qt),qp=e=>(t,n,i)=>As(e)(t,n,i),ZO=qp(Qt),Wp=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return zs(e)(t,n,r)},HO=Wp(Qt),Vp=e=>async(t,n,i)=>zs(e)(t,n,i),qO=Vp(Qt),si={};tr(si,{xid:()=>s_,uuid7:()=>KO,uuid6:()=>JO,uuid4:()=>VO,uuid:()=>no,uppercase:()=>N_,unicodeEmail:()=>f_,undefined:()=>z_,ulid:()=>o_,time:()=>S_,string:()=>$_,sha512_hex:()=>gR,sha512_base64url:()=>vR,sha512_base64:()=>bR,sha384_hex:()=>pR,sha384_base64url:()=>mR,sha384_base64:()=>hR,sha256_hex:()=>cR,sha256_base64url:()=>fR,sha256_base64:()=>dR,sha1_hex:()=>aR,sha1_base64url:()=>uR,sha1_base64:()=>lR,rfc5322Email:()=>XO,number:()=>Kp,null:()=>A_,nanoid:()=>l_,md5_hex:()=>iR,md5_base64url:()=>sR,md5_base64:()=>oR,mac:()=>g_,lowercase:()=>M_,ksuid:()=>a_,ipv6:()=>m_,ipv4:()=>h_,integer:()=>T_,idnEmail:()=>YO,html5Email:()=>GO,hostname:()=>tR,hex:()=>rR,guid:()=>c_,extendedDuration:()=>WO,emoji:()=>p_,email:()=>d_,e164:()=>x_,duration:()=>u_,domain:()=>nR,datetime:()=>E_,date:()=>__,cuid2:()=>i_,cuid:()=>r_,cidrv6:()=>v_,cidrv4:()=>b_,browserEmail:()=>QO,boolean:()=>I_,bigint:()=>C_,base64url:()=>Jp,base64:()=>y_});var r_=/^[cC][^\s-]{8,}$/,i_=/^[0-9a-z]+$/,o_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s_=/^[0-9a-vA-V]{20}$/,a_=/^[A-Za-z0-9]{27}$/,l_=/^[a-zA-Z0-9_-]{21}$/,u_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,WO=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,c_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,no=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,VO=no(4),JO=no(6),KO=no(7),d_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GO=/^[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])?)*$/,XO=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,f_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,YO=f_,QO=/^[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])?)*$/,eR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function p_(){return new RegExp(eR,"u")}var h_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,m_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,g_=e=>{let t=er(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},b_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,v_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,y_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jp=/^[A-Za-z0-9_-]*$/,tR=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,nR=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,x_=/^\+[1-9]\d{6,14}$/,k_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",__=new RegExp(`^${k_}$`);function w_(e){return typeof e.precision=="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function S_(e){return new RegExp(`^${w_(e)}$`)}function E_(e){let t=w_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${k_}T(?:${i})$`)}var $_=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},C_=/^-?\d+n?$/,T_=/^-?\d+$/,Kp=/^-?\d+(?:\.\d+)?$/,I_=/^(?:true|false)$/i,A_=/^null$/i,z_=/^undefined$/i,M_=/^[^A-Z]*$/,N_=/^[^a-z]*$/,rR=/^[0-9a-fA-F]*$/;function Ms(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ns(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var iR=/^[0-9a-fA-F]{32}$/,oR=Ms(22,"=="),sR=Ns(22),aR=/^[0-9a-fA-F]{40}$/,lR=Ms(27,"="),uR=Ns(27),cR=/^[0-9a-fA-F]{64}$/,dR=Ms(43,"="),fR=Ns(43),pR=/^[0-9a-fA-F]{96}$/,hR=Ms(64,""),mR=Ns(64),gR=/^[0-9a-fA-F]{128}$/,bR=Ms(86,"=="),vR=Ns(86),Ge=w("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),D_={number:"number",bigint:"bigint",object:"date"},Gp=w("$ZodCheckLessThan",(e,t)=>{Ge.init(e,t);let n=D_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xp=w("$ZodCheckGreaterThan",(e,t)=>{Ge.init(e,t);let n=D_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),O_=w("$ZodCheckMultipleOf",(e,t)=>{Ge.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Uk(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),R_=w("$ZodCheckNumberFormat",(e,t)=>{Ge.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Vk[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=o,n&&(a.pattern=T_)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),P_=w("$ZodCheckBigIntFormat",(e,t)=>{Ge.init(e,t);let[n,i]=Jk[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),L_=w("$ZodCheckMaxSize",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:nu(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),F_=w("$ZodCheckMinSize",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:nu(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),B_=w("$ZodCheckSizeEquals",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:nu(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),U_=w("$ZodCheckMaxLength",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let o=ru(r);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),j_=w("$ZodCheckMinLength",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let o=ru(r);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Z_=w("$ZodCheckLengthEquals",(e,t)=>{var n;Ge.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let s=ru(r),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ds=w("$ZodCheckStringFormat",(e,t)=>{var n,i;Ge.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),H_=w("$ZodCheckRegex",(e,t)=>{Ds.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),q_=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=M_),Ds.init(e,t)}),W_=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=N_),Ds.init(e,t)}),V_=w("$ZodCheckIncludes",(e,t)=>{Ge.init(e,t);let n=er(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),J_=w("$ZodCheckStartsWith",(e,t)=>{Ge.init(e,t);let n=new RegExp(`^${er(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),K_=w("$ZodCheckEndsWith",(e,t)=>{Ge.init(e,t);let n=new RegExp(`.*${er(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function xk(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues))}var G_=w("$ZodCheckProperty",(e,t)=>{Ge.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>xk(r,n,t.property));xk(i,n,t.property)}}),X_=w("$ZodCheckMimeType",(e,t)=>{Ge.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Y_=w("$ZodCheckOverwrite",(e,t)=>{Ge.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}}),Vl=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
`).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),r=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of r)this.content.push(o)}compile(){let t=Function,n=this?.args,i=[...(this?.content??[""]).map(r=>` ${r}`)];return new t(...n,i.join(`
`))}},Q_={major:4,minor:3,patch:5},fe=w("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Q_;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,l)=>{let u=ti(s),c;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&l?.async===!1)throw new Qn;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(u||(u=ti(s,f)))});else{if(s.issues.length===f)continue;u||(u=ti(s,f))}}return c?c.then(()=>s):s},o=(s,a,l)=>{if(ti(s))return s.aborted=!0,s;let u=r(a,i,l);if(u instanceof Promise){if(l.async===!1)throw new Qn;return u.then(c=>e._zod.parse(c,l))}return e._zod.parse(u,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,s,a)):o(u,s,a)}let l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Qn;return l.then(u=>r(u,i,a))}return r(l,i,a)}}ge(e,"~standard",()=>({validate:r=>{try{let o=t_(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return n_(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Os=w("$ZodString",(e,t)=>{fe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$_(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Pe=w("$ZodStringFormat",(e,t)=>{Ds.init(e,t),Os.init(e,t)}),ew=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=c_),Pe.init(e,t)}),tw=w("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=no(n))}else t.pattern??(t.pattern=no());Pe.init(e,t)}),nw=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=d_),Pe.init(e,t)}),rw=w("$ZodURL",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,!t.hostname.test(r.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),iw=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=p_()),Pe.init(e,t)}),ow=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=l_),Pe.init(e,t)}),sw=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=r_),Pe.init(e,t)}),aw=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=i_),Pe.init(e,t)}),lw=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=o_),Pe.init(e,t)}),uw=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=s_),Pe.init(e,t)}),cw=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=a_),Pe.init(e,t)}),dw=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=E_(t)),Pe.init(e,t)}),fw=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=__),Pe.init(e,t)}),pw=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=S_(t)),Pe.init(e,t)}),hw=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=u_),Pe.init(e,t)}),mw=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=h_),Pe.init(e,t),e._zod.bag.format="ipv4"}),gw=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=m_),Pe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),bw=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=g_(t.delimiter)),Pe.init(e,t),e._zod.bag.format="mac"}),vw=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=b_),Pe.init(e,t)}),yw=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=v_),Pe.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw Error();let[r,o]=i;if(!o)throw Error();let s=Number(o);if(`${s}`!==o||s<0||s>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Yp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var xw=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=y_),Pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Yp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function kw(e){if(!Jp.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Yp(n)}var _w=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Jp),Pe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{kw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ww=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=x_),Pe.init(e,t)});function Sw(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Ew=w("$ZodJWT",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{Sw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),$w=w("$ZodCustomStringFormat",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Qp=w("$ZodNumber",(e,t)=>{fe.init(e,t),e._zod.pattern=e._zod.bag.pattern??Kp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Cw=w("$ZodNumberFormat",(e,t)=>{R_.init(e,t),Qp.init(e,t)}),eh=w("$ZodBoolean",(e,t)=>{fe.init(e,t),e._zod.pattern=I_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),th=w("$ZodBigInt",(e,t)=>{fe.init(e,t),e._zod.pattern=C_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Tw=w("$ZodBigIntFormat",(e,t)=>{P_.init(e,t),th.init(e,t)}),Iw=w("$ZodSymbol",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Aw=w("$ZodUndefined",(e,t)=>{fe.init(e,t),e._zod.pattern=z_,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),zw=w("$ZodNull",(e,t)=>{fe.init(e,t),e._zod.pattern=A_,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Mw=w("$ZodAny",(e,t)=>{fe.init(e,t),e._zod.parse=n=>n}),Nw=w("$ZodUnknown",(e,t)=>{fe.init(e,t),e._zod.parse=n=>n}),Dw=w("$ZodNever",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Ow=w("$ZodVoid",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Rw=w("$ZodDate",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function kk(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues)),t.value[n]=e.value}var Pw=w("$ZodArray",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],l=t.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(u=>kk(u,n,s))):kk(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function Jl(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...$n(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Lw(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Wk(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Fw(e,t,n,i,r,o){let s=[],a=r.keySet,l=r.catchall._zod,u=l.def.type,c=l.optout==="optional";for(let d in t){if(a.has(d))continue;if(u==="never"){s.push(d);continue}let f=l.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(p=>Jl(p,n,d,t,c))):Jl(f,n,d,t,c)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Bw=w("$ZodObject",(e,t)=>{if(fe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let a={...s};return Object.defineProperty(t,"shape",{value:a}),a}})}let n=Cs(()=>Lw(t));ge(e._zod,"propValues",()=>{let s=t.shape,a={};for(let l in s){let u=s[l]._zod;if(u.values){a[l]??(a[l]=new Set);for(let c of u.values)a[l].add(c)}}return a});let i=to,r=t.catchall,o;e._zod.parse=(s,a)=>{o??(o=n.value);let l=s.value;if(!i(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let u=[],c=o.shape;for(let d of o.keys){let f=c[d],p=f._zod.optout==="optional",h=f._zod.run({value:l[d],issues:[]},a);h instanceof Promise?u.push(h.then(m=>Jl(m,s,d,l,p))):Jl(h,s,d,l,p)}return r?Fw(u,l,s,a,n.value,e):u.length?Promise.all(u).then(()=>s):s}}),Uw=w("$ZodObjectJIT",(e,t)=>{Bw.init(e,t);let n=e._zod.parse,i=Cs(()=>Lw(t)),r=d=>{let f=new Vl(["shape","payload","ctx"]),p=i.value,h=v=>{let x=Cp(v);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),b=0;for(let v of p.keys)m[v]=`key_${b++}`;f.write("const newResult = {};");for(let v of p.keys){let x=m[v],k=Cp(v),E=d[v]?._zod?.optout==="optional";f.write(`const ${x} = ${h(v)};`),E?f.write(`
if (${x}.issues.length) {
if (${k} in input) {
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
...iss,
path: iss.path ? [${k}, ...iss.path] : [${k}]
})));
}
}
if (${x}.value === undefined) {
if (${k} in input) {
newResult[${k}] = undefined;
}
} else {
newResult[${k}] = ${x}.value;
}
`):f.write(`
if (${x}.issues.length) {
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
...iss,
path: iss.path ? [${k}, ...iss.path] : [${k}]
})));
}
if (${x}.value === undefined) {
if (${k} in input) {
newResult[${k}] = undefined;
}
} else {
newResult[${k}] = ${x}.value;
}
`)}f.write("payload.value = newResult;"),f.write("return payload;");let g=f.compile();return(v,x)=>g(d,v,x)},o,s=to,a=!Zl.jitless,l=a&&Zk.value,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=i.value);let p=d.value;return s(p)?a&&l&&f?.async===!1&&f.jitless!==!0?(o||(o=r(t.shape)),d=o(d,f),u?Fw([],p,d,f,c,e):d):n(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function _k(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!ti(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>dn(s,i,Nt())))}),t)}var iu=w("$ZodUnion",(e,t)=>{fe.init(e,t),ge(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>tu(o.source)).join("|")})$`)}});let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1,a=[];for(let l of t.options){let u=l._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(l=>_k(l,r,e,o)):_k(a,r,e,o)}});function wk(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>dn(s,i,Nt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var jw=w("$ZodXor",(e,t)=>{iu.init(e,t),t.inclusive=!1;let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1,a=[];for(let l of t.options){let u=l._zod.run({value:r.value,issues:[]},o);u instanceof Promise?(a.push(u),s=!0):a.push(u)}return s?Promise.all(a).then(l=>wk(l,r,e,o)):wk(a,r,e,o)}}),Zw=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,iu.init(e,t);let n=e._zod.parse;ge(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of l)r[a].add(u)}}return r});let i=Cs(()=>{let r=t.options,o=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!to(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),Hw=w("$ZodIntersection",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([a,l])=>Sk(n,a,l)):Sk(n,o,s)}});function zp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ni(e)&&ni(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=zp(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=zp(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Sk(e,t,n){let i=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r&&e.issues.push({...r,keys:o}),ti(e))return e;let s=zp(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var nh=w("$ZodTuple",(e,t)=>{fe.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...n].reverse().findIndex(c=>c._zod.optin!=="optional"),l=a===-1?0:n.length-a;if(!t.rest){let c=o.length>n.length,d=o.length<l-1;if(c||d)return i.issues.push({...c?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),i}let u=-1;for(let c of n){if(u++,u>=o.length&&u>=l)continue;let d=c._zod.run({value:o[u],issues:[]},r);d instanceof Promise?s.push(d.then(f=>Fl(f,i,u))):Fl(d,i,u)}if(t.rest){let c=o.slice(n.length);for(let d of c){u++;let f=t.rest._zod.run({value:d,issues:[]},r);f instanceof Promise?s.push(f.then(p=>Fl(p,i,u))):Fl(f,i,u)}}return s.length?Promise.all(s).then(()=>i):i}});function Fl(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues)),t.value[n]=e.value}var qw=w("$ZodRecord",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!ni(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let c=t.valueType._zod.run({value:r[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...$n(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...$n(u,c.issues)),n.value[u]=c.value)}let l;for(let u in r)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},i);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Kp.test(a)&&l.issues.length&&l.issues.some(c=>c.code==="invalid_type"&&c.expected==="number")){let c=t.keyType._zod.run({value:Number(a),issues:[]},i);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");c.issues.length===0&&(l=c)}if(l.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(c=>dn(c,i,Nt())),input:a,path:[a],inst:e});continue}let u=t.valueType._zod.run({value:r[a],issues:[]},i);u instanceof Promise?o.push(u.then(c=>{c.issues.length&&n.issues.push(...$n(a,c.issues)),n.value[l.value]=c.value})):(u.issues.length&&n.issues.push(...$n(a,u.issues)),n.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Ww=w("$ZodMap",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[s,a]of r){let l=t.keyType._zod.run({value:s,issues:[]},i),u=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise||u instanceof Promise?o.push(Promise.all([l,u]).then(([c,d])=>{Ek(c,d,n,s,r,e,i)})):Ek(l,u,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Ek(e,t,n,i,r,o,s){e.issues.length&&(ql.has(typeof i)?n.issues.push(...$n(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(a=>dn(a,s,Nt()))})),t.issues.length&&(ql.has(typeof i)?n.issues.push(...$n(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(a=>dn(a,s,Nt()))})),n.value.set(e.value,t.value)}var Vw=w("$ZodSet",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(l=>$k(l,n))):$k(a,n)}return o.length?Promise.all(o).then(()=>n):n}});function $k(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Jw=w("$ZodEnum",(e,t)=>{fe.init(e,t);let n=Op(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>ql.has(typeof r)).map(r=>typeof r=="string"?er(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let s=r.value;return i.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),Kw=w("$ZodLiteral",(e,t)=>{if(fe.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?er(i):i?er(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Gw=w("$ZodFile",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Xw=w("$ZodTransform",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new eo(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(n.value=o,n));if(r instanceof Promise)throw new Qn;return n.value=r,n}});function Ck(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var rh=w("$ZodOptional",(e,t)=>{fe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${tu(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Ck(o,n.value)):Ck(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Yw=w("$ZodExactOptional",(e,t)=>{rh.init(e,t),ge(e._zod,"values",()=>t.innerType._zod.values),ge(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Qw=w("$ZodNullable",(e,t)=>{fe.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${tu(n.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),eS=w("$ZodDefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Tk(o,t)):Tk(r,t)}});function Tk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tS=w("$ZodPrefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),nS=w("$ZodNonOptional",(e,t)=>{fe.init(e,t),ge(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Ik(o,e)):Ik(r,e)}});function Ik(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var rS=w("$ZodSuccess",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new eo("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),iS=w("$ZodCatch",(e,t)=>{fe.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>dn(s,i,Nt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>dn(o,i,Nt()))},input:n.value}),n.issues=[]),n)}}),oS=w("$ZodNaN",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),sS=w("$ZodPipe",(e,t)=>{fe.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Bl(s,t.in,i)):Bl(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Bl(o,t.out,i)):Bl(r,t.out,i)}});function Bl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ih=w("$ZodCodec",(e,t)=>{fe.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ul(o,t,i)):Ul(r,t,i)}else{let r=t.out._zod.run(n,i);return r instanceof Promise?r.then(o=>Ul(o,t,i)):Ul(r,t,i)}}});function Ul(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(r=>jl(e,r,t.out,n)):jl(e,i,t.out,n)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(r=>jl(e,r,t.in,n)):jl(e,i,t.in,n)}}function jl(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var aS=w("$ZodReadonly",(e,t)=>{fe.init(e,t),ge(e._zod,"propValues",()=>t.innerType._zod.propValues),ge(e._zod,"values",()=>t.innerType._zod.values),ge(e._zod,"optin",()=>t.innerType?._zod?.optin),ge(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Ak):Ak(r)}});function Ak(e){return e.value=Object.freeze(e.value),e}var lS=w("$ZodTemplateLiteral",(e,t)=>{fe.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||qk.has(typeof i))n.push(er(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),uS=w("$ZodFunction",(e,t)=>(fe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw Error("implement() must be called with a function");return function(...i){let r=e._def.input?Ip(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Ip(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Ap(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Ap(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new nh({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),cS=w("$ZodPromise",(e,t)=>{fe.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),dS=w("$ZodLazy",(e,t)=>{fe.init(e,t),ge(e._zod,"innerType",()=>t.getter()),ge(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ge(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ge(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ge(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),fS=w("$ZodCustom",(e,t)=>{Ge.init(e,t),fe.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>zk(o,n,i,e));zk(r,n,i,e)}});function zk(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Wl(r))}}var oh={};tr(oh,{zhTW:()=>tL,zhCN:()=>QP,yo:()=>rL,vi:()=>XP,uz:()=>KP,ur:()=>VP,uk:()=>mS,ua:()=>qP,tr:()=>ZP,th:()=>UP,ta:()=>FP,sv:()=>PP,sl:()=>OP,ru:()=>NP,pt:()=>zP,ps:()=>CP,pl:()=>IP,ota:()=>EP,no:()=>wP,nl:()=>kP,ms:()=>yP,mk:()=>bP,lt:()=>mP,ko:()=>pP,km:()=>hS,kh:()=>dP,ka:()=>uP,ja:()=>aP,it:()=>oP,is:()=>rP,id:()=>tP,hy:()=>QR,hu:()=>XR,he:()=>KR,frCA:()=>VR,fr:()=>qR,fi:()=>ZR,fa:()=>UR,es:()=>FR,eo:()=>PR,en:()=>pS,de:()=>DR,da:()=>MR,cs:()=>AR,ca:()=>TR,bg:()=>$R,be:()=>SR,az:()=>_R,ar:()=>xR});var yR=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${ie(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${R(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function xR(){return{localeError:yR()}}var kR=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${ie(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function _R(){return{localeError:kR()}}function Mk(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var wR=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${ie(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=Mk(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=Mk(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function SR(){return{localeError:wR()}}var ER=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${ie(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function $R(){return{localeError:ER()}}var CR=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${ie(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${R(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function TR(){return{localeError:CR()}}var IR=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${ie(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${R(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function AR(){return{localeError:IR()}}var zR=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${ie(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=i[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=i[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function MR(){return{localeError:zR()}}var NR=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${ie(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function DR(){return{localeError:NR()}}var OR=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${ie(r.values[0])}`:`Invalid option: expected one of ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function pS(){return{localeError:OR()}}var RR=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${ie(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function PR(){return{localeError:RR()}}var LR=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${ie(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function FR(){return{localeError:LR()}}var BR=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${ie(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${R(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${R(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function UR(){return{localeError:BR()}}var jR=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${ie(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${R(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function ZR(){return{localeError:jR()}}var HR=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${ie(r.values[0])} attendu`:`Option invalide : une valeur parmi ${R(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${R(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function qR(){return{localeError:HR()}}var WR=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${ie(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${R(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function VR(){return{localeError:WR()}}var JR=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?e[u]:void 0,i=u=>{let c=n(u);return c?c.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let c=u.expected,d=l[c??""]??i(c),f=se(u.input),p=l[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${ie(u.values[0])}`;let c=u.values.map(f=>ie(f));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let d=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let c=s(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",m=u.inclusive?`${u.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=u.inclusive?"<=":"<",p=o(u.origin??"value");return c?.unit?`${c.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${c.unit}`:`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let c=s(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let b=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let m=u.inclusive?`${u.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=u.inclusive?">=":">",p=o(u.origin??"value");return c?.unit?`${c.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${c.unit}`:`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let c=u;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let d=a[c.format],f=d?.label??c.format,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${R(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function KR(){return{localeError:JR()}}var GR=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${ie(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function XR(){return{localeError:GR()}}function Nk(e,t,n){return Math.abs(e)===1?t:n}function Qi(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var YR=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${ie(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=Nk(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Qi(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Qi(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=Nk(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Qi(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Qi(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${R(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Qi(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Qi(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function QR(){return{localeError:YR()}}var eP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${ie(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function tP(){return{localeError:eP()}}var nP=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${ie(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${R(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function rP(){return{localeError:nP()}}var iP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${ie(r.values[0])}`:`Opzione non valida: atteso uno tra ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${R(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function oP(){return{localeError:iP()}}var sP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${ie(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${R(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${R(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function aP(){return{localeError:sP()}}var lP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${ie(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${R(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function uP(){return{localeError:lP()}}var cP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${ie(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${R(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function hS(){return{localeError:cP()}}function dP(){return hS()}var fP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${ie(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${R(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),l=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${s}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),l=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${R(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function pP(){return{localeError:fP()}}var ys=e=>e.charAt(0).toUpperCase()+e.slice(1);function Dk(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var hP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,s,a){let l=e[r]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${ie(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${R(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,s=t(r.origin,Dk(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${ys(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ys(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,s=t(r.origin,Dk(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${ys(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ys(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${R(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${ys(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function mP(){return{localeError:hP()}}var gP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${ie(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function bP(){return{localeError:gP()}}var vP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${ie(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${R(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function yP(){return{localeError:vP()}}var xP=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${ie(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function kP(){return{localeError:xP()}}var _P=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${ie(r.values[0])}`:`Ugyldig valg: forventet en av ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function wP(){return{localeError:_P()}}var SP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${ie(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function EP(){return{localeError:SP()}}var $P=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${ie(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${R(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function CP(){return{localeError:$P()}}var TP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ie(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function IP(){return{localeError:TP()}}var AP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${ie(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function zP(){return{localeError:AP()}}function Ok(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var MP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${ie(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=Ok(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=Ok(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function NP(){return{localeError:MP()}}var DP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${ie(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${R(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function OP(){return{localeError:DP()}}var RP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${ie(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function PP(){return{localeError:RP()}}var LP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ie(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${R(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function FP(){return{localeError:LP()}}var BP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${ie(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${R(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function UP(){return{localeError:BP()}}var jP=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${ie(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function ZP(){return{localeError:jP()}}var HP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${ie(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function mS(){return{localeError:HP()}}function qP(){return mS()}var WP=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${ie(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${R(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${R(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function VP(){return{localeError:WP()}}var JP=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${ie(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function KP(){return{localeError:JP()}}var GP=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ie(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${R(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function XP(){return{localeError:GP()}}var YP=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ie(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function QP(){return{localeError:YP()}}var eL=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ie(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${R(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function tL(){return{localeError:eL()}}var nL=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=se(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${ie(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${o}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${o}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${R(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function rL(){return{localeError:nL()}}var Rk,gS=Symbol("ZodOutput"),bS=Symbol("ZodInput"),Kl=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function sh(){return new Kl}(Rk=globalThis).__zod_globalRegistry??(Rk.__zod_globalRegistry=sh());var un=globalThis.__zod_globalRegistry;function vS(e,t){return new e({type:"string",...F(t)})}function yS(e,t){return new e({type:"string",coerce:!0,...F(t)})}function ah(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...F(t)})}function Gl(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...F(t)})}function lh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...F(t)})}function uh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...F(t)})}function ch(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...F(t)})}function dh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...F(t)})}function ou(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...F(t)})}function fh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...F(t)})}function ph(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...F(t)})}function hh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...F(t)})}function mh(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...F(t)})}function gh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...F(t)})}function bh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...F(t)})}function vh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...F(t)})}function yh(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...F(t)})}function xh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...F(t)})}function xS(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...F(t)})}function kh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...F(t)})}function _h(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...F(t)})}function wh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...F(t)})}function Sh(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...F(t)})}function Eh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...F(t)})}function $h(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...F(t)})}var kS={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _S(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...F(t)})}function wS(e,t){return new e({type:"string",format:"date",check:"string_format",...F(t)})}function SS(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...F(t)})}function ES(e,t){return new e({type:"string",format:"duration",check:"string_format",...F(t)})}function $S(e,t){return new e({type:"number",checks:[],...F(t)})}function CS(e,t){return new e({type:"number",coerce:!0,checks:[],...F(t)})}function TS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...F(t)})}function IS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...F(t)})}function AS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...F(t)})}function zS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...F(t)})}function MS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...F(t)})}function NS(e,t){return new e({type:"boolean",...F(t)})}function DS(e,t){return new e({type:"boolean",coerce:!0,...F(t)})}function OS(e,t){return new e({type:"bigint",...F(t)})}function RS(e,t){return new e({type:"bigint",coerce:!0,...F(t)})}function PS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...F(t)})}function LS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...F(t)})}function FS(e,t){return new e({type:"symbol",...F(t)})}function BS(e,t){return new e({type:"undefined",...F(t)})}function US(e,t){return new e({type:"null",...F(t)})}function jS(e){return new e({type:"any"})}function ZS(e){return new e({type:"unknown"})}function HS(e,t){return new e({type:"never",...F(t)})}function qS(e,t){return new e({type:"void",...F(t)})}function WS(e,t){return new e({type:"date",...F(t)})}function VS(e,t){return new e({type:"date",coerce:!0,...F(t)})}function JS(e,t){return new e({type:"nan",...F(t)})}function Er(e,t){return new Gp({check:"less_than",...F(t),value:e,inclusive:!1})}function cn(e,t){return new Gp({check:"less_than",...F(t),value:e,inclusive:!0})}function $r(e,t){return new Xp({check:"greater_than",...F(t),value:e,inclusive:!1})}function Wt(e,t){return new Xp({check:"greater_than",...F(t),value:e,inclusive:!0})}function Ch(e){return $r(0,e)}function Th(e){return Er(0,e)}function Ih(e){return cn(0,e)}function Ah(e){return Wt(0,e)}function ro(e,t){return new O_({check:"multiple_of",...F(t),value:e})}function lo(e,t){return new L_({check:"max_size",...F(t),maximum:e})}function Cr(e,t){return new F_({check:"min_size",...F(t),minimum:e})}function Rs(e,t){return new B_({check:"size_equals",...F(t),size:e})}function Ps(e,t){return new U_({check:"max_length",...F(t),maximum:e})}function ri(e,t){return new j_({check:"min_length",...F(t),minimum:e})}function Ls(e,t){return new Z_({check:"length_equals",...F(t),length:e})}function su(e,t){return new H_({check:"string_format",format:"regex",...F(t),pattern:e})}function au(e){return new q_({check:"string_format",format:"lowercase",...F(e)})}function lu(e){return new W_({check:"string_format",format:"uppercase",...F(e)})}function uu(e,t){return new V_({check:"string_format",format:"includes",...F(t),includes:e})}function cu(e,t){return new J_({check:"string_format",format:"starts_with",...F(t),prefix:e})}function du(e,t){return new K_({check:"string_format",format:"ends_with",...F(t),suffix:e})}function zh(e,t,n){return new G_({check:"property",property:e,schema:t,...F(n)})}function fu(e,t){return new X_({check:"mime_type",mime:e,...F(t)})}function rr(e){return new Y_({check:"overwrite",tx:e})}function pu(e){return rr(t=>t.normalize(e))}function hu(){return rr(e=>e.trim())}function mu(){return rr(e=>e.toLowerCase())}function gu(){return rr(e=>e.toUpperCase())}function bu(){return rr(e=>jk(e))}function KS(e,t,n){return new e({type:"array",element:t,...F(n)})}function iL(e,t,n){return new e({type:"union",options:t,...F(n)})}function oL(e,t,n){return new e({type:"union",options:t,inclusive:!1,...F(n)})}function sL(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...F(i)})}function aL(e,t,n){return new e({type:"intersection",left:t,right:n})}function lL(e,t,n,i){let r=n instanceof fe;return new e({type:"tuple",items:t,rest:r?n:null,...F(r?i:n)})}function uL(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...F(i)})}function cL(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...F(i)})}function dL(e,t,n){return new e({type:"set",valueType:t,...F(n)})}function fL(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...F(n)})}function pL(e,t,n){return new e({type:"enum",entries:t,...F(n)})}function hL(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...F(n)})}function GS(e,t){return new e({type:"file",...F(t)})}function mL(e,t){return new e({type:"transform",transform:t})}function gL(e,t){return new e({type:"optional",innerType:t})}function bL(e,t){return new e({type:"nullable",innerType:t})}function vL(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Hk(n)}})}function yL(e,t,n){return new e({type:"nonoptional",innerType:t,...F(n)})}function xL(e,t){return new e({type:"success",innerType:t})}function kL(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function _L(e,t,n){return new e({type:"pipe",in:t,out:n})}function wL(e,t){return new e({type:"readonly",innerType:t})}function SL(e,t,n){return new e({type:"template_literal",parts:t,...F(n)})}function EL(e,t){return new e({type:"lazy",getter:t})}function $L(e,t){return new e({type:"promise",innerType:t})}function XS(e,t,n){let i=F(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function YS(e,t,n){return new e({type:"custom",check:"custom",fn:t,...F(n)})}function QS(e){let t=e2(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Wl(i,n.value,t._zod.def));else{let r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Wl(r))}},e(n.value,n)));return t}function e2(e,t){let n=new Ge({check:"custom",...F(t)});return n._zod.check=e,n}function t2(e){let t=new Ge({check:"describe"});return t._zod.onattach=[n=>{let i=un.get(n)??{};un.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function n2(e){let t=new Ge({check:"meta"});return t._zod.onattach=[n=>{let i=un.get(n)??{};un.add(n,{...i,...e})}],t._zod.check=()=>{},t}function r2(e,t){let n=F(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),s=new Set(r),a=e.Codec??ih,l=e.Boolean??eh,u=new(e.String??Os)({type:"string",error:n.error}),c=new l({type:"boolean",error:n.error}),d=new a({type:"pipe",in:u,out:c,transform:(f,p)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:s.has(h)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:p.value,inst:d,continue:!1}),{})},reverseTransform:(f,p)=>f===!0?i[0]||"true":r[0]||"false",error:n.error});return d}function Fs(e,t,n,i={}){let r=F(i),o={...F(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function io(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??un,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function De(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{let d=s.schema,f=t.processors[r.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,d,u)}let c=e._zod.parent;c&&(s.ref||(s.ref=c),De(c,t,u),t.seen.get(c).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&Bt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function oo(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let l=i.get(a);if(l&&l!==s[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let r=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=e.external.registry.get(s[0])?.id,d=e.external.uri??(p=>p);if(c)return{ref:d(c)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${d("__shared")}#/${a}/${f}`}}if(s[1]===n)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:l,defId:u}=r(s);a.def={...a.schema},u&&(a.defId=u);let c=a.schema;for(let d in c)delete c[d];c.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function so(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=e.seen.get(s);if(a.ref===null)return;let l=a.def??a.schema,u={...l},c=a.ref;if(a.ref=null,c){i(c);let f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,u),s._zod.parent===c)for(let h in l)h==="$ref"||h==="allOf"||h in u||delete l[h];if(p.$ref)for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}let d=s._zod.parent;if(d&&d!==c){i(d);let f=e.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?r.$defs=o:r.definitions=o);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:ks(t,"input",e.processors),output:ks(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw Error("Error converting schema to JSON.")}}function Bt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Bt(i.element,n);if(i.type==="set")return Bt(i.valueType,n);if(i.type==="lazy")return Bt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Bt(i.innerType,n);if(i.type==="intersection")return Bt(i.left,n)||Bt(i.right,n);if(i.type==="record"||i.type==="map")return Bt(i.keyType,n)||Bt(i.valueType,n);if(i.type==="pipe")return Bt(i.in,n)||Bt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Bt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Bt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Bt(r,n))return!0;return!!(i.rest&&Bt(i.rest,n))}return!1}var i2=(e,t={})=>n=>{let i=io({...n,processors:t});return De(e,i),oo(i,e),so(i,e)},ks=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},s=io({...r??{},target:o,io:t,processors:n});return De(e,s),oo(s,e),so(s,e)},CL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o2=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof s=="number"&&(r.maxLength=s),a&&(r.format=CL[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),u&&(r.contentEncoding=u),l&&l.size>0){let c=[...l];c.length===1?r.pattern=c[0].source:c.length>1&&(r.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},s2=(e,t,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),typeof o=="number"&&(r.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u),typeof s=="number"&&(r.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof l=="number"&&(r.multipleOf=l)},a2=(e,t,n,i)=>{n.type="boolean"},l2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},u2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},c2=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},d2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},f2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},p2=(e,t,n,i)=>{n.not={}},h2=(e,t,n,i)=>{},m2=(e,t,n,i)=>{},g2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},b2=(e,t,n,i)=>{let r=e._zod.def,o=Op(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},v2=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},y2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},x2=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},k2=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:l}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),l?l.length===1?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(r,o)},_2=(e,t,n,i)=>{n.type="boolean"},w2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},S2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},E2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},$2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},C2=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},T2=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=De(o.element,t,{...i,path:[...i.path,"items"]})},I2=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let s=o.shape;for(let u in s)r.properties[u]=De(s[u],t,{...i,path:[...i.path,"properties",u]});let a=new Set(Object.keys(s)),l=new Set([...a].filter(u=>{let c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));l.size>0&&(r.required=Array.from(l)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=De(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Mh=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,l)=>De(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=s:n.anyOf=s},A2=(e,t,n,i)=>{let r=e._zod.def,o=De(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=De(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=l},z2=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((f,p)=>De(f,t,{...i,path:[...i.path,s,p]})),u=o.rest?De(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:l},u&&r.items.anyOf.push(u),r.minItems=l.length,!u&&(r.maxItems=l.length)):(r.items=l,u&&(r.additionalItems=u));let{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(r.minItems=c),typeof d=="number"&&(r.maxItems=d)},M2=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let s=o.keyType,a=s._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){let u=De(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let c of a)r.patternProperties[c.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=De(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=De(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(c=>typeof c=="string"||typeof c=="number");u.length>0&&(r.required=u)}},N2=(e,t,n,i)=>{let r=e._zod.def,o=De(r.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},D2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},O2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},R2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},P2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},L2=(e,t,n,i)=>{let r=e._zod.def,o=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;De(o,t,i);let s=t.seen.get(e);s.ref=o},F2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},B2=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Nh=(e,t,n,i)=>{let r=e._zod.def;De(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},U2=(e,t,n,i)=>{let r=e._zod.innerType;De(r,t,i);let o=t.seen.get(e);o.ref=r},Mp={string:o2,number:s2,boolean:a2,bigint:l2,symbol:u2,null:c2,undefined:d2,void:f2,never:p2,any:h2,unknown:m2,date:g2,enum:b2,literal:v2,nan:y2,template_literal:x2,file:k2,success:_2,custom:w2,function:S2,transform:E2,map:$2,set:C2,array:T2,object:I2,union:Mh,intersection:A2,tuple:z2,record:M2,nullable:N2,nonoptional:D2,default:O2,prefault:R2,catch:P2,pipe:L2,readonly:F2,promise:B2,optional:Nh,lazy:U2};function j2(e,t){if("_idmap"in e){let i=e,r=io({...t,processors:Mp}),o={};for(let l of i._idmap.entries()){let[u,c]=l;De(c,r)}let s={},a={registry:i,uri:t?.uri,defs:o};r.external=a;for(let l of i._idmap.entries()){let[u,c]=l;oo(r,c),s[u]=so(r,c)}if(Object.keys(o).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let n=io({...t,processors:Mp});return De(e,n),oo(n,e),so(n,e)}var Np=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=io({processors:Mp,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return De(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),oo(this.ctx,t);let i=so(this.ctx,t),{"~standard":r,...o}=i;return o}},TL={},Z2={};tr(Z2,{xor:()=>YE,xid:()=>kE,void:()=>WE,uuidv7:()=>pE,uuidv6:()=>fE,uuidv4:()=>dE,uuid:()=>cE,url:()=>hE,unknown:()=>ii,union:()=>Lu,undefined:()=>HE,ulid:()=>xE,uint64:()=>jE,uint32:()=>FE,tuple:()=>nm,transform:()=>Bu,templateLiteral:()=>d$,symbol:()=>ZE,superRefine:()=>Im,success:()=>l$,stringbool:()=>v$,stringFormat:()=>ME,string:()=>Xl,strictObject:()=>GE,set:()=>r$,refine:()=>Tm,record:()=>rm,readonly:()=>_m,promise:()=>f$,preprocess:()=>x$,prefault:()=>mm,pipe:()=>Es,partialRecord:()=>e$,optional:()=>ws,object:()=>KE,number:()=>Bh,nullish:()=>a$,nullable:()=>Ss,null:()=>qh,nonoptional:()=>gm,never:()=>Ru,nativeEnum:()=>i$,nanoid:()=>bE,nan:()=>u$,meta:()=>g$,map:()=>n$,mac:()=>SE,looseRecord:()=>t$,looseObject:()=>XE,literal:()=>o$,lazy:()=>Em,ksuid:()=>_E,keyof:()=>JE,jwt:()=>zE,json:()=>y$,ipv6:()=>EE,ipv4:()=>wE,intersection:()=>em,int64:()=>UE,int32:()=>LE,int:()=>Yl,instanceof:()=>b$,httpUrl:()=>mE,hostname:()=>NE,hex:()=>DE,hash:()=>OE,guid:()=>uE,function:()=>Ql,float64:()=>PE,float32:()=>RE,file:()=>s$,exactOptional:()=>cm,enum:()=>Fu,emoji:()=>gE,email:()=>lE,e164:()=>AE,discriminatedUnion:()=>QE,describe:()=>m$,date:()=>VE,custom:()=>h$,cuid2:()=>yE,cuid:()=>vE,codec:()=>c$,cidrv6:()=>CE,cidrv4:()=>$E,check:()=>p$,catch:()=>ym,boolean:()=>Uh,bigint:()=>BE,base64url:()=>IE,base64:()=>TE,array:()=>qs,any:()=>qE,_function:()=>Ql,_default:()=>pm,_ZodString:()=>vu,ZodXor:()=>Xh,ZodXID:()=>Eu,ZodVoid:()=>Kh,ZodUnknown:()=>Vh,ZodUnion:()=>Vs,ZodUndefined:()=>Zh,ZodUUID:()=>On,ZodURL:()=>Us,ZodULID:()=>Su,ZodType:()=>he,ZodTuple:()=>tm,ZodTransform:()=>lm,ZodTemplateLiteral:()=>wm,ZodSymbol:()=>jh,ZodSuccess:()=>bm,ZodStringFormat:()=>Le,ZodString:()=>Bs,ZodSet:()=>om,ZodRecord:()=>Js,ZodReadonly:()=>km,ZodPromise:()=>$m,ZodPrefault:()=>hm,ZodPipe:()=>Zu,ZodOptional:()=>Uu,ZodObject:()=>Ws,ZodNumberFormat:()=>ai,ZodNumber:()=>js,ZodNullable:()=>dm,ZodNull:()=>Hh,ZodNonOptional:()=>ju,ZodNever:()=>Jh,ZodNanoID:()=>ku,ZodNaN:()=>xm,ZodMap:()=>im,ZodMAC:()=>Fh,ZodLiteral:()=>sm,ZodLazy:()=>Sm,ZodKSUID:()=>$u,ZodJWT:()=>Du,ZodIntersection:()=>Qh,ZodIPv6:()=>Tu,ZodIPv4:()=>Cu,ZodGUID:()=>_s,ZodFunction:()=>Cm,ZodFile:()=>am,ZodExactOptional:()=>um,ZodEnum:()=>ao,ZodEmoji:()=>xu,ZodEmail:()=>yu,ZodE164:()=>Nu,ZodDiscriminatedUnion:()=>Yh,ZodDefault:()=>fm,ZodDate:()=>Pu,ZodCustomStringFormat:()=>uo,ZodCustom:()=>Ks,ZodCodec:()=>Hu,ZodCatch:()=>vm,ZodCUID2:()=>wu,ZodCUID:()=>_u,ZodCIDRv6:()=>Au,ZodCIDRv4:()=>Iu,ZodBoolean:()=>Zs,ZodBigIntFormat:()=>Ou,ZodBigInt:()=>Hs,ZodBase64URL:()=>Mu,ZodBase64:()=>zu,ZodArray:()=>Gh,ZodAny:()=>Wh});var H2={};tr(H2,{uppercase:()=>lu,trim:()=>hu,toUpperCase:()=>gu,toLowerCase:()=>mu,startsWith:()=>cu,slugify:()=>bu,size:()=>Rs,regex:()=>su,property:()=>zh,positive:()=>Ch,overwrite:()=>rr,normalize:()=>pu,nonpositive:()=>Ih,nonnegative:()=>Ah,negative:()=>Th,multipleOf:()=>ro,minSize:()=>Cr,minLength:()=>ri,mime:()=>fu,maxSize:()=>lo,maxLength:()=>Ps,lte:()=>cn,lt:()=>Er,lowercase:()=>au,length:()=>Ls,includes:()=>uu,gte:()=>Wt,gt:()=>$r,endsWith:()=>du});var Dh={};tr(Dh,{time:()=>V2,duration:()=>J2,datetime:()=>q2,date:()=>W2,ZodISOTime:()=>Ph,ZodISODuration:()=>Lh,ZodISODateTime:()=>Oh,ZodISODate:()=>Rh});var Oh=w("ZodISODateTime",(e,t)=>{dw.init(e,t),Le.init(e,t)});function q2(e){return _S(Oh,e)}var Rh=w("ZodISODate",(e,t)=>{fw.init(e,t),Le.init(e,t)});function W2(e){return wS(Rh,e)}var Ph=w("ZodISOTime",(e,t)=>{pw.init(e,t),Le.init(e,t)});function V2(e){return SS(Ph,e)}var Lh=w("ZodISODuration",(e,t)=>{hw.init(e,t),Le.init(e,t)});function J2(e){return ES(Lh,e)}var K2=(e,t)=>{Pp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Fp(e,n)},flatten:{value:n=>Lp(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Hl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Hl,2)}},isEmpty:{get(){return e.issues.length===0}}})},IL=w("ZodError",K2),en=w("ZodError",K2,{Parent:Error}),G2=Ts(en),X2=Is(en),Y2=As(en),Q2=zs(en),eE=Bp(en),tE=Up(en),nE=jp(en),rE=Zp(en),iE=Hp(en),oE=qp(en),sE=Wp(en),aE=Vp(en),he=w("ZodType",(e,t)=>(fe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ks(e,"input"),output:ks(e,"output")}}),e.toJSONSchema=i2(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ye.mergeDefs(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>fn(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>G2(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Y2(e,n,i),e.parseAsync=async(n,i)=>X2(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Q2(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>eE(e,n,i),e.decode=(n,i)=>tE(e,n,i),e.encodeAsync=async(n,i)=>nE(e,n,i),e.decodeAsync=async(n,i)=>rE(e,n,i),e.safeEncode=(n,i)=>iE(e,n,i),e.safeDecode=(n,i)=>oE(e,n,i),e.safeEncodeAsync=async(n,i)=>sE(e,n,i),e.safeDecodeAsync=async(n,i)=>aE(e,n,i),e.refine=(n,i)=>e.check(Tm(n,i)),e.superRefine=n=>e.check(Im(n)),e.overwrite=n=>e.check(rr(n)),e.optional=()=>ws(e),e.exactOptional=()=>cm(e),e.nullable=()=>Ss(e),e.nullish=()=>ws(Ss(e)),e.nonoptional=n=>gm(e,n),e.array=()=>qs(e),e.or=n=>Lu([e,n]),e.and=n=>em(e,n),e.transform=n=>Es(e,Bu(n)),e.default=n=>pm(e,n),e.prefault=n=>mm(e,n),e.catch=n=>ym(e,n),e.pipe=n=>Es(e,n),e.readonly=()=>_m(e),e.describe=n=>{let i=e.clone();return un.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return un.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return un.get(e);let i=e.clone();return un.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),vu=w("_ZodString",(e,t)=>{Os.init(e,t),he.init(e,t),e._zod.processJSONSchema=(i,r,o)=>o2(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(su(...i)),e.includes=(...i)=>e.check(uu(...i)),e.startsWith=(...i)=>e.check(cu(...i)),e.endsWith=(...i)=>e.check(du(...i)),e.min=(...i)=>e.check(ri(...i)),e.max=(...i)=>e.check(Ps(...i)),e.length=(...i)=>e.check(Ls(...i)),e.nonempty=(...i)=>e.check(ri(1,...i)),e.lowercase=i=>e.check(au(i)),e.uppercase=i=>e.check(lu(i)),e.trim=()=>e.check(hu()),e.normalize=(...i)=>e.check(pu(...i)),e.toLowerCase=()=>e.check(mu()),e.toUpperCase=()=>e.check(gu()),e.slugify=()=>e.check(bu())}),Bs=w("ZodString",(e,t)=>{Os.init(e,t),vu.init(e,t),e.email=n=>e.check(ah(yu,n)),e.url=n=>e.check(ou(Us,n)),e.jwt=n=>e.check($h(Du,n)),e.emoji=n=>e.check(fh(xu,n)),e.guid=n=>e.check(Gl(_s,n)),e.uuid=n=>e.check(lh(On,n)),e.uuidv4=n=>e.check(uh(On,n)),e.uuidv6=n=>e.check(ch(On,n)),e.uuidv7=n=>e.check(dh(On,n)),e.nanoid=n=>e.check(ph(ku,n)),e.guid=n=>e.check(Gl(_s,n)),e.cuid=n=>e.check(hh(_u,n)),e.cuid2=n=>e.check(mh(wu,n)),e.ulid=n=>e.check(gh(Su,n)),e.base64=n=>e.check(wh(zu,n)),e.base64url=n=>e.check(Sh(Mu,n)),e.xid=n=>e.check(bh(Eu,n)),e.ksuid=n=>e.check(vh($u,n)),e.ipv4=n=>e.check(yh(Cu,n)),e.ipv6=n=>e.check(xh(Tu,n)),e.cidrv4=n=>e.check(kh(Iu,n)),e.cidrv6=n=>e.check(_h(Au,n)),e.e164=n=>e.check(Eh(Nu,n)),e.datetime=n=>e.check(q2(n)),e.date=n=>e.check(W2(n)),e.time=n=>e.check(V2(n)),e.duration=n=>e.check(J2(n))});function Xl(e){return vS(Bs,e)}var Le=w("ZodStringFormat",(e,t)=>{Pe.init(e,t),vu.init(e,t)}),yu=w("ZodEmail",(e,t)=>{nw.init(e,t),Le.init(e,t)});function lE(e){return ah(yu,e)}var _s=w("ZodGUID",(e,t)=>{ew.init(e,t),Le.init(e,t)});function uE(e){return Gl(_s,e)}var On=w("ZodUUID",(e,t)=>{tw.init(e,t),Le.init(e,t)});function cE(e){return lh(On,e)}function dE(e){return uh(On,e)}function fE(e){return ch(On,e)}function pE(e){return dh(On,e)}var Us=w("ZodURL",(e,t)=>{rw.init(e,t),Le.init(e,t)});function hE(e){return ou(Us,e)}function mE(e){return ou(Us,{protocol:/^https?$/,hostname:si.domain,...ye.normalizeParams(e)})}var xu=w("ZodEmoji",(e,t)=>{iw.init(e,t),Le.init(e,t)});function gE(e){return fh(xu,e)}var ku=w("ZodNanoID",(e,t)=>{ow.init(e,t),Le.init(e,t)});function bE(e){return ph(ku,e)}var _u=w("ZodCUID",(e,t)=>{sw.init(e,t),Le.init(e,t)});function vE(e){return hh(_u,e)}var wu=w("ZodCUID2",(e,t)=>{aw.init(e,t),Le.init(e,t)});function yE(e){return mh(wu,e)}var Su=w("ZodULID",(e,t)=>{lw.init(e,t),Le.init(e,t)});function xE(e){return gh(Su,e)}var Eu=w("ZodXID",(e,t)=>{uw.init(e,t),Le.init(e,t)});function kE(e){return bh(Eu,e)}var $u=w("ZodKSUID",(e,t)=>{cw.init(e,t),Le.init(e,t)});function _E(e){return vh($u,e)}var Cu=w("ZodIPv4",(e,t)=>{mw.init(e,t),Le.init(e,t)});function wE(e){return yh(Cu,e)}var Fh=w("ZodMAC",(e,t)=>{bw.init(e,t),Le.init(e,t)});function SE(e){return xS(Fh,e)}var Tu=w("ZodIPv6",(e,t)=>{gw.init(e,t),Le.init(e,t)});function EE(e){return xh(Tu,e)}var Iu=w("ZodCIDRv4",(e,t)=>{vw.init(e,t),Le.init(e,t)});function $E(e){return kh(Iu,e)}var Au=w("ZodCIDRv6",(e,t)=>{yw.init(e,t),Le.init(e,t)});function CE(e){return _h(Au,e)}var zu=w("ZodBase64",(e,t)=>{xw.init(e,t),Le.init(e,t)});function TE(e){return wh(zu,e)}var Mu=w("ZodBase64URL",(e,t)=>{_w.init(e,t),Le.init(e,t)});function IE(e){return Sh(Mu,e)}var Nu=w("ZodE164",(e,t)=>{ww.init(e,t),Le.init(e,t)});function AE(e){return Eh(Nu,e)}var Du=w("ZodJWT",(e,t)=>{Ew.init(e,t),Le.init(e,t)});function zE(e){return $h(Du,e)}var uo=w("ZodCustomStringFormat",(e,t)=>{$w.init(e,t),Le.init(e,t)});function ME(e,t,n={}){return Fs(uo,e,t,n)}function NE(e){return Fs(uo,"hostname",si.hostname,e)}function DE(e){return Fs(uo,"hex",si.hex,e)}function OE(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=si[i];if(!r)throw Error(`Unrecognized hash format: ${i}`);return Fs(uo,i,r,t)}var js=w("ZodNumber",(e,t)=>{Qp.init(e,t),he.init(e,t),e._zod.processJSONSchema=(i,r,o)=>s2(e,i,r,o),e.gt=(i,r)=>e.check($r(i,r)),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.lt=(i,r)=>e.check(Er(i,r)),e.lte=(i,r)=>e.check(cn(i,r)),e.max=(i,r)=>e.check(cn(i,r)),e.int=i=>e.check(Yl(i)),e.safe=i=>e.check(Yl(i)),e.positive=i=>e.check($r(0,i)),e.nonnegative=i=>e.check(Wt(0,i)),e.negative=i=>e.check(Er(0,i)),e.nonpositive=i=>e.check(cn(0,i)),e.multipleOf=(i,r)=>e.check(ro(i,r)),e.step=(i,r)=>e.check(ro(i,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Bh(e){return $S(js,e)}var ai=w("ZodNumberFormat",(e,t)=>{Cw.init(e,t),js.init(e,t)});function Yl(e){return TS(ai,e)}function RE(e){return IS(ai,e)}function PE(e){return AS(ai,e)}function LE(e){return zS(ai,e)}function FE(e){return MS(ai,e)}var Zs=w("ZodBoolean",(e,t)=>{eh.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>a2(e,n,i,r)});function Uh(e){return NS(Zs,e)}var Hs=w("ZodBigInt",(e,t)=>{th.init(e,t),he.init(e,t),e._zod.processJSONSchema=(i,r,o)=>l2(e,i,r,o),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.gt=(i,r)=>e.check($r(i,r)),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.lt=(i,r)=>e.check(Er(i,r)),e.lte=(i,r)=>e.check(cn(i,r)),e.max=(i,r)=>e.check(cn(i,r)),e.positive=i=>e.check($r(BigInt(0),i)),e.negative=i=>e.check(Er(BigInt(0),i)),e.nonpositive=i=>e.check(cn(BigInt(0),i)),e.nonnegative=i=>e.check(Wt(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(ro(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function BE(e){return OS(Hs,e)}var Ou=w("ZodBigIntFormat",(e,t)=>{Tw.init(e,t),Hs.init(e,t)});function UE(e){return PS(Ou,e)}function jE(e){return LS(Ou,e)}var jh=w("ZodSymbol",(e,t)=>{Iw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>u2(e,n,i,r)});function ZE(e){return FS(jh,e)}var Zh=w("ZodUndefined",(e,t)=>{Aw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>d2(e,n,i,r)});function HE(e){return BS(Zh,e)}var Hh=w("ZodNull",(e,t)=>{zw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>c2(e,n,i,r)});function qh(e){return US(Hh,e)}var Wh=w("ZodAny",(e,t)=>{Mw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>h2(e,n,i,r)});function qE(){return jS(Wh)}var Vh=w("ZodUnknown",(e,t)=>{Nw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>m2(e,n,i,r)});function ii(){return ZS(Vh)}var Jh=w("ZodNever",(e,t)=>{Dw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>p2(e,n,i,r)});function Ru(e){return HS(Jh,e)}var Kh=w("ZodVoid",(e,t)=>{Ow.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>f2(e,n,i,r)});function WE(e){return qS(Kh,e)}var Pu=w("ZodDate",(e,t)=>{Rw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(i,r,o)=>g2(e,i,r,o),e.min=(i,r)=>e.check(Wt(i,r)),e.max=(i,r)=>e.check(cn(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function VE(e){return WS(Pu,e)}var Gh=w("ZodArray",(e,t)=>{Pw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>T2(e,n,i,r),e.element=t.element,e.min=(n,i)=>e.check(ri(n,i)),e.nonempty=n=>e.check(ri(1,n)),e.max=(n,i)=>e.check(Ps(n,i)),e.length=(n,i)=>e.check(Ls(n,i)),e.unwrap=()=>e.element});function qs(e,t){return KS(Gh,e,t)}function JE(e){let t=e._zod.def.shape;return Fu(Object.keys(t))}var Ws=w("ZodObject",(e,t)=>{Uw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>I2(e,n,i,r),ye.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Fu(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ii()}),e.loose=()=>e.clone({...e._zod.def,catchall:ii()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ru()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ye.extend(e,n),e.safeExtend=n=>ye.safeExtend(e,n),e.merge=n=>ye.merge(e,n),e.pick=n=>ye.pick(e,n),e.omit=n=>ye.omit(e,n),e.partial=(...n)=>ye.partial(Uu,e,n[0]),e.required=(...n)=>ye.required(ju,e,n[0])});function KE(e,t){let n={type:"object",shape:e??{},...ye.normalizeParams(t)};return new Ws(n)}function GE(e,t){return new Ws({type:"object",shape:e,catchall:Ru(),...ye.normalizeParams(t)})}function XE(e,t){return new Ws({type:"object",shape:e,catchall:ii(),...ye.normalizeParams(t)})}var Vs=w("ZodUnion",(e,t)=>{iu.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mh(e,n,i,r),e.options=t.options});function Lu(e,t){return new Vs({type:"union",options:e,...ye.normalizeParams(t)})}var Xh=w("ZodXor",(e,t)=>{Vs.init(e,t),jw.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mh(e,n,i,r),e.options=t.options});function YE(e,t){return new Xh({type:"union",options:e,inclusive:!1,...ye.normalizeParams(t)})}var Yh=w("ZodDiscriminatedUnion",(e,t)=>{Vs.init(e,t),Zw.init(e,t)});function QE(e,t,n){return new Yh({type:"union",options:t,discriminator:e,...ye.normalizeParams(n)})}var Qh=w("ZodIntersection",(e,t)=>{Hw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>A2(e,n,i,r)});function em(e,t){return new Qh({type:"intersection",left:e,right:t})}var tm=w("ZodTuple",(e,t)=>{nh.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>z2(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function nm(e,t,n){let i=t instanceof fe,r=i?n:t;return new tm({type:"tuple",items:e,rest:i?t:null,...ye.normalizeParams(r)})}var Js=w("ZodRecord",(e,t)=>{qw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>M2(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function rm(e,t,n){return new Js({type:"record",keyType:e,valueType:t,...ye.normalizeParams(n)})}function e$(e,t,n){let i=fn(e);return i._zod.values=void 0,new Js({type:"record",keyType:i,valueType:t,...ye.normalizeParams(n)})}function t$(e,t,n){return new Js({type:"record",keyType:e,valueType:t,mode:"loose",...ye.normalizeParams(n)})}var im=w("ZodMap",(e,t)=>{Ww.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$2(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Cr(...n)),e.nonempty=n=>e.check(Cr(1,n)),e.max=(...n)=>e.check(lo(...n)),e.size=(...n)=>e.check(Rs(...n))});function n$(e,t,n){return new im({type:"map",keyType:e,valueType:t,...ye.normalizeParams(n)})}var om=w("ZodSet",(e,t)=>{Vw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>C2(e,n,i,r),e.min=(...n)=>e.check(Cr(...n)),e.nonempty=n=>e.check(Cr(1,n)),e.max=(...n)=>e.check(lo(...n)),e.size=(...n)=>e.check(Rs(...n))});function r$(e,t){return new om({type:"set",valueType:e,...ye.normalizeParams(t)})}var ao=w("ZodEnum",(e,t)=>{Jw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(i,r,o)=>b2(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new ao({...t,checks:[],...ye.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new ao({...t,checks:[],...ye.normalizeParams(r),entries:o})}});function Fu(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ao({type:"enum",entries:n,...ye.normalizeParams(t)})}function i$(e,t){return new ao({type:"enum",entries:e,...ye.normalizeParams(t)})}var sm=w("ZodLiteral",(e,t)=>{Kw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>v2(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function o$(e,t){return new sm({type:"literal",values:Array.isArray(e)?e:[e],...ye.normalizeParams(t)})}var am=w("ZodFile",(e,t)=>{Gw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>k2(e,n,i,r),e.min=(n,i)=>e.check(Cr(n,i)),e.max=(n,i)=>e.check(lo(n,i)),e.mime=(n,i)=>e.check(fu(Array.isArray(n)?n:[n],i))});function s$(e){return GS(am,e)}var lm=w("ZodTransform",(e,t)=>{Xw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>E2(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new eo(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(ye.issue(o,n.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(ye.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function Bu(e){return new lm({type:"transform",transform:e})}var Uu=w("ZodOptional",(e,t)=>{rh.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ws(e){return new Uu({type:"optional",innerType:e})}var um=w("ZodExactOptional",(e,t)=>{Yw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function cm(e){return new um({type:"optional",innerType:e})}var dm=w("ZodNullable",(e,t)=>{Qw.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>N2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ss(e){return new dm({type:"nullable",innerType:e})}function a$(e){return ws(Ss(e))}var fm=w("ZodDefault",(e,t)=>{eS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>O2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pm(e,t){return new fm({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ye.shallowClone(t)}})}var hm=w("ZodPrefault",(e,t)=>{tS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>R2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function mm(e,t){return new hm({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ye.shallowClone(t)}})}var ju=w("ZodNonOptional",(e,t)=>{nS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>D2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function gm(e,t){return new ju({type:"nonoptional",innerType:e,...ye.normalizeParams(t)})}var bm=w("ZodSuccess",(e,t)=>{rS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function l$(e){return new bm({type:"success",innerType:e})}var vm=w("ZodCatch",(e,t)=>{iS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>P2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ym(e,t){return new vm({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var xm=w("ZodNaN",(e,t)=>{oS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>y2(e,n,i,r)});function u$(e){return JS(xm,e)}var Zu=w("ZodPipe",(e,t)=>{sS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>L2(e,n,i,r),e.in=t.in,e.out=t.out});function Es(e,t){return new Zu({type:"pipe",in:e,out:t})}var Hu=w("ZodCodec",(e,t)=>{Zu.init(e,t),ih.init(e,t)});function c$(e,t,n){return new Hu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var km=w("ZodReadonly",(e,t)=>{aS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>F2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function _m(e){return new km({type:"readonly",innerType:e})}var wm=w("ZodTemplateLiteral",(e,t)=>{lS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>x2(e,n,i,r)});function d$(e,t){return new wm({type:"template_literal",parts:e,...ye.normalizeParams(t)})}var Sm=w("ZodLazy",(e,t)=>{dS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>U2(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Em(e){return new Sm({type:"lazy",getter:e})}var $m=w("ZodPromise",(e,t)=>{cS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>B2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function f$(e){return new $m({type:"promise",innerType:e})}var Cm=w("ZodFunction",(e,t)=>{uS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>S2(e,n,i,r)});function Ql(e){return new Cm({type:"function",input:Array.isArray(e?.input)?nm(e?.input):e?.input??qs(ii()),output:e?.output??ii()})}var Ks=w("ZodCustom",(e,t)=>{fS.init(e,t),he.init(e,t),e._zod.processJSONSchema=(n,i,r)=>w2(e,n,i,r)});function p$(e){let t=new Ge({check:"custom"});return t._zod.check=e,t}function h$(e,t){return XS(Ks,e??(()=>!0),t)}function Tm(e,t={}){return YS(Ks,e,t)}function Im(e){return QS(e)}var m$=t2,g$=n2;function b$(e,t={}){let n=new Ks({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...ye.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var v$=(...e)=>r2({Codec:Hu,Boolean:Zs,String:Bs},...e);function y$(e){let t=Em(()=>Lu([Xl(e),Bh(),Uh(),qh(),qs(t),rm(Xl(),t)]));return t}function x$(e,t){return Es(Bu(e),t)}var AL={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function zL(e){Nt({customError:e})}function ML(){return Nt().customError}var Dp;Dp||(Dp={});var j={...Z2,...H2,iso:Dh},NL=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function DL(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function OL(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function k$(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return j.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return j.lazy(()=>{if(!t.refs.has(r))throw Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=OL(r,t),s=Mt(o,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return j.null();if(r.length===0)return j.never();if(r.length===1)return j.literal(r[0]);if(r.every(s=>typeof s=="string"))return j.enum(r);let o=r.map(s=>j.literal(s));return o.length<2?o[0]:j.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return j.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let s={...e,type:o};return k$(s,t)});return r.length===0?j.never():r.length===1?r[0]:j.union(r)}if(!n)return j.any();let i;switch(n){case"string":{let r=j.string();if(e.format){let o=e.format;o==="email"?r=r.check(j.email()):o==="uri"||o==="uri-reference"?r=r.check(j.url()):o==="uuid"||o==="guid"?r=r.check(j.uuid()):o==="date-time"?r=r.check(j.iso.datetime()):o==="date"?r=r.check(j.iso.date()):o==="time"?r=r.check(j.iso.time()):o==="duration"?r=r.check(j.iso.duration()):o==="ipv4"?r=r.check(j.ipv4()):o==="ipv6"?r=r.check(j.ipv6()):o==="mac"?r=r.check(j.mac()):o==="cidr"?r=r.check(j.cidrv4()):o==="cidr-v6"?r=r.check(j.cidrv6()):o==="base64"?r=r.check(j.base64()):o==="base64url"?r=r.check(j.base64url()):o==="e164"?r=r.check(j.e164()):o==="jwt"?r=r.check(j.jwt()):o==="emoji"?r=r.check(j.emoji()):o==="nanoid"?r=r.check(j.nanoid()):o==="cuid"?r=r.check(j.cuid()):o==="cuid2"?r=r.check(j.cuid2()):o==="ulid"?r=r.check(j.ulid()):o==="xid"?r=r.check(j.xid()):o==="ksuid"&&(r=r.check(j.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?j.number().int():j.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=j.boolean();break}case"null":{i=j.null();break}case"object":{let r={},o=e.properties||{},s=new Set(e.required||[]);for(let[l,u]of Object.entries(o)){let c=Mt(u,t);r[l]=s.has(l)?c:c.optional()}if(e.propertyNames){let l=Mt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Mt(e.additionalProperties,t):j.any();if(Object.keys(r).length===0){i=j.record(l,u);break}let c=j.object(r).passthrough(),d=j.looseRecord(l,u);i=j.intersection(c,d);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),c=[];for(let f of u){let p=Mt(l[f],t),h=j.string().regex(new RegExp(f));c.push(j.looseRecord(h,p))}let d=[];if(Object.keys(r).length>0&&d.push(j.object(r).passthrough()),d.push(...c),d.length===0)i=j.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=j.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=j.intersection(f,d[p]);i=f}break}let a=j.object(r);e.additionalProperties===!1?i=a.strict():typeof e.additionalProperties=="object"?i=a.catchall(Mt(e.additionalProperties,t)):i=a.passthrough();break}case"array":{let{prefixItems:r,items:o}=e;if(r&&Array.isArray(r)){let s=r.map(l=>Mt(l,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?Mt(o,t):void 0;a?i=j.tuple(s).rest(a):i=j.tuple(s),typeof e.minItems=="number"&&(i=i.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(j.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(l=>Mt(l,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Mt(e.additionalItems,t):void 0;a?i=j.tuple(s).rest(a):i=j.tuple(s),typeof e.minItems=="number"&&(i=i.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(j.maxLength(e.maxItems)))}else if(o!==void 0){let s=Mt(o,t),a=j.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),i=a}else i=j.array(j.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function Mt(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=k$(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>Mt(u,t)),l=j.union(a);n=i?j.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>Mt(u,t)),l=j.xor(a);n=i?j.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:j.any();else{let a=i?n:Mt(e.allOf[0],t),l=i?0:1;for(let u=l;u<e.allOf.length;u++)a=j.intersection(a,Mt(e.allOf[u],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=j.nullable(n)),e.readOnly===!0&&(n=j.readonly(n));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))NL.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function RL(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=DL(e,t?.defaultTarget),i=e.$defs||e.definitions||{},r={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??un};return Mt(e,r)}var _$={};tr(_$,{string:()=>PL,number:()=>LL,date:()=>UL,boolean:()=>FL,bigint:()=>BL});function PL(e){return yS(Bs,e)}function LL(e){return CS(js,e)}function FL(e){return DS(Zs,e)}function BL(e){return RS(Hs,e)}function UL(e){return VS(Pu,e)}Nt(pS());var jL=y.union([y.literal("light"),y.literal("dark")]).describe("Color theme preference for the host environment."),$s=y.union([y.literal("inline"),y.literal("fullscreen"),y.literal("pip")]).describe("Display mode for UI presentation."),ZL=y.union([y.literal("--color-background-primary"),y.literal("--color-background-secondary"),y.literal("--color-background-tertiary"),y.literal("--color-background-inverse"),y.literal("--color-background-ghost"),y.literal("--color-background-info"),y.literal("--color-background-danger"),y.literal("--color-background-success"),y.literal("--color-background-warning"),y.literal("--color-background-disabled"),y.literal("--color-text-primary"),y.literal("--color-text-secondary"),y.literal("--color-text-tertiary"),y.literal("--color-text-inverse"),y.literal("--color-text-ghost"),y.literal("--color-text-info"),y.literal("--color-text-danger"),y.literal("--color-text-success"),y.literal("--color-text-warning"),y.literal("--color-text-disabled"),y.literal("--color-text-ghost"),y.literal("--color-border-primary"),y.literal("--color-border-secondary"),y.literal("--color-border-tertiary"),y.literal("--color-border-inverse"),y.literal("--color-border-ghost"),y.literal("--color-border-info"),y.literal("--color-border-danger"),y.literal("--color-border-success"),y.literal("--color-border-warning"),y.literal("--color-border-disabled"),y.literal("--color-ring-primary"),y.literal("--color-ring-secondary"),y.literal("--color-ring-inverse"),y.literal("--color-ring-info"),y.literal("--color-ring-danger"),y.literal("--color-ring-success"),y.literal("--color-ring-warning"),y.literal("--font-sans"),y.literal("--font-mono"),y.literal("--font-weight-normal"),y.literal("--font-weight-medium"),y.literal("--font-weight-semibold"),y.literal("--font-weight-bold"),y.literal("--font-text-xs-size"),y.literal("--font-text-sm-size"),y.literal("--font-text-md-size"),y.literal("--font-text-lg-size"),y.literal("--font-heading-xs-size"),y.literal("--font-heading-sm-size"),y.literal("--font-heading-md-size"),y.literal("--font-heading-lg-size"),y.literal("--font-heading-xl-size"),y.literal("--font-heading-2xl-size"),y.literal("--font-heading-3xl-size"),y.literal("--font-text-xs-line-height"),y.literal("--font-text-sm-line-height"),y.literal("--font-text-md-line-height"),y.literal("--font-text-lg-line-height"),y.literal("--font-heading-xs-line-height"),y.literal("--font-heading-sm-line-height"),y.literal("--font-heading-md-line-height"),y.literal("--font-heading-lg-line-height"),y.literal("--font-heading-xl-line-height"),y.literal("--font-heading-2xl-line-height"),y.literal("--font-heading-3xl-line-height"),y.literal("--border-radius-xs"),y.literal("--border-radius-sm"),y.literal("--border-radius-md"),y.literal("--border-radius-lg"),y.literal("--border-radius-xl"),y.literal("--border-radius-full"),y.literal("--border-width-regular"),y.literal("--shadow-hairline"),y.literal("--shadow-sm"),y.literal("--shadow-md"),y.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),HL=y.record(ZL.describe(`Style variables for theming MCP apps.
Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),y.union([y.string(),y.undefined()]).describe(`Style variables for theming MCP apps.
Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),GY=y.object({method:y.literal("ui/open-link"),params:y.object({url:y.string().describe("URL to open in the host's browser")})}),qL=y.object({isError:y.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),WL=y.object({isError:y.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),XY=y.object({method:y.literal("ui/notifications/sandbox-proxy-ready"),params:y.object({})}),Am=y.object({connectDomains:y.array(y.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:y.array(y.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:y.array(y.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:y.array(y.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),zm=y.object({camera:y.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:y.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:y.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:y.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")}),YY=y.object({method:y.literal("ui/notifications/size-changed"),params:y.object({width:y.number().optional().describe("New width in pixels."),height:y.number().optional().describe("New height in pixels.")})}),VL=y.object({method:y.literal("ui/notifications/tool-input"),params:y.object({arguments:y.record(y.string(),y.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),JL=y.object({method:y.literal("ui/notifications/tool-input-partial"),params:y.object({arguments:y.record(y.string(),y.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),KL=y.object({method:y.literal("ui/notifications/tool-cancelled"),params:y.object({reason:y.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),GL=y.object({fonts:y.string().optional()}),XL=y.object({variables:HL.optional().describe("CSS variables for theming the app."),css:GL.optional().describe("CSS blocks that apps can inject.")}),YL=y.object({method:y.literal("ui/resource-teardown"),params:y.object({})}),QY=y.record(y.string(),y.unknown()),Pk=y.object({text:y.object({}).optional().describe("Host supports text content blocks."),image:y.object({}).optional().describe("Host supports image content blocks."),audio:y.object({}).optional().describe("Host supports audio content blocks."),resource:y.object({}).optional().describe("Host supports resource content blocks."),resourceLink:y.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:y.object({}).optional().describe("Host supports structured content.")}),QL=y.object({experimental:y.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:y.object({}).optional().describe("Host supports opening external URLs."),serverTools:y.object({listChanged:y.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:y.object({listChanged:y.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:y.object({}).optional().describe("Host accepts log messages."),sandbox:y.object({permissions:zm.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Am.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Pk.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Pk.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),e8=y.object({experimental:y.object({}).optional().describe("Experimental features (structure TBD)."),tools:y.object({listChanged:y.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:y.array($s).optional().describe("Display modes the app supports.")}),eQ=y.object({method:y.literal("ui/notifications/initialized"),params:y.object({}).optional()}),tQ=y.object({csp:Am.optional().describe("Content Security Policy configuration."),permissions:zm.optional().describe("Sandbox permissions requested by the UI."),domain:y.string().optional().describe("Dedicated origin for view sandbox."),prefersBorder:y.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),nQ=y.object({method:y.literal("ui/request-display-mode"),params:y.object({mode:$s.describe("The display mode being requested.")})}),t8=y.object({mode:$s.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),n8=y.union([y.literal("model"),y.literal("app")]).describe("Tool visibility scope - who can access the tool."),rQ=y.object({resourceUri:y.string().optional(),visibility:y.array(n8).optional().describe(`Who can access this tool. Default: ["model", "app"]
- "model": Tool visible to and callable by the agent
- "app": Tool callable by the app from this server only`)}),iQ=y.object({mimeTypes:y.array(y.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),oQ=y.object({method:y.literal("ui/message"),params:y.object({role:y.literal("user").describe('Message role, currently only "user" is supported.'),content:y.array(Xi).describe("Message content blocks (text, image, etc.).")})}),sQ=y.object({method:y.literal("ui/notifications/sandbox-resource-ready"),params:y.object({html:y.string().describe("HTML content to load into the inner iframe."),sandbox:y.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Am.optional().describe("CSP configuration from resource metadata."),permissions:zm.optional().describe("Sandbox permissions from resource metadata.")})}),r8=y.object({method:y.literal("ui/notifications/tool-result"),params:Yi.describe("Standard MCP tool execution result.")}),w$=y.object({toolInfo:y.object({id:Ji.optional().describe("JSON-RPC id of the tools/call request."),tool:Pl.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:jL.optional().describe("Current color theme preference."),styles:XL.optional().describe("Style configuration for theming the app."),displayMode:$s.optional().describe("How the UI is currently displayed."),availableDisplayModes:y.array($s).optional().describe("Display modes the host supports."),containerDimensions:y.union([y.object({height:y.number().describe("Fixed container height in pixels.")}),y.object({maxHeight:y.union([y.number(),y.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(y.union([y.object({width:y.number().describe("Fixed container width in pixels.")}),y.object({maxWidth:y.union([y.number(),y.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:y.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:y.string().optional().describe("User's timezone in IANA format."),userAgent:y.string().optional().describe("Host application identifier."),platform:y.union([y.literal("web"),y.literal("desktop"),y.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:y.object({touch:y.boolean().optional().describe("Whether the device supports touch input."),hover:y.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:y.object({top:y.number().describe("Top safe area inset in pixels."),right:y.number().describe("Right safe area inset in pixels."),bottom:y.number().describe("Bottom safe area inset in pixels."),left:y.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),i8=y.object({method:y.literal("ui/notifications/host-context-changed"),params:w$.describe("Partial context update containing only changed fields.")}),aQ=y.object({method:y.literal("ui/update-model-context"),params:y.object({content:y.array(Xi).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:y.record(y.string(),y.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),lQ=y.object({method:y.literal("ui/initialize"),params:y.object({appInfo:fs.describe("App identification (name and version)."),appCapabilities:e8.describe("Features and capabilities this app provides."),protocolVersion:y.string().describe("Protocol version this app supports.")})}),o8=y.object({protocolVersion:y.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:fs.describe("Host application identification and version."),hostCapabilities:QL.describe("Features and capabilities provided by the host."),hostContext:w$.describe("Rich context about the host environment.")}).passthrough();function S$(e){let t=document.documentElement;t.setAttribute("data-theme",e),t.style.colorScheme=e}function E$(e,t=document.documentElement){for(let[n,i]of Object.entries(e))i!==void 0&&t.style.setProperty(n,i)}function $$(e){if(document.getElementById("__mcp-host-fonts"))return;let t=document.createElement("style");t.id="__mcp-host-fonts",t.textContent=e,document.head.appendChild(t)}var eu=class extends Ll{constructor(n,i={},r={autoResize:!0}){super(r);At(this,"_appInfo");At(this,"_capabilities");At(this,"options");At(this,"_hostCapabilities");At(this,"_hostInfo");At(this,"_hostContext");At(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=r,this.setRequestHandler(Ki,o=>(console.log("Received ping:",o.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(VL,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(JL,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(r8,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(KL,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(i8,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(YL,(i,r)=>n(i.params,r))}set oncalltool(n){this.setRequestHandler(wp,(i,r)=>n(i.params,r))}set onlisttools(n){this.setRequestHandler(_p,(i,r)=>n(i.params,r))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){return await this.request({method:"tools/call",params:n},Yi,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},WL,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},Cl,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},qL,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},t8,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,r=0,o=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let a=document.documentElement,l=a.style.width,u=a.style.height;a.style.width="fit-content",a.style.height="fit-content";let c=a.getBoundingClientRect();a.style.width=l,a.style.height=u;let d=window.innerWidth-a.clientWidth,f=Math.ceil(c.width+d),p=Math.ceil(c.height);(f!==i||p!==r)&&(i=f,r=p,this.sendSizeChanged({width:f,height:p}))}))};o();let s=new ResizeObserver(o);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(n=new $p(window.parent,window.parent),i){await super.connect(n);try{let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:fO}},o8,i);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}};var s8='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 10l5 5 5-5z"></path></svg>',a8='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 14l5-5 5 5z"></path></svg>';function l8(e,t){if(!e)return;let n=t?"Collapse":"Expand";e.title=n,e.setAttribute("aria-label",n),e.innerHTML=t?a8:s8}function u8(e,t){e&&(e.classList.toggle("expanded",t),e.classList.toggle("collapsed",!t))}function c8(e){let{shell:t,toggleButton:n,initialExpanded:i,onToggle:r,onScrollAfterExpand:o,onRender:s}=e,a=i,l=!1,u=typeof o=="function",c=p=>{let h=a;a=p,u8(t,a),l8(n,a),!h&&a&&(l=!1)},d=()=>{c(!a),r?.(a),s?.()},f=p=>{if(!a||l)return;let h=p?.target instanceof Node?p.target:null;h&&t&&!t.contains(h)||(l=!0,o?.())};return c(a),n?.addEventListener("click",d),u&&(t?.addEventListener("scroll",f,{passive:!0}),document.addEventListener("scroll",f,{passive:!0,capture:!0})),{getExpanded:()=>a,setExpanded:c,toggle:d,dispose:()=>{n?.removeEventListener("click",d),u&&(t?.removeEventListener("scroll",f),document.removeEventListener("scroll",f,!0))}}}function C$(e){let{shell:t,compactRow:n,initialExpanded:i,onToggle:r,onScrollAfterExpand:o,onRender:s}=e,a=c8({shell:t,toggleButton:null,initialExpanded:i,onToggle:c=>{n?.setAttribute("aria-expanded",String(c)),r?.(c)},onScrollAfterExpand:o,onRender:s});n?.setAttribute("aria-expanded",String(i));let l=()=>{a.toggle()},u=c=>{c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),a.toggle())};return n?.addEventListener("click",l),n?.addEventListener("keydown",u),{getExpanded:a.getExpanded,setExpanded:a.setExpanded,toggle:a.toggle,dispose:()=>{n?.removeEventListener("click",l),n?.removeEventListener("keydown",u),a.dispose()}}}var T$="desktop-commander:widget-state",Mm="__dc_widget_id__:";function d8(){let e=typeof globalThis.crypto=="object"?globalThis.crypto:void 0;return typeof e?.randomUUID=="function"?e.randomUUID():`widget-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function f8(e){let t=e.indexOf(Mm);if(t===-1)return;let n=e.slice(t+Mm.length).split("|",1)[0];if(n)try{return decodeURIComponent(n)}catch{return n}}function p8(){if(typeof window>"u")return"unknown-instance";let e=typeof window.name=="string"?window.name:"",t=f8(e);if(t)return t;let n=d8(),i=`${Mm}${encodeURIComponent(n)}`;try{window.name=e?`${e}|${i}`:i}catch{}return n}function h8(){if(typeof window>"u")return`${T$}:unknown`;let e=window.location.pathname||"unknown",t=p8();return`${T$}:${e}:${encodeURIComponent(t)}`}function m8(){if(!(typeof window>"u"))try{return window.sessionStorage}catch{return}}function g8(){return typeof window<"u"&&typeof window.openai?.setWidgetState=="function"}function I$(e){if(!g8()){let t=m8(),n=h8();return{read(){if(t)try{let i=t.getItem(n);if(!i)return;let o=JSON.parse(i)?.payload;return o===void 0||e&&!e(o)?void 0:o}catch{return}},write(i){if(t)try{t.setItem(n,JSON.stringify({payload:i}))}catch{}}}}return{read(){try{let t=window.openai?.widgetState;if(t==null)return;let n=t.payload;return n===void 0||e&&!e(n)?void 0:n}catch{return}},write(t){try{window.openai?.setWidgetState?.({payload:t})}catch{}}}}function pn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Gs(e){let t=e.variant??"ready",n=`compact-row compact-row--${t}`,i=e.id?` id="${pn(e.id)}"`:"",o=e.interactive??t==="ready"?' role="button" tabindex="0"':"",s=typeof e.expanded=="boolean"?` aria-expanded="${String(e.expanded)}"`:"",a=e.expandable?'<svg class="compact-chevron" viewBox="0 0 24 24" aria-hidden="true"><path d="M10 6l6 6-6 6z"/></svg>':"",l=e.filename?`<span class="compact-filename">${pn(e.filename)}</span>`:"";return`<div class="${n}"${i}${o}${s}>${a}<span class="compact-label">${pn(e.label)}</span>${l}</div>`}function qu(e){return typeof e=="object"&&e!==null}function A$(e,t){if(!qu(e))return;(e.theme==="light"||e.theme==="dark")&&S$(e.theme);let n=qu(e.styles)?e.styles:null,i=qu(n?.variables)?n.variables:null,r=qu(n?.css)?n.css:null,o=typeof r?.fonts=="string"?r.fonts:null;i&&E$(i),o&&$$(o),typeof e.initiallyExpanded=="boolean"&&(t.expanded=e.initiallyExpanded),typeof e.compact=="boolean"&&typeof t.compact=="boolean"&&(t.compact=e.compact),typeof e.hideSummaryRow=="boolean"&&(t.hideSummaryRow=e.hideSummaryRow,e.hideSummaryRow&&(t.expanded=!0,typeof t.compact=="boolean"&&(t.compact=!0)))}async function z$(e){let{app:t,chrome:n,onContextApplied:i,onConnected:r}=e;t.onhostcontextchanged=s=>{A$(s,n),i?.()},await t.connect();let o=t.getHostContext();o&&(A$(o,n),i?.()),await r?.()}function b8(e){let t={};if(!e)return t;for(let[n,i]of Object.entries(e))(typeof i=="string"||typeof i=="number"||typeof i=="boolean"||i===null)&&(t[n]=i);return t}function M$(e,t){let n=t.baseParams??{};return(i,r={})=>{e("track_ui_event",{event:i,component:t.component,params:{...n,...b8(r)}}).catch(()=>{})}}var Q$=ey(Y$(),1);var ot=Q$.default;function eC(e){let t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});let r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},v=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],E=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...v,...x,"set","shopt",...k,...E]},contains:[p,e.SHEBANG(),h,d,o,s,g,a,l,u,c,n]}}var a9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),l9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],u9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],c9=[...l9,...u9],d9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),f9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),p9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function tC(e){let t=e.regex,n=a9(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+f9.join("|")+")"},{begin:":(:)?("+p9.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h9.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:d9.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+c9.join("|")+")\\b"}]}}function nC(e){let o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}var po="[0-9](_*[0-9])*",Gu=`\\.(${po})`,Xu="[0-9a-fA-F](_*[0-9a-fA-F])*",rC={className:"number",variants:[{begin:`(\\b(${po})((${Gu})|\\.)?|(${Gu}))[eE][+-]?(${po})[fFdD]?\\b`},{begin:`\\b(${po})((${Gu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Gu})[fFdD]?\\b`},{begin:`\\b(${po})[fFdD]\\b`},{begin:`\\b0[xX]((${Xu})\\.?|(${Xu})?\\.(${Xu}))[pP][+-]?(${po})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function iC(e,t,n){return n===-1?"":e.replace(t,i=>iC(e,t,n-1))}function oC(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",i=n+iC("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,rC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},rC,u]}}var sC="[A-Za-z$_][0-9A-Za-z$_]*",m9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],g9=["true","false","null","undefined","NaN","Infinity"],aC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],lC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],uC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],b9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],v9=[].concat(uC,aC,lC);function cC(e){let t=e.regex,n=(q,{after:re})=>{let pe="</"+q[0].slice(1);return q.input.indexOf(pe,re)!==-1},i=sC,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,re)=>{let pe=q[0].length+q.index,_=q.input[pe];if(_==="<"||_===","){re.ignoreMatch();return}_===">"&&(n(q,{after:pe})||re.ignoreMatch());let S,O=q.input.substring(pe);if(S=O.match(/^\s*=/)){re.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){re.ignoreMatch();return}}},a={$pattern:sC,keyword:m9,literal:g9,built_in:v9,"variable.language":b9},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},v={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(x)});let k=[].concat(v,f.contains),E=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:E},M={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...aC,...lC]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ce={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},Ze={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Fe(q){return t.concat("(?!",q.join("|"),")")}let Ie={match:t.concat(/\b/,Fe([...uC,"super","import"].map(q=>`${q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ve={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Z={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(A)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,v,{match:/\$\d+/},d,z,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Z,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},ce,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},ve,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},Ie,Ze,M,Y,{match:/\$[(.]/}]}}function dC(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function fC(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,o,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},r,i,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function pC(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${i.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function hC(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},C=[d,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:s},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=C,m.contains=C;let ce=[{begin:/^\s*=>/,starts:{end:"$",contains:C}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:C}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(ce).concat(u).concat(C)}}function mC(e){let t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:a,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:c}},{className:"punctuation",begin:"->"},o]}}function gC(e){let t=e.regex,n=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(E=>!c.includes(E)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(E){return t.concat(/\b/,t.either(...E.map(C=>C.replace(/\s+/,"\\s+"))),/\b/)}let x={scope:"keyword",match:v(f),relevance:0};function k(E,{exceptions:C,when:M}={}){let z=M;return C=C||[],E.map(H=>H.match(/\|\d+$/)||C.includes(H)?H:z(H)?`${H}|0`:H)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(h,{when:E=>E.length<3}),literal:o,type:a,built_in:d},contains:[{scope:"type",match:v(s)},x,g,m,i,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}var Yu="[A-Za-z$_][0-9A-Za-z$_]*",bC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],vC=["true","false","null","undefined","NaN","Infinity"],yC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],kC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_C=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wC=[].concat(kC,yC,xC);function y9(e){let t=e.regex,n=(q,{after:re})=>{let pe="</"+q[0].slice(1);return q.input.indexOf(pe,re)!==-1},i=Yu,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,re)=>{let pe=q[0].length+q.index,_=q.input[pe];if(_==="<"||_===","){re.ignoreMatch();return}_===">"&&(n(q,{after:pe})||re.ignoreMatch());let S,O=q.input.substring(pe);if(S=O.match(/^\s*=/)){re.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){re.ignoreMatch();return}}},a={$pattern:Yu,keyword:bC,literal:vC,built_in:wC,"variable.language":_C},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},v={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},x=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=x.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(x)});let k=[].concat(v,f.contains),E=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(k)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:E},M={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yC,...xC]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ce={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},Ze={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Fe(q){return t.concat("(?!",q.join("|"),")")}let Ie={match:t.concat(/\b/,Fe([...kC,"super","import"].map(q=>`${q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ve={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Z={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(A)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,v,{match:/\$\d+/},d,z,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Z,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},ce,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},ve,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},Ie,Ze,M,Y,{match:/\$[(.]/}]}}function SC(e){let t=e.regex,n=y9(e),i=Yu,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Yu,keyword:bC.concat(l),literal:vC,built_in:wC.concat(r),"variable.language":_C},c={className:"meta",begin:"@"+i},d=(m,b,g)=>{let v=m.contains.findIndex(x=>x.label===b);if(v===-1)throw new Error("can not find mode to replace");m.contains.splice(v,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,o,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Um(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Qu(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,o,s],g=[...b];return g.pop(),g.push(a),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}ot.registerLanguage("bash",eC);ot.registerLanguage("css",tC);ot.registerLanguage("go",nC);ot.registerLanguage("java",oC);ot.registerLanguage("javascript",cC);ot.registerLanguage("json",dC);ot.registerLanguage("markdown",fC);ot.registerLanguage("python",pC);ot.registerLanguage("ruby",hC);ot.registerLanguage("rust",mC);ot.registerLanguage("sql",gC);ot.registerLanguage("typescript",SC);ot.registerLanguage("xml",Um);ot.registerLanguage("html",Um);ot.registerLanguage("yaml",Qu);ot.registerLanguage("toml",Qu);ot.registerLanguage("ini",Qu);function wt(e){return pn(e)}function ec(e,t){let n=(t||"").toLowerCase();if(!n||n==="text")return wt(e);try{return ot.getLanguage(n)?ot.highlight(e,{language:n,ignoreIllegals:!0}).value:ot.highlightAuto(e).value}catch{return wt(e)}}function tt(e){return e.replace(/^\[Reading [^\]]+\]\r?\n(?:\r?\n)?/,"")}function Vt(e){let t=e.match(/^\[Reading (\d+) lines from (?:line )?(\d+|start) \(total: (\d+) lines/);if(!t)return;let n=Number.parseInt(t[1],10),i=t[2]==="start",r=i?0:Number.parseInt(t[2],10),o=i?1:r,s=Number.parseInt(t[3],10);return{fromLine:o,toLine:o+n-1,totalLines:s,isPartial:n<s,readOffset:r}}function tc(e){return e.availableDisplayModes?.includes("fullscreen")?{canFullscreen:!0}:{canFullscreen:!1,reason:"Fullscreen editing is unavailable in this host."}}function EC(e){return Vt(e)?.isPartial===!0}function Ar(e){return typeof e=="object"&&e!==null}function Ut(e){let t=e.trim().replace(/\\/g,"/"),n=t.split("/").pop()??t,i=n.lastIndexOf(".");return i<=0||i===n.length-1?"none":n.slice(i+1).toLowerCase()}function nc(e){return Ar(e)?typeof e.fileName=="string"&&typeof e.filePath=="string"&&typeof e.fileType=="string":!1}function jm(e,t){return{...e,content:t}}function Jt(e){if(!Ar(e))return;let t=e.content;if(Array.isArray(t)){for(let n of t)if(Ar(n)&&n.type==="text"&&typeof n.text=="string"&&n.text.trim().length>0)return n.text}}function x9(e){if(!Ar(e))return;let t=e.content;if(!Array.isArray(t))return;let n=[];for(let i of t)Ar(i)&&i.type==="text"&&typeof i.text=="string"&&i.text.trim().length>0&&n.push(i.text);return n.length>0?n.join(`
`):void 0}function rc(e){if(!Ar(e))return;let t=nc(e.structuredContent)?e.structuredContent:nc(e)?e:null;if(t)return jm(t,x9(e)??"")}function $C(e){if(!Ar(e))throw new Error("edit_block did not return a valid result.");if(e.isError===!0){let t=Jt(e)??"";throw new Error(t||"edit_block failed.")}if(!Ar(e.structuredContent)){let t=Jt(e)??"";throw new Error(t||"edit_block did not confirm success.")}}function zr(e){return/^https?:\/\//i.test(e)}function CC(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).map(i=>wt(i)).join(' <span class="breadcrumb-sep">\u203A</span> ')}function Zm(e){let t=tt(e);if(t==="")return 0;let n=t.split(`
`);return n[n.length-1]===""?n.length-1:n.length}function Hm(e){let t=e.split(`
`),n=[],i=[];for(let a of t)/^\[(DIR|FILE|DENIED|NOT_FOUND|WARNING)\]/.test(a.trim())?i.push(a.trim()):i.length===0&&n.push(a);let r=[];for(let a of i){if(a.startsWith("[WARNING]")){let p=a.replace(/^\[WARNING\]\s*/,""),h=p.indexOf(":"),m=h>=0?p.slice(0,h).trim():"",b=h>=0?p.slice(h+1).trim():p,g=m.replace(/\\/g,"/").split("/").filter(Boolean);r.push({name:m,fullPath:m,isDir:!1,isDenied:!1,isNotFound:!1,isWarning:!0,warningText:b,depth:g.length});continue}let l=a.startsWith("[DIR]"),u=a.startsWith("[DENIED]"),c=a.startsWith("[NOT_FOUND]"),d=a.replace(/^\[(DIR|FILE|DENIED|NOT_FOUND)\]\s*/,""),f=d.replace(/\\/g,"/").split("/");r.push({name:d,fullPath:d,isDir:l,isDenied:u,isNotFound:c,isWarning:!1,warningText:"",depth:f.length-1})}let o=[],s=[o];for(let a of r){let u={name:a.fullPath.replace(/\\/g,"/").split("/").pop()??a.fullPath,isDir:a.isDir,isDenied:a.isDenied,isNotFound:a.isNotFound,isWarning:a.isWarning,warningText:a.warningText,children:[],relativePath:a.fullPath};for(;s.length>a.depth+1;)s.pop();s[s.length-1].push(u),a.isDir&&s.push(u.children)}return{hint:n.join(`
`).trim(),entries:o}}var TC=0;function qm(e,t){if(e.length===0)return'<div class="dir-tree"><span class="dir-empty">Empty directory</span></div>';function n(i){return i.map(r=>{let o=`de-${TC++}`,s=`${t}/${r.relativePath.replace(/\\/g,"/")}`,a=wt(s);if(r.isWarning)return`<div class="dir-entry"><button class="dir-row dir-row-warning dir-load-more" data-loadpath="${a}"><span class="dir-warning-icon">\u26A0\uFE0F</span> <span class="dir-warning-text">${wt(r.warningText)} \u2014 click to load all</span></button></div>`;if(r.isDenied)return`<div class="dir-entry"><span class="dir-icon">\u{1F6AB}</span> <span class="dir-name-denied">${wt(r.name)}</span></div>`;if(r.isNotFound)return`<div class="dir-entry"><span class="dir-icon">\u2753</span> <span class="dir-name-denied">${wt(r.name)}</span></div>`;if(r.isDir){let l=r.children.length>0,u=`<span class="dir-chevron${l?" expanded":""}">${l?"\u25BC":"\u25B6"}</span>`,c=`<button class="dir-open-btn" data-openpath="${a}" title="Open in Finder">\u{1F4C2}</button>`,d=l?`<div class="dir-children" id="${o}-ch">${n(r.children)}</div>`:"";return`<div class="dir-entry-group" id="${o}"><div class="dir-row dir-row-folder" data-path="${a}" data-eid="${o}" data-loaded="${l}">${u} <span class="dir-icon">\u{1F4C1}</span> <span class="dir-name">${wt(r.name)}</span>${c}</div>${d}</div>`}return`<div class="dir-entry"><div class="dir-row dir-row-file" data-path="${a}"><span class="file-icon">\u{1F4C4}</span> <span class="file-name">${wt(r.name)}</span></div></div>`}).join("")}return`<div class="dir-tree">${n(e)}</div>`}function IC(e,t){TC=0;let{hint:n,entries:i}=Hm(e);return{notice:n||void 0,html:`<div class="panel-content directory-content">${qm(i,t)}</div>`}}function AC(e){let t=e.container.querySelector(".dir-tree");t&&t.addEventListener("click",async n=>{let i=n.target.closest(".dir-open-btn");if(i){n.stopPropagation();let a=i.dataset.openpath;if(!a)return;let l=e.buildOpenInFolderCommand(a);if(l)try{await e.callTool?.("start_process",{command:l,timeout_ms:12e3,origin:"ui"})}catch{}return}let r=n.target.closest(".dir-load-more");if(r){n.stopPropagation();let a=r.dataset.loadpath;if(!a)return;r.querySelector(".dir-warning-text").textContent="Loading\u2026",r.disabled=!0;try{let l=await e.callTool?.("list_directory",{path:a,depth:1,origin:"ui"}),u=Jt(l)??"";if(u){let c=Hm(u),d=qm(c.entries,a),f=r.closest(".dir-children");if(f){let p=document.createElement("div");p.innerHTML=d;let h=p.querySelector(".dir-tree");f.innerHTML=h?h.innerHTML:""}}}catch{r.querySelector(".dir-warning-text").textContent="Failed to load",r.disabled=!1}return}let o=n.target.closest(".dir-row");if(!o)return;let s=o.dataset.path;if(s){if(o.classList.contains("dir-row-folder")){let a=o.dataset.eid;if(!a)return;let l=document.getElementById(`${a}-ch`),u=o.querySelector(".dir-chevron");if(l){let c=l.classList.toggle("dir-collapsed");u?.classList.toggle("expanded",!c),u&&(u.textContent=c?"\u25B6":"\u25BC");return}if(o.dataset.loaded==="true")return;u&&(u.textContent="\u23F3");try{let c=await e.callTool?.("list_directory",{path:s,depth:2,origin:"ui"}),d=Jt(c)??"";if(d){o.dataset.loaded="true";let f=Hm(d),p=qm(f.entries,s),h=document.createElement("div");h.className="dir-children",h.id=`${a}-ch`;let m=document.createElement("div");m.innerHTML=p;let b=m.querySelector(".dir-tree");h.innerHTML=b?b.innerHTML:'<span class="dir-empty">Empty</span>',o.parentElement?.appendChild(h),u?.classList.add("expanded"),u&&(u.textContent="\u25BC")}}catch{u&&(u.textContent="\u26A0")}return}if(o.classList.contains("dir-row-file")){o.classList.add("dir-loading");try{let a=await e.callTool?.("read_file",{path:s,origin:"ui"});if(!a||typeof a!="object"||a===null)return;let l=a.structuredContent;if(l&&typeof l=="object"){let u=Jt(a)??"";e.onOpenPayload(jm(l,u))}}catch{o.classList.remove("dir-loading")}}}})}function Dt(e){this.content=e}Dt.prototype={constructor:Dt,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,r=i.find(e),o=i.content.slice();return r==-1?o.push(n||e,t):(o[r+1]=t,n&&(o[r]=n)),new Dt(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Dt(n)},addToStart:function(e,t){return new Dt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Dt(n)},addBefore:function(e,t,n){var i=this.remove(t),r=i.content.slice(),o=i.find(e);return r.splice(o==-1?r.length:o,0,t,n),new Dt(r)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Dt.from(e),e.size?new Dt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Dt.from(e),e.size?new Dt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Dt.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Dt.from=function(e){if(e instanceof Dt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Dt(t)};var Wm=Dt;function BC(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let r=e.child(i),o=t.child(i);if(r==o){n+=r.nodeSize;continue}if(!r.sameMarkup(o))return n;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)n++;return n}if(r.content.size||o.content.size){let s=BC(r.content,o.content,n+1);if(s!=null)return s}n+=r.nodeSize}}function UC(e,t,n,i){for(let r=e.childCount,o=t.childCount;;){if(r==0||o==0)return r==o?null:{a:n,b:i};let s=e.child(--r),a=t.child(--o),l=s.nodeSize;if(s==a){n-=l,i-=l;continue}if(!s.sameMarkup(a))return{a:n,b:i};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,i--;return{a:n,b:i}}if(s.content.size||a.content.size){let u=UC(s.content,a.content,n-1,i-1);if(u)return u}n-=l,i-=l}}var N=class e{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,r=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>t&&i(l,r+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),i,r+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,r){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&i&&(s?s=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(r[r.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new e(r,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],r=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),i.push(a),r+=a.nodeSize),s=l}return new e(i,r)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let r=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return r[t]=n,new e(r,o)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let r=this.content[n];t(r,i,n),i+=r.nodeSize}}findDiffStart(t,n=0){return BC(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return UC(this,t,n,i)}findIndex(t){if(t==0)return ic(0,t);if(t==this.size)return ic(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let r=this.child(n),o=i+r.nodeSize;if(o>=t)return o==t?ic(n+1,o):ic(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,i=0;for(let r=0;r<t.length;r++){let o=t[r];i+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(n||(n=t.slice(0,r)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new e(n||t,i)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};N.empty=new N([],0);var Vm={index:0,offset:0};function ic(e,t){return Vm.index=e,Vm.offset=t,Vm}function sc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!sc(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!sc(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}var _e=class e{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let r=0;r<t.length;r++){let o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,r)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&sc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=i.create(n.attrs);return i.checkAttrs(r.attrs),r}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((i,r)=>i.type.rank-r.type.rank),n}};_e.none=[];var fi=class extends Error{},B=class e{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=ZC(this.content,t+this.openStart,n);return i&&new e(i,this.openStart,this.openEnd)}removeBetween(t,n){return new e(jC(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let i=n.openStart||0,r=n.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(N.fromJSON(t,n.content),i,r)}static maxOpen(t,n=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)r++;return new e(t,i,r)}};B.empty=new B(N.empty,0,0);function jC(e,t,n){let{index:i,offset:r}=e.findIndex(t),o=e.maybeChild(i),{index:s,offset:a}=e.findIndex(n);if(r==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(jC(o.content,t-r-1,n-r-1)))}function ZC(e,t,n,i){let{index:r,offset:o}=e.findIndex(t),s=e.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ZC(s.content,t-o-1,n,s);return a&&e.replaceChild(r,s.copy(a))}function k9(e,t,n){if(n.openStart>e.depth)throw new fi("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new fi("Inconsistent open depths");return HC(e,t,n,0)}function HC(e,t,n,i){let r=e.index(i),o=e.node(i);if(r==t.index(i)&&i<e.depth-n.openStart){let s=HC(e,t,n,i+1);return o.copy(o.content.replaceChild(r,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let s=e.parent,a=s.content;return di(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=_9(n,e);return di(o,WC(e,s,a,t,i))}else return di(o,ac(e,t,i))}function qC(e,t){if(!t.type.compatibleContent(e.type))throw new fi("Cannot join "+t.type.name+" onto "+e.type.name)}function Km(e,t,n){let i=e.node(n);return qC(i,t.node(n)),i}function ci(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Qs(e,t,n,i){let r=(t||e).node(n),o=0,s=t?t.index(n):r.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(ci(e.nodeAfter,i),o++));for(let a=o;a<s;a++)ci(r.child(a),i);t&&t.depth==n&&t.textOffset&&ci(t.nodeBefore,i)}function di(e,t){return e.type.checkContent(t),e.copy(t)}function WC(e,t,n,i,r){let o=e.depth>r&&Km(e,t,r+1),s=i.depth>r&&Km(n,i,r+1),a=[];return Qs(null,e,r,a),o&&s&&t.index(r)==n.index(r)?(qC(o,s),ci(di(o,WC(e,t,n,i,r+1)),a)):(o&&ci(di(o,ac(e,t,r+1)),a),Qs(t,n,r,a),s&&ci(di(s,ac(n,i,r+1)),a)),Qs(i,null,r,a),new N(a)}function ac(e,t,n){let i=[];if(Qs(null,e,n,i),e.depth>n){let r=Km(e,t,n+1);ci(di(r,ac(e,t,n+1)),i)}return Qs(t,null,n,i),new N(i)}function _9(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(N.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var lc=class e{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(n);return i?t.child(n).cut(i):r}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)r+=i.child(o).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return _e.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),r=t.maybeChild(n);if(!i){let a=i;i=r,r=a}let o=i.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,r=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!r||!i[o].isInSet(r.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new pi(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],r=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(i.push(s,a,r+l),!u||(s=s.child(a),s.isText))break;o=u-1,r+=l+1}return new e(n,i,o)}static resolveCached(t,n){let i=zC.get(t);if(i)for(let o=0;o<i.elts.length;o++){let s=i.elts[o];if(s.pos==n)return s}else zC.set(t,i=new Gm);let r=i.elts[i.i]=e.resolve(t,n);return i.i=(i.i+1)%w9,r}},Gm=class{constructor(){this.elts=[],this.i=0}},w9=12,zC=new WeakMap,pi=class{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},S9=Object.create(null),Kt=class e{constructor(t,n,i,r=_e.none){this.type=t,this.attrs=n,this.marks=r,this.content=i||N.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,r=0){this.content.nodesBetween(t,n,i,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,r){return this.content.textBetween(t,n,i,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&sc(this.attrs,n||t.defaultAttrs||S9)&&_e.sameSet(this.marks,i||_e.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return B.empty;let r=this.resolve(t),o=this.resolve(n),s=i?0:r.sharedDepth(n),a=r.start(s),u=r.node(s).content.cut(r.pos-a,o.pos-a);return new B(u,r.depth-s,o.depth-s)}replace(t,n,i){return k9(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:r}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(r==t||n.isText)return n;t-=r+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let r=this.content.child(n-1);return{node:r,index:n-1,offset:i-r.nodeSize}}resolve(t){return lc.resolveCached(this,t)}resolveNoCache(t){return lc.resolve(this,t)}rangeHasMark(t,n,i){let r=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),VC(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=N.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(t,n,i,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(i),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=_e.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!_e.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let r=N.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,r,i);return o.type.checkAttrs(o.attrs),o}};Kt.prototype.text=void 0;var Xm=class e extends Kt{constructor(t,n,i,r){if(super(t,n,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):VC(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function VC(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var hi=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new Ym(t,n);if(i.next==null)return e.empty;let r=JC(i);i.next&&i.err("Unexpected trailing text");let o=z9(A9(r));return M9(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let r=this;for(let o=n;r&&o<i;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let r=[this];function o(s,a){let l=s.matchFragment(t,i);if(l&&(!n||l.validEnd))return N.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=o(d,a.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let r=i.shift(),o=r.match;if(o.matchType(t)){let s=[];for(let a=r;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!r.type||l.validEnd)&&(i.push({match:a.contentMatch,type:a,via:r}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let r=0;r<i.next.length;r++)t.indexOf(i.next[r].next)==-1&&n(i.next[r].next)}return n(this),t.map((i,r)=>{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s<i.next.length;s++)o+=(s?", ":"")+i.next[s].type.name+"->"+t.indexOf(i.next[s].next);return o}).join(`
`)}};hi.empty=new hi(!0);var Ym=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function JC(e){let t=[];do t.push(E9(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function E9(e){let t=[];do t.push($9(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function $9(e){let t=I9(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=C9(e,t);else break;return t}function MC(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function C9(e,t){let n=MC(e),i=n;return e.eat(",")&&(e.next!="}"?i=MC(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function T9(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let r=[];for(let o in n){let s=n[o];s.isInGroup(t)&&r.push(s)}return r.length==0&&e.err("No node type or group '"+t+"' found"),r}function I9(e){if(e.eat("(")){let t=JC(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=T9(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function A9(e){let t=[[]];return r(o(e,0),n()),t;function n(){return t.push([])-1}function i(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function r(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;r(u,a=n())}else if(s.type=="star"){let l=n();return i(a,l),r(o(s.expr,l),l),[i(l)]}else if(s.type=="plus"){let l=n();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}else{if(s.type=="opt")return[i(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let c=n();r(o(s.expr,l),c),l=c}if(s.max==-1)r(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();i(l,c),r(o(s.expr,l),c),l=c}return[i(l)]}else{if(s.type=="name")return[i(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function KC(e,t){return t-e}function NC(e,t){let n=[];return i(t),n.sort(KC);function i(r){let o=e[r];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(r);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&i(l)}}}function z9(e){let t=Object.create(null);return n(NC(e,0));function n(i){let r=[];i.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<r.length;c++)r[c][0]==a&&(u=r[c][1]);NC(e,l).forEach(c=>{u||r.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new hi(i.indexOf(e.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(KC);o.next.push({type:r[s][0],next:t[a.join(",")]||n(a)})}return o}}function M9(e,t){for(let n=0,i=[e];n<i.length;n++){let r=i[n],o=!r.validEnd,s=[];for(let a=0;a<r.next.length;a++){let{type:l,next:u}=r.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function GC(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function XC(e,t){let n=Object.create(null);for(let i in e){let r=t&&t[i];if(r===void 0){let o=e[i];if(o.hasDefault)r=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=r}return n}function YC(e,t,n,i){for(let r in t)if(!(r in e))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let r in e){let o=e[r];o.validate&&o.validate(t[r])}}function QC(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new Qm(e,i,t[i]);return n}var uc=class e{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=QC(t,i.attrs),this.defaultAttrs=GC(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==hi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:XC(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Kt(this,this.computeAttrs(t),N.from(n),_e.setFrom(i))}createChecked(t=null,n,i){return n=N.from(n),this.checkContent(n),new Kt(this,this.computeAttrs(t),n,_e.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let r=this.contentMatch.matchFragment(n),o=r&&r.fillBefore(N.empty,!0);return o?new Kt(this,t,n.append(o),_e.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){YC(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:_e.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,s)=>i[o]=new e(o,n,s));let r=n.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function N9(e,t,n){let i=n.split("|");return r=>{let o=r===null?"null":typeof r;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}var Qm=class{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?N9(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}},ta=class e{constructor(t,n,i,r){this.name=t,this.rank=n,this.schema=i,this.spec=r,this.attrs=QC(t,r.attrs),this.excluded=null;let o=GC(this.attrs);this.instance=o?new _e(this,o):null}create(t=null){return!t&&this.instance?this.instance:new _e(this,XC(this.attrs,t))}static compile(t,n){let i=Object.create(null),r=0;return t.forEach((o,s)=>i[o]=new e(o,r++,n,s)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){YC(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}},Mr=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in t)n[r]=t[r];n.nodes=Wm.from(t.nodes),n.marks=Wm.from(t.marks||{}),this.nodes=uc.compile(this.spec.nodes,this),this.marks=ta.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[s]||(i[s]=hi.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?DC(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:DC(this,s.split(" "))}this.nodeFromJSON=r=>Kt.fromJSON(this,r),this.markFromJSON=r=>_e.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,r){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof uc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,r)}text(t,n){let i=this.nodes.text;return new Xm(i,i.defaultAttrs,t,_e.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function DC(e,t){let n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e.marks[r],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(r=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(r)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function D9(e){return e.tag!=null}function O9(e){return e.style!=null}var hn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(r=>{if(D9(r))this.tags.push(r);else if(O9(r)){let o=/[^=]*/.exec(r.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let i=new cc(this,n,!1);return i.addAll(t,_e.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new cc(this,n,!0);return i.addAll(t,_e.none,n.from,n.to),B.maxOpen(i.finish())}matchTag(t,n,i){for(let r=i?this.tags.indexOf(i)+1:0;r<this.tags.length;r++){let o=this.tags[r];if(L9(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,i,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!i.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function i(r){let o=r.priority==null?50:r.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,r)}for(let r in t.marks){let o=t.marks[r].spec.parseDOM;o&&o.forEach(s=>{i(s=RC(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=RC(s)),s.node||s.ignore||s.mark||(s.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},eT={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},R9={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tT={ol:!0,ul:!0},na=1,eg=2,ea=4;function OC(e,t,n){return t!=null?(t?na:0)|(t==="full"?eg:0):e&&e.whitespace=="pre"?na|eg:n&~ea}var ho=class{constructor(t,n,i,r,o,s){this.type=t,this.attrs=n,this.marks=i,this.solid=r,this.options=s,this.content=[],this.activeMarks=_e.none,this.match=o||(s&ea?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,r;return(r=i.findWrapping(t.type))?(this.match=i,r):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&na)){let i=this.content[this.content.length-1],r;if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=N.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!eT.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},cc=class{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let r=n.topNode,o,s=OC(null,n.preserveWhitespace,0)|(i?ea:0);r?o=new ho(r.type,r.attrs,_e.none,!0,n.topMatch||r.type.contentMatch,s):i?o=new ho(null,null,_e.none,!0,null,s):o=new ho(t.schema.topNodeType,null,_e.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,r=this.top,o=r.options&eg?"full":this.localPreserveWS||(r.options&na)>0,{schema:s}=this.parser;if(o==="full"||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(o)if(o==="full")i=i.replace(/\r\n?/g,`
`);else if(s.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=i.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));i=""}else i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let a=r.content[r.content.length-1],l=t.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(i=i.slice(1))}i&&this.insertNode(s.text(i),n,!/\S/.test(i)),this.findInText(t)}else this.findInside(t)}addElement(t,n,i){let r=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;tT.hasOwnProperty(s)&&this.parser.normalizeLists&&P9(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,i));e:if(l?l.ignore:R9.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if(eT.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=r}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let i=t.style;if(i&&i.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let o=this.parser.matchedStyles[r],s=i.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,i,r){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let l=this.enter(s,n.attrs||null,i,n.preserveWhitespace);l&&(o=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,i,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,i,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,i),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,i,r){let o=i||0;for(let s=i?t.childNodes[i]:t.firstChild,a=r==null?null:t.childNodes[r];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,i){let r,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!r||r.length>u.length+a)&&(r=u,o=l,!u.length))break;if(l.solid){if(i)break;a+=2}}if(!r)return null;this.sync(o);for(let s=0;s<r.length;s++)n=this.enterInner(r[s],null,n,!1);return n}insertNode(t,n,i){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(t,n,i);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=_e.none;for(let a of r.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):PC(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,i,r){let o=this.findPlace(t.create(n),i,!1);return o&&(o=this.enterInner(t,n,i,!0,r)),o}enterInner(t,n,i,r=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=OC(t,o,s.options);s.options&ea&&s.content.length==0&&(a|=ea);let l=_e.none;return i=i.filter(u=>(s.type?s.type.allowsMarkType(u.type):PC(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new ho(t,n,l,r,null,a)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=na)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==t&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,i){if(t!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(i?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,r=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(r?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}};function P9(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&tT.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function L9(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function RC(e){let t={};for(let n in e)t[n]=e[n];return t}function PC(e,t){let n=t.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==t||o.indexOf(c)<0&&s(c))return!0}};if(s(r.contentMatch))return!0}}var ir=class e{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},i){i||(i=Jm(n).createDocumentFragment());let r=i,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)r=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(s,n))}),i}serializeNodeInner(t,n){let{dom:i,contentDOM:r}=oc(Jm(n),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,r)}return i}serializeNode(t,n={}){let i=this.serializeNodeInner(t,n);for(let r=t.marks.length-1;r>=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,n,i={}){let r=this.marks[t.type.name];return r&&oc(Jm(i),r(t,n),null,t.attrs)}static renderSpec(t,n,i=null,r){return oc(t,n,i,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=LC(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return LC(t.marks)}};function LC(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function Jm(e){return e.document||window.document}var FC=new WeakMap;function F9(e){let t=FC.get(e);return t===void 0&&FC.set(e,t=B9(e)),t}function B9(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let r=0;r<i.length;r++)n(i[r]);else for(let r in i)n(i[r])}return n(e),t}function oc(e,t,n,i){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let r=t[0],o;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=F9(i))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=r.indexOf(" ");s>0&&(n=r.slice(0,s),r=r.slice(s+1));let a,l=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=oc(e,f,n,i);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}var iT=65535,oT=Math.pow(2,16);function U9(e,t){return e+t*oT}function nT(e){return e&iT}function j9(e){return(e-(e&iT))/oT}var sT=1,aT=2,dc=4,lT=8,oa=class{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&lT)>0}get deletedBefore(){return(this.delInfo&(sT|dc))>0}get deletedAfter(){return(this.delInfo&(aT|dc))>0}get deletedAcross(){return(this.delInfo&dc)>0}},or=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,i=nT(t);if(!this.inverted)for(let r=0;r<i;r++)n+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[i*3]+n+j9(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,i){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+r+(f<0?0:c);if(i)return p;let h=t==(n<0?l:d)?null:U9(a/3,t-l),m=t==l?aT:t==d?sT:dc;return(n<0?t!=l:t!=d)&&(m|=lT),new oa(p,m,h)}r+=c-u}return i?t+r:new oa(t+r,0,null)}touches(t,n){let i=0,r=nT(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let u=this.ranges[a+o],c=l+u;if(t<=c&&a==r*3)return!0;i+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let s=this.ranges[r],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[r+n],c=this.ranges[r+i];t(a,a+u,l,l+c),o+=c-u}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};or.empty=new or([]);var sa=class e{constructor(t,n,i=0,r=t?t.length:0){this.mirror=n,this.from=i,this.to=r,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,i=this._maps.length;n<t._maps.length;n++){let r=t.getMirror(n);this.appendMap(t._maps[n],r!=null&&r<n?i+r:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,i=this._maps.length+t._maps.length;n>=0;n--){let r=t.getMirror(n);this.appendMap(t._maps[n].invert(),r!=null&&r>n?i-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let i=this.from;i<this.to;i++)t=this._maps[i].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,i){let r=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(t,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,t=this._maps[l].recover(a.recover);continue}}r|=a.delInfo,t=a.pos}return i?t:new oa(t,r,null)}},tg=Object.create(null),ht=class{getMap(){return or.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=tg[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in tg)throw new RangeError("Duplicate use of step JSON ID "+t);return tg[t]=n,n.prototype.jsonID=t,n}},St=class e{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,i,r){try{return e.ok(t.replace(n,i,r))}catch(o){if(o instanceof fi)return e.fail(o.message);throw o}}};function sg(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(sg(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return N.fromArray(i)}var aa=class e extends ht{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=t.resolve(this.from),r=i.node(i.sharedDepth(this.to)),o=new B(sg(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),r),n.openStart,n.openEnd);return St.fromReplace(t,this.from,this.to,o)}invert(){return new sr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new e(n.pos,i.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};ht.jsonID("addMark",aa);var sr=class e extends ht{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new B(sg(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return St.fromReplace(t,this.from,this.to,i)}invert(){return new aa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new e(n.pos,i.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};ht.jsonID("removeMark",sr);var la=class e extends ht{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return St.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return St.fromReplace(t,this.pos,this.pos+1,new B(N.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(i))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new mo(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};ht.jsonID("addNodeMark",la);var mo=class e extends ht{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return St.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return St.fromReplace(t,this.pos,this.pos+1,new B(N.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new la(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};ht.jsonID("removeNodeMark",mo);var Et=class e extends ht{constructor(t,n,i,r=!1){super(),this.from=t,this.to=n,this.slice=i,this.structure=r}apply(t){return this.structure&&ig(t,this.from,this.to)?St.fail("Structure replace would overwrite content"):St.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new or([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),i=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return i.deletedAcross&&n.deletedAcross?null:new e(i.pos,Math.max(i.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,B.fromJSON(t,n.slice),!!n.structure)}};Et.MAP_BIAS=1;ht.jsonID("replace",Et);var lt=class e extends ht{constructor(t,n,i,r,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=i,this.gapTo=r,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(ig(t,this.from,this.gapFrom)||ig(t,this.gapTo,this.to)))return St.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return St.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?St.fromReplace(t,this.from,this.to,i):St.fail("Content does not fit in gap")}getMap(){return new or([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:t.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||r<n.pos||o>i.pos?null:new e(n.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};ht.jsonID("replaceAround",lt);function ig(e,t,n){let i=e.resolve(t),r=n-t,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function Z9(e,t,n,i){let r=[],o=[],s,a;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&c.type.allowsMarkType(i.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=i.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[m])?s.to=p:r.push(s=new sr(f,p,d[m])));a&&a.to==f?a.to=p:o.push(a=new aa(f,p,i))}}),r.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function H9(e,t,n,i){let r=[],o=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof ta){let u=s.marks,c;for(;c=i.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let p=0;p<r.length;p++){let h=r[p];h.step==o-1&&d.eq(r[p].style)&&(f=h)}f?(f.to=u,f.step=o):r.push({style:d,from:Math.max(a,t),to:u,step:o})}}}),r.forEach(s=>e.step(new sr(s.from,s.to,s.style)))}function ag(e,t,n,i=n.contentMatch,r=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=i.matchType(u.type);if(!d)s.push(new Et(a,c,B.empty));else{i=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new sr(a,c,u.marks[f]));if(r&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new B(N.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Et(a+f.index,a+f.index+f[0].length,h))}}a=c}if(!i.validEnd){let l=i.fillBefore(N.empty,!0);e.replace(a,a,new B(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function q9(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ar(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let i=e.depth,r=0,o=0;;--i){let s=e.$from.node(i),a=e.$from.index(i)+r,l=e.$to.indexAfter(i)-o;if(i<e.depth&&s.canReplace(a,l,n))return i;if(i==0||s.type.spec.isolating||!q9(s,a,l))break;a&&(r=1),l<s.childCount&&(o=1)}return null}function W9(e,t,n){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,u=a,c=N.empty,d=0;for(let h=o,m=!1;h>n;h--)m||i.index(h)>0?(m=!0,c=N.from(i.node(h).copy(c)),d++):l--;let f=N.empty,p=0;for(let h=o,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=N.from(r.node(h).copy(f)),p++):u++;e.step(new lt(l,u,s,a,new B(c.append(f),d,p),c.size-d,!0))}function bo(e,t,n=null,i=e){let r=V9(e,t),o=r&&J9(i,t);return o?r.map(rT).concat({type:t,attrs:n}).concat(o.map(rT)):null}function rT(e){return{type:e,attrs:null}}function V9(e,t){let{parent:n,startIndex:i,endIndex:r}=e,o=n.contentMatchAt(i).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(i,r,s)?o:null}function J9(e,t){let{parent:n,startIndex:i,endIndex:r}=e,o=n.child(i),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let u=i;l&&u<r;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function K9(e,t,n){let i=N.empty;for(let s=n.length-1;s>=0;s--){if(i.size){let a=n[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=N.from(n[s].type.create(n[s].attrs,i))}let r=t.start,o=t.end;e.step(new lt(r,o,r,o,new B(i,0,0),n.length,!0))}function G9(e,t,n,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof r=="function"?r(s):r;if(s.isTextblock&&!s.hasMarkup(i,l)&&X9(e.doc,e.mapping.slice(o).map(a),i)){let u=null;if(i.schema.linebreakReplacement){let p=i.whitespace=="pre",h=!!i.contentMatch.matchType(i.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&cT(e,s,a,o),ag(e,e.mapping.slice(o).map(a,1),i,void 0,u===null);let c=e.mapping.slice(o),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new lt(d,f,d+1,f-1,new B(N.from(i.create(l,null,s.marks)),0,0),1,!0)),u===!0&&uT(e,s,a,o),!1}})}function uT(e,t,n,i){t.forEach((r,o)=>{if(r.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(r.text);){let l=e.mapping.slice(i).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function cT(e,t,n,i){t.forEach((r,o)=>{if(r.type==r.type.schema.linebreakReplacement){let s=e.mapping.slice(i).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
`))}})}function X9(e,t,n){let i=e.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,n)}function Y9(e,t,n,i,r){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(i,null,r||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new lt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new B(N.from(s),0,0),1,!0))}function tn(e,t,n=1,i){let r=e.resolve(t),o=r.depth-n,s=i&&i[i.length-1]||r.parent;if(o<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=n-2;u>o;u--,c--){let d=r.node(u),f=r.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=i&&i[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=i&&i[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function Q9(e,t,n=1,i){let r=e.doc.resolve(t),o=N.empty,s=N.empty;for(let a=r.depth,l=r.depth-n,u=n-1;a>l;a--,u--){o=N.from(r.node(a).copy(o));let c=i&&i[u];s=N.from(c?c.type.create(c.attrs,s):r.node(a).copy(s))}e.step(new Et(t,t,new B(o.append(s),n,n),!0))}function mn(e,t){let n=e.resolve(t),i=n.index();return dT(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function e5(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:i}=e.type.schema;for(let r=0;r<t.childCount;r++){let o=t.child(r),s=o.type==i?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function dT(e,t){return!!(e&&t&&!e.isLeaf&&e5(e,t))}function mi(e,t,n=-1){let i=e.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):n>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&dT(o,s)&&i.node(r).canReplace(a,a+1))return t;if(r==0)break;t=n<0?i.before(r):i.after(r)}}function t5(e,t,n){let i=null,{linebreakReplacement:r}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(r&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(r);c&&!d?i=!1:!c&&d&&(i=!0)}let a=e.steps.length;if(i===!1){let c=e.doc.resolve(t+n);cT(e,c.node(),c.before(),a)}s.inlineContent&&ag(e,t+n-1,s,o.node().contentMatchAt(o.index()),i==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new Et(u,l.map(t+n,-1),B.empty,!0)),i===!0){let c=e.doc.resolve(u);uT(e,c.node(),c.before(),e.steps.length)}return e}function n5(e,t,n){let i=e.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),n))return t;if(i.parentOffset==0)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,n))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,n))return i.after(r+1);if(o<i.node(r).childCount)return null}return null}function hc(e,t,n){let i=e.resolve(t);if(!n.content.size)return t;let r=n.content;for(let o=0;o<n.openStart;o++)r=r.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=i.depth;s>=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),u=i.node(s),c=!1;if(o==1)c=u.canReplace(l,l,r);else{let d=u.contentMatchAt(l).findWrapping(r.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function ua(e,t,n=t,i=B.empty){if(t==n&&!i.size)return null;let r=e.resolve(t),o=e.resolve(n);return fT(r,o,i)?new Et(t,n,i):new og(r,o,i).fit()}function fT(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var og=class{constructor(t,n,i){this.$from=t,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=N.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=N.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new B(o,s,a);return t>-1?new lt(i.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new Et(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,r=this.unplaced.openEnd;i<t;i++){let o=n.firstChild;if(n.childCount>1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=n==1?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=ng(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(N.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:c};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:i}=this.unplaced,r=ng(t,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(i,r.size+n>=t.size-i?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:i}=this.unplaced,r=ng(t,n);if(r.childCount<=1&&n>0){let o=t.size-n<=n+r.size;this.unplaced=new B(ra(t,n-1,1),n-1,o?n-1:i)}else this.unplaced=new B(ra(t,n,1),n,i)}placeNodes({sliceDepth:t,frontierDepth:n,parent:i,inject:r,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=i?i.content:s.content,l=s.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)c.push(r.child(m));d=d.matchFragment(r)}let p=a.size+t-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),b=d.matchType(m.type);if(!b)break;u++,(u>1||l==0||m.content.size)&&(d=b,c.push(pT(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let h=u==a.childCount;h||(p=-1),this.placed=ia(this.placed,n,N.from(c)),this.frontier[n].match=d,h&&p<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m<p;m++){let g=b.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),b=g.content}this.unplaced=h?t==0?B.empty:new B(ra(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new B(ra(s.content,t,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!rg(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,r=this.$to.after(i);for(;i>1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:i,type:r}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=rg(t,n,r,i,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=rg(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ia(this.placed,n.depth,n.fit)),t=n.move;for(let i=n.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,n=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=ia(this.placed,this.depth,N.from(t.create(n,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=ia(this.placed,this.frontier.length,n))}};function ra(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ra(e.firstChild.content,t-1,n)))}function ia(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ia(e.lastChild.content,t-1,n)))}function ng(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function pT(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,pT(i.firstChild,t-1,i.childCount==1?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(N.empty,!0)))),e.copy(i)}function rg(e,t,n,i,r){let o=e.node(t),s=r?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!r5(n,o.content,s)?a:null}function r5(e,t,n){for(let i=n;i<t.childCount;i++)if(!e.allowsMarks(t.child(i).marks))return!0;return!1}function i5(e){return e.spec.defining||e.spec.definingForContent}function o5(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),o=e.doc.resolve(n);if(fT(r,o,i))return e.step(new Et(t,n,i));let s=mT(r,o);s[s.length-1]==0&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let f=r.depth,p=r.pos-1;f>0;f--,p--){let h=r.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:r.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),u=[],c=i.openStart;for(let f=i.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==i.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=i5(p.type);if(h&&!p.sameMarkup(r.node(Math.abs(a)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=i.openStart;f>=0;f--){let p=(f+c+1)%(i.openStart+1),h=u[p];if(h)for(let m=0;m<s.length;m++){let b=s[(m+l)%s.length],g=!0;b<0&&(g=!1,b=-b);let v=r.node(b-1),x=r.index(b-1);if(v.canReplaceWith(x,x,h.type,h.marks))return e.replace(r.before(b),g?o.after(b):n,new B(hT(i.content,0,i.openStart,p),p,i.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,i),!(e.steps.length>d));f--){let p=s[f];p<0||(t=r.before(p),n=o.after(p))}}function hT(e,t,n,i,r){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(hT(o.content,t+1,n,i,o)))}if(t>i){let o=r.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(N.empty,!0))}return e}function s5(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=n5(e.doc,t,i.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new B(N.from(i),0,0))}function a5(e,t,n){let i=e.doc.resolve(t),r=e.doc.resolve(n);if(i.parent.isTextblock&&r.parent.isTextblock&&i.start()!=r.start()&&i.parentOffset==0&&r.parentOffset==0){let s=i.sharedDepth(n),a=!1;for(let l=i.depth;l>s;l--)i.node(l).type.spec.isolating&&(a=!0);for(let l=r.depth;l>s;l--)r.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=i.depth;l>0&&t==i.start(l);l--)t=i.before(l);for(let l=r.depth;l>0&&n==r.start(l);l--)n=r.before(l);i=e.doc.resolve(t),r=e.doc.resolve(n)}}let o=mT(i,r);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||i.node(a).type.contentMatch.validEnd)return e.delete(i.start(a),r.end(a));if(a>0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return e.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(t-i.start(s)==i.depth-s&&n>i.end(s)&&r.end(s)-n!=r.depth-s&&i.start(s-1)==r.start(s-1)&&i.node(s-1).canReplace(i.index(s-1),r.index(s-1)))return e.delete(i.before(s),n);e.delete(t,n)}function mT(e,t){let n=[],i=Math.min(e.depth,t.depth);for(let r=i;r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var fc=class e extends ht{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return St.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let r=n.type.create(i,null,n.marks);return St.fromReplace(t,this.pos,this.pos+1,new B(N.from(r),0,n.isLeaf?0:1))}getMap(){return or.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};ht.jsonID("attr",fc);var pc=class e extends ht{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return St.ok(i)}getMap(){return or.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};ht.jsonID("docAttr",pc);var go=class extends Error{};go=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};go.prototype=Object.create(Error.prototype);go.prototype.constructor=go;go.prototype.name="TransformError";var Nr=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new sa}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new go(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let i=0;i<this.mapping.maps.length;i++){let r=this.mapping.maps[i];i&&(t=r.map(t,1),n=r.map(n,-1)),r.forEach((o,s,a,l)=>{t=Math.min(t,a),n=Math.max(n,l)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,i=B.empty){let r=ua(this.doc,t,n,i);return r&&this.step(r),this}replaceWith(t,n,i){return this.replace(t,n,new B(N.from(i),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,i){return o5(this,t,n,i),this}replaceRangeWith(t,n,i){return s5(this,t,n,i),this}deleteRange(t,n){return a5(this,t,n),this}lift(t,n){return W9(this,t,n),this}join(t,n=1){return t5(this,t,n),this}wrap(t,n){return K9(this,t,n),this}setBlockType(t,n=t,i,r=null){return G9(this,t,n,i,r),this}setNodeMarkup(t,n,i=null,r){return Y9(this,t,n,i,r),this}setNodeAttribute(t,n,i){return this.step(new fc(t,n,i)),this}setDocAttribute(t,n){return this.step(new pc(t,n)),this}addNodeMark(t,n){return this.step(new la(t,n)),this}removeNodeMark(t,n){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(n instanceof _e)n.isInSet(i.marks)&&this.step(new mo(t,n));else{let r=i.marks,o,s=[];for(;o=n.isInSet(r);)s.push(new mo(t,o)),r=o.removeFromSet(r);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,i){return Q9(this,t,n,i),this}addMark(t,n,i){return Z9(this,t,n,i),this}removeMark(t,n,i){return H9(this,t,n,i),this}clearIncompatible(t,n,i){return ag(this,t,n,i),this}};var lg=Object.create(null),G=class{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new yo(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=B.empty){let i=n.content.lastChild,r=null;for(let a=0;a<n.openEnd;a++)r=i,i=i.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=t.mapping.slice(o);t.replaceRange(c.map(l.pos),c.map(u.pos),a?B.empty:n),a==0&&vT(t,o,(i?i.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,n){let i=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:a}=r[o],l=t.mapping.slice(i),u=l.map(s.pos),c=l.map(a.pos);o?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),vT(t,i,n.isInline?-1:1))}}static findFrom(t,n,i=!1){let r=t.parent.inlineContent?new V(t):vo(t.node(0),t.parent,t.pos,t.index(),n,i);if(r)return r;for(let o=t.depth-1;o>=0;o--){let s=n<0?vo(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):vo(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,i);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new jt(t.node(0))}static atStart(t){return vo(t,t,0,0,1)||new jt(t)}static atEnd(t){return vo(t,t,t.content.size,t.childCount,-1)||new jt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=lg[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in lg)throw new RangeError("Duplicate use of selection JSON ID "+t);return lg[t]=n,n.prototype.jsonID=t,n}getBookmark(){return V.between(this.$anchor,this.$head).getBookmark()}};G.prototype.visible=!0;var yo=class{constructor(t,n){this.$from=t,this.$to=n}},gT=!1;function bT(e){!gT&&!e.parent.inlineContent&&(gT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var V=class e extends G{constructor(t,n=t){bT(t),bT(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return G.near(i);let r=t.resolve(n.map(this.anchor));return new e(r.parent.inlineContent?r:i,i)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new gc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let r=t.resolve(n);return new this(r,i==n?r:t.resolve(i))}static between(t,n,i){let r=t.pos-n.pos;if((!i||r)&&(i=r>=0?1:-1),!n.parent.inlineContent){let o=G.findFrom(n,i,!0)||G.findFrom(n,-i,!0);if(o)n=o.$head;else return G.near(n,i)}return t.parent.inlineContent||(r==0?t=n:(t=(G.findFrom(t,-i,!0)||G.findFrom(t,i,!0)).$anchor,t.pos<n.pos!=r<0&&(t=n))),new e(t,n)}};G.jsonID("text",V);var gc=class e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){return V.between(t.resolve(this.anchor),t.resolve(this.head))}},J=class e extends G{constructor(t){let n=t.nodeAfter,i=t.node(0).resolve(t.pos+n.nodeSize);super(t,i),this.node=n}map(t,n){let{deleted:i,pos:r}=n.mapResult(this.anchor),o=t.resolve(r);return i?G.near(o):new e(o)}content(){return new B(N.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new cg(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}};J.prototype.visible=!1;G.jsonID("node",J);var cg=class e{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:i}=t.mapResult(this.anchor);return n?new gc(i,i):new e(i)}resolve(t){let n=t.resolve(this.anchor),i=n.nodeAfter;return i&&J.isSelectable(i)?new J(n):G.near(n)}},jt=class e extends G{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=B.empty){if(n==B.empty){t.delete(0,t.doc.content.size);let i=G.atStart(t.doc);i.eq(t.selection)||t.setSelection(i)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return l5}};G.jsonID("all",jt);var l5={map(){return this},resolve(e){return new jt(e)}};function vo(e,t,n,i,r,o=!1){if(t.inlineContent)return V.create(e,n);for(let s=i-(r>0?0:1);r>0?s<t.childCount:s>=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&J.isSelectable(a))return J.create(e,n-(r<0?a.nodeSize:0))}else{let l=vo(e,a,n+r,r<0?a.childCount:0,r,o);if(l)return l}n+=a.nodeSize*r}return null}function vT(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof Et||r instanceof lt))return;let o=e.mapping.maps[i],s;o.forEach((a,l,u,c)=>{s==null&&(s=c)}),e.setSelection(G.near(e.doc.resolve(s),n))}var yT=1,mc=2,xT=4,dg=class extends Nr{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|yT)&~mc,this.storedMarks=null,this}get selectionSet(){return(this.updated&yT)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=mc,this}ensureMarks(t){return _e.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&mc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~mc,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let i=this.selection;return n&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||_e.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,i){let r=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(i==null&&(i=n),!t)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=i==n?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,r.text(t,o)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(G.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xT,this}get scrolledIntoView(){return(this.updated&xT)>0}};function kT(e,t){return!t||!e?e:e.bind(t)}var gi=class{constructor(t,n,i){this.name=t,this.init=kT(n.init,i),this.apply=kT(n.apply,i)}},u5=[new gi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new gi("selection",{init(e,t){return e.selection||G.atStart(t.doc)},apply(e){return e.selection}}),new gi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new gi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ca=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=u5.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new gi(i.key,i.spec.state,i))})}},bc=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let r=this.config.plugins[i];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],i=this.applyInner(t),r=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=r?r[s].n:0,u=r?r[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,i);if(c&&i.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let d=0;d<this.config.plugins.length;d++)r.push(d<s?{state:i,n:n.length}:{state:this,n:0})}n.push(c),i=i.applyInner(c),o=!0}r&&(r[s]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new e(this.config),i=this.config.fields;for(let r=0;r<i.length;r++){let o=i[r];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new dg(this)}static create(t){let n=new ca(t.doc?t.doc.type.schema:t.schema,t.plugins),i=new e(n);for(let r=0;r<n.fields.length;r++)i[n.fields[r].name]=n.fields[r].init(t,i);return i}reconfigure(t){let n=new ca(this.schema,t.plugins),i=n.fields,r=new e(n);for(let o=0;o<i.length;o++){let s=i[o].name;r[s]=this.hasOwnProperty(s)?this[s]:i[o].init(t,r)}return r}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),t&&typeof t=="object")for(let i in t){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[i],o=r.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(r,this[r.key]))}return n}static fromJSON(t,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new ca(t.schema,t.plugins),o=new e(r);return r.fields.forEach(s=>{if(s.name=="doc")o.doc=Kt.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=G.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=u.fromJSON.call(l,t,n[a],o);return}}o[s.name]=s.init(t,o)}}),o}};function _T(e,t,n){for(let i in e){let r=e[i];r instanceof Function?r=r.bind(t):i=="handleDOMEvents"&&(r=_T(r,t,{})),n[i]=r}return n}var Q=class{constructor(t){this.spec=t,this.props={},t.props&&_T(t.props,this,this.props),this.key=t.key?t.key.key:wT("plugin")}getState(t){return t[this.key]}},ug=Object.create(null);function wT(e){return e in ug?e+"$"+ ++ug[e]:(ug[e]=0,e+"$")}var de=class{constructor(t="key"){this.key=wT(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var vc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function ET(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var pg=(e,t,n)=>{let i=ET(e,n);if(!i)return!1;let r=mg(i);if(!r){let s=i.blockRange(),a=s&&ar(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(DT(e,r,t,-1))return!0;if(i.parent.content.size==0&&(xo(o,"end")||J.isSelectable(o)))for(let s=i.depth;;s--){let a=ua(e.doc,i.before(s),i.after(s),B.empty);if(a&&a.slice.size<a.to-a.from){if(t){let l=e.tr.step(a);l.setSelection(xo(o,"end")?G.findFrom(l.doc.resolve(l.mapping.map(r.pos,-1)),-1):J.create(l.doc,r.pos-o.nodeSize)),t(l.scrollIntoView())}return!0}if(s==1||i.node(s-1).childCount>1)break}return o.isAtom&&r.depth==i.depth-1?(t&&t(e.tr.delete(r.pos-o.nodeSize,r.pos).scrollIntoView()),!0):!1},$T=(e,t,n)=>{let i=ET(e,n);if(!i)return!1;let r=mg(i);return r?TT(e,r,t):!1},CT=(e,t,n)=>{let i=IT(e,n);if(!i)return!1;let r=vg(i);return r?TT(e,r,t):!1};function TT(e,t,n){let i=t.nodeBefore,r=i,o=t.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let c=r.lastChild;if(!c)return!1;r=c}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=ua(e.doc,o,l,B.empty);if(!u||u.from!=o||u instanceof Et&&u.slice.size>=l-o)return!1;if(n){let c=e.tr.step(u);c.setSelection(V.create(c.doc,o)),n(c.scrollIntoView())}return!0}function xo(e,t,n=!1){for(let i=e;i;i=t=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}var hg=(e,t,n)=>{let{$head:i,empty:r}=e.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;o=mg(i)}let s=o&&o.nodeBefore;return!s||!J.isSelectable(s)?!1:(t&&t(e.tr.setSelection(J.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function mg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function IT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}var gg=(e,t,n)=>{let i=IT(e,n);if(!i)return!1;let r=vg(i);if(!r)return!1;let o=r.nodeAfter;if(DT(e,r,t,1))return!0;if(i.parent.content.size==0&&(xo(o,"start")||J.isSelectable(o))){let s=ua(e.doc,i.before(),i.after(),B.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(xo(o,"start")?G.findFrom(a.doc.resolve(a.mapping.map(r.pos)),1):J.create(a.doc,a.mapping.map(r.pos))),t(a.scrollIntoView())}return!0}}return o.isAtom&&r.depth==i.depth-1?(t&&t(e.tr.delete(r.pos,r.pos+o.nodeSize).scrollIntoView()),!0):!1},bg=(e,t,n)=>{let{$head:i,empty:r}=e.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;o=vg(i)}let s=o&&o.nodeAfter;return!s||!J.isSelectable(s)?!1:(t&&t(e.tr.setSelection(J.create(e.doc,o.pos)).scrollIntoView()),!0)};function vg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var AT=(e,t)=>{let n=e.selection,i=n instanceof J,r;if(i){if(n.node.isTextblock||!mn(e.doc,n.from))return!1;r=n.from}else if(r=mi(e.doc,n.from,-1),r==null)return!1;if(t){let o=e.tr.join(r);i&&o.setSelection(J.create(o.doc,r-e.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},zT=(e,t)=>{let n=e.selection,i;if(n instanceof J){if(n.node.isTextblock||!mn(e.doc,n.to))return!1;i=n.to}else if(i=mi(e.doc,n.to,1),i==null)return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},MT=(e,t)=>{let{$from:n,$to:i}=e.selection,r=n.blockRange(i),o=r&&ar(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},yg=(e,t)=>{let{$head:n,$anchor:i}=e.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(t&&t(e.tr.insertText(`
`).scrollIntoView()),!0)};function xg(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var kg=(e,t)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let r=n.node(-1),o=n.indexAfter(-1),s=xg(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(G.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},_g=(e,t)=>{let n=e.selection,{$from:i,$to:r}=n;if(n instanceof jt||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=xg(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index()<r.parent.childCount?i:r).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(V.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},wg=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(tn(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),r=i&&ar(i);return r==null?!1:(t&&t(e.tr.lift(i,r).scrollIntoView()),!0)};function c5(e){return(t,n)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof J&&t.selection.node.isBlock)return!i.parentOffset||!tn(t.doc,i.pos)?!1:(n&&n(t.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let o=[],s,a,l=!1,u=!1;for(let p=i.depth;;p--)if(i.node(p).isBlock){l=i.end(p)==i.pos+(i.depth-p),u=i.start(p)==i.pos-(i.depth-p),a=xg(i.node(p-1).contentMatchAt(i.indexAfter(p-1)));let m=e&&e(r.parent,l,i);o.unshift(m||(l&&a?{type:a}:null)),s=p;break}else{if(p==1)return!1;o.unshift(null)}let c=t.tr;(t.selection instanceof V||t.selection instanceof jt)&&c.deleteSelection();let d=c.mapping.map(i.pos),f=tn(c.doc,d,o.length,o);if(f||(o[0]=a?{type:a}:null,f=tn(c.doc,d,o.length,o)),!f)return!1;if(c.split(d,o.length,o),!l&&u&&i.node(s).type!=a){let p=c.mapping.map(i.before(s)),h=c.doc.resolve(p);a&&i.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&c.setNodeMarkup(c.mapping.map(i.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}var d5=c5();var NT=(e,t)=>{let{$from:n,to:i}=e.selection,r,o=n.sharedDepth(i);return o==0?!1:(r=n.before(o),t&&t(e.tr.setSelection(J.create(e.doc,r))),!0)},f5=(e,t)=>(t&&t(e.tr.setSelection(new jt(e.doc))),!0);function p5(e,t,n){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!i||!r||!i.type.compatibleContent(r.type)?!1:!i.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(r.isTextblock||mn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function DT(e,t,n,i){let r=t.nodeBefore,o=t.nodeAfter,s,a,l=r.type.spec.isolating||o.type.spec.isolating;if(!l&&p5(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,h=N.empty;for(let g=s.length-1;g>=0;g--)h=N.from(s[g].create(null,h));h=N.from(r.copy(h));let m=e.tr.step(new lt(t.pos-1,p,t.pos,p,new B(h,1,0),s.length,!0)),b=m.doc.resolve(p+2*s.length);b.nodeAfter&&b.nodeAfter.type==r.type&&mn(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=o.type.spec.isolating||i>0&&l?null:G.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&ar(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&xo(o,"start",!0)&&xo(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=o,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=N.empty;for(let x=h.length-1;x>=0;x--)g=N.from(h[x].copy(g));let v=e.tr.step(new lt(t.pos-h.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new B(g,h.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function OT(e){return function(t,n){let i=t.selection,r=e<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return r.node(o).isTextblock?(n&&n(t.tr.setSelection(V.create(t.doc,e<0?r.start(o):r.end(o)))),!0):!1}}var Sg=OT(-1),Eg=OT(1);function RT(e,t=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o),a=s&&bo(s,e,t);return a?(i&&i(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function $g(e,t=null){return function(n,i){let r=!1;for(let o=0;o<n.selection.ranges.length&&!r;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(r)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)r=!0;else{let c=n.doc.resolve(u),d=c.index();r=c.parent.canReplaceWith(d,d+1,e)}})}if(!r)return!1;if(i){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}i(o.scrollIntoView())}return!0}}function Cg(...e){return function(t,n,i){for(let r=0;r<e.length;r++)if(e[r](t,n,i))return!0;return!1}}var fg=Cg(vc,pg,hg),ST=Cg(vc,gg,bg),Dr={Enter:Cg(yg,_g,wg,d5),"Mod-Enter":kg,Backspace:fg,"Mod-Backspace":fg,"Shift-Backspace":fg,Delete:ST,"Mod-Delete":ST,"Mod-a":f5},h5={"Ctrl-h":Dr.Backspace,"Alt-Backspace":Dr["Mod-Backspace"],"Ctrl-d":Dr.Delete,"Ctrl-Alt-Backspace":Dr["Mod-Delete"],"Alt-Delete":Dr["Mod-Delete"],"Alt-d":Dr["Mod-Delete"],"Ctrl-a":Sg,"Ctrl-e":Eg};for(let e in Dr)h5[e]=Dr[e];var xee=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1;function PT(e,t=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o);if(!s)return!1;let a=i?n.tr:null;return m5(a,s,e,t)?(i&&i(a.scrollIntoView()),!0):!1}}function m5(e,t,n,i=null){let r=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);o=new pi(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new pi(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),r=!0}let a=bo(o,n,i,t);return a?(e&&g5(e,t,a,r,n),!0):!1}function g5(e,t,n,i,r){let o=N.empty;for(let c=n.length-1;c>=0;c--)o=N.from(n[c].type.create(n[c].attrs,o));e.step(new lt(t.start-(i?2:0),t.end,t.start,t.end,new B(o,0,0),n.length,!0));let s=0;for(let c=0;c<n.length;c++)n[c].type==r&&(s=c+1);let a=n.length-s,l=t.start+n.length-(i?2:0),u=t.parent;for(let c=t.startIndex,d=t.endIndex,f=!0;c<d;c++,f=!1)!f&&tn(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return e}function LT(e){return function(t,n){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==e);return o?n?i.node(o.depth-1).type==e?b5(t,n,e,o):v5(t,n,o):!0:!1}}function b5(e,t,n,i){let r=e.tr,o=i.end,s=i.$to.end(i.depth);o<s&&(r.step(new lt(o-1,s,o,s,new B(N.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new pi(r.doc.resolve(i.$from.pos),r.doc.resolve(s),i.depth));let a=ar(i);if(a==null)return!1;r.lift(i,a);let l=r.doc.resolve(r.mapping.map(o,-1)-1);return mn(r.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&r.join(l.pos),t(r.scrollIntoView()),!0}function v5(e,t,n){let i=e.tr,r=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=r.child(h).nodeSize,i.delete(p-1,p+1);let o=i.doc.resolve(n.start),s=o.nodeAfter;if(i.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==r.childCount,u=o.node(-1),c=o.index(-1);if(!u.canReplace(c+(a?0:1),c+1,s.content.append(l?N.empty:N.from(r))))return!1;let d=o.pos,f=d+s.nodeSize;return i.step(new lt(d-(a?1:0),f+(l?1:0),d+1,f-1,new B((a?N.empty:N.from(r.copy(N.empty))).append(l?N.empty:N.from(r.copy(N.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}function FT(e){return function(t,n){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,u=>u.childCount>0&&u.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=N.from(u?e.create():null),d=new B(N.from(e.create(null,N.from(a.type.create(null,c)))),u?3:1,0),f=o.start,p=o.end;n(t.tr.step(new lt(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var $t=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Eo=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Ng=null,ur=function(e,t,n){let i=Ng||(Ng=document.createRange());return i.setEnd(e,n??e.nodeValue.length),i.setStart(e,t||0),i},y5=function(){Ng=null},wi=function(e,t,n,i){return n&&(BT(e,t,n,i,-1)||BT(e,t,n,i,1))},x5=/^(img|br|input|textarea|hr)$/i;function BT(e,t,n,i,r){for(var o;;){if(e==n&&t==i)return!0;if(t==(r<0?0:bn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||va(e)||x5.test(e.nodeName)||e.contentEditable=="false")return!1;t=$t(e)+(r<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(r<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)t+=r;else return!1;else e=s,t=r<0?bn(e):0}else return!1}}function bn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function k5(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=bn(e)}else if(e.parentNode&&!va(e))t=$t(e),e=e.parentNode;else return null}}function _5(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!va(e))t=$t(e)+1,e=e.parentNode;else return null}}function w5(e,t,n){for(let i=t==0,r=t==bn(e);i||r;){if(e==n)return!0;let o=$t(e);if(e=e.parentNode,!e)return!1;i=i&&o==0,r=r&&o==bn(e)}}function va(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Ic=function(e){return e.focusNode&&wi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function bi(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function S5(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function E5(e,t,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(t,n);if(i)return{node:i.offsetNode,offset:Math.min(bn(i.offsetNode),i.offset)}}catch{}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(t,n);if(i)return{node:i.startContainer,offset:Math.min(bn(i.startContainer),i.startOffset)}}}var Rn=typeof navigator<"u"?navigator:null,UT=typeof document<"u"?document:null,Br=Rn&&Rn.userAgent||"",Dg=/Edge\/(\d+)/.exec(Br),yI=/MSIE \d/.exec(Br),Og=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Br),Gt=!!(yI||Og||Dg),Lr=yI?document.documentMode:Og?+Og[1]:Dg?+Dg[1]:0,vn=!Gt&&/gecko\/(\d+)/i.test(Br);vn&&+(/Firefox\/(\d+)/.exec(Br)||[0,0])[1];var Rg=!Gt&&/Chrome\/(\d+)/.exec(Br),Ct=!!Rg,xI=Rg?+Rg[1]:0,Rt=!Gt&&!!Rn&&/Apple Computer/.test(Rn.vendor),$o=Rt&&(/Mobile\/\w+/.test(Br)||!!Rn&&Rn.maxTouchPoints>2),gn=$o||(Rn?/Mac/.test(Rn.platform):!1),kI=Rn?/Win/.test(Rn.platform):!1,cr=/Android \d/.test(Br),ya=!!UT&&"webkitFontSmoothing"in UT.documentElement.style,$5=ya?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function C5(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function lr(e,t){return typeof e=="number"?e:e[t]}function T5(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,i=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*i}}function jT(e,t,n){let i=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Eo(s);continue}let a=s,l=a==o.body,u=l?C5(o):T5(a),c=0,d=0;if(t.top<u.top+lr(i,"top")?d=-(u.top-t.top+lr(r,"top")):t.bottom>u.bottom-lr(i,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+lr(r,"top")-u.top:t.bottom-u.bottom+lr(r,"bottom")),t.left<u.left+lr(i,"left")?c=-(u.left-t.left+lr(r,"left")):t.right>u.right-lr(i,"right")&&(c=t.right-u.right+lr(r,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,b=a.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:Eo(s)}}function I5(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),i,r;for(let o=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(o,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:_I(e.dom)}}function _I(e){let t=[],n=e.ownerDocument;for(let i=e;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),e!=n);i=Eo(i));return t}function A5({refDOM:e,refTop:t,stack:n}){let i=e?e.getBoundingClientRect().top:0;wI(n,i==0?0:i-t)}function wI(e,t){for(let n=0;n<e.length;n++){let{dom:i,top:r,left:o}=e[n];i.scrollTop!=r+t&&(i.scrollTop=r+t),i.scrollLeft!=o&&(i.scrollLeft=o)}}var ko=null;function z5(e){if(e.setActive)return e.setActive();if(ko)return e.focus(ko);let t=_I(e);e.focus(ko==null?{get preventScroll(){return ko={preventScroll:!0},!0}}:void 0),ko||(ko=!1,wI(t,0))}function SI(e,t){let n,i=2e8,r,o=0,s=t.top,a=t.top,l,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=ur(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=s&&h.bottom>=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(m<i){n=c,i=m,r=m&&n.nodeType==3?{left:h.right<t.left?h.right:h.left,top:t.top}:t,c.nodeType==1&&m&&(o=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(o=d+1)}}return!n&&l&&(n=l,r=u,i=0),n&&n.nodeType==3?M5(n,r):!n||i&&n.nodeType==1?{node:e,offset:o}:SI(n,r)}function M5(e,t){let n=e.nodeValue.length,i=document.createRange(),r;for(let o=0;o<n;o++){i.setEnd(e,o+1),i.setStart(e,o);let s=Or(i,1);if(s.top!=s.bottom&&Xg(t,s)){r={node:e,offset:o+(t.left>=(s.left+s.right)/2?1:0)};break}}return i.detach(),r||{node:e,offset:0}}function Xg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function N5(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function D5(e,t,n){let{node:i,offset:r}=SI(t,n),o=-1;if(i.nodeType==1&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(i,r,o)}function O5(e,t,n,i){let r=-1;for(let o=t,s=!1;o!=e.dom;){let a=e.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>i.left||l.top>i.top?r=a.posBefore:(!s&&l.right<i.left||l.bottom<i.top)&&(r=a.posAfter),s=!0),!a.contentDOM&&r<0&&!a.node.isText))return(a.node.isBlock?i.top<(l.top+l.bottom)/2:i.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return r>-1?r:e.docView.posFromDOM(t,n,-1)}function EI(e,t,n){let i=e.childNodes.length;if(i&&n.top<n.bottom)for(let r=Math.max(0,Math.min(i-1,Math.floor(i*(t.top-n.top)/(n.bottom-n.top))-2)),o=r;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Xg(t,u))return EI(s,t,u)}}if((o=(o+1)%i)==r)break}return e}function R5(e,t){let n=e.dom.ownerDocument,i,r=0,o=E5(n,t.left,t.top);o&&({node:i,offset:r}=o);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=e.dom.getBoundingClientRect();if(!Xg(t,u)||(s=EI(e.dom,t,u),!s))return null}if(Rt)for(let u=s;i&&u;u=Eo(u))u.draggable&&(i=void 0);if(s=N5(s,t),i){if(vn&&i.nodeType==1&&(r=Math.min(r,i.childNodes.length),r<i.childNodes.length)){let c=i.childNodes[r],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&r++}let u;ya&&r&&i.nodeType==1&&(u=i.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&r--,i==e.dom&&r==i.childNodes.length-1&&i.lastChild.nodeType==1&&t.top>i.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(r==0||i.nodeType!=1||i.childNodes[r-1].nodeName!="BR")&&(a=O5(e,i,r,t))}a==null&&(a=D5(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function ZT(e){return e.top<e.bottom||e.left<e.right}function Or(e,t){let n=e.getClientRects();if(n.length){let i=n[t<0?0:n.length-1];if(ZT(i))return i}return Array.prototype.find.call(n,ZT)||e.getBoundingClientRect()}var P5=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function $I(e,t,n){let{node:i,offset:r,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=ya||vn;if(i.nodeType==3)if(s&&(P5.test(i.nodeValue)||(n<0?!r:r==i.nodeValue.length))){let l=Or(ur(i,r,r),n);if(vn&&r&&/\s/.test(i.nodeValue[r-1])&&r<i.nodeValue.length){let u=Or(ur(i,r-1,r-1),-1);if(u.top==l.top){let c=Or(ur(i,r,r+1),-1);if(c.top!=l.top)return da(c,c.left<u.left)}}return l}else{let l=r,u=r,c=n<0?1:-1;return n<0&&!r?(u++,c=-1):n>=0&&r==i.nodeValue.length?(l--,c=1):n<0?l--:u++,da(Or(ur(i,l,u),c),c<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&r&&(n<0||r==bn(i))){let l=i.childNodes[r-1];if(l.nodeType==1)return Tg(l.getBoundingClientRect(),!1)}if(o==null&&r<bn(i)){let l=i.childNodes[r];if(l.nodeType==1)return Tg(l.getBoundingClientRect(),!0)}return Tg(i.getBoundingClientRect(),n>=0)}if(o==null&&r&&(n<0||r==bn(i))){let l=i.childNodes[r-1],u=l.nodeType==3?ur(l,bn(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return da(Or(u,1),!1)}if(o==null&&r<bn(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?ur(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return da(Or(u,-1),!0)}return da(Or(i.nodeType==3?ur(i):i,-n),n>=0)}function da(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Tg(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function CI(e,t,n){let i=e.state,r=e.root.activeElement;i!=t&&e.updateState(t),r!=e.dom&&e.focus();try{return n()}finally{i!=t&&e.updateState(i),r!=e.dom&&r&&r.focus()}}function L5(e,t,n){let i=t.selection,r=n=="up"?i.$from:i.$to;return CI(e,t,()=>{let{node:o}=e.docView.domFromPos(r.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=$I(e,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=ur(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var F5=/[\u0590-\u08ac]/;function B5(e,t,n){let{$head:i}=t.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=e.domSelection();return a?!F5.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:CI(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=i.depth?e.docView.domAfterPos(i.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),b}):i.pos==i.start()||i.pos==i.end()}var HT=null,qT=null,WT=!1;function U5(e,t,n){return HT==t&&qT==n?WT:(HT=t,qT=n,WT=n=="up"||n=="down"?L5(e,t,n):B5(e,t,n))}var yn=0,VT=1,vi=2,Pn=3,Si=class{constructor(t,n,i,r){this.parent=t,this.children=n,this.dom=i,this.contentDOM=r,this.dirty=yn,i.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,i){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,i=this.posAtStart;;n++){let r=this.children[n];if(r==t)return i;i+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,i){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(i<0){let o,s;if(t==this.contentDOM)o=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(t==this.contentDOM)o=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let r;if(t==this.dom&&this.contentDOM)r=n>$t(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(r==null&&n==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let i=!0,r=t;r;r=r.parentNode){let o=this.getDesc(r),s;if(o&&(!n||o.node))if(i&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))i=!1;else return o}}getDesc(t){let n=t.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(t,n,i){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,n,i)}return-1}descAt(t){for(let n=0,i=0;n<this.children.length;n++){let r=this.children[n],o=i+r.size;if(i==t&&o!=i){for(;!r.border&&r.children.length;)for(let s=0;s<r.children.length;s++){let a=r.children[s];if(a.size){r=a;break}}return r}if(t<o)return r.descAt(t-i-r.border);i=o}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let i=0,r=0;for(let o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.size;if(a>t||s instanceof kc){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,n);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof yc&&o.side>=0;i--);if(n<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?$t(o.dom)+1:0}}else{let o,s=!0;for(;o=i<this.children.length?this.children[i]:null,!(!o||o.dom.parentNode==this.contentDOM);i++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?$t(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let s=i,a=0;;a++){let l=this.children[a],u=s+l.size;if(r==-1&&t<=u){let c=s+l.border;if(t>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=$t(f.dom)+1;break}t-=f.size}r==-1&&(r=0)}if(r>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=$t(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:t,to:n,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:i}=this.domFromPos(t,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[i]}setSelection(t,n,i,r=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let p=0,h=0;p<this.children.length;p++){let m=this.children[p],b=h+m.size;if(o>h&&s<b)return m.setSelection(t-h-m.border,n-h-m.border,i,r);h=b}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),u=i.root.getSelection(),c=i.domSelectionRange(),d=!1;if((vn||Rt)&&t==n){let{node:p,offset:h}=a;if(p.nodeType==3){if(d=!!(h&&p.nodeValue[h-1]==`
`),d&&h==p.nodeValue.length)for(let m=p,b;m;m=m.parentNode){if(b=m.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:$t(b)+1});break}let g=m.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let m=p.childNodes[h-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(vn&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(r=!0)}if(!(r||d&&Rt)&&wi(a.node,a.offset,c.anchorNode,c.anchorOffset)&&wi(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||t==n)&&!(d&&vn)){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let i=0,r=0;r<this.children.length;r++){let o=this.children[r],s=i+o.size;if(i==s?t<=s&&n>=i:t<s&&n>i){let a=i+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==i||n==s?vi:VT,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Pn:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?vi:Pn}i=s}this.dirty=vi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let i=t==1?vi:VT;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},yc=class extends Si{constructor(t,n,i,r){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(i,()=>{if(!o)return r;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==yn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Pg=class extends Si{constructor(t,n,i,r){super(t,[],n,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},Co=class e extends Si{constructor(t,n,i,r,o){super(t,[],i,r),this.mark=n,this.spec=o}static create(t,n,i,r){let o=r.nodeViews[n.type.name],s=o&&o(n,r,i);return(!s||!s.dom)&&(s=ir.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Pn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Pn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=yn){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=yn}}slice(t,n,i){let r=e.create(this.parent,this.mark,!0,i),o=this.children,s=this.size;n<s&&(o=Ug(o,n,s,i)),t>0&&(o=Ug(o,0,t,i));for(let a=0;a<o.length;a++)o[a].parent=r;return r.children=o,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Fr=class e extends Si{constructor(t,n,i,r,o,s,a,l,u){super(t,[],o,s),this.node=n,this.outerDeco=i,this.innerDeco=r,this.nodeDOM=a}static create(t,n,i,r,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},i,r),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=ir.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=AI(c,i,n),u?l=new Lg(t,n,i,r,c,d||null,f,u,o,s+1):n.isText?new xc(t,n,i,r,c,f,o):new e(t,n,i,r,c,d||null,f,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let i=this.children[n];if(this.dom.contains(i.dom.parentNode)){t.contentElement=i.dom.parentNode;break}}t.contentElement||(t.getContent=()=>N.empty)}return t}matchesNode(t,n,i){return this.dirty==yn&&t.eq(this.node)&&_c(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let i=this.node.inlineContent,r=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Bg(this,s&&s.node,t);q5(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,i,t,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?_e.none:this.node.child(c).marks,i,t,c),l.placeWidget(u,t,r)},(u,c,d,f)=>{l.syncToMarks(u.marks,i,t,f);let p;l.findNodeMatch(u,c,d,f)||a&&t.state.selection.from>r&&t.state.selection.to<r+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,r)||l.addNode(u,c,d,t,r),r+=u.nodeSize}),l.syncToMarks([],i,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==vi)&&(s&&this.protectLocalComposition(t,s),TI(this.contentDOM,this.children,t),$o&&W5(this.dom))}localCompositionInfo(t,n){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof V)||i<n||r>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=V5(this.node.content,s,i-n,r-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:i,text:r}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Pg(this,o,n,r);t.input.compositionNodes.push(s),this.children=Ug(this.children,i,i+r.length,t,s)}update(t,n,i,r){return this.dirty==Pn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,i,r),!0)}updateInner(t,n,i,r){this.updateOuterDeco(n),this.node=t,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=yn}updateOuterDeco(t){if(_c(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=II(this.dom,this.nodeDOM,Fg(this.outerDeco,this.node,n),Fg(t,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function JT(e,t,n,i,r){AI(i,t,e);let o=new Fr(void 0,e,t,n,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}var xc=class e extends Fr{constructor(t,n,i,r,o,s,a){super(t,n,i,r,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,i,r){return this.dirty==Pn||this.dirty!=yn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=yn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=yn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,i){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,i)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,i){let r=this.node.cut(t,n),o=document.createTextNode(r.text);return new e(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Pn)}get domAtom(){return!1}isText(t){return this.node.text==t}},kc=class extends Si{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==yn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Lg=class extends Fr{constructor(t,n,i,r,o,s,a,l,u,c){super(t,n,i,r,o,s,a,u,c),this.spec=l}update(t,n,i,r){if(this.dirty==Pn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,i);return o&&this.updateInner(t,n,i,r),o}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,i,r){this.spec.setSelection?this.spec.setSelection(t,n,i.root):super.setSelection(t,n,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function TI(e,t,n){let i=e.firstChild,r=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=i;)i=KT(i),r=!0;i=i.nextSibling}else r=!0,e.insertBefore(a,i);if(s instanceof Co){let l=i?i.previousSibling:e.lastChild;TI(s.contentDOM,s.children,n),i=l?l.nextSibling:e.firstChild}}for(;i;)i=KT(i),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}var fa=function(e){e&&(this.nodeName=e)};fa.prototype=Object.create(null);var yi=[new fa];function Fg(e,t,n){if(e.length==0)return yi;let i=n?yi[0]:new fa,r=[i];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&r.push(i=new fa(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&r.length==1&&r.push(i=new fa(t.isInline?"span":"div")),a=="class"?i.class=(i.class?i.class+" ":"")+l:a=="style"?i.style=(i.style?i.style+";":"")+l:a!="nodeName"&&(i[a]=l))}}}return r}function II(e,t,n,i){if(n==yi&&i==yi)return t;let r=t;for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&r!=e&&(l=r.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(r),a=yi[0]),r=l}j5(r,a||yi[0],s)}return r}function j5(e,t,n){for(let i in t)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&e.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=t[i]&&e.setAttribute(i,n[i]);if(t.class!=n.class){let i=t.class?t.class.split(" ").filter(Boolean):[],r=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.remove(i[o]);for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.add(r[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=i.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function AI(e,t,n){return II(e,e,yi,Fg(t,n,e.nodeType!=1))}function _c(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function KT(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Bg=class{constructor(t,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=Z5(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let i=t;i<n;i++)this.top.children[i].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,i,r){let o=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=yn,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;r<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=Co.create(this.top,t[s],n,i);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,i,r){let o=-1,s;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(t,n,i)&&!this.preMatch.matched.has(u)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,n,i,r,o){let s=this.top.children[r];return s.dirty==Pn&&s.dom==s.contentDOM&&(s.dirty=vi),s.update(t,n,i,o)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=t.pmViewDesc;if(i){for(let r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==i)return r}return-1}t=n}}updateNextNode(t,n,i,r,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Fr){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=Pn&&_c(n,l.outerDeco));if(!f&&l.update(t,n,i,r))return this.destroyBetween(this.index,a),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,i,r,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=vi,d.updateChildren(r,s+1),d.dirty=yn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,i,r,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!_c(i,t.outerDeco)||!r.eq(t.innerDeco))return null;let a=Fr.create(this.top,n,i,r,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,n,i,r,o){let s=Fr.create(this.top,t,n,i,r,o);s.contentDOM&&s.updateChildren(r,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,i){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(t)&&(t==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let o=new yc(this.top,t,n,i);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Co;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof xc)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Rt||Ct)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let i=document.createElement(t);t=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),t=="BR"&&(i.className="ProseMirror-trailingBreak");let r=new kc(this.top,[],i,null);n!=this.top?n.children.push(r):n.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}};function Z5(e,t){let n=t,i=n.children.length,r=e.childCount,o=new Map,s=[];e:for(;r>0;){let a;for(;;)if(i){let u=n.children[i-1];if(u instanceof Co)n=u,i=u.children.length;else{a=u,i--;break}}else{if(n==t)break e;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}function H5(e,t){return e.type.side-t.type.side}function q5(e,t,n,i){let r=t.locals(e),o=0;if(r.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);i(c,r,t.forChild(o,c),u),o+=c.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let c,d;for(;s<r.length&&r[s].to==o;){let b=r[s++];b.widget&&(c?(d||(d=[c])).push(b):c=b)}if(c)if(d){d.sort(H5);for(let b=0;b<d.length;b++)n(d[b],u,!!l)}else n(c,u,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;s<r.length&&r[s].from<=o&&r[s].to>o;)a.push(r[s++]);let h=o+f.nodeSize;if(f.isText){let b=h;s<r.length&&r[s].from<b&&(b=r[s].from);for(let g=0;g<a.length;g++)a[g].to<b&&(b=a[g].to);b<h&&(l=f.cut(b-o),f=f.cut(0,b-o),h=b,p=-1)}else for(;s<r.length&&r[s].to<h;)s++;let m=f.isInline&&!f.isLeaf?a.filter(b=>!b.inline):a.slice();i(f,m,t.forChild(o,f),p),o=h}}function W5(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function V5(e,t,n,i){for(let r=0,o=0;r<e.childCount&&o<=i;){let s=e.child(r++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;r<e.childCount;){let u=e.child(r++);if(o+=u.nodeSize,!u.isText)break;l+=u.text}if(o>=n){if(o>=i&&l.slice(i-t.length-a,i-a)==t)return i-t.length;let u=a<i?l.lastIndexOf(t,i-a-1):-1;if(u>=0&&u+t.length+a>=n)return a+u;if(n==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return-1}function Ug(e,t,n,i,r){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],u=a,c=a+=l.size;u>=n||c<=t?o.push(l):(u<t&&o.push(l.slice(0,t-u,i)),r&&(o.push(r),r=void 0),c>n&&o.push(l.slice(n-u,l.size,i)))}return o}function Yg(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let r=e.docView.nearestDesc(n.focusNode),o=r&&r.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=i.resolve(s),l,u;if(Ic(n)){for(l=s;r&&!r.node;)r=r.parent;let d=r.node;if(r&&d.isAtom&&J.isSelectable(d)&&r.parent&&!(d.isInline&&w5(n.focusNode,n.focusOffset,r.dom))){let f=r.posBefore;u=new J(s==f?a:i.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(h.startContainer,h.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(d<0)return null;[l,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=i.resolve(s)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=i.resolve(l);if(!u){let d=t=="pointer"||e.state.selection.head<a.pos&&!o?1:-1;u=Qg(e,c,a,d)}return u}function zI(e){return e.editable?e.hasFocus():NI(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function dr(e,t=!1){let n=e.state.selection;if(MI(e,n),!!zI(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ct){let i=e.domSelectionRange(),r=e.domObserver.currentSelection;if(i.anchorNode&&r.anchorNode&&wi(i.anchorNode,i.anchorOffset,r.anchorNode,r.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)K5(e);else{let{anchor:i,head:r}=n,o,s;GT&&!(n instanceof V)&&(n.$from.parent.inlineContent||(o=XT(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=XT(e,n.to))),e.docView.setSelection(i,r,e,t),GT&&(o&&YT(o),s&&YT(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&J5(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var GT=Rt||Ct&&xI<63;function XT(e,t){let{node:n,offset:i}=e.docView.domFromPos(t,0),r=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(Rt&&r&&r.contentEditable=="false")return Ig(r);if((!r||r.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(r)return Ig(r);if(o)return Ig(o)}}function Ig(e){return e.contentEditable="true",Rt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function YT(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function J5(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),i=n.anchorNode,r=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=r)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!zI(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function K5(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,$t(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&Gt&&Lr<=11&&(n.disabled=!0,n.disabled=!1)}function MI(e,t){if(t instanceof J){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(QT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else QT(e)}function QT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Qg(e,t,n,i){return e.someProp("createSelectionBetween",r=>r(e,t,n))||V.between(t,n,i)}function eI(e){return e.editable&&!e.hasFocus()?!1:NI(e)}function NI(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function G5(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return wi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function jg(e,t){let{$anchor:n,$head:i}=e.selection,r=t>0?n.max(i):n.min(i),o=r.parent.inlineContent?r.depth?e.doc.resolve(t>0?r.after():r.before()):null:r;return o&&G.findFrom(o,t)}function Rr(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function tI(e,t,n){let i=e.state.selection;if(i instanceof V)if(n.indexOf("s")>-1){let{$head:r}=i,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(r.pos+o.nodeSize*(t<0?-1:1));return Rr(e,new V(i.$anchor,s))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=jg(e.state,t);return r&&r instanceof J?Rr(e,r):!1}else if(!(gn&&n.indexOf("m")>-1)){let r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?J.isSelectable(o)?Rr(e,new J(t<0?e.state.doc.resolve(r.pos-o.nodeSize):r)):ya?Rr(e,new V(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof J&&i.node.isInline)return Rr(e,new V(t>0?i.$to:i.$from));{let r=jg(e.state,t);return r?Rr(e,r):!1}}}function wc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function pa(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function _o(e,t){return t<0?X5(e):Y5(e)}function X5(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r,o,s=!1;for(vn&&n.nodeType==1&&i<wc(n)&&pa(n.childNodes[i],-1)&&(s=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(pa(a,-1))r=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(DI(n))break;{let a=n.previousSibling;for(;a&&pa(a,-1);)r=n.parentNode,o=$t(a),a=a.previousSibling;if(a)n=a,i=wc(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}s?Zg(e,n,i):r&&Zg(e,r,o)}function Y5(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r=wc(n),o,s;for(;;)if(i<r){if(n.nodeType!=1)break;let a=n.childNodes[i];if(pa(a,1))o=n,s=++i;else break}else{if(DI(n))break;{let a=n.nextSibling;for(;a&&pa(a,1);)o=a.parentNode,s=$t(a)+1,a=a.nextSibling;if(a)n=a,i=0,r=wc(n);else{if(n=n.parentNode,n==e.dom)break;i=r=0}}}o&&Zg(e,o,s)}function DI(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Q5(e,t){for(;e&&t==e.childNodes.length&&!va(e);)t=$t(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function eF(e,t){for(;e&&!t&&!va(e);)t=$t(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function Zg(e,t,n){if(t.nodeType!=3){let o,s;(s=Q5(t,n))?(t=s,n=0):(o=eF(t,n))&&(t=o,n=o.nodeValue.length)}let i=e.domSelection();if(!i)return;if(Ic(i)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(t,n);e.domObserver.setCurSelection();let{state:r}=e;setTimeout(()=>{e.state==r&&dr(e)},50)}function nI(e,t){let n=e.state.doc.resolve(t);if(!(Ct||kI)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left<r.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left>r.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function rI(e,t,n){let i=e.state.selection;if(i instanceof V&&!i.empty||n.indexOf("s")>-1||gn&&n.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=jg(e.state,t);if(s&&s instanceof J)return Rr(e,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof jt?G.near(s,t):G.findFrom(s,t);return a?Rr(e,a):!1}return!1}function iI(e,t){if(!(e.state.selection instanceof V))return!0;let{$head:n,$anchor:i,empty:r}=e.state.selection;if(!n.sameParent(i))return!0;if(!r)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function oI(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function tF(e){if(!Rt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let i=t.firstChild;oI(e,i,"true"),setTimeout(()=>oI(e,i,"false"),20)}return!1}function nF(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function rF(e,t){let n=t.keyCode,i=nF(t);if(n==8||gn&&n==72&&i=="c")return iI(e,-1)||_o(e,-1);if(n==46&&!t.shiftKey||gn&&n==68&&i=="c")return iI(e,1)||_o(e,1);if(n==13||n==27)return!0;if(n==37||gn&&n==66&&i=="c"){let r=n==37?nI(e,e.state.selection.from)=="ltr"?-1:1:-1;return tI(e,r,i)||_o(e,r)}else if(n==39||gn&&n==70&&i=="c"){let r=n==39?nI(e,e.state.selection.from)=="ltr"?1:-1:1;return tI(e,r,i)||_o(e,r)}else{if(n==38||gn&&n==80&&i=="c")return rI(e,-1,i)||_o(e,-1);if(n==40||gn&&n==78&&i=="c")return tF(e)||rI(e,1,i)||_o(e,1);if(i==(gn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function e0(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){r--,o--;let p=i.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),i=p.content}let s=e.someProp("clipboardSerializer")||ir.fromSchema(e.state.schema),a=BI(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=FI[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=a.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
`);return{dom:l,text:f,slice:t}}function OI(e,t,n,i,r){let o=r.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=!!t&&(i||o||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,o||i,e)}),o)return a=new B(N.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,r,i,e));if(d)a=d;else{let f=r.marks(),{schema:p}=e.state,h=ir.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=aF(n),ya&&lF(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||hn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!iF.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=uF(sI(a,+c[1],+c[2]),c[4]);else if(a=B.maxOpen(oF(a.content,r),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=sI(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,l)}),a}var iF=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function oF(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=r.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&PI(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=LI(s[s.length-1],o.length));let c=RI(a,l);s.push(c),r=r.matchType(c.type),o=l}}),s)return N.from(s)}return e}function RI(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,N.from(e));return e}function PI(e,t,n,i,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let o=PI(e,t,n,i.lastChild,r+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(r==e.length-1?n.type:e[r+1]))return i.copy(i.content.append(N.from(RI(n,e,r+1))))}}function LI(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,LI(e.lastChild,t-1)),i=e.contentMatchAt(e.childCount).fillBefore(N.empty,!0);return e.copy(n.append(i))}function Hg(e,t,n,i,r,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),r<i-1&&(a=Hg(a,t,n,i,r+1,o)),r>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function sI(e,t,n){return t<e.openStart&&(e=new B(Hg(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(Hg(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var FI={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},aI=null;function BI(){return aI||(aI=document.implementation.createHTMLDocument("title"))}var Ag=null;function sF(e){let t=window.trustedTypes;return t?(Ag||(Ag=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ag.createHTML(e)):e}function aF(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=BI().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e),r;if((r=i&&FI[i[1].toLowerCase()])&&(e=r.map(o=>"<"+o+">").join("")+e+r.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=sF(e),r)for(let o=0;o<r.length;o++)n=n.querySelector(r[o])||n;return n}function lF(e){let t=e.querySelectorAll(Ct?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let i=t[n];i.childNodes.length==1&&i.textContent=="\xA0"&&i.parentNode&&i.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),i)}}function uF(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch{return e}let{content:r,openStart:o,openEnd:s}=e;for(let a=i.length-2;a>=0;a-=2){let l=n.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=N.from(l.create(i[a+1],r)),o++,s++}return new B(r,o,s)}var Zt={},Ht={},cF={touchstart:!0,touchmove:!0},qg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function dF(e){for(let t in Zt){let n=Zt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=i=>{pF(e,i)&&!t0(e,i)&&(e.editable||!(i.type in Ht))&&n(e,i)},cF[t]?{passive:!0}:void 0)}Rt&&e.dom.addEventListener("input",()=>null),Wg(e)}function Pr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function fF(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Wg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=i=>t0(e,i))})}function t0(e,t){return e.someProp("handleDOMEvents",n=>{let i=n[t.type];return i?i(e,t)||t.defaultPrevented:!1})}function pF(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function hF(e,t){!t0(e,t)&&Zt[t.type]&&(e.editable||!(t.type in Ht))&&Zt[t.type](e,t)}Ht.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!jI(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(cr&&Ct&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),$o&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",r=>r(e,bi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||rF(e,n)?n.preventDefault():Pr(e,"key")};Ht.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ht.keypress=(e,t)=>{let n=t;if(jI(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||gn&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof V)||!i.$from.sameParent(i.$to)){let r=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(r).scrollIntoView();!/[\r\n]/.test(r)&&!e.someProp("handleTextInput",s=>s(e,i.$from.pos,i.$to.pos,r,o))&&e.dispatch(o()),n.preventDefault()}};function Ac(e){return{left:e.clientX,top:e.clientY}}function mF(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function n0(e,t,n,i,r){if(i==-1)return!1;let o=e.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),r,!0):a(e,n,o.node(s),o.before(s),r,!1)))return!0;return!1}function So(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);n=="pointer"&&i.setMeta("pointer",!0),e.dispatch(i)}function gF(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&J.isSelectable(i)?(So(e,new J(n),"pointer"),!0):!1}function bF(e,t){if(t==-1)return!1;let n=e.state.selection,i,r;n instanceof J&&(i=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(J.isSelectable(a)){i&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?r=o.before(n.$from.depth):r=o.before(s);break}}return r!=null?(So(e,J.create(e.state.doc,r),"pointer"),!0):!1}function vF(e,t,n,i,r){return n0(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(r?bF(e,n):gF(e,n))}function yF(e,t,n,i){return n0(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",r=>r(e,t,i))}function xF(e,t,n,i){return n0(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",r=>r(e,t,i))||kF(e,n,i)}function kF(e,t,n){if(n.button!=0)return!1;let i=e.state.doc;if(t==-1)return i.inlineContent?(So(e,V.create(i,0,i.content.size),"pointer"),!0):!1;let r=i.resolve(t);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)So(e,V.create(i,a+1,a+1+s.content.size),"pointer");else if(J.isSelectable(s))So(e,J.create(i,a),"pointer");else continue;return!0}}function r0(e){return Sc(e)}var UI=gn?"metaKey":"ctrlKey";Zt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=r0(e),r=Date.now(),o="singleClick";r-e.input.lastClick.time<500&&mF(n,e.input.lastClick)&&!n[UI]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=e.posAtCoords(Ac(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Vg(e,s,n,!!i)):(o=="doubleClick"?yF:xF)(e,s.pos,s.inside,n)?n.preventDefault():Pr(e,"pointer"))};var Vg=class{constructor(t,n,i,r){this.view=t,this.pos=n,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[UI],this.allowDefault=i.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}let a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof J&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&vn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Pr(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>dr(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ac(t))),this.updateAllowDefault(t),this.allowDefault||!n?Pr(this.view,"pointer"):vF(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Rt&&this.mightDrag&&!this.mightDrag.node.isAtom||Ct&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(So(this.view,G.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Pr(this.view,"pointer")}move(t){this.updateAllowDefault(t),Pr(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};Zt.touchstart=e=>{e.input.lastTouch=Date.now(),r0(e),Pr(e,"pointer")};Zt.touchmove=e=>{e.input.lastTouch=Date.now(),Pr(e,"pointer")};Zt.contextmenu=e=>r0(e);function jI(e,t){return e.composing?!0:Rt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var _F=cr?5e3:-1;Ht.compositionstart=Ht.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof V&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||Ct&&kI&&wF(e)))e.markCursor=e.state.storedMarks||n.marks(),Sc(e,!0),e.markCursor=null;else if(Sc(e,!t.selection.empty),vn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&r.nodeType==1&&o!=0;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else r=s,o=-1}}e.input.composing=!0}ZI(e,_F)};function wF(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return i.nodeType==1&&i.contentEditable=="false"}Ht.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,ZI(e,20))};function ZI(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Sc(e),t))}function HI(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=EF());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function SF(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=k5(t.focusNode,t.focusOffset),i=_5(t.focusNode,t.focusOffset);if(n&&i&&n!=i){let r=i.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||i==o)return o;if(!r||!r.isText(i.nodeValue))return i;if(e.input.compositionNode==i){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return i}}return n||i}function EF(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Sc(e,t=!1){if(!(cr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),HI(e),t||e.docView&&e.docView.dirty){let n=Yg(e),i=e.state.selection;return n&&!n.eq(i)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!i.$from.node(i.$from.sharedDepth(i.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function $F(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var ha=Gt&&Lr<15||$o&&$5<604;Zt.copy=Ht.cut=(e,t)=>{let n=t,i=e.state.selection,r=n.type=="cut";if(i.empty)return;let o=ha?null:n.clipboardData,s=i.content(),{dom:a,text:l}=e0(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):$F(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function CF(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function TF(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?ma(e,i.value,null,r,t):ma(e,i.textContent,i.innerHTML,r,t)},50)}function ma(e,t,n,i,r){let o=OI(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,r,o||B.empty)))return!0;if(!o)return!1;let s=CF(o),a=s?e.state.tr.replaceSelectionWith(s,i):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function qI(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ht.paste=(e,t)=>{let n=t;if(e.composing&&!cr)return;let i=ha?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&ma(e,qI(i),i.getData("text/html"),r,n)?n.preventDefault():TF(e,n)};var Ec=class{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}},IF=gn?"altKey":"ctrlKey";function WI(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[IF]}Zt.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let r=e.state.selection,o=r.empty?null:e.posAtCoords(Ac(n)),s;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof J?r.to-1:r.to))){if(i&&i.mightDrag)s=J.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=J.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:u,slice:c}=e0(e,a);(!n.dataTransfer.files.length||!Ct||xI>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ha?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ha||n.dataTransfer.setData("text/plain",u),e.dragging=new Ec(c,WI(e,n),s)};Zt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ht.dragover=Ht.dragenter=(e,t)=>t.preventDefault();Ht.drop=(e,t)=>{try{AF(e,t,e.dragging)}finally{e.dragging=null}};function AF(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(Ac(t));if(!i)return;let r=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e,!1)}):o=OI(e,qI(t.dataTransfer),ha?null:t.dataTransfer.getData("text/html"),!1,r);let s=!!(n&&WI(e,t));if(e.someProp("handleDrop",p=>p(e,t,o||B.empty,s))){t.preventDefault();return}if(!o)return;t.preventDefault();let a=o?hc(e.state.doc,r.pos,o):r.pos;a==null&&(a=r.pos);let l=e.state.tr;if(s){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(a),c=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,o.content.firstChild):l.replaceRange(u,u,o),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&J.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new J(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,b,g)=>p=g),l.setSelection(Qg(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Zt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&dr(e)},20))};Zt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Zt.beforeinput=(e,t)=>{if(Ct&&cr&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:i}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=i||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,bi(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Ht)Zt[e]=Ht[e];function ga(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var $c=class e{constructor(t,n){this.toDOM=t,this.spec=n||ki,this.side=this.spec.side||0}map(t,n,i,r){let{pos:o,deleted:s}=t.mapResult(n.from+r,this.side<0?-1:1);return s?null:new ut(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ga(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},xi=class e{constructor(t,n){this.attrs=t,this.spec=n||ki}map(t,n,i,r){let o=t.map(n.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(n.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new ut(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof e&&ga(this.attrs,t.attrs)&&ga(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},Jg=class e{constructor(t,n){this.attrs=t,this.spec=n||ki}map(t,n,i,r){let o=t.mapResult(n.from+r,1);if(o.deleted)return null;let s=t.mapResult(n.to+r,-1);return s.deleted||s.pos<=o.pos?null:new ut(o.pos-i,s.pos-i,this)}valid(t,n){let{index:i,offset:r}=t.content.findIndex(n.from),o;return r==n.from&&!(o=t.child(i)).isText&&r+o.nodeSize==n.to}eq(t){return this==t||t instanceof e&&ga(this.attrs,t.attrs)&&ga(this.spec,t.spec)}destroy(){}},ut=class e{constructor(t,n,i){this.from=t,this.to=n,this.type=i}copy(t,n){return new e(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,i){return this.type.map(t,this,n,i)}static widget(t,n,i){return new e(t,t,new $c(n,i))}static inline(t,n,i,r){return new e(t,n,new xi(i,r))}static node(t,n,i,r){return new e(t,n,new Jg(i,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof xi}get widget(){return this.type instanceof $c}},wo=[],ki={},qe=class e{constructor(t,n){this.local=t.length?t:wo,this.children=n.length?n:wo}static create(t,n){return n.length?Tc(n,t,0,ki):Ot}find(t,n,i){let r=[];return this.findInner(t??0,n??1e9,r,0,i),r}findInner(t,n,i,r,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,i,r+a,o)}}map(t,n,i){return this==Ot||t.maps.length==0?this:this.mapInner(t,n,0,0,i||ki)}mapInner(t,n,i,r,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,i,r);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?zF(this.children,s||[],t,n,i,r,o):s?new e(s.sort(_i),wo):Ot}add(t,n){return n.length?this==Ot?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,i){let r,o=0;t.forEach((a,l)=>{let u=l+i,c;if(c=JI(n,a,u)){for(r||(r=this.children.slice());o<r.length&&r[o]<l;)o+=3;r[o]==l?r[o+2]=r[o+2].addInner(a,c,u+1):r.splice(o,0,l,l+a.nodeSize,Tc(c,a,u+1,ki)),o+=3}});let s=VI(o?KI(n):n,-i);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new e(s.length?this.local.concat(s).sort(_i):this.local,r||this.children)}remove(t){return t.length==0||this==Ot?this:this.removeInner(t,0)}removeInner(t,n){let i=this.children,r=this.local;for(let o=0;o<i.length;o+=3){let s,a=i[o]+n,l=i[o+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<l&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;i==this.children&&(i=this.children.slice());let u=i[o+2].removeInner(s,a+1);u!=Ot?i[o+2]=u:(i.splice(o,3),o-=3)}if(r.length){for(let o=0,s;o<t.length;o++)if(s=t[o])for(let a=0;a<r.length;a++)r[a].eq(s,n)&&(r==this.local&&(r=this.local.slice()),r.splice(a--,1))}return i==this.children&&r==this.local?this:r.length||i.length?new e(r,i):Ot}forChild(t,n){if(this==Ot)return this;if(n.isLeaf)return e.empty;let i,r;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof xi){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(r||(r=[])).push(l.copy(u,c))}}if(r){let a=new e(r.sort(_i),wo);return i?new Cc([a,i]):a}return i||Ot}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return i0(this.localsInner(t))}localsInner(t){if(this==Ot)return wo;if(t.inlineContent||!this.local.some(xi.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof xi||n.push(this.local[i]);return n}forEachSet(t){t(this)}};qe.empty=new qe([],[]);qe.removeOverlap=i0;var Ot=qe.empty,Cc=class e{constructor(t){this.members=t}map(t,n){let i=this.members.map(r=>r.map(t,n,ki));return e.from(i)}forChild(t,n){if(n.isLeaf)return qe.empty;let i=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,n);o!=Ot&&(o instanceof e?i=i.concat(o.members):i.push(o))}return e.from(i)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,i=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?i0(i?n:n.sort(_i)):wo}static from(t){switch(t.length){case 0:return Ot;case 1:return t[0];default:return new e(t.every(n=>n instanceof qe)?t:t.reduce((n,i)=>n.concat(i instanceof qe?i:i.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}};function zF(e,t,n,i,r,o,s){let a=e.slice();for(let u=0,c=o;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let b=m-h-(p-f);for(let g=0;g<a.length;g+=3){let v=a[g+1];if(v<0||f>v+c-d)continue;let x=a[g]+c-d;p>=x?a[g+1]=f<=x?-2:-1:f>=c&&b&&(a[g]+=b,a[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let c=n.map(e[u]+o),d=c-r;if(d<0||d>=i.content.size){l=!0;continue}let f=n.map(e[u+1]+o,-1),p=f-r,{index:h,offset:m}=i.content.findIndex(d),b=i.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=a[u+2].mapInner(n,b,c+1,e[u]+o+1,s);g!=Ot?(a[u]=d,a[u+1]=p,a[u+2]=g):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=MF(a,e,t,n,r,o,s),c=Tc(u,i,0,s);t=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new qe(t.sort(_i),a)}function VI(e,t){if(!t||!e.length)return e;let n=[];for(let i=0;i<e.length;i++){let r=e[i];n.push(new ut(r.from+t,r.to+t,r.type))}return n}function MF(e,t,n,i,r,o,s){function a(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(i,r,u);d?n.push(d):s.onRemove&&s.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)a(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&a(e[l+2],t[l]+o+1);return n}function JI(e,t,n){if(t.isLeaf)return null;let i=n+t.nodeSize,r=null;for(let o=0,s;o<e.length;o++)(s=e[o])&&s.from>n&&s.to<i&&((r||(r=[])).push(s),e[o]=null);return r}function KI(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Tc(e,t,n,i){let r=[],o=!1;t.forEach((a,l)=>{let u=JI(e,a,l+n);if(u){o=!0;let c=Tc(u,a,n+l+1,i);c!=Ot&&r.push(l,l+a.nodeSize,c)}});let s=VI(o?KI(e):e,-n).sort(_i);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(i.onRemove&&i.onRemove(s[a].spec),s.splice(a--,1));return s.length||r.length?new qe(s,r):Ot}function _i(e,t){return e.from-t.from||e.to-t.to}function i0(e){let t=e;for(let n=0;n<t.length-1;n++){let i=t[n];if(i.from!=i.to)for(let r=n+1;r<t.length;r++){let o=t[r];if(o.from==i.from){o.to!=i.to&&(t==e&&(t=e.slice()),t[r]=o.copy(o.from,i.to),lI(t,r+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(t==e&&(t=e.slice()),t[n]=i.copy(i.from,o.from),lI(t,r,i.copy(o.from,i.to)));break}}}return t}function lI(e,t,n){for(;t<e.length&&_i(n,e[t])>0;)t++;e.splice(t,0,n)}function zg(e){let t=[];return e.someProp("decorations",n=>{let i=n(e.state);i&&i!=Ot&&t.push(i)}),e.cursorWrapper&&t.push(qe.create(e.state.doc,[e.cursorWrapper.deco])),Cc.from(t)}var NF={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},DF=Gt&&Lr<=11,Kg=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},Gg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Kg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r<i.length;r++)this.queue.push(i[r]);Gt&&Lr<=11&&i.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():Rt&&t.composing&&i.some(r=>r.type=="childList"&&r.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),DF&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,NF)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(eI(this.view)){if(this.suppressingSelectionUpdates)return dr(this.view);if(Gt&&Lr<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&wi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,i;for(let o=t.focusNode;o;o=Eo(o))n.add(o);for(let o=t.anchorNode;o;o=Eo(o))if(n.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);if(r&&r.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&eI(t)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(vn&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||PF(t,d)!=p)&&f.remove()}}}let u=null;o<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Ic(i)&&(u=Yg(t))&&u.eq(G.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,dr(t),this.currentSelection.set(i),t.scrollToSelection()):(o>-1||r)&&(o>-1&&(t.docView.markDirty(o,s),OF(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,LF(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||dr(t),this.currentSelection.set(i))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let i=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(i==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!i||i.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(t.target))return{from:i.posBefore,to:i.posAfter};let r=t.previousSibling,o=t.nextSibling;if(Gt&&Lr<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(r=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(o=f)}let s=r&&r.parentNode==t.target?$t(r)+1:0,a=i.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?$t(o):t.target.childNodes.length,u=i.localPosFromDOM(t.target,l,1);return{from:a,to:u}}else return t.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=t.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}},uI=new WeakMap,cI=!1;function OF(e){if(!uI.has(e)&&(uI.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=vn,cI)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),cI=!0}}function dI(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return wi(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function RF(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return dI(e,r)}let n;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",i,!0),n?dI(e,n):null}function PF(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let i=e.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function LF(e,t){var n;let{focusNode:i,focusOffset:r}=e.domSelectionRange();for(let o of t)if(((n=o.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=o.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(o,a.firstChild),i==o&&e.domSelection().collapse(o,r)}else o.parentNode.removeChild(o)}}function FF(e,t,n){let{node:i,fromOffset:r,toOffset:o,from:s,to:a}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,c=l.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],Ic(l)||u.push({node:l.focusNode,offset:l.focusOffset})),Ct&&e.input.lastKeyCode===8)for(let b=o;b>r;b--){let g=i.childNodes[b-1],v=g.pmViewDesc;if(g.nodeName=="BR"&&!v){o=b;break}if(!v||v.size)break}let d=e.state.doc,f=e.someProp("domParser")||hn.fromSchema(e.state.schema),p=d.resolve(s),h=null,m=f.parse(i,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:r,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:BF,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+s,head:g+s}}return{doc:m,sel:h,from:s,to:a}}function BF(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Rt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Rt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var UF=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function jF(e,t,n,i,r){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let M=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=Yg(e,M);if(z&&!e.state.selection.eq(z)){if(Ct&&cr&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",ce=>ce(e,bi(13,"Enter"))))return;let H=e.state.tr.setSelection(z);M=="pointer"?H.setMeta("pointer",!0):M=="key"&&H.scrollIntoView(),o&&H.setMeta("composition",o),e.dispatch(H)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,u=FF(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let h=qF(d.content,u.doc.content,u.from,f,p);if(h&&e.input.domChangeCount++,($o&&e.input.lastIOSEnter>Date.now()-225||cr)&&r.some(M=>M.nodeType==1&&!UF.test(M.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",M=>M(e,bi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(i&&l instanceof V&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let M=fI(e,e.state.doc,u.sel);if(M&&!M.eq(e.state.selection)){let z=e.state.tr.setSelection(M);o&&z.setMeta("composition",o),e.dispatch(z)}}return}e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof V&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Gt&&Lr<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),v=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA;if(($o&&e.input.lastIOSEnter>Date.now()-225&&(!v||r.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!v&&m.pos<u.doc.content.size&&(!m.sameParent(b)||!m.parent.inlineContent)&&m.pos<b.pos&&!/\S/.test(u.doc.textBetween(m.pos,b.pos,"","")))&&e.someProp("handleKeyDown",M=>M(e,bi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&HF(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",M=>M(e,bi(8,"Backspace")))){cr&&Ct&&e.domObserver.suppressSelectionUpdates();return}Ct&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),cr&&!v&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(M){return M(e,bi(13,"Enter"))})},20));let x=h.start,k=h.endA,E=M=>{let z=M||e.state.tr.replace(x,k,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let H=fI(e,z.doc,u.sel);H&&!(Ct&&e.composing&&H.empty&&(h.start!=h.endB||e.input.lastChromeDelete<Date.now()-100)&&(H.head==x||H.head==z.mapping.map(k)-1)||Gt&&H.empty&&H.head==x)&&z.setSelection(H)}return o&&z.setMeta("composition",o),z.scrollIntoView()},C;if(v)if(m.pos==b.pos){Gt&&Lr<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>dr(e),20));let M=E(e.state.tr.delete(x,k)),z=c.resolve(h.start).marksAcross(c.resolve(h.endA));z&&M.ensureMarks(z),e.dispatch(M)}else if(h.endA==h.endB&&(C=ZF(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let M=E(e.state.tr);C.type=="add"?M.addMark(x,k,C.mark):M.removeMark(x,k,C.mark),e.dispatch(M)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let M=m.parent.textBetween(m.parentOffset,b.parentOffset),z=()=>E(e.state.tr.insertText(M,x,k));e.someProp("handleTextInput",H=>H(e,x,k,M,z))||e.dispatch(z())}else e.dispatch(E());else e.dispatch(E())}function fI(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Qg(e,t.resolve(n.anchor),t.resolve(n.head))}function ZF(e,t){let n=e.firstChild.marks,i=t.firstChild.marks,r=n,o=i,s,a,l;for(let c=0;c<i.length;c++)r=i[c].removeFromSet(r);for(let c=0;c<n.length;c++)o=n[c].removeFromSet(o);if(r.length==1&&o.length==0)a=r[0],s="add",l=c=>c.mark(a.addToSet(c.marks));else if(r.length==0&&o.length==1)a=o[0],s="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(l(t.child(c)));if(N.from(u).eq(e))return{mark:a,type:s}}function HF(e,t,n,i,r){if(n-t<=r.pos-i.pos||Mg(i,!0,!1)<r.pos)return!1;let o=e.resolve(t);if(!i.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==t+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(Mg(o,!0,!0));return!s.parent.isTextblock||s.pos>n||Mg(s,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(s.parent.content)}function Mg(e,t,n){let i=e.depth,r=t?e.end():e.pos;for(;i>0&&(t||e.indexAfter(i)==e.node(i).childCount);)i--,r++,t=!1;if(n){let o=e.node(i).maybeChild(e.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}function qF(e,t,n,i,r){let o=e.findDiffStart(t,n);if(o==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(r=="end"){let l=Math.max(0,o-Math.min(s,a));i-=s+l-o}if(s<o&&e.size<t.size){let l=i<=o&&i>=s?o-i:0;o-=l,o&&o<t.size&&pI(t.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=i<=o&&i>=a?o-i:0;o-=l,o&&o<e.size&&pI(e.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function pI(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var ba=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new qg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(vI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=gI(this),mI(this),this.nodeViews=bI(this),this.docView=JT(this.state.doc,hI(this),zg(this),this.dom,this),this.domObserver=new Gg(this,(i,r,o,s)=>jF(this,i,r,o,s)),this.domObserver.start(),dF(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Wg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(vI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in t)n[i]=t[i];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var i;let r=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(HI(this),s=!0),this.state=t;let a=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=bI(this);VF(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Wg(this),this.editable=gI(this),mI(this);let l=zg(this),u=hI(this),c=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(r.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&I5(this);if(s){this.domObserver.stop();let p=d&&(Gt||Ct)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&WF(r.selection,t.selection);if(d){let h=Ct?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=SF(this)),(o||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=JT(t.doc,u,l,this.dom,this)),h&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&G5(this))?dr(this,p):(MI(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((i=this.dragging)===null||i===void 0)&&i.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&A5(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof J){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&jT(this,n.getBoundingClientRect(),t)}else jT(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,t)}}updateDraggedNode(t,n){let i=t.node,r=-1;if(i.from<this.state.doc.content.size&&this.state.doc.nodeAt(i.from)==i.node)r=i.from;else{let o=i.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&o<this.state.doc.content.size&&this.state.doc.nodeAt(o))==i.node&&(r=o)}this.dragging=new Ec(t.slice,t.move,r<0?void 0:J.create(this.state.doc,r))}someProp(t,n){let i=this._props&&this._props[t],r;if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Gt){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&z5(this.dom),dr(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return R5(this,t)}coordsAtPos(t,n=1){return $I(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,i=-1){let r=this.docView.posFromDOM(t,n,i);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,n){return U5(this,n||this.state,t)}pasteHTML(t,n){return ma(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ma(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return e0(this,t)}destroy(){this.docView&&(fF(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],zg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,y5())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return hF(this,t)}domSelectionRange(){let t=this.domSelection();return t?Rt&&this.root.nodeType===11&&S5(this.dom.ownerDocument)==this.dom&&RF(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};ba.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function hI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let i in n)i=="class"?t.class+=" "+n[i]:i=="style"?t.style=(t.style?t.style+";":"")+n[i]:!t[i]&&i!="contenteditable"&&i!="nodeName"&&(t[i]=String(n[i]))}),t.translate||(t.translate="no"),[ut.node(0,e.state.doc.content.size,t)]}function mI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:ut.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function gI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function WF(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function bI(e){let t=Object.create(null);function n(i){for(let r in i)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=i[r])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function VF(e,t){let n=0,i=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let r in t)i++;return n!=i}function vI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var fr={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:"'"},Mc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JF=typeof navigator<"u"&&/Mac/.test(navigator.platform),KF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(ct=0;ct<10;ct++)fr[48+ct]=fr[96+ct]=String(ct);var ct;for(ct=1;ct<=24;ct++)fr[ct+111]="F"+ct;var ct;for(ct=65;ct<=90;ct++)fr[ct]=String.fromCharCode(ct+32),Mc[ct]=String.fromCharCode(ct);var ct;for(zc in fr)Mc.hasOwnProperty(zc)||(Mc[zc]=fr[zc]);var zc;function GI(e){var t=JF&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||KF&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Mc:fr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var GF=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),XF=typeof navigator<"u"&&/Win/.test(navigator.platform);function YF(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<t.length-1;a++){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))GF?s=!0:r=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(n="Alt-"+n),r&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function QF(e){let t=Object.create(null);for(let n in e)t[YF(n)]=e[n];return t}function o0(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function XI(e){return new Q({props:{handleKeyDown:xa(e)}})}function xa(e){let t=QF(e);return function(n,i){let r=GI(i),o,s=t[o0(r,i)];if(s&&s(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(i.shiftKey){let a=t[o0(r,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(XF&&i.ctrlKey&&i.altKey)&&(o=fr[i.keyCode])&&o!=r){let a=t[o0(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var eB=Object.defineProperty,d0=(e,t)=>{for(var n in t)eB(e,n,{get:t[n],enumerable:!0})};function Bc(e){let{state:t,transaction:n}=e,{selection:i}=n,{doc:r}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=n.selection,r=n.doc,o=n.storedMarks,n}}}var Uc=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:i}=t,{tr:r}=n,o=this.buildProps(r);return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,(...u)=>{let c=a(...u)(o);return!r.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(r),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s=[],a=!!e,l=e||r.tr,u=()=>(!a&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(l),s.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...h)=>{let m=this.buildProps(l,t),b=f(...h)(m);return s.push(b),c}])),run:u};return c}createCan(e){let{rawCommands:t,state:n}=this,i=!1,r=e||n.tr,o=this.buildProps(r,i);return{...Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>l(...u)({...o,dispatch:void 0})])),chain:()=>this.createChain(r,i)}}buildProps(e,t=!0){let{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s={tr:e,editor:i,view:o,state:Bc({state:r,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)(s)]))}};return s}},aA={};d0(aA,{blur:()=>tB,clearContent:()=>nB,clearNodes:()=>rB,command:()=>iB,createParagraphNear:()=>oB,cut:()=>sB,deleteCurrentNode:()=>aB,deleteNode:()=>lB,deleteRange:()=>uB,deleteSelection:()=>cB,enter:()=>dB,exitCode:()=>fB,extendMarkRange:()=>pB,first:()=>hB,focus:()=>gB,forEach:()=>bB,insertContent:()=>vB,insertContentAt:()=>kB,joinBackward:()=>SB,joinDown:()=>wB,joinForward:()=>EB,joinItemBackward:()=>$B,joinItemForward:()=>CB,joinTextblockBackward:()=>TB,joinTextblockForward:()=>IB,joinUp:()=>_B,keyboardShortcut:()=>zB,lift:()=>MB,liftEmptyBlock:()=>NB,liftListItem:()=>DB,newlineInCode:()=>OB,resetAttributes:()=>RB,scrollIntoView:()=>PB,selectAll:()=>LB,selectNodeBackward:()=>FB,selectNodeForward:()=>BB,selectParentNode:()=>UB,selectTextblockEnd:()=>jB,selectTextblockStart:()=>ZB,setContent:()=>HB,setMark:()=>sU,setMeta:()=>aU,setNode:()=>lU,setNodeSelection:()=>uU,setTextDirection:()=>cU,setTextSelection:()=>dU,sinkListItem:()=>fU,splitBlock:()=>pU,splitListItem:()=>hU,toggleList:()=>gU,toggleMark:()=>bU,toggleNode:()=>vU,toggleWrap:()=>yU,undoInputRule:()=>xU,unsetAllMarks:()=>kU,unsetMark:()=>_U,unsetTextDirection:()=>wU,updateAttributes:()=>SU,wrapIn:()=>EU,wrapInList:()=>$U});var tB=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),nB=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),rB=()=>({state:e,tr:t,dispatch:n})=>{let{selection:i}=t,{ranges:r}=i;return n&&r.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;let h=ar(p);if(a.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},iB=e=>t=>e(t),oB=()=>({state:e,dispatch:t})=>_g(e,t),sB=(e,t)=>({editor:n,tr:i})=>{let{state:r}=n,o=r.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);let s=i.mapping.map(t);return i.insert(s,o.content),i.setSelection(new V(i.doc.resolve(Math.max(s-1,0)))),!0},aB=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,i=n.$anchor.node();if(i.content.size>0)return!1;let r=e.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(t){let a=r.before(o),l=r.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1};function nt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var lB=e=>({tr:t,state:n,dispatch:i})=>{let r=nt(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){let l=o.before(s),u=o.after(s);t.delete(l,u).scrollIntoView()}return!0}return!1},uB=e=>({tr:t,dispatch:n})=>{let{from:i,to:r}=e;return n&&t.delete(i,r),!0},cB=()=>({state:e,dispatch:t})=>vc(e,t),dB=()=>({commands:e})=>e.keyboardShortcut("Enter"),fB=()=>({state:e,dispatch:t})=>kg(e,t);function f0(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Lc(e,t,n={strict:!0}){let i=Object.keys(t);return i.length?i.every(r=>n.strict?t[r]===e[r]:f0(t[r])?t[r].test(e[r]):t[r]===e[r]):!0}function lA(e,t,n={}){return e.find(i=>i.type===t&&Lc(Object.fromEntries(Object.keys(n).map(r=>[r,i.attrs[r]])),n))}function YI(e,t,n={}){return!!lA(e,t,n)}function p0(e,t,n){if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(u=>u.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(u=>u.type===t))return;if(!n){let u=i.node.marks.find(c=>c.type===t);u&&(n=u.attrs)}if(!lA([...i.node.marks],t,n))return;let o=i.index,s=e.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(;o>0&&YI([...e.parent.child(o-1).marks],t,n);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&YI([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function pr(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var pB=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=pr(e,i.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(r){let d=p0(l,o,t);if(d&&d.from<=u&&d.to>=c){let f=V.create(s,d.from,d.to);n.setSelection(f)}}return!0},hB=e=>t=>{let n=typeof e=="function"?e(t):e;for(let i=0;i<n.length;i+=1)if(n[i](t))return!0;return!1};function uA(e){return e instanceof V}function Ei(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function cA(e,t=null){if(!t)return null;let n=G.atStart(e),i=G.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return i;let r=n.from,o=i.to;return t==="all"?V.create(e,Ei(0,r,o),Ei(e.content.size,r,o)):V.create(e,Ei(t,r,o),Ei(t,r,o))}function QI(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Fc(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function mB(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var gB=(e=null,t={})=>({editor:n,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};let s=()=>{(Fc()||QI())&&i.dom.focus(),mB()&&!Fc()&&!QI()&&i.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(i.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(i.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(o&&e===null&&!uA(n.state.selection))return s(),!0;let a=cA(r.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},bB=(e,t)=>n=>e.every((i,r)=>t(i,{...n,index:r})),vB=(e,t)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),dA=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let i=t[n];i.nodeType===3&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?e.removeChild(i):i.nodeType===1&&dA(i)}return e};function Nc(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return dA(n)}function Sa(e,t,n){if(e instanceof Kt||e instanceof N)return e;n={slice:!0,parseOptions:{},...n};let i=typeof e=="object"&&e!==null,r=typeof e=="string";if(i)try{if(Array.isArray(e)&&e.length>0)return N.fromArray(e.map(a=>t.nodeFromJSON(a)));let s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),Sa("",t,n)}if(r){if(n.errorOnInvalidContent){let s=!1,a="",l=new Mr({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?hn.fromSchema(l).parseSlice(Nc(e),n.parseOptions):hn.fromSchema(l).parse(Nc(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let o=hn.fromSchema(t);return n.slice?o.parseSlice(Nc(e),n.parseOptions).content:o.parse(Nc(e),n.parseOptions)}return Sa("",t,n)}function yB(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof Et||r instanceof lt))return;let o=e.mapping.maps[i],s=0;o.forEach((a,l,u,c)=>{s===0&&(s=c)}),e.setSelection(G.near(e.doc.resolve(s),n))}var xB=e=>!("type"in e),kB=(e,t,n)=>({tr:i,dispatch:r,editor:o})=>{var s;if(r){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=b=>{o.emit("contentError",{editor:o,error:b,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{Sa(t,o.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=Sa(t,o.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:o.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((xB(a)?a:[a]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=i.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof N){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;i.insertText(m,c,d)}else{m=a;let b=i.doc.resolve(c),g=b.node(),v=b.parentOffset===0,x=g.isText||g.isTextblock,k=g.content.size>0;v&&x&&k&&p&&(c=Math.max(0,c-1)),i.replaceWith(c,d,m)}n.updateSelection&&yB(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:c,text:m})}return!0},_B=()=>({state:e,dispatch:t})=>AT(e,t),wB=()=>({state:e,dispatch:t})=>zT(e,t),SB=()=>({state:e,dispatch:t})=>pg(e,t),EB=()=>({state:e,dispatch:t})=>gg(e,t),$B=()=>({state:e,dispatch:t,tr:n})=>{try{let i=mi(e.doc,e.selection.$from.pos,-1);return i==null?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},CB=()=>({state:e,dispatch:t,tr:n})=>{try{let i=mi(e.doc,e.selection.$from.pos,1);return i==null?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},TB=()=>({state:e,dispatch:t})=>$T(e,t),IB=()=>({state:e,dispatch:t})=>CT(e,t);function fA(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function AB(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<t.length-1;a+=1){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))Fc()||fA()?s=!0:r=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return i&&(n=`Alt-${n}`),r&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var zB=e=>({editor:t,view:n,tr:i,dispatch:r})=>{let o=AB(e).split(/-(?!$)/),s=o.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l?.steps.forEach(u=>{let c=u.map(i.mapping);c&&r&&i.maybeStep(c)}),!0};function Ln(e,t,n={}){let{from:i,to:r,empty:o}=e.selection,s=t?nt(t,e.schema):null,a=[];e.doc.nodesBetween(i,r,(d,f)=>{if(d.isText)return;let p=Math.max(i,f),h=Math.min(r,f+d.nodeSize);a.push({node:d,from:p,to:h})});let l=r-i,u=a.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>Lc(d.node.attrs,n,{strict:!1}));return o?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var MB=(e,t={})=>({state:n,dispatch:i})=>{let r=nt(e,n.schema);return Ln(n,r,t)?MT(n,i):!1},NB=()=>({state:e,dispatch:t})=>wg(e,t),DB=e=>({state:t,dispatch:n})=>{let i=nt(e,t.schema);return LT(i)(t,n)},OB=()=>({state:e,dispatch:t})=>yg(e,t);function jc(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function eA(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((i,r)=>(n.includes(r)||(i[r]=e[r]),i),{})}var RB=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=jc(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=nt(e,i.schema)),a==="mark"&&(s=pr(e,i.schema));let l=!1;return n.selection.ranges.forEach(u=>{i.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{o&&o===c.type&&(l=!0,r&&n.setNodeMarkup(d,void 0,eA(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(l=!0,r&&n.addMark(d,d+c.nodeSize,s.create(eA(f.attrs,t))))})})}),l},PB=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),LB=()=>({tr:e,dispatch:t})=>{if(t){let n=new jt(e.doc);e.setSelection(n)}return!0},FB=()=>({state:e,dispatch:t})=>hg(e,t),BB=()=>({state:e,dispatch:t})=>bg(e,t),UB=()=>({state:e,dispatch:t})=>NT(e,t),jB=()=>({state:e,dispatch:t})=>Eg(e,t),ZB=()=>({state:e,dispatch:t})=>Sg(e,t);function u0(e,t,n={},i={}){return Sa(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}var HB=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:i={}}={})=>({editor:r,tr:o,dispatch:s,commands:a})=>{let{doc:l}=o;if(i.preserveWhitespace!=="full"){let u=u0(e,r.schema,i,{errorOnInvalidContent:t??r.options.enableContentCheck});return s&&o.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:i,errorOnInvalidContent:t??r.options.enableContentCheck})};function pA(e,t){let n=pr(t,e.schema),{from:i,to:r,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});let a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function h0(e,t){let n=new Nr(e);return t.forEach(i=>{i.steps.forEach(r=>{n.step(r)})}),n}function qB(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function hA(e,t,n){let i=[];return e.nodesBetween(t.from,t.to,(r,o)=>{n(r)&&i.push({node:r,pos:o})}),i}function m0(e,t){for(let n=e.depth;n>0;n-=1){let i=e.node(n);if(t(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}}function Zc(e){return t=>m0(t.$from,e)}function K(e,t,n){return e.config[t]===void 0&&e.parent?K(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?K(e.parent,t,n):null}):e.config[t]}function g0(e){return e.map(t=>{let n={name:t.name,options:t.options,storage:t.storage},i=K(t,"addExtensions",n);return i?[t,...g0(i())]:t}).flat(10)}function Ao(e,t){let n=ir.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function mA(e){return typeof e=="function"}function Te(e,t=void 0,...n){return mA(e)?t?e.bind(t)(...n):e(...n):e}function WB(e={}){return Object.keys(e).length===0&&e.constructor===Object}function To(e){let t=e.filter(r=>r.type==="extension"),n=e.filter(r=>r.type==="node"),i=e.filter(r=>r.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:i}}function gA(e){let t=[],{nodeExtensions:n,markExtensions:i}=To(e),r=[...n,...i],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(u=>u.name!=="text").map(u=>u.name),a=i.map(u=>u.name),l=[...s,...a];return e.forEach(u=>{let c={name:u.name,options:u.options,storage:u.storage,extensions:r},d=K(u,"addGlobalAttributes",c);if(!d)return;d().forEach(p=>{let h;Array.isArray(p.types)?h=p.types:p.types==="*"?h=l:p.types==="nodes"?h=s:p.types==="marks"?h=a:h=[],h.forEach(m=>{Object.entries(p.attributes).forEach(([b,g])=>{t.push({type:m,name:b,attribute:{...o,...g}})})})})}),r.forEach(u=>{let c={name:u.name,options:u.options,storage:u.storage},d=K(u,"addAttributes",c);if(!d)return;let f=d();Object.entries(f).forEach(([p,h])=>{let m={...o,...h};typeof m?.default=="function"&&(m.default=m.default()),m?.isRequired&&m?.default===void 0&&delete m.default,t.push({type:u.name,name:p,attribute:m})})}),t}function VB(e){let t=[],n="",i=!1,r=!1,o=0,s=e.length;for(let a=0;a<s;a+=1){let l=e[a];if(l==="'"&&!r){i=!i,n+=l;continue}if(l==='"'&&!i){r=!r,n+=l;continue}if(!i&&!r){if(l==="("){o+=1,n+=l;continue}if(l===")"&&o>0){o-=1,n+=l;continue}if(l===";"&&o===0){t.push(n),n="";continue}}n+=l}return n&&t.push(n),t}function tA(e){let t=[],n=VB(e||""),i=n.length;for(let r=0;r<i;r+=1){let o=n[r],s=o.indexOf(":");if(s===-1)continue;let a=o.slice(0,s).trim(),l=o.slice(s+1).trim();a&&l&&t.push([a,l])}return t}function ae(...e){return e.filter(t=>!!t).reduce((t,n)=>{let i={...t};return Object.entries(n).forEach(([r,o])=>{if(!i[r]){i[r]=o;return}if(r==="class"){let a=o?String(o).split(" "):[],l=i[r]?i[r].split(" "):[],u=a.filter(c=>!l.includes(c));i[r]=[...l,...u].join(" ")}else if(r==="style"){let a=new Map([...tA(i[r]),...tA(o)]);i[r]=Array.from(a.entries()).map(([l,u])=>`${l}: ${u}`).join("; ")}else i[r]=o}),i},{})}function Io(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,i)=>ae(n,i),{})}function JB(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function nA(e,t){return"style"in e?e:{...e,getAttrs:n=>{let i=e.getAttrs?e.getAttrs(n):e.attrs;if(i===!1)return!1;let r=t.reduce((o,s)=>{let a=s.attribute.parseHTML?s.attribute.parseHTML(n):JB(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function rA(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&WB(n)?!1:n!=null))}function iA(e){var t,n;let i={};return!((t=e?.attribute)!=null&&t.isRequired)&&"default"in(e?.attribute||{})&&(i.default=e.attribute.default),((n=e?.attribute)==null?void 0:n.validate)!==void 0&&(i.validate=e.attribute.validate),[e.name,i]}function KB(e,t){var n;let i=gA(e),{nodeExtensions:r,markExtensions:o}=To(e),s=(n=r.find(u=>K(u,"topNode")))==null?void 0:n.name,a=Object.fromEntries(r.map(u=>{let c=i.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,v)=>{let x=K(v,"extendNodeSchema",d);return{...g,...x?x(u):{}}},{}),p=rA({...f,content:Te(K(u,"content",d)),marks:Te(K(u,"marks",d)),group:Te(K(u,"group",d)),inline:Te(K(u,"inline",d)),atom:Te(K(u,"atom",d)),selectable:Te(K(u,"selectable",d)),draggable:Te(K(u,"draggable",d)),code:Te(K(u,"code",d)),whitespace:Te(K(u,"whitespace",d)),linebreakReplacement:Te(K(u,"linebreakReplacement",d)),defining:Te(K(u,"defining",d)),isolating:Te(K(u,"isolating",d)),attrs:Object.fromEntries(c.map(iA))}),h=Te(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>nA(g,c)));let m=K(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:Io(g,c)}));let b=K(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(o.map(u=>{let c=i.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let v=K(g,"extendMarkSchema",d);return{...b,...v?v(u):{}}},{}),p=rA({...f,inclusive:Te(K(u,"inclusive",d)),excludes:Te(K(u,"excludes",d)),group:Te(K(u,"group",d)),spanning:Te(K(u,"spanning",d)),code:Te(K(u,"code",d)),attrs:Object.fromEntries(c.map(iA))}),h=Te(K(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>nA(b,c)));let m=K(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:Io(b,c)})),[u.name,p]}));return new Mr({topNode:s,nodes:a,marks:l})}function GB(e){let t=e.filter((n,i)=>e.indexOf(n)!==i);return Array.from(new Set(t))}function wa(e){return e.sort((n,i)=>{let r=K(n,"priority")||100,o=K(i,"priority")||100;return r>o?-1:r<o?1:0})}function bA(e){let t=wa(g0(e)),n=GB(t.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}function vA(e,t,n){let{from:i,to:r}=t,{blockSeparator:o=`
`,textSerializers:s={}}=n||{},a="";return e.nodesBetween(i,r,(l,u,c,d)=>{var f;l.isBlock&&u>i&&(a+=o);let p=s?.[l.type.name];if(p)return c&&(a+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(a+=(f=l?.text)==null?void 0:f.slice(Math.max(i,u)-u,r-u))}),a}function XB(e,t){let n={from:0,to:e.content.size};return vA(e,n,t)}function yA(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function YB(e,t){let n=nt(t,e.schema),{from:i,to:r}=e.selection,o=[];e.doc.nodesBetween(i,r,a=>{o.push(a)});let s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function b0(e,t){let n=jc(typeof t=="string"?t:t.name,e.schema);return n==="node"?YB(e,t):n==="mark"?pA(e,t):{}}function QB(e,t=JSON.stringify){let n={};return e.filter(i=>{let r=t(i);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function eU(e){let t=QB(e);return t.length===1?t:t.filter((n,i)=>!t.filter((o,s)=>s!==i).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function v0(e){let{mapping:t,steps:n}=e,i=[];return t.maps.forEach((r,o)=>{let s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{let{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{let u=t.slice(o).map(a,-1),c=t.slice(o).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);i.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),eU(i)}function Hc(e,t,n){let i=[];return e===t?n.resolve(e).marks().forEach(r=>{let o=n.resolve(e),s=p0(o,r.type);s&&i.push({mark:r,...s})}):n.nodesBetween(e,t,(r,o)=>{!r||r?.nodeSize===void 0||i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}var xA=(e,t,n,i=20)=>{let r=e.doc.resolve(n),o=i,s=null;for(;o>0&&s===null;){let a=r.node(o);a?.type.name===t?s=a:o-=1}return[s,o]};function ka(e,t){return t.nodes[e]||t.marks[e]||null}function Pc(e,t,n){return Object.fromEntries(Object.entries(n).filter(([i])=>{let r=e.find(o=>o.type===t&&o.name===i);return r?r.attribute.keepOnSplit:!1}))}var tU=(e,t=500)=>{let n="",i=e.parentOffset;return e.parent.nodesBetween(Math.max(0,i-t),i,(r,o,s,a)=>{var l,u;let c=((u=(l=r.type.spec).toText)==null?void 0:u.call(l,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";n+=r.isAtom&&!r.isText?c:c.slice(0,Math.max(0,i-o))}),n};function c0(e,t,n={}){let{empty:i,ranges:r}=e.selection,o=t?pr(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>Lc(d.attrs,n,{strict:!1}));let s=0,a=[];if(r.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(o&&m.inlineContent&&!m.type.allowsMarkType(o))return!1;if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),v=Math.min(h,b+m.nodeSize),x=v-g;s+=x,a.push(...m.marks.map(k=>({mark:k,from:g,to:v})))})}),s===0)return!1;let l=a.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>Lc(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=s}function nU(e,t,n={}){if(!t)return Ln(e,null,n)||c0(e,null,n);let i=jc(t,e.schema);return i==="node"?Ln(e,t,n):i==="mark"?c0(e,t,n):!1}var kA=(e,t)=>{let{$from:n,$to:i,$anchor:r}=e.selection;if(t){let o=Zc(a=>a.type.name===t)(e.selection);if(!o)return!1;let s=e.doc.resolve(o.pos+1);return r.pos+1===s.end()}return!(i.parentOffset<i.parent.nodeSize-2||n.pos!==i.pos)},_A=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function oA(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function s0(e,t){let{nodeExtensions:n}=To(t),i=n.find(s=>s.name===e);if(!i)return!1;let r={name:i.name,options:i.options,storage:i.storage},o=Te(K(i,"group",r));return typeof o!="string"?!1:o.split(" ").includes("list")}function Ea(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var i;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return!/\S/.test((i=e.text)!=null?i:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(o=>{r!==!1&&(Ea(o,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function qc(e){return e instanceof J}var wA=class SA{constructor(t){this.position=t}static fromJSON(t){return new SA(t.position)}toJSON(){return{position:this.position}}};function rU(e,t){let n=t.mapping.mapResult(e.position);return{position:new wA(n.pos),mapResult:n}}function iU(e){return new wA(e)}function oU(e,t,n){var i;let{selection:r}=t,o=null;if(uA(r)&&(o=r.$cursor),o){let a=(i=e.storedMarks)!=null?i:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(u=>u.type.excludes(n)))}let{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var sU=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=n,{empty:s,ranges:a}=o,l=pr(e,i.schema);if(r)if(s){let u=pA(i,l);n.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;i.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return oU(i,n,l)},aU=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),lU=(e,t={})=>({state:n,dispatch:i,chain:r})=>{let o=nt(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?r().command(({commands:a})=>$g(o,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>$g(o,{...s,...t})(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},uU=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,r=Ei(e,0,i.content.size),o=J.create(i,r);t.setSelection(o)}return!0},cU=(e,t)=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=i,s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=o.from,a=o.to),r&&n.doc.nodesBetween(s,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},dU=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,{from:r,to:o}=typeof e=="number"?{from:e,to:e}:e,s=V.atStart(i).from,a=V.atEnd(i).to,l=Ei(r,s,a),u=Ei(o,s,a),c=V.create(i,l,u);t.setSelection(c)}return!0},fU=e=>({state:t,dispatch:n})=>{let i=nt(e,t.schema);return FT(i)(t,n)};function sA(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let i=n.filter(r=>t?.includes(r.type.name));e.tr.ensureMarks(i)}}var pU=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:i,editor:r})=>{let{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=r.extensionManager.attributes,c=Pc(u,a.node().type.name,a.node().attrs);if(o instanceof J&&o.node.isBlock)return!a.parentOffset||!tn(s,a.pos)?!1:(i&&(e&&sA(n,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:qB(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=tn(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!h&&tn(t.doc,t.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),i){if(h&&(o instanceof V&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){let m=t.mapping.map(a.before()),b=t.doc.resolve(m);a.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(a.before()),f)}e&&sA(n,r.extensionManager.splittableMarks),t.scrollIntoView()}return h},hU=(e,t={})=>({tr:n,state:i,dispatch:r,editor:o})=>{var s;let a=nt(e,i.schema),{$from:l,$to:u}=i.selection,c=i.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==a)return!1;let f=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let g=N.empty,v=l.index(-1)?1:l.index(-2)?2:3;for(let z=l.depth-v;z>=l.depth-3;z-=1)g=N.from(l.node(z).copy(g));let x=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...Pc(f,l.node().type.name,l.node().attrs),...t},E=((s=a.contentMatch.defaultType)==null?void 0:s.createAndFill(k))||void 0;g=g.append(N.from(a.createAndFill(null,E)||void 0));let C=l.before(l.depth-(v-1));n.replace(C,l.after(-x),new B(g,4-v,0));let M=-1;n.doc.nodesBetween(C,n.doc.content.size,(z,H)=>{if(M>-1)return!1;z.isTextblock&&z.content.size===0&&(M=H+1)}),M>-1&&n.setSelection(V.near(n.doc.resolve(M))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...Pc(f,d.type.name,d.attrs),...t},m={...Pc(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:a,attrs:h},{type:p,attrs:m}]:[{type:a,attrs:h}];if(!tn(n.doc,l.pos,2))return!1;if(r){let{selection:g,storedMarks:v}=i,{splittableMarks:x}=o.extensionManager,k=v||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!k||!r)return!0;let E=k.filter(C=>x.includes(C.type.name));n.ensureMarks(E)}return!0},a0=(e,t)=>{let n=Zc(s=>s.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(i===void 0)return!0;let r=e.doc.nodeAt(i);return n.node.type===r?.type&&mn(e.doc,n.pos)&&e.join(n.pos),!0},l0=(e,t)=>{let n=Zc(s=>s.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(n.start).after(n.depth);if(i===void 0)return!0;let r=e.doc.nodeAt(i);return n.node.type===r?.type&&mn(e.doc,i)&&e.join(i),!0};function mU(e){let t=e.doc,n=t.firstChild;if(!n)return null;let i=t.resolve(1),r=t.resolve(n.nodeSize-1);return V.between(i,r)}var gU=(e,t,n,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=r.extensionManager,p=nt(e,s.schema),h=nt(t,s.schema),{selection:m,storedMarks:b}=s,{$from:g,$to:v}=m,x=g.blockRange(v),k=b||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;let E=Zc(Ie=>s0(Ie.type.name,d))(m),C=m.from===0&&m.to===s.doc.content.size,M=s.doc.content.content,z=M.length===1?M[0]:null,H=C&&z&&s0(z.type.name,d)?{node:z,pos:0,depth:0}:null,ce=E??H,Ze=!!E&&x.depth>=1&&x.depth-E.depth<=1,Fe=!!H;if((Ze||Fe)&&ce){if(ce.node.type===p)return C&&Fe?l().command(({tr:Ie,dispatch:ve})=>{let Y=mU(Ie);return Y?(Ie.setSelection(Y),ve&&ve(Ie),!0):!1}).liftListItem(h).run():u.liftListItem(h);if(s0(ce.node.type.name,d)&&p.validContent(ce.node.content))return l().command(()=>(o.setNodeMarkup(ce.pos,p),!0)).command(()=>a0(o,p)).command(()=>l0(o,p)).run()}return!n||!k||!a?l().command(()=>c().wrapInList(p,i)?!0:u.clearNodes()).wrapInList(p,i).command(()=>a0(o,p)).command(()=>l0(o,p)).run():l().command(()=>{let Ie=c().wrapInList(p,i),ve=k.filter(Y=>f.includes(Y.type.name));return o.ensureMarks(ve),Ie?!0:u.clearNodes()}).wrapInList(p,i).command(()=>a0(o,p)).command(()=>l0(o,p)).run()},bU=(e,t={},n={})=>({state:i,commands:r})=>{let{extendEmptyMarkRange:o=!1}=n,s=pr(e,i.schema);return c0(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},vU=(e,t,n={})=>({state:i,commands:r})=>{let o=nt(e,i.schema),s=nt(t,i.schema),a=Ln(i,o,n),l;return i.selection.$anchor.sameParent(i.selection.$head)&&(l=i.selection.$anchor.parent.attrs),a?r.setNode(s,l):r.setNode(o,{...l,...n})},yU=(e,t={})=>({state:n,commands:i})=>{let r=nt(e,n.schema);return Ln(n,r,t)?i.lift(r):i.wrapIn(r,t)},xU=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let i=0;i<n.length;i+=1){let r=n[i],o;if(r.spec.isInputRules&&(o=r.getState(e))){if(t){let s=e.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},kU=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:i,ranges:r}=n;return i||t&&r.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},_U=(e,t={})=>({tr:n,state:i,dispatch:r})=>{var o;let{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=pr(e,i.schema),{$from:u,empty:c,ranges:d}=a;if(!r)return!0;if(c&&s){let{from:f,to:p}=a,h=(o=u.marks().find(b=>b.type===l))==null?void 0:o.attrs,m=p0(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},wU=e=>({tr:t,state:n,dispatch:i})=>{let{selection:r}=n,o,s;return typeof e=="number"?(o=e,s=e):e&&"from"in e&&"to"in e?(o=e.from,s=e.to):(o=r.from,s=r.to),i&&t.doc.nodesBetween(o,s,(a,l)=>{if(a.isText)return;let u={...a.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},SU=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=jc(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=nt(e,i.schema)),a==="mark"&&(s=pr(e,i.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?i.doc.nodesBetween(c,d,(b,g)=>{o&&o===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b)}):i.doc.nodesBetween(c,d,(b,g)=>{g<c&&o&&o===b.type&&(l=!0,h=Math.max(g,c),m=Math.min(g+b.nodeSize,d),f=g,p=b),g>=c&&g<=d&&(o&&o===b.type&&(l=!0,r&&n.setNodeMarkup(g,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(v=>{if(s===v.type&&(l=!0,r)){let x=Math.max(g,c),k=Math.min(g+b.nodeSize,d);n.addMark(x,k,s.create({...v.attrs,...t}))}}))}),p&&(f!==void 0&&r&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&r&&n.addMark(h,m,s.create({...b.attrs,...t}))}))}),l},EU=(e,t={})=>({state:n,dispatch:i})=>{let r=nt(e,n.schema);return RT(r,t)(n,i)},$U=(e,t={})=>({state:n,dispatch:i})=>{let r=nt(e,n.schema);return PT(r,t)(n,i)},CU=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(i=>i.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(i=>i!==t):delete this.callbacks[e]),this}once(e,t){let n=(...i)=>{this.off(e,n),t.apply(this,i)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Wc=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},TU=(e,t)=>{if(f0(t))return t.exec(e);let n=t(e);if(!n)return null;let i=[n.text];return i.index=n.index,i.input=e,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i};function Dc(e){var t;let{editor:n,from:i,to:r,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(i);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=tU(u)+o;return s.forEach(f=>{if(c)return;let p=TU(d,f.find);if(!p)return;let h=l.state.tr,m=Bc({state:l.state,transaction:h}),b={from:i-(p[0].length-o.length),to:r},{commands:g,chain:v,can:x}=new Uc({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:v,can:x})===null||!h.steps.length||(f.undoable&&h.setMeta(a,{transform:h,from:i,to:r,text:o}),l.dispatch(h),c=!0)}),c}function IU(e){let{editor:t,rules:n}=e,i=new Q({state:{init(){return null},apply(r,o,s){let a=r.getMeta(i);if(a)return a;let l=r.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=Ao(N.from(c),s.schema);let{from:d}=l,f=d+c.length;Dc({editor:t,from:d,to:f,text:c,rules:n,plugin:i})}),r.selectionSet||r.docChanged?null:o}},props:{handleTextInput(r,o,s,a){return Dc({editor:t,from:o,to:s,text:a,rules:n,plugin:i})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{let{$cursor:o}=r.state.selection;o&&Dc({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:i})}),!1)},handleKeyDown(r,o){if(o.key!=="Enter")return!1;let{$cursor:s}=r.state.selection;return s?Dc({editor:t,from:s.pos,to:s.pos,text:`
`,rules:n,plugin:i}):!1}},isInputRules:!0});return i}function AU(e){return Object.prototype.toString.call(e).slice(8,-1)}function Oc(e){return AU(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function EA(e,t){let n={...e};return Oc(e)&&Oc(t)&&Object.keys(t).forEach(i=>{Oc(t[i])&&Oc(e[i])?n[i]=EA(e[i],t[i]):n[i]=t[i]}),n}var y0=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Te(K(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Te(K(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>EA(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},dt=class $A extends y0{constructor(){super(...arguments),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new $A(n)}static handleExit({editor:t,mark:n}){let{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){let s=r.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;let l=s.find(u=>u?.type.name===n.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function zU(e){return typeof e=="number"}var MU=class{constructor(e){this.find=e.find,this.handler=e.handler}},NU=(e,t,n)=>{if(f0(t))return[...e.matchAll(t)];let i=t(e,n);return i?i.map(r=>{let o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function DU(e){let{editor:t,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:c}=new Uc({editor:t,state:n}),d=[];return n.doc.nodesBetween(i,r,(p,h)=>{var m,b,g,v,x;if((b=(m=p.type)==null?void 0:m.spec)!=null&&b.code||!(p.isText||p.isTextblock||p.isInline))return;let k=(x=(v=(g=p.content)==null?void 0:g.size)!=null?v:p.nodeSize)!=null?x:0,E=Math.max(i,h),C=Math.min(r,h+k);if(E>=C)return;let M=p.isText?p.text||"":p.textBetween(E-h,C-h,void 0,"\uFFFC");NU(M,o.find,s).forEach(H=>{if(H.index===void 0)return;let ce=E+H.index+1,Ze=ce+H[0].length,Fe={from:n.tr.mapping.map(ce),to:n.tr.mapping.map(Ze)},Ie=o.handler({state:n,range:Fe,match:H,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(Ie)})}),d.every(p=>p!==null)}var Rc=null,OU=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function RU(e){let{editor:t,rules:n}=e,i=null,r=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=Bc({state:c,transaction:m});if(!(!DU({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new Q({view(d){let f=h=>{var m;i=(m=d.dom.parentElement)!=null&&m.contains(h.target)?d.dom.parentElement:null,i&&(Rc=t)},p=()=>{Rc&&(Rc=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(o=i===d.dom.parentElement,a=f,!o){let p=Rc;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return s=f,r=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!r,b=h.getMeta("uiEvent")==="drop"&&!o,g=h.getMeta("applyPasteRules"),v=!!g;if(!m&&!b&&!v)return;if(v){let{text:E}=g;typeof E=="string"?E=E:E=Ao(N.from(E),p.schema);let{from:C}=g,M=C+E.length,z=OU(E);return l({rule:c,state:p,from:C,to:{b:M},pasteEvt:z})}let x=f.doc.content.findDiffStart(p.doc.content),k=f.doc.content.findDiffEnd(p.doc.content);if(!(!zU(x)||!k||x===k.b))return l({rule:c,state:p,from:x,to:k,pasteEvt:s})}}))}var Vc=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=bA(e),this.schema=KB(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:ka(t.name,this.schema)},i=K(t,"addCommands",n);return i?{...e,...i()}:e},{})}get plugins(){let{editor:e}=this;return wa([...this.extensions].reverse()).flatMap(i=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:ka(i.name,this.schema)},o=[],s=K(i,"addKeyboardShortcuts",r),a={};if(i.type==="mark"&&K(i,"exitable",r)&&(a.ArrowRight=()=>dt.handleExit({editor:e,mark:i})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));a={...a,...f}}let l=XI(a);o.push(l);let u=K(i,"addInputRules",r);if(oA(i,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=IU({editor:e,rules:f}),h=Array.isArray(p)?p:[p];o.push(...h)}}let c=K(i,"addPasteRules",r);if(oA(i,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=RU({editor:e,rules:f});o.push(...p)}}let d=K(i,"addProseMirrorPlugins",r);if(d){let f=d();o.push(...f)}return o})}get attributes(){return gA(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=To(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addNodeView")).map(n=>{let i=this.attributes.filter(l=>l.type===n.name),r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:nt(n.name,this.schema)},o=K(n,"addNodeView",r);if(!o)return[];let s=o();if(!s)return[];let a=(l,u,c,d,f)=>{let p=Io(l,i);return s({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:n,HTMLAttributes:p})};return[n.name,a]}))}dispatchTransaction(e){let{editor:t}=this;return wa([...this.extensions].reverse()).reduceRight((i,r)=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ka(r.name,this.schema)},s=K(r,"dispatchTransaction",o);return s?a=>{s.call(o,{transaction:a,next:i})}:i},e)}transformPastedHTML(e){let{editor:t}=this;return wa([...this.extensions]).reduce((i,r)=>{let o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ka(r.name,this.schema)},s=K(r,"transformPastedHTML",o);return s?(a,l)=>{let u=i(a,l);return s.call(o,u)}:i},e||(i=>i))}get markViews(){let{editor:e}=this,{markExtensions:t}=To(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addMarkView")).map(n=>{let i=this.attributes.filter(a=>a.type===n.name),r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:pr(n.name,this.schema)},o=K(n,"addMarkView",r);if(!o)return[];let s=(a,l,u)=>{let c=Io(a,i);return o()({mark:a,view:l,inline:u,editor:e,extension:n,HTMLAttributes:c,updateAttributes:d=>{VU(a,e,d)}})};return[n.name,s]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;let i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:ka(t.name,this.schema)};t.type==="mark"&&((n=Te(K(t,"keepOnSplit",i)))==null||n)&&this.splittableMarks.push(t.name);let r=K(t,"onBeforeCreate",i),o=K(t,"onCreate",i),s=K(t,"onUpdate",i),a=K(t,"onSelectionUpdate",i),l=K(t,"onTransaction",i),u=K(t,"onFocus",i),c=K(t,"onBlur",i),d=K(t,"onDestroy",i);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};Vc.resolve=bA;Vc.sort=wa;Vc.flatten=g0;var x0={};d0(x0,{ClipboardTextSerializer:()=>TA,Commands:()=>IA,Delete:()=>AA,Drop:()=>zA,Editable:()=>MA,FocusEvents:()=>DA,Keymap:()=>OA,Paste:()=>RA,Tabindex:()=>PA,TextDirection:()=>LA,focusEventsPluginKey:()=>NA});var be=class CA extends y0{constructor(){super(...arguments),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new CA(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},TA=be.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Q({key:new de("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:i,selection:r}=t,{ranges:o}=r,s=Math.min(...o.map(c=>c.$from.pos)),a=Math.max(...o.map(c=>c.$to.pos)),l=yA(n);return vA(i,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),IA=be.create({name:"commands",addCommands(){return{...aA}}}),AA=be.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,i,r;let o=()=>{var s,a,l,u;if((u=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,e))!=null?u:e.getMeta("y-sync$"))return;let c=h0(e.before,[e,...t]);v0(c).forEach(p=>{c.mapping.mapResult(p.oldRange.from).deletedAfter&&c.mapping.mapResult(p.oldRange.to).deletedBefore&&c.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{let b=m+h.nodeSize-2,g=p.oldRange.from<=m&&b<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:b,newFrom:c.mapping.map(m),newTo:c.mapping.map(b),deletedRange:p.oldRange,newRange:p.newRange,partial:!g,editor:this.editor,transaction:e,combinedTransform:c})})});let f=c.mapping;c.steps.forEach((p,h)=>{var m,b;if(p instanceof sr){let g=f.slice(h).map(p.from,-1),v=f.slice(h).map(p.to),x=f.invert().map(g,-1),k=f.invert().map(v),E=g>0?(m=c.doc.nodeAt(g-1))==null?void 0:m.marks.some(M=>M.eq(p.mark)):!1,C=(b=c.doc.nodeAt(v))==null?void 0:b.marks.some(M=>M.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:k},newRange:{from:g,to:v},partial:!!(C||E),editor:this.editor,transaction:e,combinedTransform:c})}})};(r=(i=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:i.async)==null||r?setTimeout(o,0):o()}}),zA=be.create({name:"drop",addProseMirrorPlugins(){return[new Q({key:new de("tiptapDrop"),props:{handleDrop:(e,t,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:i})}}})]}}),MA=be.create({name:"editable",addProseMirrorPlugins(){return[new Q({key:new de("editable"),props:{editable:()=>this.editor.options.editable}})]}}),NA=new de("focusEvents"),DA=be.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new Q({key:NA,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let i=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,n)=>{e.isFocused=!1;let i=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),OA=be.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{let{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:G.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Fc()||fA()?o:r},addProseMirrorPlugins(){return[new Q({key:new de("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let i=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),r=e.some(m=>m.getMeta("preventClearDocument"));if(!i||r)return;let{empty:o,from:s,to:a}=t.selection,l=G.atStart(t.doc).from,u=G.atEnd(t.doc).to;if(o||!(s===l&&a===u)||!Ea(n.doc))return;let f=n.tr,p=Bc({state:n,transaction:f}),{commands:h}=new Uc({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),RA=be.create({name:"paste",addProseMirrorPlugins(){return[new Q({key:new de("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),PA=be.create({name:"tabindex",addProseMirrorPlugins(){return[new Q({key:new de("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),LA=be.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=To(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new Q({key:new de("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),PU=class _a{constructor(t,n,i=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=t,this.editor=n,this.currentNode=r}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,i=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:n,to:i},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new _a(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new _a(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new _a(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,i)=>{let r=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+i+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(a);if(!r&&!s&&l.depth<=this.depth)return;let u=new _a(l,this.editor,r,r||s?n:null);r&&(u.actualDepth=this.depth+1),t.push(u)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let i=null,r=this.parent;for(;r&&!i;){if(r.node.type.name===t)if(Object.keys(n).length>0){let o=r.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){let l=s[a];if(o[l]!==n[l])break}}else i=r;r=r.parent}return i}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},i=!1){let r=[];if(!this.children||this.children.length===0)return r;let o=Object.keys(n);return this.children.forEach(s=>{i&&r.length>0||(s.node.type.name===t&&o.every(l=>n[l]===s.node.attrs[l])&&r.push(s),!(i&&r.length>0)&&(r=r.concat(s.querySelectorAll(t,n,i))))}),r}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},LU=`.ProseMirror {
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}`;function FU(e,t,n){let i=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(i!==null)return i;let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}var FA=class extends CU{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:i})=>{throw i},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:rU,createMappablePosition:iU},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:i,slice:r,moved:o})=>this.options.onDrop(i,r,o)),this.on("paste",({event:i,slice:r})=>this.options.onPaste(i,r)),this.on("delete",this.options.onDelete);let t=this.createDoc(),n=cA(t,this.options.autofocus);this.editorState=bc.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=FU(LU,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=mA(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(r=>{let o=typeof r=="string"?`${r}$`:r.key;n=n.filter(s=>!s.key.startsWith(o))}),t.length===n.length)return;let i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,t;let i=[...this.options.enableCoreExtensions?[MA,TA.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),IA,DA,OA,PA,zA,RA,AA,LA.configure({direction:this.options.textDirection})].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Vc(i,this)}createCommandManager(){this.commandManager=new Uc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=u0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=u0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,i=t.dispatchTransaction||this.dispatchTransaction.bind(this),r=n?this.extensionManager.dispatchTransaction(i):i,o=t.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new ba(e,{...t,attributes:{role:"textbox",...t?.attributes},dispatchTransaction:r,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();let l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),i=!this.state.selection.eq(t.selection),r=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!r)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),a=s?.getMeta("focus"),l=s?.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||o.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return b0(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return nU(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ao(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
`,textSerializers:n={}}=e||{};return XB(this.state.doc,{blockSeparator:t,textSerializers:{...yA(this.schema),...n}})}get isEmpty(){return Ea(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new PU(t,this)}get $doc(){return this.$pos(0)}};function Fn(e){return new Wc({find:e.find,handler:({state:t,range:n,match:i})=>{let r=Te(e.getAttributes,void 0,i);if(r===!1||r===null)return null;let{tr:o}=t,s=i[i.length-1],a=i[0];if(s){let l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(Hc(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);let f=n.from+l+s.length;o.addMark(n.from+l,f,e.type.create(r||{})),o.removeStoredMark(e.type)}},undoable:e.undoable})}function Jc(e){return new Wc({find:e.find,handler:({state:t,range:n,match:i})=>{let r=Te(e.getAttributes,void 0,i)||{},{tr:o}=t,s=n.from,a=n.to,l=e.type.create(r);if(i[1]){let u=i[0].lastIndexOf(i[1]),c=s+u;c>a?c=a:a=c+i[1].length;let d=i[0][i[0].length-1];o.insertText(d,s+i[0].length-1),o.replaceWith(c,a,l)}else if(i[0]){let u=e.type.isInline?s:s-1;o.insert(u,e.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:e.undoable})}function $a(e){return new Wc({find:e.find,handler:({state:t,range:n,match:i})=>{let r=t.doc.resolve(n.from),o=Te(e.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)},undoable:e.undoable})}function Bn(e){return new Wc({find:e.find,handler:({state:t,range:n,match:i,chain:r})=>{let o=Te(e.getAttributes,void 0,i)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&bo(l,e.type,o);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(d,o).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&mn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,c))&&s.join(n.from-1)},undoable:e.undoable})}var BU=e=>"touches"in e,BA=class{constructor(e){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.clientX-this.startX,u=a.clientY-this.startY;this.handleResize(l,u)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.touches[0];if(!l)return;let u=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(u,c)},this.handleMouseUp=()=>{if(!this.isResizing)return;let a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var t,n,i,r,o,s;this.node=e.node,this.editor=e.editor,this.element=e.element,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,(t=e.options)!=null&&t.min&&(this.minSize={...this.minSize,...e.options.min}),(n=e.options)!=null&&n.max&&(this.maxSize=e.options.max),(i=e?.options)!=null&&i.directions&&(this.directions=e.options.directions),(r=e.options)!=null&&r.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),(o=e.options)!=null&&o.className&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),(s=e.options)!=null&&s.createCustomHandle&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var e;return(e=this.contentElement)!=null?e:null}handleEditorUpdate(){let e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type!==this.node.type?!1:(this.node=e,this.onUpdate?this.onUpdate(e,t,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.name,e.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){let e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){let t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){let n=t.includes("top"),i=t.includes("bottom"),r=t.includes("left"),o=t.includes("right");n&&(e.style.top="0"),i&&(e.style.bottom="0"),r&&(e.style.left="0"),o&&(e.style.right="0"),(t==="top"||t==="bottom")&&(e.style.left="0",e.style.right="0"),(t==="left"||t==="right")&&(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach(e=>{let t;this.createCustomHandle?t=this.createCustomHandle(e):t=this.createHandle(e),t instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener("mousedown",n=>this.handleResizeStart(n,e)),t.addEventListener("touchstart",n=>this.handleResizeStart(n,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){let e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,BU(e)?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight);let n=this.getPos();this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:i,height:r}=this.calculateNewDimensions(this.activeHandle,e,t),o=this.applyConstraints(i,r,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(e,t,n){let i=this.startWidth,r=this.startHeight,o=e.includes("right"),s=e.includes("left"),a=e.includes("bottom"),l=e.includes("top");return o?i=this.startWidth+t:s&&(i=this.startWidth-t),a?r=this.startHeight+n:l&&(r=this.startHeight-n),(e==="right"||e==="left")&&(i=this.startWidth+(o?t:-t)),(e==="top"||e==="bottom")&&(r=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(i,r,e):{width:i,height:r}}applyConstraints(e,t,n){var i,r,o,s;if(!n){let u=Math.max(this.minSize.width,e),c=Math.max(this.minSize.height,t);return(i=this.maxSize)!=null&&i.width&&(u=Math.min(this.maxSize.width,u)),(r=this.maxSize)!=null&&r.height&&(c=Math.min(this.maxSize.height,c)),{width:u,height:c}}let a=e,l=t;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(o=this.maxSize)!=null&&o.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(s=this.maxSize)!=null&&s.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(e,t,n){let i=n==="left"||n==="right",r=n==="top"||n==="bottom";return i?{width:e,height:e/this.aspectRatio}:r?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};function UA(e,t){let{selection:n}=e,{$from:i}=n;if(n instanceof J){let o=i.index();return i.parent.canReplaceWith(o,o+1,t)}let r=i.depth;for(;r>=0;){let o=i.index(r);if(i.node(r).contentMatchAt(o).matchType(t))return!0;r-=1}return!1}var UU={};d0(UU,{createAtomBlockMarkdownSpec:()=>jU,createBlockMarkdownSpec:()=>ZU,createInlineMarkdownSpec:()=>WU,parseAttributes:()=>k0,parseIndentedBlocks:()=>Kc,renderNestedMarkdownContent:()=>Ca,serializeAttributes:()=>_0});function k0(e){if(!e?.trim())return{};let t={},n=[],i=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),r=i.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(r){let u=r.map(c=>c.trim().slice(1));t.class=u.join(" ")}let o=i.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(t.id=o[1]);let s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(i.matchAll(s)).forEach(([,u,c])=>{var d;let f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(t[u]=p.slice(1,-1))});let l=i.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(t[c]=!0)}),t}function _0(e){if(!e||Object.keys(e).length===0)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(i=>t.push(`.${i}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,i])=>{n==="class"||n==="id"||(i===!0?t.push(n):i!==!1&&i!=null&&t.push(`${n}="${String(i)}"`))}),t.join(" ")}function jU(e){let{nodeName:t,name:n,parseAttributes:i=k0,serializeAttributes:r=_0,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:a}=e,l=n||t,u=c=>{if(!a)return c;let d={};return a.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{let f={...o,...c.attributes};return d.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(c){var d;let f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=c.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(c,d,f){let p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=c.match(p);if(!h)return;let m=h[1]||"",b=i(m);if(!s.find(v=>!(v in b)))return{type:t,raw:h[0],attributes:b}}},renderMarkdown:c=>{let d=u(c.attrs||{}),f=r(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function ZU(e){let{nodeName:t,name:n,getContent:i,parseAttributes:r=k0,serializeAttributes:o=_0,defaultAttributes:s={},content:a="block",allowedAttributes:l}=e,u=n||t,c=d=>{if(!l)return d;let f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(i){let m=i(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);let h={...s,...d.attributes};return f.createNode(t,h,p)},markdownTokenizer:{name:t,level:"block",start(d){var f;let p=new RegExp(`^:::${u}`,"m"),h=(f=d.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(d,f,p){var h;let m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=d.match(m);if(!b)return;let[g,v=""]=b,x=r(v),k=1,E=g.length,C="",M=/^:::([\w-]*)(\s.*)?/gm,z=d.slice(E);for(M.lastIndex=0;;){let H=M.exec(z);if(H===null)break;let ce=H.index,Ze=H[1];if(!((h=H[2])!=null&&h.endsWith(":::"))){if(Ze)k+=1;else if(k-=1,k===0){let Fe=z.slice(0,ce);C=Fe.trim();let Ie=d.slice(0,E+ce+H[0].length),ve=[];if(C)if(a==="block")for(ve=p.blockTokens(Fe),ve.forEach(Y=>{Y.text&&(!Y.tokens||Y.tokens.length===0)&&(Y.tokens=p.inlineTokens(Y.text))});ve.length>0;){let Y=ve[ve.length-1];if(Y.type==="paragraph"&&(!Y.text||Y.text.trim()===""))ve.pop();else break}else ve=p.inlineTokens(C);return{type:t,raw:Ie,attributes:x,content:C,tokens:ve}}}}}},renderMarkdown:(d,f)=>{let p=c(d.attrs||{}),h=o(p),m=h?` {${h}}`:"",b=f.renderChildren(d.content||[],`
`);return`:::${u}${m}
${b}
:::`}}}function HU(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,i=n.exec(e);for(;i!==null;){let[,r,o,s]=i;t[r]=o||s,i=n.exec(e)}return t}function qU(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function WU(e){let{nodeName:t,name:n,getContent:i,parseAttributes:r=HU,serializeAttributes:o=qU,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=e,u=n||t,c=f=>{if(!l)return f;let p={};return l.forEach(h=>{let m=typeof h=="string"?h:h.name,b=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){let g=f[m];if(b!==void 0&&g===b)return;p[m]=g}}),p},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{let h={...s,...f.attributes};if(a)return p.createNode(t,h);let m=i?i(f):f.content||"";return m?p.createNode(t,h,[p.createTextNode(m)]):p.createNode(t,h,[])},markdownTokenizer:{name:t,level:"inline",start(f){let p=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),h=f.match(p),m=h?.index;return m!==void 0?m:-1},tokenize(f,p,h){let m=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),b=f.match(m);if(!b)return;let g="",v="";if(a){let[,k]=b;v=k}else{let[,k,E]=b;v=k,g=E||""}let x=r(v.trim());return{type:t,raw:b[0],content:g.trim(),attributes:x}}},renderMarkdown:f=>{let p="";i?p=i(f):f.content&&f.content.length>0&&(p=f.content.filter(g=>g.type==="text").map(g=>g.text).join(""));let h=c(f.attrs||{}),m=o(h),b=m?` ${m}`:"";return a?`[${u}${b}]`:`[${u}${b}]${p}[/${u}]`}}}function Kc(e,t,n){var i,r,o,s;let a=e.split(`
`),l=[],u="",c=0,d=t.baseIndentSize||2;for(;c<a.length;){let f=a[c],p=f.match(t.itemPattern);if(!p){if(l.length>0)break;if(f.trim()===""){c+=1,u=`${u}${f}
`;continue}else return}let h=t.extractItemData(p),{indentLevel:m,mainContent:b}=h;u=`${u}${f}
`;let g=[b];for(c+=1;c<a.length;){let E=a[c];if(E.trim()===""){let M=a.slice(c+1).findIndex(ce=>ce.trim()!=="");if(M===-1)break;if((((r=(i=a[c+1+M].match(/^(\s*)/))==null?void 0:i[1])==null?void 0:r.length)||0)>m){g.push(E),u=`${u}${E}
`,c+=1;continue}else break}if((((s=(o=E.match(/^(\s*)/))==null?void 0:o[1])==null?void 0:s.length)||0)>m)g.push(E),u=`${u}${E}
`,c+=1;else break}let v,x=g.slice(1);if(x.length>0){let E=x.map(C=>C.slice(m+d)).join(`
`);E.trim()&&(t.customNestedParser?v=t.customNestedParser(E):v=n.blockTokens(E))}let k=t.createToken(h,v);l.push(k)}if(l.length!==0)return{items:l,raw:u}}function Ca(e,t,n,i){if(!e||!Array.isArray(e.content))return"";let r=typeof n=="function"?n(i):n,[o,...s]=e.content,a=t.renderChildren([o]),l=`${r}${a}`;return s&&s.length>0&&s.forEach((u,c)=>{var d,f;let p=(f=(d=t.renderChild)==null?void 0:d.call(t,u,c+1))!=null?f:t.renderChildren([u]);if(p!=null){let h=p.split(`
`).map(m=>m?t.indent(m):t.indent("")).join(`
`);l+=u.type==="paragraph"?`
${h}`:`
${h}`}}),l}function VU(e,t,n={}){let{state:i}=t,{doc:r,tr:o}=i,s=e;r.descendants((a,l)=>{let u=o.mapping.map(l),c=o.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});o.removeMark(u,c,e.type),o.addMark(u,c,p)}}),o.docChanged&&t.view.dispatch(o)}var te=class jA extends y0{constructor(){super(...arguments),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new jA(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function xn(e){return new MU({find:e.find,handler:({state:t,range:n,match:i,pasteEvent:r})=>{let o=Te(e.getAttributes,void 0,i,r);if(o===!1||o===null)return null;let{tr:s}=t,a=i[i.length-1],l=i[0],u=n.to;if(a){let c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(Hc(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(g=>g===e.type&&g!==m.mark.type)).filter(m=>m.to>d).length)return null;f<n.to&&s.delete(f,n.to),d>n.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,e.type.create(o||{})),i.index!==void 0&&i.input!==void 0&&i.index+i[0].length>=i.input.length||s.removeStoredMark(e.type)}}})}var zo=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...i}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,i,n]};var JU=/^\s*>\s$/,ZA=te.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return zo("blockquote",{...ae(this.options.HTMLAttributes,e),children:zo("slot",{})})},parseMarkdown:(e,t)=>{var n;let i=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,i(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",i=[];return e.content.forEach((r,o)=>{var s,a;let c=((a=(s=t.renderChild)==null?void 0:s.call(t,r,o))!=null?a:t.renderChildren([r])).split(`
`).map(d=>d.trim()===""?n:`${n} ${d}`);i.push(c.join(`
`))}),i.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Bn({find:JU,type:this.type})]}});var KU=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,GU=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,XU=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,YU=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,HA=dt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return zo("strong",{...ae(this.options.HTMLAttributes,e),children:zo("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Fn({find:KU,type:this.type}),Fn({find:XU,type:this.type})]},addPasteRules(){return[xn({find:GU,type:this.type}),xn({find:YU,type:this.type})]}});var QU=/(^|[^`])`([^`]+)`(?!`)$/,ej=/(^|[^`])`([^`]+)`(?!`)/g,qA=dt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",ae(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Fn({find:QU,type:this.type})]},addPasteRules(){return[xn({find:ej,type:this.type})]}});var w0=4,tj=/^```([a-z]+)?[\s\n]$/,nj=/^~~~([a-z]+)?[\s\n]$/,WA=te.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:w0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let o=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",ae(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,i;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&((i=e.raw)==null?void 0:i.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let i="",r=((n=e.attrs)==null?void 0:n.language)||"";return e.content?i=[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
`):i=`\`\`\`${r}
\`\`\``,i},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:w0,{state:i}=e,{selection:r}=i,{$from:o,empty:s}=r;if(o.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:l})=>{let{from:u,to:c}=r,p=i.doc.textBetween(u,c,`
`,`
`).split(`
`).map(h=>a+h).join(`
`);return l.replaceWith(u,c,i.schema.text(p)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:w0,{state:i}=e,{selection:r}=i,{$from:o,empty:s}=r;return o.parent.type!==this.type?!1:s?e.commands.command(({tr:a})=>{var l;let{pos:u}=o,c=o.start(),d=o.end(),p=i.doc.textBetween(c,d,`
`,`
`).split(`
`),h=0,m=0,b=u-c;for(let C=0;C<p.length;C+=1){if(m+p[C].length>=b){h=C;break}m+=p[C].length+1}let v=((l=p[h].match(/^ */))==null?void 0:l[0])||"",x=Math.min(v.length,n);if(x===0)return!0;let k=c;for(let C=0;C<h;C+=1)k+=p[C].length+1;return a.delete(k,k+x),u-k<=x&&a.setSelection(V.create(a.doc,k)),!0}):e.commands.command(({tr:a})=>{let{from:l,to:u}=r,f=i.doc.textBetween(l,u,`
`,`
`).split(`
`).map(p=>{var h;let m=((h=p.match(/^ */))==null?void 0:h[0])||"",b=Math.min(m.length,n);return p.slice(b)}).join(`
`);return a.replaceWith(l,u,i.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;let o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith(`
`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type||!(r.parentOffset===r.parent.nodeSize-2))return!1;let a=r.after();return a===void 0?!1:i.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(G.near(i.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[$a({find:tj,type:this.type,getAttributes:e=>({language:e[1]})}),$a({find:nj,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Q({key:new de("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=r?.mode;if(!n||!o)return!1;let{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(V.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});var VA=te.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):""});var JA=te.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",ae(this.options.HTMLAttributes,e)]},renderText(){return`
`},renderMarkdown:()=>`
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:r,storedMarks:o}=n;if(r.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){let d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var KA=te.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,ae(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let i=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,r="#".repeat(i);return e.content?`${r} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>$a({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var GA=te.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",ae(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!UA(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,r=e();return qc(n)?r.insertContentAt(i.pos,{type:this.name}):r.insertContent({type:this.name}),r.command(({state:o,tr:s,dispatch:a})=>{if(a){let{$to:l}=s.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(V.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection(J.create(s.doc,l.pos)):s.setSelection(V.create(s.doc,l.pos));else{let c=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(V.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Jc({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var rj=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,ij=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,oj=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,sj=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,XA=dt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",ae(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Fn({find:rj,type:this.type}),Fn({find:oj,type:this.type})]},addPasteRules(){return[xn({find:ij,type:this.type}),xn({find:sj,type:this.type})]}});var aj="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",lj="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",A0="numeric",z0="ascii",M0="alpha",Aa="asciinumeric",Ia="alphanumeric",N0="domain",i6="emoji",uj="scheme",cj="slashscheme",S0="whitespace";function dj(e,t){return e in t||(t[e]=[]),t[e]}function $i(e,t,n){t[A0]&&(t[Aa]=!0,t[Ia]=!0),t[z0]&&(t[Aa]=!0,t[M0]=!0),t[Aa]&&(t[Ia]=!0),t[M0]&&(t[Ia]=!0),t[Ia]&&(t[N0]=!0),t[i6]&&(t[N0]=!0);for(let i in t){let r=dj(i,n);r.indexOf(e)<0&&r.push(e)}}function fj(e,t){let n={};for(let i in t)t[i].indexOf(e)>=0&&(n[i]=!0);return n}function Xt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Xt.groups={};Xt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let i=0;i<t.jr.length;i++){let r=t.jr[i][0],o=t.jr[i][1];if(o&&r.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,i){for(let r=0;r<e.length;r++)this.tt(e[r],t,n,i)},tr(e,t,n,i){i=i||Xt.groups;let r;return t&&t.j?r=t:(r=new Xt(t),n&&i&&$i(t,n,i)),this.jr.push([e,r]),r},ts(e,t,n,i){let r=this,o=e.length;if(!o)return r;for(let s=0;s<o-1;s++)r=r.tt(e[s]);return r.tt(e[o-1],t,n,i)},tt(e,t,n,i){i=i||Xt.groups;let r=this;if(t&&t.j)return r.j[e]=t,t;let o=t,s,a=r.go(e);if(a?(s=new Xt,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Xt,o){if(i)if(s.t&&typeof s.t=="string"){let l=Object.assign(fj(s.t,i),n);$i(o,l,i)}else n&&$i(o,n,i);s.t=o}return r.j[e]=s,s}};var me=(e,t,n,i,r)=>e.ta(t,n,i,r),rt=(e,t,n,i,r)=>e.tr(t,n,i,r),YA=(e,t,n,i,r)=>e.ts(t,n,i,r),P=(e,t,n,i,r)=>e.tt(t,n,i,r),gr="WORD",D0="UWORD",o6="ASCIINUMERICAL",s6="ALPHANUMERICAL",Ra="LOCALHOST",O0="TLD",R0="UTLD",Qc="SCHEME",Mo="SLASH_SCHEME",L0="NUM",P0="WS",F0="NL",za="OPENBRACE",Ma="CLOSEBRACE",ed="OPENBRACKET",td="CLOSEBRACKET",nd="OPENPAREN",rd="CLOSEPAREN",id="OPENANGLEBRACKET",od="CLOSEANGLEBRACKET",sd="FULLWIDTHLEFTPAREN",ad="FULLWIDTHRIGHTPAREN",ld="LEFTCORNERBRACKET",ud="RIGHTCORNERBRACKET",cd="LEFTWHITECORNERBRACKET",dd="RIGHTWHITECORNERBRACKET",fd="FULLWIDTHLESSTHAN",pd="FULLWIDTHGREATERTHAN",hd="AMPERSAND",md="APOSTROPHE",gd="ASTERISK",jr="AT",bd="BACKSLASH",vd="BACKTICK",yd="CARET",Zr="COLON",B0="COMMA",xd="DOLLAR",Un="DOT",kd="EQUALS",U0="EXCLAMATION",_n="HYPHEN",Na="PERCENT",_d="PIPE",wd="PLUS",Sd="POUND",Da="QUERY",j0="QUOTE",a6="FULLWIDTHMIDDLEDOT",Z0="SEMI",jn="SLASH",Oa="TILDE",Ed="UNDERSCORE",l6="EMOJI",$d="SYM",u6=Object.freeze({__proto__:null,ALPHANUMERICAL:s6,AMPERSAND:hd,APOSTROPHE:md,ASCIINUMERICAL:o6,ASTERISK:gd,AT:jr,BACKSLASH:bd,BACKTICK:vd,CARET:yd,CLOSEANGLEBRACKET:od,CLOSEBRACE:Ma,CLOSEBRACKET:td,CLOSEPAREN:rd,COLON:Zr,COMMA:B0,DOLLAR:xd,DOT:Un,EMOJI:l6,EQUALS:kd,EXCLAMATION:U0,FULLWIDTHGREATERTHAN:pd,FULLWIDTHLEFTPAREN:sd,FULLWIDTHLESSTHAN:fd,FULLWIDTHMIDDLEDOT:a6,FULLWIDTHRIGHTPAREN:ad,HYPHEN:_n,LEFTCORNERBRACKET:ld,LEFTWHITECORNERBRACKET:cd,LOCALHOST:Ra,NL:F0,NUM:L0,OPENANGLEBRACKET:id,OPENBRACE:za,OPENBRACKET:ed,OPENPAREN:nd,PERCENT:Na,PIPE:_d,PLUS:wd,POUND:Sd,QUERY:Da,QUOTE:j0,RIGHTCORNERBRACKET:ud,RIGHTWHITECORNERBRACKET:dd,SCHEME:Qc,SEMI:Z0,SLASH:jn,SLASH_SCHEME:Mo,SYM:$d,TILDE:Oa,TLD:O0,UNDERSCORE:Ed,UTLD:R0,UWORD:D0,WORD:gr,WS:P0}),hr=/[a-z]/,Ta=/\p{L}/u,E0=/\p{Emoji}/u;var mr=/\d/,$0=/\s/;var QA="\r",C0=`
`,pj="\uFE0F",hj="\u200D",T0="\uFFFC",Gc=null,Xc=null;function mj(e=[]){let t={};Xt.groups=t;let n=new Xt;Gc==null&&(Gc=e6(aj)),Xc==null&&(Xc=e6(lj)),P(n,"'",md),P(n,"{",za),P(n,"}",Ma),P(n,"[",ed),P(n,"]",td),P(n,"(",nd),P(n,")",rd),P(n,"<",id),P(n,">",od),P(n,"\uFF08",sd),P(n,"\uFF09",ad),P(n,"\u300C",ld),P(n,"\u300D",ud),P(n,"\u300E",cd),P(n,"\u300F",dd),P(n,"\uFF1C",fd),P(n,"\uFF1E",pd),P(n,"&",hd),P(n,"*",gd),P(n,"@",jr),P(n,"`",vd),P(n,"^",yd),P(n,":",Zr),P(n,",",B0),P(n,"$",xd),P(n,".",Un),P(n,"=",kd),P(n,"!",U0),P(n,"-",_n),P(n,"%",Na),P(n,"|",_d),P(n,"+",wd),P(n,"#",Sd),P(n,"?",Da),P(n,'"',j0),P(n,"/",jn),P(n,";",Z0),P(n,"~",Oa),P(n,"_",Ed),P(n,"\\",bd),P(n,"\u30FB",a6);let i=rt(n,mr,L0,{[A0]:!0});rt(i,mr,i);let r=rt(i,hr,o6,{[Aa]:!0}),o=rt(i,Ta,s6,{[Ia]:!0}),s=rt(n,hr,gr,{[z0]:!0});rt(s,mr,r),rt(s,hr,s),rt(r,mr,r),rt(r,hr,r);let a=rt(n,Ta,D0,{[M0]:!0});rt(a,hr),rt(a,mr,o),rt(a,Ta,a),rt(o,mr,o),rt(o,hr),rt(o,Ta,o);let l=P(n,C0,F0,{[S0]:!0}),u=P(n,QA,P0,{[S0]:!0}),c=rt(n,$0,P0,{[S0]:!0});P(n,T0,c),P(u,C0,l),P(u,T0,c),rt(u,$0,c),P(c,QA),P(c,C0),rt(c,$0,c),P(c,T0,c);let d=rt(n,E0,l6,{[i6]:!0});P(d,"#"),rt(d,E0,d),P(d,pj,d);let f=P(d,hj);P(f,"#"),rt(f,E0,d);let p=[[hr,s],[mr,r]],h=[[hr,null],[Ta,a],[mr,o]];for(let m=0;m<Gc.length;m++)Ur(n,Gc[m],O0,gr,p);for(let m=0;m<Xc.length;m++)Ur(n,Xc[m],R0,D0,h);$i(O0,{tld:!0,ascii:!0},t),$i(R0,{utld:!0,alpha:!0},t),Ur(n,"file",Qc,gr,p),Ur(n,"mailto",Qc,gr,p),Ur(n,"http",Mo,gr,p),Ur(n,"https",Mo,gr,p),Ur(n,"ftp",Mo,gr,p),Ur(n,"ftps",Mo,gr,p),$i(Qc,{scheme:!0,ascii:!0},t),$i(Mo,{slashscheme:!0,ascii:!0},t),e=e.sort((m,b)=>m[0]>b[0]?1:-1);for(let m=0;m<e.length;m++){let b=e[m][0],v=e[m][1]?{[uj]:!0}:{[cj]:!0};b.indexOf("-")>=0?v[N0]=!0:hr.test(b)?mr.test(b)?v[Aa]=!0:v[z0]=!0:v[A0]=!0,YA(n,b,b,v)}return YA(n,"localhost",Ra,{ascii:!0}),n.jd=new Xt($d),{start:n,tokens:Object.assign({groups:t},u6)}}function c6(e,t){let n=gj(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=n.length,r=[],o=0,s=0;for(;s<i;){let a=e,l=null,u=0,c=null,d=-1,f=-1;for(;s<i&&(l=a.go(n[s]));)a=l,a.accepts()?(d=0,f=0,c=a):d>=0&&(d+=n[s].length,f++),u+=n[s].length,o+=n[s].length,s++;o-=d,s-=f,u-=d,r.push({t:c.t,v:t.slice(o-u,o),s:o-u,e:o})}return r}function gj(e){let t=[],n=e.length,i=0;for(;i<n;){let r=e.charCodeAt(i),o,s=r<55296||r>56319||i+1===n||(o=e.charCodeAt(i+1))<56320||o>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}function Ur(e,t,n,i,r){let o,s=t.length;for(let a=0;a<s-1;a++){let l=t[a];e.j[l]?o=e.j[l]:(o=new Xt(i),o.jr=r.slice(),e.j[l]=o),e=o}return o=new Xt(n),o.jr=r.slice(),e.j[t[s-1]]=o,o}function e6(e){let t=[],n=[],i=0,r="0123456789";for(;i<e.length;){let o=0;for(;r.indexOf(e[i+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(i,i+o),10);s>0;s--)n.pop();i+=o}else n.push(e[i]),i++}return t}var Pa={defaultProtocol:"http",events:null,format:t6,formatHref:t6,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function H0(e,t=null){let n=Object.assign({},Pa);e&&(n=Object.assign(n,e instanceof H0?e.o:e));let i=n.ignoreTags,r=[];for(let o=0;o<i.length;o++)r.push(i[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=r}H0.prototype={o:Pa,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let i=t!=null,r=this.o[e];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:Pa[e],typeof r=="function"&&i&&(r=r(t,n))):typeof r=="function"&&i&&(r=r(t,n.t,n)),r)},getObj(e,t,n){let i=this.o[e];return typeof i=="function"&&t!=null&&(i=i(t,n.t,n)),i},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function t6(e){return e}function d6(e,t){this.t="token",this.v=e,this.tk=t}d6.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),i=e.get("format",t,this);return n&&i.length>n?i.substring(0,n)+"\u2026":i},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Pa.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),i=e.get("formatHref",n,this),r=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:r,attributes:s,content:o,eventListeners:d}}};function Cd(e,t){class n extends d6{constructor(r,o){super(r,o),this.t=e}}for(let i in t)n.prototype[i]=t[i];return n.t=e,n}var n6=Cd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),r6=Cd("text"),bj=Cd("nl"),Yc=Cd("url",{isLink:!0,toHref(e=Pa.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ra&&e[1].t===Zr}});var kn=e=>new Xt(e);function vj({groups:e}){let t=e.domain.concat([hd,gd,jr,bd,vd,yd,xd,kd,_n,L0,Na,_d,wd,Sd,jn,$d,Oa,Ed]),n=[md,Zr,B0,Un,U0,Na,Da,j0,Z0,id,od,za,Ma,td,ed,nd,rd,sd,ad,ld,ud,cd,dd,fd,pd],i=[hd,md,gd,bd,vd,yd,xd,kd,_n,za,Ma,Na,_d,wd,Sd,Da,jn,$d,Oa,Ed],r=kn(),o=P(r,Oa);me(o,i,o),me(o,e.domain,o);let s=kn(),a=kn(),l=kn();me(r,e.domain,s),me(r,e.scheme,a),me(r,e.slashscheme,l),me(s,i,o),me(s,e.domain,s);let u=P(s,jr);P(o,jr,u),P(a,jr,u),P(l,jr,u);let c=P(o,Un);me(c,i,o),me(c,e.domain,o);let d=kn();me(u,e.domain,d),me(d,e.domain,d);let f=P(d,Un);me(f,e.domain,d);let p=kn(n6);me(f,e.tld,p),me(f,e.utld,p),P(u,Ra,p);let h=P(d,_n);P(h,_n,h),me(h,e.domain,d),me(p,e.domain,d),P(p,Un,f),P(p,_n,h);let m=P(p,Zr);me(m,e.numeric,n6);let b=P(s,_n),g=P(s,Un);P(b,_n,b),me(b,e.domain,s),me(g,i,o),me(g,e.domain,s);let v=kn(Yc);me(g,e.tld,v),me(g,e.utld,v),me(v,e.domain,s),me(v,i,o),P(v,Un,g),P(v,_n,b),P(v,jr,u);let x=P(v,Zr),k=kn(Yc);me(x,e.numeric,k);let E=kn(Yc),C=kn();me(E,t,E),me(E,n,C),me(C,t,E),me(C,n,C),P(v,jn,E),P(k,jn,E);let M=P(a,Zr),z=P(l,Zr),H=P(z,jn),ce=P(H,jn);me(a,e.domain,s),P(a,Un,g),P(a,_n,b),me(l,e.domain,s),P(l,Un,g),P(l,_n,b),me(M,e.domain,E),P(M,jn,E),P(M,Da,E),me(ce,e.domain,E),me(ce,t,E),P(ce,jn,E);let Ze=[[za,Ma],[ed,td],[nd,rd],[id,od],[sd,ad],[ld,ud],[cd,dd],[fd,pd]];for(let Fe=0;Fe<Ze.length;Fe++){let[Ie,ve]=Ze[Fe],Y=P(E,Ie);P(C,Ie,Y),P(Y,ve,E);let A=kn(Yc);me(Y,t,A);let Z=kn();me(Y,n),me(A,t,A),me(A,n,Z),me(Z,t,A),me(Z,n,Z),P(A,ve,E),P(Z,ve,E)}return P(r,Ra,v),P(r,F0,bj),{start:r,tokens:u6}}function yj(e,t,n){let i=n.length,r=0,o=[],s=[];for(;r<i;){let a=e,l=null,u=null,c=0,d=null,f=-1;for(;r<i&&!(l=a.go(n[r].t));)s.push(n[r++]);for(;r<i&&(u=l||a.go(n[r].t));)l=null,a=u,a.accepts()?(f=0,d=a):f>=0&&f++,r++,c++;if(f<0)r-=c,r<i&&(s.push(n[r]),r++);else{s.length>0&&(o.push(I0(r6,t,s)),s=[]),r-=f,c-=f;let p=d.t,h=n.slice(r-c,r);o.push(I0(p,t,h))}}return s.length>0&&o.push(I0(r6,t,s)),o}function I0(e,t,n){let i=n[0].s,r=n[n.length-1].e,o=t.slice(i,r);return new e(o,n)}var xj=typeof console<"u"&&console&&console.warn||(()=>{}),kj="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",We={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function f6(){return Xt.groups={},We.scanner=null,We.parser=null,We.tokenQueue=[],We.pluginQueue=[],We.customSchemes=[],We.initialized=!1,We}function q0(e,t=!1){if(We.initialized&&xj(`linkifyjs: already initialized - will not register custom scheme "${e}" ${kj}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);We.customSchemes.push([e,t])}function _j(){We.scanner=mj(We.customSchemes);for(let e=0;e<We.tokenQueue.length;e++)We.tokenQueue[e][1]({scanner:We.scanner});We.parser=vj(We.scanner.tokens);for(let e=0;e<We.pluginQueue.length;e++)We.pluginQueue[e][1]({scanner:We.scanner,parser:We.parser});return We.initialized=!0,We}function Td(e){return We.initialized||_j(),yj(We.parser.start,e,c6(We.scanner.start,e))}Td.scan=c6;function Id(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let i=new H0(n),r=Td(e),o=[];for(let s=0;s<r.length;s++){let a=r[s];a.isLink&&(!t||a.t===t)&&i.check(a)&&o.push(a.toFormattedObject(i))}return o}var W0="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",wj=new RegExp(W0),Sj=new RegExp(`${W0}$`),Ej=new RegExp(W0,"g");function $j(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function Cj(e){return new Q({key:new de("autolink"),appendTransaction:(t,n,i)=>{let r=t.some(u=>u.docChanged)&&!n.doc.eq(i.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;let{tr:s}=i,a=h0(n.doc,[...t]);if(v0(a).forEach(({newRange:u})=>{let c=hA(i.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=i.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=i.doc.textBetween(u.from,u.to," "," ");if(!Sj.test(p))return;d=c[0],f=i.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(wj).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=Td(h).map(g=>g.toObject(e.defaultProtocol));if(!$j(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>i.schema.marks.code?!i.doc.rangeHasMark(g.from,g.to,i.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{Hc(g.from,g.to,i.doc).some(v=>v.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function Tj(e){return new Q({key:new de("handleClickLink"),props:{handleClick:(t,n,i)=>{var r,o;if(i.button!==0||!t.editable)return!1;let s=null;if(i.target instanceof HTMLAnchorElement)s=i.target;else{let l=i.target;if(!l)return!1;let u=e.editor.view.dom;s=l.closest("a"),s&&!u.contains(s)&&(s=null)}if(!s)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let l=b0(t.state,e.type.name),u=(r=s.href)!=null?r:l.href,c=(o=s.target)!=null?o:l.target;u&&(window.open(u,c),a=!0)}return a}}})}function Ij(e){return new Q({key:new de("handlePasteLink"),props:{handlePaste:(t,n,i)=>{let{shouldAutoLink:r}=e,{state:o}=t,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";i.content.forEach(c=>{l+=c.textContent});let u=Id(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||r!==void 0&&!r(u.value)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function Ci(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(i=>{let r=typeof i=="string"?i:i.scheme;r&&n.push(r)}),!e||e.replace(Ej,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var p6=dt.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){q0(e);return}q0(e.scheme,e.optionalSlashes)})},onDestroy(){f6()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Ci(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Ci(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Ci(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ae(this.options.HTMLAttributes,e),0]:["a",ae(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,i,r,o;let s=(i=(n=e.attrs)==null?void 0:n.href)!=null?i:"",a=(o=(r=e.attrs)==null?void 0:r.title)!=null?o:"",l=t.renderChildren(e);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!Ci(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:i=>!!Ci(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[xn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:i}=this.options,r=Id(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!Ci(s,n),protocols:n,defaultProtocol:i}));r.length&&r.forEach(o=>{this.options.shouldAutoLink(o.value)&&t.push({text:o.value,data:{href:o.href},index:o.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Cj({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!Ci(r,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Tj({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Ij({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var Aj=Object.defineProperty,zj=(e,t)=>{for(var n in t)Aj(e,n,{get:t[n],enumerable:!0})},Mj="listItem",h6="textStyle",m6=/^\s*([-+*])\s$/,K0=te.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",ae(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Mj,this.editor.getAttributes(h6)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Bn({find:m6,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Bn({find:m6,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(h6),editor:this.editor})),[e]}}),G0=te.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",ae(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];let i=(n=t.parseBlockChildren)!=null?n:t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(s=>s.type==="paragraph"))r=i(e.tokens);else{let s=e.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(r=[{type:"paragraph",content:t.parseInline(s.tokens)}],e.tokens.length>1){let l=e.tokens.slice(1),u=i(l);r.push(...u)}}else r=i(e.tokens)}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(e,t,n)=>Ca(e,t,i=>{var r,o;return i.parentType==="bulletList"?"- ":i.parentType==="orderedList"?`${(((o=(r=i.meta)==null?void 0:r.parentAttrs)==null?void 0:o.start)||1)+i.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Nj={};zj(Nj,{findListItemPos:()=>La,getNextListDepth:()=>X0,handleBackspace:()=>V0,handleDelete:()=>J0,hasListBefore:()=>y6,hasListItemAfter:()=>Dj,hasListItemBefore:()=>x6,listItemHasSubList:()=>k6,nextListIsDeeper:()=>_6,nextListIsHigher:()=>w6});var La=(e,t)=>{let{$from:n}=t.selection,i=nt(e,t.schema),r=null,o=n.depth,s=n.pos,a=null;for(;o>0&&a===null;)r=n.node(o),r.type===i?a=o:(o-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},X0=(e,t)=>{let n=La(e,t);if(!n)return!1;let[,i]=xA(t,e,n.$pos.pos+4);return i},y6=(e,t,n)=>{let{$anchor:i}=e.selection,r=Math.max(0,i.pos-2),o=e.doc.resolve(r).node();return!(!o||!n.includes(o.type.name))},x6=(e,t)=>{var n;let{$anchor:i}=t.selection,r=t.doc.resolve(i.pos-2);return!(r.index()===0||((n=r.nodeBefore)==null?void 0:n.type.name)!==e)},k6=(e,t,n)=>{if(!n)return!1;let i=nt(e,t.schema),r=!1;return n.descendants(o=>{o.type===i&&(r=!0)}),r},V0=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Ln(e.state,t)&&y6(e.state,t,n)){let{$anchor:a}=e.state.selection,l=e.state.doc.resolve(a.before()-1),u=[];l.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});let c=u.at(-1);if(!c)return!1;let d=e.state.doc.resolve(l.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!Ln(e.state,t)||!_A(e.state))return!1;let i=La(t,e.state);if(!i)return!1;let o=e.state.doc.resolve(i.$pos.pos-2).node(i.depth),s=k6(t,e.state,o);return x6(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},_6=(e,t)=>{let n=X0(e,t),i=La(e,t);return!i||!n?!1:n>i.depth},w6=(e,t)=>{let n=X0(e,t),i=La(e,t);return!i||!n?!1:n<i.depth},J0=(e,t)=>{if(!Ln(e.state,t)||!kA(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:r}=n;return!n.empty&&i.sameParent(r)?!1:_6(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():w6(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},Dj=(e,t)=>{var n;let{$anchor:i}=t.selection,r=t.doc.resolve(i.pos-i.parentOffset-2);return!(r.index()===r.parent.childCount-1||((n=r.nodeAfter)==null?void 0:n.type.name)!==e)},Y0=be.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&J0(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&J0(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{e.state.schema.nodes[n]!==void 0&&V0(e,n,i)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{e.state.schema.nodes[n]!==void 0&&V0(e,n,i)&&(t=!0)}),t}}}}),g6=/^(\s*)(\d+)\.\s+(.*)$/,Oj=/^\s/;function Rj(e){let t=[],n=0,i=0;for(;n<e.length;){let r=e[n],o=r.match(g6);if(!o)break;let[,s,a,l]=o,u=s.length,c=l,d=n+1,f=[r];for(;d<e.length;){let p=e[d];if(p.match(g6))break;if(p.trim()==="")f.push(p),c+=`
`,d+=1;else if(p.match(Oj))f.push(p),c+=`
${p.slice(u+2)}`,d+=1;else break}t.push({indent:u,number:parseInt(a,10),content:c.trim(),raw:f.join(`
`)}),i=d,n=d}return[t,i]}function S6(e,t,n){var i;let r=[],o=0;for(;o<e.length;){let s=e[o];if(s.indent===t){let a=s.content.split(`
`),l=((i=a[0])==null?void 0:i.trim())||"",u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.slice(1).join(`
`).trim();if(c){let p=n.blockTokens(c);u.push(...p)}let d=o+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let p=Math.min(...f.map(m=>m.indent)),h=S6(f,p,n);u.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(`
`)})}r.push({type:"list_item",raw:s.raw,tokens:u}),o=d}else o+=1}return r}function Pj(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let i=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(r=>{if(r.type==="paragraph"||r.type==="list"||r.type==="blockquote"||r.type==="code")i.push(...t.parseChildren([r]));else if(r.type==="text"&&r.tokens){let o=t.parseChildren([r]);i.push({type:"paragraph",content:o})}else{let o=t.parseChildren([r]);o.length>0&&i.push(...o)}}),{type:"listItem",content:i}})}var Lj="listItem",b6="textStyle",v6=/^(\d+)\.\s$/,Q0=te.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",ae(this.options.HTMLAttributes,n),0]:["ol",ae(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,i=e.items?Pj(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:i}:{type:"orderedList",content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var i;let r=e.split(`
`),[o,s]=Rj(r);if(o.length===0)return;let a=S6(o,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((i=o[0])==null?void 0:i.number)||1,items:a,raw:r.slice(0,s).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Lj,this.editor.getAttributes(b6)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Bn({find:v6,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Bn({find:v6,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(b6)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),Fj=/^\s*(\[([( |x])?\])\s$/,Bj=te.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",ae(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let i=t.parseChildren(e.nestedTokens);n.push(...i)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let r=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return Ca(e,t,r)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let r=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=d=>{var f,p;a.ariaLabel=((p=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:p.call(f,d,a.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};u(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:f}=d.target;i.isEditable&&typeof n=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{let h=n();if(typeof h!="number")return!1;let m=p.doc.nodeAt(h);return p.setNodeMarkup(h,void 0,{...m?.attrs,checked:f}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{r.setAttribute(d,f)}),r.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,s),r.append(o,l),Object.entries(t).forEach(([d,f])=>{r.setAttribute(d,f)});let c=new Set(Object.keys(t));return{dom:r,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;r.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,u(d);let f=i.extensionManager.attributes,p=Io(d,f),h=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return c.forEach(b=>{h.has(b)||(b in m?r.setAttribute(b,m[b]):r.removeAttribute(b))}),Object.entries(p).forEach(([b,g])=>{g==null?b in m?r.setAttribute(b,m[b]):r.removeAttribute(b):r.setAttribute(b,g)}),c=h,!0}}}},addInputRules(){return[Bn({find:Fj,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Uj=te.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",ae(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let i=o=>{let s=Kc(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:i},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(o)},r=Kc(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,s)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:s}),customNestedParser:i},n);if(r)return{type:"taskList",raw:r.raw,items:r.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),ire=be.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(K0.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(G0.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(Y0.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Q0.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Bj.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Uj.configure(this.options.taskList)),e}});var Ad=" ",eb="\xA0",E6=te.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",ae(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);let i=t.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Ad||n[0].text===Ad||n[0].raw===eb||n[0].text===eb)&&i.length===1&&i[0].type==="text"&&(i[0].text===Ad||i[0].text===eb)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,i)},renderMarkdown:(e,t,n)=>{var i,r;if(!e)return"";let o=Array.isArray(e.content)?e.content:[];if(o.length===0){let s=Array.isArray((i=n?.previousNode)==null?void 0:i.content)?n.previousNode.content:[];return((r=n?.previousNode)==null?void 0:r.type)==="paragraph"&&s.length===0?Ad:""}return t.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var jj=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Zj=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,$6=dt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",ae(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Fn({find:jj,type:this.type})]},addPasteRules(){return[xn({find:Zj,type:this.type})]}});var C6=te.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var T6=dt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",ae(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let o=r[2].trim();return{type:"underline",raw:r[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function I6(e={}){return new Q({view(t){return new tb(t,e)}})}var tb=class{constructor(t,n){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=n.width)!==null&&i!==void 0?i:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,i,r=this.editorView.dom,o=r.getBoundingClientRect(),s=o.width/r.offsetWidth,a=o.height/r.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*a;i={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!i){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;i={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(i.left-u)/s+"px",this.element.style.top=(i.top-c)/a+"px",this.element.style.width=(i.right-i.left)/s+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=i&&i.type.spec.disableDropCursor,o=typeof r=="function"?r(this.editorView,n,t):r;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=hc(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var Pt=class e extends G{constructor(t){super(t,t)}map(t,n){let i=t.resolve(n.map(this.head));return e.valid(i)?new e(i):G.near(i)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new nb(this.anchor)}static valid(t){let n=t.parent;if(n.inlineContent||!Hj(t)||!qj(t))return!1;let i=n.type.spec.allowGapCursor;if(i!=null)return i;let r=n.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,i=!1){e:for(;;){if(!i&&e.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)<a.childCount:t.index(s)>0){o=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;r+=n;let l=t.doc.resolve(r);if(e.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!J.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*n),i=!1;continue e}break}o=s,r+=n;let a=t.doc.resolve(r);if(e.valid(a))return a}return null}}};Pt.prototype.visible=!1;Pt.findFrom=Pt.findGapCursorFrom;G.jsonID("gapcursor",Pt);var nb=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Pt.valid(n)?new Pt(n):G.near(n)}};function A6(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Hj(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(n==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||A6(r.type))return!0;if(r.inlineContent)return!1}}return!0}function qj(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||A6(r.type))return!0;if(r.inlineContent)return!1}}return!0}function z6(){return new Q({props:{decorations:Kj,createSelectionBetween(e,t,n){return t.pos==n.pos&&Pt.valid(n)?new Pt(n):null},handleClick:Vj,handleKeyDown:Wj,handleDOMEvents:{beforeinput:Jj}}})}var Wj=xa({ArrowLeft:zd("horiz",-1),ArrowRight:zd("horiz",1),ArrowUp:zd("vert",-1),ArrowDown:zd("vert",1)});function zd(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof V){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let u=Pt.findGapCursorFrom(a,t,l);return u?(r&&r(i.tr.setSelection(new Pt(u))),!0):!1}}function Vj(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!Pt.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&J.isSelectable(e.state.doc.nodeAt(r.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Pt(i))),!0)}function Jj(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Pt))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=N.empty;for(let s=i.length-1;s>=0;s--)r=N.from(i[s].createAndFill(null,r));let o=e.state.tr.replace(n.pos,n.pos,new B(r,0,0));return o.setSelection(V.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Kj(e){if(!(e.selection instanceof Pt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",qe.create(e.doc,[ut.widget(e.selection.head,t,{key:"gapcursor"})])}var Md=200,Tt=function(){};Tt.prototype.append=function(t){return t.length?(t=Tt.from(t),!this.length&&t||t.length<Md&&this.leafAppend(t)||this.length<Md&&t.leafPrepend(this)||this.appendInner(t)):this};Tt.prototype.prepend=function(t){return t.length?Tt.from(t).append(this):this};Tt.prototype.appendInner=function(t){return new Gj(this,t)};Tt.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Tt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Tt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Tt.prototype.forEach=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(t,n,i,0):this.forEachInvertedInner(t,n,i,0)};Tt.prototype.map=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},n,i),r};Tt.from=function(t){return t instanceof Tt?t:t&&t.length?new M6(t):Tt.empty};var M6=(function(e){function t(i){e.call(this),this.values=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l<s;l++)if(r(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,s,a){for(var l=o-1;l>=s;l--)if(r(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=Md)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Md)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(Tt);Tt.empty=new M6([]);var Gj=(function(e){function t(n,i){e.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},t.prototype.forEachInner=function(i,r,o,s){var a=this.left.length;if(r<a&&this.left.forEachInner(i,r,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(i,Math.min(r,a),o,s)===!1)return!1},t.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var o=this.left.length;return r<=o?this.left.slice(i,r):i>=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t})(Tt),rb=Tt;var Xj=500,Ii=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,o;n&&(r=this.remapping(i,this.items.length),o=r.maps.length);let s=t.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(i,f+1),o=r.maps.length),o--,c.push(d);return}if(r){c.push(new Zn(d.map));let p=d.step.map(r.slice(o)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new Zn(h,void 0,void 0,u.length+c.length))),o--,h&&r.appendMap(h,o)}else s.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(o)):d.selection,l=new e(this.items.slice(0,i).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new Zn(t.mapping.maps[c],d,n),p;(p=l&&l.merge(f))&&(f=p,c?o.pop():a=a.slice(0,a.length-1)),o.push(f),n&&(s++,n=void 0),r||(l=f)}let u=s-i.depth;return u>Qj&&(a=Yj(a,u),s-=u),new e(a.append(o),s)}remapping(t,n){let i=new sa;return this.items.forEach((r,o)=>{let s=r.mirrorOffset!=null&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,s)},t,n),i}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new Zn(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},r);let l=n;this.items.forEach(f=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=o.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(o.slice(l+1,p));b&&a++,i.push(new Zn(h,m,b))}else i.push(new Zn(h))},r);let u=[];for(let f=n;f<s;f++)u.push(new Zn(o.maps[f]));let c=this.items.slice(0,r).append(u).append(i),d=new e(c,a);return d.emptyItemCount()>Xj&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),i=n.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(i)),u=l&&l.getMap();if(i--,u&&n.appendMap(u,i),l){let c=s.selection&&s.selection.map(n.slice(i));c&&o++;let d=new Zn(u.invert(),l,c),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else s.map&&i--},this.items.length,0),new e(rb.from(r.reverse()),o)}};Ii.empty=new Ii(rb.empty,0);function Yj(e,t){let n;return e.forEach((i,r)=>{if(i.selection&&t--==0)return n=r,!1}),e.slice(n)}var Zn=class e{constructor(t,n,i,r){this.map=t,this.step=n,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Hn=class{constructor(t,n,i,r,o){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}},Qj=20;function eZ(e,t,n,i){let r=n.getMeta(Ti),o;if(r)return r.historyState;n.getMeta(rZ)&&(e=new Hn(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Ti))return s.getMeta(Ti).redo?new Hn(e.done.addTransform(n,void 0,i,Nd(t)),e.undone,N6(n.mapping.maps),e.prevTime,e.prevComposition):new Hn(e.done,e.undone.addTransform(n,void 0,i,Nd(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-i.newGroupDelay||!tZ(n,e.prevRanges)),u=s?ib(e.prevRanges,n.mapping):N6(n.mapping.maps);return new Hn(e.done.addTransform(n,l?t.selection.getBookmark():void 0,i,Nd(t)),Ii.empty,u,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Hn(e.done.rebased(n,o),e.undone.rebased(n,o),ib(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Hn(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),ib(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function tZ(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((i,r)=>{for(let o=0;o<t.length;o+=2)i<=t[o+1]&&r>=t[o]&&(n=!0)}),n}function N6(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((i,r,o,s)=>t.push(o,s));return t}function ib(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),o=t.map(e[i+1],-1);r<=o&&n.push(r,o)}return n}function nZ(e,t,n){let i=Nd(t),r=Ti.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,i);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),r,i),l=new Hn(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Ti,{redo:n,historyState:l})}var ob=!1,D6=null;function Nd(e){let t=e.plugins;if(D6!=t){ob=!1,D6=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){ob=!0;break}}return ob}var Ti=new de("history"),rZ=new de("closeHistory");function O6(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Q({key:Ti,state:{init(){return new Hn(Ii.empty,Ii.empty,null,0,-1)},apply(t,n,i){return eZ(n,i,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let i=n.inputType,r=i=="historyUndo"?sb:i=="historyRedo"?ab:null;return!r||!t.editable?!1:(n.preventDefault(),r(t.state,t.dispatch))}}}})}function Dd(e,t){return(n,i)=>{let r=Ti.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(i){let o=nZ(r,n,e);o&&i(t?o.scrollIntoView():o)}return!0}}var sb=Dd(!1,!0),ab=Dd(!0,!0),Are=Dd(!1,!1),zre=Dd(!0,!1);var Pre=be.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let i=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(i)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Q({key:new de("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;let r=this.options.limit;if(r==null||r===0){e=!0;return}let o=this.storage.characters({node:i.doc});if(o>r){let s=o-r,a=0,l=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);let u=i.tr.deleteRange(a,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{let i=this.options.limit;if(!t.docChanged||i===0||i===null||i===void 0)return!0;let r=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=i||r>i&&o>i&&o<=r)return!0;if(r>i&&o>i&&o>r||!t.getMeta("paste"))return!1;let a=t.selection.$head.pos,l=o-i,u=a-l,c=a;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>i)}})]}}),L6=be.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[I6(this.options)]}}),Zre=be.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Q({key:new de("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return qe.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(r>=u&&r<=u+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,u)=>{if(l.isText||!(r>=u&&r<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(ut.node(u,u+l.nodeSize,{class:this.options.className}))}),qe.create(e,o)}}})]}}),F6=be.create({name:"gapCursor",addProseMirrorPlugins(){return[z6()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Te(K(e,"allowGapCursor",n)))!=null?t:null}}}),R6="placeholder";function iZ(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Kre=be.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:R6,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${iZ(this.options.dataAttribute)}`:`data-${R6}`;return[new Q({key:new de("placeholder"),props:{decorations:({doc:t,selection:n})=>{let i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,o=[];if(!i)return null;let s=this.editor.isEmpty;return t.descendants((a,l)=>{let u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&Ea(a);if(!a.type.isTextblock)return this.options.includeChildren;if((u||!this.options.showOnlyCurrent)&&c){let d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);let f=ut.node(l,l+a.nodeSize,{class:d.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),qe.create(t,o)}}})]}}),Qre=be.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Q({key:new de("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||qc(n.selection)||e.view.dragging?null:qe.create(n.doc,[ut.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}}),oZ="skipTrailingNode";function P6({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var B6=be.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new de(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(n).includes(r.name));return[new Q({key:t,appendTransaction:(r,o,s)=>{let{doc:a,tr:l,schema:u}=s,c=t.getState(s),d=a.content.size,f=u.nodes[n];if(!r.some(p=>p.getMeta(oZ))&&c)return l.insert(d,f.create())},state:{init:(r,o)=>{let s=o.tr.doc.lastChild;return!P6({node:s,types:i})},apply:(r,o)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return o;let s=r.doc.lastChild;return!P6({node:s,types:i})}}})]}}),U6=be.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>sb(e,t),redo:()=>({state:e,dispatch:t})=>ab(e,t)}},addProseMirrorPlugins(){return[O6(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var sZ=be.create({name:"starterKit",addExtensions(){var e,t,n,i;let r=[];return this.options.bold!==!1&&r.push(HA.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(ZA.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(K0.configure(this.options.bulletList)),this.options.code!==!1&&r.push(qA.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(WA.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(VA.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(L6.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(F6.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push(JA.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(KA.configure(this.options.heading)),this.options.undoRedo!==!1&&r.push(U6.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&r.push(GA.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(XA.configure(this.options.italic)),this.options.listItem!==!1&&r.push(G0.configure(this.options.listItem)),this.options.listKeymap!==!1&&r.push(Y0.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&r.push(p6.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&r.push(Q0.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push(E6.configure(this.options.paragraph)),this.options.strike!==!1&&r.push($6.configure(this.options.strike)),this.options.text!==!1&&r.push(C6.configure(this.options.text)),this.options.underline!==!1&&r.push(T6.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&r.push(B6.configure((i=this.options)==null?void 0:i.trailingNode)),r}}),j6=sZ;var aZ=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,lZ=te.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",ae(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,i,r,o,s;let a=(n=(t=e.attrs)==null?void 0:t.src)!=null?n:"",l=(r=(i=e.attrs)==null?void 0:i.alt)!=null?r:"",u=(s=(o=e.attrs)==null?void 0:o.title)!=null?s:"";return u?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:i}=this.options.resize;return({node:r,getPos:o,HTMLAttributes:s,editor:a})=>{let l=document.createElement("img");Object.entries(s).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:l.setAttribute(d,f);break}}),l.src=s.src;let u=new BA({element:l,editor:a,node:r,getPos:o,onResize:(d,f)=>{l.style.width=`${d}px`,l.style.height=`${f}px`},onCommit:(d,f)=>{let p=o();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,p)=>d.type===r.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:i===!0}}),c=u.dom;return c.style.visibility="hidden",c.style.pointerEvents="none",l.onload=()=>{c.style.visibility="",c.style.pointerEvents=""},u}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Jc({find:aZ,type:this.type,getAttributes:e=>{let[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}}),Z6=lZ;var ub,cb;if(typeof WeakMap<"u"){let e=new WeakMap;ub=t=>e.get(t),cb=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;ub=i=>{for(let r=0;r<e.length;r+=2)if(e[r]==i)return e[r+1]},cb=(i,r)=>(n==10&&(n=0),e[n++]=i,e[n++]=r)}var it=class{constructor(e,t,n,i){this.width=e,this.height=t,this.map=n,this.problems=i}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let i=t%this.width,r=t/this.width|0,o=i+1,s=r+1;for(let a=1;o<this.width&&this.map[t+a]==n;a++)o++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:i,top:r,right:o,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:i,right:r,top:o,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?i==0:r==this.width)?null:this.map[o*this.width+(n<0?i-1:r)]:(n<0?o==0:s==this.height)?null:this.map[i+this.width*(n<0?o-1:s)]}rectBetween(e,t){let{left:n,right:i,top:r,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:u}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(r,l),right:Math.max(i,a),bottom:Math.max(o,u)}}cellsInRect(e){let t=[],n={};for(let i=e.top;i<e.bottom;i++)for(let r=e.left;r<e.right;r++){let o=i*this.width+r,s=this.map[o];n[s]||(n[s]=!0,!(r==e.left&&r&&this.map[o-1]==s||i==e.top&&i&&this.map[o-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let i=0,r=0;;i++){let o=r+n.child(i).nodeSize;if(i==e){let s=t+e*this.width,a=(e+1)*this.width;for(;s<a&&this.map[s]<r;)s++;return s==a?o-1:this.map[s]}r=o}}static get(e){return ub(e)||cb(e,uZ(e))}};function uZ(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);let t=cZ(e),n=e.childCount,i=[],r=0,o=null,s=[];for(let u=0,c=t*n;u<c;u++)i[u]=0;for(let u=0,c=0;u<n;u++){let d=e.child(u);c++;for(let h=0;;h++){for(;r<i.length&&i[r]!=0;)r++;if(h==d.childCount)break;let m=d.child(h),{colspan:b,rowspan:g,colwidth:v}=m.attrs;for(let x=0;x<g;x++){if(x+u>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:c,n:g-x});break}let k=r+x*t;for(let E=0;E<b;E++){i[k+E]==0?i[k+E]=c:(o||(o=[])).push({type:"collision",row:u,pos:c,n:b-E});let C=v&&v[E];if(C){let M=(k+E)%t*2,z=s[M];z==null||z!=C&&s[M+1]==1?(s[M]=C,s[M+1]=1):z==C&&s[M+1]++}}}r+=b,c+=m.nodeSize}let f=(u+1)*t,p=0;for(;r<f;)i[r++]==0&&p++;p&&(o||(o=[])).push({type:"missing",row:u,n:p}),c++}(t===0||n===0)&&(o||(o=[])).push({type:"zero_sized"});let a=new it(t,n,i,o),l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(l=!0);return l&&dZ(a,s,e),a}function cZ(e){let t=-1,n=!1;for(let i=0;i<e.childCount;i++){let r=e.child(i),o=0;if(n)for(let s=0;s<i;s++){let a=e.child(s);for(let l=0;l<a.childCount;l++){let u=a.child(l);s+u.attrs.rowspan>i&&(o+=u.attrs.colspan)}}for(let s=0;s<r.childCount;s++){let a=r.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function dZ(e,t,n){e.problems||(e.problems=[]);let i={};for(let r=0;r<e.map.length;r++){let o=e.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null,l=s.attrs;for(let u=0;u<l.colspan;u++){let c=t[(r+u)%e.width*2];c!=null&&(!l.colwidth||l.colwidth[u]!=c)&&((a||(a=fZ(l)))[u]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function fZ(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Lt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let i=e.nodes[n],r=i.spec.tableRole;r&&(t[r]=i)}}return t}var Hr=new de("selectingCells");function Ai(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function pZ(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Cn(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Bd(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Ai(t.$head)||hZ(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function hZ(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function db(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function mZ(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function hb(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Q6(e,t,n){let i=e.node(-1),r=it.get(i),o=e.start(-1),s=r.nextCell(e.pos-o,t,n);return s==null?null:e.node(0).resolve(o+s)}function zi(e,t,n=1){let i={...e,colspan:e.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,n),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function e4(e,t,n=1){let i={...e,colspan:e.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;r<n;r++)i.colwidth.splice(t,0,0)}return i}function gZ(e,t,n){let i=Lt(t.type.schema).header_cell;for(let r=0;r<e.height;r++)if(t.nodeAt(e.map[n+r*e.width]).type!=i)return!1;return!0}var Oe=class br extends G{constructor(t,n=t){let i=t.node(-1),r=it.get(i),o=t.start(-1),s=r.rectBetween(t.pos-o,n.pos-o),a=t.node(0),l=r.cellsInRect(s).filter(c=>c!=n.pos-o);l.unshift(n.pos-o);let u=l.map(c=>{let d=i.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=o+c+1;return new yo(a.resolve(f),a.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let i=t.resolve(n.map(this.$anchorCell.pos)),r=t.resolve(n.map(this.$headCell.pos));if(db(i)&&db(r)&&hb(i,r)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?br.rowSelection(i,r):o&&this.isColSelection()?br.colSelection(i,r):new br(i,r)}return V.between(i,r)}content(){let t=this.$anchorCell.node(-1),n=it.get(t),i=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},s=[];for(let l=r.top;l<r.bottom;l++){let u=[];for(let c=l*n.width+r.left,d=r.left;d<r.right;d++,c++){let f=n.map[c];if(o[f])continue;o[f]=!0;let p=n.findCell(f),h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);let m=r.left-p.left,b=p.right-r.right;if(m>0||b>0){let g=h.attrs;if(m>0&&(g=zi(g,0,m)),b>0&&(g=zi(g,g.colspan-b,b)),p.left<r.left){if(h=h.type.createAndFill(g),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else h=h.type.create(g,h.content)}if(p.top<r.top||p.bottom>r.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?h=h.type.createAndFill(g):h=h.type.create(g,h.content)}u.push(h)}s.push(t.child(l).copy(N.from(u)))}let a=this.isColSelection()&&this.isRowSelection()?t:s;return new B(N.from(a),1,1)}replace(t,n=B.empty){let i=t.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:a,$to:l}=r[s],u=t.mapping.slice(i);t.replace(u.map(a.pos),u.map(l.pos),s?B.empty:n)}let o=G.findFrom(t.doc.resolve(t.mapping.slice(i).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,n){this.replace(t,new B(N.from(n),0,0))}forEachCell(t){let n=this.$anchorCell.node(-1),i=it.get(n),r=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let s=0;s<o.length;s++)t(n.nodeAt(o[s]),r+o[s])}isColSelection(){let t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;let i=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let i=t.node(-1),r=it.get(i),o=t.start(-1),s=r.findCell(t.pos-o),a=r.findCell(n.pos-o),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(o+r.map[s.left])),a.bottom<r.height&&(n=l.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+r.map[a.left])),s.bottom<r.height&&(t=l.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))),new br(t,n)}isRowSelection(){let t=this.$anchorCell.node(-1),n=it.get(t),i=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);if(Math.min(r,o)>0)return!1;let s=r+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof br&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let i=t.node(-1),r=it.get(i),o=t.start(-1),s=r.findCell(t.pos-o),a=r.findCell(n.pos-o),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(o+r.map[s.top*r.width])),a.right<r.width&&(n=l.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+r.map[a.top*r.width])),s.right<r.width&&(t=l.resolve(o+r.map[r.width*(s.top+1)-1]))),new br(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new br(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){return new br(t.resolve(n),t.resolve(i))}getBookmark(){return new bZ(this.$anchorCell.pos,this.$headCell.pos)}};Oe.prototype.visible=!1;G.jsonID("cell",Oe);var bZ=class t4{constructor(t,n){this.anchor=t,this.head=n}map(t){return new t4(t.map(this.anchor),t.map(this.head))}resolve(t){let n=t.resolve(this.anchor),i=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&hb(n,i)?new Oe(n,i):G.near(i,1)}};function vZ(e){if(!(e.selection instanceof Oe))return null;let t=[];return e.selection.forEachCell((n,i)=>{t.push(ut.node(i,i+n.nodeSize,{class:"selectedCell"}))}),qe.create(e.doc,t)}function yZ({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,i=t.pos,r=e.depth;for(;r>=0&&!(e.after(r+1)<e.end(r));r--,n++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,i--);return n==i&&/row|table/.test(e.node(r).type.spec.tableRole)}function xZ({$from:e,$to:t}){let n,i;for(let r=e.depth;r>0;r--){let o=e.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let r=t.depth;r>0;r--){let o=t.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return n!==i&&t.parentOffset===0}function kZ(e,t,n){let i=(t||e).selection,r=(t||e).doc,o,s;if(i instanceof J&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Oe.create(r,i.from);else if(s=="row"){let a=r.resolve(i.from+1);o=Oe.rowSelection(a,a)}else if(!n){let a=it.get(i.node),l=i.from+1,u=l+a.map[a.width*a.height-1];o=Oe.create(r,l+1,u)}}else i instanceof V&&yZ(i)?o=V.create(r,i.from):i instanceof V&&xZ(i)&&(o=V.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var _Z=new de("fix-tables");function n4(e,t,n,i){let r=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){let l=t.child(s);for(let u=a,c=Math.min(r,s+3);u<c;u++)if(e.child(u)==l){a=u+1,n+=l.nodeSize;continue e}i(l,n),a<r&&e.child(a).sameMarkup(l)?n4(e.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function mb(e,t){let n,i=(r,o)=>{r.type.spec.tableRole=="table"&&(n=wZ(e,r,o,n))};return t?t.doc!=e.doc&&n4(t.doc,e.doc,0,i):e.doc.descendants(i),n}function wZ(e,t,n,i){let r=it.get(t);if(!r.problems)return i;i||(i=e.tr);let o=[];for(let l=0;l<r.height;l++)o.push(0);for(let l=0;l<r.problems.length;l++){let u=r.problems[l];if(u.type=="collision"){let c=t.nodeAt(u.pos);if(!c)continue;let d=c.attrs;for(let f=0;f<d.rowspan;f++)o[u.row+f]+=u.n;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,zi(d,d.colspan-u.n,u.n))}else if(u.type=="missing")o[u.row]+=u.n;else if(u.type=="overlong_rowspan"){let c=t.nodeAt(u.pos);if(!c)continue;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){let c=t.nodeAt(u.pos);if(!c)continue;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){let c=i.mapping.map(n);i.delete(c,c+t.nodeSize)}}let s,a;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),a=l);for(let l=0,u=n+1;l<r.height;l++){let c=t.child(l),d=u+c.nodeSize,f=o[l];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b<f;b++){let g=Lt(e.schema)[p].createAndFill();g&&h.push(g)}let m=(l==0||s==l-1)&&a==l?u+1:d-1;i.insert(i.mapping.map(m),h)}u=d}return i.setMeta(_Z,{fixTables:!0})}function qn(e){let t=e.selection,n=Bd(e),i=n.node(-1),r=n.start(-1),o=it.get(i);return{...t instanceof Oe?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(n.pos-r),tableStart:r,map:o,table:i}}function r4(e,{map:t,tableStart:n,table:i},r){let o=r>0?-1:0;gZ(t,i,r+o)&&(o=r==0||r==t.width?null:0);for(let s=0;s<t.height;s++){let a=s*t.width+r;if(r>0&&r<t.width&&t.map[a-1]==t.map[a]){let l=t.map[a],u=i.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,e4(u.attrs,r-t.colCount(l))),s+=u.attrs.rowspan-1}else{let l=o==null?Lt(i.type.schema).cell:i.nodeAt(t.map[a+o]).type,u=t.positionAt(s,r,i);e.insert(e.mapping.map(n+u),l.createAndFill())}}return e}function i4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e);t(r4(e.tr,n,n.left))}return!0}function o4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e);t(r4(e.tr,n,n.right))}return!0}function SZ(e,{map:t,table:n,tableStart:i},r){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let a=s*t.width+r,l=t.map[a],u=n.nodeAt(l),c=u.attrs;if(r>0&&t.map[a-1]==l||r<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(i+l),null,zi(c,r-t.colCount(l)));else{let d=e.mapping.slice(o).map(i+l);e.delete(d,d+u.nodeSize)}s+=c.rowspan}}function s4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e),i=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;SZ(i,n,r),r!=n.left;r--){let o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=it.get(o)}t(i)}return!0}function EZ(e,t,n){var i;let r=Lt(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(((i=t.nodeAt(e.map[o+n*e.width]))===null||i===void 0?void 0:i.type)!=r)return!1;return!0}function a4(e,{map:t,tableStart:n,table:i},r){let o=n;for(let u=0;u<r;u++)o+=i.child(u).nodeSize;let s=[],a=r>0?-1:0;EZ(t,i,r+a)&&(a=r==0||r==t.height?null:0);for(let u=0,c=t.width*r;u<t.width;u++,c++)if(r>0&&r<t.height&&t.map[c]==t.map[c-t.width]){let d=t.map[c],f=i.nodeAt(d).attrs;e.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),u+=f.colspan-1}else{var l;let d=a==null?Lt(i.type.schema).cell:(l=i.nodeAt(t.map[c+a*t.width]))===null||l===void 0?void 0:l.type,f=d?.createAndFill();f&&s.push(f)}return e.insert(o,Lt(i.type.schema).row.create(null,s)),e}function l4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e);t(a4(e.tr,n,n.top))}return!0}function u4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e);t(a4(e.tr,n,n.bottom))}return!0}function $Z(e,{map:t,table:n,tableStart:i},r){let o=0;for(let u=0;u<r;u++)o+=n.child(u).nodeSize;let s=o+n.child(r).nodeSize,a=e.mapping.maps.length;e.delete(o+i,s+i);let l=new Set;for(let u=0,c=r*t.width;u<t.width;u++,c++){let d=t.map[c];if(!l.has(d)){if(l.add(d),r>0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+i),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(r<t.height&&d==t.map[c+t.width]){let f=n.nodeAt(d),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(r+1,u,n);e.insert(e.mapping.slice(a).map(i+m),h),u+=p.colspan-1}}}}function c4(e,t){if(!Cn(e))return!1;if(t){let n=qn(e),i=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;$Z(i,n,r),r!=n.top;r--){let o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=it.get(n.table)}t(i)}return!0}function H6(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function CZ({width:e,height:t,map:n},i){let r=i.top*e+i.left,o=r,s=(i.bottom-1)*e+i.left,a=r+(i.right-i.left-1);for(let l=i.top;l<i.bottom;l++){if(i.left>0&&n[o]==n[o-1]||i.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let l=i.left;l<i.right;l++){if(i.top>0&&n[r]==n[r-e]||i.bottom<t&&n[s]==n[s+e])return!0;r++,s++}return!1}function gb(e,t){let n=e.selection;if(!(n instanceof Oe)||n.$anchorCell.pos==n.$headCell.pos)return!1;let i=qn(e),{map:r}=i;if(CZ(r,i))return!1;if(t){let o=e.tr,s={},a=N.empty,l,u;for(let c=i.top;c<i.bottom;c++)for(let d=i.left;d<i.right;d++){let f=r.map[c*r.width+d],p=i.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,l==null)l=f,u=p;else{H6(p)||(a=a.append(p.content));let h=o.mapping.map(f+i.tableStart);o.delete(h,h+p.nodeSize)}}if(l==null||u==null)return!0;if(o.setNodeMarkup(l+i.tableStart,null,{...e4(u.attrs,u.attrs.colspan,i.right-i.left-u.attrs.colspan),rowspan:i.bottom-i.top}),a.size>0){let c=l+1+u.content.size,d=H6(u)?l+1:c;o.replaceWith(d+i.tableStart,c+i.tableStart,a)}o.setSelection(new Oe(o.doc.resolve(l+i.tableStart))),t(o)}return!0}function bb(e,t){let n=Lt(e.schema);return TZ(({node:i})=>n[i.type.spec.tableRole])(e,t)}function TZ(e){return(t,n)=>{let i=t.selection,r,o;if(i instanceof Oe){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{var s;if(r=pZ(i.$from),!r)return!1;o=(s=Ai(i.$from))===null||s===void 0?void 0:s.pos}if(r==null||o==null||r.attrs.colspan==1&&r.attrs.rowspan==1)return!1;if(n){let a=r.attrs,l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=qn(t),d=t.tr;for(let p=0;p<c.right-c.left;p++)l.push(u?{...a,colwidth:u&&u[p]?[u[p]]:null}:a);let f;for(let p=c.top;p<c.bottom;p++){let h=c.map.positionAt(p,c.left,c.table);p==c.top&&(h+=r.nodeSize);for(let m=c.left,b=0;m<c.right;m++,b++)m==c.left&&p==c.top||d.insert(f=d.mapping.map(h+c.tableStart,1),e({node:r,row:p,col:m}).createAndFill(l[b]))}d.setNodeMarkup(o,e({node:r,row:c.top,col:c.left}),l[0]),i instanceof Oe&&d.setSelection(new Oe(d.doc.resolve(i.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function d4(e,t){return function(n,i){if(!Cn(n))return!1;let r=Bd(n);if(r.nodeAfter.attrs[e]===t)return!1;if(i){let o=n.tr;n.selection instanceof Oe?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[e]:t}),i(o)}return!0}}function IZ(e){return function(t,n){if(!Cn(t))return!1;if(n){let i=Lt(t.schema),r=qn(t),o=t.tr,s=r.map.cellsInRect(e=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:e=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),a=s.map(l=>r.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==i.header_cell&&o.setNodeMarkup(r.tableStart+s[l],i.cell,a[l].attrs);if(o.steps.length===0)for(let l=0;l<s.length;l++)o.setNodeMarkup(r.tableStart+s[l],i.header_cell,a[l].attrs);n(o)}return!0}}function q6(e,t,n){let i=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let r=0;r<i.length;r++){let o=t.table.nodeAt(i[r]);if(o&&o.type!==n.header_cell)return!1}return!0}function No(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?IZ(e):function(n,i){if(!Cn(n))return!1;if(i){let r=Lt(n.schema),o=qn(n),s=n.tr,a=q6("row",o,r),l=q6("column",o,r),u=(e==="column"?a:e==="row"&&l)?1:0,c=e=="column"?{left:0,top:u,right:1,bottom:o.map.height}:e=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,d=e=="column"?l?r.cell:r.header_cell:e=="row"?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach(f=>{let p=f+o.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),i(s)}return!0}}var Aie=No("row",{useDeprecatedLogic:!0}),zie=No("column",{useDeprecatedLogic:!0}),f4=No("cell",{useDeprecatedLogic:!0});function AZ(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let i=e.index(-1)-1,r=e.before();i>=0;i--){let o=e.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let n=e.node(-1);for(let i=e.indexAfter(-1),r=e.after();i<n.childCount;i++){let o=n.child(i);if(o.childCount)return r+1;r+=o.nodeSize}}return null}function vb(e){return function(t,n){if(!Cn(t))return!1;let i=AZ(Bd(t),e);if(i==null)return!1;if(n){let r=t.doc.resolve(i);n(t.tr.setSelection(V.between(r,mZ(r))).scrollIntoView())}return!0}}function p4(e,t){let n=e.selection.$anchor;for(let i=n.depth;i>0;i--)if(n.node(i).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function Od(e,t){let n=e.selection;if(!(n instanceof Oe))return!1;if(t){let i=e.tr,r=Lt(e.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new B(r,0,0))}),i.docChanged&&t(i)}return!0}function zZ(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:i}=e;for(;t.childCount==1&&(n>0&&i>0||t.child(0).type.spec.tableRole=="table");)n--,i--,t=t.child(0).content;let r=t.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if(o=="row")for(let l=0;l<t.childCount;l++){let u=t.child(l).content,c=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,i-1);(c||d)&&(u=fb(Lt(s).row,new B(u,c,d)).content),a.push(u)}else if(o=="cell"||o=="header_cell")a.push(n||i?fb(Lt(s).row,new B(t,n,i)).content:t);else return null;return MZ(s,a)}function MZ(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r];for(let s=o.childCount-1;s>=0;s--){let{rowspan:a,colspan:l}=o.child(s).attrs;for(let u=r;u<r+a;u++)n[u]=(n[u]||0)+l}}let i=0;for(let r=0;r<n.length;r++)i=Math.max(i,n[r]);for(let r=0;r<n.length;r++)if(r>=t.length&&t.push(N.empty),n[r]<i){let o=Lt(e).cell.createAndFill(),s=[];for(let a=n[r];a<i;a++)s.push(o);t[r]=t[r].append(N.from(s))}return{height:t.length,width:i,rows:t}}function fb(e,t){let n=e.createAndFill();return new Nr(n).replace(0,n.content.size,t).doc}function NZ({width:e,height:t,rows:n},i,r){if(e!=i){let o=[],s=[];for(let a=0;a<n.length;a++){let l=n[a],u=[];for(let c=o[a]||0,d=0;c<i;d++){let f=l.child(d%l.childCount);c+f.attrs.colspan>i&&(f=f.type.createChecked(zi(f.attrs,f.attrs.colspan,c+f.attrs.colspan-i),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)o[a+p]=(o[a+p]||0)+f.attrs.colspan}s.push(N.from(u))}n=s,e=i}if(t!=r){let o=[];for(let s=0,a=0;s<r;s++,a++){let l=[],u=n[a%t];for(let c=0;c<u.childCount;c++){let d=u.child(c);s+d.attrs.rowspan>r&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(N.from(l))}n=o,t=r}return{width:e,height:t,rows:n}}function DZ(e,t,n,i,r,o,s){let a=e.doc.type.schema,l=Lt(a),u,c;if(r>t.width)for(let d=0,f=0;d<t.height;d++){let p=n.child(d);f+=p.nodeSize;let h=[],m;p.lastChild==null||p.lastChild.type==l.cell?m=u||(u=l.cell.createAndFill()):m=c||(c=l.header_cell.createAndFill());for(let b=t.width;b<r;b++)h.push(m);e.insert(e.mapping.slice(s).map(f-1+i),h)}if(o>t.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h<Math.max(t.width,r);h++){let b=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,N.from(d)),p=[];for(let h=t.height;h<o;h++)p.push(f);e.insert(e.mapping.slice(s).map(i+n.nodeSize-2),p)}return!!(u||c)}function W6(e,t,n,i,r,o,s,a){if(s==0||s==t.height)return!1;let l=!1;for(let u=r;u<o;u++){let c=s*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;let f=n.nodeAt(d),{top:p,left:h}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+i),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(a).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),u+=f.attrs.colspan-1}}return l}function V6(e,t,n,i,r,o,s,a){if(s==0||s==t.width)return!1;let l=!1;for(let u=r;u<o;u++){let c=u*t.width+s,d=t.map[c];if(t.map[c-1]==d){l=!0;let f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(a).map(d+i);e.setNodeMarkup(h,null,zi(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(zi(f.attrs,0,s-p))),u+=f.attrs.rowspan-1}}return l}function J6(e,t,n,i,r){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw new Error("No table found");let s=it.get(o),{top:a,left:l}=i,u=l+r.width,c=a+r.height,d=e.tr,f=0;function p(){if(o=n?d.doc.nodeAt(n-1):d.doc,!o)throw new Error("No table found");s=it.get(o),f=d.mapping.maps.length}DZ(d,s,o,n,u,c,f)&&p(),W6(d,s,o,n,l,u,a,f)&&p(),W6(d,s,o,n,l,u,c,f)&&p(),V6(d,s,o,n,a,c,l,f)&&p(),V6(d,s,o,n,a,c,u,f)&&p();for(let h=a;h<c;h++){let m=s.positionAt(h,l,o),b=s.positionAt(h,u,o);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(b+n),new B(r.rows[h-a],0,0))}p(),d.setSelection(new Oe(d.doc.resolve(n+s.positionAt(a,l,o)),d.doc.resolve(n+s.positionAt(c-1,u-1,o)))),t(d)}var OZ=xa({ArrowLeft:Rd("horiz",-1),ArrowRight:Rd("horiz",1),ArrowUp:Rd("vert",-1),ArrowDown:Rd("vert",1),"Shift-ArrowLeft":Pd("horiz",-1),"Shift-ArrowRight":Pd("horiz",1),"Shift-ArrowUp":Pd("vert",-1),"Shift-ArrowDown":Pd("vert",1),Backspace:Od,"Mod-Backspace":Od,Delete:Od,"Mod-Delete":Od});function Ld(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Rd(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection;if(o instanceof Oe)return Ld(n,i,G.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;let s=h4(r,e,t);if(s==null)return!1;if(e=="horiz")return Ld(n,i,G.near(n.doc.resolve(o.head+t),t));{let a=n.doc.resolve(s),l=Q6(a,e,t),u;return l?u=G.near(l,1):t<0?u=G.near(n.doc.resolve(a.before(-1)),-1):u=G.near(n.doc.resolve(a.after(-1)),1),Ld(n,i,u)}}}function Pd(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection,s;if(o instanceof Oe)s=o;else{let l=h4(r,e,t);if(l==null)return!1;s=new Oe(n.doc.resolve(l))}let a=Q6(s.$headCell,e,t);return a?Ld(n,i,new Oe(s.$anchorCell,a)):!1}}function RZ(e,t){let n=e.state.doc,i=Ai(n.resolve(t));return i?(e.dispatch(e.state.tr.setSelection(new Oe(i))),!0):!1}function PZ(e,t,n){if(!Cn(e.state))return!1;let i=zZ(n),r=e.state.selection;if(r instanceof Oe){i||(i={width:1,height:1,rows:[N.from(fb(Lt(e.state.schema).cell,n))]});let o=r.$anchorCell.node(-1),s=r.$anchorCell.start(-1),a=it.get(o).rectBetween(r.$anchorCell.pos-s,r.$headCell.pos-s);return i=NZ(i,a.right-a.left,a.bottom-a.top),J6(e.state,e.dispatch,s,a,i),!0}else if(i){let o=Bd(e.state),s=o.start(-1);return J6(e.state,e.dispatch,s,it.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function LZ(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;let i=K6(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof Oe)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&(r=Ai(e.state.selection.$anchor))!=null&&((n=lb(e,t))===null||n===void 0?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,u){let c=lb(e,u),d=Hr.getState(e.state)==null;if(!c||!hb(l,c))if(d)c=l;else return;let f=new Oe(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Hr,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Hr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Hr,-1))}function a(l){let u=l,c=Hr.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(K6(e,u.target)!=i&&(d=lb(e,t),!d))return s();d&&o(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function h4(e,t,n){if(!(e.state.selection instanceof V))return null;let{$head:i}=e.state.selection;for(let r=i.depth-1;r>=0;r--){let o=i.node(r);if((n<0?i.index(r):i.indexAfter(r))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){let s=i.before(r),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function K6(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function lb(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:i,pos:r}=n;return i>=0&&Ai(e.state.doc.resolve(i))||Ai(e.state.doc.resolve(r))}var FZ=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),pb(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,pb(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function pb(e,t,n,i,r,o){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){let{colspan:p,colwidth:h}=u.child(d).attrs;for(let m=0;m<p;m++,f++){let b=r==f?o:h&&h[m],g=b?b+"px":"";if(s+=b||i,b||(a=!1),l)l.style.width!=g&&(l.style.width=g),l=l.nextSibling;else{let v=document.createElement("col");v.style.width=g,t.appendChild(v)}}}for(;l;){var c;let d=l.nextSibling;(c=l.parentNode)===null||c===void 0||c.removeChild(l),l=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var nn=new de("tableColumnResizing");function m4({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:i=FZ,lastColumnResizable:r=!0}={}){let o=new Q({key:nn,state:{init(s,a){var l;let u=(l=o.spec)===null||l===void 0||(l=l.props)===null||l===void 0?void 0:l.nodeViews,c=Lt(a.schema).table.name;return i&&u&&(u[c]=(d,f)=>new i(d,n,f)),new BZ(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{let a=nn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{UZ(s,a,e,r)},mouseleave:s=>{jZ(s)},mousedown:(s,a)=>{ZZ(s,a,t,n)}},decorations:s=>{let a=nn.getState(s);if(a&&a.activeHandle>-1)return JZ(s,a.activeHandle)},nodeViews:{}}});return o}var BZ=class Fd{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,i=t.getMeta(nn);if(i&&i.setHandle!=null)return new Fd(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new Fd(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return db(t.doc.resolve(r))||(r=-1),new Fd(r,n.dragging)}return n}};function UZ(e,t,n,i){if(!e.editable)return;let r=nn.getState(e.state);if(r&&!r.dragging){let o=qZ(t.target),s=-1;if(o){let{left:a,right:l}=o.getBoundingClientRect();t.clientX-a<=n?s=G6(e,t,"left",n):l-t.clientX<=n&&(s=G6(e,t,"right",n))}if(s!=r.activeHandle){if(!i&&s!==-1){let a=e.state.doc.resolve(s),l=a.node(-1),u=it.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}g4(e,s)}}}function jZ(e){if(!e.editable)return;let t=nn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&g4(e,-1)}function ZZ(e,t,n,i){var r;if(!e.editable)return!1;let o=(r=e.dom.ownerDocument.defaultView)!==null&&r!==void 0?r:window,s=nn.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let a=e.state.doc.nodeAt(s.activeHandle),l=HZ(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(nn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);let f=nn.getState(e.state);f?.dragging&&(WZ(e,f.activeHandle,X6(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(nn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=nn.getState(e.state);if(f&&f.dragging){let p=X6(f.dragging,d,n);Y6(e,f.activeHandle,p,i)}}return Y6(e,s.activeHandle,l,i),o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),t.preventDefault(),!0}function HZ(e,t,{colspan:n,colwidth:i}){let r=i&&i[i.length-1];if(r)return r;let o=e.domAtPos(t),s=o.node.childNodes[o.offset].offsetWidth,a=n;if(i)for(let l=0;l<n;l++)i[l]&&(s-=i[l],a--);return s/a}function qZ(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function G6(e,t,n,i){let r=n=="right"?-i:i,o=e.posAtCoords({left:t.clientX+r,top:t.clientY});if(!o)return-1;let{pos:s}=o,a=Ai(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;let l=it.get(a.node(-1)),u=a.start(-1),c=l.map.indexOf(a.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function X6(e,t,n){let i=t.clientX-e.startX;return Math.max(n,e.startWidth+i)}function g4(e,t){e.dispatch(e.state.tr.setMeta(nn,{setHandle:t}))}function WZ(e,t,n){let i=e.state.doc.resolve(t),r=i.node(-1),o=it.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let u=0;u<o.height;u++){let c=u*o.width+a;if(u&&o.map[c]==o.map[c-o.width])continue;let d=o.map[c],f=r.nodeAt(d).attrs,p=f.colspan==1?0:a-o.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;let h=f.colwidth?f.colwidth.slice():VZ(f.colspan);h[p]=n,l.setNodeMarkup(s+d,null,{...f,colwidth:h})}l.docChanged&&e.dispatch(l)}function Y6(e,t,n,i){let r=e.state.doc.resolve(t),o=r.node(-1),s=r.start(-1),a=it.get(o).colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.domAtPos(r.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&pb(o,l.firstChild,l,i,a,n)}function VZ(e){return Array(e).fill(0)}function JZ(e,t){let n=[],i=e.doc.resolve(t),r=i.node(-1);if(!r)return qe.empty;let o=it.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){let c=a+u*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(u==0||o.map[c]!=o.map[c-o.width])){var l;let d=o.map[c],f=s+d+r.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((l=nn.getState(e))===null||l===void 0)&&l.dragging&&n.push(ut.node(s+d,s+d+r.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(ut.widget(f,p))}}return qe.create(e.doc,n)}function b4({allowTableNodeSelection:e=!1}={}){return new Q({key:Hr,state:{init(){return null},apply(t,n){let i=t.getMeta(Hr);if(i!=null)return i==-1?null:i;if(n==null||!t.docChanged)return n;let{deleted:r,pos:o}=t.mapping.mapResult(n);return r?null:o}},props:{decorations:vZ,handleDOMEvents:{mousedown:LZ},createSelectionBetween(t){return Hr.getState(t.state)!=null?t.state.selection:null},handleTripleClick:RZ,handleKeyDown:OZ,handlePaste:PZ},appendTransaction(t,n,i){return kZ(i,mb(i,n),e)}})}function jd(e){return e==="left"||e==="right"||e==="center"?e:null}function KZ(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return jd(t||n)}function GZ(e){return jd(e?.align)}function x4(){return{default:null,parseHTML:e=>KZ(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var Fa=te.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;let i=e.getAttribute("colwidth"),r=i?i.split(",").map(o=>parseInt(o,10)):null;if(!r){let o=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&o&&o[s]){let a=o[s].getAttribute("width");return a?[parseInt(a,10)]:null}}return r}},align:x4()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",ae(this.options.HTMLAttributes,e),0]}}),Ba=te.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(i=>parseInt(i,10)):null}},align:x4()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",ae(this.options.HTMLAttributes,e),0]}}),Ua=te.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",ae(this.options.HTMLAttributes,e),0]}});function yb(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function v4(e,t,n,i,r,o){var s;let a=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let f=0,p=0;f<c.childCount;f+=1){let{colspan:h,colwidth:m}=c.child(f).attrs;for(let b=0;b<h;b+=1,p+=1){let g=r===p?o:m&&m[b],v=g?`${g}px`:"";if(a+=g||i,g||(l=!1),u){if(u.style.width!==v){let[x,k]=yb(i,g);u.style.setProperty(x,k)}u=u.nextSibling}else{let x=document.createElement("col"),[k,E]=yb(i,g);x.style.setProperty(k,E),t.appendChild(x)}}}for(;u;){let f=u.nextSibling;(s=u.parentNode)==null||s.removeChild(u),u=f}let d=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);l&&!d?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var XZ=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),v4(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,v4(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),i=this.contentDOM.contains(t);return!!(n&&!i&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function YZ(e,t,n,i){let r=0,o=!0,s=[],a=e.firstChild;if(!a)return{};for(let d=0,f=0;d<a.childCount;d+=1){let{colspan:p,colwidth:h}=a.child(d).attrs;for(let m=0;m<p;m+=1,f+=1){let b=n===f?i:h&&h[m];r+=b||t,b||(o=!1);let[g,v]=yb(t,b);s.push(["col",{style:`${g}: ${v}`}])}}let l=o?`${r}px`:"",u=o?"":`${r}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function y4(e,t){return t?e.createChecked(null,t):e.createAndFill()}function QZ(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let i=e.nodes[n];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),e.cached.tableNodeTypes=t,t}function e7(e,t,n,i,r){let o=QZ(e),s=[],a=[];for(let u=0;u<n;u+=1){let c=y4(o.cell,r);if(c&&a.push(c),i){let d=y4(o.header_cell,r);d&&s.push(d)}}let l=[];for(let u=0;u<t;u+=1)l.push(o.row.createChecked(null,i&&u===0?s:a));return o.table.createChecked(null,l)}function t7(e){return e instanceof Oe}var Ud=({editor:e})=>{let{selection:t}=e.state;if(!t7(t))return!1;let n=0,i=m0(t.ranges[0].$from,o=>o.type.name==="table");return i?.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},n7="";function r7(e){return(e||"").replace(/\s+/g," ").trim()}function i7(e,t,n={}){var i;let r=(i=n.cellLineSeparator)!=null?i:n7;if(!e||!e.content||e.content.length===0)return"";let o=[];e.content.forEach(m=>{let b=[];m.content&&m.content.forEach(g=>{let v="";g.content&&Array.isArray(g.content)&&g.content.length>1?v=g.content.map(M=>t.renderChildren(M)).join(r):v=g.content?t.renderChildren(g.content):"";let x=r7(v),k=g.type==="tableHeader",E=GZ(g.attrs);b.push({text:x,isHeader:k,align:E})}),o.push(b)});let s=o.reduce((m,b)=>Math.max(m,b.length),0);if(s===0)return"";let a=new Array(s).fill(0);o.forEach(m=>{var b;for(let g=0;g<s;g+=1){let x=(((b=m[g])==null?void 0:b.text)||"").length;x>a[g]&&(a[g]=x),a[g]<3&&(a[g]=3)}});let l=(m,b)=>m+" ".repeat(Math.max(0,b-m.length)),u=o[0],c=u.some(m=>m.isHeader),d=new Array(s).fill(null);o.forEach(m=>{var b;for(let g=0;g<s;g+=1)!d[g]&&((b=m[g])!=null&&b.align)&&(d[g]=m[g].align)});let f=`
`,p=new Array(s).fill(0).map((m,b)=>c&&u[b]&&u[b].text||"");return f+=`| ${p.map((m,b)=>l(m,a[b])).join(" | ")} |
`,f+=`| ${a.map((m,b)=>{let g=Math.max(3,m),v=d[b];return v==="left"?`:${"-".repeat(g)}`:v==="right"?`${"-".repeat(g)}:`:v==="center"?`:${"-".repeat(g)}:`:"-".repeat(g)}).join(" | ")} |
`,(c?o.slice(1):o).forEach(m=>{f+=`| ${new Array(s).fill(0).map((b,g)=>l(m[g]&&m[g].text||"",a[g])).join(" | ")} |
`}),f}var o7=i7,xb=te.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:XZ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:i,tableMinWidth:r}=YZ(e,this.options.cellMinWidth),o=t.style;function s(){return o||(i?`width: ${i}`:`min-width: ${r}`)}let a=["table",ae(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(e,t)=>{let n=[],i=Array.isArray(e.align)?e.align:[];if(e.header){let r=[];e.header.forEach((o,s)=>{var a;let l=jd((a=i[s])!=null?a:o.align),u=l?{align:l}:{};r.push(t.createNode("tableHeader",u,[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach((s,a)=>{var l;let u=jd((l=i[a])!=null?l:s.align),c=u?{align:u}:{};o.push(t.createNode("tableCell",c,[{type:"paragraph",content:t.parseInline(s.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>o7(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:i,dispatch:r,editor:o})=>{let s=e7(o.schema,e,t,n);if(r){let a=i.selection.from+1;i.replaceSelectionWith(s).scrollIntoView().setSelection(V.near(i.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>i4(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>o4(e,t),deleteColumn:()=>({state:e,dispatch:t})=>s4(e,t),addRowBefore:()=>({state:e,dispatch:t})=>l4(e,t),addRowAfter:()=>({state:e,dispatch:t})=>u4(e,t),deleteRow:()=>({state:e,dispatch:t})=>c4(e,t),deleteTable:()=>({state:e,dispatch:t})=>p4(e,t),mergeCells:()=>({state:e,dispatch:t})=>gb(e,t),splitCell:()=>({state:e,dispatch:t})=>bb(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>No("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>No("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>f4(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>gb(e,t)?!0:bb(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:i})=>d4(e,t)(n,i),goToNextCell:()=>({state:e,dispatch:t})=>vb(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>vb(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&mb(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let i=Oe.create(t.doc,e.anchorCell,e.headCell);t.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Ud,"Mod-Backspace":Ud,Delete:Ud,"Mod-Delete":Ud}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[m4({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],b4({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Te(K(e,"tableRole",t))}}}),Wie=be.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(xb.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Fa.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(Ba.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(Ua.configure(this.options.tableRow)),e}});var Ib={};Zi(Ib,{arrayReplaceAt:()=>Tb,assign:()=>Ro,escapeHtml:()=>yr,escapeRE:()=>j7,fromCodePoint:()=>Ha,has:()=>z7,isMdAsciiPunct:()=>Di,isPunctChar:()=>Ni,isSpace:()=>xe,isString:()=>ef,isValidEntityCode:()=>tf,isWhiteSpace:()=>Mi,lib:()=>Z7,normalizeReference:()=>Oi,unescapeAll:()=>vr,unescapeMd:()=>R7});var Vd={};Zi(Vd,{decode:()=>ja,encode:()=>qd,format:()=>Do,parse:()=>Za});var k4={};function s7(e){let t=k4[e];if(t)return t;t=k4[e]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function Zd(e,t){typeof t!="string"&&(t=Zd.defaultChars);let n=s7(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let r="";for(let o=0,s=i.length;o<s;o+=3){let a=parseInt(i.slice(o+1,o+3),16);if(a<128){r+=n[a];continue}if((a&224)===192&&o+3<s){let l=parseInt(i.slice(o+4,o+6),16);if((l&192)===128){let u=a<<6&1984|l&63;u<128?r+="\uFFFD\uFFFD":r+=String.fromCharCode(u),o+=3;continue}}if((a&240)===224&&o+6<s){let l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((l&192)===128&&(u&192)===128){let c=a<<12&61440|l<<6&4032|u&63;c<2048||c>=55296&&c<=57343?r+="\uFFFD\uFFFD\uFFFD":r+=String.fromCharCode(c),o+=6;continue}}if((a&248)===240&&o+9<s){let l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((l&192)===128&&(u&192)===128&&(c&192)===128){let d=a<<18&1835008|l<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?r+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,r+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}r+="\uFFFD"}return r})}Zd.defaultChars=";/?:@&=+$,#";Zd.componentChars="";var ja=Zd;var _4={};function a7(e){let t=_4[e];if(t)return t;t=_4[e]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Hd(e,t,n){typeof t!="string"&&(n=t,t=Hd.defaultChars),typeof n>"u"&&(n=!0);let i=a7(t),r="";for(let o=0,s=e.length;o<s;o++){let a=e.charCodeAt(o);if(n&&a===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){r+=e.slice(o,o+3),o+=2;continue}if(a<128){r+=i[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s){let l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){r+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[o])}return r}Hd.defaultChars=";/?:@&=+$,-_.!~*'()#";Hd.componentChars="-_.!~*'()";var qd=Hd;function Do(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Wd(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var l7=/^([a-z0-9.+-]+:)/i,u7=/:[0-9]*$/,c7=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d7=["<",">",'"',"`"," ","\r",`
`," "],f7=["{","}","|","\\","^","`"].concat(d7),p7=["'"].concat(f7),w4=["%","/","?",";","#"].concat(p7),S4=["/","?","#"],h7=255,E4=/^[+a-z0-9A-Z_-]{0,63}$/,m7=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$4={javascript:!0,"javascript:":!0},C4={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function g7(e,t){if(e&&e instanceof Wd)return e;let n=new Wd;return n.parse(e,t),n}Wd.prototype.parse=function(e,t){let n,i,r,o=e;if(o=o.trim(),!t&&e.split("#").length===1){let u=c7.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=l7.exec(o);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(s&&$4[s])&&(o=o.substr(2),this.slashes=!0)),!$4[s]&&(r||s&&!C4[s])){let u=-1;for(let h=0;h<S4.length;h++)i=o.indexOf(S4[h]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let h=0;h<w4.length;h++)i=o.indexOf(w4[h]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;let f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";let p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){let h=this.hostname.split(/\./);for(let m=0,b=h.length;m<b;m++){let g=h[m];if(g&&!g.match(E4)){let v="";for(let x=0,k=g.length;x<k;x++)g.charCodeAt(x)>127?v+="x":v+=g[x];if(!v.match(E4)){let x=h.slice(0,m),k=h.slice(m+1),E=g.match(m7);E&&(x.push(E[1]),k.unshift(E[2])),k.length&&(o=k.join(".")+o),this.hostname=x.join(".");break}}}}this.hostname.length>h7&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));let l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),C4[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Wd.prototype.parseHost=function(e){let t=u7.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Za=g7;var kb={};Zi(kb,{Any:()=>Jd,Cc:()=>Kd,Cf:()=>T4,P:()=>Oo,S:()=>Gd,Z:()=>Xd});var Jd=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Kd=/[\0-\x1F\x7F-\x9F]/;var T4=/[\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]/;var Oo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/;var Gd=/[\$\+<->\^`\|~\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]/;var Xd=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var I4=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var A4=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var _b,b7=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]]),wb=(_b=String.fromCodePoint)!==null&&_b!==void 0?_b:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Sb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=b7.get(e))!==null&&t!==void 0?t:e}var gt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(gt||(gt={}));var v7=32,qr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qr||(qr={}));function Eb(e){return e>=gt.ZERO&&e<=gt.NINE}function y7(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function x7(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Eb(e)}function k7(e){return e===gt.EQUALS||x7(e)}var mt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(mt||(mt={}));var Wn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Wn||(Wn={}));var Yd=class{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Wn.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|v7)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,r){if(n!==i){let o=i-n;this.result=this.result*Math.pow(r,o)+parseInt(t.substr(n,o),r),this.consumed+=o}}stateNumericHex(t,n){let i=n;for(;n<t.length;){let r=t.charCodeAt(n);if(Eb(r)||y7(r))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){let i=n;for(;n<t.length;){let r=t.charCodeAt(n);if(Eb(r))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gt.SEMI)this.consumed+=1;else if(this.decodeMode===Wn.Strict)return 0;return this.emitCodePoint(Sb(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){let{decodeTree:i}=this,r=i[this.treeIndex],o=(r&qr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){let s=t.charCodeAt(n);if(this.treeIndex=_7(i,r,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Wn.Attribute&&(o===0||k7(s))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],o=(r&qr.VALUE_LENGTH)>>14,o!==0){if(s===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Wn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:i}=this,r=(i[n]&qr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){let{decodeTree:r}=this;return this.emitCodePoint(n===1?r[t]&~qr.VALUE_LENGTH:r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==Wn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}};function z4(e){let t="",n=new Yd(e,i=>t+=wb(i));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){t+=r.slice(s,a),n.startEntity(o);let u=n.write(r,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}let l=t+r.slice(s);return t="",l}}function _7(e,t,n,i){let r=(t&qr.BRANCH_LENGTH)>>7,o=t&qr.JUMP_TABLE;if(r===0)return o!==0&&i===o?n:-1;if(o){let l=i-o;return l<0||l>=r?-1:e[n+l]-1}let s=n,a=s+r-1;for(;s<=a;){let l=s+a>>>1,u=e[l];if(u<i)s=l+1;else if(u>i)a=l-1;else return e[l+r]}return-1}var w7=z4(I4),zoe=z4(A4);function Wr(e,t=Wn.Legacy){return w7(e,t)}function Qd(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var S7=new Map(Qd([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(Qd([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(Qd([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(Qd([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]));var E7=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),$7=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function $b(e,t){return function(i){let r,o=0,s="";for(;r=e.exec(i);)o!==r.index&&(s+=i.substring(o,r.index)),s+=t.get(r[0].charCodeAt(0)),o=r.index+1;return s+i.substring(o)}}var M4=$b(/[&<>'"]/g,E7),N4=$b(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),D4=$b(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var O4;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(O4||(O4={}));var R4;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(R4||(R4={}));function I7(e){return Object.prototype.toString.call(e)}function ef(e){return I7(e)==="[object String]"}var A7=Object.prototype.hasOwnProperty;function z7(e,t){return A7.call(e,t)}function Ro(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(i){e[i]=n[i]})}}),e}function Tb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function tf(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ha(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var F4=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,M7=/&([a-z#][a-z0-9]{1,31});/gi,N7=new RegExp(F4.source+"|"+M7.source,"gi"),D7=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function O7(e,t){if(t.charCodeAt(0)===35&&D7.test(t)){let i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return tf(i)?Ha(i):e}let n=Wr(e);return n!==e?n:e}function R7(e){return e.indexOf("\\")<0?e:e.replace(F4,"$1")}function vr(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(N7,function(t,n,i){return n||O7(t,i)})}var P7=/[&<>"]/,L7=/[&<>"]/g,F7={"&":"&","<":"<",">":">",'"':"""};function B7(e){return F7[e]}function yr(e){return P7.test(e)?e.replace(L7,B7):e}var U7=/[.?*+^$[\]\\(){}|-]/g;function j7(e){return e.replace(U7,"\\$&")}function xe(e){switch(e){case 9:case 32:return!0}return!1}function Mi(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 Ni(e){return Oo.test(e)||Gd.test(e)}function Di(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 Oi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}var Z7={mdurl:Vd,ucmicro:kb};var Nb={};Zi(Nb,{parseLinkDestination:()=>zb,parseLinkLabel:()=>Ab,parseLinkTitle:()=>Mb});function Ab(e,t,n){let i,r,o,s,a=e.posMax,l=e.pos;for(e.pos=t+1,i=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),o===93&&(i--,i===0)){r=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===e.pos-1)i++;else if(n)return e.pos=l,-1}}let u=-1;return r&&(u=e.pos),e.pos=l,u}function zb(e,t,n){let i,r=t,o={ok:!1,pos:0,str:""};if(e.charCodeAt(r)===60){for(r++;r<n;){if(i=e.charCodeAt(r),i===10||i===60)return o;if(i===62)return o.pos=r+1,o.str=vr(e.slice(t+1,r)),o.ok=!0,o;if(i===92&&r+1<n){r+=2;continue}r++}return o}let s=0;for(;r<n&&(i=e.charCodeAt(r),!(i===32||i<32||i===127));){if(i===92&&r+1<n){if(e.charCodeAt(r+1)===32)break;r+=2;continue}if(i===40&&(s++,s>32))return o;if(i===41){if(s===0)break;s--}r++}return t===r||s!==0||(o.str=vr(e.slice(t,r)),o.pos=r,o.ok=!0),o}function Mb(e,t,n,i){let r,o=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)s.str=i.str,s.marker=i.marker;else{if(o>=n)return s;let a=e.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;t++,o++,a===40&&(a=41),s.marker=a}for(;o<n;){if(r=e.charCodeAt(o),r===s.marker)return s.pos=o+1,s.str+=vr(e.slice(t,o)),s.ok=!0,s;if(r===40&&s.marker===41)return s;r===92&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=vr(e.slice(t,o)),s}var Vn={};Vn.code_inline=function(e,t,n,i,r){let o=e[t];return"<code"+r.renderAttrs(o)+">"+yr(o.content)+"</code>"};Vn.code_block=function(e,t,n,i,r){let o=e[t];return"<pre"+r.renderAttrs(o)+"><code>"+yr(e[t].content)+`</code></pre>
`};Vn.fence=function(e,t,n,i,r){let o=e[t],s=o.info?vr(o.info).trim():"",a="",l="";if(s){let c=s.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(o.content,a,l)||yr(o.content):u=yr(o.content),u.indexOf("<pre")===0)return u+`
`;if(s){let c=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[];c<0?d.push(["class",n.langPrefix+a]):(d[c]=d[c].slice(),d[c][1]+=" "+n.langPrefix+a);let f={attrs:d};return`<pre><code${r.renderAttrs(f)}>${u}</code></pre>
`}return`<pre><code${r.renderAttrs(o)}>${u}</code></pre>
`};Vn.image=function(e,t,n,i,r){let o=e[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,n,i),r.renderToken(e,t,n)};Vn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
`:`<br>
`};Vn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`};Vn.text=function(e,t){return yr(e[t].content)};Vn.html_block=function(e,t){return e[t].content};Vn.html_inline=function(e,t){return e[t].content};function Po(){this.rules=Ro({},Vn)}Po.prototype.renderAttrs=function(t){let n,i,r;if(!t.attrs)return"";for(r="",n=0,i=t.attrs.length;n<i;n++)r+=" "+yr(t.attrs[n][0])+'="'+yr(t.attrs[n][1])+'"';return r};Po.prototype.renderToken=function(t,n,i){let r=t[n],o="";if(r.hidden)return"";r.block&&r.nesting!==-1&&n&&t[n-1].hidden&&(o+=`
`),o+=(r.nesting===-1?"</":"<")+r.tag,o+=this.renderAttrs(r),r.nesting===0&&i.xhtmlOut&&(o+=" /");let s=!1;if(r.block&&(s=!0,r.nesting===1&&n+1<t.length)){let a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===r.tag)&&(s=!1)}return o+=s?`>
`:">",o};Po.prototype.renderInline=function(e,t,n){let i="",r=this.rules;for(let o=0,s=e.length;o<s;o++){let a=e[o].type;typeof r[a]<"u"?i+=r[a](e,o,t,n,this):i+=this.renderToken(e,o,t)}return i};Po.prototype.renderInlineAsText=function(e,t,n){let i="";for(let r=0,o=e.length;r<o;r++)switch(e[r].type){case"text":i+=e[r].content;break;case"image":i+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":i+=e[r].content;break;case"softbreak":case"hardbreak":i+=`
`;break;default:}return i};Po.prototype.render=function(e,t,n){let i="",r=this.rules;for(let o=0,s=e.length;o<s;o++){let a=e[o].type;a==="inline"?i+=this.renderInline(e[o].children,t,n):typeof r[a]<"u"?i+=r[a](e,o,t,n,this):i+=this.renderToken(e,o,t,n)}return i};var B4=Po;function Tn(){this.__rules__=[],this.__cache__=null}Tn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Tn.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(i){t.indexOf(i)<0&&t.push(i)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(i){i.enabled&&(n&&i.alt.indexOf(n)<0||e.__cache__[n].push(i.fn))})})};Tn.prototype.at=function(e,t,n){let i=this.__find__(e),r=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=t,this.__rules__[i].alt=r.alt||[],this.__cache__=null};Tn.prototype.before=function(e,t,n,i){let r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Tn.prototype.after=function(e,t,n,i){let r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Tn.prototype.push=function(e,t,n){let i=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null};Tn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(i){let r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,n.push(i)},this),this.__cache__=null,n};Tn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Tn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(i){let r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,n.push(i)},this),this.__cache__=null,n};Tn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var Ri=Tn;function Lo(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}Lo.prototype.attrIndex=function(t){if(!this.attrs)return-1;let n=this.attrs;for(let i=0,r=n.length;i<r;i++)if(n[i][0]===t)return i;return-1};Lo.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Lo.prototype.attrSet=function(t,n){let i=this.attrIndex(t),r=[t,n];i<0?this.attrPush(r):this.attrs[i]=r};Lo.prototype.attrGet=function(t){let n=this.attrIndex(t),i=null;return n>=0&&(i=this.attrs[n][1]),i};Lo.prototype.attrJoin=function(t,n){let i=this.attrIndex(t);i<0?this.attrPush([t,n]):this.attrs[i][1]=this.attrs[i][1]+" "+n};var xr=Lo;function U4(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}U4.prototype.Token=xr;var j4=U4;var H7=/\r\n?|\n/g,q7=/\0/g;function Db(e){let t;t=e.src.replace(H7,`
`),t=t.replace(q7,"\uFFFD"),e.src=t}function Ob(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.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)}function Rb(e){let t=e.tokens;for(let n=0,i=t.length;n<i;n++){let r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function W7(e){return/^<a[>\s]/i.test(e)}function V7(e){return/^<\/a\s*>/i.test(e)}function Pb(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=0;for(let s=r.length-1;s>=0;s--){let a=r[s];if(a.type==="link_close"){for(s--;r[s].level!==a.level&&r[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(W7(a.content)&&o>0&&o--,V7(a.content)&&o++),!(o>0)&&a.type==="text"&&e.md.linkify.test(a.content)){let l=a.content,u=e.md.linkify.match(l),c=[],d=a.level,f=0;u.length>0&&u[0].index===0&&s>0&&r[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){let h=u[p].url,m=e.md.normalizeLink(h);if(!e.md.validateLink(m))continue;let b=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");let g=u[p].index;if(g>f){let E=new e.Token("text","",0);E.content=l.slice(f,g),E.level=d,c.push(E)}let v=new e.Token("link_open","a",1);v.attrs=[["href",m]],v.level=d++,v.markup="linkify",v.info="auto",c.push(v);let x=new e.Token("text","",0);x.content=b,x.level=d,c.push(x);let k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",c.push(k),f=u[p].lastIndex}if(f<l.length){let p=new e.Token("text","",0);p.content=l.slice(f),p.level=d,c.push(p)}t[n].children=r=Tb(r,s,c)}}}}var Z4=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,J7=/\((c|tm|r)\)/i,K7=/\((c|tm|r)\)/ig,G7={c:"\xA9",r:"\xAE",tm:"\u2122"};function X7(e,t){return G7[t.toLowerCase()]}function Y7(e){let t=0;for(let n=e.length-1;n>=0;n--){let i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(K7,X7)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function Q7(e){let t=0;for(let n=e.length-1;n>=0;n--){let i=e[n];i.type==="text"&&!t&&Z4.test(i.content)&&(i.content=i.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function Lb(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(J7.test(e.tokens[t].content)&&Y7(e.tokens[t].children),Z4.test(e.tokens[t].content)&&Q7(e.tokens[t].children))}var eH=/['"]/,H4=/['"]/g,q4="\u2019";function nf(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function tH(e,t){let n,i=[];for(let r=0;r<e.length;r++){let o=e[r],s=e[r].level;for(n=i.length-1;n>=0&&!(i[n].level<=s);n--);if(i.length=n+1,o.type!=="text")continue;let a=o.content,l=0,u=a.length;e:for(;l<u;){H4.lastIndex=l;let c=H4.exec(a);if(!c)break;let d=!0,f=!0;l=c.index+1;let p=c[0]==="'",h=32;if(c.index-1>=0)h=a.charCodeAt(c.index-1);else for(n=r-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(n=r+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let b=Di(h)||Ni(String.fromCharCode(h)),g=Di(m)||Ni(String.fromCharCode(m)),v=Mi(h),x=Mi(m);if(x?d=!1:g&&(v||b||(d=!1)),v?f=!1:b&&(x||g||(f=!1)),m===34&&c[0]==='"'&&h>=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(o.content=nf(o.content,c.index,q4));continue}if(f)for(n=i.length-1;n>=0;n--){let k=i[n];if(i[n].level<s)break;if(k.single===p&&i[n].level===s){k=i[n];let E,C;p?(E=t.md.options.quotes[2],C=t.md.options.quotes[3]):(E=t.md.options.quotes[0],C=t.md.options.quotes[1]),o.content=nf(o.content,c.index,C),e[k.token].content=nf(e[k.token].content,k.pos,E),l+=C.length-1,k.token===r&&(l+=E.length-1),a=o.content,u=a.length,i.length=n;continue e}}d?i.push({token:r,pos:c.index,single:p,level:s}):f&&p&&(o.content=nf(o.content,c.index,q4))}}}function Fb(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!eH.test(e.tokens[t].content)||tH(e.tokens[t].children,e)}function Bb(e){let t,n,i=e.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;let s=i[o].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}var Ub=[["normalize",Db],["block",Ob],["inline",Rb],["linkify",Pb],["replacements",Lb],["smartquotes",Fb],["text_join",Bb]];function jb(){this.ruler=new Ri;for(let e=0;e<Ub.length;e++)this.ruler.push(Ub[e][0],Ub[e][1])}jb.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)};jb.prototype.State=j4;var W4=jb;function Jn(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i,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 r=this.src;for(let o=0,s=0,a=0,l=0,u=r.length,c=!1;s<u;s++){let d=r.charCodeAt(s);if(!c)if(xe(d)){a++,d===9?l+=4-l%4:l++;continue}else c=!0;(d===10||s===u-1)&&(d!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),c=!1,a=0,l=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Jn.prototype.push=function(e,t,n){let i=new xr(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i};Jn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Jn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Jn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){let i=this.src.charCodeAt(t);if(!xe(i))break}return t};Jn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!xe(this.src.charCodeAt(--t)))return t+1;return t};Jn.prototype.skipChars=function(t,n){for(let i=this.src.length;t<i&&this.src.charCodeAt(t)===n;t++);return t};Jn.prototype.skipCharsBack=function(t,n,i){if(t<=i)return t;for(;t>i;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Jn.prototype.getLines=function(t,n,i,r){if(t>=n)return"";let o=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let l=0,u=this.bMarks[a],c=u,d;for(a+1<n||r?d=this.eMarks[a]+1:d=this.eMarks[a];c<d&&l<i;){let f=this.src.charCodeAt(c);if(xe(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(c-u<this.tShift[a])l++;else break;c++}l>i?o[s]=new Array(l-i+1).join(" ")+this.src.slice(c,d):o[s]=this.src.slice(c,d)}return o.join("")};Jn.prototype.Token=xr;var V4=Jn;var nH=65536;function Zb(e,t){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function J4(e){let t=[],n=e.length,i=0,r=e.charCodeAt(i),o=!1,s=0,a="";for(;i<n;)r===124&&(o?(a+=e.substring(s,i-1),s=i):(t.push(a+e.substring(s,i)),a="",s=i+1)),o=r===92,i++,r=e.charCodeAt(i);return t.push(a+e.substring(s)),t}function Hb(e,t,n,i){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let o=e.bMarks[r]+e.tShift[r];if(o>=e.eMarks[r])return!1;let s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[r])return!1;let a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!xe(a)||s===45&&xe(a))return!1;for(;o<e.eMarks[r];){let k=e.src.charCodeAt(o);if(k!==124&&k!==45&&k!==58&&!xe(k))return!1;o++}let l=Zb(e,t+1),u=l.split("|"),c=[];for(let k=0;k<u.length;k++){let E=u[k].trim();if(!E){if(k===0||k===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(E))return!1;E.charCodeAt(E.length-1)===58?c.push(E.charCodeAt(0)===58?"center":"right"):E.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=Zb(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=J4(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(i)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let k=0;k<u.length;k++){let E=e.push("th_open","th",1);c[k]&&(E.attrs=[["style","text-align:"+c[k]]]);let C=e.push("inline","",0);C.content=u[k].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,x=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let k=!1;for(let C=0,M=p.length;C<M;C++)if(p[C](e,r,n,!0)){k=!0;break}if(k||(l=Zb(e,r).trim(),!l)||e.sCount[r]-e.blkIndent>=4||(u=J4(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),x+=d-u.length,x>nH))break;if(r===t+2){let C=e.push("tbody_open","tbody",1);C.map=v=[t+2,0]}let E=e.push("tr_open","tr",1);E.map=[r,r+1];for(let C=0;C<d;C++){let M=e.push("td_open","td",1);c[C]&&(M.attrs=[["style","text-align:"+c[C]]]);let z=e.push("inline","",0);z.content=u[C]?u[C].trim():"",z.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=r),e.push("table_close","table",-1),m[1]=r,e.parentType=f,e.line=r,!0}function qb(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,r=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,r=i;continue}break}e.line=r;let o=e.push("code_block","code",0);return o.content=e.getLines(t,r,4+e.blkIndent,!1)+`
`,o.map=[t,e.line],!0}function Wb(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;let s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=e.skipChars(r,s);let l=r-a;if(l<3)return!1;let u=e.src.slice(a,r),c=e.src.slice(r,o);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(r=a=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],r<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(r)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(r=e.skipChars(r,s),!(r-a<l)&&(r=e.skipSpaces(r),!(r<o)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);let p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,l,!0),p.markup=u,p.map=[t,e.line],!0}function Vb(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;let a=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h<n;h++){let x=e.sCount[h]<e.blkIndent;if(r=e.bMarks[h]+e.tShift[h],o=e.eMarks[h],r>=o)break;if(e.src.charCodeAt(r++)===62&&!x){let E=e.sCount[h]+1,C,M;e.src.charCodeAt(r)===32?(r++,E++,M=!1,C=!0):e.src.charCodeAt(r)===9?(C=!0,(e.bsCount[h]+E)%4===3?(r++,E++,M=!1):M=!0):C=!1;let z=E;for(a.push(e.bMarks[h]),e.bMarks[h]=r;r<o;){let H=e.src.charCodeAt(r);if(xe(H))H===9?z+=4-(z+e.bsCount[h]+(M?1:0))%4:z++;else break;r++}p=r>=o,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(C?1:0),u.push(e.sCount[h]),e.sCount[h]=z-E,c.push(e.tShift[h]),e.tShift[h]=r-e.bMarks[h];continue}if(p)break;let k=!1;for(let E=0,C=d.length;E<C;E++)if(d[E](e,h,n,!0)){k=!0;break}if(k){e.lineMax=h,e.blkIndent!==0&&(a.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}a.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]=-1}let m=e.blkIndent;e.blkIndent=0;let b=e.push("blockquote_open","blockquote",1);b.markup=">";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,g[1]=e.line;for(let x=0;x<c.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=c[x],e.sCount[x+t]=u[x],e.bsCount[x+t]=l[x];return e.blkIndent=m,!0}function Jb(e,t,n,i){let r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){let u=e.src.charCodeAt(o++);if(u!==s&&!xe(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function K4(e,t){let n=e.eMarks[t],i=e.bMarks[t]+e.tShift[t],r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<n){let o=e.src.charCodeAt(i);if(!xe(o))return-1}return i}function G4(e,t){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],r=n;if(r+1>=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=e.src.charCodeAt(r),!xe(o))?-1:r}function rH(e,t){let n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function Kb(e,t,n,i){let r,o,s,a,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let c=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(c=!0);let d,f,p;if((p=G4(e,l))>=0){if(d=!0,s=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=K4(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(i)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);let b=[l,0];a.map=b,a.markup=String.fromCharCode(h);let g=!1,v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";l<n;){o=p,r=e.eMarks[l];let k=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]),E=k;for(;o<r;){let Y=e.src.charCodeAt(o);if(Y===9)E+=4-(E+e.bsCount[l])%4;else if(Y===32)E++;else break;o++}let C=o,M;C>=r?M=1:M=E-k,M>4&&(M=1);let z=k+M;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);let H=[l,0];a.map=H,d&&(a.info=e.src.slice(s,p-1));let ce=e.tight,Ze=e.tShift[l],Fe=e.sCount[l],Ie=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=z,e.tight=!0,e.tShift[l]=C-e.bMarks[l],e.sCount[l]=E,C>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Ie,e.tShift[l]=Ze,e.sCount[l]=Fe,e.tight=ce,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,H[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let ve=!1;for(let Y=0,A=v.length;Y<A;Y++)if(v[Y](e,l,n,!0)){ve=!0;break}if(ve)break;if(d){if(p=G4(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=K4(e,l),p<0)break;if(h!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(h),b[1]=l,e.line=l,e.parentType=x,u&&rH(e,m),!0}function Gb(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function a(v){let x=e.lineMax;if(v>=x||e.isEmpty(v))return null;let k=!1;if(e.sCount[v]-e.blkIndent>3&&(k=!0),e.sCount[v]<0&&(k=!0),!k){let M=e.md.block.ruler.getRules("reference"),z=e.parentType;e.parentType="reference";let H=!1;for(let ce=0,Ze=M.length;ce<Ze;ce++)if(M[ce](e,v,x,!0)){H=!0;break}if(e.parentType=z,H)return null}let E=e.bMarks[v]+e.tShift[v],C=e.eMarks[v];return e.src.slice(E,C+1)}let l=e.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){let v=l.charCodeAt(r);if(v===91)return!1;if(v===93){u=r;break}else if(v===10){let x=a(s);x!==null&&(l+=x,o=l.length,s++)}else if(v===92&&(r++,r<o&&l.charCodeAt(r)===10)){let x=a(s);x!==null&&(l+=x,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){let v=l.charCodeAt(r);if(v===10){let x=a(s);x!==null&&(l+=x,o=l.length,s++)}else if(!xe(v))break}let c=e.md.helpers.parseLinkDestination(l,r,o);if(!c.ok)return!1;let d=e.md.normalizeLink(c.str);if(!e.md.validateLink(d))return!1;r=c.pos;let f=r,p=s,h=r;for(;r<o;r++){let v=l.charCodeAt(r);if(v===10){let x=a(s);x!==null&&(l+=x,o=l.length,s++)}else if(!xe(v))break}let m=e.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){let v=a(s);if(v===null)break;l+=v,r=o,o=l.length,s++,m=e.md.helpers.parseLinkTitle(l,r,o,m)}let b;for(r<o&&h!==r&&m.ok?(b=m.str,r=m.pos):(b="",r=f,s=p);r<o;){let v=l.charCodeAt(r);if(!xe(v))break;r++}if(r<o&&l.charCodeAt(r)!==10&&b)for(b="",r=f,s=p;r<o;){let v=l.charCodeAt(r);if(!xe(v))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;let g=Oi(l.slice(1,u));return g?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=s),!0):!1}var X4=["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"];var iH="[a-zA-Z_:][a-zA-Z0-9:._-]*",oH="[^\"'=<>`\\x00-\\x20]+",sH="'[^']*'",aH='"[^"]*"',lH="(?:"+oH+"|"+sH+"|"+aH+")",uH="(?:\\s+"+iH+"(?:\\s*=\\s*"+lH+")?)",Y4="<[A-Za-z][A-Za-z0-9\\-]*"+uH+"*\\s*\\/?>",Q4="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",cH="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",dH="<[?][\\s\\S]*?[?]>",fH="<![A-Za-z][^>]*>",pH="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",ez=new RegExp("^(?:"+Y4+"|"+Q4+"|"+cH+"|"+dH+"|"+fH+"|"+pH+")"),tz=new RegExp("^(?:"+Y4+"|"+Q4+")");var Fo=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+X4.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(tz.source+"\\s*$"),/^$/,!1]];function Xb(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,o),a=0;for(;a<Fo.length&&!Fo[a][0].test(s);a++);if(a===Fo.length)return!1;if(i)return Fo[a][2];let l=t+1;if(!Fo[a][1].test(s)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],s=e.src.slice(r,o),Fo[a][1].test(s)){s.length!==0&&l++;break}}e.line=l;let u=e.push("html_block","",0);return u.map=[t,l],u.content=e.getLines(t,l,e.blkIndent,!0),!0}function Yb(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=e.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=e.src.charCodeAt(++r);if(a>6||r<o&&!xe(s))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);let l=e.skipCharsBack(o,35,r);l>r&&xe(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;let u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(r,o).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function Qb(e,t,n){let i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.parentType;e.parentType="paragraph";let o=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(p<h&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=h))){o=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,h=i.length;p<h;p++)if(i[p](e,a,n,!0)){f=!0;break}if(f)break}if(!o)return!1;let l=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a+1;let u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[t,e.line];let c=e.push("inline","",0);c.content=l,c.map=[t,e.line-1],c.children=[];let d=e.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(s),e.parentType=r,!0}function ev(e,t,n){let i=e.md.block.ruler.getRules("paragraph"),r=e.parentType,o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let u=!1;for(let c=0,d=i.length;c<d;c++)if(i[c](e,o,n,!0)){u=!0;break}if(u)break}let s=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;let a=e.push("paragraph_open","p",1);a.map=[t,e.line];let l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}var rf=[["table",Hb,["paragraph","reference"]],["code",qb],["fence",Wb,["paragraph","reference","blockquote","list"]],["blockquote",Vb,["paragraph","reference","blockquote","list"]],["hr",Jb,["paragraph","reference","blockquote","list"]],["list",Kb,["paragraph","reference","blockquote"]],["reference",Gb],["html_block",Xb,["paragraph","reference","blockquote"]],["heading",Yb,["paragraph","reference","blockquote"]],["lheading",Qb],["paragraph",ev]];function of(){this.ruler=new Ri;for(let e=0;e<rf.length;e++)this.ruler.push(rf[e][0],rf[e][1],{alt:(rf[e][2]||[]).slice()})}of.prototype.tokenize=function(e,t,n){let i=this.ruler.getRules(""),r=i.length,o=e.md.options.maxNesting,s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}let l=e.line,u=!1;for(let c=0;c<r;c++)if(u=i[c](e,s,n,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};of.prototype.parse=function(e,t,n,i){if(!e)return;let r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)};of.prototype.State=V4;var nz=of;function qa(e,t,n,i){this.src=e,this.env=n,this.md=t,this.tokens=i,this.tokens_meta=Array(i.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}qa.prototype.pushPending=function(){let e=new xr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};qa.prototype.push=function(e,t,n){this.pending&&this.pushPending();let i=new xr(e,t,n),r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i};qa.prototype.scanDelims=function(e,t){let n=this.posMax,i=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32,o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;let s=o-e,a=o<n?this.src.charCodeAt(o):32,l=Di(r)||Ni(String.fromCharCode(r)),u=Di(a)||Ni(String.fromCharCode(a)),c=Mi(r),d=Mi(a),f=!d&&(!u||c||l),p=!c&&(!l||d||u);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||u),length:s}};qa.prototype.Token=xr;var rz=qa;function hH(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}}function tv(e,t){let n=e.pos;for(;n<e.posMax&&!hH(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var mH=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function nv(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let r=e.pending.match(mH);if(!r)return!1;let o=r[1],s=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");let l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);let u=e.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";let c=e.push("text","",0);c.content=e.md.normalizeLinkText(a);let d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=a.length-o.length,!0}function rv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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<r&&xe(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var iv=[];for(let e=0;e<256;e++)iv.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){iv[e.charCodeAt(0)]=1});function ov(e,t){let n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!xe(r));)n++;return e.pos=n,!0}let o=e.src[n];if(r>=55296&&r<=56319&&n+1<i){let a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(o+=e.src[n+1],n++)}let s="\\"+o;if(!t){let a=e.push("text_special","",0);r<256&&iv[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function sv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;let s=e.src.slice(r,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=r)return t||(e.pending+=s),e.pos+=a,!0;let l=n,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;let c=l-u;if(c===a){if(!t){let d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function gH(e,t){let n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;let r=e.scanDelims(e.pos,!0),o=r.length,s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function iz(e,t){let n,i=[],r=t.length;for(let o=0;o<r;o++){let s=t[o];if(s.marker!==126||s.end===-1)continue;let a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){let o=i.pop(),s=o+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,o!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[o],e.tokens[o]=n)}}function bH(e){let t=e.tokens_meta,n=e.tokens_meta.length;iz(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&iz(e,t[i].delimiters)}var av={tokenize:gH,postProcess:bH};function vH(e,t){let n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;let r=e.scanDelims(e.pos,i===42);for(let o=0;o<r.length;o++){let s=e.push("text","",0);s.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function oz(e,t){let n=t.length;for(let i=n-1;i>=0;i--){let r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;let o=t[r.end],s=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=e.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let u=e.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function yH(e){let t=e.tokens_meta,n=e.tokens_meta.length;oz(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&oz(e,t[i].delimiters)}var lv={tokenize:vH,postProcess:yH};function uv(e,t){let n,i,r,o,s="",a="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let c=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&e.src.charCodeAt(h)===40){for(u=!1,h++;h<d&&(n=e.src.charCodeAt(h),!(!xe(n)&&n!==10));h++);if(h>=d)return!1;if(l=h,r=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?h=r.pos:s="",l=h;h<d&&(n=e.src.charCodeAt(h),!(!xe(n)&&n!==10));h++);if(r=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&l!==h&&r.ok)for(a=r.str,h=r.pos;h<d&&(n=e.src.charCodeAt(h),!(!xe(n)&&n!==10));h++);}(h>=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h<d&&e.src.charCodeAt(h)===91?(l=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?i=e.src.slice(l,h++):h=p+1):h=p+1,i||(i=e.src.slice(f,p)),o=e.env.references[Oi(i)],!o)return e.pos=c,!1;s=o.href,a=o.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function cv(e,t){let n,i,r,o,s,a,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(o=h+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(!xe(n)&&n!==10));o++);if(o>=f)return!1;for(u=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?o=a.pos:c=""),u=o;o<f&&(n=e.src.charCodeAt(o),!(!xe(n)&&n!==10));o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(n=e.src.charCodeAt(o),!(!xe(n)&&n!==10));o++);else l="";if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?r=e.src.slice(u,o++):o=h+1):o=h+1,r||(r=e.src.slice(p,h)),s=e.env.references[Oi(r)],!s)return e.pos=d,!1;c=s.href,l=s.title}if(!t){i=e.src.slice(p,h);let m=[];e.md.inline.parse(i,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=i,l&&g.push(["title",l])}return e.pos=o,e.posMax=f,!0}var xH=/^([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])?)*)$/,kH=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function dv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let o=e.src.slice(i+1,n);if(kH.test(o)){let s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}if(xH.test(o)){let s=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}return!1}function _H(e){return/^<a[>\s]/i.test(e)}function wH(e){return/^<\/a\s*>/i.test(e)}function SH(e){let t=e|32;return t>=97&&t<=122}function fv(e,t){if(!e.md.options.html)return!1;let n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;let r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!SH(r))return!1;let o=e.src.slice(i).match(ez);if(!o)return!1;if(!t){let s=e.push("html_inline","",0);s.content=o[0],_H(s.content)&&e.linkLevel++,wH(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}var EH=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,$H=/^&([a-z][a-z0-9]{1,31});/i;function pv(e,t){let n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){let o=e.src.slice(n).match(EH);if(o){if(!t){let s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=tf(s)?Ha(s):Ha(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{let o=e.src.slice(n).match($H);if(o){let s=Wr(o[0]);if(s!==o[0]){if(!t){let a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function sz(e){let t={},n=e.length;if(!n)return;let i=0,r=-2,o=[];for(let s=0;s<n;s++){let a=e[s];if(o.push(0),(e[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[a.marker][(a.open?3:0)+a.length%3],u=i-o[i]-1,c=u;for(;u>l;u-=o[u]+1){let d=e[u];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,d.end=s,d.close=!1,c=-1,r=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function hv(e){let t=e.tokens_meta,n=e.tokens_meta.length;sz(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&sz(t[i].delimiters)}function mv(e){let t,n,i=0,r=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}var gv=[["text",tv],["linkify",nv],["newline",rv],["escape",ov],["backticks",sv],["strikethrough",av.tokenize],["emphasis",lv.tokenize],["link",uv],["image",cv],["autolink",dv],["html_inline",fv],["entity",pv]],bv=[["balance_pairs",hv],["strikethrough",av.postProcess],["emphasis",lv.postProcess],["fragments_join",mv]];function Wa(){this.ruler=new Ri;for(let e=0;e<gv.length;e++)this.ruler.push(gv[e][0],gv[e][1]);this.ruler2=new Ri;for(let e=0;e<bv.length;e++)this.ruler2.push(bv[e][0],bv[e][1])}Wa.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let s=!1;if(e.level<r){for(let a=0;a<i;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos};Wa.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){let o=e.pos,s=!1;if(e.level<r){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Wa.prototype.parse=function(e,t,n,i){let r=new this.State(e,t,n,i);this.tokenize(r);let o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)};Wa.prototype.State=rz;var az=Wa;function lz(e){let t={};e=e||{},t.src_Any=Jd.source,t.src_Cc=Kd.source,t.src_Z=Xd.source,t.src_P=Oo.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");let n="[><\uFF5C]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function vv(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function af(e){return Object.prototype.toString.call(e)}function CH(e){return af(e)==="[object String]"}function TH(e){return af(e)==="[object Object]"}function IH(e){return af(e)==="[object RegExp]"}function uz(e){return af(e)==="[object Function]"}function AH(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var dz={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function zH(e){return Object.keys(e||{}).reduce(function(t,n){return t||dz.hasOwnProperty(n)},!1)}var MH={"http:":{validate:function(e,t,n){let i=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let i=e.slice(t);return n.re.no_http||(n.re.no_http=new 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(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let i=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},NH="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]",DH="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function OH(e){e.__index__=-1,e.__text_cache__=""}function RH(e){return function(t,n){let i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function cz(){return function(e,t){t.normalize(e)}}function sf(e){let t=e.re=lz(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(NH),n.push(t.src_xn),t.src_tlds=n.join("|");function i(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");let r=[];e.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){let l=e.__schemas__[a];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[a]=u,TH(l)){IH(l.validate)?u.validate=RH(l.validate):uz(l.validate)?u.validate=l.validate:o(a,l),uz(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=cz();return}if(CH(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:cz()};let s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(AH).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+s+")","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"),OH(e)}function PH(e,t){let n=e.__index__,i=e.__last_index__,r=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=i+t,this.raw=r,this.text=r,this.url=r}function yv(e,t){let n=new PH(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function rn(e,t){if(!(this instanceof rn))return new rn(e,t);t||zH(e)&&(t=e,e={}),this.__opts__=vv({},dz,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=vv({},MH,e),this.__compiled__={},this.__tlds__=DH,this.__tlds_replaced__=!1,this.re={},sf(this)}rn.prototype.add=function(t,n){return this.__schemas__[t]=n,sf(this),this};rn.prototype.set=function(t){return this.__opts__=vv(this.__opts__,t),this};rn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,i,r,o,s,a,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(i=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=i.index+i[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};rn.prototype.pretest=function(t){return this.re.pretest.test(t)};rn.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0};rn.prototype.match=function(t){let n=[],i=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(yv(this,i)),i=this.__last_index__);let r=i?t.slice(i):t;for(;this.test(r);)n.push(yv(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return n.length?n:null};rn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let i=this.testSchemaAt(t,n[2],n[0].length);return i?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i,yv(this,0)):null};rn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),sf(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,sf(this),this)};rn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};rn.prototype.onCompile=function(){};var fz=rn;var LH=/^xn--/,FH=/[^\0-\x7F]/,BH=/[\x2E\u3002\uFF0E\uFF61]/g,UH={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xv=35,Kn=Math.floor,kv=String.fromCharCode;function Vr(e){throw new RangeError(UH[e])}function jH(e,t){let n=[],i=e.length;for(;i--;)n[i]=t(e[i]);return n}function hz(e,t){let n=e.split("@"),i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(BH,".");let r=e.split("."),o=jH(r,t).join(".");return i+o}function mz(e){let t=[],n=0,i=e.length;for(;n<i;){let r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){let o=e.charCodeAt(n++);(o&64512)==56320?t.push(((r&1023)<<10)+(o&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}var ZH=e=>String.fromCodePoint(...e),HH=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},pz=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},gz=function(e,t,n){let i=0;for(e=n?Kn(e/700):e>>1,e+=Kn(e/t);e>xv*26>>1;i+=36)e=Kn(e/xv);return Kn(i+(xv+1)*e/(e+38))},bz=function(e){let t=[],n=e.length,i=0,r=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Vr("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){let l=i;for(let c=1,d=36;;d+=36){a>=n&&Vr("invalid-input");let f=HH(e.charCodeAt(a++));f>=36&&Vr("invalid-input"),f>Kn((2147483647-i)/c)&&Vr("overflow"),i+=f*c;let p=d<=o?1:d>=o+26?26:d-o;if(f<p)break;let h=36-p;c>Kn(2147483647/h)&&Vr("overflow"),c*=h}let u=t.length+1;o=gz(i-l,u,l==0),Kn(i/u)>2147483647-r&&Vr("overflow"),r+=Kn(i/u),i%=u,t.splice(i++,0,r)}return String.fromCodePoint(...t)},vz=function(e){let t=[];e=mz(e);let n=e.length,i=128,r=0,o=72;for(let l of e)l<128&&t.push(kv(l));let s=t.length,a=s;for(s&&t.push("-");a<n;){let l=2147483647;for(let c of e)c>=i&&c<l&&(l=c);let u=a+1;l-i>Kn((2147483647-r)/u)&&Vr("overflow"),r+=(l-i)*u,i=l;for(let c of e)if(c<i&&++r>2147483647&&Vr("overflow"),c===i){let d=r;for(let f=36;;f+=36){let p=f<=o?1:f>=o+26?26:f-o;if(d<p)break;let h=d-p,m=36-p;t.push(kv(pz(p+h%m,0))),d=Kn(h/m)}t.push(kv(pz(d,0))),o=gz(r,u,a===s),r=0,++a}++r,++i}return t.join("")},qH=function(e){return hz(e,function(t){return LH.test(t)?bz(t.slice(4).toLowerCase()):t})},WH=function(e){return hz(e,function(t){return FH.test(t)?"xn--"+vz(t):t})},VH={version:"2.3.1",ucs2:{decode:mz,encode:ZH},decode:bz,encode:vz,toASCII:WH,toUnicode:qH};var _v=VH;var yz={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var xz={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var kz={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",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"]}}};var JH={default:yz,zero:xz,commonmark:kz},KH=/^(vbscript|javascript|file|data):/,GH=/^data:image\/(gif|png|jpeg|webp);/;function XH(e){let t=e.trim().toLowerCase();return KH.test(t)?GH.test(t):!0}var _z=["http:","https:","mailto:"];function YH(e){let t=Za(e,!0);if(t.hostname&&(!t.protocol||_z.indexOf(t.protocol)>=0))try{t.hostname=_v.toASCII(t.hostname)}catch{}return qd(Do(t))}function QH(e){let t=Za(e,!0);if(t.hostname&&(!t.protocol||_z.indexOf(t.protocol)>=0))try{t.hostname=_v.toUnicode(t.hostname)}catch{}return ja(Do(t),ja.defaultChars+"%")}function wn(e,t){if(!(this instanceof wn))return new wn(e,t);t||ef(e)||(t=e||{},e="default"),this.inline=new az,this.block=new nz,this.core=new W4,this.renderer=new B4,this.linkify=new fz,this.validateLink=XH,this.normalizeLink=YH,this.normalizeLinkText=QH,this.utils=Ib,this.helpers=Ro({},Nb),this.options={},this.configure(e),t&&this.set(t)}wn.prototype.set=function(e){return Ro(this.options,e),this};wn.prototype.configure=function(e){let t=this;if(ef(e)){let n=e;if(e=JH[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new 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};wn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};wn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};wn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};wn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};wn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};wn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};wn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Jr=wn;var eq=new Mr({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function tq(e,t){if(e.isText&&t.isText&&_e.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var Ev=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:_e.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),i=n.content,r=i[i.length-1],o=this.schema.text(t,n.marks),s;r&&(s=tq(r,o))?i[i.length-1]=s:i.push(o)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n<t.length;n++){let i=t[n],r=this.tokenHandlers[i.type];if(!r)throw new Error("Token type `"+i.type+"` not supported by Markdown parser");r(this,i,t,n)}}addNode(t,n,i){let r=this.top(),o=t.createAndFill(n,i,r?r.marks:[]);return o?(this.push(o),o):null}openNode(t,n){this.stack.push({type:t,attrs:n,content:[],marks:_e.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}};function Va(e,t,n,i){return e.getAttrs?e.getAttrs(t,n,i):e.attrs instanceof Function?e.attrs(t):e.attrs}function wv(e,t){return e.noCloseToken||t=="code_inline"||t=="code_block"||t=="fence"}function wz(e){return e[e.length-1]==`
`?e.slice(0,e.length-1):e}function Sv(){}function nq(e,t){let n=Object.create(null);for(let i in t){let r=t[i];if(r.block){let o=e.nodeType(r.block);wv(r,i)?n[i]=(s,a,l,u)=>{s.openNode(o,Va(r,a,l,u)),s.addText(wz(a.content)),s.closeNode()}:(n[i+"_open"]=(s,a,l,u)=>s.openNode(o,Va(r,a,l,u)),n[i+"_close"]=s=>s.closeNode())}else if(r.node){let o=e.nodeType(r.node);n[i]=(s,a,l,u)=>s.addNode(o,Va(r,a,l,u))}else if(r.mark){let o=e.marks[r.mark];wv(r,i)?n[i]=(s,a,l,u)=>{s.openMark(o.create(Va(r,a,l,u))),s.addText(wz(a.content)),s.closeMark(o)}:(n[i+"_open"]=(s,a,l,u)=>s.openMark(o.create(Va(r,a,l,u))),n[i+"_close"]=s=>s.closeMark(o))}else if(r.ignore)wv(r,i)?n[i]=Sv:(n[i+"_open"]=Sv,n[i+"_close"]=Sv);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(r))}return n.text=(i,r)=>i.addText(r.content),n.inline=(i,r)=>i.parseTokens(r.children),n.softbreak=n.softbreak||(i=>i.addText(" ")),n}var $v=class{constructor(t,n,i){this.schema=t,this.tokenizer=n,this.tokens=i,this.tokenHandlers=nq(t,i)}parse(t,n={}){let i=new Ev(this.schema,this.tokenHandlers),r;i.parseTokens(this.tokenizer.parse(t,n));do r=i.closeNode();while(i.stack.length);return r||this.schema.topNodeType.createAndFill()}};function Sz(e,t){for(;++t<e.length;)if(e[t].type!="list_item_open")return e[t].hidden;return!1}var _le=new $v(eq,Jr("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:Sz(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:Sz(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),rq={open:"",close:"",mixable:!0},Cv=class{constructor(t,n,i={}){this.nodes=t,this.marks=n,this.options=i}serialize(t,n={}){n=Object.assign({},this.options,n);let i=new Ja(this.nodes,this.marks,n);return i.renderContent(t),i.out}},In=new Cv({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),i=n?n.sort().slice(-1)[0]+"`":"```";e.write(i+(t.attrs.params||"")+`
`),e.text(t.textContent,!1),e.write(`
`),e.write(i),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,i=String(n+t.childCount-1).length,r=e.repeat(" ",i+2);e.renderList(t,r,o=>{let s=String(n+o);return e.repeat(" ",i-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,i){for(let r=i+1;r<n.childCount;r++)if(n.child(r).type!=t.type){e.write(`\\
`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,i){return e.inAutolink=iq(t,n,i),e.inAutolink?"<":"["},close(e,t,n,i){let{inAutolink:r}=e;return e.inAutolink=void 0,r?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,i){return Ez(n.child(i),-1)},close(e,t,n,i){return Ez(n.child(i-1),1)},escape:!1}});function Ez(e,t){let n=/`+/g,i,r=0;if(e.isText)for(;i=n.exec(e.text);)r=Math.max(r,i[0].length);let o=r>0&&t>0?" `":"`";for(let s=0;s<r;s++)o+="`";return r>0&&t<0&&(o+=" "),o}function iq(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let i=t.child(n);return!i.isText||i.text!=e.attrs.href||i.marks[i.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var Ja=class{constructor(t,n,i){this.nodes=t,this.marks=n,this.options=i,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=`
`),t>1){let n=this.delim,i=/\s+$/.exec(n);i&&(n=n.slice(0,n.length-i[0].length));for(let r=1;r<t;r++)this.out+=n+`
`}this.closed=null}}getMark(t){let n=this.marks[t];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${t}\` not supported by Markdown renderer`);n=rq}return n}wrapBlock(t,n,i,r){let o=this.delim;this.write(n??t),this.delim+=t,r(),this.delim=o,this.closeBlock(i)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
`)}write(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)}closeBlock(t){this.closed=t}text(t,n=!0){let i=t.split(`
`);for(let r=0;r<i.length;r++)this.write(),!n&&i[r][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(i[r],this.atBlockStart):i[r],r!=i.length-1&&(this.out+=`
`)}render(t,n,i){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,i);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,i,r)=>this.render(n,t,r))}renderInline(t,n=!0){this.atBlockStart=n;let i=[],r="",o=(s,a,l)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=r;if(r="",s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(i)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(s.text);b&&(c+=b,s=g?s.withText(g):null,s||(u=i))}if(s&&s.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!this.isMarkAhead(t,l+1,m)})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(s.text);g&&(r=g,s=b?s.withText(b):null,s||(u=i))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;m<p;m++){let b=u[m];if(!this.getMark(b.type.name).mixable)break;for(let g=0;g<i.length;g++){let v=i[g];if(!this.getMark(v.type.name).mixable)break;if(b.eq(v)){m>g?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h<Math.min(i.length,p)&&u[h].eq(i[h]);)++h;for(;h<i.length;)this.text(this.markString(i.pop(),!1,t,l),!1);if(c&&this.text(c),s){for(;i.length<p;){let m=u[i.length];i.push(m),this.text(this.markString(m,!0,t,l),!1),this.atBlockStart=!1}f&&s.isText?this.text(this.markString(d,!0,t,l)+s.text+this.markString(d,!1,t,l+1),!1):this.render(s,t,l),this.atBlockStart=!1}s?.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};t.forEach(o),o(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,i){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=r,t.forEach((s,a,l)=>{l&&r&&this.flushClose(1),this.wrapBlock(n,i(l),t,()=>this.render(s,t,l))}),this.inTightList=o}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(i,r)=>i=="_"&&r>0&&r+1<t.length&&t[r-1].match(/\w/)&&t[r+1].match(/\w/)?i:"\\"+i),n&&(t=t.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let i="";for(let r=0;r<n;r++)i+=t;return i}markString(t,n,i,r){let o=this.getMark(t.type.name),s=n?o.open:o.close;return typeof s=="string"?s:s(this,t,i,r)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(t,n,i){for(;;n++){if(n>=t.childCount)return!1;let r=t.child(n);if(r.type.name!=this.options.hardBreakNodeName)return i.isInSet(r.marks);n++}}};var Dz=ey(Az(),1);var gq=Object.defineProperty,bq=(e,t,n)=>t in e?gq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lf=(e,t,n)=>(bq(e,typeof t!="symbol"?t+"":t,n),n),vq=be.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:i,commands:r}=n;function o(s){if(!i.isActive(s))return!1;let a=i.getAttributes(s);return r.updateAttributes(s,{tight:t??!(a!=null&&a.tight)})}return e.options.listTypes.some(s=>o(s))}}}}}),zz=Jr();function Oz(e,t){return zz.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new zz.inline.State(e,null,null,[]).scanDelims(t,!0)}function Rz(e,t,n,i){let r=e.substring(0,n)+e.substring(n+t.length);return r=r.substring(0,n+i)+t+r.substring(n+i),r}function yq(e,t,n,i){let r=n,o=e;for(;r<i&&!Oz(o,r).can_open;)o=Rz(o,t,r,1),r++;return{text:o,from:r,to:i}}function xq(e,t,n,i){let r=i,o=e;for(;r>n&&!Oz(o,r).can_close;)o=Rz(o,t,r,-1),r--;return{text:o,from:n,to:r}}function kq(e,t,n,i){let r={text:e,from:n,to:i};return r=yq(r.text,t,r.from,r.to),r=xq(r.text,t,r.from,r.to),r.to-r.from<t.length+1&&(r.text=r.text.substring(0,r.from)+r.text.substring(r.to+t.length)),r.text}var Av=class extends Ja{constructor(t,n,i){super(t,n,i??{}),lf(this,"inTable",!1),this.inlines=[]}render(t,n,i){super.render(t,n,i);let r=this.inlines[this.inlines.length-1];if(r!=null&&r.start&&r!==null&&r!==void 0&&r.end){let{delimiter:o,start:s,end:a}=this.normalizeInline(r);this.out=kq(this.out,o,s,a),this.inlines.pop()}}markString(t,n,i,r){let o=this.marks[t.type.name];if(o.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:o.open});else{let s=this.inlines.pop();this.inlines.push({...s,end:this.out.length})}return super.markString(t,n,i,r)}normalizeInline(t){let{start:n,end:i}=t;for(;this.out.charAt(n).match(/\s/);)n++;return{...t,start:n}}},Pz=dt.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(e,t){var n,i;return this.editor.storage.markdown.options.html?(n=(i=Mz(t))===null||i===void 0?void 0:i[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,i;return this.editor.storage.markdown.options.html&&(n=(i=Mz(t))===null||i===void 0?void 0:i[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function Mz(e){let t=e.type.schema,n=t.text(" ",[e]),r=Ao(N.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function Nv(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function _q(e){return e?.replace(/</g,"<").replace(/>/g,">")}function wq(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function Sq(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var cf=te.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(Eq(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function Eq(e,t){let n=e.type.schema,i=Ao(N.from(e),n);return e.isBlock&&(t instanceof N||t.type.name===n.topNodeType.name)?$q(i):i}function $q(e){let n=Nv(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
${n.innerHTML}
`:`
`,n.outerHTML}var Cq=te.create({name:"blockquote"}),Tq=Cq.extend({addStorage(){return{markdown:{serialize:In.nodes.blockquote,parse:{}}}}}),Iq=te.create({name:"bulletList"}),Lz=Iq.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),Aq=te.create({name:"codeBlock"}),zq=Aq.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+`
`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),Mq=te.create({name:"hardBreak"}),Fz=Mq.extend({addStorage(){return{markdown:{serialize(e,t,n,i){for(let r=i+1;r<n.childCount;r++)if(n.child(r).type!=t.type){e.write(e.inTable?cf.storage.markdown.serialize.call(this,e,t,n):`\\
`);return}},parse:{}}}}}),Nq=te.create({name:"heading"}),Dq=Nq.extend({addStorage(){return{markdown:{serialize:In.nodes.heading,parse:{}}}}}),Oq=te.create({name:"horizontalRule"}),Rq=Oq.extend({addStorage(){return{markdown:{serialize:In.nodes.horizontal_rule,parse:{}}}}}),Pq=te.create({name:"image"}),Lq=Pq.extend({addStorage(){return{markdown:{serialize:In.nodes.image,parse:{}}}}}),Fq=te.create({name:"listItem"}),Bq=Fq.extend({addStorage(){return{markdown:{serialize:In.nodes.list_item,parse:{}}}}}),Uq=te.create({name:"orderedList"});function jq(e,t,n){let i=0;for(;n-i>0&&t.child(n-i-1).type.name===e.type.name;i++);return i}var Zq=Uq.extend({addStorage(){return{markdown:{serialize(e,t,n,i){let r=t.attrs.start||1,o=String(r+t.childCount-1).length,s=e.repeat(" ",o+2),l=jq(t,n,i)%2?") ":". ";e.renderList(t,s,u=>{let c=String(r+u);return e.repeat(" ",o-c.length)+c+l})},parse:{}}}}}),Hq=te.create({name:"paragraph"}),qq=Hq.extend({addStorage(){return{markdown:{serialize:In.nodes.paragraph,parse:{}}}}});function Iv(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var Wq=te.create({name:"table"}),Vq=Wq.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!Jq(t)){cf.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((i,r,o)=>{if(e.write("| "),i.forEach((s,a,l)=>{l&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!o){let s=Array.from({length:i.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function Nz(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function Jq(e){let t=Iv(e),n=t[0],i=t.slice(1);return!(Iv(n).some(r=>r.type.name!=="tableHeader"||Nz(r)||r.childCount>1)||i.some(r=>Iv(r).some(o=>o.type.name==="tableHeader"||Nz(o)||o.childCount>1)))}var Kq=te.create({name:"taskItem"}),Gq=Kq.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),Xq=te.create({name:"taskList"}),Yq=Xq.extend({addStorage(){return{markdown:{serialize:Lz.storage.markdown.serialize,parse:{setup(e){e.use(Dz.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),Qq=te.create({name:"text"}),eW=Qq.extend({addStorage(){return{markdown:{serialize(e,t){e.text(_q(t.text))},parse:{}}}}}),tW=dt.create({name:"bold"}),nW=tW.extend({addStorage(){return{markdown:{serialize:In.marks.strong,parse:{}}}}}),rW=dt.create({name:"code"}),iW=rW.extend({addStorage(){return{markdown:{serialize:In.marks.code,parse:{}}}}}),oW=dt.create({name:"italic"}),sW=oW.extend({addStorage(){return{markdown:{serialize:In.marks.em,parse:{}}}}}),aW=dt.create({name:"link"}),lW=aW.extend({addStorage(){return{markdown:{serialize:In.marks.link,parse:{}}}}}),uW=dt.create({name:"strike"}),cW=uW.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),dW=[Tq,Lz,zq,Fz,Dq,Rq,cf,Lq,Bq,Zq,qq,Vq,Gq,Yq,eW,nW,iW,Pz,sW,lW,cW];function uf(e){var t,n;let i=(t=e.storage)===null||t===void 0?void 0:t.markdown,r=(n=dW.find(o=>o.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return i||r?{...r,...i}:null}var zv=class{constructor(t){lf(this,"editor",null),this.editor=t}serialize(t){let n=new Av(this.nodes,this.marks,{hardBreakNodeName:Fz.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(cf)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(Pz)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=uf(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let i=(n=uf(t))===null||n===void 0?void 0:n.serialize;return i?{...i,open:typeof i.open=="function"?i.open.bind({editor:this.editor,options:t.options}):i.open,close:typeof i.close=="function"?i.close.bind({editor:this.editor,options:t.options}):i.close}:null}},Mv=class{constructor(t,n){lf(this,"editor",null),lf(this,"md",null);let{html:i,linkify:r,breaks:o}=n;this.editor=t,this.md=this.withPatchedRenderer(Jr({html:i,linkify:r,breaks:o}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=uf(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},this.md)});let i=this.md.render(t),r=Nv(i);return this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=uf(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},r)}),this.normalizeDOM(r,{inline:n,content:t}),r.innerHTML}return t}normalizeDOM(t,n){let{inline:i,content:r}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(o=>{var s;((s=o.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!o.closest("pre")&&(o.nextSibling.textContent=o.nextSibling.textContent.replace(/^\n/,""))}),i&&this.normalizeInline(t,r),t}normalizeBlocks(t){let i=Object.values(this.editor.schema.nodes).filter(r=>r.isBlock).map(r=>{var o;return(o=r.spec.parseDOM)===null||o===void 0?void 0:o.map(s=>s.tag)}).flat().filter(Boolean).join(",");i&&[...t.querySelectorAll(i)].forEach(r=>{r.parentElement.matches("p")&&wq(r)})}normalizeInline(t,n){var i;if((i=t.firstElementChild)!==null&&i!==void 0&&i.matches("p")){var r,o,s,a;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(r=(o=n.match(/^\s+/))===null||o===void 0?void 0:o[0])!==null&&r!==void 0?r:"",d=u?"":(s=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}Sq(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=i=>function(){let r=i(...arguments);return r===`
`?r:r[r.length-1]===`
`?r.slice(0,-1):r};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},fW=be.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new Q({key:new de("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let i=this.editor.storage.markdown.parser.parse(e,{inline:!0});return hn.fromSchema(this.editor.schema).parseSlice(Nv(i),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),Bz=be.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=x0.Commands.config.addCommands();return{setContent:(t,n)=>i=>e.setContent(i.editor.storage.markdown.parser.parse(t),n)(i),insertContentAt:(t,n,i)=>r=>e.insertContentAt(t,r.editor.storage.markdown.parser.parse(n,{inline:!0}),i)(r)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new Mv(this.editor,this.options),serializer:new zv(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[vq.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),fW.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function pW(e){let t=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9\s-]/g," ").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t:"section"}function Pi(e){return pW(e)}function Li(){let e=new Map,t=new Set;return n=>{let i=Pi(n),r=e.get(i)??1,o=r===1?i:`${i}-${r}`;for(;t.has(o);)r+=1,o=`${i}-${r}`;return e.set(i,r+1),t.add(o),o}}function Bo(e){return/^[A-Za-z]:[\\/]/.test(e)}function Ga(e){return e.replace(/\\/g,"/")}function Gn(e){return Ga(e).replace(/\/+/g,"/")}function Ka(e){let t=Gn(e);return Bo(t)?t.slice(0,3):t.startsWith("/")?"/":""}function df(e){let t=Gn(e),n=Ka(t);return t.slice(n.length).split("/").filter(Boolean)}function Fi(e){let t=Ka(e),n=df(e);return n.length<=1?t||".":`${t}${n.slice(0,-1).join("/")}`}function Uz(e){let t=Ka(e),n=df(e),i=[];for(let r=n.length-1;r>=1;r-=1){let o=`${t}${n.slice(0,r).join("/")}`;i.push(o||".")}return t&&i[i.length-1]!==t&&i.push(t),i}function jz(e,t){let n=Gn(e),i=Gn(t),r=Ka(n),o=Ka(i);if(r!==o)return i;let s=df(n),a=df(i),l=0;for(;l<s.length&&l<a.length&&s[l]===a[l];)l+=1;let u=new Array(Math.max(s.length-l,0)).fill(".."),c=a.slice(l),d=[...u,...c].join("/");return d.length>0?d:"."}var hW=/\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]/g,mW=/^(`{3,}|~{3,})/;function pf(e){return encodeURI(Ga(e))}function Dv(e){try{return decodeURIComponent(e)}catch{return e}}function qz(e){let t=e.match(/^\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]$/);return t?{path:(t[1]??"").trim(),anchor:t[2]?.trim(),alias:t[3]?.trim()}:null}function gW(e){return e.alias&&e.alias.length>0?e.alias:e.path&&e.anchor?`${e.path}#${e.anchor}`:e.path?e.path:e.anchor??""}function bW(e){return/\.[A-Za-z0-9_-]+$/.test(e)?e:`${e}.md`}function Wz(e){if(!e.path)return e.anchor?`#${Pi(e.anchor)}`:"#";let t=bW(Ga(e.path)),n=t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||Bo(t)?t:`./${t}`,i=pf(n);return e.anchor?`${i}#${Pi(e.anchor)}`:i}function Zz(e){return e.replace(hW,t=>{let n=qz(t);if(!n)return t;let i=gW(n),r=Wz(n);return`[${i}](${r} "mcp-wiki:${encodeURIComponent(t)}")`})}function vW(e){let t="",n=0;for(;n<e.length;){let i=e.indexOf("`",n);if(i===-1){t+=Zz(e.slice(n));break}t+=Zz(e.slice(n,i));let r=i;for(;r<e.length&&e[r]==="`";)r+=1;let o=e.slice(i,r),s=e.indexOf(o,r);if(s===-1){t+=e.slice(i);break}t+=e.slice(i,s+o.length),n=s+o.length}return t}function ff(e){if(!(!e||e.length===0))return Dv(e)}function yW(e){let t=e.indexOf("#");return t===-1?{pathPart:e}:{pathPart:e.slice(0,t),anchorPart:e.slice(t+1)}}function xW(e){let t=Gn(e),n=t.endsWith("/")?t:`${t}/`;return Bo(n)?new URL(`file:///${pf(n)}`):n.startsWith("/")?new URL(`file://${pf(n)}`):new URL(`file:///${pf(n)}`)}function kW(e){let t=Dv(e.pathname);return/^\/[A-Za-z]:\//.test(t)?t.slice(1):t}function _W(e){return/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e)&&!Bo(e)}function Hz(e,t){let n=Ga(Dv(t));if(n.startsWith("/")||Bo(n))return Gn(n);let i=Fi(e);if(i==="."&&!Gn(e).includes("/"))return Gn(n);let r=new URL(encodeURI(n),xW(i));return Gn(kW(r))}function Vz(e){return e.replace(/\[([^\]]*)\]\(([^)\s]*)(?:\s+"mcp-wiki:([^"]+)")\)/g,(t,n,i,r)=>{try{return decodeURIComponent(r)}catch{return`[[${r}]]`}})}function Xa(e){let t=e.split(`
`),n=null;return t.map(i=>{let o=i.trimStart().match(mW);if(o){let s=o[1];return n?s[0]===n[0]&&s.length>=n.length&&(n=null):n=s,i}return n?i:vW(i)}).join(`
`)}function Jz(e,t){let n=qz(t);if(n){let o=Wz(n);if(o.startsWith("#"))return{kind:"anchor",href:t,anchor:ff(o.slice(1))};let[s,a]=o.split("#");return{kind:"file",href:t,targetPath:Hz(e,s),...a?{anchor:ff(a)}:{}}}if(_W(t))return{kind:"external",href:t,url:t};if(t.startsWith("#"))return{kind:"anchor",href:t,anchor:ff(t.slice(1))};let{pathPart:i,anchorPart:r}=yW(t);return{kind:"file",href:t,targetPath:Hz(e,i),...r?{anchor:ff(r)}:{}}}var wW=/^(---\r?\n[\s\S]*?\r?\n---\r?\n)/,SW=/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,EW=/\*\*([^*\n]*?`[^`\n]+`[^*\n]*?)\*\*/g,tM="TIPTAPPIPEESCX";function $W(e,t){if(/^`[^`]+`$/.test(e))return!0;let n=/^[a-z][a-z0-9+.-]*:/i.test(t),i=t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||t.startsWith("#");return!!(!n&&!i&&t.includes("/"))}function CW(e){let t=e.includes(`\r
`)?`\r
`:`
`,n=t===`\r
`?e.replace(/\r\n/g,`
`):e,i=n.match(wW),r=i?i[0]:"",o=r?n.slice(r.length):n,s=o.match(/^\n*/)?.[0]??"";o=o.slice(s.length);let a=o.endsWith(`
`)?`
`:"",l=[],u=o,c=0;u=u.replace(SW,(m,b,g)=>{if(!$W(b,g))return m;let v=`TIPTAPCODELINK${String(c).padStart(4,"0")}`;return l.push({placeholder:v,original:m}),c+=1,v});let d=[],f=0;u=u.replace(EW,m=>{let b=`TIPTAPBOLDCODE${String(f).padStart(4,"0")}`;return d.push({placeholder:b,original:m}),f+=1,b});let p=0;return u=u.replace(/\\\|/g,()=>(p+=1,tM)),{editorInput:Xa(u),context:{originalInput:e,frontmatter:r,frontmatterGap:s,trailingNewline:a,eol:t,codeLinks:l,boldCodeRuns:d,pipeEscapeCount:p}}}function TW(e,t){let n=Vz(e);for(let{placeholder:i,original:r}of t.codeLinks)n=n.split(i).join(r);for(let{placeholder:i,original:r}of t.boldCodeRuns)n=n.split(i).join(r);return t.pipeEscapeCount>0&&(n=n.split(tM).join("\\|")),n=MW(n,t.originalInput),n=NW(n,t.originalInput),n=DW(n,t.originalInput),n=IW(n,t.originalInput),n=AW(n,t.originalInput),n=n.replace(/^\n+/,""),n=zW(n,t.originalInput),n=OW(n,t.originalInput),n=n.replace(/\n+$/,"")+t.trailingNewline,t.frontmatter&&(n=t.frontmatter+t.frontmatterGap+n),t.eol===`\r
`&&(n=n.replace(/\n/g,`\r
`)),n}function IW(e,t){let n=/^\|[\s:\-|]+\|$/,i=t.replace(/\r\n/g,`
`).split(`
`).filter(s=>n.test(s));if(i.length===0)return e;let r=e.split(`
`),o=0;for(let s=0;s<r.length;s+=1)if(n.test(r[s])&&o<i.length){let a=i[o].split("|").length,l=r[s].split("|").length;a===l&&(r[s]=i[o]),o+=1}return r.join(`
`)}function AW(e,t){let n=/^(\s*)([*\-+])(\s)/,i=t.replace(/\r\n/g,`
`).split(`
`),r=[];for(let a of i){let l=a.match(n);l&&r.push(l[2])}if(r.length===0)return e;let o=e.split(`
`),s=0;for(let a=0;a<o.length;a+=1){let l=o[a].match(n);if(!l)continue;let u=r[s];u&&u!==l[2]&&(o[a]=l[1]+u+l[3]+o[a].slice(l[0].length)),s+=1}return o.join(`
`)}function zW(e,t){let n=t.replace(/\r\n/g,`
`).split(`
`),i=e;for(let r=0;r<n.length-1;r+=1){let o=n[r],s=n[r+1];if(!o||!s)continue;let a=/^\s*([-*+]|\d+\.)\s/.test(o),l=/^ +\S/.test(s)&&!/^\s*([-*+]|\d+\.)\s/.test(s),u=a&&l;if(!u&&(Kz(o)||Kz(s)))continue;let c=`${o}
${s}`;if(i.indexOf(c)!==-1)continue;let d=[{joiner:" ",b:s},{joiner:"",b:s}];if(u){let f=s.replace(/^\s+/,"");d.push({joiner:" ",b:f})}for(let{joiner:f,b:p}of d){let h=`${o}${f}${p}`,m=i.indexOf(h);if(m!==-1){i=i.slice(0,m)+c+i.slice(m+h.length);break}}}return i}function Kz(e){return/^\s*(#{1,6}\s|[-*+]\s|\d+\.\s|>\s|```|\|.*\|\s*$|---|\s*$)/.test(e)}function MW(e,t){let n=t.replace(/\r\n/g,`
`).split(`
`),i=!1,r=e.split(`
`);for(let o=0;o<r.length;o+=1){let s=r[o];if(/^\s*```/.test(s)){i=!i;continue}if(i||!/\\[\[\]~]/.test(s))continue;let a=Gz(s);if(n.some(u=>Gz(u)===a)){if(n.find(c=>c===s)!==void 0)continue;r[o]=a}}return r.join(`
`)}function Gz(e){return e.replace(/\\([\[\]~])/g,"$1")}function NW(e,t){let n=t.replace(/\r\n/g,`
`).split(`
`),i=!1,r=e.split(`
`);for(let o=0;o<r.length;o+=1){let s=r[o];if(/^\s*```/.test(s)){i=!i;continue}if(i||!/&(?:lt|gt|amp);/.test(s))continue;let a=Xz(s);!n.some(c=>Xz(c)===a)||n.find(c=>c===s)!==void 0||(r[o]=a)}return r.join(`
`)}function Xz(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function DW(e,t){let n=t.replace(/\r\n/g,`
`).split(`
`),i=[];for(let o of n)/[^ ] $/.test(o)&&i.push(o.slice(0,-2));if(i.length===0)return e;let r=e;for(let o of i){let s=`${o}\\
`;if(r.includes(s)){r=r.replace(s,`${o}
`);continue}let a=`${o}
`,l=r.indexOf(a);l!==-1&&(r=r.slice(0,l)+`${o}
`+r.slice(l+a.length))}return r}function OW(e,t){let n=t.replace(/\r\n/g,`
`).split(`
`),i=new Set;for(let s=0;s<n.length-1;s+=1){let a=n[s],l=n[s+1];a&&l&&i.add(`${a}${l}`)}let r=e.split(`
`),o=[];for(let s=0;s<r.length;s+=1){let a=r[s];if(a===""&&s>0&&s<r.length-1){let l=r[s-1],u=r[s+1];if(l&&u&&i.has(`${l}${u}`))continue}o.push(a)}return o.join(`
`)}function RW(){return[j6.configure({heading:{levels:[1,2,3,4,5,6]},codeBlock:{HTMLAttributes:{class:"code-viewer"}},link:{openOnClick:!1,autolink:!0,HTMLAttributes:{"data-markdown-link":"true"}},strike:!1}),Z6.configure({allowBase64:!0,inline:!0}),xb.configure({resizable:!1,HTMLAttributes:{class:"markdown-table"}}),Ua,Ba,Fa,Bz.configure({html:!0,tightLists:!0,bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!0,transformCopiedText:!1})]}function Yz(e,t){if(e===t)return[];let n=e.split(`
`),i=t.split(`
`),r=n.length,o=i.length,s=[];if(r*o>1e6)return Rv(n,i,0,r,0,o);let a=Array.from({length:r+1},()=>Array(o+1).fill(0));for(let p=1;p<=r;p+=1)for(let h=1;h<=o;h+=1)a[p][h]=n[p-1]===i[h-1]?a[p-1][h-1]+1:Math.max(a[p-1][h],a[p][h-1]);let l=[],u=r,c=o;for(;u>0&&c>0;)n[u-1]===i[c-1]?(l.unshift([u-1,c-1]),u-=1,c-=1):a[u-1][c]>=a[u][c-1]?u-=1:c-=1;let d=0,f=0;for(let[p,h]of l)(p>d||h>f)&&s.push({fromLine:Math.max(1,f-3),toLine:Math.max(f+1,h+3)}),d=p+1,f=h+1;return(d<r||f<o)&&s.push({fromLine:Math.max(1,f-3),toLine:Math.max(f+1,o+3)}),s}function Rv(e,t,n,i,r,o){for(;n<i&&r<o&&e[n]===t[r];)n++,r++;for(;n<i&&r<o&&e[i-1]===t[o-1];)i--,o--;if(n===i&&r===o)return[];let s=new Map,a=new Map;for(let l=n;l<i;l+=1){let u=s.get(e[l]);s.set(e[l],{count:(u?.count??0)+1,index:l})}for(let l=r;l<o;l+=1){let u=a.get(t[l]);a.set(t[l],{count:(u?.count??0)+1,index:l})}for(let l=n;l<i;l+=1){let u=s.get(e[l]),c=a.get(e[l]);if(u?.count===1&&c?.count===1)return[...Rv(e,t,n,l,r,c.index),...Rv(e,t,l+1,i,c.index+1,o)]}return[{fromLine:Math.max(1,r-3),toLine:Math.max(r+1,o+3)}]}function Qz(e,t){let n=t.relatedTarget,i=e?.closest(".tool-shell");return!!(n&&(e?.contains(n)||i?.contains(n)))}function PW(){return`
<button class="markdown-format-button" type="button" data-format="bold"><strong>B</strong></button>
<button class="markdown-format-button" type="button" data-format="italic"><em>I</em></button>
<button class="markdown-format-button" type="button" data-format="strike"><span style="text-decoration:line-through">S</span></button>
<span class="markdown-format-sep" aria-hidden="true"></span>
<label class="markdown-format-size" title="Block style" aria-label="Block style">
<select id="markdown-block-style">
<option value="p" selected>Normal</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
</select>
</label>
<span class="markdown-format-sep" aria-hidden="true"></span>
<button class="markdown-format-button" type="button" data-format="quote" title="Quote" aria-label="Quote">❝</button>
<button class="markdown-format-button" type="button" data-format="list" title="List" aria-label="List">•</button>
<button class="markdown-format-button" type="button" data-format="link" title="Link" aria-label="Link">🔗</button>
<button class="markdown-format-button" type="button" data-format="code" title="Code" aria-label="Code">‹›</button>
`}function eM(e){return e==="raw"?'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>':'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"></path><path d="M4 12h10"></path><path d="M4 17h7"></path></svg>'}function LW(e,t){return e.filter(i=>i.text===t.text).length<=1?t.text:`${t.text} (#${t.id})`}function nM(){return'<button class="markdown-editor-copy-button" type="button" id="copy-active-markdown" title="Copy" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg><span>Copy</span></button>'}function rM(e){return`
<div class="markdown-editor-mode-toggle" role="tablist" aria-label="Editor mode">
<div class="markdown-editor-mode-toggle-indicator markdown-editor-mode-toggle-indicator--${e}" aria-hidden="true"></div>
<button class="markdown-editor-mode-option${e==="raw"?" is-active":""}" type="button" id="markdown-mode-raw" role="tab" aria-selected="${e==="raw"?"true":"false"}" title="Raw" aria-label="Raw">${eM("raw")}<span>Raw</span></button>
<button class="markdown-editor-mode-option${e==="markdown"?" is-active":""}" type="button" id="markdown-mode-markdown" role="tab" aria-selected="${e==="markdown"?"true":"false"}" title="Preview" aria-label="Preview">${eM("markdown")}<span>Preview</span></button>
</div>
`}function iM(e){let t=e.view==="markdown";return`
<div class="markdown-editor-shell markdown-editor-shell--${e.view}">
<section class="markdown-editor-pane markdown-editor-pane--${e.view}" aria-label="Markdown editor">
${t?`<div id="markdown-editor-context-menu" class="markdown-editor-context-menu" hidden>${PW()}</div><div id="markdown-link-modal" class="markdown-link-modal" hidden><div class="markdown-link-modal-card"><div class="markdown-link-mode-tabs"><button type="button" id="markdown-link-mode-file" class="markdown-link-mode-tab is-active">File</button><button type="button" id="markdown-link-mode-url" class="markdown-link-mode-tab">URL</button></div><div id="markdown-link-file-fields"><label class="markdown-link-modal-label" for="markdown-link-search">Find note</label><input id="markdown-link-search" class="markdown-link-modal-input" type="text" placeholder="Search files..." /><div id="markdown-link-results" class="markdown-link-results"></div><label class="markdown-link-modal-label" for="markdown-link-heading">Heading</label><select id="markdown-link-heading" class="markdown-link-modal-input markdown-link-modal-select"><option value="">None</option></select><label class="markdown-link-modal-label" for="markdown-link-alias">Alias</label><input id="markdown-link-alias" class="markdown-link-modal-input" type="text" placeholder="Optional label" /></div><div id="markdown-link-url-fields" hidden><label class="markdown-link-modal-label" for="markdown-link-input">URL</label><input id="markdown-link-input" class="markdown-link-modal-input" type="url" placeholder="https://example.com" /><label class="markdown-link-modal-label" for="markdown-link-label">Label</label><input id="markdown-link-label" class="markdown-link-modal-input" type="text" placeholder="Optional label" /></div><div class="markdown-link-modal-actions"><button type="button" id="markdown-link-cancel" class="markdown-link-modal-button">Cancel</button><button type="button" id="markdown-link-apply" class="markdown-link-modal-button markdown-link-modal-button--primary">Insert</button></div></div></div>`:""}
<div id="markdown-editor-root" class="markdown-editor-root"></div>
</section>
</div>
`}function FW(e){let t=e.selectionStart,n=e.selectionEnd,i=`${e.value.slice(0,t)} ${e.value.slice(n)}`;e.value=i,e.selectionStart=t+1,e.selectionEnd=t+1}function Ov(e){let t=Li(),n=Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6"));for(let i of n){let r=i.textContent?.trim()??"";if(!r){i.hasAttribute("id")&&i.removeAttribute("id"),i.hasAttribute("data-heading-id")&&i.removeAttribute("data-heading-id");continue}let o=t(r);i.id!==o&&(i.id=o),i.getAttribute("data-heading-id")!==o&&i.setAttribute("data-heading-id",o)}}function oM(e){let t=e.target.closest(".markdown-editor-shell"),n=t?.querySelector("#markdown-editor-context-menu"),i=t?Array.from(t.querySelectorAll("[data-format]")):[],r=t?.querySelector("#markdown-block-style"),o=t?.querySelector("#markdown-link-modal"),s=t?.querySelector("#markdown-link-mode-file"),a=t?.querySelector("#markdown-link-mode-url"),l=t?.querySelector("#markdown-link-file-fields"),u=t?.querySelector("#markdown-link-url-fields"),c=t?.querySelector("#markdown-link-search"),d=t?.querySelector("#markdown-link-results"),f=t?.querySelector("#markdown-link-heading"),p=t?.querySelector("#markdown-link-alias"),h=t?.querySelector("#markdown-link-input"),m=t?.querySelector("#markdown-link-label"),b=t?.querySelector("#markdown-link-apply"),g=t?.querySelector("#markdown-link-cancel"),v="file",x=[],k=null,E="Search for a file to link",C=0,M=0;if(e.view==="markdown"){e.target.replaceChildren();let Y=!1,A=()=>{Y=!0},{editorInput:Z,context:q}=CW(e.value),re=()=>{let D=_.storage.markdown?.getMarkdown()??"";return TW(D,q)},pe="",_=new FA({element:e.target,extensions:RW(),content:Z,editorProps:{attributes:{class:"markdown-editor-surface markdown-editor-surface--markdown markdown markdown-doc",role:"textbox","aria-multiline":"true"}},onUpdate:({editor:$})=>{if(Ov($.view.dom),!Y)return;let D=re(),U=Yz(pe,D);pe=D,e.onChange(D,U)},onSelectionUpdate:()=>{O()},onBlur:({event:$})=>{Qz(t,$)||(n&&(n.hidden=!0),e.onBlur?.())}});pe=re();let S=_.view.dom;Ov(S);let O=()=>{if(!n)return;let{from:$,to:D,empty:U}=_.state.selection;if(U||!_.isFocused){n.hidden=!0;return}let ue=_.view.coordsAtPos($),Se=_.view.coordsAtPos(D),at=t;if(!at)return;let Mn=at.getBoundingClientRect(),Xr=(ue.left+Se.right)/2;n.hidden=!1;let Jo=Math.max(12,Xr-Mn.left-n.offsetWidth/2),_f=Math.max(12,ue.top-Mn.top-n.offsetHeight-10);n.style.left=`${Jo}px`,n.style.top=`${_f}px`},L=($=[],D="None")=>{if(!f)return;f.replaceChildren();let U=document.createElement("option");U.value="",U.textContent=D,f.appendChild(U);for(let ue of $){let Se=document.createElement("option");Se.value=ue.id,Se.textContent=LW($,ue),Se.dataset.headingText=ue.text,f.appendChild(Se)}},oe=async $=>{if(!f)return;let D=++M;L([],"Loading\u2026");try{let U=await e.loadHeadings?.($.path)??[];if(D!==M||k?.path!==$.path)return;L(U)}catch{if(D!==M||k?.path!==$.path)return;L([],"Failed to load headings")}},ee=()=>{if(!d)return;if(x.length===0){let D=document.createElement("div");D.className="markdown-link-results-empty",D.textContent=E,d.replaceChildren(D);return}let $=document.createDocumentFragment();for(let D of x){let U=document.createElement("button");U.type="button",U.className=`markdown-link-result${k?.path===D.path?" is-active":""}`,U.dataset.linkPath=D.path;let ue=document.createElement("span");ue.className="markdown-link-result-title",ue.textContent=D.title;let Se=document.createElement("span");Se.className="markdown-link-result-path",Se.textContent=D.relativePath,U.append(ue,Se),U.addEventListener("click",()=>{k=D,ee(),oe(D)}),$.appendChild(U)}d.replaceChildren($)},$e=$=>{v=$,s?.classList.toggle("is-active",$==="file"),a?.classList.toggle("is-active",$==="url"),l&&(l.hidden=$!=="file"),u&&(u.hidden=$!=="url")},ft=async()=>{if(!c||!e.searchLinks)return;let $=c.value.trim();if($.length===0){C+=1,x=[],k=null,E="Search for a file to link",L(),ee();return}let D=++C;try{let U=await e.searchLinks($);if(D!==C||$!==c.value.trim())return;x=U,k=U[0]??null,E=U.length===0?"No matching files found":"Search for a file to link",ee(),k?oe(k):L()}catch{if(D!==C)return;x=[],k=null,E="Search failed. Try again.",L(),ee()}},ke=()=>{o?.setAttribute("hidden",""),h&&(h.value=""),m&&(m.value=""),p&&(p.value=""),c&&(c.value=""),L(),x=[],k=null,E="Search for a file to link",ee()},Re=()=>{if(!o)return;let $=_.state.doc.textBetween(_.state.selection.from,_.state.selection.to," ").trim();o.removeAttribute("hidden"),$e("url"),m&&(m.value=$),h&&(h.value="",h.focus()),x=[],k=null,E="Search for a file to link",L(),ee()},vt=()=>{if(A(),v==="url"){let $=h?.value?.trim();if(!$){ke();return}let D=m?.value?.trim()||$,{from:U,to:ue,empty:Se}=_.state.selection;Se?_.chain().focus().insertContent({type:"text",text:D,marks:[{type:"link",attrs:{href:$}}]}).run():_.chain().focus().deleteRange({from:U,to:ue}).insertContent({type:"text",text:D,marks:[{type:"link",attrs:{href:$}}]}).run()}else if(k){let $=f?.value?.trim(),D=f?.selectedOptions[0]?.dataset.headingText?.trim(),U=p?.value?.trim(),Se=`[[${k.path===e.currentFilePath?"":k.wikiPath}${$?`#${$}`:""}${U?`|${U}`:""}]]`,at=`${k.relativePath}${$?`#${$}`:""}`,Mn=U||D||k.title,{from:Xr,to:Jo,empty:_f}=_.state.selection,Yv=_.chain().focus();_f||Yv.deleteRange({from:Xr,to:Jo}),Yv.insertContent({type:"text",text:Mn,marks:[{type:"link",attrs:{href:at,title:`mcp-wiki:${encodeURIComponent(Se)}`}}]}).run()}ke()},It=$=>{let U=$.currentTarget.dataset.format;if(U)switch(A(),U){case"bold":_.chain().focus().toggleBold().run();break;case"italic":_.chain().focus().toggleItalic().run();break;case"strike":_.chain().focus().toggleStrike().run();break;case"quote":_.chain().focus().toggleBlockquote().run();break;case"list":_.chain().focus().toggleBulletList().run();break;case"code":_.chain().focus().toggleCode().run();break;case"link":Re();break}},Xe=()=>{let $=r?.value;if(!$)return;if($==="p"){A(),_.chain().focus().setParagraph().run();return}let D=/^h([1-6])$/.exec($);if(D){A();let U=Number.parseInt(D[1],10);_.chain().focus().toggleHeading({level:U}).run()}},Ne=document.createElement("div");Ne.className="markdown-link-popover",Ne.hidden=!0,S.parentElement?.appendChild(Ne);let Ye=null,Bi=$=>{Ye&&(clearTimeout(Ye),Ye=null);let D=$.getAttribute("href")??"";Ne.innerHTML='<button class="markdown-link-popover-btn" id="link-popover-edit" type="button" title="Edit link"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg></button><button class="markdown-link-popover-btn" id="link-popover-open" type="button" title="Open link"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg></button>',Ne.hidden=!1,Ne.querySelector("#link-popover-open")?.addEventListener("click",at=>{at.preventDefault(),at.stopPropagation(),Ne.hidden=!0,$.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))},{once:!0}),Ne.querySelector("#link-popover-edit")?.addEventListener("click",at=>{if(at.preventDefault(),at.stopPropagation(),Ne.hidden=!0,!o)return;let Mn=_.view.posAtDOM($,0);if(Mn>=0){let Jo=Mn+($.textContent?.length??0);_.chain().focus().setTextSelection({from:Mn,to:Jo}).run()}let Xr=$.textContent?.trim()??"";o.removeAttribute("hidden"),$e("url"),h&&(h.value=D),m&&(m.value=Xr)},{once:!0});let U=$.getBoundingClientRect(),ue=S.parentElement;if(!ue)return;let Se=ue.getBoundingClientRect();Ne.style.left=`${Math.max(4,U.left-Se.left)}px`,Ne.style.top=`${U.bottom-Se.top+4}px`},An=()=>{Ye=setTimeout(()=>{Ne.hidden=!0},200)},le=$=>{let D=$.target?.closest?.("a[href]");D&&S.contains(D)&&Bi(D)},Vo=$=>{$.target?.closest?.("a[href]")&&An()},st=()=>{Ye&&(clearTimeout(Ye),Ye=null)},Ae=()=>{An()},Gr=()=>$e("file"),zn=()=>{$e("url"),h?.focus()},Ui=()=>{ft()},ji=$=>{$.target===o&&ke()};return S.addEventListener("beforeinput",A),S.addEventListener("paste",A),S.addEventListener("cut",A),S.addEventListener("drop",A),S.addEventListener("mouseover",le),S.addEventListener("mouseout",Vo),Ne.addEventListener("mouseenter",st),Ne.addEventListener("mouseleave",Ae),i.forEach($=>$.addEventListener("click",It)),r?.addEventListener("change",Xe),s?.addEventListener("click",Gr),a?.addEventListener("click",zn),c?.addEventListener("input",Ui),b?.addEventListener("click",vt),g?.addEventListener("click",ke),o?.addEventListener("click",ji),typeof e.initialScrollTop=="number"&&(S.scrollTop=e.initialScrollTop),ee(),{destroy:()=>{S.removeEventListener("beforeinput",A),S.removeEventListener("paste",A),S.removeEventListener("cut",A),S.removeEventListener("drop",A),S.removeEventListener("mouseover",le),S.removeEventListener("mouseout",Vo),Ne.removeEventListener("mouseenter",st),Ne.removeEventListener("mouseleave",Ae),i.forEach($=>$.removeEventListener("click",It)),r?.removeEventListener("change",Xe),s?.removeEventListener("click",Gr),a?.removeEventListener("click",zn),c?.removeEventListener("input",Ui),b?.removeEventListener("click",vt),g?.removeEventListener("click",ke),o?.removeEventListener("click",ji),Ne.remove(),Ye&&clearTimeout(Ye),_.destroy(),e.target.replaceChildren()},focus:()=>{_.commands.focus()},getValue:()=>re(),setValue:$=>{_.commands.setContent(Xa($),{emitUpdate:!1}),pe=re(),Ov(S)},revealLine:($,D)=>{if(D){let U=S.querySelector(`#${CSS.escape(D)}`);if(U){U.scrollIntoView({block:"start",inline:"nearest"}),S.scrollTop=Math.max(S.scrollTop-24,0),U.setAttribute("tabindex","-1"),U.focus({preventScroll:!0});return}}_.commands.focus()},setScrollTop:$=>{S.scrollTop=Math.max(0,$)}}}let z=document.createElement("textarea");z.className="markdown-editor-textarea markdown-editor-textarea--raw",z.spellcheck=!1,z.setAttribute("autocomplete","off"),z.setAttribute("autocorrect","off"),z.setAttribute("autocapitalize","off"),z.placeholder="Edit raw markdown...",z.value=e.value;let H=z.value;e.target.replaceChildren(z);let ce=()=>{z.style.height="auto",z.style.height=`${Math.max(z.scrollHeight,640)}px`},Ze=()=>{let Y=z.value,A=Yz(H,Y);H=Y,e.onChange(Y,A)},Fe=()=>{ce(),Ze()},Ie=Y=>{Qz(t,Y)||e.onBlur?.()},ve=Y=>{Y.key==="Tab"&&(Y.preventDefault(),FW(z),ce(),Ze())};return z.addEventListener("input",Fe),z.addEventListener("keydown",ve),z.addEventListener("focusout",Ie),ce(),typeof e.initialScrollTop=="number"&&(z.scrollTop=e.initialScrollTop),{destroy:()=>{z.removeEventListener("input",Fe),z.removeEventListener("keydown",ve),z.removeEventListener("focusout",Ie),e.target.replaceChildren()},focus:()=>{z.focus()},getValue:()=>z.value,setValue:Y=>{z.value=Y,H=Y,ce()},revealLine:Y=>{let A=Math.max(1,Math.floor(Y)),Z=z.value.split(`
`),q=0;for(let pe=1;pe<A&&pe<=Z.length;pe+=1)q+=Z[pe-1].length+1;z.focus(),z.setSelectionRange(q,q);let re=Number.parseFloat(window.getComputedStyle(z).lineHeight||"20")||20;z.scrollTop=Math.max(0,(A-1)*re-re*2)},setScrollTop:Y=>{z.scrollTop=Math.max(0,Y)}}}function sM(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>'}function BW(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>'}function UW(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h11a5 5 0 1 1 0 10h-1"/></svg>'}function jW(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>'}function ZW(e){return e.fileDeleted?'<span class="panel-save-status panel-save-status--saved">File deleted</span>':e.saveIndicator!=="saved"?"":`<span class="panel-save-status panel-save-status--${e.saving?"saving":"saved"}">Saved</span>`}function aM(e){let t=Vt(e.payload.content),n=e.body.notice?`<div class="notice">${e.body.notice}</div>`:"",i=CC(e.payload.filePath),r=t?t.toLine-t.fromLine+1:Zm(e.payload.content),o=e.payload.fileType==="markdown"?"MARKDOWN":e.payload.fileType==="html"?"HTML":e.payload.fileType==="image"?"IMAGE":e.payload.fileType==="directory"?"DIRECTORY":e.fileExtension!=="none"?e.fileExtension.toUpperCase():"TEXT",s=t?.isPartial?`View lines ${t.fromLine}\u2013${t.toLine}`:e.payload.fileType==="directory"?"View directory":"View file",a=t?.isPartial?`${o} \u2022 LINES ${t.fromLine}\u2013${t.toLine} OF ${t.totalLines}`:`${o} \u2022 ${r} LINE${r!==1?"S":""}`;if(e.markdownWorkspace){let C=tt(e.markdownWorkspace.draftContent),M=C.trim().split(/\s+/).filter(Boolean).length,z=Zm(C);a=`${o} \u2022 EDIT MODE \u2022 ${z} LINES \u2022 ${M} WORDS`}let l=e.currentDisplayMode==="fullscreen",u=e.payload.fileType==="html"?`<button class="panel-action" id="toggle-html-mode">${e.htmlMode==="rendered"?"Source":"Rendered"}</button>`:"",c=e.hasDirectoryBackButton&&e.payload.fileType!=="directory"?'<button class="panel-action dir-back-btn" id="dir-back" title="Back to directory">\u2190 Back</button>':"",d=e.payload.fileType==="markdown",f=d&&!!e.markdownWorkspace,p=f&&(e.markdownWorkspace.fileDeleted||e.markdownWorkspace.loadingDocument||!e.isMarkdownUndoAvailable),h=f&&e.markdownWorkspace.fileDeleted,m=t?.isPartial&&t.fromLine>1,b=t?.isPartial&&t.toLine<t.totalLines&&t.totalLines-t.toLine>1,g=m?`<button class="load-lines-banner" id="load-before">\u2191 Load lines 1\u2013${t.fromLine-1}</button>`:"",v=b?`<button class="load-lines-banner" id="load-after">\u2193 Load lines ${t.toLine+1}\u2013${t.totalLines}</button>`:"",x=e.isExpanded||l,k=e.capabilities.canOpenInFolder,E=e.capabilities.canCopy;return{effectiveExpanded:x,html:`
<main id="tool-shell" class="shell tool-shell ${x?"expanded":"collapsed"}${e.hideSummaryRow?" host-framed":""}${l?" fullscreen":""}">
${l?"":Gs({id:"compact-toggle",label:s,filename:e.payload.fileName,variant:"ready",expandable:!0,expanded:e.isExpanded,interactive:!0})}
<section class="panel">
<div class="panel-topbar">
${c}
${e.hideSummaryRow?"":`<span class="panel-breadcrumb" title="${pn(e.payload.filePath)}">${i}</span>`}
<span class="panel-topbar-actions">
${f?ZW(e.markdownWorkspace):""}
${u}
${f&&l?rM(e.markdownWorkspace.editorView):""}
${d&&!l&&e.canGoFullscreen?`<button class="panel-action" id="expand-fullscreen" title="Expand" aria-label="Expand">${jW()}</button>`:""}
${f?`<button class="panel-action" id="revert-markdown" ${l?"":'title="Undo" aria-label="Undo" '}${p?"disabled":""}>${UW()}${l?" Undo":""}</button>`:""}
${f&&l?nM():""}
${d&&!l?`<button class="panel-action" id="copy-active-markdown" title="Copy" aria-label="Copy">${sM()}</button>`:""}
${E&&e.capabilities.supportsPreview&&!d?`<button class="panel-action" id="copy-source" title="Copy source" aria-label="Copy source">${sM()}</button>`:""}
${k&&f&&l?`<button class="panel-action" id="open-in-editor" ${h?"disabled":""}>${e.markdownEditorAppIcon} Open in ${pn(e.defaultMarkdownEditorName??"editor")}</button>`:""}
${k&&!(f&&l)?`<button class="panel-action" id="open-in-folder" title="Open in folder" aria-label="Open in folder" ${f&&h?"disabled":""}>${BW()}</button>`:""}
</span>
</div>
${n}
<div class="panel-content-wrapper">
${g}
${e.body.html}
${v}
</div>
<div class="panel-footer">
<span>${a}</span>
</div>
</section>
</main>
`}}var HW={js:"javascript",cjs:"javascript",mjs:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",ini:"ini",xml:"xml",html:"html",htm:"html",css:"css",scss:"css",less:"css",sh:"bash",bash:"bash",zsh:"bash",py:"python",rb:"ruby",java:"java",go:"go",rs:"rust",sql:"sql",md:"markdown",markdown:"markdown"};function qW(e){let t=e.toLowerCase().match(/\.([a-z0-9]+)$/);return t?t[1]:""}function Pv(e){let t=qW(e);return HW[t]??"text"}function lM(e,t){if(Pv(t)!=="json")return{content:e};try{return{content:`${JSON.stringify(JSON.parse(e),null,2)}
`}}catch{return{content:e,notice:"Invalid JSON. Showing raw source."}}}function Ya(e,t="text",n=1){let o=ec(e,t||"text").split(`
`);return o.length>0&&o[o.length-1]===""&&o.pop(),`<pre class="code-viewer"><table class="code-table"><tbody>${o.map((a,l)=>{let u=n+l;return`<tr class="code-line" data-line="${u}"><td class="line-num" data-line="${u}">${u}</td><td class="line-content">${a||" "}</td></tr>`}).join(`
`)}</tbody></table></pre>`}function WW(){if(typeof window>"u"||typeof document>"u")return{background:"Canvas",text:"CanvasText",fontFamily:"system-ui, sans-serif"};let e=window.getComputedStyle(document.documentElement),t=e.getPropertyValue("--panel").trim()||"Canvas",n=e.getPropertyValue("--text").trim()||"CanvasText",i=e.getPropertyValue("--font-sans").trim()||"system-ui, sans-serif";return{background:t,text:n,fontFamily:i}}function VW(e){let t=WW(),n=`<!doctype html><html><head><meta charset="utf-8" /><style>html,body{margin:0;padding:0;background:${t.background};color:${t.text};}body{font-family:${t.fontFamily};padding:16px;line-height:1.5;}img{max-width:100%;height:auto;}</style></head><body>${e}</body></html>`;return`<iframe class="html-rendered-frame" title="Rendered HTML preview" sandbox="allow-scripts allow-forms allow-popups" referrerpolicy="no-referrer" srcdoc="${wt(n)}"></iframe>`}function uM(e,t){if(t==="source")return{html:`<div class="panel-content source-content">${Ya(e,"html")}</div>`};try{return{html:`<div class="panel-content html-content">${VW(e)}</div>`}}catch{return{html:`<div class="panel-content source-content">${Ya(e,"html")}</div>`,notice:"HTML renderer failed. Showing source instead."}}}var JW=new Set(["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/svg","image/svg+xml"]);function Lv(e){return e?e.toLowerCase().split(";",1)[0].trim():""}function cM(e){let t=Lv(e);return t.length>0&&JW.has(t)}function dM(e){return`<pre class="code-viewer"><code class="hljs language-text">${wt(e)}</code></pre>`}function KW(e){let t=Lv(e.mimeType);if(!cM(t))return{notice:"Preview is unavailable for this image format.",html:'<div class="panel-content source-content"></div>'};if(!e.content||e.content.trim().length===0)return{notice:"Preview is unavailable because image data is missing.",html:'<div class="panel-content source-content"></div>'};let n=`data:${t};base64,${e.content}`;return{html:`<div class="panel-content image-content"><div class="image-preview"><img src="${wt(n)}" alt="${wt(e.fileName)}" loading="eager" decoding="async"></div></div>`}}function Qa(e,t){return{supportsPreview:!0,canCopy:t,canOpenInFolder:!zr(e.filePath)}}var Fv={directory:{getCapabilities:e=>Qa(e,!1),renderBody:({payload:e})=>IC(tt(e.content),e.filePath)},html:{getCapabilities:e=>Qa(e,!0),renderBody:({payload:e,htmlMode:t})=>uM(tt(e.content),t)},image:{getCapabilities:e=>Qa(e,!1),renderBody:({payload:e})=>KW(e)},markdown:{getCapabilities:e=>Qa(e,!1),renderBody:({payload:e,markdownController:t})=>{try{return t.buildBody(e)}catch{return{notice:"Markdown renderer failed. Showing raw source instead.",html:`<div class="panel-content source-content">${dM(tt(e.content))}</div>`}}}},text:{getCapabilities:e=>Qa(e,!0),renderBody:({payload:e,startLine:t})=>{let n=tt(e.content),i=Pv(e.filePath),r=lM(n,e.filePath);return{notice:r.notice,html:`<div class="panel-content source-content">${Ya(r.content,i,t)}</div>`}}},unsupported:{getCapabilities:e=>{let t=tt(e.content).trim().length>0;return{supportsPreview:t,canCopy:t,canOpenInFolder:!zr(e.filePath)}},renderBody:({payload:e})=>{let t=tt(e.content);return t.trim().length===0?{notice:"Preview is not available for this file type.",html:'<div class="panel-content source-content"></div>'}:{html:`<div class="panel-content source-content">${dM(t)}</div>`}}}};function fM(e){return Fv[e.fileType]?.getCapabilities(e)??{supportsPreview:!1,canCopy:!1,canOpenInFolder:!zr(e.filePath)}}function pM(e){return(Fv[e.payload.fileType]??Fv.text).renderBody(e)}function Uo(e){return`'${e.replace(/'/g,"'\\''")}'`}function hM(e){let t=[];for(let i=0;i<e.length;i+=1){let r=e.charCodeAt(i);t.push(r&255,r>>8)}let n="";for(let i of t)n+=String.fromCharCode(i);return btoa(n)}function Bv(e,t){let n=e.trim();if(!n||t(n))return;let i=navigator.userAgent.toLowerCase();if(i.includes("win")){let o=`Start-Process -FilePath explorer.exe -ArgumentList @('/select,','${n.replace(/'/g,"''")}')`;return`powershell.exe -NoProfile -NonInteractive -EncodedCommand ${hM(o)}`}return i.includes("mac")?`open -R ${Uo(n)}`:`xdg-open ${Uo(Fi(n))}`}function mM(e,t,n){let i=e.trim();if(!i||t(i))return;let r=n.get(i);if(r?.appPath&&navigator.userAgent.toLowerCase().includes("mac"))return`open -a ${Uo(r.appPath)} ${Uo(i)}`;let o=navigator.userAgent.toLowerCase();if(o.includes("win")){let a=`Start-Process -FilePath '${i.replace(/'/g,"''")}'`;return`powershell.exe -NoProfile -NonInteractive -EncodedCommand ${hM(a)}`}return o.includes("mac")?`open ${Uo(i)}`:`xdg-open ${Uo(i)}`}function gM(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z"/></svg>'}function bM(e){if(e.isMarkdownEditing)return e.previousAbortController&&e.previousAbortController.abort(),null;let t=document.querySelector(".panel-content-wrapper");if(!t)return e.previousAbortController;let n=t;e.previousAbortController?.abort();let i=new AbortController,r=null,o="",s=null;function a(d){if(!r)return;let p=d.getRangeAt(0).getBoundingClientRect(),h=n.getBoundingClientRect(),m=p.left+p.width/2-h.left,b=p.top-h.top+n.scrollTop-32,g=r.offsetWidth||200;m=Math.max(8,Math.min(m-g/2,n.clientWidth-g-8)),b=Math.max(4,b),r.style.left=`${m}px`,r.style.top=`${b}px`}function l(d){s&&(clearTimeout(s),s=null),r||(r=document.createElement("div"),r.className="selection-hint",r.textContent="AI can see your selection",n.appendChild(r)),r.classList.add("visible"),a(d)}function u(){r&&(r.classList.remove("visible"),s=setTimeout(()=>{r?.remove(),r=null},200))}function c(d){let f=d.anchorNode?.parentElement?.closest(".code-line"),p=d.focusNode?.parentElement?.closest(".code-line");if(f&&p){let h=parseInt(f.dataset.line??"",10),m=parseInt(p.dataset.line??"",10);if(!isNaN(h)&&!isNaN(m)){let b=Math.min(h,m),g=Math.max(h,m);return b===g?`line ${b}`:`lines ${b}\u2013${g}`}}return""}return document.addEventListener("selectionchange",()=>{let d=document.getSelection();if(!d||d.isCollapsed){o&&(o="",e.updateContext?.(""),u());return}let f=d.toString().trim();if(!f||f===o)return;let p=n.contains(d.anchorNode),h=n.contains(d.focusNode);if(!p&&!h){o&&(o="",e.updateContext?.(""),u());return}o=f;let m=c(d),b=m?` (${m})`:"",g=`User selected text from file ${e.payload.filePath}${b}:
\`\`\`
${f}
\`\`\``;e.updateContext?.(g),l(d),e.trackUiEvent?.("text_selected",{file_type:e.payload.fileType,file_extension:e.getFileExtensionForAnalytics(e.payload.filePath),char_count:f.length})},{signal:i.signal}),i}function Uv(e,t){Array.from(e.querySelectorAll("[data-toc-id]")).forEach(i=>{let r=i.dataset.tocId===t;i.classList.toggle("is-active",r),i.setAttribute("aria-current",r?"location":"false")})}function vM(e,t){return e.map(n=>`<button class="document-outline-link markdown-toc-link${n.id===t?" is-active":""}" type="button" data-toc-id="${pn(n.id)}" data-level="${n.level}" aria-current="${n.id===t?"location":"false"}">${pn(n.text)}</button>`).join("")}function yM(){return'<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>'}function GW(){return'<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>'}function xM(e,t){return e.length===0?"":`
<aside class="document-outline-shell markdown-toc-shell" aria-label="Table of contents">
<div class="document-outline-header markdown-toc-header">
<span class="document-outline-title markdown-toc-title">Contents</span>
<button class="document-outline-toggle" id="toc-toggle" type="button" title="Collapse sidebar" aria-label="Collapse sidebar">${yM()}</button>
</div>
<nav class="document-outline-nav markdown-toc-nav">${vM(e,t)}</nav>
</aside>
`}function kM(e){let t=e.shell.querySelector(".document-outline-nav");if(!t)return null;let n=e.outline,i=a=>{let c=a.target?.closest("[data-toc-id]")?.dataset.tocId;c&&(e.onSelect(c),Uv(t,c))},r=()=>{let a=n.map(c=>{let d=document.getElementById(c.id);return d?{item:c,element:d}:null}).filter(c=>c!==null);if(a.length===0)return;let l=e.scrollContainer.scrollTop,u=a.reduce((c,d)=>d.element.offsetTop-l<=96?d.item.id:c,a[0].item.id);Uv(t,u)},o=e.shell.querySelector("#toc-toggle"),s=()=>{let a=e.shell.classList.toggle("markdown-toc-collapsed");o&&(o.innerHTML=a?GW():yM(),o.title=a?"Expand sidebar":"Collapse sidebar",o.setAttribute("aria-label",a?"Expand sidebar":"Collapse sidebar"))};return o?.addEventListener("click",s),t.addEventListener("click",i),e.scrollContainer.addEventListener("scroll",r,{passive:!0}),r(),{dispose:()=>{t.removeEventListener("click",i),e.scrollContainer.removeEventListener("scroll",r),o?.removeEventListener("click",s)},refresh:(a,l)=>{n=a,t.innerHTML=vM(n,l),Uv(t,l??null),r()}}}function _M(e){if(!e)return"";let t=Array.isArray(e.children)?e.children:[];return t.length===0?typeof e.content=="string"?e.content:"":t.map(n=>typeof n.content=="string"?n.content:"").join("")}var XW=Jr;function hf(e={}){return new XW({html:!1,linkify:!0,typographer:!1,...e.highlight?{highlight:e.highlight}:{}})}function mf(e){return Xa(e)}function gf(e,t,n){let i=e[t];if(i?.type!=="heading_open"||typeof i.tag!="string")return null;let r=Number.parseInt(i.tag.replace(/^h/i,""),10);if(!Number.isFinite(r))return null;let o=e[t+1],s=_M(o).trim();if(!s)return null;let a=Array.isArray(i.map)?i.map:void 0;return{id:n(s),text:s,level:r,line:typeof a?.[0]=="number"?a[0]+1:t+1}}var YW=hf();function jo(e){let t=YW.parse(mf(e),{}),n=Li(),i=[];for(let r=0;r<t.length;r+=1){let o=gf(t,r,n);o&&i.push(o)}return i}var el=hf({highlight(e,t){let n=(t||"text").toLowerCase(),i=ec(e,n);return`<pre class="code-viewer"><code class="hljs language-${n}">${i}</code></pre>`}}),wM=el.renderer.rules.heading_open;el.renderer.rules.heading_open=(...e)=>{let t=e[0],n=e[1],i=e[2],r=e[3]??{},o=e[4],s=typeof r.nextSlug=="function"?r.nextSlug:Li();r.nextSlug=s;let a=gf(t,n,s),l=t[n];return a&&(l.attrSet?.("id",a.id),l.attrSet?.("data-heading-id",a.id)),typeof wM=="function"?wM(...e):o.renderToken(t,n,i)};var SM=el.renderer.rules.link_open;el.renderer.rules.link_open=(...e)=>{let t=e[0],n=e[1],i=e[2],r=e[4],o=t[n];o.attrSet?.("data-markdown-link","true");let s=o.attrGet?.("title");if(s?.startsWith("mcp-wiki:")){let a=decodeURIComponent(s.slice(9));o.attrSet?.("data-wiki-link",a),Array.isArray(o.attrs)&&(o.attrs=o.attrs.filter(([l])=>l!=="title"))}return typeof SM=="function"?SM(...e):r.renderToken(t,n,i)};function EM(e){return el.render(mf(e),{nextSlug:Li()})}function $M(e){return EM(e).replace(/<\s*br\s*\/?>/gi,`
`).replace(/<\/p>/gi,`
`).replace(/<\/h[1-6]>/gi,`
`).replace(/<\/li>/gi,`
`).replace(/<li>/gi,"- ").replace(/<[^>]+>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'"').replace(/\n{3,}/g,`
`).trim()}var TM=40;function QW(e,t){return e.length!==t.length?!1:e.every((n,i)=>{let r=t[i];return n.id===r.id&&n.text===r.text&&n.level===r.level&&n.line===r.line})}function eV(e){return e.split(`
`).map(t=>t.trim()).filter(Boolean)}function tV(e){return e.split(`
`).map(t=>t.trim()).filter(t=>t.startsWith("\u{1F4C1} ")).map(t=>t.slice(3).trim())}function CM(e){return e.replace(/\.md$/i,"")}function nV(e,t){let n=e.length,i=t.length,r=Array.from({length:n+1},()=>Array(i+1).fill(0));for(let d=1;d<=n;d+=1)for(let f=1;f<=i;f+=1)r[d][f]=e[d-1]===t[f-1]?r[d-1][f-1]+1:Math.max(r[d-1][f],r[d][f-1]);let o=[],s=n,a=i;for(;s>0&&a>0;)e[s-1]===t[a-1]?(o.unshift([s-1,a-1]),s-=1,a-=1):r[s-1][a]>=r[s][a-1]?s-=1:a-=1;let l=[],u=0,c=0;for(let[d,f]of o)(d>u||f>c)&&l.push({oldStart:u,oldEnd:d,newStart:c,newEnd:f}),u=d+1,c=f+1;return(u<n||c<i)&&l.push({oldStart:u,oldEnd:n,newStart:c,newEnd:i}),l}function rV(e,t){if(e.length<=1)return e;let n=[{...e[0]}];for(let i=1;i<e.length;i+=1){let r=n[n.length-1],o=e[i];if(o.oldStart-r.oldEnd<t){r.oldEnd=o.oldEnd,r.newEnd=o.newEnd;continue}n.push({...o})}return n}function IM(e){let t=e.map(i=>({fromLine:Math.max(1,Math.floor(i.fromLine)),toLine:Math.max(1,Math.floor(i.toLine))})).sort((i,r)=>i.fromLine-r.fromLine||i.toLine-r.toLine),n=[];for(let i of t){let r={fromLine:Math.min(i.fromLine,i.toLine),toLine:Math.max(i.fromLine,i.toLine)},o=n[n.length-1];o&&r.fromLine<=o.toLine+1?o.toLine=Math.max(o.toLine,r.toLine):n.push(r)}return n}function iV(e,t){if(t.length===0)return!0;let n=Math.min(e.oldStart,e.newStart)+1,i=Math.max(e.oldEnd,e.newEnd)+1;return t.some(r=>n<=r.toLine&&i>=r.fromLine)}function oV(e,t){return jv(e,t,0,e.length,0,t.length)}function jv(e,t,n,i,r,o){for(;n<i&&r<o&&e[n]===t[r];)n++,r++;for(;n<i&&r<o&&e[i-1]===t[o-1];)i--,o--;if(n===i&&r===o)return[];let s=new Map,a=new Map;for(let l=n;l<i;l+=1){let u=s.get(e[l]);s.set(e[l],{count:(u?.count??0)+1,index:l})}for(let l=r;l<o;l+=1){let u=a.get(t[l]);a.set(t[l],{count:(u?.count??0)+1,index:l})}for(let l=n;l<i;l+=1){let u=s.get(e[l]),c=a.get(e[l]);if(u?.count===1&&c?.count===1)return[...jv(e,t,n,l,r,c.index),...jv(e,t,l+1,i,c.index+1,o)]}return[{oldStart:n,oldEnd:i,newStart:r,newEnd:o}]}function AM(e,t){let n=e.split(`
`),i=t.split(`
`),r=Math.ceil(Math.max(n.length,i.length)/TM),o=[];for(let s=0;s<r;s+=1){let a=Math.floor(s*n.length/r),l=Math.floor((s+1)*n.length/r),u=Math.floor(s*i.length/r),c=Math.floor((s+1)*i.length/r),d=n.slice(a,l).join(`
`),f=i.slice(u,c).join(`
`);d!==f&&o.push({old_string:d,new_string:f})}return o}function sV(e){return e.flatMap(t=>Math.max(t.old_string.split(`
`).length,t.new_string.split(`
`).length)>TM?AM(t.old_string,t.new_string):[t])}function aV(e,t,n=[]){if(e===t)return[];let i=e.split(`
`),r=t.split(`
`),o=i.length*r.length>1e6?oV(i,r):nV(i,r);if(o.length===0)return[];let s=3,a=IM(n),u=rV(o,s*2+1).filter(c=>iV(c,a)).map(c=>{let d=Math.max(0,c.oldStart-s),f=Math.min(i.length,c.oldEnd+s),p=i.slice(d,f).join(`
`),h=[...i.slice(d,c.oldStart),...r.slice(c.newStart,c.newEnd),...i.slice(c.oldEnd,f)].join(`
`);return{old_string:p,new_string:h}}).filter(c=>c.old_string!==c.new_string);return u.length===1&&u[0].old_string===e&&u[0].new_string===t?AM(e,t):sV(u)}function lV(e,t){return t.reduce((n,i)=>n.replace(i.old_string,i.new_string),e)}function uV(e){return typeof e=="object"&&e!==null}function cV(e){if(!uV(e)||e.isError!==!0)return!1;let t=Jt(e)?.toLowerCase()??"";return t.includes("not found")||t.includes("no such file")||t.includes("enoent")}function zM(e){let t,n,i,r=null,o=1e3;function s(){r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,A()},o)}function a(){r!==null&&(clearTimeout(r),r=null)}function l(){a(),n?.destroy(),n=void 0,i?.dispose(),i=void 0}function u(){t=void 0,l()}function c(_){return tt(_.content)}function d(_,S,O={}){let L=O.keepDraft?_.draftContent:S;_.sourceContent=S,_.fullDocumentContent=S,_.draftContent=L,_.outline=jo(S),_.dirty=L!==S,_.dirtyLineRanges=[],_.fileDeleted=!1,_.outline.some(oe=>oe.id===_.activeHeadingId)||(_.activeHeadingId=_.outline[0]?.id??null)}async function f(_,S,O){let L=await e.callTool?.("read_file",{path:_,...typeof S=="number"?{offset:O??0,length:S}:{},origin:"ui"});return{rawResult:L,payload:rc(L)??null}}async function p(_,S,O){return(await f(_,S,O)).payload}async function h(_){let S=Vt(_.content);return S?.isPartial?await p(_.filePath,S.totalLines)??_:_}async function m(_){let S=await p(_);return S?h(S):null}function b(_){let S=tt(_.content);if(!t||t.filePath!==_.filePath||t.sourceContent!==S){let O=jo(S);t={filePath:_.filePath,sourceContent:S,fullDocumentContent:S,draftContent:S,outline:O,mode:"edit",dirty:!1,dirtyLineRanges:[],activeHeadingId:O[0]?.id??null,pendingAnchor:null,notice:null,error:null,saving:!1,loadingDocument:!1,editorView:"markdown",editorScrollTop:0,saveIndicator:"idle",fileDeleted:!1}}return t}function g(_){return _.draftContent!==_.fullDocumentContent}function v(_){let S=b(_),O=S.outline,oe=e.getCurrentDisplayMode()==="fullscreen"?xM(O,S.activeHeadingId):"";return!S.activeHeadingId&&O.length>0&&(S.activeHeadingId=O[0].id),{notice:[S.error,S.notice].find($e=>typeof $e=="string"&&$e.trim().length>0),html:`
<div class="panel-content markdown-content markdown-content--workspace">
<div class="markdown-workspace markdown-workspace--edit${oe?" markdown-workspace--with-toc":""}">
${oe}
<section class="markdown-workspace-main markdown-workspace-main--editor">
${iM({view:S.editorView})}
</section>
</div>
</div>
`}}async function x(_){let S=Uz(_),O=new Set(["[DIR] .git","[DIR] .obsidian","[FILE] package.json","[FILE] pnpm-workspace.yaml","[FILE] turbo.json"]);for(let L of S)try{let oe=await e.callTool?.("list_directory",{path:L,depth:1,origin:"ui"}),ee=Jt(oe)??"";if(eV(ee).some(ft=>O.has(ft)))return L}catch{}return Fi(_)}async function k(_,S){let O=S.trim();if(O.length===0)return[];let L=await x(_),oe=await e.callTool?.("start_search",{path:L,pattern:O,searchType:"files",filePattern:"*.md",maxResults:20,earlyTermination:!1,literalSearch:!0,origin:"ui"}),ee=Jt(oe)??"",$e=tV(ee),ft=Fi(_);return $e.map(ke=>{let Re=ke.replace(/\\/g,"/"),vt=Re.split("/").pop()??Re,It=CM(vt),Xe=jz(ft,Re),Ne=CM(Xe.startsWith("./")?Xe.slice(2):Xe);return{path:Re,title:It,wikiPath:Ne,relativePath:Xe}})}async function E(_,S){if(S===_&&t)return t.outline.map(L=>({id:L.id,text:L.text}));let O=await m(S);return O?jo(c(O)).map(L=>({id:L.id,text:L.text})):[]}function C(_){let S=_.trim();return S?document.getElementById(S)??document.getElementById(Pi(S)):null}function M(_){let S=C(_);if(!S)return!1;let O=[],L=S.parentElement;for(;L;){let $e=window.getComputedStyle(L).overflowY;($e==="auto"||$e==="scroll"||$e==="overlay")&&L.scrollHeight>L.clientHeight&&O.push(L),L=L.parentElement}S.scrollIntoView({block:"start",inline:"nearest"});for(let ee of O){let $e=ee.getBoundingClientRect(),ft=S.getBoundingClientRect(),ke=Math.max(ee.scrollTop+(ft.top-$e.top)-24,0);ee.scrollTop=ke}let oe=document.scrollingElement;if(oe){let ee=S.getBoundingClientRect().top,$e=Math.max(oe.scrollTop+ee-24,0);oe.scrollTop=$e}return S.setAttribute("tabindex","-1"),S.focus({preventScroll:!0}),t&&(t.activeHeadingId=S.id||Pi(_)),!0}function z(){let _=t?.pendingAnchor;!t||!_||(t.pendingAnchor=null,M(_)||(t.error=`Heading not found: ${_}`,e.rerender()))}function H(_,S,O,L){e.updateSaveStatus(_,S),window.setTimeout(()=>{L&&!L()||e.updateSaveStatus("","")},O)}async function ce(_){try{let S=Vt(_.content),{rawResult:O,payload:L}=S?.isPartial?await f(_.filePath,S.toLine-S.fromLine+1,S.readOffset):await f(_.filePath);if(!L){cV(O)&&(t&&(t.fileDeleted=!0),e.updateSaveStatus("File deleted","saved"));return}let oe=c(L),ee=c(_);if(oe===ee)return;e.storePayloadOverride(L),t=void 0,e.rerender()}catch{}}async function Ze(_,S={}){let O=b(_),L=Vt(_.content);if(!L?.isPartial){S.keepEditMode&&(O.mode="edit",O.editorView="markdown",O.notice=null,O.error=null,O.draftContent=O.sourceContent,O.dirty=!1,e.rerender());return}O.loadingDocument=!0,O.notice="Loading full document\u2026",O.error=null,e.rerender();try{let oe=await p(_.filePath,L.totalLines);if(!oe){O.error="Failed to load the full document.",O.notice=null,O.loadingDocument=!1,e.rerender();return}e.syncPayload?.(oe);let ee=b(oe);ee.loadingDocument=!1,ee.notice=null,ee.error=null,d(ee,ee.sourceContent),S.keepEditMode&&(ee.mode="edit",ee.editorView="markdown",e.rerender())}catch{O.loadingDocument=!1,O.notice=null,O.error="Failed to load the full document.",e.rerender()}}async function Fe(_,S){let O=b(_);if(O.dirty&&!window.confirm("Discard unsaved changes and follow this link?"))return;let L=Jz(_.filePath,S);if(O.notice=null,O.error=null,L.kind==="external"&&L.url){if(!await e.openExternalLink?.(L.url))try{window.open(L.url,"_blank","noopener")}catch{}return}if(L.kind==="anchor"&&L.anchor){!M(L.anchor)&&t&&(t.error=`Heading not found: ${L.anchor}`,e.rerender());return}if(L.kind==="file"&&L.targetPath){if(await e.openExternalLink?.(L.targetPath))return;let ee=await p(L.targetPath);if(!ee){t&&(t.error=`Unable to open ${L.targetPath}.`,e.rerender());return}e.syncPayload?.(ee);let $e=b(ee);$e.pendingAnchor=L.anchor??null,$e.error=null,$e.notice=null,e.rerender()}}async function Ie(_){let S=b(_);if(S.error=null,S.notice=null,EC(_.content)){await Ze(_,{keepEditMode:!0});return}S.mode="edit",S.draftContent=S.fullDocumentContent,S.dirty=!1,S.editorView="markdown",e.setExpanded(!0),e.rerender()}async function ve(){return tc({availableDisplayModes:e.getAvailableDisplayModes()}).canFullscreen?await e.requestDisplayMode?.("fullscreen")==="fullscreen":!1}function Y(){if(!t)return;let _=t.filePath;t.draftContent=t.fullDocumentContent,t.dirty=!1,t.dirtyLineRanges=[],t.error=null,t.notice=null,e.rerender(),H("Reverted","saved",1500),e.trackUiEvent?.("markdown_reverted",{file_extension:Ut(_)})}async function A(){if(!t||t.saving||!t.dirty||t.fileDeleted)return;a();let _=t;_.saving=!0,_.saveIndicator="saving",_.error=null,_.notice=null;try{let S=aV(_.fullDocumentContent,_.draftContent,_.dirtyLineRanges);if(S.length===0){_.saving=!1,_.saveIndicator="idle",_.dirty=!1,_.dirtyLineRanges=[];return}let O=0,L=[],oe=null;for(let ke of S)try{let Re=await e.callTool?.("edit_block",{file_path:_.filePath,old_string:ke.old_string,new_string:ke.new_string,expected_replacements:1,origin:"ui"});$C(Re),O++}catch(Re){L.push(ke),oe=Re}if(L.length>0){let ke=new Error(`${O} of ${S.length} edit${S.length===1?"":"s"} applied; ${L.length} could not land because the text changed on disk.`);throw ke.appliedCount=O,ke.skippedCount=L.length,ke.totalCount=S.length,ke.underlyingError=oe,ke}let ee=lV(_.fullDocumentContent,S);_.fullDocumentContent=ee,_.sourceContent=ee,_.draftContent=ee,_.outline=jo(_.sourceContent),_.dirty=!1,_.dirtyLineRanges=[],_.saving=!1,_.saveIndicator="saved",_.outline.some(ke=>ke.id===_.activeHeadingId)||(_.activeHeadingId=_.outline[0]?.id??null);let $e=e.getCurrentPayload();if($e){let Re=$e.content.match(/^(\[Reading [^\]]+\]\r?\n(?:\r?\n)?)/)?.[1]??"";e.storePayloadOverride({...$e,content:Re+ee})}let ft=document.getElementById("revert-markdown");ft&&(ft.disabled=!g(_)),H("Saved","saved",1800,()=>!_.dirty&&!_.saving?(_.saveIndicator="idle",!0):!1),e.trackUiEvent?.("markdown_saved",{file_extension:Ut(_.filePath),blocks:S.length})}catch(S){_.saving=!1,_.saveIndicator="idle";let O=S,L=typeof O.appliedCount=="number"?O.appliedCount:0,oe=typeof O.skippedCount=="number"?O.skippedCount:0,ee=typeof O.totalCount=="number"?O.totalCount:0,$e=L>0&&oe>0,ft=L===0&&oe>0,ke=await m(_.filePath).catch(()=>null),Re=!1,vt=null;if(ke){let It=c(ke);It!==_.fullDocumentContent&&(d(_,It,{keepDraft:!0}),e.storePayloadOverride(ke),Re=!0,vt=It)}if(_.notice=null,$e)_.error=`${L} of ${ee} edit${ee===1?"":"s"} saved. ${oe} ${oe===1?"edit":"edits"} did not apply because that text changed on disk \u2014 your draft still has them; save again to merge.`,e.rerender(),H("Saved (partial)","saved",3e3),e.trackUiEvent?.("markdown_save_partial",{file_extension:Ut(_.filePath),applied:L,skipped:oe,total:ee});else if(ft&&Re&&e.showConflictDialog&&vt!==null){let It=vt,Ne=_.filePath.replace(/\\/g,"/").split("/").pop()||_.filePath;_.error=null,e.rerender(),e.trackUiEvent?.("markdown_save_conflict_shown",{file_extension:Ut(_.filePath)}),e.showConflictDialog({fileName:Ne,onUseDiskVersion:()=>{t===_&&(d(_,It),e.rerender()),e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"use_disk"})},onSaveMyChanges:()=>{e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"save_mine"}),A()},onCancel:()=>{t===_&&(_.error="File changed on disk. Save again to merge your edits, or reopen to discard them.",e.rerender()),e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"dismissed"})}})}else _.error=Re?"File changed on disk. Save again to merge your edits, or reopen the file to discard them.":S instanceof Error?S.message:"Save failed.",e.rerender(),H("Save failed","saving",3e3);e.trackUiEvent?.("markdown_save_failed",{file_extension:Ut(_.filePath),reloaded_from_disk:Re,applied:L,skipped:oe,total:ee})}}function Z(_,S){let O=b(_),L=document.querySelector(".panel-content-wrapper");O.editorScrollTop=L?.scrollTop??0;let oe=O.editorView;O.editorView=S,O.notice=null,O.error=null,e.rerender(),oe!==S&&e.trackUiEvent?.("markdown_view_toggled",{file_extension:Ut(_.filePath),view:S}),typeof O.editorScrollTop=="number"&&window.requestAnimationFrame(()=>{let ee=document.querySelector(".panel-content-wrapper");ee&&(ee.scrollTop=O.editorScrollTop)})}function q(_){let S=b(_),O=document.querySelector(".panel-content-wrapper"),L=S.outline,oe=Ut(_.filePath),ee=!1;{let ke=document.getElementById("markdown-editor-root");ke&&(n=oM({target:ke,value:S.draftContent,view:S.editorView,initialScrollTop:S.editorScrollTop,currentFilePath:_.filePath,searchLinks:Xe=>k(_.filePath,Xe),loadHeadings:Xe=>E(_.filePath,Xe),onChange:(Xe,Ne)=>{if(Xe===S.draftContent)return;if(S.draftContent=Xe,S.dirty=Xe!==S.fullDocumentContent,S.dirty){let An=Ne&&Ne.length>0?Ne:[{fromLine:1,toLine:Xe.split(`
`).length}];S.dirtyLineRanges=IM([...S.dirtyLineRanges,...An])}else S.dirtyLineRanges=[];S.dirty&&!ee&&(ee=!0,e.trackUiEvent?.("markdown_edit_started",{file_extension:oe,view:S.editorView})),S.dirty&&s();let Ye=jo(Xe);QW(S.outline,Ye)||(S.outline=Ye,S.outline.some(An=>An.id===S.activeHeadingId)||(S.activeHeadingId=S.outline[0]?.id??null),i?.refresh(S.outline,S.activeHeadingId)),S.dirty&&S.saveIndicator==="saved"&&(S.saveIndicator="idle");let Bi=document.getElementById("revert-markdown");Bi&&(Bi.disabled=!g(S))},onBlur:()=>{S.dirty&&(a(),A())}}),n.focus()),document.getElementById("revert-markdown")?.addEventListener("click",()=>{Y()}),document.getElementById("markdown-mode-raw")?.addEventListener("click",()=>{Z(_,"raw")}),document.getElementById("markdown-mode-markdown")?.addEventListener("click",()=>{Z(_,"markdown")})}document.getElementById("expand-fullscreen")?.addEventListener("click",()=>{ve()}),O&&O.addEventListener("click",ke=>{let vt=ke.target?.closest("a[href]");if(!vt||!vt.closest(".markdown-doc"))return;let It=vt.getAttribute("href");It&&(ke.preventDefault(),Fe(_,It))});let ft=document.querySelector(".document-outline-shell");ft&&O&&(i=kM({shell:ft,outline:L,scrollContainer:O,onSelect:ke=>{let Re=S.outline.find(vt=>vt.id===ke);Re&&typeof Re.line=="number"&&(n?.revealLine(Re.line,Re.id),S.activeHeadingId=Re.id)}})??void 0),window.setTimeout(()=>{z()},0)}function re(_){let S=b(_),O=S.draftContent;return S.editorView==="raw"?O:$M(O)||O}async function pe(_){let S=t?.saveIndicator==="saved"||t?.dirty;if(t&&(t.notice=null,t.editorView="markdown"),S&&_){let O=Vt(_.content);if(O?.isPartial){let L=await p(_.filePath,O.toLine-O.fromLine+1,O.readOffset);if(L)return L}}}return{attachHandlers:q,buildBody:v,clear:u,disposeHandles:l,ensureCompletePayload:h,getCopyText:re,getState:b,handleInlineExitFromFullscreen:pe,isUndoAvailable:g,readCompletePayload:m,readPayload:p,readPayloadContent:c,refreshFromDisk:ce,requestEditMode:Ie,requestFullscreen:ve,saveDocument:A,setEditorView:Z}}function MM(){return`
<div class="md-conflict-modal" id="md-conflict-modal" role="dialog" aria-modal="true" aria-labelledby="md-conflict-title" aria-describedby="md-conflict-body" hidden>
<div class="md-conflict-card">
<header class="md-conflict-header">
<h3 id="md-conflict-title">\u26A0 This file changed on disk</h3>
<button type="button" class="md-conflict-close" id="md-conflict-close" aria-label="Close">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M7 7l10 10M17 7L7 17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</header>
<div class="md-conflict-body" id="md-conflict-body">
<p>
Something else modified
<strong class="md-conflict-filename" id="md-conflict-filename"></strong>
while you were editing. Your unsaved edits are preserved.
</p>
<p>If you save now:</p>
<ul>
<li>Changes you made to lines the external edit didn't touch will be saved alongside the external changes.</li>
<li>Changes you made to lines that also changed externally will overwrite the external version on those lines.</li>
</ul>
</div>
<footer class="md-conflict-footer">
<button type="button" class="md-conflict-btn md-conflict-btn--secondary" id="md-conflict-use-disk">
Use disk version
</button>
<button type="button" class="md-conflict-btn md-conflict-btn--primary" id="md-conflict-save-mine">
Save my changes
</button>
</footer>
</div>
</div>
`}function NM(e){let{container:t}=e,n=t.querySelector("#md-conflict-modal"),i=t.querySelector("#md-conflict-filename"),r=t.querySelector("#md-conflict-use-disk"),o=t.querySelector("#md-conflict-save-mine"),s=t.querySelector("#md-conflict-close"),a=null,l=null,u=()=>{if(!n||n.hidden)return;n.hidden=!0,document.removeEventListener("keydown",c,!0),n.removeEventListener("click",d);let h=a?.onCancel;if(a=null,l&&document.contains(l))try{l.focus()}catch{}l=null,h?.()},c=h=>{if(!(!n||n.hidden)){if(h.key==="Escape"){h.stopPropagation(),h.preventDefault(),u();return}if(h.key==="Tab"){let m=[r,o,s].filter(k=>!!k);if(m.length===0)return;let b=document.activeElement,g=b?m.indexOf(b):-1,v=h.shiftKey?-1:1,x=g===-1?v===1?0:m.length-1:(g+v+m.length)%m.length;h.preventDefault(),m[x].focus()}}},d=h=>{h.target===n&&h.stopPropagation()},f=()=>{let h=a?.onUseDiskVersion;a=null,u(),h?.()},p=()=>{let h=a?.onSaveMyChanges;a=null,u(),h?.()};return r?.addEventListener("click",f),o?.addEventListener("click",p),s?.addEventListener("click",u),{open:h=>{if(!n){h.onCancel?.();return}a=h,i&&(i.textContent=h.fileName),l=document.activeElement??null,n.hidden=!1,document.addEventListener("keydown",c,!0),n.addEventListener("click",d),window.requestAnimationFrame(()=>{o?.focus()})},close:u,isOpen:()=>!!n&&!n.hidden}}function DM(e){let t=g=>e.container.querySelector(`#${g}`),n=g=>{let v=document.createElement("textarea");v.value=g,v.setAttribute("readonly",""),v.style.position="fixed",v.style.top="-9999px",document.body.appendChild(v),v.select();let x=document.execCommand("copy");return document.body.removeChild(v),x},i=(g,v,x,k)=>{g.setAttribute("title",v),g.setAttribute("aria-label",v),g.textContent=v,k&&setTimeout(()=>{g.textContent=x,g.setAttribute("title",x),g.setAttribute("aria-label",x)},k)},r=(g,v,x,k)=>{g.setAttribute("title",v),g.setAttribute("aria-label",v),g.dataset.status=v,k&&setTimeout(()=>{g.setAttribute("title",x),g.setAttribute("aria-label",x),delete g.dataset.status},k)},o=async g=>{try{return navigator.clipboard?.writeText?(await navigator.clipboard.writeText(g),!0):n(g)}catch{return n(g)}},s=e.getFileExtensionForAnalytics(e.payload.filePath),a=t("copy-source");a?.addEventListener("click",async()=>{e.trackUiEvent?.("copy_clicked",{file_type:e.payload.fileType,file_extension:s});let g=await o(tt(e.payload.content));i(a,g?"Copied!":"Copy failed","Copy",1500)});let l=t("copy-active-markdown");l?.addEventListener("click",async()=>{let g=e.markdownController.getCopyText(e.payload);if(!g)return;let v=await o(g);v&&(e.updateSaveStatus("Copied","saved"),window.setTimeout(()=>e.updateSaveStatus("",""),1500)),r(l,v?"Copied!":"Copy failed","Copy",1500)}),t("toggle-html-mode")?.addEventListener("click",()=>{let g=e.htmlMode==="rendered"?"source":"rendered";e.trackUiEvent?.("html_view_toggled",{file_type:e.payload.fileType,file_extension:s}),e.render(e.payload,g,e.getIsExpanded())});let c=t("open-in-folder");if(c){let g=e.buildOpenInFolderCommand(e.payload.filePath);g?c.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_folder",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:g,timeout_ms:12e3,origin:"ui"})}catch{}}):c.disabled=!0}let d=t("open-in-editor");if(d){let g=e.buildOpenInEditorCommand(e.payload.filePath);g?d.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_editor",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:g,timeout_ms:12e3,origin:"ui"})}catch{}}):d.disabled=!0}let f=t("load-before"),p=t("load-after");if(!f&&!p)return;let h=Vt(e.payload.content);if(!h?.isPartial)return;let m=tt(e.payload.content),b=async(g,v)=>{let x=g.textContent;g.textContent="Loading\u2026",g.disabled=!0,e.trackUiEvent?.(v==="before"?"load_lines_before":"load_lines_after",{file_type:e.payload.fileType,file_extension:s});try{let k=v==="before"?{path:e.payload.filePath,offset:0,length:h.fromLine-1,origin:"ui"}:{path:e.payload.filePath,offset:h.toLine,origin:"ui"},E=await e.callTool?.("read_file",k),C=Jt(E);if(C&&typeof C=="string"){let M=tt(C),z=v==="before"?`${M}${M.endsWith(`
`)?"":`
`}${m}`:`${m}${m.endsWith(`
`)?"":`
`}${M}`,H=v==="before"?1:h.fromLine,ce=v==="after"?h.totalLines:h.toLine,Ze=ce-H+1,Fe=h.totalLines-ce,ve=H>1||ce<h.totalLines?`[Reading ${Ze} lines from ${H===1?"start":`line ${H}`} (total: ${h.totalLines} lines, ${Fe} remaining)]
`:"";e.render({...e.payload,content:ve+z},e.htmlMode,e.getIsExpanded());return}}catch{}g.textContent="Failed to load",setTimeout(()=>{g.textContent=x,g.disabled=!1},2e3)};f?.addEventListener("click",()=>{b(f,"before")}),p?.addEventListener("click",()=>{b(p,"after")})}var Sn=!1,yf=!1,kr,Ho,Jv,Kv,PM,Gv,Xv,tl,bt,LM="rendered",ol,vf,FM,BM,Kr,Zv,Hv,Zo,qo=null,qv=new Map;function dV(e){return typeof e?.sourceTool=="string"?e.sourceTool:"read_file"}async function xf(e,t){return Kv?Kv(e,t):void 0}function UM(){let e=ol?.availableDisplayModes;return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Wo(){return typeof ol?.displayMode=="string"?ol.displayMode:null}function fV(e){Kr=e,bt=e,BM?.(e)}function bf(e){if(!Kr)return e;if(Kr.filePath!==e.filePath)return Kr=void 0,e;let t=tt(e.content),n=tt(Kr.content);return t===n?e:Kr}function jM(e,t){let n=document.querySelector(".panel-save-status");if(e)if(n)n.textContent=e,n.className=`panel-save-status panel-save-status--${t}`;else{let i=document.querySelector(".panel-topbar-actions");if(i){let r=document.createElement("span");r.className=`panel-save-status panel-save-status--${t}`,r.textContent=e,i.prepend(r)}}else n&&n.remove()}var on=zM({callTool:xf,openExternalLink:async e=>Gv?Gv(e):void 0,requestDisplayMode:async e=>Xv?Xv(e):void 0,getAvailableDisplayModes:UM,getCurrentDisplayMode:Wo,getCurrentPayload:()=>bt,setExpanded:e=>{Sn=e},syncPayload:e=>FM?.(e),storePayloadOverride:fV,rerender:()=>{vf?.()},updateSaveStatus:jM,trackUiEvent:(e,t)=>Ho?.(e,t),showConflictDialog:e=>{if(Jv){Jv.open(e);return}console.warn("[file-preview] conflictDialogController not ready; firing onCancel fallback"),e.onCancel?.()}}),pV=["path","offset","length","sheet","range","isUrl"];function hV(e){if(!e||typeof e!="object")return;let t=e,n=typeof t.path=="string"?t.path:typeof t.file_path=="string"?t.file_path:void 0;if(!n)return;let i={path:n};for(let r of pV)r!=="path"&&t[r]!==void 0&&(i[r]=t[r]);return i}function mV(e){if(!e||typeof e!="object")return;let t=e;if(t.old_string!==void 0||t.new_string!==void 0)return"edit_block";if(t.content!==void 0)return"write_file"}var OM=8e3,Wv;async function RM(e,t,n){let i=typeof e.path=="string"?e.path:void 0;if(!i){n();return}if(Wv!==i){Wv=i;try{let r=await Promise.race([xf("read_file",{...e,origin:"ui"}),new Promise((s,a)=>{setTimeout(()=>a(new Error(`RPC read_file did not respond within ${OM}ms`)),OM)})]),o=rc(r);if(o){t(o);return}}catch{}finally{Wv=void 0}n()}}var gV=1e4,nl;function kf(){nl!==void 0&&(clearTimeout(nl),nl=void 0)}function rl(e,t){kf(),e.innerHTML=`
<main class="shell">
${Gs({label:t,variant:"status",interactive:!1})}
</main>
`,document.body.classList.add("dc-ready")}function Vv(e){e.innerHTML=`
<main class="shell">
${Gs({label:"Preparing preview\u2026",variant:"loading",interactive:!1})}
</main>
`,document.body.classList.add("dc-ready"),kf(),nl=setTimeout(()=>{nl=void 0,rl(e,"Unable to generate preview in this environment.")},gV)}function il(e,t,n="rendered",i=!1){if(kf(),Sn=i,LM=n,tl?.dispose(),tl=void 0,!t||t.fileType!=="markdown"?on.clear():on.disposeHandles(),!t){qo?.abort(),qo=null,bt=void 0,rl(e,"No preview available for this response."),kr?.();return}bt=t;let r=fM(t);!r.supportsPreview&&yf&&(Sn=!1);let o=Vt(t.content),s=pM({payload:t,htmlMode:n,startLine:o?.fromLine??1,markdownController:on}),a=t.fileType==="markdown"?on.getState(t):void 0,l=Ut(t.filePath),c=!(Wo()==="fullscreen")&&tc({availableDisplayModes:UM()}).canFullscreen;t.fileType==="markdown"&&t.defaultEditorName&&qv.set(t.filePath,{appName:t.defaultEditorName,appPath:t.defaultEditorPath});let d=t.fileType==="markdown"?qv.get(t.filePath):void 0,f=aM({payload:t,body:s,capabilities:r,fileExtension:l,htmlMode:n,currentDisplayMode:Wo(),isExpanded:Sn,hideSummaryRow:yf,markdownWorkspace:a,canGoFullscreen:c,isMarkdownUndoAvailable:a?on.isUndoAvailable(a):!1,defaultMarkdownEditorName:d?.appName,markdownEditorAppIcon:gM(),hasDirectoryBackButton:!!Zo});e.innerHTML=f.html,document.body.classList.add("dc-ready"),DM({container:e,payload:t,htmlMode:n,getIsExpanded:()=>Sn,callTool:xf,trackUiEvent:Ho,getFileExtensionForAnalytics:Ut,buildOpenInFolderCommand:m=>Bv(m,zr),buildOpenInEditorCommand:m=>mM(m,zr,qv),render:(m,b="rendered",g=Sn)=>{il(e,m,b,g)},updateSaveStatus:jM,markdownController:on}),t.fileType==="markdown"&&on.attachHandlers(t),qo=bM({payload:t,isMarkdownEditing:t.fileType==="markdown"&&!!a,updateContext:PM,trackUiEvent:Ho,getFileExtensionForAnalytics:Ut,previousAbortController:qo}),t.fileType==="directory"&&AC({container:e,callTool:xf,buildOpenInFolderCommand:m=>Bv(m,zr),onOpenPayload:m=>{Zo=t,il(e,m,"rendered",!0)}});let p=document.getElementById("dir-back");if(p&&Zo){let m=Zo;p.addEventListener("click",()=>{Zo=void 0,il(e,m,"rendered",!0)})}t.fileType==="directory"&&(Zo=void 0);let h=document.getElementById("compact-toggle");tl=C$({shell:document.getElementById("tool-shell"),compactRow:h,initialExpanded:f.effectiveExpanded,onToggle:m=>{Sn=m,Ho?.(m?"expand":"collapse",{file_type:t.fileType,file_extension:l})},onScrollAfterExpand:()=>{Ho?.("scroll_after_expand",{file_type:t.fileType,file_extension:l})},onRender:kr}),kr?.()}function ZM(){let e=document.getElementById("app");if(!e)return;if(Vv(e),!document.getElementById("md-conflict-modal")){let g=document.createElement("div");g.innerHTML=MM();let v=g.firstElementChild;v&&document.body.appendChild(v)}Jv=NM({container:document});let t=new eu({name:"Desktop Commander File Preview",version:"1.0.0"},{updateModelContext:{text:{}}},{autoResize:!0}),n={expanded:Sn,hideSummaryRow:yf},i=()=>{Sn=n.expanded,yf=n.hideSummaryRow},r=I$(g=>nc(g)&&typeof g.content=="string"),o=g=>{g&&r.write(g),il(e,g,"rendered",Sn)},s=()=>{let g=r.read();g&&(bt&&bt.filePath===g.filePath&&tt(bt.content)===tt(g.content)||o(g))};FM=o,BM=g=>{r.write(g)},vf=()=>{il(e,bt,LM,Sn)};let a,l,u,c=!1,d=!1,f=(g,v)=>{if(!d){if(d=!0,g){Zv=g,o(g),g.fileType==="markdown"&&Wo()==="fullscreen"&&on.requestEditMode(g),g.fileType==="markdown"&&on.refreshFromDisk(g);return}rl(e,v??"No preview available for this response."),kr?.()}};kr=()=>{},Kv=(g,v)=>t.callServerTool({name:g,arguments:v}),PM=g=>{let v=g?{content:[{type:"text",text:g}]}:{content:[]};t.updateModelContext(v).catch(()=>{})},Gv=async g=>(await t.openLink({url:g})).isError!==!0,Xv=async g=>{let v=await t.requestDisplayMode({mode:g});return typeof v.mode=="string"?v.mode:null};let p=M$((g,v)=>t.callServerTool({name:g,arguments:v}),{component:"file_preview"});Ho=(g,v={})=>p(g,{tool_name:dV(bt??Zv),...v}),t.ontoolinput=g=>{let v=typeof g.arguments?.path=="string"?g.arguments.path:void 0,x=hV(g.arguments);if(u=mV(g.arguments),x&&(l=x),!d&&a&&v&&a.filePath===v){let k=a;a=void 0,f(k);return}Vv(e),kr?.(),c=!1,x&&!u&&RM(x,k=>{c=!0,d?o(bf(k)):f(bf(k))},()=>{})},t.ontoolresult=g=>{if(a=void 0,c)return;let v=Jt(g),x=g?.isError===!0,k=l??(bt?.filePath?{path:bt.filePath}:void 0),E=M=>{c=!0;let z=u?{...M,sourceTool:u}:M;d?o(bf(z)):f(bf(z))},C=()=>{v&&(d?(rl(e,v),kr?.()):f(void 0,v))};if(!x&&k){Vv(e),kr?.(),RM(k,E,C);return}C()},t.ontoolcancelled=g=>{f(void 0,g.reason??"Tool was cancelled.")};let h=()=>{document.visibilityState==="visible"&&s()},m=()=>{document.visibilityState!=="visible"&&s()},b=()=>{kf(),tl?.dispose(),tl=void 0,on.disposeHandles(),qo?.abort(),qo=null,document.removeEventListener("visibilitychange",h),window.removeEventListener("focus",m)};document.addEventListener("visibilitychange",h),window.addEventListener("focus",m),t.onteardown=async()=>(b(),{}),z$({app:t,chrome:n,onContextApplied:()=>{let g=Wo();i(),ol=t.getHostContext();let v=Wo(),x=g!==v;if(g==="fullscreen"&&v==="inline"&&bt?.fileType==="markdown"){Sn=!0,n.expanded=!0;let k=Hv??Zv;(k?Vt(k.content)?.isPartial===!0:!1)&&k?(Kr=k,bt=k,r.write(k),on.handleInlineExitFromFullscreen(k).then(C=>{C&&(bt=C,Kr=C,r.write(C),vf?.())})):on.handleInlineExitFromFullscreen(),Hv=void 0}g!=="fullscreen"&&v==="fullscreen"&&bt?.fileType==="markdown"&&(Hv=bt,Vt(bt.content)?.isPartial&&on.requestEditMode(bt)),d&&x&&vf?.()},onConnected:()=>{ol=t.getHostContext(),a=r.read()??void 0}}).catch(()=>{rl(e,"Failed to connect to host."),kr?.()}),window.addEventListener("beforeunload",()=>{b()},{once:!0})}ZM();})();