UNPKG

@wonderwhy-er/desktop-commander

Version:

MCP server for terminal operations and file editing

472 lines • 1.2 MB
"use strict";(()=>{var rD=Object.create;var Sl=Object.defineProperty;var iD=Object.getOwnPropertyDescriptor;var oD=Object.getOwnPropertyNames;var sD=Object.getPrototypeOf,aD=Object.prototype.hasOwnProperty;var lD=(e,t,n)=>t in e?Sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var my=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gi=(e,t)=>{for(var n in t)Sl(e,n,{get:t[n],enumerable:!0})},uD=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of oD(t))!aD.call(e,r)&&r!==n&&Sl(e,r,{get:()=>t[r],enumerable:!(i=iD(t,r))||i.enumerable});return e};var gy=(e,t,n)=>(n=e!=null?rD(sD(e)):{},uD(t||!e||!e.__esModule?Sl(n,"default",{value:e,enumerable:!0}):n,e));var zt=(e,t,n)=>lD(e,typeof t!="symbol"?t+"":t,n);var mC=my((Bte,hC)=>{function nC(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)&&nC(n)}),e}var dc=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function rC(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function zr(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 M9="</span>",G$=e=>!!e.scope,z9=(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}`},Gm=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=rC(t)}openNode(t){if(!G$(t))return;let n=z9(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){G$(t)&&(this.buffer+=M9)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},X$=(e={})=>{let t={children:[]};return Object.assign(t,e),t},Xm=class e{constructor(){this.rootNode=X$(),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=X$({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)}))}},Ym=class extends Xm{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 Gm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function ha(e){return e?typeof e=="string"?e:e.source:null}function iC(e){return fi("(?=",e,")")}function D9(e){return fi("(?:",e,")*")}function N9(e){return fi("(?:",e,")?")}function fi(...e){return e.map(n=>ha(n)).join("")}function O9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function e0(...e){return"("+(O9(e).capture?"":"?:")+e.map(i=>ha(i)).join("|")+")"}function oC(e){return new RegExp(e.toString()+"|").exec("").length-1}function R9(e,t){let n=e&&e.exec(t);return n&&n.index===0}var P9=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function t0(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;let r=n,o=ha(i),s="";for(;o.length>0;){let a=P9.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 L9=/\b\B/,sC="[a-zA-Z]\\w*",n0="[a-zA-Z_]\\w*",aC="\\b\\d+(\\.\\d+)?",lC="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",uC="\\b(0b[01]+)",F9="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",B9=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=fi(t,/.*\b/,e.binary,/\b.*/)),zr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},ma={begin:"\\\\[\\s\\S]",relevance:0},U9={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ma]},j9={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ma]},Z9={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/},pc=function(e,t,n={}){let i=zr({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=e0("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:fi(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},H9=pc("//","$"),q9=pc("/\\*","\\*/"),W9=pc("#","$"),V9={scope:"number",begin:aC,relevance:0},K9={scope:"number",begin:lC,relevance:0},J9={scope:"number",begin:uC,relevance:0},G9={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ma,{begin:/\[/,end:/\]/,relevance:0,contains:[ma]}]},X9={scope:"title",begin:sC,relevance:0},Y9={scope:"title",begin:n0,relevance:0},Q9={begin:"\\.\\s*"+n0,relevance:0},e5=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()}})},cc=Object.freeze({__proto__:null,APOS_STRING_MODE:U9,BACKSLASH_ESCAPE:ma,BINARY_NUMBER_MODE:J9,BINARY_NUMBER_RE:uC,COMMENT:pc,C_BLOCK_COMMENT_MODE:q9,C_LINE_COMMENT_MODE:H9,C_NUMBER_MODE:K9,C_NUMBER_RE:lC,END_SAME_AS_BEGIN:e5,HASH_COMMENT_MODE:W9,IDENT_RE:sC,MATCH_NOTHING_RE:L9,METHOD_GUARD:Q9,NUMBER_MODE:V9,NUMBER_RE:aC,PHRASAL_WORDS_MODE:Z9,QUOTE_STRING_MODE:j9,REGEXP_MODE:G9,RE_STARTERS_RE:F9,SHEBANG:B9,TITLE_MODE:X9,UNDERSCORE_IDENT_RE:n0,UNDERSCORE_TITLE_MODE:Y9});function t5(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function n5(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function r5(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=t5,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function i5(e,t){Array.isArray(e.illegal)&&(e.illegal=e0(...e.illegal))}function o5(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 s5(e,t){e.relevance===void 0&&(e.relevance=1)}var a5=(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=fi(n.beforeMatch,iC(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},l5=["of","and","for","in","not","or","if","then","parent","list","value"],u5="keyword";function cC(e,t,n=u5){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,cC(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,c5(l[0],l[1])]})}}function c5(e,t){return t?Number(t):d5(e)?0:1}function d5(e){return l5.includes(e.toLowerCase())}var Y$={},di=e=>{console.error(e)},Q$=(e,...t)=>{console.log(`WARN: ${e}`,...t)},vo=(e,t)=>{Y$[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Y$[`${e}/${t}`]=!0)},fc=new Error;function dC(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+=oC(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function f5(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw di("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fc;if(typeof e.beginScope!="object"||e.beginScope===null)throw di("beginScope must be object"),fc;dC(e,e.begin,{key:"beginScope"}),e.begin=t0(e.begin,{joinWith:""})}}function p5(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw di("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fc;if(typeof e.endScope!="object"||e.endScope===null)throw di("endScope must be object"),fc;dC(e,e.end,{key:"endScope"}),e.end=t0(e.end,{joinWith:""})}}function h5(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function m5(e){h5(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),f5(e),p5(e)}function g5(e){function t(s,a){return new RegExp(ha(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+=oC(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(l=>l[1]);this.matcherRe=t(t0(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;[n5,o5,m5,a5].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[r5,i5,s5].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=cC(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=ha(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 b5(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=zr(e.classNameAliases||{}),o(e)}function fC(e){return e?e.endsWithParent||fC(e.starts):!1}function b5(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return zr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:fC(e)?zr(e,{starts:e.starts?zr(e.starts):null}):Object.isFrozen(e)?zr(e):e}var v5="11.11.1",Qm=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},Jm=rC,eC=zr,tC=Symbol("nomatch"),y5=7,pC=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:Ym};function l(I){return a.noHighlightRe.test(I)}function u(I){let W=I.className+" ";W+=I.parentNode?I.parentNode.className:"";let Z=a.languageDetectRe.exec(W);if(Z){let te=z(Z[1]);return te||(Q$(o.replace("{}",Z[1])),Q$("Falling back to no-highlight mode for this block.",I)),te?Z[1]:"no-highlight"}return W.split(/\s+/).find(te=>l(te)||z(te))}function c(I,W,Z){let te="",de="";typeof W=="object"?(te=I,Z=W.ignoreIllegals,de=W.language):(vo("10.7.0","highlight(lang, code, ...args) has been deprecated."),vo("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),de=I,te=W),Z===void 0&&(Z=!0);let w={code:te,language:de};De("before:highlight",w);let S=w.result?w.result:d(w.language,w.code,Z);return S.code=w.code,De("after:highlight",S),S}function d(I,W,Z,te){let de=Object.create(null);function w(E,N){return E.keywords[N]}function S(){if(!oe.keywords){st.addText(Ne);return}let E=0;oe.keywordPatternRe.lastIndex=0;let N=oe.keywordPatternRe.exec(Ne),U="";for(;N;){U+=Ne.substring(E,N.index);let se=Qe.case_insensitive?N[0].toLowerCase():N[0],Se=w(oe,se);if(Se){let[at,Pn]=Se;if(st.addText(U),U="",de[se]=(de[se]||0)+1,de[se]<=y5&&(Qr+=Pn),at.startsWith("_"))U+=N[0];else{let ei=Qe.classNameAliases[at]||at;re(N[0],ei)}}else U+=N[0];E=oe.keywordPatternRe.lastIndex,N=oe.keywordPatternRe.exec(Ne)}U+=Ne.substring(E),st.addText(U)}function O(){if(Ne==="")return;let E=null;if(typeof oe.subLanguage=="string"){if(!t[oe.subLanguage]){st.addText(Ne);return}E=d(oe.subLanguage,Ne,!0,ds[oe.subLanguage]),ds[oe.subLanguage]=E._top}else E=p(Ne,oe.subLanguage.length?oe.subLanguage:null);oe.relevance>0&&(Qr+=E.relevance),st.__addSublanguage(E._emitter,E.language)}function L(){oe.subLanguage!=null?O():S(),Ne=""}function re(E,N){E!==""&&(st.startScope(N),st.addText(E),st.endScope())}function Q(E,N){let U=1,se=N.length-1;for(;U<=se;){if(!E._emit[U]){U++;continue}let Se=Qe.classNameAliases[E[U]]||E[U],at=N[U];Se?re(at,Se):(Ne=at,S(),Ne=""),U++}}function Ce(E,N){return E.scope&&typeof E.scope=="string"&&st.openNode(Qe.classNameAliases[E.scope]||E.scope),E.beginScope&&(E.beginScope._wrap?(re(Ne,Qe.classNameAliases[E.beginScope._wrap]||E.beginScope._wrap),Ne=""):E.beginScope._multi&&(Q(E.beginScope,N),Ne="")),oe=Object.create(E,{parent:{value:oe}}),oe}function pt(E,N,U){let se=R9(E.endRe,U);if(se){if(E["on:end"]){let Se=new dc(E);E["on:end"](N,Se),Se.isMatchIgnored&&(se=!1)}if(se){for(;E.endsParent&&E.parent;)E=E.parent;return E}}if(E.endsWithParent)return pt(E.parent,N,U)}function ke(E){return oe.matcher.regexIndex===0?(Ne+=E[0],1):(Ji=!0,0)}function Pe(E){let N=E[0],U=E.rule,se=new dc(U),Se=[U.__beforeBegin,U["on:begin"]];for(let at of Se)if(at&&(at(E,se),se.isMatchIgnored))return ke(N);return U.skip?Ne+=N:(U.excludeBegin&&(Ne+=N),L(),!U.returnBegin&&!U.excludeBegin&&(Ne=N)),Ce(U,E),U.returnBegin?0:N.length}function wt(E){let N=E[0],U=W.substring(E.index),se=pt(oe,E,U);if(!se)return tC;let Se=oe;oe.endScope&&oe.endScope._wrap?(L(),re(N,oe.endScope._wrap)):oe.endScope&&oe.endScope._multi?(L(),Q(oe.endScope,E)):Se.skip?Ne+=N:(Se.returnEnd||Se.excludeEnd||(Ne+=N),L(),Se.excludeEnd&&(Ne=N));do oe.scope&&st.closeNode(),!oe.skip&&!oe.subLanguage&&(Qr+=oe.relevance),oe=oe.parent;while(oe!==se.parent);return se.starts&&Ce(se.starts,E),Se.returnEnd?0:N.length}function Mt(){let E=[];for(let N=oe;N!==Qe;N=N.parent)N.scope&&E.unshift(N.scope);E.forEach(N=>st.openNode(N))}let Ye={};function Oe(E,N){let U=N&&N[0];if(Ne+=E,U==null)return L(),0;if(Ye.type==="begin"&&N.type==="end"&&Ye.index===N.index&&U===""){if(Ne+=W.slice(N.index,N.index+1),!r){let se=new Error(`0 width match regex (${I})`);throw se.languageName=I,se.badRule=Ye.rule,se}return 1}if(Ye=N,N.type==="begin")return Pe(N);if(N.type==="illegal"&&!Z){let se=new Error('Illegal lexeme "'+U+'" for mode "'+(oe.scope||"<unnamed>")+'"');throw se.mode=oe,se}else if(N.type==="end"){let se=wt(N);if(se!==tC)return se}if(N.type==="illegal"&&U==="")return Ne+=`
`,1;if(Ki>1e5&&Ki>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ne+=U,U.length}let Qe=z(I);if(!Qe)throw di(o.replace("{}",I)),new Error('Unknown language: "'+I+'"');let Vi=g5(Qe),On="",oe=te||Vi,ds={},st=new a.__emitter(a);Mt();let Ne="",Qr=0,Rn=0,Ki=0,Ji=!1;try{if(Qe.__emitTokens)Qe.__emitTokens(W,st);else{for(oe.matcher.considerAll();;){Ki++,Ji?Ji=!1:oe.matcher.considerAll(),oe.matcher.lastIndex=Rn;let E=oe.matcher.exec(W);if(!E)break;let N=W.substring(Rn,E.index),U=Oe(N,E);Rn=E.index+U}Oe(W.substring(Rn))}return st.finalize(),On=st.toHTML(),{language:I,value:On,relevance:Qr,illegal:!1,_emitter:st,_top:oe}}catch(E){if(E.message&&E.message.includes("Illegal"))return{language:I,value:Jm(W),illegal:!0,relevance:0,_illegalBy:{message:E.message,index:Rn,context:W.slice(Rn-100,Rn+100),mode:E.mode,resultSoFar:On},_emitter:st};if(r)return{language:I,value:Jm(W),illegal:!1,relevance:0,errorRaised:E,_emitter:st,_top:oe};throw E}}function f(I){let W={value:Jm(I),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return W._emitter.addText(I),W}function p(I,W){W=W||a.languages||Object.keys(t);let Z=f(I),te=W.filter(z).filter(ce).map(L=>d(L,I,!1));te.unshift(Z);let de=te.sort((L,re)=>{if(L.relevance!==re.relevance)return re.relevance-L.relevance;if(L.language&&re.language){if(z(L.language).supersetOf===re.language)return 1;if(z(re.language).supersetOf===L.language)return-1}return 0}),[w,S]=de,O=w;return O.secondBest=S,O}function h(I,W,Z){let te=W&&n[W]||Z;I.classList.add("hljs"),I.classList.add(`language-${te}`)}function m(I){let W=null,Z=u(I);if(l(Z))return;if(De("before:highlightElement",{el:I,language:Z}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.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(I)),a.throwUnescapedHTML))throw new Qm("One of your code blocks includes unescaped HTML.",I.innerHTML);W=I;let te=W.textContent,de=Z?c(te,{language:Z,ignoreIllegals:!0}):p(te);I.innerHTML=de.value,I.dataset.highlighted="yes",h(I,Z,de.language),I.result={language:de.language,re:de.relevance,relevance:de.relevance},de.secondBest&&(I.secondBest={language:de.secondBest.language,relevance:de.secondBest.relevance}),De("after:highlightElement",{el:I,result:de,text:te})}function g(I){a=eC(a,I)}let b=()=>{x(),vo("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function v(){x(),vo("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let y=!1;function x(){function I(){x()}if(document.readyState==="loading"){y||window.addEventListener("DOMContentLoaded",I,!1),y=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function C(I,W){let Z=null;try{Z=W(e)}catch(te){if(di("Language definition for '{}' could not be registered.".replace("{}",I)),r)di(te);else throw te;Z=s}Z.name||(Z.name=I),t[I]=Z,Z.rawDefinition=W.bind(null,e),Z.aliases&&V(Z.aliases,{languageName:I})}function A(I){delete t[I];for(let W of Object.keys(n))n[W]===I&&delete n[W]}function D(){return Object.keys(t)}function z(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function V(I,{languageName:W}){typeof I=="string"&&(I=[I]),I.forEach(Z=>{n[Z.toLowerCase()]=W})}function ce(I){let W=z(I);return W&&!W.disableAutodetect}function ze(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=W=>{I["before:highlightBlock"](Object.assign({block:W.el},W))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=W=>{I["after:highlightBlock"](Object.assign({block:W.el},W))})}function nt(I){ze(I),i.push(I)}function He(I){let W=i.indexOf(I);W!==-1&&i.splice(W,1)}function De(I,W){let Z=I;i.forEach(function(te){te[Z]&&te[Z](W)})}function ae(I){return vo("10.7.0","highlightBlock will be removed entirely in v12.0"),vo("10.7.0","Please use highlightElement now."),m(I)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:ae,configure:g,initHighlighting:b,initHighlightingOnLoad:v,registerLanguage:C,unregisterLanguage:A,listLanguages:D,getLanguage:z,registerAliases:V,autoDetection:ce,inherit:eC,addPlugin:nt,removePlugin:He}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=v5,e.regex={concat:fi,lookahead:iC,either:e0,optional:N9,anyNumberOfTimes:D9};for(let I in cc)typeof cc[I]=="object"&&nC(cc[I]);return Object.assign(e,cc),e},yo=pC({});yo.newInstance=()=>pC({});hC.exports=yo;yo.HighlightJS=yo;yo.default=yo});var Z4=my((pue,j4)=>{var Hv=!0,B4=!1,U4=!1;j4.exports=function(e,t){t&&(Hv=!t.enabled,B4=!!t.label,U4=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var i=n.tokens,r=2;r<i.length;r++)$V(i,r)&&(CV(i[r],n.Token),F4(i[r-2],"class","task-list-item"+(Hv?"":" enabled")),F4(i[EV(i,r-2)],"class","contains-task-list"))})};function F4(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function EV(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 $V(e,t){return zV(e[t])&&DV(e[t-1])&&NV(e[t-2])&&OV(e[t])}function CV(e,t){if(e.children.unshift(TV(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),B4)if(U4){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(MV(e.content,n,t))}else e.children.unshift(IV(t)),e.children.push(AV(t))}function TV(e,t){var n=new t("html_inline","",0),i=Hv?' 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 IV(e){var t=new e("html_inline","",0);return t.content="<label>",t}function AV(e){var t=new e("html_inline","",0);return t.content="</label>",t}function MV(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 zV(e){return e.type==="inline"}function DV(e){return e.type==="paragraph_open"}function NV(e){return e.type==="list_item_open"}function OV(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var LJ=Object.freeze({status:"aborted"});function T(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 Yn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},El={};function un(e){return e&&Object.assign(El,e),El}var Te={};Gi(Te,{BIGINT_FORMAT_RANGES:()=>vy,Class:()=>Uf,NUMBER_FORMAT_RANGES:()=>Jf,aborted:()=>ni,allowsEval:()=>Wf,assert:()=>hD,assertEqual:()=>cD,assertIs:()=>fD,assertNever:()=>pD,assertNotEqual:()=>dD,assignProp:()=>qf,cached:()=>hs,captureStackTrace:()=>Cl,cleanEnum:()=>CD,cleanRegex:()=>gs,clone:()=>Ln,createTransparentProxy:()=>kD,defineLazy:()=>Ue,esc:()=>ti,escapeRegex:()=>Er,extend:()=>_D,finalizeIssue:()=>En,floatSafeRemainder:()=>Hf,getElementAtPath:()=>mD,getEnumValues:()=>jf,getLengthableOrigin:()=>bs,getParsedType:()=>yD,getSizableOrigin:()=>yy,isObject:()=>Xi,isPlainObject:()=>Yi,issue:()=>Gf,joinValues:()=>$l,jsonStringifyReplacer:()=>Zf,merge:()=>SD,normalizeParams:()=>ee,nullish:()=>ms,numKeys:()=>vD,omit:()=>wD,optionalKeys:()=>Kf,partial:()=>ED,pick:()=>xD,prefixIssues:()=>Fn,primitiveTypes:()=>by,promiseAllObject:()=>gD,propertyKeyTypes:()=>Vf,randomString:()=>bD,required:()=>$D,stringifyPrimitive:()=>Tl,unwrapMessage:()=>ps});function cD(e){return e}function dD(e){return e}function fD(e){}function pD(e){throw new Error}function hD(e){}function jf(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 $l(e,t="|"){return e.map(n=>Tl(n)).join(t)}function Zf(e,t){return typeof t=="bigint"?t.toString():t}function hs(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ms(e){return e==null}function gs(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Hf(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 Ue(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 qf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function mD(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function gD(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 bD(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function ti(e){return JSON.stringify(e)}var Cl=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Xi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Wf=hs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Yi(e){if(Xi(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Xi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function vD(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var yD=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}`)}},Vf=new Set(["string","number","symbol"]),by=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ln(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ee(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 kD(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 Tl(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Kf(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Jf={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]},vy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function xD(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 Ln(e,{...e._zod.def,shape:n,checks:[]})}function wD(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 Ln(e,{...e._zod.def,shape:n,checks:[]})}function _D(e,t){if(!Yi(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 qf(this,"shape",i),i},checks:[]};return Ln(e,n)}function SD(e,t){return Ln(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return qf(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function ED(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 Ln(t,{...t._zod.def,shape:r,checks:[]})}function $D(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 Ln(t,{...t._zod.def,shape:r,checks:[]})}function ni(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fn(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ps(e){return typeof e=="string"?e:e?.message}function En(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=ps(e.inst?._zod.def?.error?.(e))??ps(t?.error?.(e))??ps(n.customError?.(e))??ps(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yy(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function bs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gf(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function CD(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Uf=class{constructor(...t){}};var ky=(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,Zf,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Il=T("$ZodError",ky),Xf=T("$ZodError",ky,{Parent:Error});function xy(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 wy(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 _y=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 Yn;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>En(l,o,un())));throw Cl(a,r?.callee),a}return s.value};var Sy=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,un())));throw Cl(a,r?.callee),a}return s.value};var Yf=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 Yn;return o.issues.length?{success:!1,error:new(e??Il)(o.issues.map(s=>En(s,r,un())))}:{success:!0,data:o.value}},vs=Yf(Xf),Qf=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,un())))}:{success:!0,data:o.value}},Al=Qf(Xf);var Ey=/^[cC][^\s-]{8,}$/,$y=/^[0-9a-z]+$/,Cy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ty=/^[0-9a-vA-V]{20}$/,Iy=/^[A-Za-z0-9]{27}$/,Ay=/^[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 zy=/^([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})$/,ep=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 Dy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var ID="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ny(){return new RegExp(ID,"u")}var Oy=/^(?:(?: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])$/,Ry=/^(([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})$/,Py=/^((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])$/,Ly=/^(([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])$/,Fy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tp=/^[A-Za-z0-9_-]*$/,By=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Uy=/^\+(?:[0-9]){6,14}[0-9]$/,jy="(?:(?:\\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])))",Zy=new RegExp(`^${jy}$`);function Hy(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 qy(e){return new RegExp(`^${Hy(e)}$`)}function Wy(e){let t=Hy({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(`^${jy}T(?:${i})$`)}var Vy=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var Ky=/^\d+$/,Jy=/^-?\d+(?:\.\d+)?/i,Gy=/true|false/i,Xy=/null/i;var Yy=/^[^A-Z]*$/,Qy=/^[^a-z]*$/;var Dt=T("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),e1={number:"number",bigint:"bigint",object:"date"},rp=T("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);let n=e1[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})}}),ip=T("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);let n=e1[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})}}),t1=T("$ZodCheckMultipleOf",(e,t)=>{Dt.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):Hf(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})}}),n1=T("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Jf[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=Ky)}),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 r1=T("$ZodCheckMaxLength",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ms(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=bs(r);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),i1=T("$ZodCheckMinLength",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ms(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=bs(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),o1=T("$ZodCheckLengthEquals",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ms(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=bs(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})}}),ys=T("$ZodCheckStringFormat",(e,t)=>{var n,i;Dt.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=()=>{})}),s1=T("$ZodCheckRegex",(e,t)=>{ys.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})}}),a1=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yy),ys.init(e,t)}),l1=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qy),ys.init(e,t)}),u1=T("$ZodCheckIncludes",(e,t)=>{Dt.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})}}),c1=T("$ZodCheckStartsWith",(e,t)=>{Dt.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})}}),d1=T("$ZodCheckEndsWith",(e,t)=>{Dt.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})}});var f1=T("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Ml=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 h1={major:4,minor:0,patch:0};var je=T("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=h1;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=ni(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 Yn;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,o.issues.length!==d&&(l||(l=ni(o,d)))});else{if(o.issues.length===d)continue;l||(l=ni(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 Yn;return a.then(l=>r(l,i,s))}return r(a,i,s)}}e["~standard"]={validate:r=>{try{let o=vs(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Al(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Dl=T("$ZodString",(e,t)=>{je.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vy(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}}),qe=T("$ZodStringFormat",(e,t)=>{ys.init(e,t),Dl.init(e,t)}),S1=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=zy),qe.init(e,t)}),E1=T("$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=ep(i))}else t.pattern??(t.pattern=ep());qe.init(e,t)}),$1=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Dy),qe.init(e,t)}),C1=T("$ZodURL",(e,t)=>{qe.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:By.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})}}}),T1=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ny()),qe.init(e,t)}),I1=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ay),qe.init(e,t)}),A1=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ey),qe.init(e,t)}),M1=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=$y),qe.init(e,t)}),z1=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Cy),qe.init(e,t)}),D1=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ty),qe.init(e,t)}),N1=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Iy),qe.init(e,t)}),O1=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Wy(t)),qe.init(e,t)}),R1=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Zy),qe.init(e,t)}),P1=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qy(t)),qe.init(e,t)}),L1=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=My),qe.init(e,t)}),F1=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Oy),qe.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format="ipv4"})}),B1=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ry),qe.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})}}}),U1=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Py),qe.init(e,t)}),j1=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ly),qe.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 Z1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var H1=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Fy),qe.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Z1(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function AD(e){if(!tp.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Z1(n)}var q1=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tp),qe.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{AD(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),W1=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Uy),qe.init(e,t)});function MD(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 V1=T("$ZodJWT",(e,t)=>{qe.init(e,t),e._zod.check=n=>{MD(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}});var sp=T("$ZodNumber",(e,t)=>{je.init(e,t),e._zod.pattern=e._zod.bag.pattern??Jy,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}}),K1=T("$ZodNumber",(e,t)=>{n1.init(e,t),sp.init(e,t)}),J1=T("$ZodBoolean",(e,t)=>{je.init(e,t),e._zod.pattern=Gy,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 G1=T("$ZodNull",(e,t)=>{je.init(e,t),e._zod.pattern=Xy,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 X1=T("$ZodUnknown",(e,t)=>{je.init(e,t),e._zod.parse=n=>n}),Y1=T("$ZodNever",(e,t)=>{je.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function m1(e,t,n){e.issues.length&&t.issues.push(...Fn(n,e.issues)),t.value[n]=e.value}var Q1=T("$ZodArray",(e,t)=>{je.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=>m1(u,n,s))):m1(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function zl(e,t,n){e.issues.length&&t.issues.push(...Fn(n,e.issues)),t.value[n]=e.value}function g1(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(...Fn(n,e.issues)):e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}var ek=T("$ZodObject",(e,t)=>{je.init(e,t);let n=hs(()=>{let d=Object.keys(t.shape);for(let p of d)if(!(t.shape[p]instanceof je))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);let f=Kf(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});Ue(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 Ml(["shape","payload","ctx"]),p=n.value,h=v=>{let y=ti(v);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),g=0;for(let v of p.keys)m[v]=`key_${g++}`;f.write("const newResult = {}");for(let v of p.keys)if(p.optionalKeys.has(v)){let y=m[v];f.write(`const ${y} = ${h(v)};`);let x=ti(v);f.write(`
        if (${y}.issues.length) {
          if (input[${x}] === undefined) {
            if (${x} in input) {
              newResult[${x}] = undefined;
            }
          } else {
            payload.issues = payload.issues.concat(
              ${y}.issues.map((iss) => ({
                ...iss,
                path: iss.path ? [${x}, ...iss.path] : [${x}],
              }))
            );
          }
        } else if (${y}.value === undefined) {
          if (${x} in input) newResult[${x}] = undefined;
        } else {
          newResult[${x}] = ${y}.value;
        }
        `)}else{let y=m[v];f.write(`const ${y} = ${h(v)};`),f.write(`
          if (${y}.issues.length) payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${ti(v)}, ...iss.path] : [${ti(v)}]
          })));`),f.write(`newResult[${ti(v)}] = ${y}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(v,y)=>b(d,v,y)},r,o=Xi,s=!El.jitless,l=s&&Wf.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 y=c.shape;for(let x of c.keys){let C=y[x],A=C._zod.run({value:p[x],issues:[]},f),D=C._zod.optin==="optional"&&C._zod.optout==="optional";A instanceof Promise?h.push(A.then(z=>D?g1(z,d,x,p):zl(z,d,x))):D?g1(A,d,x,p):zl(A,d,x)}}if(!u)return h.length?Promise.all(h).then(()=>d):d;let m=[],g=c.keySet,b=u._zod,v=b.def.type;for(let y of Object.keys(p)){if(g.has(y))continue;if(v==="never"){m.push(y);continue}let x=b.run({value:p[y],issues:[]},f);x instanceof Promise?h.push(x.then(C=>zl(C,d,y))):zl(x,d,y)}return m.length&&d.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:e}),h.length?Promise.all(h).then(()=>d):d}});function b1(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,un())))}),t}var ap=T("$ZodUnion",(e,t)=>{je.init(e,t),Ue(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ue(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ue(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ue(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=>gs(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=>b1(s,n,e,i)):b1(o,n,e,i)}}),tk=T("$ZodDiscriminatedUnion",(e,t)=>{ap.init(e,t);let n=e._zod.parse;Ue(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=hs(()=>{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(!Xi(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)}}),nk=T("$ZodIntersection",(e,t)=>{je.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])=>v1(n,l,u)):v1(n,o,s)}});function op(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(Yi(e)&&Yi(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=op(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=op(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 v1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ni(e))return e;let i=op(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 rk=T("$ZodRecord",(e,t)=>{je.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Yi(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(...Fn(l,c.issues)),n.value[l]=c.value})):(u.issues.length&&n.issues.push(...Fn(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,un())),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(...Fn(s,u.issues)),n.value[a.value]=u.value})):(l.issues.length&&n.issues.push(...Fn(s,l.issues)),n.value[a.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}});var ik=T("$ZodEnum",(e,t)=>{je.init(e,t);let n=jf(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(i=>Vf.has(typeof i)).map(i=>typeof i=="string"?Er(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}}),ok=T("$ZodLiteral",(e,t)=>{je.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Er(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 sk=T("$ZodTransform",(e,t)=>{je.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 Yn;return n.value=r,n}}),ak=T("$ZodOptional",(e,t)=>{je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ue(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${gs(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)}),lk=T("$ZodNullable",(e,t)=>{je.init(e,t),Ue(e._zod,"optin",()=>t.innerType._zod.optin),Ue(e._zod,"optout",()=>t.innerType._zod.optout),Ue(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${gs(n.source)}|null)$`):void 0}),Ue(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)}),uk=T("$ZodDefault",(e,t)=>{je.init(e,t),e._zod.optin="optional",Ue(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=>y1(o,t)):y1(r,t)}});function y1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ck=T("$ZodPrefault",(e,t)=>{je.init(e,t),e._zod.optin="optional",Ue(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))}),dk=T("$ZodNonOptional",(e,t)=>{je.init(e,t),Ue(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=>k1(o,e)):k1(r,e)}});function k1(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 fk=T("$ZodCatch",(e,t)=>{je.init(e,t),e._zod.optin="optional",Ue(e._zod,"optout",()=>t.innerType._zod.optout),Ue(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,un()))},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,un()))},input:n.value}),n.issues=[]),n)}});var pk=T("$ZodPipe",(e,t)=>{je.init(e,t),Ue(e._zod,"values",()=>t.in._zod.values),Ue(e._zod,"optin",()=>t.in._zod.optin),Ue(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=>x1(o,t,i)):x1(r,t,i)}});function x1(e,t,n){return ni(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var hk=T("$ZodReadonly",(e,t)=>{je.init(e,t),Ue(e._zod,"propValues",()=>t.innerType._zod.propValues),Ue(e._zod,"values",()=>t.innerType._zod.values),Ue(e._zod,"optin",()=>t.innerType._zod.optin),Ue(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(w1):w1(r)}});function w1(e){return e.value=Object.freeze(e.value),e}var mk=T("$ZodCustom",(e,t)=>{Dt.init(e,t),je.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=>_1(o,n,i,e));_1(r,n,i,e)}});function _1(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(Gf(r))}}var zD=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},DD=()=>{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 ${zD(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${Tl(i.values[0])}`:`Invalid option: expected one of ${$l(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":""}: ${$l(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 gk(){return{localeError:DD()}}var lp=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 ND(){return new lp}var ks=ND();function bk(e,t){return new e({type:"string",...ee(t)})}function vk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ee(t)})}function up(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ee(t)})}function yk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ee(t)})}function kk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ee(t)})}function xk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ee(t)})}function wk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ee(t)})}function _k(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ee(t)})}function Sk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ee(t)})}function Ek(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ee(t)})}function $k(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ee(t)})}function Ck(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ee(t)})}function Tk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ee(t)})}function Ik(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ee(t)})}function Ak(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ee(t)})}function Mk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ee(t)})}function zk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ee(t)})}function Dk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ee(t)})}function Nk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ee(t)})}function Ok(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ee(t)})}function Rk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ee(t)})}function Pk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ee(t)})}function Lk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ee(t)})}function Fk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ee(t)})}function Bk(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function Uk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function jk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function Zk(e,t){return new e({type:"number",checks:[],...ee(t)})}function Hk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ee(t)})}function qk(e,t){return new e({type:"boolean",...ee(t)})}function Wk(e,t){return new e({type:"null",...ee(t)})}function Vk(e){return new e({type:"unknown"})}function Kk(e,t){return new e({type:"never",...ee(t)})}function Nl(e,t){return new rp({check:"less_than",...ee(t),value:e,inclusive:!1})}function xs(e,t){return new rp({check:"less_than",...ee(t),value:e,inclusive:!0})}function Ol(e,t){return new ip({check:"greater_than",...ee(t),value:e,inclusive:!1})}function ws(e,t){return new ip({check:"greater_than",...ee(t),value:e,inclusive:!0})}function Rl(e,t){return new t1({check:"multiple_of",...ee(t),value:e})}function Pl(e,t){return new r1({check:"max_length",...ee(t),maximum:e})}function Qi(e,t){return new i1({check:"min_length",...ee(t),minimum:e})}function Ll(e,t){return new o1({check:"length_equals",...ee(t),length:e})}function cp(e,t){return new s1({check:"string_format",format:"regex",...ee(t),pattern:e})}function dp(e){return new a1({check:"string_format",format:"lowercase",...ee(e)})}function fp(e){return new l1({check:"string_format",format:"uppercase",...ee(e)})}function pp(e,t){return new u1({check:"string_format",format:"includes",...ee(t),includes:e})}function hp(e,t){return new c1({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function mp(e,t){return new d1({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function ri(e){return new f1({check:"overwrite",tx:e})}function gp(e){return ri(t=>t.normalize(e))}function bp(){return ri(e=>e.trim())}function vp(){return ri(e=>e.toLowerCase())}function yp(){return ri(e=>e.toUpperCase())}function Jk(e,t,n){return new e({type:"array",element:t,...ee(n)})}function Gk(e,t,n){let i=ee(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Xk(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ee(n)})}function Fl(e){return!!e._zod}function Bl(e,t){return Fl(e)?vs(e,t):e.safeParse(t)}function Yk(e){if(!e)return;let t;if(Fl(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Qk(e){if(Fl(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 Ss={};Gi(Ss,{ZodISODate:()=>tx,ZodISODateTime:()=>ex,ZodISODuration:()=>rx,ZodISOTime:()=>nx,date:()=>xp,datetime:()=>kp,duration:()=>_p,time:()=>wp});var ex=T("ZodISODateTime",(e,t)=>{O1.init(e,t),Ke.init(e,t)});function kp(e){return Fk(ex,e)}var tx=T("ZodISODate",(e,t)=>{R1.init(e,t),Ke.init(e,t)});function xp(e){return Bk(tx,e)}var nx=T("ZodISOTime",(e,t)=>{P1.init(e,t),Ke.init(e,t)});function wp(e){return Uk(nx,e)}var rx=T("ZodISODuration",(e,t)=>{L1.init(e,t),Ke.init(e,t)});function _p(e){return jk(rx,e)}var ix=(e,t)=>{Il.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>wy(e,n)},flatten:{value:n=>xy(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},MG=T("ZodError",ix),Es=T("ZodError",ix,{Parent:Error});var ox=_y(Es),sx=Sy(Es),ax=Yf(Es),lx=Qf(Es);var et=T("ZodType",(e,t)=>(je.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)=>Ln(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>ox(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>ax(e,n,i),e.parseAsync=async(n,i)=>sx(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>lx(e,n,i),e.spa=e.safeParseAsync,e.refine=(n,i)=>e.check(MN(n,i)),e.superRefine=n=>e.check(zN(n)),e.overwrite=n=>e.check(ri(n)),e.optional=()=>Ge(e),e.nullable=()=>dx(e),e.nullish=()=>Ge(dx(e)),e.nonoptional=n=>SN(e,n),e.array=()=>we(e),e.or=n=>We([e,n]),e.and=n=>jl(e,n),e.transform=n=>Ep(e,bx(n)),e.default=n=>xN(e,n),e.prefault=n=>_N(e,n),e.catch=n=>$N(e,n),e.pipe=n=>Ep(e,n),e.readonly=()=>IN(e),e.describe=n=>{let i=e.clone();return ks.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return ks.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ks.get(e);let i=e.clone();return ks.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),fx=T("_ZodString",(e,t)=>{Dl.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(cp(...i)),e.includes=(...i)=>e.check(pp(...i)),e.startsWith=(...i)=>e.check(hp(...i)),e.endsWith=(...i)=>e.check(mp(...i)),e.min=(...i)=>e.check(Qi(...i)),e.max=(...i)=>e.check(Pl(...i)),e.length=(...i)=>e.check(Ll(...i)),e.nonempty=(...i)=>e.check(Qi(1,...i)),e.lowercase=i=>e.check(dp(i)),e.uppercase=i=>e.check(fp(i)),e.trim=()=>e.check(bp()),e.normalize=(...i)=>e.check(gp(...i)),e.toLowerCase=()=>e.check(vp()),e.toUpperCase=()=>e.check(yp())}),ZD=T("ZodString",(e,t)=>{Dl.init(e,t),fx.init(e,t),e.email=n=>e.check(vk(HD,n)),e.url=n=>e.check(_k(qD,n)),e.jwt=n=>e.check(Lk(sN,n)),e.emoji=n=>e.check(Sk(WD,n)),e.guid=n=>e.check(up(ux,n)),e.uuid=n=>e.check(yk(Ul,n)),e.uuidv4=n=>e.check(kk(Ul,n)),e.uuidv6=n=>e.check(xk(Ul,n)),e.uuidv7=n=>e.check(wk(Ul,n)),e.nanoid=n=>e.check(Ek(VD,n)),e.guid=n=>e.check(up(ux,n)),e.cuid=n=>e.check($k(KD,n)),e.cuid2=n=>e.check(Ck(JD,n)),e.ulid=n=>e.check(Tk(GD,n)),e.base64=n=>e.check(Ok(rN,n)),e.base64url=n=>e.check(Rk(iN,n)),e.xid=n=>e.check(Ik(XD,n)),e.ksuid=n=>e.check(Ak(YD,n)),e.ipv4=n=>e.check(Mk(QD,n)),e.ipv6=n=>e.check(zk(eN,n)),e.cidrv4=n=>e.check(Dk(tN,n)),e.cidrv6=n=>e.check(Nk(nN,n)),e.e164=n=>e.check(Pk(oN,n)),e.datetime=n=>e.check(kp(n)),e.date=n=>e.check(xp(n)),e.time=n=>e.check(wp(n)),e.duration=n=>e.check(_p(n))});function $(e){return bk(ZD,e)}var Ke=T("ZodStringFormat",(e,t)=>{qe.init(e,t),fx.init(e,t)}),HD=T("ZodEmail",(e,t)=>{$1.init(e,t),Ke.init(e,t)});var ux=T("ZodGUID",(e,t)=>{S1.init(e,t),Ke.init(e,t)});var Ul=T("ZodUUID",(e,t)=>{E1.init(e,t),Ke.init(e,t)});var qD=T("ZodURL",(e,t)=>{C1.init(e,t),Ke.init(e,t)});var WD=T("ZodEmoji",(e,t)=>{T1.init(e,t),Ke.init(e,t)});var VD=T("ZodNanoID",(e,t)=>{I1.init(e,t),Ke.init(e,t)});var KD=T("ZodCUID",(e,t)=>{A1.init(e,t),Ke.init(e,t)});var JD=T("ZodCUID2",(e,t)=>{M1.init(e,t),Ke.init(e,t)});var GD=T("ZodULID",(e,t)=>{z1.init(e,t),Ke.init(e,t)});var XD=T("ZodXID",(e,t)=>{D1.init(e,t),Ke.init(e,t)});var YD=T("ZodKSUID",(e,t)=>{N1.init(e,t),Ke.init(e,t)});var QD=T("ZodIPv4",(e,t)=>{F1.init(e,t),Ke.init(e,t)});var eN=T("ZodIPv6",(e,t)=>{B1.init(e,t),Ke.init(e,t)});var tN=T("ZodCIDRv4",(e,t)=>{U1.init(e,t),Ke.init(e,t)});var nN=T("ZodCIDRv6",(e,t)=>{j1.init(e,t),Ke.init(e,t)});var rN=T("ZodBase64",(e,t)=>{H1.init(e,t),Ke.init(e,t)});var iN=T("ZodBase64URL",(e,t)=>{q1.init(e,t),Ke.init(e,t)});var oN=T("ZodE164",(e,t)=>{W1.init(e,t),Ke.init(e,t)});var sN=T("ZodJWT",(e,t)=>{V1.init(e,t),Ke.init(e,t)});var px=T("ZodNumber",(e,t)=>{sp.init(e,t),et.init(e,t),e.gt=(i,r)=>e.check(Ol(i,r)),e.gte=(i,r)=>e.check(ws(i,r)),e.min=(i,r)=>e.check(ws(i,r)),e.lt=(i,r)=>e.check(Nl(i,r)),e.lte=(i,r)=>e.check(xs(i,r)),e.max=(i,r)=>e.check(xs(i,r)),e.int=i=>e.check(cx(i)),e.safe=i=>e.check(cx(i)),e.positive=i=>e.check(Ol(0,i)),e.nonnegative=i=>e.check(ws(0,i)),e.negative=i=>e.check(Nl(0,i)),e.nonpositive=i=>e.check(xs(0,i)),e.multipleOf=(i,r)=>e.check(Rl(i,r)),e.step=(i,r)=>e.check(Rl(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 Me(e){return Zk(px,e)}var aN=T("ZodNumberFormat",(e,t)=>{K1.init(e,t),px.init(e,t)});function cx(e){return Hk(aN,e)}var lN=T("ZodBoolean",(e,t)=>{J1.init(e,t),et.init(e,t)});function bt(e){return qk(lN,e)}var uN=T("ZodNull",(e,t)=>{G1.init(e,t),et.init(e,t)});function hx(e){return Wk(uN,e)}var cN=T("ZodUnknown",(e,t)=>{X1.init(e,t),et.init(e,t)});function Je(){return Vk(cN)}var dN=T("ZodNever",(e,t)=>{Y1.init(e,t),et.init(e,t)});function fN(e){return Kk(dN,e)}var pN=T("ZodArray",(e,t)=>{Q1.init(e,t),et.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(Qi(n,i)),e.nonempty=n=>e.check(Qi(1,n)),e.max=(n,i)=>e.check(Pl(n,i)),e.length=(n,i)=>e.check(Ll(n,i)),e.unwrap=()=>e.element});function we(e,t){return Jk(pN,e,t)}var mx=T("ZodObject",(e,t)=>{ek.init(e,t),et.init(e,t),Te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Kt(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:fN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Te.extend(e,n),e.merge=n=>Te.merge(e,n),e.pick=n=>Te.pick(e,n),e.omit=n=>Te.omit(e,n),e.partial=(...n)=>Te.partial(vx,e,n[0]),e.required=(...n)=>Te.required(yx,e,n[0])});function H(e,t){let n={type:"object",get shape(){return Te.assignProp(this,"shape",{...e}),this.shape},...Te.normalizeParams(t)};return new mx(n)}function jt(e,t){return new mx({type:"object",get shape(){return Te.assignProp(this,"shape",{...e}),this.shape},catchall:Je(),...Te.normalizeParams(t)})}var gx=T("ZodUnion",(e,t)=>{ap.init(e,t),et.init(e,t),e.options=t.options});function We(e,t){return new gx({type:"union",options:e,...Te.normalizeParams(t)})}var hN=T("ZodDiscriminatedUnion",(e,t)=>{gx.init(e,t),tk.init(e,t)});function $p(e,t,n){return new hN({type:"union",options:t,discriminator:e,...Te.normalizeParams(n)})}var mN=T("ZodIntersection",(e,t)=>{nk.init(e,t),et.init(e,t)});function jl(e,t){return new mN({type:"intersection",left:e,right:t})}var gN=T("ZodRecord",(e,t)=>{rk.init(e,t),et.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ze(e,t,n){return new gN({type:"record",keyType:e,valueType:t,...Te.normalizeParams(n)})}var Sp=T("ZodEnum",(e,t)=>{ik.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 Sp({...t,checks:[],...Te.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 Sp({...t,checks:[],...Te.normalizeParams(r),entries:o})}});function Kt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Sp({type:"enum",entries:n,...Te.normalizeParams(t)})}var bN=T("ZodLiteral",(e,t)=>{ok.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 J(e,t){return new bN({type:"literal",values:Array.isArray(e)?e:[e],...Te.normalizeParams(t)})}var vN=T("ZodTransform",(e,t)=>{sk.init(e,t),et.init(e,t),e._zod.parse=(n,i)=>{n.addIssue=o=>{if(typeof o=="string")n.issues.push(Te.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(Te.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 bx(e){return new vN({type:"transform",transform:e})}var vx=T("ZodOptional",(e,t)=>{ak.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ge(e){return new vx({type:"optional",innerType:e})}var yN=T("ZodNullable",(e,t)=>{lk.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function dx(e){return new yN({type:"nullable",innerType:e})}var kN=T("ZodDefault",(e,t)=>{uk.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xN(e,t){return new kN({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var wN=T("ZodPrefault",(e,t)=>{ck.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _N(e,t){return new wN({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var yx=T("ZodNonOptional",(e,t)=>{dk.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType});function SN(e,t){return new yx({type:"nonoptional",innerType:e,...Te.normalizeParams(t)})}var EN=T("ZodCatch",(e,t)=>{fk.init(e,t),et.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $N(e,t){return new EN({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var CN=T("ZodPipe",(e,t)=>{pk.init(e,t),et.init(e,t),e.in=t.in,e.out=t.out});function Ep(e,t){return new CN({type:"pipe",in:e,out:t})}var TN=T("ZodReadonly",(e,t)=>{hk.init(e,t),et.init(e,t)});function IN(e){return new TN({type:"readonly",innerType:e})}var kx=T("ZodCustom",(e,t)=>{mk.init(e,t),et.init(e,t)});function AN(e){let t=new Dt({check:"custom"});return t._zod.check=e,t}function xx(e,t){return Gk(kx,e??(()=>!0),t)}function MN(e,t={}){return Xk(kx,e,t)}function zN(e){let t=AN(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Te.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(Te.issue(r))}},e(n.value,n)));return t}function Cp(e,t){return Ep(bx(e),t)}un(gk());var $r="io.modelcontextprotocol/related-task",Hl="2.0",ht=xx(e=>e!==null&&(typeof e=="object"||typeof e=="function")),wx=We([$(),Me().int()]),_x=$(),SX=jt({ttl:Me().optional(),pollInterval:Me().optional()}),DN=H({ttl:Me().optional()}),NN=H({taskId:$()}),Ip=jt({progressToken:wx.optional(),[$r]:NN.optional()}),en=H({_meta:Ip.optional()}),$s=en.extend({task:DN.optional()}),Sx=e=>$s.safeParse(e).success,_t=H({method:$(),params:en.loose().optional()}),cn=H({_meta:Ip.optional()}),dn=H({method:$(),params:cn.loose().optional()}),St=jt({_meta:Ip.optional()}),to=We([$(),Me().int()]),Ex=H({jsonrpc:J(Hl),id:to,..._t.shape}).strict(),Ap=e=>Ex.safeParse(e).success,$x=H({jsonrpc:J(Hl),...dn.shape}).strict(),Cx=e=>$x.safeParse(e).success,Mp=H({jsonrpc:J(Hl),id:to,result:St}).strict(),Cs=e=>Mp.safeParse(e).success;var Ee;(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"})(Ee||(Ee={}));var zp=H({jsonrpc:J(Hl),id:to.optional(),error:H({code:Me().int(),message:$(),data:Je().optional()})}).strict();var Tx=e=>zp.safeParse(e).success;var Ix=We([Ex,$x,Mp,zp]),EX=We([Mp,zp]),ql=St.strict(),ON=cn.extend({requestId:to.optional(),reason:$().optional()}),Wl=dn.extend({method:J("notifications/cancelled"),params:ON}),RN=H({src:$(),mimeType:$().optional(),sizes:we($()).optional(),theme:Kt(["light","dark"]).optional()}),Ts=H({icons:we(RN).optional()}),eo=H({name:$(),title:$().optional()}),Is=eo.extend({...eo.shape,...Ts.shape,version:$(),websiteUrl:$().optional(),description:$().optional()}),PN=jl(H({applyDefaults:bt().optional()}),Ze($(),Je())),LN=Cp(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,jl(H({form:PN.optional(),url:ht.optional()}),Ze($(),Je()).optional())),FN=jt({list:ht.optional(),cancel:ht.optional(),requests:jt({sampling:jt({createMessage:ht.optional()}).optional(),elicitation:jt({create:ht.optional()}).optional()}).optional()}),BN=jt({list:ht.optional(),cancel:ht.optional(),requests:jt({tools:jt({call:ht.optional()}).optional()}).optional()}),UN=H({experimental:Ze($(),ht).optional(),sampling:H({context:ht.optional(),tools:ht.optional()}).optional(),elicitation:LN.optional(),roots:H({listChanged:bt().optional()}).optional(),tasks:FN.optional(),extensions:Ze($(),ht).optional()}),jN=en.extend({protocolVersion:$(),capabilities:UN,clientInfo:Is}),ZN=_t.extend({method:J("initialize"),params:jN});var HN=H({experimental:Ze($(),ht).optional(),logging:ht.optional(),completions:ht.optional(),prompts:H({listChanged:bt().optional()}).optional(),resources:H({subscribe:bt().optional(),listChanged:bt().optional()}).optional(),tools:H({listChanged:bt().optional()}).optional(),tasks:BN.optional(),extensions:Ze($(),ht).optional()}),qN=St.extend({protocolVersion:$(),capabilities:HN,serverInfo:Is,instructions:$().optional()}),WN=dn.extend({method:J("notifications/initialized"),params:cn.optional()});var no=_t.extend({method:J("ping"),params:en.optional()}),VN=H({progress:Me(),total:Ge(Me()),message:Ge($())}),KN=H({...cn.shape,...VN.shape,progressToken:wx}),Vl=dn.extend({method:J("notifications/progress"),params:KN}),JN=en.extend({cursor:_x.optional()}),As=_t.extend({params:JN.optional()}),Ms=St.extend({nextCursor:_x.optional()}),GN=Kt(["working","input_required","completed","failed","cancelled"]),zs=H({taskId:$(),status:GN,ttl:We([Me(),hx()]),createdAt:$(),lastUpdatedAt:$(),pollInterval:Ge(Me()),statusMessage:Ge($())}),Kl=St.extend({task:zs}),XN=cn.merge(zs),Ds=dn.extend({method:J("notifications/tasks/status"),params:XN}),Jl=_t.extend({method:J("tasks/get"),params:en.extend({taskId:$()})}),Gl=St.merge(zs),Xl=_t.extend({method:J("tasks/result"),params:en.extend({taskId:$()})}),$X=St.loose(),Yl=As.extend({method:J("tasks/list")}),Ql=Ms.extend({tasks:we(zs)}),eu=_t.extend({method:J("tasks/cancel"),params:en.extend({taskId:$()})}),Ax=St.merge(zs),Mx=H({uri:$(),mimeType:Ge($()),_meta:Ze($(),Je()).optional()}),zx=Mx.extend({text:$()}),Dp=$().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Dx=Mx.extend({blob:Dp}),Ns=Kt(["user","assistant"]),ro=H({audience:we(Ns).optional(),priority:Me().min(0).max(1).optional(),lastModified:Ss.datetime({offset:!0}).optional()}),Nx=H({...eo.shape,...Ts.shape,uri:$(),description:Ge($()),mimeType:Ge($()),size:Ge(Me()),annotations:ro.optional(),_meta:Ge(jt({}))}),YN=H({...eo.shape,...Ts.shape,uriTemplate:$(),description:Ge($()),mimeType:Ge($()),annotations:ro.optional(),_meta:Ge(jt({}))}),QN=As.extend({method:J("resources/list")}),eO=Ms.extend({resources:we(Nx)}),tO=As.extend({method:J("resources/templates/list")}),nO=Ms.extend({resourceTemplates:we(YN)}),Np=en.extend({uri:$()}),rO=Np,iO=_t.extend({method:J("resources/read"),params:rO}),oO=St.extend({contents:we(We([zx,Dx]))}),sO=dn.extend({method:J("notifications/resources/list_changed"),params:cn.optional()}),aO=Np,lO=_t.extend({method:J("resources/subscribe"),params:aO}),uO=Np,cO=_t.extend({method:J("resources/unsubscribe"),params:uO}),dO=cn.extend({uri:$()}),fO=dn.extend({method:J("notifications/resources/updated"),params:dO}),pO=H({name:$(),description:Ge($()),required:Ge(bt())}),hO=H({...eo.shape,...Ts.shape,description:Ge($()),arguments:Ge(we(pO)),_meta:Ge(jt({}))}),mO=As.extend({method:J("prompts/list")}),gO=Ms.extend({prompts:we(hO)}),bO=en.extend({name:$(),arguments:Ze($(),$()).optional()}),vO=_t.extend({method:J("prompts/get"),params:bO}),Op=H({type:J("text"),text:$(),annotations:ro.optional(),_meta:Ze($(),Je()).optional()}),Rp=H({type:J("image"),data:Dp,mimeType:$(),annotations:ro.optional(),_meta:Ze($(),Je()).optional()}),Pp=H({type:J("audio"),data:Dp,mimeType:$(),annotations:ro.optional(),_meta:Ze($(),Je()).optional()}),yO=H({type:J("tool_use"),name:$(),id:$(),input:Ze($(),Je()),_meta:Ze($(),Je()).optional()}),kO=H({type:J("resource"),resource:We([zx,Dx]),annotations:ro.optional(),_meta:Ze($(),Je()).optional()}),xO=Nx.extend({type:J("resource_link")}),io=We([Op,Rp,Pp,xO,kO]),wO=H({role:Ns,content:io}),_O=St.extend({description:$().optional(),messages:we(wO)}),SO=dn.extend({method:J("notifications/prompts/list_changed"),params:cn.optional()}),EO=H({title:$().optional(),readOnlyHint:bt().optional(),destructiveHint:bt().optional(),idempotentHint:bt().optional(),openWorldHint:bt().optional()}),$O=H({taskSupport:Kt(["required","optional","forbidden"]).optional()}),tu=H({...eo.shape,...Ts.shape,description:$().optional(),inputSchema:H({type:J("object"),properties:Ze($(),ht).optional(),required:we($()).optional()}).catchall(Je()),outputSchema:H({type:J("object"),properties:Ze($(),ht).optional(),required:we($()).optional()}).catchall(Je()).optional(),annotations:EO.optional(),execution:$O.optional(),_meta:Ze($(),Je()).optional()}),Lp=As.extend({method:J("tools/list")}),CO=Ms.extend({tools:we(tu)}),oo=St.extend({content:we(io).default([]),structuredContent:Ze($(),Je()).optional(),isError:bt().optional()}),CX=oo.or(St.extend({toolResult:Je()})),TO=$s.extend({name:$(),arguments:Ze($(),Je()).optional()}),Fp=_t.extend({method:J("tools/call"),params:TO}),IO=dn.extend({method:J("notifications/tools/list_changed"),params:cn.optional()}),TX=H({autoRefresh:bt().default(!0),debounceMs:Me().int().nonnegative().default(300)}),Ox=Kt(["debug","info","notice","warning","error","critical","alert","emergency"]),AO=en.extend({level:Ox}),MO=_t.extend({method:J("logging/setLevel"),params:AO}),zO=cn.extend({level:Ox,logger:$().optional(),data:Je()}),DO=dn.extend({method:J("notifications/message"),params:zO}),NO=H({name:$().optional()}),OO=H({hints:we(NO).optional(),costPriority:Me().min(0).max(1).optional(),speedPriority:Me().min(0).max(1).optional(),intelligencePriority:Me().min(0).max(1).optional()}),RO=H({mode:Kt(["auto","required","none"]).optional()}),PO=H({type:J("tool_result"),toolUseId:$().describe("The unique identifier for the corresponding tool call."),content:we(io).default([]),structuredContent:H({}).loose().optional(),isError:bt().optional(),_meta:Ze($(),Je()).optional()}),LO=$p("type",[Op,Rp,Pp]),Zl=$p("type",[Op,Rp,Pp,yO,PO]),FO=H({role:Ns,content:We([Zl,we(Zl)]),_meta:Ze($(),Je()).optional()}),BO=$s.extend({messages:we(FO),modelPreferences:OO.optional(),systemPrompt:$().optional(),includeContext:Kt(["none","thisServer","allServers"]).optional(),temperature:Me().optional(),maxTokens:Me().int(),stopSequences:we($()).optional(),metadata:ht.optional(),tools:we(tu).optional(),toolChoice:RO.optional()}),UO=_t.extend({method:J("sampling/createMessage"),params:BO}),jO=St.extend({model:$(),stopReason:Ge(Kt(["endTurn","stopSequence","maxTokens"]).or($())),role:Ns,content:LO}),ZO=St.extend({model:$(),stopReason:Ge(Kt(["endTurn","stopSequence","maxTokens","toolUse"]).or($())),role:Ns,content:We([Zl,we(Zl)])}),HO=H({type:J("boolean"),title:$().optional(),description:$().optional(),default:bt().optional()}),qO=H({type:J("string"),title:$().optional(),description:$().optional(),minLength:Me().optional(),maxLength:Me().optional(),format:Kt(["email","uri","date","date-time"]).optional(),default:$().optional()}),WO=H({type:Kt(["number","integer"]),title:$().optional(),description:$().optional(),minimum:Me().optional(),maximum:Me().optional(),default:Me().optional()}),VO=H({type:J("string"),title:$().optional(),description:$().optional(),enum:we($()),default:$().optional()}),KO=H({type:J("string"),title:$().optional(),description:$().optional(),oneOf:we(H({const:$(),title:$()})),default:$().optional()}),JO=H({type:J("string"),title:$().optional(),description:$().optional(),enum:we($()),enumNames:we($()).optional(),default:$().optional()}),GO=We([VO,KO]),XO=H({type:J("array"),title:$().optional(),description:$().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:H({type:J("string"),enum:we($())}),default:we($()).optional()}),YO=H({type:J("array"),title:$().optional(),description:$().optional(),minItems:Me().optional(),maxItems:Me().optional(),items:H({anyOf:we(H({const:$(),title:$()}))}),default:we($()).optional()}),QO=We([XO,YO]),eR=We([JO,GO,QO]),tR=We([eR,HO,qO,WO]),nR=$s.extend({mode:J("form").optional(),message:$(),requestedSchema:H({type:J("object"),properties:Ze($(),tR),required:we($()).optional()})}),rR=$s.extend({mode:J("url"),message:$(),elicitationId:$(),url:$().url()}),iR=We([nR,rR]),oR=_t.extend({method:J("elicitation/create"),params:iR}),sR=cn.extend({elicitationId:$()}),aR=dn.extend({method:J("notifications/elicitation/complete"),params:sR}),lR=St.extend({action:Kt(["accept","decline","cancel"]),content:Cp(e=>e===null?void 0:e,Ze($(),We([$(),Me(),bt(),we($())])).optional())}),uR=H({type:J("ref/resource"),uri:$()});var cR=H({type:J("ref/prompt"),name:$()}),dR=en.extend({ref:We([cR,uR]),argument:H({name:$(),value:$()}),context:H({arguments:Ze($(),$()).optional()}).optional()}),fR=_t.extend({method:J("completion/complete"),params:dR});var pR=St.extend({completion:jt({values:we($()).max(100),total:Ge(Me().int()),hasMore:Ge(bt())})}),hR=H({uri:$().startsWith("file://"),name:$().optional(),_meta:Ze($(),Je()).optional()}),mR=_t.extend({method:J("roots/list"),params:en.optional()}),gR=St.extend({roots:we(hR)}),bR=dn.extend({method:J("notifications/roots/list_changed"),params:cn.optional()}),IX=We([no,ZN,fR,MO,vO,mO,QN,tO,iO,lO,cO,Fp,Lp,Jl,Xl,Yl,eu]),AX=We([Wl,Vl,WN,bR,Ds]),MX=We([ql,jO,ZO,lR,gR,Gl,Ql,Kl]),zX=We([no,UO,oR,mR,Jl,Xl,Yl,eu]),DX=We([Wl,Vl,DO,fO,sO,IO,SO,Ds,aR]),NX=We([ql,qN,pR,_O,gO,eO,nO,oO,oo,CO,Gl,Ql,Kl]),be=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===Ee.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new Tp(r.elicitations,n)}return new e(t,n,i)}},Tp=class extends be{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(Ee.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Cr(e){return e==="completed"||e==="failed"||e==="cancelled"}var pY=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Bp(e){let n=Yk(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=Qk(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Up(e,t){let n=Bl(e,t);if(!n.success)throw n.error;return n.data}var _R=6e4,nu=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(Wl,n=>{this._oncancel(n)}),this.setNotificationHandler(Vl,n=>{this._onprogress(n)}),this.setRequestHandler(no,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Jl,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new be(Ee.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Xl,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(!await this._taskStore.getTask(o,i.sessionId))throw new be(Ee.InvalidParams,`Task not found: ${o}`);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 be(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 be(Ee.InvalidParams,`Task not found: ${o}`);if(!Cr(s.status))return await this._waitForTaskUpdate(o,i.signal,i.sessionId),await r();if(Cr(s.status)){let a=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o,i.sessionId),{...a,_meta:{...a._meta,[$r]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(Yl,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 be(Ee.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(eu,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new be(Ee.InvalidParams,`Task not found: ${n.params.taskId}`);if(Cr(r.status))throw new be(Ee.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,i.sessionId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new be(Ee.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof be?r:new be(Ee.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),be.fromError(Ee.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){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");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)||Tx(o)?this._onresponse(o):Ap(o)?this._onrequest(o,s):Cx(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();for(let i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let n=be.fromError(Ee.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?.[$r]?.taskId,s=r?.sessionId,a=this._taskStore,l=!0,u;if(o&&a&&this._taskMessageQueue&&s!==void 0&&(l=!1,u=(async()=>{if(!await a.getTask(o,s))throw new be(Ee.InvalidParams,`Task not found: ${o}`);l=!0})()),i===void 0){let h={jsonrpc:"2.0",id:t.id,error:{code:Ee.MethodNotFound,message:"Method not found"}};if(o&&u){let m={type:"error",message:h,timestamp:Date.now()};u.then(()=>this._enqueueTaskMessage(o,m,s),()=>r?.send(h)).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))}else o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId).catch(m=>this._onerror(new Error(`Failed to enqueue error response: ${m}`))):r?.send(h).catch(m=>this._onerror(new Error(`Failed to send an error response: ${m}`)));return}let c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);let d=Sx(t.params)?t.params.task:void 0,f=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,p={signal:c.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async h=>{if(c.signal.aborted)return;let m={relatedRequestId:t.id};o&&(m.relatedTask={taskId:o}),await this.notification(h,m)},sendRequest:async(h,m,g)=>{if(c.signal.aborted)throw new be(Ee.ConnectionClosed,"Request was cancelled");let b={...g,relatedRequestId:t.id};o&&!b.relatedTask&&(b.relatedTask={taskId:o});let v=b.relatedTask?.taskId??o;return v&&f&&await f.updateTaskStatus(v,"input_required"),await this.request(h,m,b)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,taskStore:f,taskRequestedTtl:d?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};(u??Promise.resolve()).then(()=>{if(u&&c.signal.aborted)throw new be(Ee.ConnectionClosed,"Request was cancelled");d&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,p)).then(async h=>{if(c.signal.aborted)return;let m={result:h,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:m,timestamp:Date.now()},r?.sessionId):await r?.send(m)},async h=>{if(c.signal.aborted)return;let m={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(h.code)?h.code:Ee.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};o&&this._taskMessageQueue&&l?await this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},r?.sessionId):await r?.send(m)}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===c&&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 be(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=be.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 be?s:new be(Ee.InternalError,String(s))}}return}let o;try{let s=await this.request(t,Kl,i);if(s.task)o=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new be(Ee.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:a},Cr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:a.status==="failed"?yield{type:"error",error:new be(Ee.InternalError,`Task ${o} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new be(Ee.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 be?s:new be(Ee.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||{},[$r]: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(x=>this._onerror(new Error(`Failed to send cancellation: ${x}`)));let y=v instanceof be?v:new be(Ee.RequestTimeout,String(v));c(y)};this._responseHandlers.set(f,v=>{if(!i?.signal?.aborted){if(v instanceof Error)return c(v);try{let y=Bl(n,v.result);y.success?u(y.data):c(y.error)}catch(y){c(y)}}}),i?.signal?.addEventListener("abort",()=>{h(i?.signal?.reason)});let m=i?.timeout??_R,g=()=>h(be.fromError(Ee.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(f,m,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let b=l?.taskId;if(b){let v=y=>{let x=this._responseHandlers.get(f);x?x(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,v),this._enqueueTaskMessage(b,{type:"request",message:p,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),c(y)})}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},Gl,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},Ql,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},Ax,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||{},[$r]: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||{},[$r]: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||{},[$r]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(t,n){let i=Bp(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let s=Up(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=Bp(t);this._notificationHandlers.set(i,r=>{let o=Up(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??this._transport?.sessionId,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"&&Ap(r.message)){let o=r.message.id,s=this._requestResolvers.get(o);s?(s(new be(Ee.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,i){let r=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t,i);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,s)=>{if(n.aborted){s(new be(Ee.InvalidRequest,"Request cancelled"));return}let a=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(a),s(new be(Ee.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 be(Ee.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=Ds.parse({method:"notifications/tasks/status",params:a});await this.notification(l),Cr(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 be(Ee.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Cr(a.status))throw new be(Ee.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=Ds.parse({method:"notifications/tasks/status",params:l});await this.notification(u),Cr(l.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};var SR=Object.defineProperty,nr=(e,t)=>{for(var n in t)SR(e,n,{get:t[n],enumerable:!0,configurable:!0,set:i=>t[n]=()=>i})},jp=class{constructor(t=window.parent,n){zt(this,"eventTarget");zt(this,"eventSource");zt(this,"messageListener");zt(this,"onclose");zt(this,"onerror");zt(this,"onmessage");zt(this,"sessionId");zt(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=Ix.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?.()}},ER="2026-01-26";var k={};nr(k,{xor:()=>m$,xid:()=>L2,void:()=>u$,uuidv7:()=>A2,uuidv6:()=>I2,uuidv4:()=>T2,uuid:()=>C2,util:()=>ve,url:()=>M2,uppercase:()=>$u,unknown:()=>ai,union:()=>nc,undefined:()=>a$,ulid:()=>P2,uint64:()=>o$,uint32:()=>n$,tuple:()=>vm,trim:()=>zu,treeifyError:()=>mw,transform:()=>ic,toUpperCase:()=>Nu,toLowerCase:()=>Du,toJSONSchema:()=>o2,templateLiteral:()=>T$,symbol:()=>s$,superRefine:()=>qm,success:()=>E$,stringbool:()=>O$,stringFormat:()=>J2,string:()=>mu,strictObject:()=>p$,startsWith:()=>Tu,slugify:()=>Ou,size:()=>Qs,setErrorMap:()=>H8,set:()=>k$,safeParseAsync:()=>g2,safeParse:()=>m2,safeEncodeAsync:()=>_2,safeEncode:()=>x2,safeDecodeAsync:()=>S2,safeDecode:()=>w2,registry:()=>wh,regexes:()=>ui,regex:()=>Su,refine:()=>Hm,record:()=>ym,readonly:()=>Lm,property:()=>Vh,promise:()=>I$,prettifyError:()=>bw,preprocess:()=>P$,prefault:()=>Mm,positive:()=>Zh,pipe:()=>js,partialRecord:()=>b$,parseAsync:()=>h2,parse:()=>p2,overwrite:()=>ir,optional:()=>Bs,object:()=>f$,number:()=>nm,nullish:()=>S$,nullable:()=>Us,null:()=>am,normalize:()=>Mu,nonpositive:()=>qh,nonoptional:()=>zm,nonnegative:()=>Wh,never:()=>ec,negative:()=>Hh,nativeEnum:()=>x$,nanoid:()=>N2,nan:()=>$$,multipleOf:()=>co,minSize:()=>Ar,minLength:()=>si,mime:()=>Au,meta:()=>D$,maxSize:()=>go,maxLength:()=>ea,map:()=>y$,mac:()=>U2,lte:()=>pn,lt:()=>Tr,lowercase:()=>Eu,looseRecord:()=>v$,looseObject:()=>h$,locales:()=>xh,literal:()=>w$,length:()=>ta,lazy:()=>Um,ksuid:()=>F2,keyof:()=>d$,jwt:()=>K2,json:()=>R$,iso:()=>Gh,ipv6:()=>j2,ipv4:()=>B2,intersection:()=>gm,int64:()=>i$,int32:()=>t$,int:()=>gu,instanceof:()=>N$,includes:()=>Cu,httpUrl:()=>z2,hostname:()=>G2,hex:()=>X2,hash:()=>Y2,guid:()=>$2,gte:()=>Jt,gt:()=>Ir,globalRegistry:()=>fn,getErrorMap:()=>q8,function:()=>bu,fromJSONSchema:()=>J8,formatError:()=>th,float64:()=>e$,float32:()=>Q2,flattenError:()=>eh,file:()=>_$,exactOptional:()=>$m,enum:()=>rc,endsWith:()=>Iu,encodeAsync:()=>y2,encode:()=>b2,emoji:()=>D2,email:()=>E2,e164:()=>V2,discriminatedUnion:()=>g$,describe:()=>z$,decodeAsync:()=>k2,decode:()=>v2,date:()=>c$,custom:()=>M$,cuid2:()=>R2,cuid:()=>O2,core:()=>tw,config:()=>Ot,coerce:()=>F$,codec:()=>C$,clone:()=>mn,cidrv6:()=>H2,cidrv4:()=>Z2,check:()=>A$,catch:()=>Om,boolean:()=>rm,bigint:()=>r$,base64url:()=>W2,base64:()=>q2,array:()=>la,any:()=>l$,_function:()=>bu,_default:()=>Im,_ZodString:()=>Ru,ZodXor:()=>pm,ZodXID:()=>Zu,ZodVoid:()=>dm,ZodUnknown:()=>um,ZodUnion:()=>ca,ZodUndefined:()=>om,ZodUUID:()=>Bn,ZodURL:()=>ia,ZodULID:()=>ju,ZodType:()=>pe,ZodTuple:()=>bm,ZodTransform:()=>Sm,ZodTemplateLiteral:()=>Fm,ZodSymbol:()=>im,ZodSuccess:()=>Dm,ZodStringFormat:()=>Fe,ZodString:()=>ra,ZodSet:()=>xm,ZodRecord:()=>da,ZodRealError:()=>nn,ZodReadonly:()=>Pm,ZodPromise:()=>jm,ZodPrefault:()=>Am,ZodPipe:()=>ac,ZodOptional:()=>oc,ZodObject:()=>ua,ZodNumberFormat:()=>ci,ZodNumber:()=>oa,ZodNullable:()=>Cm,ZodNull:()=>sm,ZodNonOptional:()=>sc,ZodNever:()=>cm,ZodNanoID:()=>Fu,ZodNaN:()=>Rm,ZodMap:()=>km,ZodMAC:()=>tm,ZodLiteral:()=>wm,ZodLazy:()=>Bm,ZodKSUID:()=>Hu,ZodJWT:()=>Yu,ZodIssueCode:()=>Z8,ZodIntersection:()=>mm,ZodISOTime:()=>Qh,ZodISODuration:()=>em,ZodISODateTime:()=>Xh,ZodISODate:()=>Yh,ZodIPv6:()=>Wu,ZodIPv4:()=>qu,ZodGUID:()=>Fs,ZodFunction:()=>Zm,ZodFirstPartyTypeKind:()=>Gp,ZodFile:()=>_m,ZodExactOptional:()=>Em,ZodError:()=>j8,ZodEnum:()=>mo,ZodEmoji:()=>Lu,ZodEmail:()=>Pu,ZodE164:()=>Xu,ZodDiscriminatedUnion:()=>hm,ZodDefault:()=>Tm,ZodDate:()=>tc,ZodCustomStringFormat:()=>bo,ZodCustom:()=>fa,ZodCodec:()=>lc,ZodCatch:()=>Nm,ZodCUID2:()=>Uu,ZodCUID:()=>Bu,ZodCIDRv6:()=>Ku,ZodCIDRv4:()=>Vu,ZodBoolean:()=>sa,ZodBigIntFormat:()=>Qu,ZodBigInt:()=>aa,ZodBase64URL:()=>Gu,ZodBase64:()=>Ju,ZodArray:()=>fm,ZodAny:()=>lm,TimePrecision:()=>LS,NEVER:()=>nw,$output:()=>DS,$input:()=>NS,$brand:()=>rw});var tw={};nr(tw,{version:()=>g_,util:()=>ve,treeifyError:()=>mw,toJSONSchema:()=>o2,toDotPath:()=>gw,safeParseAsync:()=>yw,safeParse:()=>vw,safeEncodeAsync:()=>rP,safeEncode:()=>tP,safeDecodeAsync:()=>iP,safeDecode:()=>nP,registry:()=>wh,regexes:()=>ui,process:()=>Re,prettifyError:()=>bw,parseAsync:()=>Wp,parse:()=>qp,meta:()=>yE,locales:()=>xh,isValidJWT:()=>U_,isValidBase64URL:()=>L_,isValidBase64:()=>hh,initializeContext:()=>fo,globalRegistry:()=>fn,globalConfig:()=>au,formatError:()=>th,flattenError:()=>eh,finalize:()=>ho,extractDefs:()=>po,encodeAsync:()=>QR,encode:()=>XR,describe:()=>vE,decodeAsync:()=>eP,decode:()=>YR,createToJSONSchemaMethod:()=>xE,createStandardJSONSchemaMethod:()=>Ls,config:()=>Ot,clone:()=>mn,_xor:()=>v8,_xid:()=>Dh,_void:()=>lE,_uuidv7:()=>Ch,_uuidv6:()=>$h,_uuidv4:()=>Eh,_uuid:()=>Sh,_url:()=>_u,_uppercase:()=>$u,_unknown:()=>sE,_union:()=>b8,_undefined:()=>rE,_ulid:()=>zh,_uint64:()=>tE,_uint32:()=>JS,_tuple:()=>x8,_trim:()=>zu,_transform:()=>T8,_toUpperCase:()=>Nu,_toLowerCase:()=>Du,_templateLiteral:()=>P8,_symbol:()=>nE,_superRefine:()=>gE,_success:()=>D8,_stringbool:()=>kE,_stringFormat:()=>na,_string:()=>OS,_startsWith:()=>Tu,_slugify:()=>Ou,_size:()=>Qs,_set:()=>S8,_safeParseAsync:()=>Ks,_safeParse:()=>Vs,_safeEncodeAsync:()=>lh,_safeEncode:()=>sh,_safeDecodeAsync:()=>uh,_safeDecode:()=>ah,_regex:()=>Su,_refine:()=>mE,_record:()=>w8,_readonly:()=>R8,_property:()=>Vh,_promise:()=>F8,_positive:()=>Zh,_pipe:()=>O8,_parseAsync:()=>Ws,_parse:()=>qs,_overwrite:()=>ir,_optional:()=>I8,_number:()=>ZS,_nullable:()=>A8,_null:()=>iE,_normalize:()=>Mu,_nonpositive:()=>qh,_nonoptional:()=>z8,_nonnegative:()=>Wh,_never:()=>aE,_negative:()=>Hh,_nativeEnum:()=>$8,_nanoid:()=>Ih,_nan:()=>dE,_multipleOf:()=>co,_minSize:()=>Ar,_minLength:()=>si,_min:()=>Jt,_mime:()=>Au,_maxSize:()=>go,_maxLength:()=>ea,_max:()=>pn,_map:()=>_8,_mac:()=>PS,_lte:()=>pn,_lt:()=>Tr,_lowercase:()=>Eu,_literal:()=>C8,_length:()=>ta,_lazy:()=>L8,_ksuid:()=>Nh,_jwt:()=>jh,_isoTime:()=>US,_isoDuration:()=>jS,_isoDateTime:()=>FS,_isoDate:()=>BS,_ipv6:()=>Rh,_ipv4:()=>Oh,_intersection:()=>k8,_int64:()=>eE,_int32:()=>KS,_int:()=>qS,_includes:()=>Cu,_guid:()=>hu,_gte:()=>Jt,_gt:()=>Ir,_float64:()=>VS,_float32:()=>WS,_file:()=>pE,_enum:()=>E8,_endsWith:()=>Iu,_encodeAsync:()=>ih,_encode:()=>nh,_emoji:()=>Th,_email:()=>_h,_e164:()=>Uh,_discriminatedUnion:()=>y8,_default:()=>M8,_decodeAsync:()=>oh,_decode:()=>rh,_date:()=>uE,_custom:()=>hE,_cuid2:()=>Mh,_cuid:()=>Ah,_coercedString:()=>RS,_coercedNumber:()=>HS,_coercedDate:()=>cE,_coercedBoolean:()=>XS,_coercedBigint:()=>QS,_cidrv6:()=>Lh,_cidrv4:()=>Ph,_check:()=>bE,_catch:()=>N8,_boolean:()=>GS,_bigint:()=>YS,_base64url:()=>Bh,_base64:()=>Fh,_array:()=>fE,_any:()=>oE,TimePrecision:()=>LS,NEVER:()=>nw,JSONSchemaGenerator:()=>Jp,JSONSchema:()=>U8,Doc:()=>du,$output:()=>DS,$input:()=>NS,$constructor:()=>_,$brand:()=>rw,$ZodXor:()=>oS,$ZodXID:()=>$_,$ZodVoid:()=>Y_,$ZodUnknown:()=>G_,$ZodUnion:()=>wu,$ZodUndefined:()=>V_,$ZodUUID:()=>v_,$ZodURL:()=>k_,$ZodULID:()=>E_,$ZodType:()=>ue,$ZodTuple:()=>vh,$ZodTransform:()=>hS,$ZodTemplateLiteral:()=>ES,$ZodSymbol:()=>W_,$ZodSuccess:()=>kS,$ZodStringFormat:()=>Le,$ZodString:()=>Ys,$ZodSet:()=>cS,$ZodRegistry:()=>pu,$ZodRecord:()=>lS,$ZodRealError:()=>tn,$ZodReadonly:()=>SS,$ZodPromise:()=>CS,$ZodPrefault:()=>vS,$ZodPipe:()=>_S,$ZodOptional:()=>yh,$ZodObjectJIT:()=>iS,$ZodObject:()=>rS,$ZodNumberFormat:()=>H_,$ZodNumber:()=>mh,$ZodNullable:()=>gS,$ZodNull:()=>K_,$ZodNonOptional:()=>yS,$ZodNever:()=>X_,$ZodNanoID:()=>w_,$ZodNaN:()=>wS,$ZodMap:()=>uS,$ZodMAC:()=>N_,$ZodLiteral:()=>fS,$ZodLazy:()=>TS,$ZodKSUID:()=>C_,$ZodJWT:()=>j_,$ZodIntersection:()=>aS,$ZodISOTime:()=>A_,$ZodISODuration:()=>M_,$ZodISODateTime:()=>T_,$ZodISODate:()=>I_,$ZodIPv6:()=>D_,$ZodIPv4:()=>z_,$ZodGUID:()=>b_,$ZodFunction:()=>$S,$ZodFile:()=>pS,$ZodExactOptional:()=>mS,$ZodError:()=>Qp,$ZodEnum:()=>dS,$ZodEncodeError:()=>ao,$ZodEmoji:()=>x_,$ZodEmail:()=>y_,$ZodE164:()=>B_,$ZodDiscriminatedUnion:()=>sS,$ZodDefault:()=>bS,$ZodDate:()=>Q_,$ZodCustomStringFormat:()=>Z_,$ZodCustom:()=>IS,$ZodCodec:()=>kh,$ZodCheckUpperCase:()=>u_,$ZodCheckStringFormat:()=>Xs,$ZodCheckStartsWith:()=>d_,$ZodCheckSizeEquals:()=>r_,$ZodCheckRegex:()=>a_,$ZodCheckProperty:()=>p_,$ZodCheckOverwrite:()=>m_,$ZodCheckNumberFormat:()=>Qw,$ZodCheckMultipleOf:()=>Yw,$ZodCheckMinSize:()=>n_,$ZodCheckMinLength:()=>o_,$ZodCheckMimeType:()=>h_,$ZodCheckMaxSize:()=>t_,$ZodCheckMaxLength:()=>i_,$ZodCheckLowerCase:()=>l_,$ZodCheckLessThan:()=>fh,$ZodCheckLengthEquals:()=>s_,$ZodCheckIncludes:()=>c_,$ZodCheckGreaterThan:()=>ph,$ZodCheckEndsWith:()=>f_,$ZodCheckBigIntFormat:()=>e_,$ZodCheck:()=>Xe,$ZodCatch:()=>xS,$ZodCUID2:()=>S_,$ZodCUID:()=>__,$ZodCIDRv6:()=>R_,$ZodCIDRv4:()=>O_,$ZodBoolean:()=>gh,$ZodBigIntFormat:()=>q_,$ZodBigInt:()=>bh,$ZodBase64URL:()=>F_,$ZodBase64:()=>P_,$ZodAsyncError:()=>er,$ZodArray:()=>eS,$ZodAny:()=>J_});var nw=Object.freeze({status:"aborted"});function _(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 rw=Symbol("zod_brand"),er=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ao=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},au={};function Ot(e){return e&&Object.assign(au,e),au}var ve={};nr(ve,{unwrapMessage:()=>Ps,uint8ArrayToHex:()=>GR,uint8ArrayToBase64url:()=>KR,uint8ArrayToBase64:()=>pw,stringifyPrimitive:()=>ne,slugify:()=>ow,shallowClone:()=>aw,safeExtend:()=>jR,required:()=>qR,randomString:()=>OR,propertyKeyTypes:()=>uu,promiseAllObject:()=>NR,primitiveTypes:()=>lw,prefixIssues:()=>$n,pick:()=>FR,partial:()=>HR,parsedType:()=>ie,optionalKeys:()=>uw,omit:()=>BR,objectClone:()=>MR,numKeys:()=>RR,nullish:()=>li,normalizeParams:()=>F,mergeDefs:()=>rr,merge:()=>ZR,jsonStringifyReplacer:()=>lu,joinValues:()=>R,issue:()=>cu,isPlainObject:()=>oi,isObject:()=>lo,hexToUint8Array:()=>JR,getSizableOrigin:()=>ku,getParsedType:()=>PR,getLengthableOrigin:()=>xu,getEnumValues:()=>Xp,getElementAtPath:()=>DR,floatSafeRemainder:()=>iw,finalizeIssue:()=>hn,extend:()=>UR,escapeRegex:()=>tr,esc:()=>Zp,defineLazy:()=>me,createTransparentProxy:()=>LR,cloneDef:()=>zR,clone:()=>mn,cleanRegex:()=>yu,cleanEnum:()=>WR,captureStackTrace:()=>Yp,cached:()=>Hs,base64urlToUint8Array:()=>VR,base64ToUint8Array:()=>fw,assignProp:()=>Mr,assertNotEqual:()=>CR,assertNever:()=>IR,assertIs:()=>TR,assertEqual:()=>$R,assert:()=>AR,allowsEval:()=>sw,aborted:()=>ii,NUMBER_FORMAT_RANGES:()=>cw,Class:()=>Hp,BIGINT_FORMAT_RANGES:()=>dw});function $R(e){return e}function CR(e){return e}function TR(e){}function IR(e){throw Error("Unexpected value in exhaustive check")}function AR(e){}function Xp(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=>ne(n)).join(t)}function lu(e,t){return typeof t=="bigint"?t.toString():t}function Hs(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function li(e){return e==null}function yu(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function iw(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 Rx=Symbol("evaluating");function me(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Rx)return i===void 0&&(i=Rx,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function MR(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Mr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function zR(e){return rr(e._zod.def)}function DR(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function NR(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 OR(e=10){let t="";for(let n=0;n<e;n++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t}function Zp(e){return JSON.stringify(e)}function ow(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var sw=Hs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function oi(e){if(lo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(lo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function aw(e){return oi(e)?{...e}:Array.isArray(e)?[...e]:e}function RR(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var PR=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}`)}},uu=new Set(["string","number","symbol"]),lw=new Set(["string","number","bigint","boolean","symbol","undefined"]);function tr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mn(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 LR(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 ne(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function uw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var cw={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]},dw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function FR(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=rr(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 Mr(this,"shape",o),o},checks:[]});return mn(e,r)}function BR(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=rr(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 Mr(this,"shape",o),o},checks:[]});return mn(e,r)}function UR(e,t){if(!oi(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=rr(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Mr(this,"shape",r),r}});return mn(e,i)}function jR(e,t){if(!oi(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=rr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Mr(this,"shape",i),i}});return mn(e,n)}function ZR(e,t){let n=rr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Mr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return mn(e,n)}function HR(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=rr(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 Mr(this,"shape",s),s},checks:[]});return mn(t,r)}function qR(e,t,n){let i=rr(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 Mr(this,"shape",o),o}});return mn(t,i)}function ii(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 Ps(e){return typeof e=="string"?e:e?.message}function hn(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=Ps(e.inst?._zod.def?.error?.(e))??Ps(t?.error?.(e))??Ps(n.customError?.(e))??Ps(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,!t?.reportInput&&delete i.input,i}function ku(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ie(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 cu(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function WR(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function fw(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 pw(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function VR(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return fw(t+n)}function KR(e){return pw(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function JR(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 GR(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Hp=class{constructor(...t){}},hw=(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,lu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qp=_("$ZodError",hw),tn=_("$ZodError",hw,{Parent:Error});function eh(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 th(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 mw(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 gw(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 bw(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 ${gw(i.path)}`);return t.join(`
`)}var qs=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 er;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>hn(l,o,Ot())));throw Yp(a,r?.callee),a}return s.value},qp=qs(tn),Ws=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=>hn(l,o,Ot())));throw Yp(a,r?.callee),a}return s.value},Wp=Ws(tn),Vs=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 er;return o.issues.length?{success:!1,error:new(e??Qp)(o.issues.map(s=>hn(s,r,Ot())))}:{success:!0,data:o.value}},vw=Vs(tn),Ks=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=>hn(s,r,Ot())))}:{success:!0,data:o.value}},yw=Ks(tn),nh=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return qs(e)(t,n,r)},XR=nh(tn),rh=e=>(t,n,i)=>qs(e)(t,n,i),YR=rh(tn),ih=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ws(e)(t,n,r)},QR=ih(tn),oh=e=>async(t,n,i)=>Ws(e)(t,n,i),eP=oh(tn),sh=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Vs(e)(t,n,r)},tP=sh(tn),ah=e=>(t,n,i)=>Vs(e)(t,n,i),nP=ah(tn),lh=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ks(e)(t,n,r)},rP=lh(tn),uh=e=>async(t,n,i)=>Ks(e)(t,n,i),iP=uh(tn),ui={};nr(ui,{xid:()=>_w,uuid7:()=>lP,uuid6:()=>aP,uuid4:()=>sP,uuid:()=>uo,uppercase:()=>Gw,unicodeEmail:()=>Iw,undefined:()=>Kw,ulid:()=>ww,time:()=>Uw,string:()=>Zw,sha512_hex:()=>IP,sha512_base64url:()=>MP,sha512_base64:()=>AP,sha384_hex:()=>$P,sha384_base64url:()=>TP,sha384_base64:()=>CP,sha256_hex:()=>_P,sha256_base64url:()=>EP,sha256_base64:()=>SP,sha1_hex:()=>kP,sha1_base64url:()=>wP,sha1_base64:()=>xP,rfc5322Email:()=>cP,number:()=>dh,null:()=>Vw,nanoid:()=>Ew,md5_hex:()=>bP,md5_base64url:()=>yP,md5_base64:()=>vP,mac:()=>Dw,lowercase:()=>Jw,ksuid:()=>Sw,ipv6:()=>zw,ipv4:()=>Mw,integer:()=>qw,idnEmail:()=>dP,html5Email:()=>uP,hostname:()=>hP,hex:()=>gP,guid:()=>Cw,extendedDuration:()=>oP,emoji:()=>Aw,email:()=>Tw,e164:()=>Pw,duration:()=>$w,domain:()=>mP,datetime:()=>jw,date:()=>Fw,cuid2:()=>xw,cuid:()=>kw,cidrv6:()=>Ow,cidrv4:()=>Nw,browserEmail:()=>fP,boolean:()=>Ww,bigint:()=>Hw,base64url:()=>ch,base64:()=>Rw});var kw=/^[cC][^\s-]{8,}$/,xw=/^[0-9a-z]+$/,ww=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,_w=/^[0-9a-vA-V]{20}$/,Sw=/^[A-Za-z0-9]{27}$/,Ew=/^[a-zA-Z0-9_-]{21}$/,$w=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oP=/^[-+]?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)?)??$/,Cw=/^([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})$/,uo=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)$/,sP=uo(4),aP=uo(6),lP=uo(7),Tw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uP=/^[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])?)*$/,cP=/^(([^<>()\[\]\\.,;:\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,}))$/,Iw=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,dP=Iw,fP=/^[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])?)*$/,pP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Aw(){return new RegExp(pP,"u")}var Mw=/^(?:(?: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])$/,zw=/^(([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}|:))$/,Dw=e=>{let t=tr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Nw=/^((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])$/,Ow=/^(([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])$/,Rw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ch=/^[A-Za-z0-9_-]*$/,hP=/^(?=.{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])?)*\.?$/,mP=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Pw=/^\+[1-9]\d{6,14}$/,Lw="(?:(?:\\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])))",Fw=new RegExp(`^${Lw}$`);function Bw(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 Uw(e){return new RegExp(`^${Bw(e)}$`)}function jw(e){let t=Bw({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(`^${Lw}T(?:${i})$`)}var Zw=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Hw=/^-?\d+n?$/,qw=/^-?\d+$/,dh=/^-?\d+(?:\.\d+)?$/,Ww=/^(?:true|false)$/i,Vw=/^null$/i,Kw=/^undefined$/i,Jw=/^[^A-Z]*$/,Gw=/^[^a-z]*$/,gP=/^[0-9a-fA-F]*$/;function Js(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gs(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var bP=/^[0-9a-fA-F]{32}$/,vP=Js(22,"=="),yP=Gs(22),kP=/^[0-9a-fA-F]{40}$/,xP=Js(27,"="),wP=Gs(27),_P=/^[0-9a-fA-F]{64}$/,SP=Js(43,"="),EP=Gs(43),$P=/^[0-9a-fA-F]{96}$/,CP=Js(64,""),TP=Gs(64),IP=/^[0-9a-fA-F]{128}$/,AP=Js(86,"=="),MP=Gs(86),Xe=_("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xw={number:"number",bigint:"bigint",object:"date"},fh=_("$ZodCheckLessThan",(e,t)=>{Xe.init(e,t);let n=Xw[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})}}),ph=_("$ZodCheckGreaterThan",(e,t)=>{Xe.init(e,t);let n=Xw[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})}}),Yw=_("$ZodCheckMultipleOf",(e,t)=>{Xe.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):iw(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})}}),Qw=_("$ZodCheckNumberFormat",(e,t)=>{Xe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=cw[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=qw)}),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})}}),e_=_("$ZodCheckBigIntFormat",(e,t)=>{Xe.init(e,t);let[n,i]=dw[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})}}),t_=_("$ZodCheckMaxSize",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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:ku(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),n_=_("$ZodCheckMinSize",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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:ku(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),r_=_("$ZodCheckSizeEquals",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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:ku(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})}}),i_=_("$ZodCheckMaxLength",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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=xu(r);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),o_=_("$ZodCheckMinLength",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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=xu(r);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),s_=_("$ZodCheckLengthEquals",(e,t)=>{var n;Xe.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!li(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=xu(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})}}),Xs=_("$ZodCheckStringFormat",(e,t)=>{var n,i;Xe.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=()=>{})}),a_=_("$ZodCheckRegex",(e,t)=>{Xs.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})}}),l_=_("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jw),Xs.init(e,t)}),u_=_("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Gw),Xs.init(e,t)}),c_=_("$ZodCheckIncludes",(e,t)=>{Xe.init(e,t);let n=tr(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})}}),d_=_("$ZodCheckStartsWith",(e,t)=>{Xe.init(e,t);let n=new RegExp(`^${tr(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})}}),f_=_("$ZodCheckEndsWith",(e,t)=>{Xe.init(e,t);let n=new RegExp(`.*${tr(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 Px(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues))}var p_=_("$ZodCheckProperty",(e,t)=>{Xe.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=>Px(r,n,t.property));Px(i,n,t.property)}}),h_=_("$ZodCheckMimeType",(e,t)=>{Xe.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})}}),m_=_("$ZodCheckOverwrite",(e,t)=>{Xe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}}),du=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(`
`))}},g_={major:4,minor:3,patch:5},ue=_("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=g_;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=ii(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 er;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(u||(u=ii(s,f)))});else{if(s.issues.length===f)continue;u||(u=ii(s,f))}}return c?c.then(()=>s):s},o=(s,a,l)=>{if(ii(s))return s.aborted=!0,s;let u=r(a,i,l);if(u instanceof Promise){if(l.async===!1)throw new er;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 er;return l.then(u=>r(u,i,a))}return r(l,i,a)}}me(e,"~standard",()=>({validate:r=>{try{let o=vw(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return yw(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Ys=_("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zw(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}}),Le=_("$ZodStringFormat",(e,t)=>{Xs.init(e,t),Ys.init(e,t)}),b_=_("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Cw),Le.init(e,t)}),v_=_("$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=uo(n))}else t.pattern??(t.pattern=uo());Le.init(e,t)}),y_=_("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tw),Le.init(e,t)}),k_=_("$ZodURL",(e,t)=>{Le.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})}}}),x_=_("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Aw()),Le.init(e,t)}),w_=_("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ew),Le.init(e,t)}),__=_("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=kw),Le.init(e,t)}),S_=_("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=xw),Le.init(e,t)}),E_=_("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ww),Le.init(e,t)}),$_=_("$ZodXID",(e,t)=>{t.pattern??(t.pattern=_w),Le.init(e,t)}),C_=_("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sw),Le.init(e,t)}),T_=_("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=jw(t)),Le.init(e,t)}),I_=_("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Fw),Le.init(e,t)}),A_=_("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Uw(t)),Le.init(e,t)}),M_=_("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=$w),Le.init(e,t)}),z_=_("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Mw),Le.init(e,t),e._zod.bag.format="ipv4"}),D_=_("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zw),Le.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})}}}),N_=_("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Dw(t.delimiter)),Le.init(e,t),e._zod.bag.format="mac"}),O_=_("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nw),Le.init(e,t)}),R_=_("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ow),Le.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 hh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var P_=_("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Rw),Le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{hh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function L_(e){if(!ch.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return hh(n)}var F_=_("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ch),Le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{L_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),B_=_("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Pw),Le.init(e,t)});function U_(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 j_=_("$ZodJWT",(e,t)=>{Le.init(e,t),e._zod.check=n=>{U_(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Z_=_("$ZodCustomStringFormat",(e,t)=>{Le.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})}}),mh=_("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??dh,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}}),H_=_("$ZodNumberFormat",(e,t)=>{Qw.init(e,t),mh.init(e,t)}),gh=_("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=Ww,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}}),bh=_("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=Hw,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}}),q_=_("$ZodBigIntFormat",(e,t)=>{e_.init(e,t),bh.init(e,t)}),W_=_("$ZodSymbol",(e,t)=>{ue.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}}),V_=_("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=Kw,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}}),K_=_("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=Vw,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}}),J_=_("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=n=>n}),G_=_("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=n=>n}),X_=_("$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)}),Y_=_("$ZodVoid",(e,t)=>{ue.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}}),Q_=_("$ZodDate",(e,t)=>{ue.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 Lx(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues)),t.value[n]=e.value}var eS=_("$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=>Lx(u,n,s))):Lx(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function fu(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 tS(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=uw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nS(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=>fu(p,n,d,t,c))):fu(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 rS=_("$ZodObject",(e,t)=>{if(ue.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=Hs(()=>tS(t));me(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=lo,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=>fu(m,s,d,l,p))):fu(h,s,d,l,p)}return r?nS(u,l,s,a,n.value,e):u.length?Promise.all(u).then(()=>s):s}}),iS=_("$ZodObjectJIT",(e,t)=>{rS.init(e,t);let n=e._zod.parse,i=Hs(()=>tS(t)),r=d=>{let f=new du(["shape","payload","ctx"]),p=i.value,h=v=>{let y=Zp(v);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),g=0;for(let v of p.keys)m[v]=`key_${g++}`;f.write("const newResult = {};");for(let v of p.keys){let y=m[v],x=Zp(v),C=d[v]?._zod?.optout==="optional";f.write(`const ${y} = ${h(v)};`),C?f.write(`
        if (${y}.issues.length) {
          if (${x} in input) {
            payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${x}, ...iss.path] : [${x}]
            })));
          }
        }
        
        if (${y}.value === undefined) {
          if (${x} in input) {
            newResult[${x}] = undefined;
          }
        } else {
          newResult[${x}] = ${y}.value;
        }
        
      `):f.write(`
        if (${y}.issues.length) {
          payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${x}, ...iss.path] : [${x}]
          })));
        }
        
        if (${y}.value === undefined) {
          if (${x} in input) {
            newResult[${x}] = undefined;
          }
        } else {
          newResult[${x}] = ${y}.value;
        }
        
      `)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(v,y)=>b(d,v,y)},o,s=lo,a=!au.jitless,l=a&&sw.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?nS([],p,d,f,c,e):d):n(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function Fx(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=>!ii(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=>hn(s,i,Ot())))}),t)}var wu=_("$ZodUnion",(e,t)=>{ue.init(e,t),me(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),me(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),me(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),me(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=>yu(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=>Fx(l,r,e,o)):Fx(a,r,e,o)}});function Bx(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=>hn(s,i,Ot())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var oS=_("$ZodXor",(e,t)=>{wu.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=>Bx(l,r,e,o)):Bx(a,r,e,o)}}),sS=_("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,wu.init(e,t);let n=e._zod.parse;me(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=Hs(()=>{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(!lo(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)}}),aS=_("$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(([a,l])=>Ux(n,a,l)):Ux(n,o,s)}});function Vp(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(oi(e)&&oi(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=Vp(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=Vp(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 Ux(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}),ii(e))return e;let s=Vp(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var vh=_("$ZodTuple",(e,t)=>{ue.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=>ru(f,i,u))):ru(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=>ru(p,i,u))):ru(f,i,u)}}return s.length?Promise.all(s).then(()=>i):i}});function ru(e,t,n){e.issues.length&&t.issues.push(...$n(n,e.issues)),t.value[n]=e.value}var lS=_("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!oi(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"&&dh.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=>hn(c,i,Ot())),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}}),uS=_("$ZodMap",(e,t)=>{ue.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])=>{jx(c,d,n,s,r,e,i)})):jx(l,u,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function jx(e,t,n,i,r,o,s){e.issues.length&&(uu.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=>hn(a,s,Ot()))})),t.issues.length&&(uu.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=>hn(a,s,Ot()))})),n.value.set(e.value,t.value)}var cS=_("$ZodSet",(e,t)=>{ue.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=>Zx(l,n))):Zx(a,n)}return o.length?Promise.all(o).then(()=>n):n}});function Zx(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var dS=_("$ZodEnum",(e,t)=>{ue.init(e,t);let n=Xp(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>uu.has(typeof r)).map(r=>typeof r=="string"?tr(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}}),fS=_("$ZodLiteral",(e,t)=>{if(ue.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"?tr(i):i?tr(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}}),pS=_("$ZodFile",(e,t)=>{ue.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}}),hS=_("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ao(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 er;return n.value=r,n}});function Hx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var yh=_("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",me(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),me(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${yu(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=>Hx(o,n.value)):Hx(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),mS=_("$ZodExactOptional",(e,t)=>{yh.init(e,t),me(e._zod,"values",()=>t.innerType._zod.values),me(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),gS=_("$ZodNullable",(e,t)=>{ue.init(e,t),me(e._zod,"optin",()=>t.innerType._zod.optin),me(e._zod,"optout",()=>t.innerType._zod.optout),me(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${yu(n.source)}|null)$`):void 0}),me(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)}),bS=_("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",me(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=>qx(o,t)):qx(r,t)}});function qx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vS=_("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",me(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))}),yS=_("$ZodNonOptional",(e,t)=>{ue.init(e,t),me(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=>Wx(o,e)):Wx(r,e)}});function Wx(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 kS=_("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ao("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)}}),xS=_("$ZodCatch",(e,t)=>{ue.init(e,t),me(e._zod,"optin",()=>t.innerType._zod.optin),me(e._zod,"optout",()=>t.innerType._zod.optout),me(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=>hn(s,i,Ot()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>hn(o,i,Ot()))},input:n.value}),n.issues=[]),n)}}),wS=_("$ZodNaN",(e,t)=>{ue.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)}),_S=_("$ZodPipe",(e,t)=>{ue.init(e,t),me(e._zod,"values",()=>t.in._zod.values),me(e._zod,"optin",()=>t.in._zod.optin),me(e._zod,"optout",()=>t.out._zod.optout),me(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=>iu(s,t.in,i)):iu(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>iu(o,t.out,i)):iu(r,t.out,i)}});function iu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var kh=_("$ZodCodec",(e,t)=>{ue.init(e,t),me(e._zod,"values",()=>t.in._zod.values),me(e._zod,"optin",()=>t.in._zod.optin),me(e._zod,"optout",()=>t.out._zod.optout),me(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=>ou(o,t,i)):ou(r,t,i)}else{let r=t.out._zod.run(n,i);return r instanceof Promise?r.then(o=>ou(o,t,i)):ou(r,t,i)}}});function ou(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=>su(e,r,t.out,n)):su(e,i,t.out,n)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(r=>su(e,r,t.in,n)):su(e,i,t.in,n)}}function su(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var SS=_("$ZodReadonly",(e,t)=>{ue.init(e,t),me(e._zod,"propValues",()=>t.innerType._zod.propValues),me(e._zod,"values",()=>t.innerType._zod.values),me(e._zod,"optin",()=>t.innerType?._zod?.optin),me(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(Vx):Vx(r)}});function Vx(e){return e.value=Object.freeze(e.value),e}var ES=_("$ZodTemplateLiteral",(e,t)=>{ue.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||lw.has(typeof i))n.push(tr(`${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)}),$S=_("$ZodFunction",(e,t)=>(ue.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?qp(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?qp(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 Wp(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Wp(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 vh({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=_("$ZodPromise",(e,t)=>{ue.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),TS=_("$ZodLazy",(e,t)=>{ue.init(e,t),me(e._zod,"innerType",()=>t.getter()),me(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),me(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),me(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),me(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),IS=_("$ZodCustom",(e,t)=>{Xe.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=>Kx(o,n,i,e));Kx(r,n,i,e)}});function Kx(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(cu(r))}}var xh={};nr(xh,{zhTW:()=>h8,zhCN:()=>f8,yo:()=>g8,vi:()=>c8,uz:()=>l8,ur:()=>s8,uk:()=>zS,ua:()=>i8,tr:()=>n8,th:()=>e8,ta:()=>YL,sv:()=>GL,sl:()=>KL,ru:()=>WL,pt:()=>HL,ps:()=>BL,pl:()=>jL,ota:()=>LL,no:()=>RL,nl:()=>NL,ms:()=>zL,mk:()=>AL,lt:()=>TL,ko:()=>$L,km:()=>MS,kh:()=>SL,ka:()=>wL,ja:()=>kL,it:()=>vL,is:()=>gL,id:()=>hL,hy:()=>fL,hu:()=>cL,he:()=>lL,frCA:()=>sL,fr:()=>iL,fi:()=>nL,fa:()=>eL,es:()=>YP,eo:()=>GP,en:()=>AS,de:()=>VP,da:()=>qP,cs:()=>ZP,ca:()=>UP,bg:()=>FP,be:()=>PP,az:()=>OP,ar:()=>DP});var zP=()=>{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=ie(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 ${ne(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 DP(){return{localeError:zP()}}var NP=()=>{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=ie(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 ${ne(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 OP(){return{localeError:NP()}}function Jx(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 RP=()=>{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=ie(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 ${ne(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=Jx(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=Jx(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 PP(){return{localeError:RP()}}var LP=()=>{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=ie(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 ${ne(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 FP(){return{localeError:LP()}}var BP=()=>{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=ie(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 ${ne(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 UP(){return{localeError:BP()}}var jP=()=>{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=ie(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 ${ne(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 ZP(){return{localeError:jP()}}var HP=()=>{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=ie(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 ${ne(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 qP(){return{localeError:HP()}}var WP=()=>{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=ie(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 ${ne(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 VP(){return{localeError:WP()}}var KP=()=>{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=ie(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${ne(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 AS(){return{localeError:KP()}}var JP=()=>{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=ie(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 ${ne(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 GP(){return{localeError:JP()}}var XP=()=>{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=ie(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 ${ne(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 YP(){return{localeError:XP()}}var QP=()=>{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=ie(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 ${ne(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 eL(){return{localeError:QP()}}var tL=()=>{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=ie(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 ${ne(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 nL(){return{localeError:tL()}}var rL=()=>{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=ie(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 : ${ne(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 iL(){return{localeError:rL()}}var oL=()=>{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=ie(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 ${ne(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 sL(){return{localeError:oL()}}var aL=()=>{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=ie(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 ${ne(u.values[0])}`;let c=u.values.map(f=>ne(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 g=(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 ${g}`}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 lL(){return{localeError:aL()}}var uL=()=>{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=ie(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 ${ne(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 cL(){return{localeError:uL()}}function Gx(e,t,n){return Math.abs(e)===1?t:n}function so(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 dL=()=>{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=ie(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 ${ne(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=Gx(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 ${so(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 ${so(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=Gx(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 ${so(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 ${so(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 ${so(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 ${so(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function fL(){return{localeError:dL()}}var pL=()=>{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=ie(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 ${ne(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 hL(){return{localeError:pL()}}var mL=()=>{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=ie(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 ${ne(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 gL(){return{localeError:mL()}}var bL=()=>{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=ie(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 ${ne(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 vL(){return{localeError:bL()}}var yL=()=>{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=ie(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: ${ne(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 kL(){return{localeError:yL()}}var xL=()=>{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=ie(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 ${ne(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 wL(){return{localeError:xL()}}var _L=()=>{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=ie(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 ${ne(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 MS(){return{localeError:_L()}}function SL(){return MS()}var EL=()=>{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=ie(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 ${ne(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 $L(){return{localeError:EL()}}var Rs=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xx(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 CL=()=>{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=ie(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 ${ne(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,Xx(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Rs(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`${Rs(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,Xx(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Rs(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`${Rs(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`${Rs(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function TL(){return{localeError:CL()}}var IL=()=>{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=ie(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 ${ne(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 AL(){return{localeError:IL()}}var ML=()=>{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=ie(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 ${ne(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 zL(){return{localeError:ML()}}var DL=()=>{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=ie(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 ${ne(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 NL(){return{localeError:DL()}}var OL=()=>{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=ie(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 ${ne(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 RL(){return{localeError:OL()}}var PL=()=>{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=ie(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 ${ne(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 LL(){return{localeError:PL()}}var FL=()=>{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=ie(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 ${ne(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 BL(){return{localeError:FL()}}var UL=()=>{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=ie(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 ${ne(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 jL(){return{localeError:UL()}}var ZL=()=>{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=ie(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 ${ne(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 HL(){return{localeError:ZL()}}function Yx(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 qL=()=>{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=ie(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 ${ne(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=Yx(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=Yx(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 WL(){return{localeError:qL()}}var VL=()=>{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=ie(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 ${ne(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 KL(){return{localeError:VL()}}var JL=()=>{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=ie(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 ${ne(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 GL(){return{localeError:JL()}}var XL=()=>{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=ie(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 ${ne(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 YL(){return{localeError:XL()}}var QL=()=>{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=ie(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 ${ne(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 e8(){return{localeError:QL()}}var t8=()=>{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=ie(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 ${ne(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 n8(){return{localeError:t8()}}var r8=()=>{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=ie(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 ${ne(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 zS(){return{localeError:r8()}}function i8(){return zS()}var o8=()=>{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=ie(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: ${ne(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 s8(){return{localeError:o8()}}var a8=()=>{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=ie(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 ${ne(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 l8(){return{localeError:a8()}}var u8=()=>{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=ie(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 ${ne(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 c8(){return{localeError:u8()}}var d8=()=>{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=ie(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 ${ne(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 f8(){return{localeError:d8()}}var p8=()=>{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=ie(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 ${ne(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 h8(){return{localeError:p8()}}var m8=()=>{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=ie(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 ${ne(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 g8(){return{localeError:m8()}}var Qx,DS=Symbol("ZodOutput"),NS=Symbol("ZodInput"),pu=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 wh(){return new pu}(Qx=globalThis).__zod_globalRegistry??(Qx.__zod_globalRegistry=wh());var fn=globalThis.__zod_globalRegistry;function OS(e,t){return new e({type:"string",...F(t)})}function RS(e,t){return new e({type:"string",coerce:!0,...F(t)})}function _h(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...F(t)})}function hu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...F(t)})}function Sh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...F(t)})}function Eh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...F(t)})}function $h(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...F(t)})}function Ch(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...F(t)})}function _u(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...F(t)})}function Th(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...F(t)})}function Ih(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...F(t)})}function Ah(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 zh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...F(t)})}function Dh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...F(t)})}function Nh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...F(t)})}function Oh(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...F(t)})}function Rh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...F(t)})}function PS(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...F(t)})}function Ph(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...F(t)})}function Lh(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...F(t)})}function Fh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...F(t)})}function Bh(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...F(t)})}function Uh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...F(t)})}function jh(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...F(t)})}var LS={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function FS(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...F(t)})}function BS(e,t){return new e({type:"string",format:"date",check:"string_format",...F(t)})}function US(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...F(t)})}function jS(e,t){return new e({type:"string",format:"duration",check:"string_format",...F(t)})}function ZS(e,t){return new e({type:"number",checks:[],...F(t)})}function HS(e,t){return new e({type:"number",coerce:!0,checks:[],...F(t)})}function qS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...F(t)})}function WS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...F(t)})}function VS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...F(t)})}function KS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...F(t)})}function JS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...F(t)})}function GS(e,t){return new e({type:"boolean",...F(t)})}function XS(e,t){return new e({type:"boolean",coerce:!0,...F(t)})}function YS(e,t){return new e({type:"bigint",...F(t)})}function QS(e,t){return new e({type:"bigint",coerce:!0,...F(t)})}function eE(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...F(t)})}function tE(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...F(t)})}function nE(e,t){return new e({type:"symbol",...F(t)})}function rE(e,t){return new e({type:"undefined",...F(t)})}function iE(e,t){return new e({type:"null",...F(t)})}function oE(e){return new e({type:"any"})}function sE(e){return new e({type:"unknown"})}function aE(e,t){return new e({type:"never",...F(t)})}function lE(e,t){return new e({type:"void",...F(t)})}function uE(e,t){return new e({type:"date",...F(t)})}function cE(e,t){return new e({type:"date",coerce:!0,...F(t)})}function dE(e,t){return new e({type:"nan",...F(t)})}function Tr(e,t){return new fh({check:"less_than",...F(t),value:e,inclusive:!1})}function pn(e,t){return new fh({check:"less_than",...F(t),value:e,inclusive:!0})}function Ir(e,t){return new ph({check:"greater_than",...F(t),value:e,inclusive:!1})}function Jt(e,t){return new ph({check:"greater_than",...F(t),value:e,inclusive:!0})}function Zh(e){return Ir(0,e)}function Hh(e){return Tr(0,e)}function qh(e){return pn(0,e)}function Wh(e){return Jt(0,e)}function co(e,t){return new Yw({check:"multiple_of",...F(t),value:e})}function go(e,t){return new t_({check:"max_size",...F(t),maximum:e})}function Ar(e,t){return new n_({check:"min_size",...F(t),minimum:e})}function Qs(e,t){return new r_({check:"size_equals",...F(t),size:e})}function ea(e,t){return new i_({check:"max_length",...F(t),maximum:e})}function si(e,t){return new o_({check:"min_length",...F(t),minimum:e})}function ta(e,t){return new s_({check:"length_equals",...F(t),length:e})}function Su(e,t){return new a_({check:"string_format",format:"regex",...F(t),pattern:e})}function Eu(e){return new l_({check:"string_format",format:"lowercase",...F(e)})}function $u(e){return new u_({check:"string_format",format:"uppercase",...F(e)})}function Cu(e,t){return new c_({check:"string_format",format:"includes",...F(t),includes:e})}function Tu(e,t){return new d_({check:"string_format",format:"starts_with",...F(t),prefix:e})}function Iu(e,t){return new f_({check:"string_format",format:"ends_with",...F(t),suffix:e})}function Vh(e,t,n){return new p_({check:"property",property:e,schema:t,...F(n)})}function Au(e,t){return new h_({check:"mime_type",mime:e,...F(t)})}function ir(e){return new m_({check:"overwrite",tx:e})}function Mu(e){return ir(t=>t.normalize(e))}function zu(){return ir(e=>e.trim())}function Du(){return ir(e=>e.toLowerCase())}function Nu(){return ir(e=>e.toUpperCase())}function Ou(){return ir(e=>ow(e))}function fE(e,t,n){return new e({type:"array",element:t,...F(n)})}function b8(e,t,n){return new e({type:"union",options:t,...F(n)})}function v8(e,t,n){return new e({type:"union",options:t,inclusive:!1,...F(n)})}function y8(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...F(i)})}function k8(e,t,n){return new e({type:"intersection",left:t,right:n})}function x8(e,t,n,i){let r=n instanceof ue;return new e({type:"tuple",items:t,rest:r?n:null,...F(r?i:n)})}function w8(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...F(i)})}function _8(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...F(i)})}function S8(e,t,n){return new e({type:"set",valueType:t,...F(n)})}function E8(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 $8(e,t,n){return new e({type:"enum",entries:t,...F(n)})}function C8(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...F(n)})}function pE(e,t){return new e({type:"file",...F(t)})}function T8(e,t){return new e({type:"transform",transform:t})}function I8(e,t){return new e({type:"optional",innerType:t})}function A8(e,t){return new e({type:"nullable",innerType:t})}function M8(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():aw(n)}})}function z8(e,t,n){return new e({type:"nonoptional",innerType:t,...F(n)})}function D8(e,t){return new e({type:"success",innerType:t})}function N8(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function O8(e,t,n){return new e({type:"pipe",in:t,out:n})}function R8(e,t){return new e({type:"readonly",innerType:t})}function P8(e,t,n){return new e({type:"template_literal",parts:t,...F(n)})}function L8(e,t){return new e({type:"lazy",getter:t})}function F8(e,t){return new e({type:"promise",innerType:t})}function hE(e,t,n){let i=F(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function mE(e,t,n){return new e({type:"custom",check:"custom",fn:t,...F(n)})}function gE(e){let t=bE(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(cu(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(cu(r))}},e(n.value,n)));return t}function bE(e,t){let n=new Xe({check:"custom",...F(t)});return n._zod.check=e,n}function vE(e){let t=new Xe({check:"describe"});return t._zod.onattach=[n=>{let i=fn.get(n)??{};fn.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function yE(e){let t=new Xe({check:"meta"});return t._zod.onattach=[n=>{let i=fn.get(n)??{};fn.add(n,{...i,...e})}],t._zod.check=()=>{},t}function kE(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??kh,l=e.Boolean??gh,u=new(e.String??Ys)({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 na(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 fo(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??fn,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 Re(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),Re(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"&&Zt(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 po(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 ho(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:Ls(t,"input",e.processors),output:Ls(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw Error("Error converting schema to JSON.")}}function Zt(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 Zt(i.element,n);if(i.type==="set")return Zt(i.valueType,n);if(i.type==="lazy")return Zt(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 Zt(i.innerType,n);if(i.type==="intersection")return Zt(i.left,n)||Zt(i.right,n);if(i.type==="record"||i.type==="map")return Zt(i.keyType,n)||Zt(i.valueType,n);if(i.type==="pipe")return Zt(i.in,n)||Zt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Zt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Zt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Zt(r,n))return!0;return!!(i.rest&&Zt(i.rest,n))}return!1}var xE=(e,t={})=>n=>{let i=fo({...n,processors:t});return Re(e,i),po(i,e),ho(i,e)},Ls=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},s=fo({...r??{},target:o,io:t,processors:n});return Re(e,s),po(s,e),ho(s,e)},B8={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wE=(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=B8[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}))])}},_E=(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)},SE=(e,t,n,i)=>{n.type="boolean"},EE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},$E=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},CE=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},TE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},IE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},AE=(e,t,n,i)=>{n.not={}},ME=(e,t,n,i)=>{},zE=(e,t,n,i)=>{},DE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},NE=(e,t,n,i)=>{let r=e._zod.def,o=Xp(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},OE=(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},RE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},PE=(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},LE=(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)},FE=(e,t,n,i)=>{n.type="boolean"},BE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},UE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},jE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},ZE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},HE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},qE=(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=Re(o.element,t,{...i,path:[...i.path,"items"]})},WE=(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]=Re(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=Re(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Kh=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,l)=>Re(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=s:n.anyOf=s},VE=(e,t,n,i)=>{let r=e._zod.def,o=Re(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=Re(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},KE=(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)=>Re(f,t,{...i,path:[...i.path,s,p]})),u=o.rest?Re(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)},JE=(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=Re(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=Re(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Re(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)}},GE=(e,t,n,i)=>{let r=e._zod.def,o=Re(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"}]},XE=(e,t,n,i)=>{let r=e._zod.def;Re(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},YE=(e,t,n,i)=>{let r=e._zod.def;Re(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},QE=(e,t,n,i)=>{let r=e._zod.def;Re(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)))},e2=(e,t,n,i)=>{let r=e._zod.def;Re(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},t2=(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;Re(o,t,i);let s=t.seen.get(e);s.ref=o},n2=(e,t,n,i)=>{let r=e._zod.def;Re(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},r2=(e,t,n,i)=>{let r=e._zod.def;Re(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Jh=(e,t,n,i)=>{let r=e._zod.def;Re(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},i2=(e,t,n,i)=>{let r=e._zod.innerType;Re(r,t,i);let o=t.seen.get(e);o.ref=r},Kp={string:wE,number:_E,boolean:SE,bigint:EE,symbol:$E,null:CE,undefined:TE,void:IE,never:AE,any:ME,unknown:zE,date:DE,enum:NE,literal:OE,nan:RE,template_literal:PE,file:LE,success:FE,custom:BE,function:UE,transform:jE,map:ZE,set:HE,array:qE,object:WE,union:Kh,intersection:VE,tuple:KE,record:JE,nullable:GE,nonoptional:XE,default:YE,prefault:QE,catch:e2,pipe:t2,readonly:n2,promise:r2,optional:Jh,lazy:i2};function o2(e,t){if("_idmap"in e){let i=e,r=fo({...t,processors:Kp}),o={};for(let l of i._idmap.entries()){let[u,c]=l;Re(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;po(r,c),s[u]=ho(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=fo({...t,processors:Kp});return Re(e,n),po(n,e),ho(n,e)}var Jp=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=fo({processors:Kp,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 Re(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)),po(this.ctx,t);let i=ho(this.ctx,t),{"~standard":r,...o}=i;return o}},U8={},s2={};nr(s2,{xor:()=>m$,xid:()=>L2,void:()=>u$,uuidv7:()=>A2,uuidv6:()=>I2,uuidv4:()=>T2,uuid:()=>C2,url:()=>M2,unknown:()=>ai,union:()=>nc,undefined:()=>a$,ulid:()=>P2,uint64:()=>o$,uint32:()=>n$,tuple:()=>vm,transform:()=>ic,templateLiteral:()=>T$,symbol:()=>s$,superRefine:()=>qm,success:()=>E$,stringbool:()=>O$,stringFormat:()=>J2,string:()=>mu,strictObject:()=>p$,set:()=>k$,refine:()=>Hm,record:()=>ym,readonly:()=>Lm,promise:()=>I$,preprocess:()=>P$,prefault:()=>Mm,pipe:()=>js,partialRecord:()=>b$,optional:()=>Bs,object:()=>f$,number:()=>nm,nullish:()=>S$,nullable:()=>Us,null:()=>am,nonoptional:()=>zm,never:()=>ec,nativeEnum:()=>x$,nanoid:()=>N2,nan:()=>$$,meta:()=>D$,map:()=>y$,mac:()=>U2,looseRecord:()=>v$,looseObject:()=>h$,literal:()=>w$,lazy:()=>Um,ksuid:()=>F2,keyof:()=>d$,jwt:()=>K2,json:()=>R$,ipv6:()=>j2,ipv4:()=>B2,intersection:()=>gm,int64:()=>i$,int32:()=>t$,int:()=>gu,instanceof:()=>N$,httpUrl:()=>z2,hostname:()=>G2,hex:()=>X2,hash:()=>Y2,guid:()=>$2,function:()=>bu,float64:()=>e$,float32:()=>Q2,file:()=>_$,exactOptional:()=>$m,enum:()=>rc,emoji:()=>D2,email:()=>E2,e164:()=>V2,discriminatedUnion:()=>g$,describe:()=>z$,date:()=>c$,custom:()=>M$,cuid2:()=>R2,cuid:()=>O2,codec:()=>C$,cidrv6:()=>H2,cidrv4:()=>Z2,check:()=>A$,catch:()=>Om,boolean:()=>rm,bigint:()=>r$,base64url:()=>W2,base64:()=>q2,array:()=>la,any:()=>l$,_function:()=>bu,_default:()=>Im,_ZodString:()=>Ru,ZodXor:()=>pm,ZodXID:()=>Zu,ZodVoid:()=>dm,ZodUnknown:()=>um,ZodUnion:()=>ca,ZodUndefined:()=>om,ZodUUID:()=>Bn,ZodURL:()=>ia,ZodULID:()=>ju,ZodType:()=>pe,ZodTuple:()=>bm,ZodTransform:()=>Sm,ZodTemplateLiteral:()=>Fm,ZodSymbol:()=>im,ZodSuccess:()=>Dm,ZodStringFormat:()=>Fe,ZodString:()=>ra,ZodSet:()=>xm,ZodRecord:()=>da,ZodReadonly:()=>Pm,ZodPromise:()=>jm,ZodPrefault:()=>Am,ZodPipe:()=>ac,ZodOptional:()=>oc,ZodObject:()=>ua,ZodNumberFormat:()=>ci,ZodNumber:()=>oa,ZodNullable:()=>Cm,ZodNull:()=>sm,ZodNonOptional:()=>sc,ZodNever:()=>cm,ZodNanoID:()=>Fu,ZodNaN:()=>Rm,ZodMap:()=>km,ZodMAC:()=>tm,ZodLiteral:()=>wm,ZodLazy:()=>Bm,ZodKSUID:()=>Hu,ZodJWT:()=>Yu,ZodIntersection:()=>mm,ZodIPv6:()=>Wu,ZodIPv4:()=>qu,ZodGUID:()=>Fs,ZodFunction:()=>Zm,ZodFile:()=>_m,ZodExactOptional:()=>Em,ZodEnum:()=>mo,ZodEmoji:()=>Lu,ZodEmail:()=>Pu,ZodE164:()=>Xu,ZodDiscriminatedUnion:()=>hm,ZodDefault:()=>Tm,ZodDate:()=>tc,ZodCustomStringFormat:()=>bo,ZodCustom:()=>fa,ZodCodec:()=>lc,ZodCatch:()=>Nm,ZodCUID2:()=>Uu,ZodCUID:()=>Bu,ZodCIDRv6:()=>Ku,ZodCIDRv4:()=>Vu,ZodBoolean:()=>sa,ZodBigIntFormat:()=>Qu,ZodBigInt:()=>aa,ZodBase64URL:()=>Gu,ZodBase64:()=>Ju,ZodArray:()=>fm,ZodAny:()=>lm});var a2={};nr(a2,{uppercase:()=>$u,trim:()=>zu,toUpperCase:()=>Nu,toLowerCase:()=>Du,startsWith:()=>Tu,slugify:()=>Ou,size:()=>Qs,regex:()=>Su,property:()=>Vh,positive:()=>Zh,overwrite:()=>ir,normalize:()=>Mu,nonpositive:()=>qh,nonnegative:()=>Wh,negative:()=>Hh,multipleOf:()=>co,minSize:()=>Ar,minLength:()=>si,mime:()=>Au,maxSize:()=>go,maxLength:()=>ea,lte:()=>pn,lt:()=>Tr,lowercase:()=>Eu,length:()=>ta,includes:()=>Cu,gte:()=>Jt,gt:()=>Ir,endsWith:()=>Iu});var Gh={};nr(Gh,{time:()=>c2,duration:()=>d2,datetime:()=>l2,date:()=>u2,ZodISOTime:()=>Qh,ZodISODuration:()=>em,ZodISODateTime:()=>Xh,ZodISODate:()=>Yh});var Xh=_("ZodISODateTime",(e,t)=>{T_.init(e,t),Fe.init(e,t)});function l2(e){return FS(Xh,e)}var Yh=_("ZodISODate",(e,t)=>{I_.init(e,t),Fe.init(e,t)});function u2(e){return BS(Yh,e)}var Qh=_("ZodISOTime",(e,t)=>{A_.init(e,t),Fe.init(e,t)});function c2(e){return US(Qh,e)}var em=_("ZodISODuration",(e,t)=>{M_.init(e,t),Fe.init(e,t)});function d2(e){return jS(em,e)}var f2=(e,t)=>{Qp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>th(e,n)},flatten:{value:n=>eh(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,lu,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,lu,2)}},isEmpty:{get(){return e.issues.length===0}}})},j8=_("ZodError",f2),nn=_("ZodError",f2,{Parent:Error}),p2=qs(nn),h2=Ws(nn),m2=Vs(nn),g2=Ks(nn),b2=nh(nn),v2=rh(nn),y2=ih(nn),k2=oh(nn),x2=sh(nn),w2=ah(nn),_2=lh(nn),S2=uh(nn),pe=_("ZodType",(e,t)=>(ue.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ls(e,"input"),output:Ls(e,"output")}}),e.toJSONSchema=xE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ve.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)=>mn(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>p2(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>m2(e,n,i),e.parseAsync=async(n,i)=>h2(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>g2(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>b2(e,n,i),e.decode=(n,i)=>v2(e,n,i),e.encodeAsync=async(n,i)=>y2(e,n,i),e.decodeAsync=async(n,i)=>k2(e,n,i),e.safeEncode=(n,i)=>x2(e,n,i),e.safeDecode=(n,i)=>w2(e,n,i),e.safeEncodeAsync=async(n,i)=>_2(e,n,i),e.safeDecodeAsync=async(n,i)=>S2(e,n,i),e.refine=(n,i)=>e.check(Hm(n,i)),e.superRefine=n=>e.check(qm(n)),e.overwrite=n=>e.check(ir(n)),e.optional=()=>Bs(e),e.exactOptional=()=>$m(e),e.nullable=()=>Us(e),e.nullish=()=>Bs(Us(e)),e.nonoptional=n=>zm(e,n),e.array=()=>la(e),e.or=n=>nc([e,n]),e.and=n=>gm(e,n),e.transform=n=>js(e,ic(n)),e.default=n=>Im(e,n),e.prefault=n=>Mm(e,n),e.catch=n=>Om(e,n),e.pipe=n=>js(e,n),e.readonly=()=>Lm(e),e.describe=n=>{let i=e.clone();return fn.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return fn.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return fn.get(e);let i=e.clone();return fn.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Ru=_("_ZodString",(e,t)=>{Ys.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(i,r,o)=>wE(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(Cu(...i)),e.startsWith=(...i)=>e.check(Tu(...i)),e.endsWith=(...i)=>e.check(Iu(...i)),e.min=(...i)=>e.check(si(...i)),e.max=(...i)=>e.check(ea(...i)),e.length=(...i)=>e.check(ta(...i)),e.nonempty=(...i)=>e.check(si(1,...i)),e.lowercase=i=>e.check(Eu(i)),e.uppercase=i=>e.check($u(i)),e.trim=()=>e.check(zu()),e.normalize=(...i)=>e.check(Mu(...i)),e.toLowerCase=()=>e.check(Du()),e.toUpperCase=()=>e.check(Nu()),e.slugify=()=>e.check(Ou())}),ra=_("ZodString",(e,t)=>{Ys.init(e,t),Ru.init(e,t),e.email=n=>e.check(_h(Pu,n)),e.url=n=>e.check(_u(ia,n)),e.jwt=n=>e.check(jh(Yu,n)),e.emoji=n=>e.check(Th(Lu,n)),e.guid=n=>e.check(hu(Fs,n)),e.uuid=n=>e.check(Sh(Bn,n)),e.uuidv4=n=>e.check(Eh(Bn,n)),e.uuidv6=n=>e.check($h(Bn,n)),e.uuidv7=n=>e.check(Ch(Bn,n)),e.nanoid=n=>e.check(Ih(Fu,n)),e.guid=n=>e.check(hu(Fs,n)),e.cuid=n=>e.check(Ah(Bu,n)),e.cuid2=n=>e.check(Mh(Uu,n)),e.ulid=n=>e.check(zh(ju,n)),e.base64=n=>e.check(Fh(Ju,n)),e.base64url=n=>e.check(Bh(Gu,n)),e.xid=n=>e.check(Dh(Zu,n)),e.ksuid=n=>e.check(Nh(Hu,n)),e.ipv4=n=>e.check(Oh(qu,n)),e.ipv6=n=>e.check(Rh(Wu,n)),e.cidrv4=n=>e.check(Ph(Vu,n)),e.cidrv6=n=>e.check(Lh(Ku,n)),e.e164=n=>e.check(Uh(Xu,n)),e.datetime=n=>e.check(l2(n)),e.date=n=>e.check(u2(n)),e.time=n=>e.check(c2(n)),e.duration=n=>e.check(d2(n))});function mu(e){return OS(ra,e)}var Fe=_("ZodStringFormat",(e,t)=>{Le.init(e,t),Ru.init(e,t)}),Pu=_("ZodEmail",(e,t)=>{y_.init(e,t),Fe.init(e,t)});function E2(e){return _h(Pu,e)}var Fs=_("ZodGUID",(e,t)=>{b_.init(e,t),Fe.init(e,t)});function $2(e){return hu(Fs,e)}var Bn=_("ZodUUID",(e,t)=>{v_.init(e,t),Fe.init(e,t)});function C2(e){return Sh(Bn,e)}function T2(e){return Eh(Bn,e)}function I2(e){return $h(Bn,e)}function A2(e){return Ch(Bn,e)}var ia=_("ZodURL",(e,t)=>{k_.init(e,t),Fe.init(e,t)});function M2(e){return _u(ia,e)}function z2(e){return _u(ia,{protocol:/^https?$/,hostname:ui.domain,...ve.normalizeParams(e)})}var Lu=_("ZodEmoji",(e,t)=>{x_.init(e,t),Fe.init(e,t)});function D2(e){return Th(Lu,e)}var Fu=_("ZodNanoID",(e,t)=>{w_.init(e,t),Fe.init(e,t)});function N2(e){return Ih(Fu,e)}var Bu=_("ZodCUID",(e,t)=>{__.init(e,t),Fe.init(e,t)});function O2(e){return Ah(Bu,e)}var Uu=_("ZodCUID2",(e,t)=>{S_.init(e,t),Fe.init(e,t)});function R2(e){return Mh(Uu,e)}var ju=_("ZodULID",(e,t)=>{E_.init(e,t),Fe.init(e,t)});function P2(e){return zh(ju,e)}var Zu=_("ZodXID",(e,t)=>{$_.init(e,t),Fe.init(e,t)});function L2(e){return Dh(Zu,e)}var Hu=_("ZodKSUID",(e,t)=>{C_.init(e,t),Fe.init(e,t)});function F2(e){return Nh(Hu,e)}var qu=_("ZodIPv4",(e,t)=>{z_.init(e,t),Fe.init(e,t)});function B2(e){return Oh(qu,e)}var tm=_("ZodMAC",(e,t)=>{N_.init(e,t),Fe.init(e,t)});function U2(e){return PS(tm,e)}var Wu=_("ZodIPv6",(e,t)=>{D_.init(e,t),Fe.init(e,t)});function j2(e){return Rh(Wu,e)}var Vu=_("ZodCIDRv4",(e,t)=>{O_.init(e,t),Fe.init(e,t)});function Z2(e){return Ph(Vu,e)}var Ku=_("ZodCIDRv6",(e,t)=>{R_.init(e,t),Fe.init(e,t)});function H2(e){return Lh(Ku,e)}var Ju=_("ZodBase64",(e,t)=>{P_.init(e,t),Fe.init(e,t)});function q2(e){return Fh(Ju,e)}var Gu=_("ZodBase64URL",(e,t)=>{F_.init(e,t),Fe.init(e,t)});function W2(e){return Bh(Gu,e)}var Xu=_("ZodE164",(e,t)=>{B_.init(e,t),Fe.init(e,t)});function V2(e){return Uh(Xu,e)}var Yu=_("ZodJWT",(e,t)=>{j_.init(e,t),Fe.init(e,t)});function K2(e){return jh(Yu,e)}var bo=_("ZodCustomStringFormat",(e,t)=>{Z_.init(e,t),Fe.init(e,t)});function J2(e,t,n={}){return na(bo,e,t,n)}function G2(e){return na(bo,"hostname",ui.hostname,e)}function X2(e){return na(bo,"hex",ui.hex,e)}function Y2(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=ui[i];if(!r)throw Error(`Unrecognized hash format: ${i}`);return na(bo,i,r,t)}var oa=_("ZodNumber",(e,t)=>{mh.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(i,r,o)=>_E(e,i,r,o),e.gt=(i,r)=>e.check(Ir(i,r)),e.gte=(i,r)=>e.check(Jt(i,r)),e.min=(i,r)=>e.check(Jt(i,r)),e.lt=(i,r)=>e.check(Tr(i,r)),e.lte=(i,r)=>e.check(pn(i,r)),e.max=(i,r)=>e.check(pn(i,r)),e.int=i=>e.check(gu(i)),e.safe=i=>e.check(gu(i)),e.positive=i=>e.check(Ir(0,i)),e.nonnegative=i=>e.check(Jt(0,i)),e.negative=i=>e.check(Tr(0,i)),e.nonpositive=i=>e.check(pn(0,i)),e.multipleOf=(i,r)=>e.check(co(i,r)),e.step=(i,r)=>e.check(co(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 nm(e){return ZS(oa,e)}var ci=_("ZodNumberFormat",(e,t)=>{H_.init(e,t),oa.init(e,t)});function gu(e){return qS(ci,e)}function Q2(e){return WS(ci,e)}function e$(e){return VS(ci,e)}function t$(e){return KS(ci,e)}function n$(e){return JS(ci,e)}var sa=_("ZodBoolean",(e,t)=>{gh.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>SE(e,n,i,r)});function rm(e){return GS(sa,e)}var aa=_("ZodBigInt",(e,t)=>{bh.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(i,r,o)=>EE(e,i,r,o),e.gte=(i,r)=>e.check(Jt(i,r)),e.min=(i,r)=>e.check(Jt(i,r)),e.gt=(i,r)=>e.check(Ir(i,r)),e.gte=(i,r)=>e.check(Jt(i,r)),e.min=(i,r)=>e.check(Jt(i,r)),e.lt=(i,r)=>e.check(Tr(i,r)),e.lte=(i,r)=>e.check(pn(i,r)),e.max=(i,r)=>e.check(pn(i,r)),e.positive=i=>e.check(Ir(BigInt(0),i)),e.negative=i=>e.check(Tr(BigInt(0),i)),e.nonpositive=i=>e.check(pn(BigInt(0),i)),e.nonnegative=i=>e.check(Jt(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(co(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function r$(e){return YS(aa,e)}var Qu=_("ZodBigIntFormat",(e,t)=>{q_.init(e,t),aa.init(e,t)});function i$(e){return eE(Qu,e)}function o$(e){return tE(Qu,e)}var im=_("ZodSymbol",(e,t)=>{W_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$E(e,n,i,r)});function s$(e){return nE(im,e)}var om=_("ZodUndefined",(e,t)=>{V_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>TE(e,n,i,r)});function a$(e){return rE(om,e)}var sm=_("ZodNull",(e,t)=>{K_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>CE(e,n,i,r)});function am(e){return iE(sm,e)}var lm=_("ZodAny",(e,t)=>{J_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ME(e,n,i,r)});function l$(){return oE(lm)}var um=_("ZodUnknown",(e,t)=>{G_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zE(e,n,i,r)});function ai(){return sE(um)}var cm=_("ZodNever",(e,t)=>{X_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>AE(e,n,i,r)});function ec(e){return aE(cm,e)}var dm=_("ZodVoid",(e,t)=>{Y_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>IE(e,n,i,r)});function u$(e){return lE(dm,e)}var tc=_("ZodDate",(e,t)=>{Q_.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(i,r,o)=>DE(e,i,r,o),e.min=(i,r)=>e.check(Jt(i,r)),e.max=(i,r)=>e.check(pn(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 c$(e){return uE(tc,e)}var fm=_("ZodArray",(e,t)=>{eS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qE(e,n,i,r),e.element=t.element,e.min=(n,i)=>e.check(si(n,i)),e.nonempty=n=>e.check(si(1,n)),e.max=(n,i)=>e.check(ea(n,i)),e.length=(n,i)=>e.check(ta(n,i)),e.unwrap=()=>e.element});function la(e,t){return fE(fm,e,t)}function d$(e){let t=e._zod.def.shape;return rc(Object.keys(t))}var ua=_("ZodObject",(e,t)=>{iS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>WE(e,n,i,r),ve.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>rc(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ai()}),e.loose=()=>e.clone({...e._zod.def,catchall:ai()}),e.strict=()=>e.clone({...e._zod.def,catchall:ec()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ve.extend(e,n),e.safeExtend=n=>ve.safeExtend(e,n),e.merge=n=>ve.merge(e,n),e.pick=n=>ve.pick(e,n),e.omit=n=>ve.omit(e,n),e.partial=(...n)=>ve.partial(oc,e,n[0]),e.required=(...n)=>ve.required(sc,e,n[0])});function f$(e,t){let n={type:"object",shape:e??{},...ve.normalizeParams(t)};return new ua(n)}function p$(e,t){return new ua({type:"object",shape:e,catchall:ec(),...ve.normalizeParams(t)})}function h$(e,t){return new ua({type:"object",shape:e,catchall:ai(),...ve.normalizeParams(t)})}var ca=_("ZodUnion",(e,t)=>{wu.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kh(e,n,i,r),e.options=t.options});function nc(e,t){return new ca({type:"union",options:e,...ve.normalizeParams(t)})}var pm=_("ZodXor",(e,t)=>{ca.init(e,t),oS.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kh(e,n,i,r),e.options=t.options});function m$(e,t){return new pm({type:"union",options:e,inclusive:!1,...ve.normalizeParams(t)})}var hm=_("ZodDiscriminatedUnion",(e,t)=>{ca.init(e,t),sS.init(e,t)});function g$(e,t,n){return new hm({type:"union",options:t,discriminator:e,...ve.normalizeParams(n)})}var mm=_("ZodIntersection",(e,t)=>{aS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>VE(e,n,i,r)});function gm(e,t){return new mm({type:"intersection",left:e,right:t})}var bm=_("ZodTuple",(e,t)=>{vh.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>KE(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function vm(e,t,n){let i=t instanceof ue,r=i?n:t;return new bm({type:"tuple",items:e,rest:i?t:null,...ve.normalizeParams(r)})}var da=_("ZodRecord",(e,t)=>{lS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>JE(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function ym(e,t,n){return new da({type:"record",keyType:e,valueType:t,...ve.normalizeParams(n)})}function b$(e,t,n){let i=mn(e);return i._zod.values=void 0,new da({type:"record",keyType:i,valueType:t,...ve.normalizeParams(n)})}function v$(e,t,n){return new da({type:"record",keyType:e,valueType:t,mode:"loose",...ve.normalizeParams(n)})}var km=_("ZodMap",(e,t)=>{uS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ZE(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Ar(...n)),e.nonempty=n=>e.check(Ar(1,n)),e.max=(...n)=>e.check(go(...n)),e.size=(...n)=>e.check(Qs(...n))});function y$(e,t,n){return new km({type:"map",keyType:e,valueType:t,...ve.normalizeParams(n)})}var xm=_("ZodSet",(e,t)=>{cS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>HE(e,n,i,r),e.min=(...n)=>e.check(Ar(...n)),e.nonempty=n=>e.check(Ar(1,n)),e.max=(...n)=>e.check(go(...n)),e.size=(...n)=>e.check(Qs(...n))});function k$(e,t){return new xm({type:"set",valueType:e,...ve.normalizeParams(t)})}var mo=_("ZodEnum",(e,t)=>{dS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(i,r,o)=>NE(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 mo({...t,checks:[],...ve.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 mo({...t,checks:[],...ve.normalizeParams(r),entries:o})}});function rc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new mo({type:"enum",entries:n,...ve.normalizeParams(t)})}function x$(e,t){return new mo({type:"enum",entries:e,...ve.normalizeParams(t)})}var wm=_("ZodLiteral",(e,t)=>{fS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>OE(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 w$(e,t){return new wm({type:"literal",values:Array.isArray(e)?e:[e],...ve.normalizeParams(t)})}var _m=_("ZodFile",(e,t)=>{pS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>LE(e,n,i,r),e.min=(n,i)=>e.check(Ar(n,i)),e.max=(n,i)=>e.check(go(n,i)),e.mime=(n,i)=>e.check(Au(Array.isArray(n)?n:[n],i))});function _$(e){return pE(_m,e)}var Sm=_("ZodTransform",(e,t)=>{hS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jE(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ao(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(ve.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(ve.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 ic(e){return new Sm({type:"transform",transform:e})}var oc=_("ZodOptional",(e,t)=>{yh.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Bs(e){return new oc({type:"optional",innerType:e})}var Em=_("ZodExactOptional",(e,t)=>{mS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $m(e){return new Em({type:"optional",innerType:e})}var Cm=_("ZodNullable",(e,t)=>{gS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>GE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Us(e){return new Cm({type:"nullable",innerType:e})}function S$(e){return Bs(Us(e))}var Tm=_("ZodDefault",(e,t)=>{bS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>YE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Im(e,t){return new Tm({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ve.shallowClone(t)}})}var Am=_("ZodPrefault",(e,t)=>{vS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>QE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e,t){return new Am({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ve.shallowClone(t)}})}var sc=_("ZodNonOptional",(e,t)=>{yS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>XE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function zm(e,t){return new sc({type:"nonoptional",innerType:e,...ve.normalizeParams(t)})}var Dm=_("ZodSuccess",(e,t)=>{kS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>FE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function E$(e){return new Dm({type:"success",innerType:e})}var Nm=_("ZodCatch",(e,t)=>{xS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>e2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Om(e,t){return new Nm({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Rm=_("ZodNaN",(e,t)=>{wS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>RE(e,n,i,r)});function $$(e){return dE(Rm,e)}var ac=_("ZodPipe",(e,t)=>{_S.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>t2(e,n,i,r),e.in=t.in,e.out=t.out});function js(e,t){return new ac({type:"pipe",in:e,out:t})}var lc=_("ZodCodec",(e,t)=>{ac.init(e,t),kh.init(e,t)});function C$(e,t,n){return new lc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var Pm=_("ZodReadonly",(e,t)=>{SS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>n2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Lm(e){return new Pm({type:"readonly",innerType:e})}var Fm=_("ZodTemplateLiteral",(e,t)=>{ES.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>PE(e,n,i,r)});function T$(e,t){return new Fm({type:"template_literal",parts:e,...ve.normalizeParams(t)})}var Bm=_("ZodLazy",(e,t)=>{TS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>i2(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Um(e){return new Bm({type:"lazy",getter:e})}var jm=_("ZodPromise",(e,t)=>{CS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>r2(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function I$(e){return new jm({type:"promise",innerType:e})}var Zm=_("ZodFunction",(e,t)=>{$S.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>UE(e,n,i,r)});function bu(e){return new Zm({type:"function",input:Array.isArray(e?.input)?vm(e?.input):e?.input??la(ai()),output:e?.output??ai()})}var fa=_("ZodCustom",(e,t)=>{IS.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,i,r)=>BE(e,n,i,r)});function A$(e){let t=new Xe({check:"custom"});return t._zod.check=e,t}function M$(e,t){return hE(fa,e??(()=>!0),t)}function Hm(e,t={}){return mE(fa,e,t)}function qm(e){return gE(e)}var z$=vE,D$=yE;function N$(e,t={}){let n=new fa({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...ve.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 O$=(...e)=>kE({Codec:lc,Boolean:sa,String:ra},...e);function R$(e){let t=Um(()=>nc([mu(e),nm(),rm(),am(),la(t),ym(mu(),t)]));return t}function P$(e,t){return js(ic(e),t)}var Z8={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 H8(e){Ot({customError:e})}function q8(){return Ot().customError}var Gp;Gp||(Gp={});var j={...s2,...a2,iso:Gh},W8=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 V8(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 K8(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 L$(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=K8(r,t),s=Nt(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 L$(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=Nt(u,t);r[l]=s.has(l)?c:c.optional()}if(e.propertyNames){let l=Nt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Nt(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=Nt(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(Nt(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=>Nt(l,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?Nt(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=>Nt(l,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Nt(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=Nt(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 Nt(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=L$(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=>Nt(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=>Nt(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:Nt(e.allOf[0],t),l=i?0:1;for(let u=l;u<e.allOf.length;u++)a=j.intersection(a,Nt(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))W8.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function J8(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=V8(e,t?.defaultTarget),i=e.$defs||e.definitions||{},r={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??fn};return Nt(e,r)}var F$={};nr(F$,{string:()=>G8,number:()=>X8,date:()=>e9,boolean:()=>Y8,bigint:()=>Q8});function G8(e){return RS(ra,e)}function X8(e){return HS(oa,e)}function Y8(e){return XS(sa,e)}function Q8(e){return QS(aa,e)}function e9(e){return cE(tc,e)}Ot(AS());var t9=k.union([k.literal("light"),k.literal("dark")]).describe("Color theme preference for the host environment."),Zs=k.union([k.literal("inline"),k.literal("fullscreen"),k.literal("pip")]).describe("Display mode for UI presentation."),n9=k.union([k.literal("--color-background-primary"),k.literal("--color-background-secondary"),k.literal("--color-background-tertiary"),k.literal("--color-background-inverse"),k.literal("--color-background-ghost"),k.literal("--color-background-info"),k.literal("--color-background-danger"),k.literal("--color-background-success"),k.literal("--color-background-warning"),k.literal("--color-background-disabled"),k.literal("--color-text-primary"),k.literal("--color-text-secondary"),k.literal("--color-text-tertiary"),k.literal("--color-text-inverse"),k.literal("--color-text-ghost"),k.literal("--color-text-info"),k.literal("--color-text-danger"),k.literal("--color-text-success"),k.literal("--color-text-warning"),k.literal("--color-text-disabled"),k.literal("--color-text-ghost"),k.literal("--color-border-primary"),k.literal("--color-border-secondary"),k.literal("--color-border-tertiary"),k.literal("--color-border-inverse"),k.literal("--color-border-ghost"),k.literal("--color-border-info"),k.literal("--color-border-danger"),k.literal("--color-border-success"),k.literal("--color-border-warning"),k.literal("--color-border-disabled"),k.literal("--color-ring-primary"),k.literal("--color-ring-secondary"),k.literal("--color-ring-inverse"),k.literal("--color-ring-info"),k.literal("--color-ring-danger"),k.literal("--color-ring-success"),k.literal("--color-ring-warning"),k.literal("--font-sans"),k.literal("--font-mono"),k.literal("--font-weight-normal"),k.literal("--font-weight-medium"),k.literal("--font-weight-semibold"),k.literal("--font-weight-bold"),k.literal("--font-text-xs-size"),k.literal("--font-text-sm-size"),k.literal("--font-text-md-size"),k.literal("--font-text-lg-size"),k.literal("--font-heading-xs-size"),k.literal("--font-heading-sm-size"),k.literal("--font-heading-md-size"),k.literal("--font-heading-lg-size"),k.literal("--font-heading-xl-size"),k.literal("--font-heading-2xl-size"),k.literal("--font-heading-3xl-size"),k.literal("--font-text-xs-line-height"),k.literal("--font-text-sm-line-height"),k.literal("--font-text-md-line-height"),k.literal("--font-text-lg-line-height"),k.literal("--font-heading-xs-line-height"),k.literal("--font-heading-sm-line-height"),k.literal("--font-heading-md-line-height"),k.literal("--font-heading-lg-line-height"),k.literal("--font-heading-xl-line-height"),k.literal("--font-heading-2xl-line-height"),k.literal("--font-heading-3xl-line-height"),k.literal("--border-radius-xs"),k.literal("--border-radius-sm"),k.literal("--border-radius-md"),k.literal("--border-radius-lg"),k.literal("--border-radius-xl"),k.literal("--border-radius-full"),k.literal("--border-width-regular"),k.literal("--shadow-hairline"),k.literal("--shadow-sm"),k.literal("--shadow-md"),k.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),r9=k.record(n9.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.`),k.union([k.string(),k.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.`),gte=k.object({method:k.literal("ui/open-link"),params:k.object({url:k.string().describe("URL to open in the host's browser")})}),i9=k.object({isError:k.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),o9=k.object({isError:k.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),bte=k.object({method:k.literal("ui/notifications/sandbox-proxy-ready"),params:k.object({})}),Wm=k.object({connectDomains:k.array(k.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:k.array(k.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:k.array(k.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:k.array(k.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),Vm=k.object({camera:k.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:k.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:k.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:k.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")}),vte=k.object({method:k.literal("ui/notifications/size-changed"),params:k.object({width:k.number().optional().describe("New width in pixels."),height:k.number().optional().describe("New height in pixels.")})}),s9=k.object({method:k.literal("ui/notifications/tool-input"),params:k.object({arguments:k.record(k.string(),k.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),a9=k.object({method:k.literal("ui/notifications/tool-input-partial"),params:k.object({arguments:k.record(k.string(),k.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),l9=k.object({method:k.literal("ui/notifications/tool-cancelled"),params:k.object({reason:k.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),u9=k.object({fonts:k.string().optional()}),c9=k.object({variables:r9.optional().describe("CSS variables for theming the app."),css:u9.optional().describe("CSS blocks that apps can inject.")}),d9=k.object({method:k.literal("ui/resource-teardown"),params:k.object({})}),yte=k.record(k.string(),k.unknown()),ew=k.object({text:k.object({}).optional().describe("Host supports text content blocks."),image:k.object({}).optional().describe("Host supports image content blocks."),audio:k.object({}).optional().describe("Host supports audio content blocks."),resource:k.object({}).optional().describe("Host supports resource content blocks."),resourceLink:k.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:k.object({}).optional().describe("Host supports structured content.")}),f9=k.object({experimental:k.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:k.object({}).optional().describe("Host supports opening external URLs."),serverTools:k.object({listChanged:k.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:k.object({listChanged:k.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:k.object({}).optional().describe("Host accepts log messages."),sandbox:k.object({permissions:Vm.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Wm.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:ew.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:ew.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),p9=k.object({experimental:k.object({}).optional().describe("Experimental features (structure TBD)."),tools:k.object({listChanged:k.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:k.array(Zs).optional().describe("Display modes the app supports.")}),kte=k.object({method:k.literal("ui/notifications/initialized"),params:k.object({}).optional()}),xte=k.object({csp:Wm.optional().describe("Content Security Policy configuration."),permissions:Vm.optional().describe("Sandbox permissions requested by the UI."),domain:k.string().optional().describe("Dedicated origin for view sandbox."),prefersBorder:k.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),wte=k.object({method:k.literal("ui/request-display-mode"),params:k.object({mode:Zs.describe("The display mode being requested.")})}),h9=k.object({mode:Zs.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),m9=k.union([k.literal("model"),k.literal("app")]).describe("Tool visibility scope - who can access the tool."),_te=k.object({resourceUri:k.string().optional(),visibility:k.array(m9).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`)}),Ste=k.object({mimeTypes:k.array(k.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Ete=k.object({method:k.literal("ui/message"),params:k.object({role:k.literal("user").describe('Message role, currently only "user" is supported.'),content:k.array(io).describe("Message content blocks (text, image, etc.).")})}),$te=k.object({method:k.literal("ui/notifications/sandbox-resource-ready"),params:k.object({html:k.string().describe("HTML content to load into the inner iframe."),sandbox:k.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Wm.optional().describe("CSP configuration from resource metadata."),permissions:Vm.optional().describe("Sandbox permissions from resource metadata.")})}),g9=k.object({method:k.literal("ui/notifications/tool-result"),params:oo.describe("Standard MCP tool execution result.")}),B$=k.object({toolInfo:k.object({id:to.optional().describe("JSON-RPC id of the tools/call request."),tool:tu.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:t9.optional().describe("Current color theme preference."),styles:c9.optional().describe("Style configuration for theming the app."),displayMode:Zs.optional().describe("How the UI is currently displayed."),availableDisplayModes:k.array(Zs).optional().describe("Display modes the host supports."),containerDimensions:k.union([k.object({height:k.number().describe("Fixed container height in pixels.")}),k.object({maxHeight:k.union([k.number(),k.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(k.union([k.object({width:k.number().describe("Fixed container width in pixels.")}),k.object({maxWidth:k.union([k.number(),k.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:k.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:k.string().optional().describe("User's timezone in IANA format."),userAgent:k.string().optional().describe("Host application identifier."),platform:k.union([k.literal("web"),k.literal("desktop"),k.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:k.object({touch:k.boolean().optional().describe("Whether the device supports touch input."),hover:k.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:k.object({top:k.number().describe("Top safe area inset in pixels."),right:k.number().describe("Right safe area inset in pixels."),bottom:k.number().describe("Bottom safe area inset in pixels."),left:k.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),b9=k.object({method:k.literal("ui/notifications/host-context-changed"),params:B$.describe("Partial context update containing only changed fields.")}),Cte=k.object({method:k.literal("ui/update-model-context"),params:k.object({content:k.array(io).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:k.record(k.string(),k.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Tte=k.object({method:k.literal("ui/initialize"),params:k.object({appInfo:Is.describe("App identification (name and version)."),appCapabilities:p9.describe("Features and capabilities this app provides."),protocolVersion:k.string().describe("Protocol version this app supports.")})}),v9=k.object({protocolVersion:k.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Is.describe("Host application identification and version."),hostCapabilities:f9.describe("Features and capabilities provided by the host."),hostContext:B$.describe("Rich context about the host environment.")}).passthrough();function U$(e){let t=document.documentElement;t.setAttribute("data-theme",e),t.style.colorScheme=e}function j$(e,t=document.documentElement){for(let[n,i]of Object.entries(e))i!==void 0&&t.style.setProperty(n,i)}function Z$(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 vu=class extends nu{constructor(n,i={},r={autoResize:!0}){super(r);zt(this,"_appInfo");zt(this,"_capabilities");zt(this,"options");zt(this,"_hostCapabilities");zt(this,"_hostInfo");zt(this,"_hostContext");zt(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=r,this.setRequestHandler(no,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(s9,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(a9,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(g9,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(l9,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(b9,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(d9,(i,r)=>n(i.params,r))}set oncalltool(n){this.setRequestHandler(Fp,(i,r)=>n(i.params,r))}set onlisttools(n){this.setRequestHandler(Lp,(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},oo,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},o9,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},ql,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},i9,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},h9,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 jp(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:ER}},v9,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 y9='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 10l5 5 5-5z"></path></svg>',k9='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 14l5-5 5 5z"></path></svg>';function x9(e,t){if(!e)return;let n=t?"Collapse":"Expand";e.title=n,e.setAttribute("aria-label",n),e.innerHTML=t?k9:y9}function w9(e,t){e&&(e.classList.toggle("expanded",t),e.classList.toggle("collapsed",!t))}function _9(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,w9(t,a),x9(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 H$(e){let{shell:t,compactRow:n,initialExpanded:i,onToggle:r,onScrollAfterExpand:o,onRender:s}=e,a=_9({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 q$="desktop-commander:widget-state",Km="__dc_widget_id__:";function S9(){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 E9(e){let t=e.indexOf(Km);if(t===-1)return;let n=e.slice(t+Km.length).split("|",1)[0];if(n)try{return decodeURIComponent(n)}catch{return n}}function $9(){if(typeof window>"u")return"unknown-instance";let e=typeof window.name=="string"?window.name:"",t=E9(e);if(t)return t;let n=S9(),i=`${Km}${encodeURIComponent(n)}`;try{window.name=e?`${e}|${i}`:i}catch{}return n}function C9(){if(typeof window>"u")return`${q$}:unknown`;let e=window.location.pathname||"unknown",t=$9();return`${q$}:${e}:${encodeURIComponent(t)}`}function T9(){if(!(typeof window>"u"))try{return window.sessionStorage}catch{return}}function I9(){return typeof window<"u"&&typeof window.openai?.setWidgetState=="function"}function W$(e){if(!I9()){let t=T9(),n=C9();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 gn(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function pa(e){let t=e.variant??"ready",n=`compact-row compact-row--${t}`,i=e.id?` id="${gn(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">${gn(e.filename)}</span>`:"";return`<div class="${n}"${i}${o}${s}>${a}<span class="compact-label">${gn(e.label)}</span>${l}</div>`}function uc(e){return typeof e=="object"&&e!==null}function V$(e,t){if(!uc(e))return;(e.theme==="light"||e.theme==="dark")&&U$(e.theme);let n=uc(e.styles)?e.styles:null,i=uc(n?.variables)?n.variables:null,r=uc(n?.css)?n.css:null,o=typeof r?.fonts=="string"?r.fonts:null;i&&j$(i),o&&Z$(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 K$(e){let{app:t,chrome:n,onContextApplied:i,onConnected:r}=e;t.onhostcontextchanged=s=>{V$(s,n),i?.()},await t.connect();let o=t.getHostContext();o&&(V$(o,n),i?.()),await r?.()}function A9(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 J$(e,t){let n=t.baseParams??{};return(i,r={})=>{e("track_ui_event",{event:i,component:t.component,params:{...n,...A9(r)}}).catch(()=>{})}}var gC=gy(mC(),1);var ot=gC.default;function bC(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"],g=["true","false"],b={match:/(\/[a-z._-]+)+/},v=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["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"],C=["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:g,built_in:[...v,...y,"set","shopt",...x,...C]},contains:[p,e.SHEBANG(),h,d,o,s,b,a,l,u,c,n]}}var k5=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_-]*/}}),x5=["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"],w5=["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"],_5=[...x5,...w5],S5=["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(),E5=["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(),$5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),C5=["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 vC(e){let t=e.regex,n=k5(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:":("+E5.join("|")+")"},{begin:":(:)?("+$5.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+C5.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:S5.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_5.join("|")+")\\b"}]}}function yC(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 ko="[0-9](_*[0-9])*",hc=`\\.(${ko})`,mc="[0-9a-fA-F](_*[0-9a-fA-F])*",kC={className:"number",variants:[{begin:`(\\b(${ko})((${hc})|\\.)?|(${hc}))[eE][+-]?(${ko})[fFdD]?\\b`},{begin:`\\b(${ko})((${hc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${hc})[fFdD]?\\b`},{begin:`\\b(${ko})[fFdD]\\b`},{begin:`\\b0[xX]((${mc})\\.?|(${mc})?\\.(${mc}))[pP][+-]?(${ko})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${mc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function xC(e,t,n){return n===-1?"":e.replace(t,i=>xC(e,t,n-1))}function wC(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",i=n+xC("(?:<"+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,kC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},kC,u]}}var _C="[A-Za-z$_][0-9A-Za-z$_]*",T5=["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"],I5=["true","false","null","undefined","NaN","Infinity"],SC=["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"],EC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],$C=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],A5=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],M5=[].concat($C,SC,EC);function CC(e){let t=e.regex,n=(Z,{after:te})=>{let de="</"+Z[0].slice(1);return Z.input.indexOf(de,te)!==-1},i=_C,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,te)=>{let de=Z[0].length+Z.index,w=Z.input[de];if(w==="<"||w===","){te.ignoreMatch();return}w===">"&&(n(Z,{after:de})||te.ignoreMatch());let S,O=Z.input.substring(de);if(S=O.match(/^\s*=/)){te.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){te.ignoreMatch();return}}},a={$pattern:_C,keyword:T5,literal:I5,built_in:M5,"variable.language":A5},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"}},g={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]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});let x=[].concat(v,f.contains),C=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},D={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:{_:[...SC,...EC]}},V={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:[A],illegal:/%/},ze={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function nt(Z){return t.concat("(?!",Z.join("|"),")")}let He={match:t.concat(/\b/,nt([...$C,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},De={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,v,{match:/\$\d+/},d,z,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{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:I,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:C}]}]},{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:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},De,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},He,ze,D,ae,{match:/\$[(.]/}]}}function TC(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 IC(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(b=>{b.contains=b.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 AC(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})`}]},g={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={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,g,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{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,b,d]}]}}function MC(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}]},A=[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=A,m.contains=A;let ce=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:A}}];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(A)}}function zC(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 DC(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(C=>!c.includes(C)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},g={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(C){return t.concat(/\b/,t.either(...C.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}let y={scope:"keyword",match:v(f),relevance:0};function x(C,{exceptions:A,when:D}={}){let z=D;return A=A||[],C.map(V=>V.match(/\|\d+$/)||A.includes(V)?V:z(V)?`${V}|0`:V)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:C=>C.length<3}),literal:o,type:a,built_in:d},contains:[{scope:"type",match:v(s)},y,b,m,i,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}var gc="[A-Za-z$_][0-9A-Za-z$_]*",NC=["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"],OC=["true","false","null","undefined","NaN","Infinity"],RC=["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"],PC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],LC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],FC=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BC=[].concat(LC,RC,PC);function z5(e){let t=e.regex,n=(Z,{after:te})=>{let de="</"+Z[0].slice(1);return Z.input.indexOf(de,te)!==-1},i=gc,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,te)=>{let de=Z[0].length+Z.index,w=Z.input[de];if(w==="<"||w===","){te.ignoreMatch();return}w===">"&&(n(Z,{after:de})||te.ignoreMatch());let S,O=Z.input.substring(de);if(S=O.match(/^\s*=/)){te.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){te.ignoreMatch();return}}},a={$pattern:gc,keyword:NC,literal:OC,built_in:BC,"variable.language":FC},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"}},g={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]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});let x=[].concat(v,f.contains),C=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},D={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:{_:[...RC,...PC]}},V={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:[A],illegal:/%/},ze={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function nt(Z){return t.concat("(?!",Z.join("|"),")")}let He={match:t.concat(/\b/,nt([...LC,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},De={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,v,{match:/\$\d+/},d,z,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{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:I,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:C}]}]},{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:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},De,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},He,ze,D,ae,{match:/\$[(.]/}]}}function UC(e){let t=e.regex,n=z5(e),i=gc,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:gc,keyword:NC.concat(l),literal:OC,built_in:BC.concat(r),"variable.language":FC},c={className:"meta",begin:"@"+i},d=(m,g,b)=>{let v=m.contains.findIndex(y=>y.label===g);if(v===-1)throw new Error("can not find mode to replace");m.contains.splice(v,1,b)};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 r0(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 bc(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},g=[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],b=[...g];return b.pop(),b.push(a),p.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}ot.registerLanguage("bash",bC);ot.registerLanguage("css",vC);ot.registerLanguage("go",yC);ot.registerLanguage("java",wC);ot.registerLanguage("javascript",CC);ot.registerLanguage("json",TC);ot.registerLanguage("markdown",IC);ot.registerLanguage("python",AC);ot.registerLanguage("ruby",MC);ot.registerLanguage("rust",zC);ot.registerLanguage("sql",DC);ot.registerLanguage("typescript",UC);ot.registerLanguage("xml",r0);ot.registerLanguage("html",r0);ot.registerLanguage("yaml",bc);ot.registerLanguage("toml",bc);ot.registerLanguage("ini",bc);function $t(e){return gn(e)}function vc(e,t){let n=(t||"").toLowerCase();if(!n||n==="text")return $t(e);try{return ot.getLanguage(n)?ot.highlight(e,{language:n,ignoreIllegals:!0}).value:ot.highlightAuto(e).value}catch{return $t(e)}}function tt(e){return e.replace(/^\[Reading [^\]]+\]\r?\n(?:\r?\n)?/,"")}function Gt(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 yc(e){return e.availableDisplayModes?.includes("fullscreen")?{canFullscreen:!0}:{canFullscreen:!1,reason:"Fullscreen editing is unavailable in this host."}}function jC(e){return Gt(e)?.isPartial===!0}function Dr(e){return typeof e=="object"&&e!==null}function Ht(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 kc(e){return Dr(e)?typeof e.fileName=="string"&&typeof e.filePath=="string"&&typeof e.fileType=="string":!1}function i0(e,t){return{...e,content:t}}function Xt(e){if(!Dr(e))return;let t=e.content;if(Array.isArray(t)){for(let n of t)if(Dr(n)&&n.type==="text"&&typeof n.text=="string"&&n.text.trim().length>0)return n.text}}function D5(e){if(!Dr(e))return;let t=e.content;if(!Array.isArray(t))return;let n=[];for(let i of t)Dr(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 xc(e){if(!Dr(e))return;let t=kc(e.structuredContent)?e.structuredContent:kc(e)?e:null;if(t)return i0(t,D5(e)??"")}function ZC(e){if(!Dr(e))throw new Error("edit_block did not return a valid result.");if(e.isError===!0){let t=Xt(e)??"";throw new Error(t||"edit_block failed.")}if(!Dr(e.structuredContent)){let t=Xt(e)??"";throw new Error(t||"edit_block did not confirm success.")}}function Nr(e){return/^https?:\/\//i.test(e)}function HC(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).map(i=>$t(i)).join(' <span class="breadcrumb-sep">\u203A</span> ')}function o0(e){let t=tt(e);if(t==="")return 0;let n=t.split(`
`);return n[n.length-1]===""?n.length-1:n.length}function s0(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():"",g=h>=0?p.slice(h+1).trim():p,b=m.replace(/\\/g,"/").split("/").filter(Boolean);r.push({name:m,fullPath:m,isDir:!1,isDenied:!1,isNotFound:!1,isWarning:!0,warningText:g,depth:b.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 qC=0;function a0(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-${qC++}`,s=`${t}/${r.relativePath.replace(/\\/g,"/")}`,a=$t(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">${$t(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">${$t(r.name)}</span></div>`;if(r.isNotFound)return`<div class="dir-entry"><span class="dir-icon">\u2753</span> <span class="dir-name-denied">${$t(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">${$t(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">${$t(r.name)}</span></div></div>`}).join("")}return`<div class="dir-tree">${n(e)}</div>`}function WC(e,t){qC=0;let{hint:n,entries:i}=s0(e);return{notice:n||void 0,html:`<div class="panel-content directory-content">${a0(i,t)}</div>`}}function VC(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=Xt(l)??"";if(u){let c=s0(u),d=a0(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=Xt(c)??"";if(d){o.dataset.loaded="true";let f=s0(d),p=a0(f.entries,s),h=document.createElement("div");h.className="dir-children",h.id=`${a}-ch`;let m=document.createElement("div");m.innerHTML=p;let g=m.querySelector(".dir-tree");h.innerHTML=g?g.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=Xt(a)??"";e.onOpenPayload(i0(l,u))}}catch{o.classList.remove("dir-loading")}}}})}var KC=Object.defineProperty,l0=(e,t)=>{let n={};for(var i in e)KC(n,i,{get:e[i],enumerable:!0});return t||KC(n,Symbol.toStringTag,{value:"Module"}),n};function Rt(e){this.content=e}Rt.prototype={constructor:Rt,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 Rt(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 Rt(n)},addToStart:function(e,t){return new Rt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Rt(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 Rt(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=Rt.from(e),e.size?new Rt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Rt.from(e),e.size?new Rt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Rt.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}};Rt.from=function(e){if(e instanceof Rt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Rt(t)};var u0=Rt;function oT(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){let s=r.text,a=o.text,l=0;for(;s[l]==a[l];l++)n++;return l&&l<s.length&&l<a.length&&lT(s.charCodeAt(l-1))&&aT(s.charCodeAt(l))&&n--,n}if(r.content.size||o.content.size){let s=oT(r.content,o.content,n+1);if(s!=null)return s}n+=r.nodeSize}}function sT(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=s.text,c=a.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&lT(u.charCodeAt(d-1))&&aT(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(s.content.size||a.content.size){let u=sT(s.content,a.content,n-1,i-1);if(u)return u}n-=l,i-=l}}function aT(e){return e>=56320&&e<57344}function lT(e){return e>=55296&&e<56320}var M=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 oT(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return sT(this,t,n,i)}findIndex(t){if(t==0)return wc(0,t);if(t==this.size)return wc(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?wc(n+1,o):wc(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 e.fromArray(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)":""))}};M.empty=new M([],0);var c0={index:0,offset:0};function wc(e,t){return c0.index=e,c0.offset=t,c0}function Ec(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(!Ec(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!Ec(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}var xe=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&&Ec(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`);return i.create(n.attrs)}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}};xe.none=[];var Or=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=cT(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new e(i,this.openStart,this.openEnd)}removeBetween(t,n){return new e(uT(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(M.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(M.empty,0,0);function uT(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(uT(o.content,t-r-1,n-r-1)))}function cT(e,t,n,i,r,o){let{index:s,offset:a}=e.findIndex(t),l=e.maybeChild(s);if(a==t||l.isText)return o&&i<=0&&r<=0&&!o.canReplace(s,s,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=cT(l.content,t-a-1,n,s==0?i-1:0,s==e.childCount-1?r-1:0,l);return u&&e.replaceChild(s,l.copy(u))}function N5(e,t,n){if(n.openStart>e.depth)throw new Or("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Or("Inconsistent open depths");return dT(e,t,n,0)}function dT(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=dT(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 hi(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=O5(n,e);return hi(o,pT(e,s,a,t,i))}else return hi(o,$c(e,t,i))}function fT(e,t){if(!t.type.compatibleContent(e.type))throw new Or("Cannot join "+t.type.name+" onto "+e.type.name)}function d0(e,t,n){let i=e.node(n);return fT(i,t.node(n)),i}function pi(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 ga(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&&(pi(e.nodeAfter,i),o++));for(let a=o;a<s;a++)pi(r.child(a),i);t&&t.depth==n&&t.textOffset&&pi(t.nodeBefore,i)}function hi(e,t){if(!e.type.validContent(t))throw new Or("Invalid content for node "+e.type.name);return e.copy(t)}function pT(e,t,n,i,r){let o=e.depth>r&&d0(e,t,r+1),s=i.depth>r&&d0(n,i,r+1),a=[];return ga(null,e,r,a),o&&s&&t.index(r)==n.index(r)?(fT(o,s),pi(hi(o,pT(e,t,n,i,r+1)),a)):(o&&pi(hi(o,$c(e,t,r+1)),a),ga(t,n,r,a),s&&pi(hi(s,$c(n,i,r+1)),a)),ga(i,null,r,a),new M(a)}function $c(e,t,n){let i=[];if(ga(null,e,n,i),e.depth>n){let r=d0(e,t,n+1);pi(hi(r,$c(e,t,n+1)),i)}return ga(t,null,n,i),new M(i)}function O5(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(M.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Cc=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 xe.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 mi(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=JC.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 JC.set(t,i=new f0);let r=i.elts[i.i]=e.resolve(t,n);return i.i=(i.i+1)%R5,r}},f0=class{constructor(){this.elts=[],this.i=0}},R5=12,JC=new WeakMap,mi=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)}},P5=Object.create(null),Cn=class e{constructor(t,n,i,r=xe.none){this.type=t,this.attrs=n,this.marks=r,this.content=i||M.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&&Ec(this.attrs,n||t.defaultAttrs||P5)&&xe.sameSet(this.marks,i||xe.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 N5(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 Cc.resolveCached(this,t)}resolveNoCache(t){return Cc.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()+")"),hT(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=M.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),GC(this.type.attrs,this.attrs,"node",this.type.name);let t=xe.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];GC(i.type.attrs,i.attrs,"mark",i.type.name),t=i.addToSet(t)}if(!xe.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=M.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,r,i)}};Cn.prototype.text=void 0;var p0=class e extends Cn{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):hT(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 hT(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}function GC(e,t,n,i){for(let r in t)if(!(r in e))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${i}`);for(let r in e)e[r].validate&&e[r].validate(t[r])}var gi=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new h0(t,n);if(i.next==null)return e.empty;let r=mT(i);i.next&&i.err("Unexpected trailing text");let o=H5(Z5(r));return q5(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 M.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(`
`)}};gi.empty=new gi(!0);var h0=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 mT(e){let t=[];do t.push(L5(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function L5(e){let t=[];do t.push(F5(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function F5(e){let t=j5(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=B5(e,t);else break;return t}function XC(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function B5(e,t){let n=XC(e),i=n;return e.eat(",")&&(e.next!="}"?i=XC(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function U5(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 j5(e){if(e.eat("(")){let t=mT(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=U5(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 Z5(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 gT(e,t){return t-e}function YC(e,t){let n=[];return i(t),n.sort(gT);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 H5(e){let t=Object.create(null);return n(YC(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]);YC(e,l).forEach(c=>{u||r.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new gi(i.indexOf(e.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(gT);o.next.push({type:r[s][0],next:t[a.join(",")]||n(a)})}return o}}function q5(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 bT(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 vT(e,t){let n=Object.create(null);for(let i in e){let r=e[i],o=t&&t[i];if(o===void 0)if(r.hasDefault)o=r.default;else throw new RangeError("No value supplied for attribute "+i);else r.validate&&r.validate(o);n[i]=o}return n}function yT(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new m0(e,i,t[i]);return n}var Tc=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=yT(t,i.attrs),this.defaultAttrs=bT(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==gi.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:vT(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Cn(this,this.computeAttrs(t),M.from(n),xe.setFrom(i))}createChecked(t=null,n,i){return n=M.from(n),this.checkContent(n),new Cn(this,this.computeAttrs(t),n,xe.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=M.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(M.empty,!0);return o?new Cn(this,t,n.append(o),xe.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){}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:xe.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 W5(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 m0=class{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?W5(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}},va=class e{constructor(t,n,i,r){this.name=t,this.rank=n,this.schema=i,this.spec=r,this.attrs=yT(t,r.attrs),this.excluded=null;let o=bT(this.attrs);this.instance=o?new xe(this,o):null}create(t=null){return!t&&this.instance?this.instance:new xe(this,vT(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]}excludes(t){return this.excluded.indexOf(t)>-1}},bi=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=u0.from(t.nodes),n.marks=u0.from(t.marks||{}),this.nodes=Tc.compile(this.spec.nodes,this),this.marks=va.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]=gi.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?QC(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==""?[]:QC(this,s.split(" "))}this.nodeFromJSON=r=>Cn.fromJSON(this,r),this.markFromJSON=r=>xe.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 Tc){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 p0(i,i.defaultAttrs,t,xe.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 QC(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 V5(e){return e.tag!=null}function K5(e){return e.style!=null}var Tn=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(r=>{if(V5(r))this.tags.push(r);else if(K5(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 Ic(this,n,!1);return i.addAll(t,xe.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new Ic(this,n,!0);return i.addAll(t,xe.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(X5(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=tT(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=tT(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)))}},kT={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},J5={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},xT={ol:!0,ul:!0},ya=1,g0=2,ba=4;function eT(e,t,n){return t!=null?(t?ya:0)|(t==="full"?g0:0):e&&e.whitespace=="pre"?ya|g0:n&~ba}var xo=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=xe.none,this.match=o||(s&ba?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(M.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&ya)){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=M.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(M.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&&!kT.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Ic=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=eT(null,n.preserveWhitespace,0)|(i?ba:0);r?o=new xo(r.type,r.attrs,xe.none,!0,n.topMatch||r.type.contentMatch,s):i?o=new xo(null,null,xe.none,!0,null,s):o=new xo(t.schema.topNodeType,null,xe.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&g0?"full":this.localPreserveWS||(r.options&ya)>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;xT.hasOwnProperty(s)&&this.parser.normalizeLists&&G5(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,i));e:if(l?l.ignore:J5.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(kT.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=xe.none;for(let a of r.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):nT(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=eT(t,o,s.options);s.options&ba&&s.content.length==0&&(a|=ba);let l=xe.none;return i=i.filter(u=>(s.type?s.type.allowsMarkType(u.type):nT(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new xo(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|=ya)}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 G5(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&xT.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function X5(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function tT(e){let t={};for(let n in e)t[n]=e[n];return t}function nT(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 or=class e{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},i){i||(i=_c(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){if(t.isText)return _c(n).createTextNode(t.text);let{dom:i,contentDOM:r}=Sc(_c(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&&Sc(_c(i),r(t,n),null,t.attrs)}static renderSpec(t,n,i=null,r){return typeof n=="string"?{dom:t.createTextNode(n)}:Sc(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=rT(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return rT(t.marks)}};function rT(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function _c(e){return e.document||window.document}var iT=new WeakMap;function Y5(e){let t=iT.get(e);return t===void 0&&iT.set(e,t=Q5(e)),t}function Q5(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 Sc(e,t,n,i){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let r=t[0],o;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=Y5(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 if(typeof f=="string")l.appendChild(e.createTextNode(f));else{let{dom:p,contentDOM:h}=Sc(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 ST=65535,ET=Math.pow(2,16);function eF(e,t){return e+t*ET}function wT(e){return e&ST}function tF(e){return(e-(e&ST))/ET}var $T=1,CT=2,Ac=4,TT=8,wa=class{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&TT)>0}get deletedBefore(){return(this.delInfo&($T|Ac))>0}get deletedAfter(){return(this.delInfo&(CT|Ac))>0}get deletedAcross(){return(this.delInfo&Ac)>0}},sr=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=wT(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+tF(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:eF(a/3,t-l),m=t==l?CT:t==d?$T:Ac;return(n<0?t!=l:t!=d)&&(m|=TT),new wa(p,m,h)}r+=c-u}return i?t+r:new wa(t+r,0,null)}touches(t,n){let i=0,r=wT(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])}};sr.empty=new sr([]);var _a=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 wa(t,r,null)}},b0=Object.create(null),vt=class{getMap(){return sr.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=b0[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 b0)throw new RangeError("Duplicate use of step JSON ID "+t);return b0[t]=n,n.prototype.jsonID=t,n}},Ct=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 Or)return e.fail(o.message);throw o}}};function w0(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(w0(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return M.fromArray(i)}var Sa=class e extends vt{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(w0(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 Ct.fromReplace(t,this.from,this.to,o)}invert(){return new ar(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))}};vt.jsonID("addMark",Sa);var ar=class e extends vt{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(w0(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return Ct.fromReplace(t,this.from,this.to,i)}invert(){return new Sa(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))}};vt.jsonID("removeMark",ar);var Ea=class e extends vt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ct.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ct.fromReplace(t,this.pos,this.pos+1,new B(M.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 wo(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))}};vt.jsonID("addNodeMark",Ea);var wo=class e extends vt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ct.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ct.fromReplace(t,this.pos,this.pos+1,new B(M.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Ea(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))}};vt.jsonID("removeNodeMark",wo);var lt=class e extends vt{constructor(t,n,i,r=!1){super(),this.from=t,this.to=n,this.slice=i,this.structure=r}apply(t){return this.structure&&k0(t,this.from,this.to)?Ct.fail("Structure replace would overwrite content"):Ct.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new sr([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)}};lt.MAP_BIAS=1;vt.jsonID("replace",lt);var ut=class e extends vt{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&&(k0(t,this.from,this.gapFrom)||k0(t,this.gapTo,this.to)))return Ct.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ct.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Ct.fromReplace(t,this.from,this.to,i):Ct.fail("Content does not fit in gap")}getMap(){return new sr([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)}};vt.jsonID("replaceAround",ut);function k0(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 nF(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 ar(f,p,d[m])));a&&a.to==f?a.to=p:o.push(a=new Sa(f,p,i))}}),r.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function rF(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 va){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 ar(s.from,s.to,s.style)))}function _0(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 lt(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 ar(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(M.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new lt(a+f.index,a+f.index+f[0].length,h))}}a=c}if(!i.validEnd){let l=i.fillBefore(M.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 iF(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function lr(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||!iF(s,a,l))break;a&&(r=1),l<s.childCount&&(o=1)}return null}function oF(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=M.empty,d=0;for(let h=o,m=!1;h>n;h--)m||i.index(h)>0?(m=!0,c=M.from(i.node(h).copy(c)),d++):l--;let f=M.empty,p=0;for(let h=o,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=M.from(r.node(h).copy(f)),p++):u++;e.step(new ut(l,u,s,a,new B(c.append(f),d,p),c.size-d,!0))}function So(e,t,n=null,i=e){let r=sF(e,t),o=r&&aF(i,t);return o?r.map(_T).concat({type:t,attrs:n}).concat(o.map(_T)):null}function _T(e){return{type:e,attrs:null}}function sF(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 aF(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 lF(e,t,n){let i=M.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=M.from(n[s].type.create(n[s].attrs,i))}let r=t.start,o=t.end;e.step(new ut(r,o,r,o,new B(i,0,0),n.length,!0))}function uF(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)&&cF(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&&AT(e,s,a,o),_0(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 ut(d,f,d+1,f-1,new B(M.from(i.create(l,null,s.marks)),0,0),1,!0)),u===!0&&IT(e,s,a,o),!1}})}function IT(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 AT(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 cF(e,t,n){let i=e.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,n)}function dF(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 ut(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new B(M.from(s),0,0),1,!0))}function bn(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 fF(e,t,n=1,i){let r=e.doc.resolve(t),o=M.empty,s=M.empty;for(let a=r.depth,l=r.depth-n,u=n-1;a>l;a--,u--){o=M.from(r.node(a).copy(o));let c=i&&i[u];s=M.from(c?c.type.create(c.attrs,s):r.node(a).copy(s))}e.step(new lt(t,t,new B(o.append(s),n,n),!0))}function In(e,t){let n=e.resolve(t),i=n.index();return MT(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function pF(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 MT(e,t){return!!(e&&t&&!e.isLeaf&&pF(e,t))}function Eo(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&&MT(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 hF(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);AT(e,c.node(),c.before(),a)}s.inlineContent&&_0(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 lt(u,l.map(t+n,-1),B.empty,!0)),i===!0){let c=e.doc.resolve(u);IT(e,c.node(),c.before(),e.steps.length)}return e}function mF(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 Dc(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 $a(e,t,n=t,i=B.empty){if(t==n&&!i.size)return null;let r=e.resolve(t),o=e.resolve(n);return zT(r,o,i)?new lt(t,n,i):new x0(r,o,i).fit()}function zT(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var x0=class{constructor(t,n,i){this.$from=t,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=M.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=M.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 ut(i.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new lt(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=v0(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(M.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=v0(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=v0(t,n);if(r.childCount<=1&&n>0){let o=t.size-n<=n+r.size;this.unplaced=new B(ka(t,n-1,1),n-1,o?n-1:i)}else this.unplaced=new B(ka(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),g=d.matchType(m.type);if(!g)break;u++,(u>1||l==0||m.content.size)&&(d=g,c.push(DT(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=xa(this.placed,n,M.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,g=a;m<p;m++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=h?t==0?B.empty:new B(ka(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new B(ka(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||!y0(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=y0(t,n,r,i,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=y0(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=xa(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=xa(this.placed,this.depth,M.from(t.create(n,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(M.empty,!0);n.childCount&&(this.placed=xa(this.placed,this.frontier.length,n))}};function ka(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ka(e.firstChild.content,t-1,n)))}function xa(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(xa(e.lastChild.content,t-1,n)))}function v0(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function DT(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,DT(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(M.empty,!0)))),e.copy(i)}function y0(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&&!gF(n,o.content,s)?a:null}function gF(e,t,n){for(let i=n;i<t.childCount;i++)if(!e.allowsMarks(t.child(i).marks))return!0;return!1}function bF(e){return e.spec.defining||e.spec.definingForContent}function vF(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),o=e.doc.resolve(n);if(zT(r,o,i))return e.step(new lt(t,n,i));let s=OT(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=bF(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 g=s[(m+l)%s.length],b=!0;g<0&&(b=!1,g=-g);let v=r.node(g-1),y=r.index(g-1);if(v.canReplaceWith(y,y,h.type,h.marks))return e.replace(r.before(g),b?o.after(g):n,new B(NT(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 NT(e,t,n,i,r){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(NT(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(M.empty,!0))}return e}function yF(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=mF(e.doc,t,i.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new B(M.from(i),0,0))}function kF(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=OT(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 OT(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 Mc=class e extends vt{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 Ct.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 Ct.fromReplace(t,this.pos,this.pos+1,new B(M.from(r),0,n.isLeaf?0:1))}getMap(){return sr.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)}};vt.jsonID("attr",Mc);var zc=class e extends vt{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 Ct.ok(i)}getMap(){return sr.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)}};vt.jsonID("docAttr",zc);var _o=class extends Error{};_o=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};_o.prototype=Object.create(Error.prototype);_o.prototype.constructor=_o;_o.prototype.name="TransformError";var Rr=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new _a}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new _o(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=$a(this.doc,t,n,i);return r&&this.step(r),this}replaceWith(t,n,i){return this.replace(t,n,new B(M.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 vF(this,t,n,i),this}replaceRangeWith(t,n,i){return yF(this,t,n,i),this}deleteRange(t,n){return kF(this,t,n),this}lift(t,n){return oF(this,t,n),this}join(t,n=1){return hF(this,t,n),this}wrap(t,n){return lF(this,t,n),this}setBlockType(t,n=t,i,r=null){return uF(this,t,n,i,r),this}setNodeMarkup(t,n,i=null,r){return dF(this,t,n,i,r),this}setNodeAttribute(t,n,i){return this.step(new Mc(t,n,i)),this}setDocAttribute(t,n){return this.step(new zc(t,n)),this}addNodeMark(t,n){return this.step(new Ea(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 xe)n.isInSet(i.marks)&&this.step(new wo(t,n));else{let r=i.marks,o,s=[];for(;o=n.isInSet(r);)s.push(new wo(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 fF(this,t,n,i),this}addMark(t,n,i){return nF(this,t,n,i),this}removeMark(t,n,i){return rF(this,t,n,i),this}clearIncompatible(t,n,i){return _0(this,t,n,i),this}};var S0=Object.create(null),G=class{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new Co(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&&LT(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),LT(t,i,n.isInline?-1:1))}}static findFrom(t,n,i=!1){let r=t.parent.inlineContent?new q(t):$o(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?$o(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):$o(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 qt(t.node(0))}static atStart(t){return $o(t,t,0,0,1)||new qt(t)}static atEnd(t){return $o(t,t,t.content.size,t.childCount,-1)||new qt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=S0[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 S0)throw new RangeError("Duplicate use of selection JSON ID "+t);return S0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return q.between(this.$anchor,this.$head).getBookmark()}};G.prototype.visible=!0;var Co=class{constructor(t,n){this.$from=t,this.$to=n}},RT=!1;function PT(e){!RT&&!e.parent.inlineContent&&(RT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var q=class e extends G{constructor(t,n=t){PT(t),PT(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 Oc(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",q);var Oc=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 q.between(t.resolve(this.anchor),t.resolve(this.head))}},X=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(M.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 $0(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}};X.prototype.visible=!1;G.jsonID("node",X);var $0=class e{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:i}=t.mapResult(this.anchor);return n?new Oc(i,i):new e(i)}resolve(t){let n=t.resolve(this.anchor),i=n.nodeAfter;return i&&X.isSelectable(i)?new X(n):G.near(n)}},qt=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 xF}};G.jsonID("all",qt);var xF={map(){return this},resolve(e){return new qt(e)}};function $o(e,t,n,i,r,o=!1){if(t.inlineContent)return q.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&&X.isSelectable(a))return X.create(e,n-(r<0?a.nodeSize:0))}else{let l=$o(e,a,n+r,r<0?a.childCount:0,r,o);if(l)return l}n+=a.nodeSize*r}return null}function LT(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof lt||r instanceof ut))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 FT=1,Nc=2,BT=4,C0=class extends Rr{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|FT)&~Nc,this.storedMarks=null,this}get selectionSet(){return(this.updated&FT)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Nc,this}ensureMarks(t){return xe.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&Nc)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Nc,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)||xe.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|=BT,this}get scrolledIntoView(){return(this.updated&BT)>0}};function UT(e,t){return!t||!e?e:e.bind(t)}var vi=class{constructor(t,n,i){this.name=t,this.init=UT(n.init,i),this.apply=UT(n.apply,i)}},wF=[new vi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new vi("selection",{init(e,t){return e.selection||G.atStart(t.doc)},apply(e){return e.selection}}),new vi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new vi("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=wF.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 vi(i.key,i.spec.state,i))})}},yi=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 C0(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=Cn.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 jT(e,t,n){for(let i in e){let r=e[i];r instanceof Function?r=r.bind(t):i=="handleDOMEvents"&&(r=jT(r,t,{})),n[i]=r}return n}var fe=class{constructor(t){this.spec=t,this.props={},t.props&&jT(t.props,this,this.props),this.key=t.key?t.key.key:ZT("plugin")}getState(t){return t[this.key]}},E0=Object.create(null);function ZT(e){return e in E0?e+"$"+ ++E0[e]:(E0[e]=0,e+"$")}var _e=class{constructor(t="key"){this.key=ZT(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var qT=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function WT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var I0=(e,t,n)=>{let i=WT(e,n);if(!i)return!1;let r=M0(i);if(!r){let s=i.blockRange(),a=s&&lr(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(tI(e,r,t,-1))return!0;if(i.parent.content.size==0&&(To(o,"end")||X.isSelectable(o)))for(let s=i.depth;;s--){let a=$a(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(To(o,"end")?G.findFrom(l.doc.resolve(l.mapping.map(r.pos,-1)),-1):X.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},VT=(e,t,n)=>{let i=WT(e,n);if(!i)return!1;let r=M0(i);return r?JT(e,r,t):!1},KT=(e,t,n)=>{let i=GT(e,n);if(!i)return!1;let r=N0(i);return r?JT(e,r,t):!1};function JT(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=$a(e.doc,o,l,B.empty);if(!u||u.from!=o||u instanceof lt&&u.slice.size>=l-o)return!1;if(n){let c=e.tr.step(u);c.setSelection(q.create(c.doc,o)),n(c.scrollIntoView())}return!0}function To(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 A0=(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=M0(i)}let s=o&&o.nodeBefore;return!s||!X.isSelectable(s)?!1:(t&&t(e.tr.setSelection(X.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function M0(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 GT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}var z0=(e,t,n)=>{let i=GT(e,n);if(!i)return!1;let r=N0(i);if(!r)return!1;let o=r.nodeAfter;if(tI(e,r,t,1))return!0;if(i.parent.content.size==0&&(To(o,"start")||X.isSelectable(o))){let s=$a(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(To(o,"start")?G.findFrom(a.doc.resolve(a.mapping.map(r.pos)),1):X.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},D0=(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=N0(i)}let s=o&&o.nodeAfter;return!s||!X.isSelectable(s)?!1:(t&&t(e.tr.setSelection(X.create(e.doc,o.pos)).scrollIntoView()),!0)};function N0(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 XT=(e,t)=>{let n=e.selection,i=n instanceof X,r;if(i){if(n.node.isTextblock||!In(e.doc,n.from))return!1;r=n.from}else if(r=Eo(e.doc,n.from,-1),r==null)return!1;if(t){let o=e.tr.join(r);i&&o.setSelection(X.create(o.doc,r-e.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},YT=(e,t)=>{let n=e.selection,i;if(n instanceof X){if(n.node.isTextblock||!In(e.doc,n.to))return!1;i=n.to}else if(i=Eo(e.doc,n.to,1),i==null)return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},QT=(e,t)=>{let{$from:n,$to:i}=e.selection,r=n.blockRange(i),o=r&&lr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},O0=(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 R0(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 P0=(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=R0(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},L0=(e,t)=>{let n=e.selection,{$from:i,$to:r}=n;if(n instanceof qt||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=R0(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(q.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},F0=(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(bn(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),r=i&&lr(i);return r==null?!1:(t&&t(e.tr.lift(i,r).scrollIntoView()),!0)};function _F(e){return(t,n)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof X&&t.selection.node.isBlock)return!i.parentOffset||!bn(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=R0(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 q||t.selection instanceof qt)&&c.deleteSelection();let d=c.mapping.map(i.pos),f=bn(c.doc,d,o.length,o);if(f||(o[0]=a?{type:a}:null,f=bn(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 SF=_F();var eI=(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(X.create(e.doc,r))),!0)},EF=(e,t)=>(t&&t(e.tr.setSelection(new qt(e.doc))),!0);function $F(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||In(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function tI(e,t,n,i){let r=t.nodeBefore,o=t.nodeAfter,s,a,l=r.type.spec.isolating||o.type.spec.isolating;if(!l&&$F(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=M.empty;for(let b=s.length-1;b>=0;b--)h=M.from(s[b].create(null,h));h=M.from(r.copy(h));let m=e.tr.step(new ut(t.pos-1,p,t.pos,p,new B(h,1,0),s.length,!0)),g=m.doc.resolve(p+2*s.length);g.nodeAfter&&g.nodeAfter.type==r.type&&In(m.doc,g.pos)&&m.join(g.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&&lr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&To(o,"start",!0)&&To(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=o,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let b=M.empty;for(let y=h.length-1;y>=0;y--)b=M.from(h[y].copy(b));let v=e.tr.step(new ut(t.pos-h.length,t.pos+o.nodeSize,t.pos+g,t.pos+o.nodeSize-g,new B(b,h.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function nI(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(q.create(t.doc,e<0?r.start(o):r.end(o)))),!0):!1}}var B0=nI(-1),U0=nI(1);function rI(e,t=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o),a=s&&So(s,e,t);return a?(i&&i(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function j0(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 Z0(...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 T0=Z0(qT,I0,A0),HT=Z0(qT,z0,D0),Pr={Enter:Z0(O0,L0,F0,SF),"Mod-Enter":P0,Backspace:T0,"Mod-Backspace":T0,"Shift-Backspace":T0,Delete:HT,"Mod-Delete":HT,"Mod-a":EF},CF={"Ctrl-h":Pr.Backspace,"Alt-Backspace":Pr["Mod-Backspace"],"Ctrl-d":Pr.Delete,"Ctrl-Alt-Backspace":Pr["Mod-Delete"],"Alt-Delete":Pr["Mod-Delete"],"Alt-d":Pr["Mod-Delete"],"Ctrl-a":B0,"Ctrl-e":U0};for(let e in Pr)CF[e]=Pr[e];var Une=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1;function iI(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 TF(a,s,e,t)?(i&&i(a.scrollIntoView()),!0):!1}}function TF(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 mi(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new mi(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),r=!0}let a=So(o,n,i,t);return a?(e&&IF(e,t,a,r,n),!0):!1}function IF(e,t,n,i,r){let o=M.empty;for(let c=n.length-1;c>=0;c--)o=M.from(n[c].type.create(n[c].attrs,o));e.step(new ut(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&&bn(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return e}function oI(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?AF(t,n,e,o):MF(t,n,o):!0:!1}}function AF(e,t,n,i){let r=e.tr,o=i.end,s=i.$to.end(i.depth);o<s&&(r.step(new ut(o-1,s,o,s,new B(M.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new mi(r.doc.resolve(i.$from.pos),r.doc.resolve(s),i.depth));let a=lr(i);if(a==null)return!1;r.lift(i,a);let l=r.doc.resolve(r.mapping.map(o,-1)-1);return In(r.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&r.join(l.pos),t(r.scrollIntoView()),!0}function MF(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?M.empty:M.from(r))))return!1;let d=o.pos,f=d+s.nodeSize;return i.step(new ut(d-(a?1:0),f+(l?1:0),d+1,f-1,new B((a?M.empty:M.from(r.copy(M.empty))).append(l?M.empty:M.from(r.copy(M.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}function sI(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=M.from(u?e.create():null),d=new B(M.from(e.create(null,M.from(a.type.create(null,c)))),u?3:1,0),f=o.start,p=o.end;n(t.tr.step(new ut(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var Tt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},zo=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},K0=null,cr=function(e,t,n){let i=K0||(K0=document.createRange());return i.setEnd(e,n??e.nodeValue.length),i.setStart(e,t||0),i},zF=function(){K0=null},Ci=function(e,t,n,i){return n&&(aI(e,t,n,i,-1)||aI(e,t,n,i,1))},DF=/^(img|br|input|textarea|hr)$/i;function aI(e,t,n,i,r){for(var o;;){if(e==n&&t==i)return!0;if(t==(r<0?0:Lt(e))){let s=e.parentNode;if(!s||!Y(s)||Ra(e)||DF.test(e.nodeName)||e.contentEditable=="false")return!1;t=Tt(e)+(r<0?0:1),e=s}else if(Y(e)){let s=e.childNodes[t+(r<0?-1:0)];if(Y(s)&&s.contentEditable=="false")if(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)t+=r;else return!1;else e=s,t=r<0?Lt(e):0}else return!1}}function Lt(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Y(e){return e.nodeType==1}function mt(e){return e.nodeType==3}function Ti(e,t){return t?e.contains(Y(t)?t:t.parentNode):!1}function NF(e,t){for(;;){if(mt(e)&&t)return e;if(Y(e)&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Lt(e)}else if(e.parentNode&&!Ra(e))t=Tt(e),e=e.parentNode;else return null}}function OF(e,t){for(;;){if(mt(e)&&t<e.nodeValue.length)return e;if(Y(e)&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Ra(e))t=Tt(e)+1,e=e.parentNode;else return null}}function RF(e,t,n){for(let i=t==0,r=t==Lt(e);i||r;){if(e==n)return!0;let o=Tt(e);if(e=e.parentNode,!e)return!1;i=i&&o==0,r=r&&o==Lt(e)}}function Ra(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 Wc=function(e){return e.focusNode&&Ci(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function ki(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function PF(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function LF(e,t,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(t,n);if(i)return{node:i.offsetNode,offset:Math.min(Lt(i.offsetNode),i.offset)}}catch{}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(t,n);if(i)return{node:i.startContainer,offset:Math.min(Lt(i.startContainer),i.startOffset)}}}var Un=typeof navigator<"u"?navigator:null,lI=typeof document<"u"?document:null,jr=Un&&Un.userAgent||"",J0=/Edge\/(\d+)/.exec(jr),PI=/MSIE \d/.exec(jr),G0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jr),Yt=!!(PI||G0||J0),Br=PI?document.documentMode:G0?+G0[1]:J0?+J0[1]:0,rn=!Yt&&/gecko\/(\d+)/i.test(jr);rn&&+(/Firefox\/(\d+)/.exec(jr)||[0,0])[1];var X0=!Yt&&/Chrome\/(\d+)/.exec(jr),It=!!X0,LI=X0?+X0[1]:0,Ft=!Yt&&!!Un&&/Apple Computer/.test(Un.vendor),Do=Ft&&(/Mobile\/\w+/.test(jr)||!!Un&&Un.maxTouchPoints>2),vn=Do||(Un?/Mac/.test(Un.platform):!1),FI=Un?/Win/.test(Un.platform):!1,dr=/Android \d/.test(jr),Vc=!!lI&&"webkitFontSmoothing"in lI.documentElement.style,FF=Vc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function BF(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 ur(e,t){return typeof e=="number"?e:e[t]}function UF(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 uI(e,t,n){if(!Y0(t)&&t.left==0)return;let i=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(!Y(s)){s=zo(s);continue}let a=s==o.body,l=a?BF(o):UF(s),u=0,c=0;if(t.top<l.top+ur(i,"top")?c=-(l.top-t.top+ur(r,"top")):t.bottom>l.bottom-ur(i,"bottom")&&(c=t.bottom-t.top>l.bottom-l.top?t.top+ur(r,"top")-l.top:t.bottom-l.bottom+ur(r,"bottom")),t.left<l.left+ur(i,"left")?u=-(l.left-t.left+ur(r,"left")):t.right>l.right-ur(i,"right")&&(u=t.right-l.right+ur(r,"right")),u||c)if(a)o.defaultView.scrollBy(u,c);else{let f=s.scrollLeft,p=s.scrollTop;c&&(s.scrollTop+=c),u&&(s.scrollLeft+=u);let h=s.scrollLeft-f,m=s.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}let d=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s=d=="absolute"?s.offsetParent:zo(s)}}function jF(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:BI(e.dom)}}function BI(e){let t=[],n=e.ownerDocument;for(let i=e;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),e!=n);i=zo(i));return t}function ZF({refDOM:e,refTop:t,stack:n}){let i=e?e.getBoundingClientRect().top:0;UI(n,i==0?0:i-t)}function UI(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 Io=null;function HF(e){if(e.setActive)return e.setActive();if(Io)return e.focus(Io);let t=BI(e);e.focus(Io==null?{get preventScroll(){return Io={preventScroll:!0},!0}}:void 0),Io||(Io=!1,UI(t,0))}function jI(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(Y(c))f=c.getClientRects();else if(mt(c))f=cr(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&&mt(n)?{left:h.right<t.left?h.right:h.left,top:t.top}:t,Y(c)&&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&&mt(n)?qF(n,r):!n||i?{node:e,offset:o}:jI(n,r)}function qF(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=Lr(i,1);if(s.top!=s.bottom&&hg(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 hg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function WF(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function VF(e,t,n){let{node:i,offset:r}=jI(t,n),o=-1;if(Y(i)&&!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 KF(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(Y(a.dom)&&(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 ZI(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(Y(s)){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(hg(t,u))return ZI(s,t,u)}}if((o=(o+1)%i)==r)break}return e}function JF(e,t){let n=e.dom.ownerDocument,i,r=0,o=LF(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)){let u=e.dom.getBoundingClientRect();if(!hg(t,u)||(s=ZI(e.dom,t,u),!s))return null}if(Ft)for(let u=s;i&&u;u=zo(u))u.draggable&&(i=void 0);if(s=WF(s,t),i){if(rn&&Y(i)&&(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;Vc&&r&&Y(i)&&Y(u=i.childNodes[r-1])&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&r--,i==e.dom&&r==i.childNodes.length-1&&Y(i.lastChild)&&t.top>i.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(r==0||!Y(i)||i.childNodes[r-1].nodeName!="BR")&&(a=KF(e,i,r,t))}a==null&&(a=VF(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Y0(e){return e.top<e.bottom||e.left<e.right}function Lr(e,t){let n=e.getClientRects();if(n.length){let i=n[t<0?0:n.length-1];if(Y0(i))return i}return Array.prototype.find.call(n,Y0)||e.getBoundingClientRect()}var GF=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function HI(e,t,n){let{node:i,offset:r,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Vc||rn;if(mt(i))if(s&&(GF.test(i.nodeValue)||(n<0?!r:r==i.nodeValue.length))){let l=Lr(cr(i,r,r),n);if(rn&&r&&/\s/.test(i.nodeValue[r-1])&&r<i.nodeValue.length){let u=Lr(cr(i,r-1,r-1),-1);if(u.top==l.top){let c=Lr(cr(i,r,r+1),-1);if(c.top!=l.top)return Ta(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++,Ta(Lr(cr(i,l,u),c),c<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&r&&(n<0||r==Lt(i))){let l=i.childNodes[r-1];if(Y(l))return H0(l.getBoundingClientRect(),!1)}if(o==null&&r<Lt(i)){let l=i.childNodes[r];if(Y(l))return H0(l.getBoundingClientRect(),!0)}return H0(i.getBoundingClientRect(),n>=0)}if(o==null&&r&&(n<0||r==Lt(i))){let l=i.childNodes[r-1],u=mt(l)?cr(l,Lt(l)-(s?0:1)):Y(l)&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Ta(Lr(u,1),!1)}if(o==null&&r<Lt(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?mt(l)?cr(l,0,s?0:1):Y(l)?l:null:null;if(u)return Ta(Lr(u,-1),!0)}return Ta(Lr(mt(i)?cr(i):i,-n),n>=0)}function Ta(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 H0(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 qI(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 XF(e,t,n){let i=t.selection,r=n=="up"?i.$from:i.$to;return qI(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=HI(e,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(Y(a))l=a.getClientRects();else if(mt(a))l=cr(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 YF=/[\u0590-\u08ac]/;function QF(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?!YF.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:qI(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(),g=h&&!Ti(p,h)||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),g}):i.pos==i.start()||i.pos==i.end()}var cI=null,dI=null,fI=!1;function eB(e,t,n){return cI==t&&dI==n?fI:(cI=t,dI=n,fI=n=="up"||n=="down"?XF(e,t,n):QF(e,t,n))}var yn=0,pI=1,xi=2,An=3,Ii=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(t){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&&Ti(this.contentDOM,t))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>Tt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=!!(t.compareDocumentPosition(this.contentDOM)&4);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)&&!(Y(s)?Ti(s,t):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){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,n);for(;i>0;i--){let o=this.children[i-1];if(o.size||!(o instanceof Lc||o instanceof Rc&&o.side>=0))break}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?Tt(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?Tt(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=Tt(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=Tt(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(!Y(n)||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],g=h+m.size;if(o>h&&s<g)return m.setSelection(t-h-m.border,n-h-m.border,i,r);h=g}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((rn||Ft)&&t==n){let{node:p,offset:h}=a;if(mt(p)){if(d=!!(h&&p.nodeValue[h-1]==`
`),d&&h==p.nodeValue.length)for(let m=p,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(a=l={node:g.parentNode,offset:Tt(g)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=p.childNodes[h-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(rn&&c.focusNode&&c.focusNode!=l.node&&Y(c.focusNode)){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(r=!0)}if(!(r||d&&Ft)&&Ci(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Ci(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||t==n)&&!(d&&rn)){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?xi:pI,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=An:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?xi:An}i=s}this.dirty=xi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let i=t==1?xi:pI;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},Rc=class extends Ii{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){let a=Y(s)?s:document.createElement("span");a!=s&&a.appendChild(s),a.hasAttribute("contenteditable")||(a.contentEditable="false"),a.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}},Q0=class extends Ii{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}},_i=class e extends Ii{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=or.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&An||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=An&&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=rg(o,n,s,i)),t>0&&(o=rg(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()}},Ur=class e extends Ii{constructor(t,n,i,r,o,s,a){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(!mt(c))throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=or.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=KI(c,i,n),u?l=new eg(t,n,i,r,c,d||null,f,u):n.isText?new Pc(t,n,i,r,c,f):new e(t,n,i,r,c,d||null,f)}parseRule(t){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let i=this.children.length-1;i>=0;i--){let r=this.children[i];if(this.dom.contains(r.dom.parentNode)){n.contentElement=r.dom.parentNode;break}}if(!n.contentElement){let i=t&&t.find(r=>Y(r)&&t.indexOf(r.parentNode)<0&&this.dom.contains(r));i?n.contentElement=i:n.getContent=()=>M.empty}}return n}matchesNode(t,n,i){return this.dirty==yn&&t.eq(this.node)&&Fc(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 ng(this,s&&s.node,t),u=this.node.inlineContent,c=u&&this.node.isBlock;iB(this.node,this.innerDeco,(d,f,p)=>{d.spec.marks?l.syncToMarks(d.spec.marks,i,t,f):d.type.side>=0&&!p&&l.syncToMarks(f==this.node.childCount?xe.none:this.node.child(f).marks,i,t,f),l.placeWidget(d,t,r)},(d,f,p,h)=>{l.syncToMarks(d.marks,i,t,h),c&&d.isAtom&&!d.isText&&l.addHackNode("IMG",l.top);let m;l.findNodeMatch(d,f,p,h)||a&&t.state.selection.from>r&&t.state.selection.to<r+d.nodeSize&&(m=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(d,f,p,m,t)||l.updateNextNode(d,f,p,t,h,r)||l.addNode(d,f,p,t,r),r+=d.nodeSize,u&&(c=d.isAtom&&!d.isText)}),l.syncToMarks([],i,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==xi)&&(s&&this.protectLocalComposition(t,s),WI(this.contentDOM,this.children,t),Do&&oB(this.dom))}localCompositionInfo(t,n){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof q)||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=sB(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 Q0(this,o,n,r);t.input.compositionNodes.push(s),this.children=rg(this.children,i,i+r.length,t,s)}update(t,n,i,r){return this.dirty==An||!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(Fc(t,this.outerDeco))return;let n=!Y(this.nodeDOM),i=this.dom;this.dom=VI(this.dom,this.nodeDOM,tg(this.outerDeco,this.node,n),tg(t,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){Y(this.nodeDOM)&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){Y(this.nodeDOM)&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function hI(e,t,n,i,r){KI(i,t,e);let o=new Ur(void 0,e,t,n,i,i,i);return o.contentDOM&&o.updateChildren(r,0),o}var Pc=class e extends Ur{constructor(t,n,i,r,o,s){super(t,n,i,r,o,null,s)}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==An||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)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=An)}get domAtom(){return!1}isText(t){return this.node.text==t}},Lc=class extends Ii{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"}},eg=class extends Ur{constructor(t,n,i,r,o,s,a,l){super(t,n,i,r,o,s,a),this.spec=l}update(t,n,i,r){if(this.dirty==An)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 WI(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=mI(i),r=!0;i=i.nextSibling}else r=!0,e.insertBefore(a,i);if(s instanceof _i){let l=i?i.previousSibling:e.lastChild;WI(s.contentDOM,s.children,n),i=l?l.nextSibling:e.firstChild}}for(;i;)i=mI(i),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}var Aa=function(e){e&&(this.nodeName=e)};Aa.prototype=Object.create(null);var wi=[new Aa];function tg(e,t,n){if(e.length==0)return wi;let i=n?wi[0]:new Aa,r=[i];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&r.push(i=new Aa(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&r.length==1&&r.push(i=new Aa(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 VI(e,t,n,i){if(n==wi&&i==wi)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=wi[0]),r=l}tB(r,a||wi[0],s)}return r}function tB(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 KI(e,t,n){return VI(e,e,wi,tg(t,n,!Y(e)))}function Fc(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 mI(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var ng=class{constructor(t,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=nB(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<0&&this.index<this.top.children.length){let c=this.top.children[this.index];c instanceof _i&&c.dirty!=An&&c.mark.type==t[s].type&&c.spec.update&&!this.isLocked(c.dom)&&c.spec.update(t[s])&&(c.mark=t[s],l=this.index,this.changed=!0)}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=_i.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==An&&s.dom==s.contentDOM&&(s.dirty=xi),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 Ur){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!=An&&Fc(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=xi,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)||!Fc(i,t.outerDeco)||!r.eq(t.innerDeco))return null;let a=Ur.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=Ur.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 Rc(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 _i;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Pc)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Ft||It)&&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 Lc(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||Y(t)&&t.contains(this.lock.parentNode))}};function nB(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 _i)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 rB(e,t){return e.type.side-t.type.side}function iB(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 g=r[s++];g.widget&&(c?(d||(d=[c])).push(g):c=g)}if(c)if(d){d.sort(rB);for(let g=0;g<d.length;g++)n(d[g],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 g=0;g<a.length;g++)a[g].to<=o&&a.splice(g--,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 g=h;s<r.length&&r[s].from<g&&(g=r[s].from);for(let b=0;b<a.length;b++)a[b].to<g&&(g=a[b].to);g<h&&(l=f.cut(g-o),f=f.cut(0,g-o),h=g,p=-1)}else for(;s<r.length&&r[s].to<h;)s++;let m=f.isInline&&!f.isLeaf?a.filter(g=>!g.inline):a.slice();i(f,m,t.forChild(o,f),p),o=h}}function oB(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 sB(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 rg(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 mg(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(Wc(n)){for(l=s;r&&!r.node;)r=r.parent;if(r&&r.node.isAtom&&X.isSelectable(r.node)&&r.parent&&!(r.node.isInline&&RF(n.focusNode,n.focusOffset,r.dom))){let d=r.posBefore;u=new X(s==d?a:i.resolve(d))}else if(rn&&t=="key"&&s>e.state.selection.to&&Y(n.focusNode)&&n.focusOffset==n.focusNode.childNodes.length&&r&&r.posAtStart>e.state.selection.to)for(let d=n.focusNode;;d=d.parentNode){if(getComputedStyle(d).overflow!="visible"){u=G.findFrom(i.resolve(r.posAtStart),1);break}if(d==r.dom||d.nextSibling||!d.parentNode||!Y(d.parentNode))break}}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=gg(e,c,a,d)}return u}function JI(e){return e.editable?e.hasFocus():XI(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function pr(e,t=!1){let n=e.state.selection;if(GI(e,n),!JI(e))return;let i=e.input.mouseDown;if(!t&&It&&i){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Ci(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)&&i.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)lB(e);else{let{anchor:r,head:o}=n,s,a;gI&&!(n instanceof q)&&(n.$from.parent.inlineContent||(s=bI(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=bI(e,n.to))),e.docView.setSelection(r,o,e,t),gI&&(s&&vI(s),a&&vI(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&aB(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var gI=Ft||It&&LI<63;function bI(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(Ft&&r&&r.contentEditable=="false")return q0(r);if((!r||r.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(r)return q0(r);if(o)return q0(o)}}function q0(e){return e.contentEditable="true",Ft&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function vI(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function aB(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(()=>{(!JI(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function lB(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,Tt(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&Yt&&Br<=11&&(n.disabled=!0,n.disabled=!1)}function GI(e,t){if(t instanceof X){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(yI(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else yI(e)}function yI(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function gg(e,t,n,i){return e.someProp("createSelectionBetween",r=>r(e,t,n))||q.between(t,n,i)}function kI(e){return e.editable&&!e.hasFocus()?!1:XI(e)}function XI(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return Ti(e.dom,t.anchorNode)&&(e.editable||Ti(e.dom,t.focusNode))}catch{return!1}}function uB(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ci(t.node,t.offset,n.anchorNode,n.anchorOffset)}function ig(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 Fr(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function xI(e,t,n){let i=e.state.selection;if(i instanceof q)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 Fr(e,new q(i.$anchor,s))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=ig(e.state,t);return r&&r instanceof X?Fr(e,r):!1}else if(!(vn&&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?X.isSelectable(o)?Fr(e,new X(t<0?e.state.doc.resolve(r.pos-o.nodeSize):r)):Fr(e,new q(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1}}else return!1;else{if(i instanceof X&&i.node.isInline)return Fr(e,new q(t>0?i.$to:i.$from));{let r=ig(e.state,t);return r?Fr(e,r):!1}}}function Ma(e,t){let n=e.pmViewDesc;return n?n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR"):Y(e)&&e.contentEditable=="false"}function Ao(e,t){return t<0?cB(e):dB(e)}function cB(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r,o,s=!1;for(rn&&Y(n)&&i<Lt(n)&&Ma(n.childNodes[i],-1)&&(s=!0);;)if(i>0){if(!Y(n))break;let a=n.childNodes[i-1];if(Ma(a,-1))r=n,o=--i;else if(mt(a))n=a,i=n.nodeValue.length;else break}else{if(YI(n))break;{let a=n.previousSibling;for(;a&&Ma(a,-1);)r=n.parentNode,o=Tt(a),a=a.previousSibling;if(a)n=a,i=Lt(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}s?og(e,n,i):r&&og(e,r,o)}function dB(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r=Lt(n),o,s;for(;;)if(i<r){if(!Y(n))break;let a=n.childNodes[i];if(Ma(a,1))o=n,s=++i;else break}else{if(YI(n))break;{let a=n.nextSibling;for(;a&&Ma(a,1);)o=a.parentNode,s=Tt(a)+1,a=a.nextSibling;if(a)n=a,i=0,r=Lt(n);else{if(n=n.parentNode,n==e.dom)break;i=r=0}}}o&&og(e,o,s)}function YI(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function fB(e,t){for(;e&&t==e.childNodes.length&&!Ra(e);)t=Tt(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(mt(n))return n;if(Y(n)&&n.contentEditable=="false")break;e=n,t=0}}function pB(e,t){for(;e&&!t&&!Ra(e);)t=Tt(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(mt(n))return n;if(Y(n)&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function og(e,t,n){if(!mt(t)){let o,s;(s=fB(t,n))?(t=s,n=0):(o=pB(t,n))&&(t=o,n=o.nodeValue.length)}let i=e.domSelection();if(!i)return;if(Wc(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&&pr(e)},50)}function wI(e,t){let n=e.state.doc.resolve(t);if(!(It||FI)&&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 _I(e,t,n){let i=e.state.selection;if(i instanceof q&&!i.empty||n.indexOf("s")>-1||vn&&n.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=ig(e.state,t);if(s&&s instanceof X)return Fr(e,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof qt?G.near(s,t):G.findFrom(s,t);return a?Fr(e,a):!1}return!1}function SI(e,t){if(!(e.state.selection instanceof q))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 EI(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function hB(e){if(!Ft||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&Y(t)&&n==0&&t.firstChild&&Y(t.firstChild)&&t.firstChild.contentEditable=="false"){let i=t.firstChild;EI(e,i,"true"),setTimeout(()=>EI(e,i,"false"),20)}return!1}function mB(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function gB(e,t){let n=t.keyCode,i=mB(t);if(n==8||vn&&n==72&&i=="c")return SI(e,-1)||Ao(e,-1);if(n==46&&!t.shiftKey||vn&&n==68&&i=="c")return SI(e,1)||Ao(e,1);if(n==13||n==27)return!0;if(n==37||vn&&n==66&&i=="c"){let r=n==37?wI(e,e.state.selection.from)=="ltr"?-1:1:-1;return xI(e,r,i)||Ao(e,r)}else if(n==39||vn&&n==70&&i=="c"){let r=n==39?wI(e,e.state.selection.from)=="ltr"?1:-1:1;return xI(e,r,i)||Ao(e,r)}else{if(n==38||vn&&n==80&&i=="c")return _I(e,-1,i)||Ao(e,-1);if(n==40||vn&&n==78&&i=="c")return hB(e)||_I(e,1,i)||Ao(e,1);if(i==(vn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function bg(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")||or.fromSchema(e.state.schema),a=iA(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u=l.firstChild,c,d=0;for(;u&&Y(u)&&(c=rA[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&&Y(u)&&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 QI(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(M.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=or.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=kB(n),Vc&&xB(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&&!Y(f);)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Tn.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!bB.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=wB($I(a,+c[1],+c[2]),c[4]);else if(a=B.maxOpen(vB(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=$I(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,l)}),a}var bB=/^(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 vB(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&&tA(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=nA(s[s.length-1],o.length));let c=eA(a,l);s.push(c),r=r.matchType(c.type),o=l}}),s)return M.from(s)}return e}function eA(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,M.from(e));return e}function tA(e,t,n,i,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let o=tA(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(M.from(eA(n,e,r+1))))}}function nA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,nA(e.lastChild,t-1)),i=e.contentMatchAt(e.childCount).fillBefore(M.empty,!0);return e.copy(n.append(i))}function sg(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=sg(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(M.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function $I(e,t,n){return t<e.openStart&&(e=new B(sg(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(sg(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var rA={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function iA(){return document.implementation.createHTMLDocument("title")}var Ia=null;function yB(e){let t=window.trustedTypes;if(!t)return e;if(!Ia){if(Ia=t.defaultPolicy)try{return Ia.createHTML(e)}catch{}Ia=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})}return Ia.createHTML(e)}function kB(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=iA(),i=n.body,r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&rA[r[1].toLowerCase()])&&(e=o.map(s=>"<"+s+">").join("")+e+o.map(s=>"</"+s+">").reverse().join("")),i.innerHTML=yB(e),o)for(let s=0;s<o.length;s++)i=i.querySelector(o[s])||i;for(let s=0;s<n.styleSheets.length;s++){let a=n.styleSheets[s];for(let l=0;l<a.rules.length;l++){let u=a.rules[l];if(u instanceof CSSStyleRule){let c=i.querySelectorAll(u.selectorText);for(let d=0;d<c.length;d++)c[d].style.cssText+=u.style.cssText}}}return i}function xB(e){let t=e.querySelectorAll(It?"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 wB(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;try{r=M.from(l.create(i[a+1],r))}catch{break}o++,s++}return new B(r,o,s)}var Wt={},Vt={},_B={touchstart:!0,touchmove:!0},ag=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 SB(e){for(let t in Wt){let n=Wt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=i=>{$B(e,i)&&!vg(e,i)&&(e.editable||!(i.type in Vt))&&n(e,i)},_B[t]?{passive:!0}:void 0)}Ft&&e.dom.addEventListener("input",()=>null),lg(e)}function fr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function EB(e){e.input.mouseDown&&e.input.mouseDown.done(),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 lg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=i=>vg(e,i))})}function vg(e,t){return e.someProp("handleDOMEvents",n=>{let i=n[t.type];return i?i(e,t)||t.defaultPrevented:!1})}function $B(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 CB(e,t){!vg(e,t)&&Wt[t.type]&&(e.editable||!(t.type in Vt))&&Wt[t.type](e,t)}Vt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!aA(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(dr&&It&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Do&&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,ki(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||gB(e,n)?n.preventDefault():fr(e,"key")};Vt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Vt.keypress=(e,t)=>{let n=t;if(aA(e)||!n.charCode||n.ctrlKey&&!n.altKey||vn&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof q)||!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 Pa(e){return{left:e.clientX,top:e.clientY}}function TB(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function yg(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 La(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);i.setMeta("pointer",!0),e.dispatch(i)}function IB(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&X.isSelectable(i)?(La(e,new X(n)),!0):!1}function AB(e,t){if(t==-1)return!1;let n=e.state.selection,i,r;n instanceof X&&(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(X.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?(La(e,X.create(e.state.doc,r)),!0):!1}function MB(e,t,n,i,r){return yg(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(r?AB(e,n):IB(e,n))}function zB(e,t,n,i){return yg(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",r=>r(e,t,i))}function DB(e,t,n,i){return yg(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",r=>r(e,t,i))||NB(e,n,i)}function NB(e,t,n){if(n.button!=0)return!1;let i=oA(e,t,!0),r=e.state.doc;return i?(La(e,i),i instanceof q&&r.eq(e.state.doc)&&(e.input.mouseDown=new cg(e,i)),!0):!1}function oA(e,t,n){let i=e.state.doc;if(t==-1)return i.inlineContent?q.create(i,0,i.content.size):null;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)return q.create(i,a+1,a+1+s.content.size);if(n&&X.isSelectable(s))return X.create(i,a)}return null}function kg(e){return Uc(e)}var sA=vn?"metaKey":"ctrlKey";Wt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=kg(e),r=Date.now(),o="singleClick";r-e.input.lastClick.time<500&&TB(n,e.input.lastClick)&&!n[sA]&&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},e.input.mouseDown&&e.input.mouseDown.done();let s=e.posAtCoords(Pa(n));s&&(o=="singleClick"?e.input.mouseDown=new ug(e,s,n,!!i):(o=="doubleClick"?zB:DB)(e,s.pos,s.inside,n)?n.preventDefault():fr(e,"pointer"))};var Bc=class{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){t.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},ug=class extends Bc{constructor(t,n,i,r){super(t),this.pos=n,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!i[sA],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&&Y(l.nodeDOM)?l.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof X&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&rn&&!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()),fr(t,"pointer")}done(){super.done(),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(()=>{this.view.isDestroyed||pr(this.view)})}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(Pa(t))),this.updateAllowDefault(t),this.allowDefault||!n?fr(this.view,"pointer"):MB(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Ft&&this.mightDrag&&!this.mightDrag.node.isAtom||It&&!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)?(La(this.view,G.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):fr(this.view,"pointer")}move(t){this.updateAllowDefault(t),fr(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},cg=class extends Bc{constructor(t,n){super(t),this.startSelection=n,this.startDoc=t.state.doc}move(t){if(t.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}t.preventDefault(),fr(this.view,"pointer");let n=this.view.posAtCoords(Pa(t)),i=n&&oA(this.view,n.inside,!1);if(!i)return;let{doc:r}=this.view.state,o=this.startSelection,[s,a]=i.from<o.from?[o.to,i.from]:[o.from,i.to];La(this.view,q.create(r,s,a))}};Wt.touchstart=e=>{e.input.lastTouch=Date.now(),kg(e),fr(e,"pointer")};Wt.touchmove=e=>{e.input.lastTouch=Date.now(),fr(e,"pointer")};Wt.contextmenu=e=>kg(e);function aA(e,t){return e.composing?!0:Ft&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var OB=dr?5e3:-1;Vt.compositionstart=Vt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof q&&t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||It&&FI&&RB(e)))e.markCursor=e.state.storedMarks||n.marks(),Uc(e,!0),e.markCursor=null;else if(Uc(e,!t.selection.empty),rn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&Y(r)&&o!=0;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(mt(s)){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else r=s,o=-1}}e.input.composing=!0}lA(e,OB)};function RB(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||!Y(t)||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return Y(i)&&i.contentEditable=="false"}Vt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),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++,lA(e,20))};function lA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Uc(e),t))}function uA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function PB(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=NF(t.focusNode,t.focusOffset),i=OF(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 Uc(e,t=!1){if(!(dr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),uA(e),t||e.docView&&e.docView.dirty){let n=mg(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 LB(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 za=Yt&&Br<15||Do&&FF<604;Wt.copy=Vt.cut=(e,t)=>{let n=t,i=e.state.selection,r=n.type=="cut";if(i.empty)return;let o=za?null:n.clipboardData,s=i.content(),{dom:a,text:l}=bg(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):LB(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function FB(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function BB(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?Da(e,i.value,null,r,t):Da(e,i.textContent,i.innerHTML,r,t)},50)}function Da(e,t,n,i,r){let o=QI(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=FB(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 cA(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," "):""}Vt.paste=(e,t)=>{let n=t;if(e.composing&&!dr)return;let i=za?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&Da(e,cA(i),i.getData("text/html"),r,n)?n.preventDefault():BB(e,n)};var jc=class{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}},UB=vn?"altKey":"ctrlKey";function dA(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[UB]}Wt.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(Pa(n)),s;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof X?r.to-1:r.to))){if(i&&i.mightDrag)s=X.create(e.state.doc,i.mightDrag.pos);else if(n.target&&Y(n.target)){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=X.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:u,slice:c}=bg(e,a);(!n.dataTransfer.files.length||!It||LI>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(za?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",za||n.dataTransfer.setData("text/plain",u),e.dragging=new jc(c,dA(e,n),s)};Wt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Vt.dragover=Vt.dragenter=(e,t)=>t.preventDefault();Vt.drop=(e,t)=>{try{jB(e,t,e.dragging)}finally{e.dragging=null}};function jB(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(Pa(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=QI(e,cA(t.dataTransfer),za?null:t.dataTransfer.getData("text/html"),!1,r);let s=!!(n&&dA(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?Dc(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&&X.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new X(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,g,b)=>p=b),l.setSelection(gg(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Wt.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())&&pr(e)},20))};Wt.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)};Wt.beforeinput=(e,t)=>{if(dr&&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,ki(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 Vt)Wt[e]=Vt[e];function Na(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 Zc=class e{constructor(t,n){this.toDOM=t,this.spec=n||Ei,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 gt(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&&Na(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Si=class e{constructor(t,n){this.attrs=t,this.spec=n||Ei}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 gt(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof e&&Na(this.attrs,t.attrs)&&Na(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},dg=class e{constructor(t,n){this.attrs=t,this.spec=n||Ei}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 gt(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&&Na(this.attrs,t.attrs)&&Na(this.spec,t.spec)}destroy(){}},gt=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 Zc(n,i))}static inline(t,n,i,r){return new e(t,n,new Si(i,r))}static node(t,n,i,r){return new e(t,n,new dg(i,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Si}get widget(){return this.type instanceof Zc}},Mo=[],Ei={},Ie=class e{constructor(t,n){this.local=t.length?t:Mo,this.children=n.length?n:Mo}static create(t,n){return n.length?qc(n,t,0,Ei):Pt}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==Pt||t.maps.length==0?this:this.mapInner(t,n,0,0,i||Ei)}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?ZB(this.children,s||[],t,n,i,r,o):s?new e(s.sort($i),Mo):Pt}add(t,n){return n.length?this==Pt?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=pA(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,qc(c,a,u+1,Ei)),o+=3}});let s=fA(o?hA(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==Pt?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!=Pt?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):Pt}forChild(t,n){if(this==Pt)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 Si){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),Mo);return i?new Hc([a,i]):a}return i||Pt}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 xg(this.localsInner(t))}localsInner(t){if(this==Pt)return Mo;if(t.inlineContent||!this.local.some(Si.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof Si||n.push(this.local[i]);return n}forEachSet(t){t(this)}};Ie.empty=new Ie([],[]);Ie.removeOverlap=xg;var Pt=Ie.empty,Hc=class e{constructor(t){this.members=t}map(t,n){let i=this.members.map(r=>r.map(t,n,Ei));return e.from(i)}forChild(t,n){if(n.isLeaf)return Ie.empty;let i=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,n);o!=Pt&&(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?xg(i?n:n.sort($i)):Mo}static from(t){switch(t.length){case 0:return Pt;case 1:return t[0];default:return new e(t.every(n=>n instanceof Ie)?t:t.reduce((n,i)=>n.concat(i instanceof Ie?i:i.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}};function ZB(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 g=m-h-(p-f);for(let b=0;b<a.length;b+=3){let v=a[b+1];if(v<0||f>v+c-d)continue;let y=a[b]+c-d;p>=y?a[b+1]=f<=y?-2:-1:f>=c&&g&&(a[b]+=g,a[b+1]+=g)}d+=g}),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),g=i.maybeChild(h);if(g&&m==d&&m+g.nodeSize==p){let b=a[u+2].mapInner(n,g,c+1,e[u]+o+1,s);b!=Pt?(a[u]=d,a[u+1]=p,a[u+2]=b):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=HB(a,e,t,n,r,o,s),c=qc(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 Ie(t.sort($i),a)}function fA(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 gt(r.from+t,r.to+t,r.type))}return n}function HB(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 pA(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 hA(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function qc(e,t,n,i){let r=[],o=!1;t.forEach((a,l)=>{let u=pA(e,a,l+n);if(u){o=!0;let c=qc(u,a,n+l+1,i);c!=Pt&&r.push(l,l+a.nodeSize,c)}});let s=fA(o?hA(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 Ie(s,r):Pt}function $i(e,t){return e.from-t.from||e.to-t.to}function xg(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),CI(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),CI(t,r,i.copy(o.from,i.to)));break}}}return t}function CI(e,t,n){for(;t<e.length&&$i(n,e[t])>0;)t++;e.splice(t,0,n)}function W0(e){let t=[];return e.someProp("decorations",n=>{let i=n(e.state);i&&i!=Pt&&t.push(i)}),e.cursorWrapper&&t.push(Ie.create(e.state.doc,[e.cursorWrapper.deco])),Hc.from(t)}var qB={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},WB=Yt&&Br<=11,fg=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}},pg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new fg,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]);Yt&&Br<=11&&i.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():Ft&&t.composing&&i.some(r=>r.type=="childList"&&r.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),WB&&(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,qB)),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(kI(this.view)){if(this.suppressingSelectionUpdates)return pr(this.view);if(Yt&&Br<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ci(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=zo(o))n.add(o);for(let o=t.anchorNode;o;o=zo(o))if(n.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);if(r&&r.ignoreMutation({type:"selection",target:mt(i)?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)&&kI(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||It&&(t.composing||t.input.compositionEndedAt>Date.now()-50)&&n.some(c=>c.type=="childList"&&c.removedNodes.length))){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&Y(d);){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(rn&&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||JB(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&&Wc(i)&&(u=mg(t))&&u.eq(G.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,pr(t),this.currentSelection.set(i),t.scrollToSelection()):(o>-1||r)&&(o>-1&&(t.docView.markDirty(o,s),VB(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,GB(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||pr(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),mt(d)&&(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(Yt&&Br<=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?Tt(r)+1:0,a=i.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?Tt(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})}},TI=new WeakMap,II=!1;function VB(e){if(!TI.has(e)&&(TI.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=rn,II)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."),II=!0}}function AI(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Ci(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function KB(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return AI(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?AI(e,n):null}function JB(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 GB(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||!Y(l)||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 XB(e,t,n,i){let{node:r,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),u=e.domSelectionRange(),c,d=u.anchorNode;if(d&&Ti(e.dom,d)&&(c=[{node:d,offset:u.anchorOffset}],Wc(u)||c.push({node:u.focusNode,offset:u.focusOffset})),It&&e.input.lastKeyCode===8)for(let b=s;b>o;b--){let v=r.childNodes[b-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){s=b;break}if(!y||y.size)break}let f=e.state.doc,p=e.someProp("domParser")||Tn.fromSchema(e.state.schema),h=f.resolve(a),m=null,g=p.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:YB(i),context:h});if(c&&c[0].pos!=null){let b=c[0].pos,v=c[1]&&c[1].pos;v==null&&(v=b),m={anchor:b+a,head:v+a}}return{doc:g,sel:m,from:a,to:l}}var YB=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName=="BR"&&t.parentNode){if(Ft&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let i=document.createElement("div");return i.appendChild(document.createElement("li")),{skip:i}}else if(t.parentNode.lastChild==t||Ft&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},QB=/^(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 eU(e,t,n,i,r){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let D=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=mg(e,D);if(z&&!e.state.selection.eq(z)){if(It&&dr&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",ce=>ce(e,ki(13,"Enter"))))return;let V=e.state.tr.setSelection(z);D=="pointer"?V.setMeta("pointer",!0):D=="key"&&V.scrollIntoView(),o&&V.setMeta("composition",o),e.dispatch(V)}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=XB(e,t,n,r),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=iU(d.content,u.doc.content,u.from,f,p);if(h&&e.input.domChangeCount++,(Do&&e.input.lastIOSEnter>Date.now()-225||dr)&&r.some(D=>Y(D)&&!QB.test(D.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",D=>D(e,ki(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(i&&l instanceof q&&!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 D=MI(e,e.state.doc,u.sel);if(D&&!D.eq(e.state.selection)){let z=e.state.tr.setSelection(D);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 q&&(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)),Yt&&Br<=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),g=u.doc.resolveNoCache(h.endB-u.from),b=c.resolve(h.start),v=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=h.endA;if((Do&&e.input.lastIOSEnter>Date.now()-225&&(!v||r.some(D=>D.nodeName=="DIV"||D.nodeName=="P"))||!v&&rU(u.doc,m.pos,g.pos))&&e.someProp("handleKeyDown",D=>D(e,ki(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&nU(c,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",D=>D(e,ki(8,"Backspace")))){dr&&It&&e.domObserver.suppressSelectionUpdates();return}It&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),dr&&!v&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,g=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(D){return D(e,ki(13,"Enter"))})},20));let y=h.start,x=h.endA,C=D=>{let z=D||e.state.tr.replace(y,x,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let V=MI(e,z.doc,u.sel);V&&!(It&&e.composing&&V.empty&&(h.start!=h.endB||e.input.lastChromeDelete<Date.now()-100)&&(V.head==y||V.head==z.mapping.map(x)-1)||Yt&&V.empty&&V.head==y)&&z.setSelection(V)}return o&&z.setMeta("composition",o),z.scrollIntoView()},A;if(v)if(m.pos==g.pos){Yt&&Br<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>pr(e),20));let D=C(e.state.tr.delete(y,x)),z=c.resolve(h.start).marksAcross(c.resolve(h.endA));z&&D.ensureMarks(z),e.dispatch(D)}else if(h.endA==h.endB&&(A=tU(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start())))){let D=C(e.state.tr);A.type=="add"?D.addMark(y,x,A.mark):D.removeMark(y,x,A.mark),e.dispatch(D)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let D=m.parent.textBetween(m.parentOffset,g.parentOffset),z=()=>C(e.state.tr.insertText(D,y,x));e.someProp("handleTextInput",V=>V(e,y,x,D,z))||e.dispatch(z())}else e.dispatch(C());else e.dispatch(C())}function MI(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:gg(e,t.resolve(n.anchor),t.resolve(n.head))}function tU(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(M.from(u).eq(e))return{mark:a,type:s}}function nU(e,t,n,i,r){if(n-t<=r.pos-i.pos||V0(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(V0(o,!0,!0));return!s.parent.isTextblock||s.pos>n||V0(s,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(s.parent.content)}function rU(e,t,n){let i=0,r=0;return e.nodesBetween(t,n,(o,s)=>{o.isTextblock&&s>=t&&s<n?i++:(o.isText?/\S/.test(o.text.slice(Math.max(0,t-s),Math.min(o.nodeSize,n-s))):o.isLeaf)&&r++}),r==0&&i==1}function V0(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 iU(e,t,n,i,r){let o=e.findDiffStart(t,n),s=n+e.size,a=n+t.size;if(o==null)return null;let{a:l,b:u}=e.findDiffEnd(t,s,a);if(r=="end"){let c=Math.max(0,o-Math.min(l,u));i-=l+c-o}if(l<o&&s<a){let c=i<=o&&i>=l?o-i:0;o-=c,u=o+(u-l),l=o}else if(u<o){let c=i<=o&&i>=u?o-i:0;o-=c,l=o+(l-u),u=o}return{start:o,endA:l,endB:u}}var Oa=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 ag,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(RI),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=NI(this),DI(this),this.nodeViews=OI(this),this.docView=hI(this.state.doc,zI(this),W0(this),this.dom,this),this.domObserver=new pg(this,(i,r,o,s)=>eU(this,i,r,o,s)),this.domObserver.start(),SB(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&&lg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(RI),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&&(uA(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=OI(this);sU(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&lg(this),this.editable=NI(this),DI(this);let l=W0(this),u=zI(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&&jF(this);if(s){this.domObserver.stop();let p=d&&(Yt||It)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&oU(r.selection,t.selection);if(d){let m=It?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=PB(this)),(o||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=hI(t.doc,u,l,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}let h=this.input.mouseDown;p||!(h&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&uB(this)&&h.delaySelUpdate())?pr(this,p):(GI(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&&ZF(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!Ti(this.dom,t))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof X){let n=this.docView.domAfterPos(this.state.selection.from);Y(n)&&uI(this,n.getBoundingClientRect(),t)}else uI(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 jc(t.slice,t.move,r<0?void 0:X.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(Yt){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&&HF(this.dom),pr(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 JF(this,t)}coordsAtPos(t,n=1){return HI(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 eB(this,n||this.state,t)}pasteHTML(t,n){return Da(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Da(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return bg(this,t)}destroy(){this.docView&&(EB(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],W0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,zF())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return CB(this,t)}domSelectionRange(){let t=this.dom.isConnected!==!1&&this.domSelection();return t?Ft&&this.root.nodeType===11&&PF(this.dom.ownerDocument)==this.dom&&KB(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Oa.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function zI(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"),[gt.node(0,e.state.doc.content.size,t)]}function DI(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:gt.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function NI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function oU(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 OI(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 sU(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 RI(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 hr={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:"'"},Jc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},aU=typeof navigator<"u"&&/Mac/.test(navigator.platform),lU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(ct=0;ct<10;ct++)hr[48+ct]=hr[96+ct]=String(ct);var ct;for(ct=1;ct<=24;ct++)hr[ct+111]="F"+ct;var ct;for(ct=65;ct<=90;ct++)hr[ct]=String.fromCharCode(ct+32),Jc[ct]=String.fromCharCode(ct);var ct;for(Kc in hr)Jc.hasOwnProperty(Kc)||(Jc[Kc]=hr[Kc]);var Kc;function mA(e){var t=aU&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||lU&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Jc:hr)[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 uU=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),cU=typeof navigator<"u"&&/Win/.test(navigator.platform);function dU(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))uU?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 fU(e){let t=Object.create(null);for(let n in e)t[dU(n)]=e[n];return t}function wg(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 gA(e){return new fe({props:{handleKeyDown:Fa(e)}})}function Fa(e){let t=fU(e);return function(n,i){let r=mA(i),o,s=t[wg(r,i)];if(s&&s(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(i.shiftKey){let a=t[wg(r,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(cU&&i.ctrlKey&&i.altKey)&&(o=hr[i.keyCode])&&o!=r){let a=t[wg(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Gc=200,At=function(){};At.prototype.append=function(t){return t.length?(t=At.from(t),!this.length&&t||t.length<Gc&&this.leafAppend(t)||this.length<Gc&&t.leafPrepend(this)||this.appendInner(t)):this};At.prototype.prepend=function(t){return t.length?At.from(t).append(this):this};At.prototype.appendInner=function(t){return new pU(this,t)};At.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?At.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};At.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};At.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)};At.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};At.from=function(t){return t instanceof At?t:t&&t.length?new bA(t):At.empty};var bA=(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<=Gc)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Gc)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})(At);At.empty=new bA([]);var pU=(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})(At),_g=At;var hU=500,Ai=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 jn(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 jn(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 jn(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>gU&&(a=mU(a,u),s-=u),new e(a.append(o),s)}remapping(t,n){let i=new _a;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 jn(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]),g=f.selection&&f.selection.map(o.slice(l+1,p));g&&a++,i.push(new jn(h,m,g))}else i.push(new jn(h))},r);let u=[];for(let f=n;f<s;f++)u.push(new jn(o.maps[f]));let c=this.items.slice(0,r).append(u).append(i),d=new e(c,a);return d.emptyItemCount()>hU&&(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 jn(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(_g.from(r.reverse()),o)}};Ai.empty=new Ai(_g.empty,0);function mU(e,t){let n;return e.forEach((i,r)=>{if(i.selection&&t--==0)return n=r,!1}),e.slice(n)}var jn=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)}}},Zn=class{constructor(t,n,i,r,o){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}},gU=20;function bU(e,t,n,i){let r=n.getMeta(Zr),o;if(r)return r.historyState;n.getMeta(xA)&&(e=new Zn(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Zr))return s.getMeta(Zr).redo?new Zn(e.done.addTransform(n,void 0,i,Xc(t)),e.undone,vA(n.mapping.maps),e.prevTime,e.prevComposition):new Zn(e.done,e.undone.addTransform(n,void 0,i,Xc(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||!vU(n,e.prevRanges)),u=s?Sg(e.prevRanges,n.mapping):vA(n.mapping.maps);return new Zn(e.done.addTransform(n,l?t.selection.getBookmark():void 0,i,Xc(t)),Ai.empty,u,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Zn(e.done.rebased(n,o),e.undone.rebased(n,o),Sg(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Zn(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Sg(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function vU(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 vA(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 Sg(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 yU(e,t,n){let i=Xc(t),r=Zr.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 Zn(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Zr,{redo:n,historyState:l})}var Eg=!1,yA=null;function Xc(e){let t=e.plugins;if(yA!=t){Eg=!1,yA=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Eg=!0;break}}return Eg}function kA(e){return e.setMeta(xA,!0)}var Zr=new _e("history"),xA=new _e("closeHistory");function wA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new fe({key:Zr,state:{init(){return new Zn(Ai.empty,Ai.empty,null,0,-1)},apply(t,n,i){return bU(n,i,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let i=n.inputType,r=i=="historyUndo"?$g:i=="historyRedo"?Cg:null;return!r||!t.editable?!1:(n.preventDefault(),r(t.state,t.dispatch))}}}})}function Yc(e,t){return(n,i)=>{let r=Zr.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(i){let o=yU(r,n,e);o&&i(t?o.scrollIntoView():o)}return!0}}var $g=Yc(!1,!0),Cg=Yc(!0,!0),gre=Yc(!1,!1),bre=Yc(!0,!1);function _A(e){return e.getMeta(Zr)!=null}function od(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 Lo=class BA{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:t,editor:n,state:i}=this,{view:r}=n,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{let d=l(...c)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,u=t||o.tr,c=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(i).map(([f,p])=>[f,(...m)=>{let g=this.buildProps(u,n),b=p(...m)(g);return a.push(b),d}])),run:c};return d}static createFakeChain(){let t=new Proxy({},{get:(n,i)=>{if(i!=="then")return i==="run"?()=>!1:()=>t}});return t}createCan(t){let{rawCommands:n,state:i}=this,r=!1,o=t||i.tr,s=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}static createFallbackCan(){let t=BA.createFakeChain();return new Proxy({chain:()=>t},{get:(n,i)=>{if(i!=="then")return i==="chain"?n.chain:()=>!1}})}buildProps(t,n=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a={tr:t,editor:r,view:s,state:od({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}},kU=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)===null||n===void 0||(n=n.getSelection())===null||n===void 0||n.removeAllRanges()}}),!0),xU=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),wU=()=>({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=lr(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},_U=e=>t=>e(t),SU=()=>({state:e,dispatch:t})=>L0(e,t),EU=(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 q(i.doc.resolve(Math.max(s-1,0)))),!0},$U=()=>({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 s=r.before(o),a=r.after(o);e.delete(s,a).scrollIntoView()}return!0}return!1};function dt(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 CU=e=>({tr:t,state:n,dispatch:i})=>{let r=dt(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 a=o.before(s),l=o.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1},TU=e=>({tr:t,dispatch:n})=>{let{from:i,to:r}=e;return n&&t.delete(i,r),!0},IU=e=>e.content?/^text(\*|\+)/.test(e.content):!1,SA=(e,t,n)=>{if(!e.parent.isInline||n==="left"&&e.pos>e.start()||n==="right"&&e.pos<e.end())return e.pos;let i=t.nodes[e.parent.type.name].spec;return IU(i)?n==="left"?e.start()-1:e.end()+1:e.pos},AU=(e,t,n)=>({from:SA(e,n,"left"),to:SA(t,n,"right")}),MU=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:i}=e.selection,r=n.steps.length;i.forEach(o=>{let s=n.mapping.slice(r),a=n.doc.resolve(s.map(o.$from.pos)),l=n.doc.resolve(s.map(o.$to.pos)),{from:u,to:c}=AU(a,l,e.schema);n.deleteRange(u,c)}),n.selection.empty||n.setSelection(q.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},zU=()=>({commands:e})=>e.keyboardShortcut("Enter"),DU=()=>({state:e,dispatch:t})=>P0(e,t);function Og(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function rd(e,t,n={strict:!0}){let i=Object.keys(t);return i.length?i.every(r=>n.strict?t[r]===e[r]:Og(t[r])?t[r].test(e[r]):t[r]===e[r]):!0}function UA(e,t,n={}){return e.find(i=>i.type===t&&rd(Object.fromEntries(Object.keys(n).map(r=>[r,i.attrs[r]])),n))}function EA(e,t,n={}){return!!UA(e,t,n)}function Rg(e,t,n){if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(l=>l.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(l=>l.type===t))return;if(!n){let l=i.node.marks.find(u=>u.type===t);l&&(n=l.attrs)}if(!UA([...i.node.marks],t,n))return;let r=i.index,o=e.start()+i.offset,s=r+1,a=o+i.node.nodeSize;for(;r>0&&EA([...e.parent.child(r-1).marks],t,n);)r-=1,o-=e.parent.child(r).nodeSize;for(;s<e.parent.childCount&&EA([...e.parent.child(s).marks],t,n);)a+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:a}}function mr(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 NU=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=mr(e,i.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(r){let d=Rg(l,o,t);if(d&&d.from<=u&&d.to>=c){let f=q.create(s,d.from,d.to);n.setSelection(f)}}return!0},OU=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 jA(e){return e instanceof q}function Mi(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Mg(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"?q.create(e,Mi(0,r,o),Mi(e.content.size,r,o)):q.create(e,Mi(t,r,o),Mi(t,r,o))}function $A(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function id(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function RU(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var PU=(e=null,t={})=>({editor:n,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};let s=()=>{(id()||$A())&&i.dom.focus(),RU()&&!id()&&!$A()&&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&&!jA(n.state.selection))return s(),!0;let a=Mg(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},LU=(e,t)=>n=>e.every((i,r)=>t(i,{...n,index:r})),FU=(e,t)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),ZA=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&&ZA(i)}return e};function Qc(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 ZA(n)}function HA(e){return typeof e?.nodesBetween=="function"}function Fo(e,t,n){if(HA(e))return e;let i=typeof e=="object"&&e!==null;n={slice:!0,parseOptions:{},...n};let r=typeof e=="string";if(i)try{if(Array.isArray(e)&&e.length>0)return M.fromArray(e.map(s=>t.nodeFromJSON(s)));let o=t.nodeFromJSON(e);return n.errorOnInvalidContent&&o.check(),o}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),Fo("",t,n)}if(r){if(n.errorOnInvalidContent){let s=!1,a="",l=new bi({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?Tn.fromSchema(l).parseSlice(Qc(e),n.parseOptions):Tn.fromSchema(l).parse(Qc(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let o=Tn.fromSchema(t);return n.slice?o.parseSlice(Qc(e),n.parseOptions).content:o.parse(Qc(e),n.parseOptions)}return Fo("",t,n)}function qA(e){return!("type"in e)}function WA(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof lt||r instanceof ut))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 BU=(e,t,n)=>({tr:i,dispatch:r,editor:o})=>{if(r){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=g=>{o.emit("contentError",{editor:o,error:g,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{Fo(t,o.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(g){l(g)}try{var s;a=Fo(t,o.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(g){return l(g),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0,h=qA(a)?a.content:[a];if(h.forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,p=p?g.isBlock:!1}),c===d&&p){let{parent:g}=i.doc.resolve(c);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(c-=1,d+=1)}let m;if(f)Array.isArray(t)?m=t.map(g=>g.text||"").join(""):HA(t)?m=h.map(g=>{var b;return(b=g.text)!==null&&b!==void 0?b:""}).join(""):typeof t=="object"&&t&&t.text?m=t.text:m=t,i.insertText(m,c,d);else{m=M.from(h);let g=i.doc.resolve(c),b=g.node(),v=g.parentOffset===0,y=b.isText||b.isTextblock,x=b.content.size>0;v&&y&&x&&p&&(c=Math.max(0,c-1)),i.replaceWith(c,d,h)}n.updateSelection&&WA(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};function VA(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}var UU=(e={})=>({tr:t,dispatch:n,editor:i})=>{let{pos:r,attrs:o,content:s,updateSelection:a=!0}=e,l;typeof r=="number"?l=t.doc.resolve(r):r?l=r:l=t.selection.$from;let u=VA(l.parent.contentMatchAt(l.index()));if(!u)return!1;let c=Object.keys(u.spec.attrs||{}),d=o?Object.fromEntries(Object.entries(o).filter(([p])=>c.includes(p))):{},f;if(s){let p=Fo(s,i.schema);f=u.createAndFill(d,p)}else f=u.createAndFill(d);return f?(n&&(t.insert(l.pos,f),a&&WA(t,t.steps.length-1,-1)),!0):!1},jU=()=>({state:e,dispatch:t})=>XT(e,t),ZU=()=>({state:e,dispatch:t})=>YT(e,t),HU=()=>({state:e,dispatch:t})=>I0(e,t),qU=()=>({state:e,dispatch:t})=>z0(e,t),KA=(e,t)=>{let n=e.resolve(t),i=n.nodeBefore,r=n.nodeAfter;return!i||!r?!1:!i.type.spec.isolating&&!r.type.spec.isolating},WU=()=>({state:e,dispatch:t,tr:n})=>{try{let i=Eo(e.doc,e.selection.$from.pos,-1);return i==null||!KA(e.doc,i)?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},VU=()=>({state:e,dispatch:t,tr:n})=>{try{let i=Eo(e.doc,e.selection.$from.pos,1);return i==null||!KA(e.doc,i)?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},KU=()=>({state:e,dispatch:t})=>VT(e,t),JU=()=>({state:e,dispatch:t})=>KT(e,t);function JA(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function GU(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))id()||JA()?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 XU=e=>({editor:t,view:n,tr:i,dispatch:r})=>{let o=GU(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 Hn(e,t,n={}){let{from:i,to:r,empty:o}=e.selection,s=t?dt(t,e.schema):null,a=[];e.doc.nodesBetween(i,r,(c,d)=>{if(c.isText)return;let f=Math.max(i,d),p=Math.min(r,d+c.nodeSize);a.push({node:c,from:f,to:p})});let l=r-i,u=a.filter(c=>s?s.name===c.node.type.name:!0).filter(c=>rd(c.node.attrs,n,{strict:!1}));return o?!!u.length:u.reduce((c,d)=>c+d.to-d.from,0)>=l}var YU=(e,t={})=>({state:n,dispatch:i})=>Hn(n,dt(e,n.schema),t)?QT(n,i):!1,QU=()=>({state:e,dispatch:t})=>F0(e,t),ej=e=>({state:t,dispatch:n})=>{let i=dt(e,t.schema);return oI(i)(t,n)},tj=()=>({state:e,dispatch:t})=>O0(e,t);function sd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function CA(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 nj=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=sd(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=dt(e,i.schema)),a==="mark"&&(s=mr(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,CA(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(CA(f.attrs,t))))})})}),l},rj=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),ij=()=>({tr:e,dispatch:t})=>{if(t){let n=new qt(e.doc);e.setSelection(n)}return!0},oj=()=>({state:e,dispatch:t})=>A0(e,t),sj=()=>({state:e,dispatch:t})=>D0(e,t),aj=()=>({state:e,dispatch:t})=>eI(e,t),lj=()=>({state:e,dispatch:t})=>U0(e,t),uj=()=>({state:e,dispatch:t})=>B0(e,t);function zg(e,t,n={},i={}){return Fo(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}var cj=(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=zg(e,r.schema,i,{errorOnInvalidContent:t??r.options.enableContentCheck});if(s){let c=qA(u)?u.content:[u];o.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n)}return!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:i,errorOnInvalidContent:t??r.options.enableContentCheck})};function GA(e,t){let n=mr(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 Pg(e,t){let n=new Rr(e);return t.forEach(i=>{i.steps.forEach(r=>{n.step(r)})}),n}function XA(e,t,n){let i=[];return e.nodesBetween(t.from,t.to,(r,o)=>{n(r)&&i.push({node:r,pos:o})}),i}function Uo(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 ad(e){return t=>Uo(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 Lg(e){return e.map(t=>{let n=K(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return n?[t,...Lg(n())]:t}).flat(10)}function jo(e,t){let n=or.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Dg(e){return typeof e=="function"}function $e(e,t=void 0,...n){return Dg(e)?t?e.bind(t)(...n):e(...n):e}function dj(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Bo(e){return{baseExtensions:e.filter(t=>t.type==="extension"),nodeExtensions:e.filter(t=>t.type==="node"),markExtensions:e.filter(t=>t.type==="mark")}}function YA(e){let t=[],{nodeExtensions:n,markExtensions:i}=Bo(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=K(u,"addGlobalAttributes",{name:u.name,options:u.options,storage:u.storage,extensions:r});c&&c().forEach(d=>{let f;Array.isArray(d.types)?f=d.types:d.types==="*"?f=l:d.types==="nodes"?f=s:d.types==="marks"?f=a:f=[],f.forEach(p=>{Object.entries(d.attributes).forEach(([h,m])=>{t.push({type:p,name:h,attribute:{...o,...m}})})})})}),r.forEach(u=>{let c=K(u,"addAttributes",{name:u.name,options:u.options,storage:u.storage});if(!c)return;let d=c();Object.entries(d).forEach(([f,p])=>{let h={...o,...p};typeof h?.default=="function"&&(h.default=h.default()),h?.isRequired&&h?.default===void 0&&delete h.default,t.push({type:u.name,name:f,attribute:h})})}),t}function fj(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=fj(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 he(...e){return e.filter(t=>!!t).reduce((t,n)=>{let i={...t};return Object.entries(n).forEach(([r,o])=>{if(r==="__proto__"){Object.defineProperty(i,r,{configurable:!0,enumerable:!0,value:o,writable:!0});return}if(!i[r]){i[r]=o;return}if(r==="class"){let s=o?String(o).split(" "):[],a=i[r]?i[r].split(" "):[],l=s.filter(u=>!a.includes(u));i[r]=[...a,...l].join(" ")}else if(r==="style"){let s=new Map([...TA(i[r]),...TA(o)]);i[r]=Array.from(s.entries()).map(([a,l])=>`${a}: ${l}`).join("; ")}else i[r]=o}),i},{})}function Hr(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)=>he(n,i),{})}function pj(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function IA(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):pj(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function AA(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&dj(n)?!1:n!=null))}function MA(e){var t,n;let i={};return!(!(e==null||(t=e.attribute)===null||t===void 0)&&t.isRequired)&&"default"in(e?.attribute||{})&&(i.default=e.attribute.default),(e==null||(n=e.attribute)===null||n===void 0?void 0:n.validate)!==void 0&&(i.validate=e.attribute.validate),[e.name,i]}function hj(e,t){var n;let i=YA(e),{nodeExtensions:r,markExtensions:o}=Bo(e),s=(n=r.find(u=>K(u,"topNode")))===null||n===void 0?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=AA({...e.reduce((g,b)=>{let v=K(b,"extendNodeSchema",d);return{...g,...v?v(u):{}}},{}),content:$e(K(u,"content",d)),marks:$e(K(u,"marks",d)),group:$e(K(u,"group",d)),inline:$e(K(u,"inline",d)),atom:$e(K(u,"atom",d)),selectable:$e(K(u,"selectable",d)),draggable:$e(K(u,"draggable",d)),code:$e(K(u,"code",d)),whitespace:$e(K(u,"whitespace",d)),linebreakReplacement:$e(K(u,"linebreakReplacement",d)),defining:$e(K(u,"defining",d)),isolating:$e(K(u,"isolating",d)),attrs:Object.fromEntries(c.map(MA))}),p=$e(K(u,"parseHTML",d));p&&(f.parseDOM=p.map(g=>IA(g,c)));let h=K(u,"renderHTML",d);h&&(f.toDOM=g=>h({node:g,HTMLAttributes:Hr(g,c)}));let m=K(u,"renderText",d);return m&&(f.toText=m),[u.name,f]})),l=Object.fromEntries(o.map(u=>{let c=i.filter(m=>m.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=AA({...e.reduce((m,g)=>{let b=K(g,"extendMarkSchema",d);return{...m,...b?b(u):{}}},{}),inclusive:$e(K(u,"inclusive",d)),excludes:$e(K(u,"excludes",d)),group:$e(K(u,"group",d)),spanning:$e(K(u,"spanning",d)),code:$e(K(u,"code",d)),attrs:Object.fromEntries(c.map(MA))}),p=$e(K(u,"parseHTML",d));p&&(f.parseDOM=p.map(m=>IA(m,c)));let h=K(u,"renderHTML",d);return h&&(f.toDOM=m=>h({mark:m,HTMLAttributes:Hr(m,c)})),[u.name,f]}));return new bi({topNode:s,nodes:a,marks:l})}function mj(e){let t=e.filter((n,i)=>e.indexOf(n)!==i);return Array.from(new Set(t))}function Ua(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 QA(e){let t=Ua(Lg(e)),n=mj(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 e6(e,t,n){let{from:i,to:r}=t,{blockSeparator:o=`

`,textSerializers:s={}}=n||{},a="";return e.nodesBetween(i,r,(l,u,c,d)=>{l.isBlock&&u>i&&(a+=o);let f=s?.[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:d,range:t})),!1;if(l.isText){var p;a+=l==null||(p=l.text)===null||p===void 0?void 0:p.slice(Math.max(i,u)-u,r-u)}}),a}function gj(e,t){return e6(e,{from:0,to:e.content.size},t)}function t6(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function bj(e,t){let n=dt(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 Fg(e,t){let n=sd(typeof t=="string"?t:t.name,e.schema);return n==="node"?bj(e,t):n==="mark"?GA(e,t):{}}function vj(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 yj(e){let t=vj(e);return t.length===1?t:t.filter((n,i)=>!t.filter((r,o)=>o!==i).some(r=>n.oldRange.from>=r.oldRange.from&&n.oldRange.to<=r.oldRange.to&&n.newRange.from>=r.newRange.from&&n.newRange.to<=r.newRange.to))}function Zo(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}})})}),yj(i)}function ja(e,t,n){let i=[];return e===t?n.resolve(e).marks().forEach(r=>{let o=Rg(n.resolve(e),r.type);o&&i.push({mark:r,...o})}):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 n6=(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]},r6=e=>{let t=e.depth-1;if(t<0)return null;let n=e.index(t);return n===0?null:e.node(t).child(n-1)};function No(e,t){return t.nodes[e]||t.marks[e]||null}function nd(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 kj=(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=((l=(u=r.type.spec).toText)===null||l===void 0?void 0:l.call(u,{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 Ng(e,t,n={}){let{empty:i,ranges:r}=e.selection,o=t?mr(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(c=>o?o.name===c.type.name:!0).find(c=>rd(c.attrs,n,{strict:!1}));let s=0,a=[];if(r.forEach(({$from:c,$to:d})=>{let f=c.pos,p=d.pos;e.doc.nodesBetween(f,p,(h,m)=>{if(o&&h.inlineContent&&!h.type.allowsMarkType(o))return!1;if(!h.isText&&!h.marks.length)return;let g=Math.max(f,m),b=Math.min(p,m+h.nodeSize),v=b-g;s+=v,a.push(...h.marks.map(y=>({mark:y,from:g,to:b})))})}),s===0)return!1;let l=a.filter(c=>o?o.name===c.mark.type.name:!0).filter(c=>rd(c.mark.attrs,n,{strict:!1})).reduce((c,d)=>c+d.to-d.from,0),u=a.filter(c=>o?c.mark.type!==o&&c.mark.type.excludes(o):!0).reduce((c,d)=>c+d.to-d.from,0);return(l>0?l+u:l)>=s}function xj(e,t,n={}){if(!t)return Hn(e,null,n)||Ng(e,null,n);let i=sd(t,e.schema);return i==="node"?Hn(e,t,n):i==="mark"?Ng(e,t,n):!1}var i6=(e,t)=>{let{$from:n,$to:i,$anchor:r}=e.selection;if(t){let o=ad(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)},o6=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function zA(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function Tg(e,t){let{nodeExtensions:n}=Bo(t),i=n.find(o=>o.name===e);if(!i)return!1;let r=$e(K(i,"group",{name:i.name,options:i.options,storage:i.storage}));return typeof r!="string"?!1:r.split(" ").includes("list")}function Ho(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name==="hardBreak")return!0;if(e.isText){var i;return!/\S/.test((i=e.text)!==null&&i!==void 0?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&&(Ho(o,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function ld(e){return e instanceof X}var s6=class a6{constructor(t){this.position=t}static fromJSON(t){return new a6(t.position)}toJSON(){return{position:this.position}}};function wj(e,t){let n=t.mapping.mapResult(e.position);return{position:new s6(n.pos),mapResult:n}}function _j(e){return new s6(e)}function Sj(e,t,n){let{selection:i}=t,r=null;if(jA(i)&&(r=i.$cursor),r){var o;let a=(o=e.storedMarks)!==null&&o!==void 0?o:r.marks();return r.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(l=>l.type.excludes(n)))}let{ranges:s}=i;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 Ej=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=n,{empty:s,ranges:a}=o,l=mr(e,i.schema);if(r)if(s){let u=GA(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 Sj(i,n,l)},$j=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Cj=(e,t={})=>({state:n,dispatch:i,chain:r})=>{let o=dt(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?r().command(({commands:a})=>j0(o,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>j0(o,{...s,...t})(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Tj=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,r=Mi(e,0,i.content.size),o=X.create(i,r);t.setSelection(o)}return!0},Ij=(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},Aj=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,{from:r,to:o}=typeof e=="number"?{from:e,to:e}:e,s=q.atStart(i).from,a=q.atEnd(i).to,l=Mi(r,s,a),u=Mi(o,s,a),c=q.create(i,l,u);t.setSelection(c)}return!0},Mj=e=>({state:t,dispatch:n})=>{let i=dt(e,t.schema);return sI(i)(t,n)};function DA(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 zj=({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=nd(u,a.node().type.name,a.node().attrs);if(o instanceof X&&o.node.isBlock)return!a.parentOffset||!bn(s,a.pos)?!1:(i&&(e&&DA(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:VA(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=o instanceof q&&!o.empty?yi.create({doc:t.doc,selection:o}).tr.deleteSelection():null,m=h?h.doc:t.doc,g=h?h.mapping.map(a.pos):a.pos,b=bn(m,g,1,p);if(!p&&!b&&bn(m,g,1,f?[{type:f}]:void 0)&&(b=!0,p=f?[{type:f,attrs:c}]:void 0),i){if(b){let v=t.steps.length;if(o instanceof q&&t.deleteSelection(),t.split(t.mapping.slice(v).map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f){let y=t.mapping.slice(v).map(a.before()),x=t.doc.resolve(y);a.node(-1).canReplaceWith(x.index(),x.index()+1,f)&&t.setNodeMarkup(t.mapping.slice(v).map(a.before()),f)}}e&&DA(n,r.extensionManager.splittableMarks),t.scrollIntoView()}return b},Dj=(e,t={})=>({tr:n,state:i,dispatch:r,editor:o})=>{let s=dt(e,i.schema),{$from:a,$to:l}=i.selection,u=i.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;let c=a.node(-1);if(c.type!==s)return!1;let d=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){var f;let x=M.empty,C=a.index(-1)?1:a.index(-2)?2:3;for(let ze=a.depth-C;ze>=a.depth-3;ze-=1)x=M.from(a.node(ze).copy(x));let A=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,D={...nd(d,a.node().type.name,a.node().attrs),...t},z=((f=s.contentMatch.defaultType)===null||f===void 0?void 0:f.createAndFill(D))||void 0;x=x.append(M.from(s.createAndFill(null,z)||void 0));let V=a.before(a.depth-(C-1));n.replace(V,a.after(-A),new B(x,4-C,0));let ce=-1;n.doc.nodesBetween(V,n.doc.content.size,(ze,nt)=>{if(ce>-1)return!1;ze.isTextblock&&ze.content.size===0&&(ce=nt+1)}),ce>-1&&n.setSelection(q.near(n.doc.resolve(ce))),n.scrollIntoView()}return!0}let p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,h={...nd(d,c.type.name,c.attrs),...t},m={...nd(d,a.node().type.name,a.node().attrs),...t},g=a.parentOffset===0&&a.index(-1)===0,b=a.before(-1);n.delete(a.pos,l.pos);let v=g?c.attrs:h,y=p?[{type:s,attrs:v},{type:p,attrs:m}]:[{type:s,attrs:v}];if(!bn(n.doc,a.pos,2))return!1;if(r){let{selection:x,storedMarks:C}=i,{splittableMarks:A}=o.extensionManager,D=C||x.$to.parentOffset&&x.$from.marks();if(n.split(a.pos,2,y).scrollIntoView(),g&&n.setNodeMarkup(b,void 0,h),!D||!r)return!0;let z=D.filter(V=>A.includes(V.type.name));n.ensureMarks(z)}return!0};function NA(e){return!e||e==="1"?null:e}function l6(e,t){return NA(e)===NA(t)}var Ig=(e,t)=>{let n=ad(o=>o.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&&In(e.doc,n.pos))||!l6(n.node.attrs.type,r?.attrs.type)||e.join(n.pos),!0},Ag=(e,t)=>{let n=ad(o=>o.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&&In(e.doc,i))||!l6(n.node.attrs.type,r?.attrs.type)||e.join(i),!0};function Nj(e){let t=e.doc,n=t.firstChild;if(!n)return null;let i=t.resolve(1),r=t.resolve(n.nodeSize-1);return q.between(i,r)}var Oj=(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=dt(e,s.schema),h=dt(t,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:v}=m,y=b.blockRange(v),x=g||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;let C=ad(He=>Tg(He.type.name,d))(m),A=m.from===0&&m.to===s.doc.content.size,D=s.doc.content.content,z=D.length===1?D[0]:null,V=A&&z&&Tg(z.type.name,d)?{node:z,pos:0,depth:0}:null,ce=C??V,ze=!!C&&y.depth>=1&&y.depth-C.depth<=1,nt=!!V;if((ze||nt)&&ce){if(ce.node.type===p)return A&&nt?l().command(({tr:He,dispatch:De})=>{let ae=Nj(He);return ae?(He.setSelection(ae),De&&De(He),!0):!1}).liftListItem(h).run():u.liftListItem(h);if(Tg(ce.node.type.name,d)&&p.validContent(ce.node.content))return l().command(()=>(o.setNodeMarkup(ce.pos,p),!0)).command(()=>Ig(o,p)).command(()=>Ag(o,p)).run()}return!n||!x||!a?l().command(()=>c().wrapInList(p,i)?!0:u.clearNodes()).wrapInList(p,i).command(()=>Ig(o,p)).command(()=>Ag(o,p)).run():l().command(()=>{let He=c().wrapInList(p,i),De=x.filter(ae=>f.includes(ae.type.name));return o.ensureMarks(De),He?!0:u.clearNodes()}).wrapInList(p,i).command(()=>Ig(o,p)).command(()=>Ag(o,p)).run()},Rj=(e,t={},n={})=>({state:i,commands:r})=>{let{extendEmptyMarkRange:o=!1}=n,s=mr(e,i.schema);return Ng(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},Pj=(e,t,n={})=>({state:i,commands:r})=>{let o=dt(e,i.schema),s=dt(t,i.schema),a=Hn(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})},Lj=(e,t={})=>({state:n,commands:i})=>{let r=dt(e,n.schema);return Hn(n,r,t)?i.lift(r):i.wrapIn(r,t)},Fj=()=>({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},Bj=(e={})=>({tr:t,dispatch:n,editor:i})=>{let{ignoreClearable:r=!1}=e,{selection:o}=t,{empty:s,ranges:a}=o;if(s)return!0;let{nonClearableMarks:l}=i.extensionManager;if(n){let u=Object.values(i.schema.marks).filter(c=>r||!l.includes(c.name));a.forEach(c=>{for(let d of u)t.removeMark(c.$from.pos,c.$to.pos,d)})}return!0},Uj=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{extendEmptyMarkRange:o=!1}=t,{selection:s}=n,a=mr(e,i.schema),{$from:l,empty:u,ranges:c}=s;if(!r)return!0;if(u&&o){var d;let{from:f,to:p}=s,h=Rg(l,a,(d=l.marks().find(m=>m.type===a))===null||d===void 0?void 0:d.attrs);h&&(f=h.from,p=h.to),n.removeMark(f,p,a)}else c.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},jj=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},Zj=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=sd(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=dt(e,i.schema)),a==="mark"&&(s=mr(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,(g,b)=>{o&&o===g.type&&(l=!0,h=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,p=g)}):i.doc.nodesBetween(c,d,(g,b)=>{b<c&&o&&o===g.type&&(l=!0,h=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,p=g),b>=c&&b<=d&&(o&&o===g.type&&(l=!0,r&&n.setNodeMarkup(b,void 0,{...g.attrs,...t})),s&&g.marks.length&&g.marks.forEach(v=>{if(s===v.type&&(l=!0,r)){let y=Math.max(b,c),x=Math.min(b+g.nodeSize,d);n.addMark(y,x,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(g=>{s===g.type&&r&&n.addMark(h,m,s.create({...g.attrs,...t}))}))}),l},Ro=new _e("__tiptap_decorations__"),Hj=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(Ro,{type:"force",name:e}),!0),qj=(e,t={})=>({state:n,dispatch:i})=>{let r=dt(e,n.schema);return rI(r,t)(n,i)},Wj=(e,t={})=>({state:n,dispatch:i})=>{let r=dt(e,n.schema);return iI(r,t)(n,i)},Vj=l0({blur:()=>kU,clearContent:()=>xU,clearNodes:()=>wU,command:()=>_U,createParagraphNear:()=>SU,cut:()=>EU,deleteCurrentNode:()=>$U,deleteNode:()=>CU,deleteRange:()=>TU,deleteSelection:()=>MU,enter:()=>zU,exitCode:()=>DU,extendMarkRange:()=>NU,first:()=>OU,focus:()=>PU,forEach:()=>LU,insertContent:()=>FU,insertContentAt:()=>BU,insertDefaultBlock:()=>UU,joinBackward:()=>HU,joinDown:()=>ZU,joinForward:()=>qU,joinItemBackward:()=>WU,joinItemForward:()=>VU,joinTextblockBackward:()=>KU,joinTextblockForward:()=>JU,joinUp:()=>jU,keyboardShortcut:()=>XU,lift:()=>YU,liftEmptyBlock:()=>QU,liftListItem:()=>ej,newlineInCode:()=>tj,resetAttributes:()=>nj,scrollIntoView:()=>rj,selectAll:()=>ij,selectNodeBackward:()=>oj,selectNodeForward:()=>sj,selectParentNode:()=>aj,selectTextblockEnd:()=>lj,selectTextblockStart:()=>uj,setContent:()=>cj,setMark:()=>Ej,setMeta:()=>$j,setNode:()=>Cj,setNodeSelection:()=>Tj,setTextDirection:()=>Ij,setTextSelection:()=>Aj,sinkListItem:()=>Mj,splitBlock:()=>zj,splitListItem:()=>Dj,toggleList:()=>Oj,toggleMark:()=>Rj,toggleNode:()=>Pj,toggleWrap:()=>Lj,undoInputRule:()=>Fj,unsetAllMarks:()=>Bj,unsetMark:()=>Uj,unsetTextDirection:()=>jj,updateAttributes:()=>Zj,updateDecorations:()=>Hj,wrapIn:()=>qj,wrapInList:()=>Wj}),Po=new WeakMap;function Kj(e,t){var n;Po.set(e,((n=Po.get(e))!==null&&n!==void 0?n:0)+1);try{return t()}finally{var i;let r=((i=Po.get(e))!==null&&i!==void 0?i:1)-1;r>0?Po.set(e,r):Po.delete(e)}}function Jj(e){return Po.has(e)}var Gj=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={}}},u6=typeof process<"u"&&!1;function Xj(e){return e.kind==="widget"}function c6(e,t){let n=[],i=new Set;for(let r of e)r.kind==="widget"&&Xj(r)&&i.add(r.key),n.push(r.toPMDecoration(t));return{decorations:n,widgetKeys:i}}function Yj(e,t,n){let{decorations:i,widgetKeys:r}=c6(t,n);return{set:Ie.create(e,i),widgetKeys:r}}function d6({position:e,from:t,to:n,docSize:i}){return e<t?!1:e<n?!0:e===n&&n===i}function Qj({decorations:e,from:t,to:n,docSize:i,extensionName:r,warnedExtensions:o}){return e.filter(s=>d6({position:s.anchor,from:t,to:n,docSize:i})?!0:(s.anchor===n||o.has(r)||(o.add(r),console.warn(`[tiptap warn]: Extension "${r}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function f6(e){var t;let n=(t=e.spec)===null||t===void 0?void 0:t.key;return typeof n=="string"?n:void 0}function eZ(e){let t=new Map,n=new Map;for(let s of e.find()){var i,r,o;let a=f6(s);if(!a)continue;let l=(i=s.spec.extensionName)!==null&&i!==void 0?i:"unknown",u=(r=t.get(a))!==null&&r!==void 0?r:new Set;u.add(l),t.set(a,u),n.set(a,((o=n.get(a))!==null&&o!==void 0?o:0)+1)}return Array.from(t,([s,a])=>({key:s,extensions:a})).filter(({key:s})=>{var a;return((a=n.get(s))!==null&&a!==void 0?a:0)>1})}function p6(e){return e.jsonID==="attr"}function tZ(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||p6(e))return!0;let n=e;return typeof n.from=="number"&&typeof n.to=="number"}function nZ(e,t){let n=null,i=0,r=0;for(let o=0;o<e.childCount&&!(r>t.to);o+=1){let s=r+e.child(o).nodeSize;s>=t.from&&(n===null&&(n=r),i=s),r=s}return n===null?null:{from:n,to:i}}function rZ(e,t){if(e.steps.some(o=>!tZ(o)))return{type:"full"};let n=Zo(e).map(({newRange:o})=>o);e.steps.forEach((o,s)=>{if(!p6(o))return;let a=e.mapping.slice(s);n.push({from:a.map(o.pos,-1),to:a.map(o.pos+1)})});let i=[];for(let o of n){let s=nZ(t,o);s&&i.push(s)}i.sort((o,s)=>o.from-s.from);let r=[];for(let o of i){let s=r[r.length-1];s&&o.from<=s.to?s.to=Math.max(s.to,o.to):r.push({...o})}return{type:"ranges",ranges:r}}function h6(e,t,n,i){return e.map(t,n,{onRemove:r=>{let o=r?.key;typeof o=="string"&&i.delete(o)}})}function iZ(e,t,n){var i,r;let o=(i=t.decorationSetsByExtension[e])!==null&&i!==void 0?i:Ie.empty,s=new Set((r=t.widgetKeysByExtension[e])!==null&&r!==void 0?r:[]);return{set:h6(o,n.mapping,n.doc,s),widgetKeys:s}}function OA(e,t){let n=Object.values(t).flatMap(i=>i.find());return Ie.create(e,n)}function RA(e){let t=new Set;for(let n of Object.values(e))for(let i of n)t.add(i);return t}function oZ(e,t){var n;switch((n=t.update)!==null&&n!==void 0?n:"document"){case"document":if(t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case"changedRanges":if(!t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case"manual":if(t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw new Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw new Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function sZ(e,t,n){return n?!0:e.update==="manual"?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var aZ=new Set;var lZ=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:t})=>{let n=Ro.getState(t);n&&this.warnDuplicateWidgetKeys(n)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:t,spec:n})=>oZ(t,n)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on("beforeTransaction",this.handleBeforeTransaction)}destroy(){this.editor.off("beforeTransaction",this.handleBeforeTransaction)}liveWidgetKeys(){var e,t;return(e=(t=Ro.getState(this.editor.state))===null||t===void 0?void 0:t.widgetKeys)!==null&&e!==void 0?e:aZ}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:i}of e){let r=i();r&&t.push({name:n,spec:r})}return t}createPlugin(){let{editor:e,entries:t}=this;return new fe({key:Ro,state:{init:(n,i)=>{let r={},o={};for(let{name:a,spec:l}of t){let{set:u,widgetKeys:c}=this.buildFullSet(a,l,i);r[a]=u,o[a]=c}let s={decorationSetsByExtension:r,widgetKeysByExtension:o,mergedDecorationSet:this.buildMergedSet(i.doc,r),widgetKeys:RA(o)};return this.warnDuplicateWidgetKeys(s),s},apply:(n,i,r,o)=>{let s=n.getMeta(Ro),a=s?.type==="force"&&!s.name,l=s?.type==="force"?s.name:void 0,u={},c={},d=new Set;return Kj(e,()=>{for(let{name:f,spec:p}of t){let h=a||l===f;if(sZ(p,{editor:e,tr:n,oldState:r,newState:o},h))if(p.update==="changedRanges"&&n.docChanged&&!h){let m=this.applyChangedRangesRecompute(f,p,i,n,o);u[f]=m.set,c[f]=m.widgetKeys,d.add(f)}else{let{set:m,widgetKeys:g}=this.buildFullSet(f,p,o);u[f]=m,c[f]=g,d.add(f)}else{let m=iZ(f,i,n);u[f]=m.set,c[f]=m.widgetKeys}}}),d.size===0&&!n.docChanged?i:{decorationSetsByExtension:u,widgetKeysByExtension:c,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:i,tr:n,decorationSetsByExtension:u,recomputedNames:d}),widgetKeys:RA(c)}}},props:{decorations(n){var i,r;return(i=(r=Ro.getState(n))===null||r===void 0?void 0:r.mergedDecorationSet)!==null&&i!==void 0?i:Ie.empty}}})}applyChangedRangesRecompute(e,t,n,i,r){let o=rZ(i,r.doc);return o.type==="full"?this.buildFullSet(e,t,r):this.rebuildRanges(e,t,n,i,r,o.ranges)}rebuildRanges(e,t,n,i,r,o){var s,a;let l=(s=n.decorationSetsByExtension[e])!==null&&s!==void 0?s:Ie.empty,u=new Set((a=n.widgetKeysByExtension[e])!==null&&a!==void 0?a:[]),c=h6(l,i.mapping,i.doc,u),d=r.doc.content.size;for(let{from:f,to:p}of o){let h=c.find(f,p).filter(b=>d6({position:b.from,from:f,to:p,docSize:d}));for(let b of h){let v=f6(b);v&&u.delete(v)}c=c.remove(h);let{decorations:m,widgetKeys:g}=c6(Qj({decorations:this.runCreate(e,"createInRange",()=>t.createInRange({editor:this.editor,state:r,view:this.mountedView,from:f,to:p})),from:f,to:p,docSize:d,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(r.doc,m);for(let b of g)u.add(b)}return{set:c,widgetKeys:u}}buildFullSet(e,t,n){let i=this.runCreate(e,"create",()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return Yj(n.doc,i,e)}runCreate(e,t,n){try{return n()}catch(i){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,i),[]}}warnDuplicateWidgetKeys(e){if(!u6)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=eZ(e.mergedDecorationSet),n=new Set(t.map(({key:i})=>i));for(let{key:i,extensions:r}of t){if(this.warnedWidgetKeys.has(i))continue;let o=Array.from(r).map(s=>`"${s}"`).join(", ");console.warn(`[tiptap warn]: Duplicate widget decoration key "${i}" in extension${r.size===1?"":"s"} ${o}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:OA(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:i,recomputedNames:r}){return e.length===1?i[e[0].name]:r.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):OA(n.doc,i)}};function m6(e,t){let{selection:n}=e,{$from:i}=n;if(n instanceof X){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}function uZ(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}function cZ(e){return typeof e=="number"}function dZ(e){return Object.prototype.toString.call(e).slice(8,-1)}function ed(e){return dZ(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function g6(e){return typeof e=="string"&&e.trim().length>0&&!/[;{}]/.test(e)}function Bg(e,t,n){let i=e.split(`
`),r=[],o="",s=0,a=t.baseIndentSize||2;for(;s<i.length;){let c=i[s],d=c.match(t.itemPattern);if(!d){if(r.length>0)break;if(c.trim()===""){s+=1,o=`${o}${c}
`;continue}else return}let f=t.extractItemData(d),{indentLevel:p,mainContent:h}=f;o=`${o}${c}
`;let m=[h];for(s+=1;s<i.length;){var l;let y=i[s];if(y.trim()===""){var u;let x=i.slice(s+1).findIndex(C=>C.trim()!=="");if(x===-1)break;if((((u=i[s+1+x].match(/^(\s*)/))===null||u===void 0||(u=u[1])===null||u===void 0?void 0:u.length)||0)>p){m.push(y),o=`${o}${y}
`,s+=1;continue}else break}if((((l=y.match(/^(\s*)/))===null||l===void 0||(l=l[1])===null||l===void 0?void 0:l.length)||0)>p)m.push(y),o=`${o}${y}
`,s+=1;else break}let g,b=m.slice(1);if(b.length>0){let y=b.map(x=>x.slice(p+a)).join(`
`);y.trim()&&(t.customNestedParser?g=t.customNestedParser(y):g=n.blockTokens(y))}let v=t.createToken(f,g);r.push(v)}if(r.length!==0)return{items:r,raw:o}}var PA=4;function LA(e){let t=0;for(let n of e)t=n==="	"?t+PA-t%PA:t+1;return t}function Ug(e,t,n,i,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(i):n,[s,...a]=e.content,l=`${o}${t.renderChildren([s])}`;return a&&a.length>0&&a.forEach((u,c)=>{var d,f;let p=(d=(f=t.renderChild)===null||f===void 0?void 0:f.call(t,u,c+1))!==null&&d!==void 0?d:t.renderChildren([u]);if(p!=null){let h=g=>{if(!r?.alignNestedToPrefix)return t.indent(g);let b=t.indent(""),v=LA(o);return(LA(b)>=v?b:" ".repeat(v))+g},m=p.split(`
`).map(g=>h(g||"")).join(`
`);l+=u.type==="paragraph"?`

${m}`:`
${m}`}}),l}function b6(e,t){let n={...e};return ed(e)&&ed(t)&&Object.keys(t).forEach(i=>{ed(t[i])&&ed(e[i])?n[i]=b6(e[i],t[i]):n[i]=t[i]}),n}function fZ(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 qo=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!==null&&t!==void 0?t:!0}},pZ=(e,t)=>{if(Og(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 hZ(e){let{editor:t,from:n,to:i,text:r,insertText:o}=e;if(!o)return{inputTransaction:null,tr:t.view.state.tr};let s=t.view.state.tr.insertText(r,n,i);return{inputTransaction:s,tr:yi.create({doc:s.doc,selection:s.selection,storedMarks:s.storedMarks}).tr}}function mZ(e){let{editor:t,from:n,to:i,text:r,rule:o,match:s,plugin:a,insertText:l}=e,{view:u}=t,{inputTransaction:c,tr:d}=hZ({editor:t,from:n,to:i,text:r,insertText:l}),f=c?n+r.length:i,p=od({state:u.state,transaction:d}),h={from:n-(s[0].length-r.length),to:f},{commands:m,chain:g,can:b}=new Lo({editor:t,state:p});return o.handler({state:p,range:h,match:s,commands:m,chain:g,can:b})===null||!d.steps.length?!1:(c&&(u.dispatch(c),!u.state.doc.eq(c.doc))||(kA(d),d.setMeta("inputRule",!0),o.undoable&&d.setMeta(a,{transform:d,from:n,to:f,text:r}),u.dispatch(d)),!0)}function gZ(e,t,n){let i=t[0].length-n.length;if(i<=0)return!0;let r=e.parentOffset-i;return r>=0&&e.parent.textBetween(r,e.parentOffset)===t[0].slice(0,i)}function td(e){var t;let{editor:n,from:i,to:r,text:o,rules:s,plugin:a,insertText:l}=e,{view:u}=n;if(u.composing)return!1;let c=u.state.doc.resolve(i);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let d=kj(c)+o;for(let f of s){let p=pZ(d,f.find);if(!(!p||!gZ(c,p,o))&&mZ({editor:n,from:i,to:r,text:o,rule:f,match:p,plugin:a,insertText:l}))return!0}return!1}function bZ(e){let{editor:t,rules:n}=e,i=new fe({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:u}=l;typeof u=="string"?u=u:u=jo(M.from(u),s.schema);let{from:c}=l,d=c+u.length;td({editor:t,from:c,to:d,text:u,rules:n,plugin:i})}),r.selectionSet||r.docChanged?null:o}},props:{handleTextInput(r,o,s,a){return td({editor:t,from:o,to:s,text:a,rules:n,plugin:i,insertText:!0})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{let{$cursor:o}=r.state.selection;o&&td({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?td({editor:t,from:s.pos,to:s.pos,text:`
`,rules:n,plugin:i}):!1}},isInputRules:!0});return i}var jg=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{...$e(K(this,"addOptions",{name:this.name}))}}get storage(){return{...$e(K(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>b6(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,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}},ft=class v6 extends jg{constructor(...t){super(...t),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new v6(n)}static handleExit({editor:t,mark:n}){let{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){let o=r.marks();if(!o.find(a=>a?.type.name===n.name))return!1;let s=o.find(a=>a?.type.name===n.name);return s&&i.removeStoredMark(s),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)}},Zg=class{constructor(e){this.find=e.find,this.handler=e.handler}},vZ=(e,t,n)=>{if(Og(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 yZ(e){let{editor:t,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:c}=new Lo({editor:t,state:n}),d=[];return n.doc.nodesBetween(i,r,(f,p)=>{var h,m,g,b;if(!((h=f.type)===null||h===void 0||(h=h.spec)===null||h===void 0)&&h.code||!(f.isText||f.isTextblock||f.isInline))return;let v=(m=(g=(b=f.content)===null||b===void 0?void 0:b.size)!==null&&g!==void 0?g:f.nodeSize)!==null&&m!==void 0?m:0,y=Math.max(i,p),x=Math.min(r,p+v);if(y>=x)return;let C=f.isText?f.text||"":f.textBetween(y-p,x-p,void 0,"\uFFFC");vZ(C,o.find,s).forEach(A=>{if(A.index===void 0)return;let D=y+A.index+1,z=D+A[0].length,V={from:n.tr.mapping.map(D),to:n.tr.mapping.map(z)},ce=o.handler({state:n,range:V,match:A,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(ce)})}),d.every(f=>f!==null)}var Oo=null,kZ=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function xZ(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:u,from:c,to:d,rule:f,pasteEvt:p})=>{let h=u.tr,m=od({state:u,transaction:h});if(!(!yZ({editor:t,state:m,from:Math.max(c-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:a})||!h.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,h}};return t.on("destroy",()=>{Oo===t&&(Oo=null)}),n.map(u=>new fe({view(c){let d=p=>{var h;i=!((h=c.dom.parentElement)===null||h===void 0)&&h.contains(p.target)?c.dom.parentElement:null,i&&(Oo=t)},f=()=>{Oo&&(Oo=null)};return window.addEventListener("dragstart",d),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",d),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(c,d)=>{if(o=i===c.dom.parentElement,a=d,!o){let f=Oo;f?.isEditable&&setTimeout(()=>{if(f.isDestroyed)return;let p=f.state.selection;p&&f.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(c,d)=>{var f;let p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,r=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(c,d,f)=>{let p=c[0],h=p.getMeta("uiEvent")==="paste"&&!r,m=p.getMeta("uiEvent")==="drop"&&!o,g=p.getMeta("applyPasteRules"),b=!!g;if(!h&&!m&&!b)return;if(b){let{text:x}=g;typeof x=="string"?x=x:x=jo(M.from(x),f.schema);let{from:C}=g,A=C+x.length,D=kZ(x);return l({rule:u,state:f,from:C,to:{b:A},pasteEvt:D})}let v=d.doc.content.findDiffStart(f.doc.content),y=d.doc.content.findDiffEnd(f.doc.content);if(!(!cZ(v)||!y||v===y.b))return l({rule:u,state:f,from:v,to:y,pasteEvt:s})}}))}var ud=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=QA(e),this.schema=hj(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=K(t,"addCommands",{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:No(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=Ua([...this.extensions].reverse()).flatMap(i=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:No(i.name,this.schema)},o=[],s=K(i,"addKeyboardShortcuts",r),a={};if(i.type==="mark"&&K(i,"exitable",r)&&(a.ArrowRight=()=>ft.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=gA(a);o.push(l);let u=K(i,"addInputRules",r);if(zA(i,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=bZ({editor:e,rules:f}),h=Array.isArray(p)?p:[p];o.push(...h)}}let c=K(i,"addPasteRules",r);if(zA(i,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=xZ({editor:e,rules:f});o.push(...p)}}let d=K(i,"addProseMirrorPlugins",r);if(d){let f=d();o.push(...f)}return o}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)===null||e===void 0||e.destroy();let n=[];return this.extensions.forEach(i=>{let r=K(i,"addDecorations",{name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:No(i.name,this.schema)});r&&n.push({name:i.name,addDecorations:r})}),this.decorationManager=new lZ({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){return YA(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Bo(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addNodeView")).map(n=>{let i=this.attributes.filter(a=>a.type===n.name),r=K(n,"addNodeView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:dt(n.name,this.schema)});if(!r)return[];let o=r();if(!o)return[];let s=(a,l,u,c,d)=>{let f=Hr(a,i);return o({node:a,view:l,getPos:u,decorations:c,innerDecorations:d,editor:e,extension:n,HTMLAttributes:f})};return[n.name,s]}))}dispatchTransaction(e){let{editor:t}=this;return Ua([...this.extensions].reverse()).reduceRight((n,i)=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:No(i.name,this.schema)},o=K(i,"dispatchTransaction",r);return o?s=>{o.call(r,{transaction:s,next:n})}:n},e)}transformPastedHTML(e){let{editor:t}=this;return Ua([...this.extensions]).reduce((n,i)=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:No(i.name,this.schema)},o=K(i,"transformPastedHTML",r);return o?(s,a)=>{let l=n(s,a);return o.call(r,l)}:n},e||(n=>n))}get markViews(){let{editor:e}=this,{markExtensions:t}=Bo(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addMarkView")).map(n=>{let i=this.attributes.filter(s=>s.type===n.name),r=K(n,"addMarkView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:mr(n.name,this.schema)});if(!r)return[];let o=(s,a,l)=>{let u=Hr(s,i);return r()({mark:s,view:a,inline:l,editor:e,extension:n,HTMLAttributes:u,updateAttributes:c=>{fZ(s,e,c)}})};return[n.name,o]}))}destroy(){var e;(e=this.decorationManager)===null||e===void 0||e.destroy(),this.extensions.forEach(t=>{let n=t;for(;n.parent;){let i=n.parent;i.child===n&&(i.child=null),n=i}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:No(t.name,this.schema)};if(t.type==="mark"){var i,r;(!((i=$e(K(t,"keepOnSplit",n)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(t.name),!((r=$e(K(t,"clearable",n)))!==null&&r!==void 0)||r||this.nonClearableMarks.push(t.name)}let o=K(t,"onBeforeCreate",n),s=K(t,"onCreate",n),a=K(t,"onUpdate",n),l=K(t,"onSelectionUpdate",n),u=K(t,"onTransaction",n),c=K(t,"onFocus",n),d=K(t,"onBlur",n),f=K(t,"onDestroy",n);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),u&&this.editor.on("transaction",u),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};ud.resolve=QA;ud.sort=Ua;ud.flatten=Lg;var Ae=class y6 extends jg{constructor(...t){super(...t),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new y6(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},k6=Ae.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new fe({key:new _e("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:i,selection:r}=t,o=t6(n),{blockSeparator:s}=this.options,a={...s!==void 0?{blockSeparator:s}:{},textSerializers:o};return[...r.ranges].sort((l,u)=>l.$from.pos-u.$from.pos).map(({$from:l,$to:u})=>e6(i,{from:l.pos,to:u.pos},a)).join(s??`

`)}}})]}}),x6=Ae.create({name:"commands",addCommands(){return{...Vj}}}),w6=Ae.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,i;let r=()=>{var o,s,a;if((o=(s=this.editor.options.coreExtensionOptions)===null||s===void 0||(s=s.delete)===null||s===void 0||(a=s.filterTransaction)===null||a===void 0?void 0:a.call(s,e))!==null&&o!==void 0?o:e.getMeta("y-sync$"))return;let l=Pg(e.before,[e,...t]);Zo(l).forEach(c=>{l.mapping.mapResult(c.oldRange.from).deletedAfter&&l.mapping.mapResult(c.oldRange.to).deletedBefore&&l.before.nodesBetween(c.oldRange.from,c.oldRange.to,(d,f)=>{let p=f+d.nodeSize-2,h=c.oldRange.from<=f&&p<=c.oldRange.to;this.editor.emit("delete",{type:"node",node:d,from:f,to:p,newFrom:l.mapping.map(f),newTo:l.mapping.map(p),deletedRange:c.oldRange,newRange:c.newRange,partial:!h,editor:this.editor,transaction:e,combinedTransform:l})})});let u=l.mapping;l.steps.forEach((c,d)=>{if(c instanceof ar){var f,p;let h=u.slice(d).map(c.from,-1),m=u.slice(d).map(c.to),g=u.invert().map(h,-1),b=u.invert().map(m),v=h>0?(f=l.doc.nodeAt(h-1))===null||f===void 0?void 0:f.marks.some(x=>x.eq(c.mark)):!1,y=(p=l.doc.nodeAt(m))===null||p===void 0?void 0:p.marks.some(x=>x.eq(c.mark));this.editor.emit("delete",{type:"mark",mark:c.mark,from:c.from,to:c.to,deletedRange:{from:g,to:b},newRange:{from:h,to:m},partial:!!(y||v),editor:this.editor,transaction:e,combinedTransform:l})}})};!((n=(i=this.editor.options.coreExtensionOptions)===null||i===void 0||(i=i.delete)===null||i===void 0?void 0:i.async)!==null&&n!==void 0)||n?setTimeout(r,0):r()}}),_6=Ae.create({name:"drop",addProseMirrorPlugins(){return[new fe({key:new _e("tiptapDrop"),props:{handleDrop:(e,t,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:i})}}})]}}),S6=Ae.create({name:"editable",addProseMirrorPlugins(){return[new fe({key:new _e("editable"),props:{editable:()=>this.editor.options.editable}})]}}),E6=new _e("focusEvents"),$6=Ae.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new fe({key:E6,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}}}})]}}),C6=Ae.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,g=d.pos-d.parentOffset,b=m&&h.parent.childCount===1?g===d.pos:G.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!b||b&&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 id()||JA()?o:r},addProseMirrorPlugins(){return[new fe({key:new _e("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(p=>p.getMeta("composition")))return;let i=e.some(p=>p.docChanged)&&!t.doc.eq(n.doc),r=e.some(p=>p.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)||!Ho(n.doc))return;let c=n.tr,d=od({state:n,transaction:c}),{commands:f}=new Lo({editor:this.editor,state:d});if(f.clearNodes(),!!c.steps.length)return c}})]}}),T6=Ae.create({name:"paste",addProseMirrorPlugins(){return[new fe({key:new _e("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),I6=Ae.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new fe({key:new _e("tabindex"),props:{attributes:()=>{var e;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(e=this.options.value)!==null&&e!==void 0?e:"0"}}}})]}}),A6=Ae.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Bo(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 fe({key:new _e("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),M6=l0({ClipboardTextSerializer:()=>k6,Commands:()=>x6,Delete:()=>w6,Drop:()=>_6,Editable:()=>S6,FocusEvents:()=>$6,Keymap:()=>C6,Paste:()=>T6,Tabindex:()=>I6,TextDirection:()=>A6,focusEventsPluginKey:()=>E6}),FA=!1;function wZ(e){if(FA)return;FA=!0;let t;try{t=lt.fromJSON(e,{from:0,to:0}).slice.content}catch{return}t instanceof M||console.warn("[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.")}var _Z=class Ba{get name(){return this.node.type.name}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 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!==void 0?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 Ba(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 Ba(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 Ba(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 Ba(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(a=>n[a]===s.node.attrs[a])&&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)}},SZ=`.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;
}`,z6=class extends Gj{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,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:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:wj,createMappablePosition:_j},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:n,slice:i,moved:r})=>this.options.onDrop(n,i,r)),this.on("paste",({event:n,slice:i})=>this.options.onPaste(n,i)),this.on("delete",this.options.onDelete);let t=this.createDoc();if(!this.editorState){let n=Mg(t,this.options.autofocus);this.editorState=yi.create({doc:t,schema:this.schema,selection:n||void 0})}wZ(this.schema),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){this.editorState=this.editorView.state;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?this.commandManager.chain():Lo.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Lo.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=uZ(SZ,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,attributes:this.getEditorViewAttributes()}),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 u6&&!this.hasWarnedStaleDecorationRead&&Jj(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=Dg(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 n=[...this.options.enableCoreExtensions?[S6,k6.configure({blockSeparator:(e=this.options.coreExtensionOptions)===null||e===void 0||(e=e.clipboardTextSerializer)===null||e===void 0?void 0:e.blockSeparator}),x6,$6,C6,I6.configure({value:(t=this.options.coreExtensionOptions)===null||t===void 0||(t=t.tabindex)===null||t===void 0?void 0:t.value}),_6,T6,w6,A6.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new ud(n,this)}createCommandManager(){this.commandManager=new Lo({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=zg(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;let n=zg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=yi.create({doc:n,schema:this.schema,selection:Mg(n,this.options.autofocus)||void 0}),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(i=>i.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return e}getEditorViewAttributes(){var e;let t=(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes;return Dg(t)?n=>({role:"textbox",...t(n)}):{role:"textbox",...t}}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 Oa(e,{...t,attributes:this.getEditorViewAttributes(),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||c===void 0?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 Fg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return xj(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return jo(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`

`,textSerializers:n={}}=e||{};return gj(this.state.doc,{blockSeparator:t,textSerializers:{...t6(this.schema),...n}})}get isEmpty(){return Ho(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var e,t;return(e=(t=this.editorView)===null||t===void 0?void 0:t.isDestroyed)!==null&&e!==void 0?e:!0}$node(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new _Z(t,this,!1,n)}get $doc(){return this.$pos(0)}};function kn(e){return new qo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=$e(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(ja(n.from,n.to,t.doc).filter(f=>f.mark.type.excluded.find(p=>p===e.type&&p!==f.mark.type)).filter(f=>f.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);let d=n.from+l+s.length;o.addMark(n.from+l,d,e.type.create(r||{})),o.removeStoredMark(e.type)}},undoable:e.undoable})}function cd(e){return new qo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=$e(e.getAttributes,void 0,i)||{},{tr:o}=t,s=n.from,a=n.to,l=e.type.create(r);if(i[1]){let u=s+i[0].lastIndexOf(i[1]);u>a?u=a:a=u+i[1].length;let c=i[0][i[0].length-1];o.insertText(c,s+i[0].length-1),o.replaceWith(u,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 Za(e){return new qo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=t.doc.resolve(n.from),o=$e(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 qr(e){return new qo({find:e.find,handler:({state:t,range:n,match:i,chain:r})=>{let o=$e(e.getAttributes,void 0,i)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&So(a,e.type,o);if(!l)return null;if(s.wrap(a,l),e.keepMarks&&e.editor){let{selection:c,storedMarks:d}=t,{splittableMarks:f}=e.editor.extensionManager,p=d||c.$to.parentOffset&&c.$from.marks();if(p){let h=p.filter(m=>f.includes(m.type.name));s.ensureMarks(h)}}if(e.keepAttributes){let c=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(c,o).run()}let u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&In(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,u))&&s.join(n.from-1)},undoable:e.undoable})}var EZ=e=>"touches"in e,D6=class{constructor(e){var t,n,i,r,o,s;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)},this.node=e.node,this.editor=e.editor,this.element=e.element,this.element.draggable=!1,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===void 0)&&t.min&&(this.minSize={...this.minSize,...e.options.min}),!((n=e.options)===null||n===void 0)&&n.max&&(this.maxSize=e.options.max),!(e==null||(i=e.options)===null||i===void 0)&&i.directions&&(this.directions=e.options.directions),!((r=e.options)===null||r===void 0)&&r.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),!((o=e.options)===null||o===void 0)&&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===void 0)&&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!==void 0?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,EZ(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),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;if(!n){var o,s;let u=Math.max(this.minSize.width,e),c=Math.max(this.minSize.height,t);return!((o=this.maxSize)===null||o===void 0)&&o.width&&(u=Math.min(this.maxSize.width,u)),!((s=this.maxSize)===null||s===void 0)&&s.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),!((i=this.maxSize)===null||i===void 0)&&i.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),!((r=this.maxSize)===null||r===void 0)&&r.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}}};var le=class N6 extends jg{constructor(...t){super(...t),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new N6(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function on(e){return new Zg({find:e.find,handler:({state:t,range:n,match:i,pasteEvent:r})=>{let o=$e(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(ja(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(h=>h===e.type&&h!==p.mark.type)).filter(p=>p.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 O6=new WeakSet,R6=new WeakSet;function zi(e){let t=e;return O6.add(t),t}function Hg(e){return Array.isArray(e)&&O6.has(e)}function P6(e){return e.flatMap(t=>t==null?[]:Array.isArray(t)&&R6.has(t)&&!Hg(t)?P6(t):[t])}function $Z(e,t){if(e==="slot")return 0;if(e instanceof Function){let r=e(t);return Array.isArray(r)&&!Hg(r)&&!R6.has(r)?zi(r):r}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");if(Array.isArray(n)){if(Hg(n))return zi([e,i,n]);if(n.length===0)return zi([e,i]);let r=P6(n);return r.length===0?zi([e,i]):zi([e,i,...r])}return n!=null?zi([e,i,n]):zi([e,i])}var Wo=(e,t)=>$Z(e,t);var CZ=(e,t)=>{var n;let{state:i}=e,{selection:r}=i;if(!r.empty)return!1;let{$from:o}=r;if(o.parentOffset!==0)return!1;let s=o.depth-1;if(s<0)return!1;let a=o.node(s),l=o.index(s);if(l===0)return!1;if(a.type===t)return e.commands.lift(t.name);let u=a.child(l-1);if(u.type!==t||!(!((n=u.lastChild)===null||n===void 0)&&n.isTextblock))return!1;let c=o.before()-1-1;return e.commands.command(({tr:d,dispatch:f})=>{if(!f)return!0;let p=o.parent.content,h=new B(p,0,0);return d.replace(c,o.after(),h),d.setSelection(q.create(d.doc,c+p.size)),d.scrollIntoView(),f(d),!0})},TZ=/^\s*>\s$/,L6=le.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Wo("blockquote",{...he(this.options.HTMLAttributes,e),children:Wo("slot",{})})},parseMarkdown:(e,t)=>{var n;let i=(n=t.parseBlockChildren)!==null&&n!==void 0?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 l=((s=(a=t.renderChild)===null||a===void 0?void 0:a.call(t,r,o))!==null&&s!==void 0?s:t.renderChildren([r])).split(`
`).map(u=>u.trim()===""?n:`${n} ${u}`);i.push(l.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(),Backspace:()=>CZ(this.editor,this.type)}},addInputRules(){return[qr({find:TZ,type:this.type})]}});var IZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,AZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,MZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,zZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,F6=ft.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 Wo("strong",{...he(this.options.HTMLAttributes,e),children:Wo("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[kn({find:IZ,type:this.type}),kn({find:MZ,type:this.type})]},addPasteRules(){return[on({find:AZ,type:this.type}),on({find:zZ,type:this.type})]}});var DZ=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},NZ=e=>{let t=/`([^`]+)`(?!`)/g,n=[],i;for(;(i=t.exec(e))!==null;)i.index>0&&e[i.index-1]==="`"||n.push({index:i.index,text:i[0],replaceWith:i[1]});return n};function OZ(e){let t=new Set((e.match(/`+/g)||[]).map(i=>i.length)),n=1;for(;t.has(n);)n+=1;return n}var B6=ft.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",he(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t,n)=>{var i;if(!e.content)return"";let r=typeof(n==null||(i=n.meta)===null||i===void 0?void 0:i.markText)=="string"?n.meta.markText:"",o="`".repeat(OZ(r)),s=r.startsWith("`")||r.endsWith("`")?" ":"";return`${o}${s}${t.renderChildren(e.content)}${s}${o}`},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[kn({find:DZ,type:this.type})]},addPasteRules(){return[on({find:NZ,type:this.type})]}});var qg=4,RZ=/^```([a-z]+)?[\s\n]$/,PZ=/^~~~([a-z]+)?[\s\n]$/,U6=le.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:qg,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 i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(r=>r.startsWith(n)).map(r=>r.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",he(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||n===void 0?void 0:n.startsWith("```"))===!1&&((i=e.raw)===null||i===void 0?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||n===void 0?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!==void 0?t:qg,{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,d=i.doc.textBetween(u,c,`
`,`
`).split(`
`).map(f=>a+f).join(`
`);return l.replaceWith(u,c,i.schema.text(d)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!==null&&t!==void 0?t:qg,{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(),f=i.doc.textBetween(c,d,`
`,`
`).split(`
`),p=0,h=0,m=u-c;for(let y=0;y<f.length;y+=1){if(h+f[y].length>=m){p=y;break}h+=f[y].length+1}let g=((l=f[p].match(/^ */))===null||l===void 0?void 0:l[0])||"",b=Math.min(g.length,n);if(b===0)return!0;let v=c;for(let y=0;y<p;y+=1)v+=f[y].length+1;return a.delete(v,v+b),u-v<=b&&a.setSelection(q.create(a.doc,v)),!0}):e.commands.command(({tr:a})=>{let{from:l,to:u}=r,c=i.doc.textBetween(l,u,`
`,`
`).split(`
`).map(d=>{var f;let p=((f=d.match(/^ */))===null||f===void 0?void 0:f[0])||"",h=Math.min(p.length,n);return d.slice(h)}).join(`
`);return a.replaceWith(l,u,i.schema.text(c)),!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()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type||i.parentOffset!==0)return!1;let o=i.before();return o>0?!1:e.commands.insertDefaultBlock({pos:o})},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 s=r.after();return s===void 0?!1:i.nodeAt(s)?e.commands.command(({tr:a})=>(a.setSelection(G.near(i.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[Za({find:RZ,type:this.type,getAttributes:e=>({language:e[1]})}),Za({find:PZ,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new fe({key:new _e("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(q.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});var j6=le.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`

`):""});var Z6=le.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",he(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}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var H6=le.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]}`,he(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===void 0)&&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=>Za({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var q6=le.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",he(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!m6(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,r=e();return ld(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(q.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection(X.create(s.doc,l.pos)):s.setSelection(q.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(q.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[cd({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var LZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,FZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,BZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,UZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,W6=ft.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",he(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[kn({find:LZ,type:this.type}),kn({find:BZ,type:this.type})]},addPasteRules(){return[on({find:FZ,type:this.type}),on({find:UZ,type:this.type})]}});var jZ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",ZZ="\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",Yg="numeric",Qg="ascii",eb="alpha",Wa="asciinumeric",qa="alphanumeric",tb="domain",Y6="emoji",HZ="scheme",qZ="slashscheme",Wg="whitespace";function WZ(e,t){return e in t||(t[e]=[]),t[e]}function Di(e,t,n){t[Yg]&&(t[Wa]=!0,t[qa]=!0),t[Qg]&&(t[Wa]=!0,t[eb]=!0),t[Wa]&&(t[qa]=!0),t[eb]&&(t[qa]=!0),t[qa]&&(t[tb]=!0),t[Y6]&&(t[tb]=!0);for(let i in t){let r=WZ(i,n);r.indexOf(e)<0&&r.push(e)}}function VZ(e,t){let n={};for(let i in t)t[i].indexOf(e)>=0&&(n[i]=!0);return n}function Qt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Qt.groups={};Qt.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||Qt.groups;let r;return t&&t.j?r=t:(r=new Qt(t),n&&i&&Di(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||Qt.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 Qt,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Qt,o){if(i)if(s.t&&typeof s.t=="string"){let l=Object.assign(VZ(s.t,i),n);Di(o,l,i)}else n&&Di(o,n,i);s.t=o}return r.j[e]=s,s}};var ge=(e,t,n,i,r)=>e.ta(t,n,i,r),rt=(e,t,n,i,r)=>e.tr(t,n,i,r),V6=(e,t,n,i,r)=>e.ts(t,n,i,r),P=(e,t,n,i,r)=>e.tt(t,n,i,r),vr="WORD",nb="UWORD",Q6="ASCIINUMERICAL",eM="ALPHANUMERICAL",Ya="LOCALHOST",rb="TLD",ib="UTLD",hd="SCHEME",Vo="SLASH_SCHEME",sb="NUM",ob="WS",ab="NL",Va="OPENBRACE",Ka="CLOSEBRACE",md="OPENBRACKET",gd="CLOSEBRACKET",bd="OPENPAREN",vd="CLOSEPAREN",yd="OPENANGLEBRACKET",kd="CLOSEANGLEBRACKET",xd="FULLWIDTHLEFTPAREN",wd="FULLWIDTHRIGHTPAREN",_d="LEFTCORNERBRACKET",Sd="RIGHTCORNERBRACKET",Ed="LEFTWHITECORNERBRACKET",$d="RIGHTWHITECORNERBRACKET",Cd="FULLWIDTHLESSTHAN",Td="FULLWIDTHGREATERTHAN",Id="AMPERSAND",Ad="APOSTROPHE",Md="ASTERISK",Vr="AT",zd="BACKSLASH",Dd="BACKTICK",Nd="CARET",Ni="COLON",lb="COMMA",Od="DOLLAR",qn="DOT",Rd="EQUALS",ub="EXCLAMATION",wn="HYPHEN",Ja="PERCENT",Pd="PIPE",Ld="PLUS",Fd="POUND",Ga="QUERY",cb="QUOTE",tM="FULLWIDTHMIDDLEDOT",db="SEMI",Wn="SLASH",Xa="TILDE",Bd="UNDERSCORE",nM="EMOJI",Ud="SYM",rM=Object.freeze({__proto__:null,ALPHANUMERICAL:eM,AMPERSAND:Id,APOSTROPHE:Ad,ASCIINUMERICAL:Q6,ASTERISK:Md,AT:Vr,BACKSLASH:zd,BACKTICK:Dd,CARET:Nd,CLOSEANGLEBRACKET:kd,CLOSEBRACE:Ka,CLOSEBRACKET:gd,CLOSEPAREN:vd,COLON:Ni,COMMA:lb,DOLLAR:Od,DOT:qn,EMOJI:nM,EQUALS:Rd,EXCLAMATION:ub,FULLWIDTHGREATERTHAN:Td,FULLWIDTHLEFTPAREN:xd,FULLWIDTHLESSTHAN:Cd,FULLWIDTHMIDDLEDOT:tM,FULLWIDTHRIGHTPAREN:wd,HYPHEN:wn,LEFTCORNERBRACKET:_d,LEFTWHITECORNERBRACKET:Ed,LOCALHOST:Ya,NL:ab,NUM:sb,OPENANGLEBRACKET:yd,OPENBRACE:Va,OPENBRACKET:md,OPENPAREN:bd,PERCENT:Ja,PIPE:Pd,PLUS:Ld,POUND:Fd,QUERY:Ga,QUOTE:cb,RIGHTCORNERBRACKET:Sd,RIGHTWHITECORNERBRACKET:$d,SCHEME:hd,SEMI:db,SLASH:Wn,SLASH_SCHEME:Vo,SYM:Ud,TILDE:Xa,TLD:rb,UNDERSCORE:Bd,UTLD:ib,UWORD:nb,WORD:vr,WS:ob}),gr=/[a-z]/,Ha=/\p{L}/u,Vg=/\p{Emoji}/u;var br=/\d/,Kg=/\s/;var K6="\r",Jg=`
`,KZ="\uFE0F",JZ="\u200D",Gg="\uFFFC",dd=null,fd=null;function GZ(e=[]){let t={};Qt.groups=t;let n=new Qt;dd==null&&(dd=J6(jZ)),fd==null&&(fd=J6(ZZ)),P(n,"'",Ad),P(n,"{",Va),P(n,"}",Ka),P(n,"[",md),P(n,"]",gd),P(n,"(",bd),P(n,")",vd),P(n,"<",yd),P(n,">",kd),P(n,"\uFF08",xd),P(n,"\uFF09",wd),P(n,"\u300C",_d),P(n,"\u300D",Sd),P(n,"\u300E",Ed),P(n,"\u300F",$d),P(n,"\uFF1C",Cd),P(n,"\uFF1E",Td),P(n,"&",Id),P(n,"*",Md),P(n,"@",Vr),P(n,"`",Dd),P(n,"^",Nd),P(n,":",Ni),P(n,",",lb),P(n,"$",Od),P(n,".",qn),P(n,"=",Rd),P(n,"!",ub),P(n,"-",wn),P(n,"%",Ja),P(n,"|",Pd),P(n,"+",Ld),P(n,"#",Fd),P(n,"?",Ga),P(n,'"',cb),P(n,"/",Wn),P(n,";",db),P(n,"~",Xa),P(n,"_",Bd),P(n,"\\",zd),P(n,"\u30FB",tM);let i=rt(n,br,sb,{[Yg]:!0});rt(i,br,i);let r=rt(i,gr,Q6,{[Wa]:!0}),o=rt(i,Ha,eM,{[qa]:!0}),s=rt(n,gr,vr,{[Qg]:!0});rt(s,br,r),rt(s,gr,s),rt(r,br,r),rt(r,gr,r);let a=rt(n,Ha,nb,{[eb]:!0});rt(a,gr),rt(a,br,o),rt(a,Ha,a),rt(o,br,o),rt(o,gr),rt(o,Ha,o);let l=P(n,Jg,ab,{[Wg]:!0}),u=P(n,K6,ob,{[Wg]:!0}),c=rt(n,Kg,ob,{[Wg]:!0});P(n,Gg,c),P(u,Jg,l),P(u,Gg,c),rt(u,Kg,c),P(c,K6),P(c,Jg),rt(c,Kg,c),P(c,Gg,c);let d=rt(n,Vg,nM,{[Y6]:!0});P(d,"#"),rt(d,Vg,d),P(d,KZ,d);let f=P(d,JZ);P(f,"#"),rt(f,Vg,d);let p=[[gr,s],[br,r]],h=[[gr,null],[Ha,a],[br,o]];for(let m=0;m<dd.length;m++)Wr(n,dd[m],rb,vr,p);for(let m=0;m<fd.length;m++)Wr(n,fd[m],ib,nb,h);Di(rb,{tld:!0,ascii:!0},t),Di(ib,{utld:!0,alpha:!0},t),Wr(n,"file",hd,vr,p),Wr(n,"mailto",hd,vr,p),Wr(n,"http",Vo,vr,p),Wr(n,"https",Vo,vr,p),Wr(n,"ftp",Vo,vr,p),Wr(n,"ftps",Vo,vr,p),Di(hd,{scheme:!0,ascii:!0},t),Di(Vo,{slashscheme:!0,ascii:!0},t),e=e.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<e.length;m++){let g=e[m][0],v=e[m][1]?{[HZ]:!0}:{[qZ]:!0};g.indexOf("-")>=0?v[tb]=!0:gr.test(g)?br.test(g)?v[Wa]=!0:v[Qg]=!0:v[Yg]=!0,V6(n,g,g,v)}return V6(n,"localhost",Ya,{ascii:!0}),n.jd=new Qt(Ud),{start:n,tokens:Object.assign({groups:t},rM)}}function iM(e,t){let n=XZ(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 XZ(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 Wr(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 Qt(i),o.jr=r.slice(),e.j[l]=o),e=o}return o=new Qt(n),o.jr=r.slice(),e.j[t[s-1]]=o,o}function J6(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 Qa={defaultProtocol:"http",events:null,format:G6,formatHref:G6,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function fb(e,t=null){let n=Object.assign({},Qa);e&&(n=Object.assign(n,e instanceof fb?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}fb.prototype={o:Qa,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]:Qa[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 G6(e){return e}function oM(e,t){this.t="token",this.v=e,this.tk=t}oM.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=Qa.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 jd(e,t){class n extends oM{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 YZ=jd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),X6=jd("text"),QZ=jd("nl"),pd=jd("url",{isLink:!0,toHref(e=Qa.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ya&&e[1].t===Ni}});var xn=e=>new Qt(e);function e7({groups:e}){let t=e.domain.concat([Id,Md,Vr,zd,Dd,Nd,Od,Rd,wn,sb,Ja,Pd,Ld,Fd,Wn,Ud,Xa,Bd]),n=[Ad,Ni,lb,qn,ub,Ja,Ga,cb,db,yd,kd,Va,Ka,gd,md,bd,vd,xd,wd,_d,Sd,Ed,$d,Cd,Td],i=[Id,Ad,Md,zd,Dd,Nd,Od,Rd,wn,Va,Ka,Ja,Pd,Ld,Fd,Ga,Wn,Ud,Xa,Bd],r=xn(),o=P(r,Xa);ge(o,i,o),ge(o,e.domain,o);let s=xn(),a=xn(),l=xn();ge(r,e.domain,s),ge(r,e.scheme,a),ge(r,e.slashscheme,l),ge(s,i,o),ge(s,e.domain,s);let u=P(s,Vr);P(o,Vr,u),P(a,Vr,u),P(l,Vr,u);let c=P(o,qn);ge(c,i,o),ge(c,e.domain,o);let d=xn();ge(u,e.domain,d),ge(d,e.domain,d);let f=P(d,qn);ge(f,e.domain,d);let p=xn(YZ);ge(f,e.tld,p),ge(f,e.utld,p),P(u,Ya,p);let h=P(d,wn);P(h,wn,h),ge(h,e.domain,d),ge(p,e.domain,d),P(p,qn,f),P(p,wn,h);let m=P(s,wn),g=P(s,qn);P(m,wn,m),ge(m,e.domain,s),ge(g,i,o),ge(g,e.domain,s);let b=xn(pd);ge(g,e.tld,b),ge(g,e.utld,b),ge(b,e.domain,s),ge(b,i,o),P(b,qn,g),P(b,wn,m),P(b,Vr,u);let v=P(b,Ni),y=xn(pd);ge(v,e.numeric,y);let x=xn(pd),C=xn();ge(x,t,x),ge(x,n,C),ge(C,t,x),ge(C,n,C),P(b,Wn,x),P(y,Wn,x);let A=P(a,Ni),D=P(l,Ni),z=P(D,Wn),V=P(z,Wn);ge(a,e.domain,s),P(a,qn,g),P(a,wn,m),ge(l,e.domain,s),P(l,qn,g),P(l,wn,m),ge(A,e.domain,x),P(A,Wn,x),P(A,Ga,x),ge(V,e.domain,x),ge(V,t,x),P(V,Wn,x);let ce=[[Va,Ka],[md,gd],[bd,vd],[yd,kd],[xd,wd],[_d,Sd],[Ed,$d],[Cd,Td]];for(let ze=0;ze<ce.length;ze++){let[nt,He]=ce[ze],De=P(x,nt);P(C,nt,De);let ae=xn(pd);ge(De,t,ae);let I=xn();ge(De,n,I),P(De,He,x),ge(ae,t,ae),ge(ae,n,I),ge(I,t,ae),ge(I,n,I),P(ae,He,x),P(I,He,x)}return P(r,Ya,b),P(r,ab,QZ),{start:r,tokens:rM}}function t7(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(Xg(X6,t,s)),s=[]),r-=f,c-=f;let p=d.t,h=n.slice(r-c,r);o.push(Xg(p,t,h))}}return s.length>0&&o.push(Xg(X6,t,s)),o}function Xg(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 n7=typeof console<"u"&&console&&console.warn||(()=>{}),r7="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ve={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function sM(){return Qt.groups={},Ve.scanner=null,Ve.parser=null,Ve.tokenQueue=[],Ve.pluginQueue=[],Ve.customSchemes=[],Ve.initialized=!1,Ve}function pb(e,t=!1){if(Ve.initialized&&n7(`linkifyjs: already initialized - will not register custom scheme "${e}" ${r7}`),!/^[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`);Ve.customSchemes.push([e,t])}function i7(){Ve.scanner=GZ(Ve.customSchemes);for(let e=0;e<Ve.tokenQueue.length;e++)Ve.tokenQueue[e][1]({scanner:Ve.scanner});Ve.parser=e7(Ve.scanner.tokens);for(let e=0;e<Ve.pluginQueue.length;e++)Ve.pluginQueue[e][1]({scanner:Ve.scanner,parser:Ve.parser});return Ve.initialized=!0,Ve}function Zd(e){return Ve.initialized||i7(),t7(Ve.parser.start,e,iM(Ve.scanner.start,e))}Zd.scan=iM;function hb(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 fb(n),r=Zd(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 Hd="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",o7=new RegExp(Hd),s7=new RegExp(`${Hd}$`),a7=new RegExp(`${Hd}+$`),l7=new RegExp(Hd,"g");function u7(e,t,n){var i,r;let o=e.doc.resolve(t.to);if(!(!((i=o.nodeBefore)===null||i===void 0)&&i.isText))return;let s=(r=e.doc.textBetween(t.from,t.to,"\uFFFC","\uFFFC").match(a7))===null||r===void 0?void 0:r[0];if(!s)return;let a=t.to-s.length,l=ja(a,t.to,e.doc).filter(d=>d.mark.type===n);if(!l.length)return;let{nodeAfter:u}=o;if(u&&l.some(d=>d.mark.isInSet(u.marks)))return;let c=e.storedMarks;e.removeMark(a,t.to,n),e.setStoredMarks(c),e.selection.empty&&e.selection.from===t.to&&e.removeStoredMark(n)}function c7(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function d7(e){return new fe({key:new _e("autolink"),appendTransaction:(t,n,i)=>{let r=t.some(l=>l.docChanged)&&!n.doc.eq(i.doc),o=t.some(l=>l.getMeta("preventAutolink"));if(!r||o)return;let{tr:s}=i,a=Pg(n.doc,[...t]);if(!t.some(_A)){let l=[];a.steps.forEach((u,c)=>{if(!(u instanceof lt)||!u.slice.size)return;let d=a.mapping.slice(c+1),f=d.map(u.from,1),p=d.map(u.from+u.slice.size,-1);f<p&&l.push({from:f,to:p})}),l.sort((u,c)=>c.to-u.to),l.forEach(u=>u7(s,u,e.type))}if(Zo(a).forEach(({newRange:l})=>{let u=XA(i.doc,l,f=>f.isTextblock),c,d;if(u.length>1)c=u[0],d=i.doc.textBetween(c.pos,c.pos+c.node.nodeSize,void 0," ");else if(u.length){let f=i.doc.textBetween(l.from,l.to," "," ");if(!s7.test(f))return;c=u[0],d=i.doc.textBetween(c.pos,l.to,void 0," ")}if(c&&d){let f=d.split(o7).filter(Boolean);if(f.length<=0)return!1;let p=f[f.length-1],h=c.pos+d.lastIndexOf(p);if(!p)return!1;let m=Zd(p).map(g=>g.toObject(e.defaultProtocol));if(!c7(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:h+g.start+1,to:h+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=>{ja(g.from,g.to,i.doc).some(b=>b.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function f7(e){return new fe({key:new _e("handleClickLink"),props:{handleClick:(t,n,i)=>{if(i.button!==0||!t.editable)return!1;let r=null;if(i.target instanceof HTMLAnchorElement)r=i.target;else{let l=i.target;if(!l)return!1;let u=e.editor.view.dom;r=l.closest("a"),r&&!u.contains(r)&&(r=null)}if(!r)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var s,a;let l=Fg(t.state,e.type.name),u=(s=r.href)!==null&&s!==void 0?s:l.href,c=(a=r.target)!==null&&a!==void 0?a:l.target;u&&(window.open(u,c),o=!0)}return o}}})}var p7=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,h7=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function aM(e,t){let n=0;for(let i=t-1;i>=0&&e[i]==="\\";i-=1)n+=1;return n%2===1}function m7(e,t){let n=0,i=0;for(;i<t;){if(e[i]!=="`"){i+=1;continue}if(n===0&&aM(e,i)){i+=1;continue}let r=0;for(;i<t&&e[i]==="`";)r+=1,i+=1;n===0?n=r:r===n&&(n=0)}return n>0}function lM(e,t,n){var i,r;let[,o,s]=t;return(t.index?e[t.index-1]:void 0)==="!"||aM(e,(i=t.index)!==null&&i!==void 0?i:0)||m7(e,(r=t.index)!==null&&r!==void 0?r:0)?!1:!!o.trim()&&n(s)}function uM(e){var t,n;let[i,r,o,,s,a,l]=e,u=(t=s??a)!==null&&t!==void 0?t:l;return{index:(n=e.index)!==null&&n!==void 0?n:0,text:i,replaceWith:r,data:{href:o,title:u||null,markdown:!0}}}function g7(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function cM(e){var t,n,i;return{href:(t=e.data)===null||t===void 0?void 0:t.href,title:(n=(i=e.data)===null||i===void 0?void 0:i.title)!==null&&n!==void 0?n:null}}function b7(e){let t=kn({find:n=>{let i=p7.exec(n);return!i||!lM(n,i,e.isAllowedHref)?null:uM(i)},type:e.type,getAttributes:cM});return new qo({find:t.find,handler:n=>{let i=t.handler(n);return i!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),i}})}function v7(e){let t=on({find:n=>{var i,r;let o=[];for(let a of n.matchAll(h7))lM(n,a,e.isAllowedHref)&&o.push(uM(a));let s=((i=(r=e.findPlainUrls)===null||r===void 0?void 0:r.call(e,n))!==null&&i!==void 0?i:[]).filter(a=>!o.some(l=>g7(l,a)));return[...o,...s]},type:e.type,getAttributes:cM});return new Zg({find:t.find,handler:n=>{var i;let r=t.handler(n);return r!==null&&n.state.tr.steps.length&&(!((i=n.match.data)===null||i===void 0)&&i.markdown)&&n.state.tr.setMeta("preventAutolink",!0),r}})}function y7(e){return new fe({key:new _e("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=hb(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 yr(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(l7,"").match(new RegExp(`^(?:(?:${n.map(i=>i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var dM=ft.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"){pb(e);return}pb(e.scheme,e.optionalSlashes)})},onDestroy(){sM()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!yr(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 i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(i){return i.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!==null&&e!==void 0?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!==null&&t!==void 0?t:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!yr(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=>!!yr(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",he(this.options.HTMLAttributes,e),0]:["a",he(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=(n=(i=e.attrs)===null||i===void 0?void 0:i.href)!==null&&n!==void 0?n:"",a=(r=(o=e.attrs)===null||o===void 0?void 0:o.title)!==null&&r!==void 0?r:"",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=>!!yr(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=>!!yr(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()}},addInputRules(){return this.options.markdownLinks?[b7({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!yr(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=t=>{let n=[];if(t){let{protocols:i,defaultProtocol:r}=this.options;hb(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!yr(s,i),protocols:i,defaultProtocol:r})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[v7({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!yr(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[on({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(d7({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!yr(r,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(f7({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(y7({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var k7="listItem",fM="textStyle",pM=/^\s*([-+*])\s$/,mb=le.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",he(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(k7,this.editor.getAttributes(fM)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=qr({find:pM,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=qr({find:pM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(fM),editor:this.editor})),[e]}}),x7=(e,t,n)=>{let{selection:i}=e;if(!i.empty)return null;let{$from:r}=i;if(!r.parent.isTextblock||r.parentOffset!==r.parent.content.size)return null;let o=-1;for(let p=r.depth;p>0;p-=1)if(r.node(p).type.name===t){o=p;break}if(o<0)return null;let s=r.node(o),a=r.index(o);if(a+1>=s.childCount)return null;let l=s.child(a+1);if(!n.includes(l.type.name))return null;let u=e.schema.nodes[t],c=!1;if(l.forEach(p=>{p.type===u&&p.childCount>1&&(c=!0)}),!c)return null;let d=e.doc.resolve(r.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let f=[];return d.forEach(p=>{f.push(p)}),f.length===0?null:{listItemDepth:o,nestedList:d,nestedListPos:r.after(),insertPos:r.after(o),items:f}},w7=(e,t,n,i)=>{let r=x7(e,n,i);if(!r)return!1;let{selection:o}=e,{nestedList:s,nestedListPos:a,insertPos:l,items:u}=r,c=e.tr;c.delete(a,a+s.nodeSize);let d=c.mapping.map(l);return c.insert(d,M.from(u)),c.setSelection(o.map(c.doc,c.mapping)),t&&t(c),!0},_7=(e,t,n)=>w7(e.state,e.view.dispatch,t,n),xM=(e,t)=>Ae.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>_7(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),wM=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],qd="abcdefghijklmnopqrstuvwxyz",_M=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function Kd(e){let t=e,n="";for(let[i,r]of wM)for(;t>=i;)n+=r,t-=i;return n}function gb(e){return Kd(e).toUpperCase()}function SM(e){let t=e.toLowerCase(),n=0,i=0;for(;n<t.length;){let r=!1;for(let[o,s]of wM)if(t.startsWith(s,n)){i+=o,n+=s.length,r=!0;break}if(!r)return 0}return i}function S7(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=SM(e);return t<=0?!1:(e===e.toLowerCase()?Kd(t):gb(t))===e}function E7(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let n=t.charCodeAt(0)-97,i=t.charCodeAt(1)-97;return(n+1)*26+i+1}return 0}function Wd(e){if(e<=26)return qd[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?qd[n]:qd[t]+qd[n]}function Jd(e){if(!(!e||/^\d+$/.test(e))){if(S7(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function bb(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=Jd(e);if(t==="i"||t==="I")return SM(e);if(t==="a"||t==="A"){let i=E7(e);return i>0?i:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function $7(e,t){if(e==="numeric")return String(t);switch(e){case"a":return Wd(t);case"A":return Wd(t).toUpperCase();case"i":return Kd(t);case"I":return gb(t);default:return String(t)}}function C7(e){var t;if(e.length===0)return!1;let n=(t=Jd(e[0]))!==null&&t!==void 0?t:"numeric",i=bb(e[0]);if(i<1)return!1;for(let r=0;r<e.length;r++){let o=$7(n,i+r);if(e[r]!==o)return!1}return!0}function T7(e){return{type:Jd(e),start:bb(e)}}function I7(e){let{type:t,start:n}=T7(e),i={};return t&&(i.type=t),n!==1&&(i.start=n),i}function A7(e,t,n=". "){let i=t+1;if(!e||e==="1")return`${i}${n}`;switch(e){case"a":return`${Wd(i)}${n}`;case"A":return`${Wd(i).toUpperCase()}${n}`;case"i":return`${Kd(i)}${n}`;case"I":return`${gb(i)}${n}`;default:return`${i}${n}`}}function M7(e){var t,n;let i=(t=e.tokens)===null||t===void 0?void 0:t[0];return!!(e.text&&((n=e.tokens)===null||n===void 0?void 0:n.length)===1&&i?.type==="list"&&i.ordered&&i.raw===e.text)}function z7(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:"text",raw:e,text:e}])}var vb=le.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",he(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!==void 0?n:t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(M7(e))return{type:"listItem",content:[{type:"paragraph",content:z7(e.text||"",t)}]};if(e.tokens.some(o=>o.type==="paragraph"))r=i(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(r=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=i(e.tokens.slice(1));r.push(...s)}}else r=i(e.tokens)}}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(e,t,n)=>Ug(e,t,i=>{if(i.parentType==="bulletList")return"- ";if(i.parentType==="orderedList"){var r,o;let s=((r=i.meta)===null||r===void 0||(r=r.parentAttrs)===null||r===void 0?void 0:r.start)||1;return A7((o=i.meta)===null||o===void 0||(o=o.parentAttrs)===null||o===void 0?void 0:o.type,s-1+(i.index||0),". ")}return"- "},n,{alignNestedToPrefix:n?.parentType==="orderedList"}),addExtensions(){return[xM(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),yb=(e,t)=>{let{$from:n}=t.selection,i=dt(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}},EM=(e,t)=>{let n=yb(e,t);if(!n)return!1;let[,i]=n6(t,e,n.$pos.pos+4);return i},D7=(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))},hM=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Hn(e.state,t)&&D7(e.state,t,n)){let{$anchor:o}=e.state.selection,s=e.state.doc.resolve(o.before()-1),a=[];s.node().descendants((c,d)=>{c.type.name===t&&a.push({node:c,pos:d})});let l=a.at(-1);if(!l)return!1;let u=e.state.doc.resolve(s.start()+l.pos+1);return e.chain().cut({from:o.start()-1,to:o.end()+1},u.end()).joinForward().run()}if(!Hn(e.state,t)||!o6(e.state))return!1;let{$from:i}=e.state.selection,r=i.depth-1;return i.node(r).type!==e.schema.nodes[t]||i.index(r)!==0?!1:e.chain().liftListItem(t).run()},N7=(e,t)=>{let n=EM(e,t),i=yb(e,t);return!i||!n?!1:n>i.depth},O7=(e,t)=>{let n=EM(e,t),i=yb(e,t);return!i||!n?!1:n<i.depth},mM=(e,t)=>{if(!Hn(e.state,t)||!i6(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:r}=n;return!n.empty&&i.sameParent(r)?!1:N7(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():O7(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},R7=(e,t,n)=>{let{state:i}=e,{selection:r}=i;if(!r.empty)return!1;let{$from:o}=r;if(o.parentOffset!==0||!o.parent.isTextblock||Hn(i,t))return!1;let s=r6(o);if(!s||!n.includes(s.type.name))return!1;let a=s.lastChild;if(!a||a.type.name!==t)return!1;let l=o.parent;if(!a.canReplace(a.childCount,a.childCount,M.from(l)))return!1;let u=o.before(),c=o.after(),d=u-2;return e.commands.command(({tr:f,dispatch:p})=>(p&&(f.delete(u,c).insert(d,M.from(l)),f.setSelection(q.create(f.doc,d+1)),f.scrollIntoView()),!0))};var kb=Ae.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&&mM(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&&mM(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&&hM(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&&hM(e,n,i)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&R7(e,t,n))return!0;return!1}}}}),Vd=new RegExp(`^(\\s*)(${_M})([.)])\\s+(.*)$`),P7=/^\s/,Ko={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function L7(e){return Vd.test(e.trimStart())}function F7(e){let t=e.trimStart();return Ko.bulletItem.test(t)||L7(t)||Ko.heading.test(t)||Ko.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Ko.codeFence.test(t)||Ko.blockMath.test(t)}function B7(e){return Object.values(Ko).some(t=>t.test(e))}function U7(e){let t=[],n=[],i=!1;return e.forEach(r=>{if(i){n.push(r);return}if(r.trim()===""){i=!0,n.push(r);return}if(t.length>0&&F7(r)){i=!0,n.push(r);return}t.push(r)}),{paragraphLines:t,blockLines:n}}function gM(e){let t=[],n=0,i=0;for(;n<e.length;){let r=e[n],o=r.match(Vd);if(!o)break;let[,s,a,l,u]=o,c=s.length,d=parseInt(a,10),f=isNaN(d)?Jd(a):void 0,p=isNaN(d)?bb(a):d,h=[u],m=n+1,g=[r],b=!1;for(;m<e.length;){let v=e[m];if(v.match(Vd))break;if(v.trim()==="")g.push(v),h.push(""),b=!0,m+=1;else if(v.match(P7)){let y=v.length-v.trimStart().length,x=c+a.length+1;g.push(v),h.push(v.slice(Math.min(y,x))),m+=1}else{if(b||B7(v))break;g.push(v),h.push(v),m+=1}}t.push({indent:c,number:p,type:f,content:h.join(`
`).trim(),contentLines:h,raw:g.join(`
`)}),i=m,n=m}return[t,i]}var j7=new RegExp(`^(${_M})([.)])\\s+(.+)$`);function Z7(e){let t=e.split(`
`).filter(i=>i.trim().length>0);if(t.length===0)return null;let n=[];for(let i of t){let r=i.trim().match(j7);if(!r)return null;n.push({marker:r[1],content:r[3]})}return C7(n.map(i=>i.marker))?{type:"orderedList",attrs:I7(n[0].marker),content:n.map(i=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:i.content}]}]}))}:null}function $M(e,t,n){let i=[],r=0;for(;r<e.length;){let o=e[r];if(o.indent===t){let{paragraphLines:s,blockLines:a}=U7(o.contentLines),l=s.join(`
`).trim(),u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.join(`
`).trim();if(c){let p=n.blockTokens(c);u.push(...p)}let d=r+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let p=$M(f,Math.min(...f.map(h=>h.indent)),n);u.push({type:"list",ordered:!0,start:f[0].number,typeMarker:f[0].type,items:p,raw:f.map(h=>h.raw).join(`
`)})}i.push({type:"list_item",raw:o.raw,tokens:u}),r=d}else r+=1}return i}function H7(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 q7=64;function bM(e,t){let n=[],i=0;for(;n.length<t;){let r=e.indexOf(`
`,i);if(r===-1)return n.push(e.slice(i)),n;n.push(e.slice(i,r)),i=r+1}return n}function W7(e){let t=e.indexOf(`
`),n=t===-1?e:e.slice(0,t);if(!Vd.test(n))return[[],0,[]];let i=q7,r=bM(e,i),o=gM(r);for(;o[1]===r.length&&r.length===i;)i*=2,r=bM(e,i),o=gM(r);return[o[0],o[1],r]}var V7="listItem",vM="textStyle",yM=/^(\d+)\.\s$/;function kM(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var xb=le.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=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let r=kM(n);if(r)return r}let i=e.querySelector("li");if(i){let r=i.getAttribute("style");if(r){let o=kM(r);if(o)return o}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...i}=e,r=he(this.options.HTMLAttributes,i);return t!==1&&(r.start=t),n&&n!=="1"&&(r.type=n),["ol",r,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,i=e.typeMarker,r=e.items?H7(e.items,t):[],o={};return n!==1&&(o.start=n),i&&(o.type=i),Object.keys(o).length>0?{type:"orderedList",attrs:o,content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var i,r;let[o,s,a]=W7(e);if(o.length===0)return;let l=$M(o,o[0].indent,n);if(l.length!==0)return{type:"list",ordered:!0,start:((i=o[0])===null||i===void 0?void 0:i.number)||1,typeMarker:(r=o[0])===null||r===void 0?void 0:r.type,items:l,raw:a.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(V7,this.editor.getAttributes(vM)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new fe({props:{handlePaste:(e,t)=>{var n,i;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html");if(r?.trim())return!1;let o=(i=t.clipboardData)===null||i===void 0?void 0:i.getData("text/plain");if(!o)return!1;let s=Z7(o);if(!s)return!1;try{let a=e.state.schema.nodeFromJSON(s),l=e.state.tr.replaceSelectionWith(a);return e.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){let e=(n,i)=>(!i.attrs.type||i.attrs.type==="1")&&i.childCount+i.attrs.start===+n[1],t=qr({find:yM,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=qr({find:yM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(vM)}),joinPredicate:e,editor:this.editor})),[t]}}),K7=/^\s*(\[([( |x])?\])\s$/,J7="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",G7=(e,t,n)=>{var i;return(n==null||(i=n.checkboxLabel)===null||i===void 0?void 0:i.call(n,e,t))||`Task item checkbox for ${e.textContent||"empty task item"}`},X7=le.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,contentElement:e=>{var t;return(t=e.querySelector("div"))!==null&&t!==void 0?t:e}}]},renderHTML({node:e,HTMLAttributes:t}){return["li",he(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 i=`- [${!((n=e.attrs)===null||n===void 0)&&n.checked?"x":" "}] `;return Ug(e,t,i)},addExtensions(){return this.options.nested?[xM(this.name,[this.options.taskListTypeName])]:[]},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");s.style.cssText=J7;let u=d=>{let f=G7(d,d.attrs.checked,this.options.a11y);a.setAttribute("aria-label",f),s.textContent=f};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=Hr(d,f),h=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return c.forEach(g=>{h.has(g)||(g in m?r.setAttribute(g,m[g]):r.removeAttribute(g))}),Object.entries(p).forEach(([g,b])=>{b==null?g in m?r.setAttribute(g,m[g]):r.removeAttribute(g):r.setAttribute(g,b)}),c=h,!0}}}},addInputRules(){return[qr({find:K7,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Y7=le.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",he(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||t===void 0?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let i=o=>{let s=Bg(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);if(s){let a={type:"taskList",raw:s.raw,items:s.items},l=o.slice(s.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(o)},r=Bg(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()}}}),_ie=Ae.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(mb.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(vb.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(kb.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(xb.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(X7.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Y7.configure(this.options.taskList)),e}});var Gd="&nbsp;",wb="\xA0",CM=le.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",he(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===Gd||n[0].text===Gd||n[0].raw===wb||n[0].text===wb)&&i.length===1&&i[0].type==="text"&&(i[0].text===Gd||i[0].text===wb)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,i)},renderMarkdown:(e,t,n)=>{if(!e)return"";let i=Array.isArray(e.content)?e.content:[];if(i.length===0){var r,o;let s=Array.isArray(n==null||(r=n.previousNode)===null||r===void 0?void 0:r.content)?n.previousNode.content:[];return(n==null||(o=n.previousNode)===null||o===void 0?void 0:o.type)==="paragraph"&&s.length===0?Gd:""}return t.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Q7=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,eH=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,TM=ft.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",he(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[kn({find:Q7,type:this.type})]},addPasteRules(){return[on({find:eH,type:this.type})]}});var IM=le.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var AM=ft.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",he(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 i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;let r=i[2].trim();return{type:"underline",raw:i[0],text:r,tokens:n.inlineTokens(r)}}},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 MM(e={}){return new fe({view(t){return new _b(t,e)}})}var _b=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 g=this.width/2*a;i={left:h.left,right:h.right,top:m-g,bottom:m+g}}}}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=Dc(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 Bt=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 Sb(this.anchor)}static valid(t){let n=t.parent;if(n.inlineContent||!tH(t)||!nH(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&&!X.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}}};Bt.prototype.visible=!1;Bt.findFrom=Bt.findGapCursorFrom;G.jsonID("gapcursor",Bt);var Sb=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 Bt.valid(n)?new Bt(n):G.near(n)}};function zM(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function tH(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||zM(r.type))return!0;if(r.inlineContent)return!1}}return!0}function nH(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||zM(r.type))return!0;if(r.inlineContent)return!1}}return!0}function DM(){return new fe({props:{decorations:sH,createSelectionBetween(e,t,n){return t.pos==n.pos&&Bt.valid(n)?new Bt(n):null},handleClick:iH,handleKeyDown:rH,handleDOMEvents:{beforeinput:oH}}})}var rH=Fa({ArrowLeft:Xd("horiz",-1),ArrowRight:Xd("horiz",1),ArrowUp:Xd("vert",-1),ArrowDown:Xd("vert",1)});function Xd(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 q){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let u=Bt.findGapCursorFrom(a,t,l);return u?(r&&r(i.tr.setSelection(new Bt(u))),!0):!1}}function iH(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!Bt.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&X.isSelectable(e.state.doc.nodeAt(r.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Bt(i))),!0)}function oH(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Bt))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=M.empty;for(let s=i.length-1;s>=0;s--)r=M.from(i[s].createAndFill(null,r));let o=e.state.tr.replace(n.pos,n.pos,new B(r,0,0));return o.setSelection(q.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function sH(e){if(!(e.selection instanceof Bt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ie.create(e.doc,[gt.widget(e.selection.head,t,{key:"gapcursor"})])}var Xie=Ae.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,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 n=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(n)}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 fe({key:new _e("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;let r=this.options.limit,o=this.options.autoTrim;if(r==null||r===0||o===!1){e=!0;return}let s=this.storage.characters({node:i.doc});if(s>r){let a=s-r,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);let c=i.tr.deleteRange(l,u);return e=!0,c}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 s=t.selection.$head.pos,a=s-(o-i),l=s;return t.deleteRange(a,l),!(this.storage.characters({node:t.doc})>i)}})]}}),RM=Ae.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[MM(this.options)]}}),Yie=Ae.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new fe({key:new _e("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return Ie.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(!l.isText){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(gt.node(u,u+l.nodeSize,{class:this.options.className}))}),Ie.create(e,o)}}})]}}),PM=Ae.create({name:"gapCursor",addProseMirrorPlugins(){return[DM()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=$e(K(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),LM="placeholder",NM=new _e("tiptap__placeholder");function FM(e){let{editor:t,placeholder:n,dataAttribute:i,pos:r,node:o,isEmptyDoc:s,hasAnchor:a,classes:{emptyNode:l,emptyEditor:u}}=e,c=[l];return s&&c.push(u),gt.node(r,r+o.nodeSize,{class:c.join(" "),[i]:typeof n=="function"?n({editor:t,node:o,pos:r,hasAnchor:a}):n})}function BM(e,t){return typeof e=="function"?e(t):e}function UM({editor:e,options:t,dataAttribute:n,doc:i,selection:r,from:o,to:s}){let{anchor:a}=r,l=[],u=e.isEmpty;return i.nodesBetween(o,s,(c,d)=>{let f=a>=d&&a<=d+c.nodeSize,p=!c.isLeaf&&Ho(c);return c.type.isTextblock&&(f||!t.showOnlyCurrent)&&p&&l.push(FM({editor:e,isEmptyDoc:u,dataAttribute:n,hasAnchor:f,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:BM(t.emptyNodeClass,{editor:e,node:c,pos:d,hasAnchor:f})},node:c,pos:d})),t.includeChildren}),l}function jM({editor:e,options:t,dataAttribute:n,doc:i,selection:r}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:o}=r,s=[],a=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let l=i.resolve(o),u=l.depth>0?l.node(1):l.nodeAfter,c=l.depth>0?l.before(1):o;if(u&&u.type.isTextblock&&Ho(u)){let d=o>=c&&o<=c+u.nodeSize;s.push(FM({editor:e,isEmptyDoc:a,dataAttribute:n,hasAnchor:d,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:BM(t.emptyNodeClass,{editor:e,node:u,pos:c,hasAnchor:d})},node:u,pos:c}))}}else s.push(...UM({editor:e,options:t,dataAttribute:n,doc:i,selection:r,from:0,to:i.content.size}));return Ie.create(i,s)}function el(e,t){let n=e.resolve(t);if(n.depth===0){var i;let o=(i=n.nodeAfter)!==null&&i!==void 0?i:n.nodeBefore;if(!o)return{from:t,to:t};let s=n.nodeAfter?t:t-o.nodeSize;return{from:s,to:s+o.nodeSize}}let r=n.before(1);return{from:r,to:r+n.node(1).nodeSize}}function tl(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function aH(e,t,n){let i=[];return e.forEach((r,o)=>{let s=o,a=s+r.nodeSize,l=s+1,u=a+1;l<n&&u>t&&i.push({from:s,to:a})}),i}function lH(e){if(e.length===0)return[];let t=[...e].sort((i,r)=>i.from-r.from),n=[{...t[0]}];for(let i=1;i<t.length;i+=1){let r=n[n.length-1],o=t[i];o.from<=r.to?r.to=Math.max(r.to,o.to):n.push({...o})}return n}function uH(e,t){let n=aH(e,t.from,t.to);return n.push(tl(e,el(e,t.from))),t.to>t.from?n.push(tl(e,el(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(tl(e,el(e,Math.min(t.from+1,e.content.size)))),n}function cH(e,t,n){let i=[];if(e.docChanged){let r=Zo(e);for(let o of r)i.push(...uH(n.doc,o.newRange))}return e.selectionSet&&(i.push(tl(n.doc,el(n.doc,e.mapping.map(t.selection.anchor)))),i.push(tl(n.doc,el(n.doc,n.selection.anchor)))),lH(i)}function dH(e,t,n){let i=Math.max(0,Math.min(e,n.content.size));return{from:i,to:Math.max(i,Math.min(t,n.content.size))}}function fH({decorations:e,ranges:t,editor:n,options:i,dataAttribute:r,doc:o,selection:s}){let a=e;for(let l of t){let{from:u,to:c}=dH(l.from,l.to,o),d=a.find(u,c).filter(p=>p.from>=u&&p.to<=c);d.length&&(a=a.remove(d));let f=UM({editor:n,options:i,dataAttribute:r,doc:o,selection:s,from:u,to:c});f.length&&(a=a.add(o,f))}return a}function pH({editor:e,options:t,dataAttribute:n}){return{init(i,r){let o=jM({editor:e,options:t,dataAttribute:n,doc:r.doc,selection:r.selection});return o??Ie.empty},apply(i,r,o,s){return!i.docChanged&&!i.selectionSet?r:fH({decorations:r.map(i.mapping,i.doc),ranges:cH(i,o,s),editor:e,options:t,dataAttribute:n,doc:s.doc,selection:s.selection})}}}function hH(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function mH({editor:e,options:t}){let n=t.dataAttribute?`data-${hH(t.dataAttribute)}`:`data-${LM}`,i=t.showOnlyCurrent&&!t.includeChildren;return new fe({key:NM,...i?{}:{state:pH({editor:e,options:t,dataAttribute:n})},props:{decorations:i?({doc:r,selection:o})=>jM({editor:e,options:t,dataAttribute:n,doc:r,selection:o}):r=>{var o;return t.showOnlyWhenEditable&&!e.isEditable?Ie.empty:(o=NM.getState(r))!==null&&o!==void 0?o:Ie.empty}}})}var Qie=Ae.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:LM,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[mH({editor:this.editor,options:this.options})]}});function Eb(e,t){return!e.selection.empty&&!ld(e.selection)&&t.isEditable}function gH(e,t){return Eb(e,t)&&!t.isFocused&&!t.view.dragging}function bH(){var e;(e=window.getSelection())===null||e===void 0||e.removeAllRanges()}function vH(e){e.focus()}var eoe=Ae.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new fe({key:new _e("selection"),props:{decorations(n){return gH(n,e)?Ie.create(n.doc,[gt.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(n){return Eb(n.state,e)&&bH(),!1},focus(n){return Eb(n.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&n.hasFocus()&&vH(n)}),!1}}}})]}});function OM({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var ZM=Ae.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new _e(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)===null||e===void 0?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 fe({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("skipTrailingNode"))&&c)return l.insert(d,f.create())},state:{init:(r,o)=>{let s=o.tr.doc.lastChild;return!OM({node:s,types:i})},apply:(r,o)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return o;let s=r.doc.lastChild;return!OM({node:s,types:i})}}})]}}),HM=Ae.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>$g(e,t),redo:()=>({state:e,dispatch:t})=>Cg(e,t)}},addProseMirrorPlugins(){return[wA(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 yH=Ae.create({name:"starterKit",addExtensions(){let e=[];if(this.options.bold!==!1&&e.push(F6.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(L6.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(mb.configure(this.options.bulletList)),this.options.code!==!1&&e.push(B6.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(U6.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(j6.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(RM.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(PM.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Z6.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(H6.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(HM.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(q6.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(W6.configure(this.options.italic)),this.options.listItem!==!1&&e.push(vb.configure(this.options.listItem)),this.options.listKeymap!==!1){var t;e.push(kb.configure((t=this.options)===null||t===void 0?void 0:t.listKeymap))}if(this.options.link!==!1){var n;e.push(dM.configure((n=this.options)===null||n===void 0?void 0:n.link))}if(this.options.orderedList!==!1&&e.push(xb.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(CM.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(TM.configure(this.options.strike)),this.options.text!==!1&&e.push(IM.configure(this.options.text)),this.options.underline!==!1){var i;e.push(AM.configure((i=this.options)===null||i===void 0?void 0:i.underline))}if(this.options.trailingNode!==!1){var r;e.push(ZM.configure((r=this.options)===null||r===void 0?void 0:r.trailingNode))}return e}}),qM=yH;var kH=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,xH=le.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",he(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=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",l=(i=(r=e.attrs)===null||r===void 0?void 0:r.alt)!==null&&i!==void 0?i:"",u=(o=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&o!==void 0?o:"";return u?`![${l}](${a} "${u}")`:`![${l}](${a})`},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,r=new Set(["src","width","height"]);return({node:o,getPos:s,HTMLAttributes:a,editor:l})=>{let u=document.createElement("img");u.draggable=!1;let c=he(this.options.HTMLAttributes,a);Object.entries(c).forEach(([b,v])=>{if(v!=null)switch(b){case"src":case"width":case"height":break;default:u.setAttribute(b,v)}}),c.src!==null&&(u.src=c.src);let d={...a},f=b=>{if(typeof b=="string"&&b!==""){u.getAttribute("src")!==b&&(u.src=b);return}u.hasAttribute("src")&&u.removeAttribute("src"),u.src!==""&&(u.src="")};f(a.src);let p=b=>{if(b.type!==o.type)return!1;let v=l.extensionManager.attributes.filter(x=>x.type===b.type.name),y=Hr(b,v);return Object.keys(d).forEach(x=>{!r.has(x)&&!(x in y)&&u.removeAttribute(x)}),Object.entries(y).forEach(([x,C])=>{r.has(x)||(C!=null?u.setAttribute(x,C):u.removeAttribute(x))}),f(y.src),d=y,!0},h=new D6({element:u,editor:l,node:o,getPos:s,onResize:(b,v)=>{u.style.width=`${b}px`,u.style.height=`${v}px`},onCommit:(b,v)=>{let y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:b,height:v}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:i===!0}}),m=h.dom,g=()=>{m.style.visibility="",m.style.pointerEvents=""};return m.style.visibility="hidden",m.style.pointerEvents="none",u.complete&&u.naturalWidth>0?g():(u.onload=g,u.onerror=g),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[cd({find:kH,type:this.type,getAttributes:e=>{let[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}}),WM=xH;var Cb,Tb;if(typeof WeakMap<"u"){let e=new WeakMap;Cb=t=>e.get(t),Tb=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;Cb=i=>{for(let r=0;r<e.length;r+=2)if(e[r]==i)return e[r+1]},Tb=(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 Cb(e)||Tb(e,wH(e))}};function wH(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);let t=_H(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:g,rowspan:b,colwidth:v}=m.attrs;for(let y=0;y<b;y++){if(y+u>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:c,n:b-y});break}let x=r+y*t;for(let C=0;C<g;C++){i[x+C]==0?i[x+C]=c:(o||(o=[])).push({type:"collision",row:u,pos:c,n:g-C});let A=v&&v[C];if(A){let D=(x+C)%t*2,z=s[D];z==null||z!=A&&s[D+1]==1?(s[D]=A,s[D+1]=1):z==A&&s[D+1]++}}}r+=g,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&&SH(a,s,e),a}function _H(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 SH(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=EH(l)))[u]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function EH(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Ut(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 Kr=new _e("selectingCells");function Oi(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 $H(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 Mn(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 rf(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=Oi(t.$head)||CH(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function CH(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 Ib(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function TH(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function zb(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function nz(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 Ri(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 rz(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 IH(e,t,n){let i=Ut(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 Be=class kr 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 Co(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(Ib(i)&&Ib(r)&&zb(i,r)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?kr.rowSelection(i,r):o&&this.isColSelection()?kr.colSelection(i,r):new kr(i,r)}return q.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,g=p.right-r.right;if(m>0||g>0){let b=h.attrs;if(m>0&&(b=Ri(b,0,m)),g>0&&(b=Ri(b,b.colspan-g,g)),p.left<r.left){if(h=h.type.createAndFill(b),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else h=h.type.create(b,h.content)}if(p.top<r.top||p.bottom>r.bottom){let b={...h.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?h=h.type.createAndFill(b):h=h.type.create(b,h.content)}u.push(h)}s.push(t.child(l).copy(M.from(u)))}let a=this.isColSelection()&&this.isRowSelection()?t:s;return new B(M.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(M.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 kr(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 kr&&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 kr(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new kr(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){return new kr(t.resolve(n),t.resolve(i))}getBookmark(){return new AH(this.$anchorCell.pos,this.$headCell.pos)}};Be.prototype.visible=!1;G.jsonID("cell",Be);var AH=class iz{constructor(t,n){this.anchor=t,this.head=n}map(t){return new iz(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&&zb(n,i)?new Be(n,i):G.near(i,1)}};function MH(e){if(!(e.selection instanceof Be))return null;let t=[];return e.selection.forEachCell((n,i)=>{t.push(gt.node(i,i+n.nodeSize,{class:"selectedCell"}))}),Ie.create(e.doc,t)}function zH({$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 DH({$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 NH(e,t,n){let i=(t||e).selection,r=(t||e).doc,o,s;if(i instanceof X&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Be.create(r,i.from);else if(s=="row"){let a=r.resolve(i.from+1);o=Be.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=Be.create(r,l+1,u)}}else i instanceof q&&zH(i)?o=q.create(r,i.from):i instanceof q&&DH(i)&&(o=q.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var OH=new _e("fix-tables");function oz(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)?oz(e.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function Db(e,t){let n,i=(r,o)=>{r.type.spec.tableRole=="table"&&(n=RH(e,r,o,n))};return t?t.doc!=e.doc&&oz(t.doc,e.doc,0,i):e.doc.descendants(i),n}function RH(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,Ri(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 g=0;g<f;g++){let b=Ut(e.schema)[p].createAndFill();b&&h.push(b)}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(OH,{fixTables:!0})}function Vn(e){let t=e.selection,n=rf(e),i=n.node(-1),r=n.start(-1),o=it.get(i);return{...t instanceof Be?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(n.pos-r),tableStart:r,map:o,table:i}}function sz(e,{map:t,tableStart:n,table:i},r){let o=r>0?-1:0;IH(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,rz(u.attrs,r-t.colCount(l))),s+=u.attrs.rowspan-1}else{let l=o==null?Ut(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 az(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e);t(sz(e.tr,n,n.left))}return!0}function lz(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e);t(sz(e.tr,n,n.right))}return!0}function PH(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,Ri(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 uz(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e),i=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;PH(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 LH(e,t,n){var i;let r=Ut(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 cz(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;LH(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?Ut(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,Ut(i.type.schema).row.create(null,s)),e}function dz(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e);t(cz(e.tr,n,n.top))}return!0}function fz(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e);t(cz(e.tr,n,n.bottom))}return!0}function FH(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 pz(e,t){if(!Mn(e))return!1;if(t){let n=Vn(e),i=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;FH(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 VM(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function BH({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 Nb(e,t){let n=e.selection;if(!(n instanceof Be)||n.$anchorCell.pos==n.$headCell.pos)return!1;let i=Vn(e),{map:r}=i;if(BH(r,i))return!1;if(t){let o=e.tr,s={},a=M.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{VM(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,{...rz(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=VM(u)?l+1:c;o.replaceWith(d+i.tableStart,c+i.tableStart,a)}o.setSelection(new Be(o.doc.resolve(l+i.tableStart))),t(o)}return!0}function Ob(e,t){let n=Ut(e.schema);return UH(({node:i})=>n[i.type.spec.tableRole])(e,t)}function UH(e){return(t,n)=>{let i=t.selection,r,o;if(i instanceof Be){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{var s;if(r=$H(i.$from),!r)return!1;o=(s=Oi(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=Vn(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,g=0;m<c.right;m++,g++)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[g]))}d.setNodeMarkup(o,e({node:r,row:c.top,col:c.left}),l[0]),i instanceof Be&&d.setSelection(new Be(d.doc.resolve(i.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function hz(e,t){return function(n,i){if(!Mn(n))return!1;let r=rf(n);if(r.nodeAfter.attrs[e]===t)return!1;if(i){let o=n.tr;n.selection instanceof Be?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 jH(e){return function(t,n){if(!Mn(t))return!1;if(n){let i=Ut(t.schema),r=Vn(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 KM(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 Jo(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?jH(e):function(n,i){if(!Mn(n))return!1;if(i){let r=Ut(n.schema),o=Vn(n),s=n.tr,a=KM("row",o,r),l=KM("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 Coe=Jo("row",{useDeprecatedLogic:!0}),Toe=Jo("column",{useDeprecatedLogic:!0}),mz=Jo("cell",{useDeprecatedLogic:!0});function ZH(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 Rb(e){return function(t,n){if(!Mn(t))return!1;let i=ZH(rf(t),e);if(i==null)return!1;if(n){let r=t.doc.resolve(i);n(t.tr.setSelection(q.between(r,TH(r))).scrollIntoView())}return!0}}function gz(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 Yd(e,t){let n=e.selection;if(!(n instanceof Be))return!1;if(t){let i=e.tr,r=Ut(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 HH(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=Ab(Ut(s).row,new B(u,c,d)).content),a.push(u)}else if(o=="cell"||o=="header_cell")a.push(n||i?Ab(Ut(s).row,new B(t,n,i)).content:t);else return null;return qH(s,a)}function qH(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(M.empty),n[r]<i){let o=Ut(e).cell.createAndFill(),s=[];for(let a=n[r];a<i;a++)s.push(o);t[r]=t[r].append(M.from(s))}return{height:t.length,width:i,rows:t}}function Ab(e,t){let n=e.createAndFill();return new Rr(n).replace(0,n.content.size,t).doc}function WH({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(Ri(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(M.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(M.from(l))}n=o,t=r}return{width:e,height:t,rows:n}}function VH(e,t,n,i,r,o,s){let a=e.doc.type.schema,l=Ut(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 g=t.width;g<r;g++)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 g=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(g?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,M.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 JM(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 GM(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,Ri(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(Ri(f.attrs,0,s-p))),u+=f.attrs.rowspan-1}}return l}function XM(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}VH(d,s,o,n,u,c,f)&&p(),JM(d,s,o,n,l,u,a,f)&&p(),JM(d,s,o,n,l,u,c,f)&&p(),GM(d,s,o,n,a,c,l,f)&&p(),GM(d,s,o,n,a,c,u,f)&&p();for(let h=a;h<c;h++){let m=s.positionAt(h,l,o),g=s.positionAt(h,u,o);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(g+n),new B(r.rows[h-a],0,0))}p(),d.setSelection(new Be(d.doc.resolve(n+s.positionAt(a,l,o)),d.doc.resolve(n+s.positionAt(c-1,u-1,o)))),t(d)}var KH=Fa({ArrowLeft:Qd("horiz",-1),ArrowRight:Qd("horiz",1),ArrowUp:Qd("vert",-1),ArrowDown:Qd("vert",1),"Shift-ArrowLeft":ef("horiz",-1),"Shift-ArrowRight":ef("horiz",1),"Shift-ArrowUp":ef("vert",-1),"Shift-ArrowDown":ef("vert",1),Backspace:Yd,"Mod-Backspace":Yd,Delete:Yd,"Mod-Delete":Yd});function tf(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Qd(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection;if(o instanceof Be)return tf(n,i,G.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;let s=bz(r,e,t);if(s==null)return!1;if(e=="horiz")return tf(n,i,G.near(n.doc.resolve(o.head+t),t));{let a=n.doc.resolve(s),l=nz(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),tf(n,i,u)}}}function ef(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection,s;if(o instanceof Be)s=o;else{let l=bz(r,e,t);if(l==null)return!1;s=new Be(n.doc.resolve(l))}let a=nz(s.$headCell,e,t);return a?tf(n,i,new Be(s.$anchorCell,a)):!1}}function JH(e,t){let n=e.state.doc,i=Oi(n.resolve(t));return i?(e.dispatch(e.state.tr.setSelection(new Be(i))),!0):!1}function GH(e,t,n){if(!Mn(e.state))return!1;let i=HH(n),r=e.state.selection;if(r instanceof Be){i||(i={width:1,height:1,rows:[M.from(Ab(Ut(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=WH(i,a.right-a.left,a.bottom-a.top),XM(e.state,e.dispatch,s,a,i),!0}else if(i){let o=rf(e.state),s=o.start(-1);return XM(e.state,e.dispatch,s,it.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function XH(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;let i=YM(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof Be)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&(r=Oi(e.state.selection.$anchor))!=null&&((n=$b(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=$b(e,u),d=Kr.getState(e.state)==null;if(!c||!zb(l,c))if(d)c=l;else return;let f=new Be(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(Kr,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Kr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Kr,-1))}function a(l){let u=l,c=Kr.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(YM(e,u.target)!=i&&(d=$b(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 bz(e,t,n){if(!(e.state.selection instanceof q))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 YM(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function $b(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&&Oi(e.state.doc.resolve(i))||Oi(e.state.doc.resolve(r))}var YH=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")),Mb(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,Mb(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Mb(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 g=r==f?o:h&&h[m],b=g?g+"px":"";if(s+=g||i,g||(a=!1),l)l.style.width!=b&&(l.style.width=b),l=l.nextSibling;else{let v=document.createElement("col");v.style.width=b,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 sn=new _e("tableColumnResizing");function vz({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:i=YH,lastColumnResizable:r=!0}={}){let o=new fe({key:sn,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=Ut(a.schema).table.name;return i&&u&&(u[c]=(d,f)=>new i(d,n,f)),new QH(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{let a=sn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{eq(s,a,e,r)},mouseleave:s=>{tq(s)},mousedown:(s,a)=>{nq(s,a,t,n)}},decorations:s=>{let a=sn.getState(s);if(a&&a.activeHandle>-1)return aq(s,a.activeHandle)},nodeViews:{}}});return o}var QH=class nf{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,i=t.getMeta(sn);if(i&&i.setHandle!=null)return new nf(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new nf(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return Ib(t.doc.resolve(r))||(r=-1),new nf(r,n.dragging)}return n}};function eq(e,t,n,i){if(!e.editable)return;let r=sn.getState(e.state);if(r&&!r.dragging){let o=iq(t.target),s=-1;if(o){let{left:a,right:l}=o.getBoundingClientRect();t.clientX-a<=n?s=QM(e,t,"left",n):l-t.clientX<=n&&(s=QM(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}yz(e,s)}}}function tq(e){if(!e.editable)return;let t=sn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&yz(e,-1)}function nq(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=sn.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let a=e.state.doc.nodeAt(s.activeHandle),l=rq(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(sn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);let f=sn.getState(e.state);f?.dragging&&(oq(e,f.activeHandle,ez(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(sn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=sn.getState(e.state);if(f&&f.dragging){let p=ez(f.dragging,d,n);tz(e,f.activeHandle,p,i)}}return tz(e,s.activeHandle,l,i),o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),t.preventDefault(),!0}function rq(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 iq(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function QM(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=Oi(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 ez(e,t,n){let i=t.clientX-e.startX;return Math.max(n,e.startWidth+i)}function yz(e,t){e.dispatch(e.state.tr.setMeta(sn,{setHandle:t}))}function oq(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():sq(f.colspan);h[p]=n,l.setNodeMarkup(s+d,null,{...f,colwidth:h})}l.docChanged&&e.dispatch(l)}function tz(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&&Mb(o,l.firstChild,l,i,a,n)}function sq(e){return Array(e).fill(0)}function aq(e,t){let n=[],i=e.doc.resolve(t),r=i.node(-1);if(!r)return Ie.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=sn.getState(e))===null||l===void 0)&&l.dragging&&n.push(gt.node(s+d,s+d+r.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(gt.widget(f,p))}}return Ie.create(e.doc,n)}function kz({allowTableNodeSelection:e=!1}={}){return new fe({key:Kr,state:{init(){return null},apply(t,n){let i=t.getMeta(Kr);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:MH,handleDOMEvents:{mousedown:XH},createSelectionBetween(t){return Kr.getState(t.state)!=null?t.state.selection:null},handleTripleClick:JH,handleKeyDown:KH,handlePaste:GH},appendTransaction(t,n,i){return NH(i,Db(i,n),e)}})}function nl(e){return e==="left"||e==="right"||e==="center"?e:null}function lq(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return nl(t||n)}function uq(e){return nl(e?.align)}function Ez(){return{default:null,parseHTML:e=>lq(e),renderHTML:e=>{let t=nl(e.align);return g6(t)?{style:`text-align: ${t}`}:{}}}}function cq(e){var t;let n=e.parentElement,i=e.closest("table");if(!n||!i)return null;let r=Array.from(n.children).indexOf(e),o=(t=i.querySelectorAll("colgroup > col")[r])===null||t===void 0?void 0:t.getAttribute("width");return o?[parseInt(o,10)]:null}function $z(e){let t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):cq(e)}var dq=/[ \t\r\n\f]+/g;function Cz(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(dq,"")===""}function Tz(e){let t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}function sf(e,t,n){if(!(n in t))return;let i=t[n];(i===1||i==="1"||i===null||i===void 0)&&delete e[n]}var rl=le.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:$z},align:Ez()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>Cz(e)?{}:!1,getContent:(e,t)=>Tz(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){let t=he(this.options.HTMLAttributes,e);return sf(t,e,"colspan"),sf(t,e,"rowspan"),["td",t,0]}}),il=le.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:$z},align:Ez()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>Cz(e)?{}:!1,getContent:(e,t)=>Tz(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){let t=he(this.options.HTMLAttributes,e);return sf(t,e,"colspan"),sf(t,e,"rowspan"),["th",t,0]}}),ol=le.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",he(this.options.HTMLAttributes,e),0]}});function Pb(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function xz(e,t,n,i,r,o){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u!==null)for(let f=0,p=0;f<u.childCount;f+=1){let{colspan:h,colwidth:m}=u.child(f).attrs;for(let g=0;g<h;g+=1,p+=1){let b=r===p?o:m&&m[g],v=b?`${b}px`:"";if(s+=b||i,b||(a=!1),l){if(l.style.width!==v){let[y,x]=Pb(i,b);l.style.setProperty(y,x)}l=l.nextSibling}else{let y=document.createElement("col"),[x,C]=Pb(i,b);y.style.setProperty(x,C),t.appendChild(y)}}}for(;l;){var c;let f=l.nextSibling;(c=l.parentNode)===null||c===void 0||c.removeChild(l),l=f}let d=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);a&&!d?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var fq=class{constructor(e,t,n,i={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(let[r,o]of Object.entries(i))o!=null&&(r==="style"?this.table.style.cssText=String(o):this.table.setAttribute(r,String(o)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xz(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,xz(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 pq(e,t,n,i){let r=0,o=!0,s=[],a=e.firstChild;if(!a)return{};for(let c=0,d=0;c<a.childCount;c+=1){let{colspan:f,colwidth:p}=a.child(c).attrs;for(let h=0;h<f;h+=1,d+=1){let m=n===d?i:p&&p[h];r+=m||t,m||(o=!1);let[g,b]=Pb(t,m);s.push(["col",{style:`${g}: ${b}`}])}}let l=o?`${r}px`:"",u=o?"":`${r}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function wz(e,t){return t?e.createChecked(null,t):e.createAndFill()}function hq(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 mq(e,t,n,i,r){let o=hq(e),s=[],a=[];for(let u=0;u<n;u+=1){let c=wz(o.cell,r);if(c&&a.push(c),i){let d=wz(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 Iz(e){return e instanceof Be}var of=({editor:e})=>{let{selection:t}=e.state;if(!Iz(t))return!1;let n=0,i=Uo(t.ranges[0].$from,r=>r.type.name==="table");return i?.node.descendants(r=>{if(r.type.name==="table")return!1;["tableCell","tableHeader"].includes(r.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function _z(e,t){let n=e.mapping.map(t),i=Uo(e.selection.$from,s=>s.type.name==="table");if(i?.pos===n)return;let r=e.doc.nodeAt(n);if(!r)return;let o=n+r.nodeSize-1;e.setSelection(q.near(e.doc.resolve(o),-1))}function gq(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let i=0;for(;n+i<e.length&&e[n+i]==="`";)i+=1;let r=n+i,o=!1;for(;r<e.length;){if(e[r]!=="`"){r+=1;continue}let s=0;for(;r+s<e.length&&e[r+s]==="`";)s+=1;if(s===i){let a=e.slice(n+i,r);t+=e.slice(n,n+i)+a.replace(/\\\||\|/g,l=>l==="|"?"\\|":l)+e.slice(r,r+i),n=r+i,o=!0;break}r+=s}o||(t+=e.slice(n,n+i),n+=i)}return t}function bq(e){return e.split(`
`).map(t=>!t.includes("|")||!t.includes("`")?t:gq(t)).join(`
`)}function vq(e){return(e||"").replaceAll(""," ").replace(/\s+/g," ").trim()}function Sz(e,t){return t?e.split(t).join(`
`):e}function yq(e){return e.replace(/\\.|\|/g,t=>t==="|"?"\\|":t)}function kq(e,t,n={}){if(!e||!e.content||e.content.length===0)return"";let i=[];e.content.forEach(f=>{let p=[];f.content&&f.content.forEach(h=>{let m="";h.content&&Array.isArray(h.content)&&h.content.length>1?m=h.content.map(y=>Sz(t.renderChildren(y),n.cellLineSeparator)).join(`
`):m=Sz(h.content?t.renderChildren(h.content):"",n.cellLineSeparator);let g=yq(vq(m.replace(/[ \t]*\r?\n[ \t]*/g,"<br>"))),b=h.type==="tableHeader",v=uq(h.attrs);p.push({text:g,isHeader:b,align:v})}),i.push(p)});let r=i.reduce((f,p)=>Math.max(f,p.length),0);if(r===0)return"";let o=Array.from({length:r}).fill(0);i.forEach(f=>{for(let h=0;h<r;h+=1){var p;let m=(((p=f[h])===null||p===void 0?void 0:p.text)||"").length;m>o[h]&&(o[h]=m),o[h]<3&&(o[h]=3)}});let s=(f,p)=>f+" ".repeat(Math.max(0,p-f.length)),a=i[0],l=a.some(f=>f.isHeader),u=Array.from({length:r}).fill(null);i.forEach(f=>{for(let h=0;h<r;h+=1){var p;!u[h]&&(!((p=f[h])===null||p===void 0)&&p.align)&&(u[h]=f[h].align)}});let c=`
`,d=Array.from({length:r}).map((f,p)=>l&&a[p]&&a[p].text||"");return c+=`| ${d.map((f,p)=>s(f,o[p])).join(" | ")} |
`,c+=`| ${o.map((f,p)=>{let h=Math.max(3,f),m=u[p];return m==="left"?`:${"-".repeat(h)}`:m==="right"?`${"-".repeat(h)}:`:m==="center"?`:${"-".repeat(h)}:`:"-".repeat(h)}).join(" | ")} |
`,(l?i.slice(1):i).forEach(f=>{c+=`| ${Array.from({length:r}).fill(0).map((p,h)=>s(f[h]&&f[h].text||"",o[h])).join(" | ")} |
`}),c}var xq=new _e("preserveCellSelectionOnContextMenu");function wq(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(n)return n.pos;if(!(t.target instanceof Node))return null;try{return e.posAtDOM(t.target,0)}catch{return null}}function _q(e,t){let n=!1;return e.forEachCell((i,r)=>{t>=r&&t<r+i.nodeSize&&(n=!0)}),n}function Sq(){return new fe({key:xq,props:{handleDOMEvents:{mousedown(e,t){if(t.button!==2)return!1;let{selection:n}=e.state;if(!Iz(n)||n.ranges.length<2)return!1;let i=wq(e,t);return i==null||!_q(n,i)?!1:(t.preventDefault(),!0)}}}})}var Lb=le.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:fq,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}=pq(e,this.options.cellMinWidth),o=t.style;function s(){return o||(i?`width: ${i}`:`min-width: ${r}`)}let a=["table",he(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=nl((a=i[s])!==null&&a!==void 0?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=nl((l=i[a])!==null&&l!==void 0?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)=>kq(e,t),markdownTokenizer:{name:"table",level:"block",start:e=>{let t=e.split(`
`);if(t.length<2)return-1;let n=t[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes("|")?-1:t[0].includes("|")?0:-1},tokenize(e,t,n){let i=e.indexOf(`

`),r=i>=0?e.slice(0,i):e,o=r.split(`
`);if(o.length<2)return;let s=o[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;let a=bq(r);if(a===r)return;let l=n.blockTokens(a)[0];if(l?.type!=="table"||!l.raw)return;let u=l.raw.split(`
`).length,c=e.split(`
`).slice(0,u).join(`
`);return{...l,raw:c}}},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:i,dispatch:r,editor:o})=>{let s=mq(o.schema,e,t,n);if(r){let a=i.selection.from+1;i.replaceSelectionWith(s).scrollIntoView().setSelection(q.near(i.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>az(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>lz(e,t),deleteColumn:()=>({state:e,dispatch:t})=>{let n=Uo(e.selection.$from,i=>i.type.name==="table");return uz(e,t&&(i=>{n&&_z(i,n.pos),t(i)}))},addRowBefore:()=>({state:e,dispatch:t})=>dz(e,t),addRowAfter:()=>({state:e,dispatch:t})=>fz(e,t),deleteRow:()=>({state:e,dispatch:t})=>{let n=Uo(e.selection.$from,i=>i.type.name==="table");return pz(e,t&&(i=>{n&&_z(i,n.pos),t(i)}))},deleteTable:()=>({state:e,dispatch:t})=>gz(e,t),mergeCells:()=>({state:e,dispatch:t})=>Nb(e,t),splitCell:()=>({state:e,dispatch:t})=>Ob(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Jo("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Jo("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>mz(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>Nb(e,t)?!0:Ob(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:i})=>hz(e,t)(n,i),goToNextCell:()=>({state:e,dispatch:t})=>Rb(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>Rb(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&Db(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let i=Be.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:of,"Mod-Backspace":of,Delete:of,"Mod-Delete":of}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[vz({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],kz({allowTableNodeSelection:this.options.allowTableNodeSelection}),Sq()]},addNodeView(){let e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:n,view:i,HTMLAttributes:r})=>{let o=he(this.options.HTMLAttributes,r);return new t(n,this.options.cellMinWidth,i,o)}},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:$e(K(e,"tableRole",t))}}}),Poe=Ae.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(Lb.configure(this.options.table)),this.options.tableCell!==!1&&e.push(rl.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(il.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(ol.configure(this.options.tableRow)),e}});var Wb={};Gi(Wb,{arrayReplaceAt:()=>Gq,asciiTrim:()=>Ui,assign:()=>Qo,escapeHtml:()=>wr,escapeRE:()=>aW,fromCodePoint:()=>es,has:()=>Jq,isMdAsciiPunct:()=>Fi,isPunctChar:()=>Gz,isPunctCharCode:()=>Li,isSpace:()=>ye,isString:()=>vf,isValidEntityCode:()=>yf,isWhiteSpace:()=>Pi,lib:()=>lW,normalizeReference:()=>Bi,unescapeAll:()=>xr,unescapeMd:()=>tW});var df={};Gi(df,{decode:()=>sl,encode:()=>uf,format:()=>Go,parse:()=>al});var Az={};function Eq(e){let t=Az[e];if(t)return t;t=Az[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 af(e,t){typeof t!="string"&&(t=af.defaultChars);let n=Eq(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})}af.defaultChars=";/?:@&=+$,#";af.componentChars="";var sl=af;var Mz={};function $q(e){let t=Mz[e];if(t)return t;t=Mz[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 lf(e,t,n){typeof t!="string"&&(n=t,t=lf.defaultChars),typeof n>"u"&&(n=!0);let i=$q(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}lf.defaultChars=";/?:@&=+$,-_.!~*'()#";lf.componentChars="-_.!~*'()";var uf=lf;function Go(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 cf(){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 Cq=/^([a-z0-9.+-]+:)/i,Tq=/:[0-9]*$/,Iq=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Aq=["<",">",'"',"`"," ","\r",`
`,"	"],Mq=["{","}","|","\\","^","`"].concat(Aq),zq=["'"].concat(Mq),zz=["%","/","?",";","#"].concat(zq),Dz=["/","?","#"],Dq=255,Nz=/^[+a-z0-9A-Z_-]{0,63}$/,Nq=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Oz={javascript:!0,"javascript:":!0},Rz={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Oq(e,t){if(e&&e instanceof cf)return e;let n=new cf;return n.parse(e,t),n}cf.prototype.parse=function(e,t){let n,i,r,o=e;if(o=o.trim(),!t&&e.split("#").length===1){let u=Iq.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=Cq.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&&Oz[s])&&(o=o.substr(2),this.slashes=!0)),!Oz[s]&&(r||s&&!Rz[s])){let u=-1;for(let h=0;h<Dz.length;h++)i=o.indexOf(Dz[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<zz.length;h++)i=o.indexOf(zz[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,g=h.length;m<g;m++){let b=h[m];if(b&&!b.match(Nz)){let v="";for(let y=0,x=b.length;y<x;y++)b.charCodeAt(y)>127?v+="x":v+=b[y];if(!v.match(Nz)){let y=h.slice(0,m),x=h.slice(m+1),C=b.match(Nq);C&&(y.push(C[1]),x.unshift(C[2])),x.length&&(o=x.join(".")+o),this.hostname=y.join(".");break}}}}this.hostname.length>Dq&&(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),Rz[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};cf.prototype.parseHost=function(e){let t=Tq.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 al=Oq;var Fb={};Gi(Fb,{Any:()=>ff,Cc:()=>pf,Cf:()=>Pz,P:()=>Xo,S:()=>hf,Z:()=>mf});var ff=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var pf=/[\0-\x1F\x7F-\x9F]/;var Pz=/[\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 Xo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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 hf=/[\$\+<->\^`\|~\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 mf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var Lz=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 Fz=new Uint16Array("\u0200aglq	\x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Bb,Rq=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]]),Ub=(Bb=String.fromCodePoint)!==null&&Bb!==void 0?Bb: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 jb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Rq.get(e))!==null&&t!==void 0?t:e}var kt;(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"})(kt||(kt={}));var Pq=32,Jr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Jr||(Jr={}));function Zb(e){return e>=kt.ZERO&&e<=kt.NINE}function Lq(e){return e>=kt.UPPER_A&&e<=kt.UPPER_F||e>=kt.LOWER_A&&e<=kt.LOWER_F}function Fq(e){return e>=kt.UPPER_A&&e<=kt.UPPER_Z||e>=kt.LOWER_A&&e<=kt.LOWER_Z||Zb(e)}function Bq(e){return e===kt.EQUALS||Fq(e)}var yt;(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"})(yt||(yt={}));var zn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zn||(zn={}));var gf=class{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zn.Strict}startEntity(t){this.decodeMode=t,this.state=yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case yt.EntityStart:return t.charCodeAt(n)===kt.NUM?(this.state=yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=yt.NamedEntity,this.stateNamedEntity(t,n));case yt.NumericStart:return this.stateNumericStart(t,n);case yt.NumericDecimal:return this.stateNumericDecimal(t,n);case yt.NumericHex:return this.stateNumericHex(t,n);case yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Pq)===kt.LOWER_X?(this.state=yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=yt.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(Zb(r)||Lq(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(Zb(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===kt.SEMI)this.consumed+=1;else if(this.decodeMode===zn.Strict)return 0;return this.emitCodePoint(jb(this.result),this.consumed),this.errors&&(t!==kt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){let{decodeTree:i}=this,r=i[this.treeIndex],o=(r&Jr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){let s=t.charCodeAt(n);if(this.treeIndex=Uq(i,r,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===zn.Attribute&&(o===0||Bq(s))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],o=(r&Jr.VALUE_LENGTH)>>14,o!==0){if(s===kt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==zn.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]&Jr.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]&~Jr.VALUE_LENGTH:r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case yt.NamedEntity:return this.result!==0&&(this.decodeMode!==zn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yt.NumericDecimal:return this.emitNumericEntity(0,2);case yt.NumericHex:return this.emitNumericEntity(0,3);case yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yt.EntityStart:return 0}}};function Bz(e){let t="",n=new gf(e,i=>t+=Ub(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 Uq(e,t,n,i){let r=(t&Jr.BRANCH_LENGTH)>>7,o=t&Jr.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 Uz=Bz(Lz),yse=Bz(Fz);function Yo(e,t=zn.Legacy){return Uz(e,t)}function ll(e){return Uz(e,zn.Strict)}function bf(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var jq=new Map(bf([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(bf([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(bf([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(bf([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var Zq=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),Hq=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 Hb(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 jz=Hb(/[&<>'"]/g,Zq),Zz=Hb(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Hz=Hb(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var qz;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(qz||(qz={}));var Wz;(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"})(Wz||(Wz={}));function Vq(e){return Object.prototype.toString.call(e)}function vf(e){return Vq(e)==="[object String]"}var Kq=Object.prototype.hasOwnProperty;function Jq(e,t){return Kq.call(e,t)}function Qo(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 Gq(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function yf(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 es(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 Jz=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Xq=/&([a-z#][a-z0-9]{1,31});/gi,Yq=new RegExp(Jz.source+"|"+Xq.source,"gi"),Qq=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function eW(e,t){if(t.charCodeAt(0)===35&&Qq.test(t)){let i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return yf(i)?es(i):e}let n=Yo(e);return n!==e?n:e}function tW(e){return e.indexOf("\\")<0?e:e.replace(Jz,"$1")}function xr(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Yq,function(t,n,i){return n||eW(t,i)})}var nW=/[&<>"]/,rW=/[&<>"]/g,iW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function oW(e){return iW[e]}function wr(e){return nW.test(e)?e.replace(rW,oW):e}var sW=/[.?*+^$[\]\\(){}|-]/g;function aW(e){return e.replace(sW,"\\$&")}function ye(e){switch(e){case 9:case 32:return!0}return!1}function Pi(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 Gz(e){return Xo.test(e)||hf.test(e)}function Li(e){return Gz(es(e))}function Fi(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 Bi(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}function Kz(e){return e===32||e===9||e===10||e===13}function Ui(e){let t=0;for(;t<e.length&&Kz(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Kz(e.charCodeAt(n));n--);return e.slice(t,n+1)}var lW={mdurl:df,ucmicro:Fb};var Gb={};Gi(Gb,{parseLinkDestination:()=>Kb,parseLinkLabel:()=>Vb,parseLinkTitle:()=>Jb});function Vb(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 Kb(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=xr(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){r++;continue}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=xr(e.slice(t,r)),o.pos=r,o.ok=!0),o}function Jb(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+=xr(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+=xr(e.slice(t,o)),s}var Kn={};Kn.code_inline=function(e,t,n,i,r){let o=e[t];return"<code"+r.renderAttrs(o)+">"+wr(o.content)+"</code>"};Kn.code_block=function(e,t,n,i,r){let o=e[t];return"<pre"+r.renderAttrs(o)+"><code>"+wr(e[t].content)+`</code></pre>
`};Kn.fence=function(e,t,n,i,r){let o=e[t],s=o.info?xr(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)||wr(o.content):u=wr(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>
`};Kn.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)};Kn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
`:`<br>
`};Kn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`};Kn.text=function(e,t){return wr(e[t].content)};Kn.html_block=function(e,t){return e[t].content};Kn.html_inline=function(e,t){return e[t].content};function ts(){this.rules=Qo({},Kn)}ts.prototype.renderAttrs=function(t){let n,i,r;if(!t.attrs)return"";for(r="",n=0,i=t.attrs.length;n<i;n++)r+=" "+wr(t.attrs[n][0])+'="'+wr(t.attrs[n][1])+'"';return r};ts.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};ts.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};ts.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};ts.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 Xz=ts;function Dn(){this.__rules__=[],this.__cache__=null}Dn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Dn.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))})})};Dn.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};Dn.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};Dn.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};Dn.prototype.push=function(e,t,n){let i=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null};Dn.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};Dn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Dn.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};Dn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var ji=Dn;function ns(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}ns.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};ns.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ns.prototype.attrSet=function(t,n){let i=this.attrIndex(t),r=[t,n];i<0?this.attrPush(r):this.attrs[i]=r};ns.prototype.attrGet=function(t){let n=this.attrIndex(t),i=null;return n>=0&&(i=this.attrs[n][1]),i};ns.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 _r=ns;function Yz(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Yz.prototype.Token=_r;var Qz=Yz;var uW=/\r\n?|\n/g,cW=/\0/g;function Xb(e){let t;t=e.src.replace(uW,`
`),t=t.replace(cW,"\uFFFD"),e.src=t}function Yb(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 Qb(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 dW(e){return/^<a[>\s]/i.test(e)}function fW(e){return/^<\/a\s*>/i.test(e)}function ev(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=[],s=0;for(let a=r.length-1;a>=0;a--){let l=r[a];if(l.type==="link_close"){for(a--;r[a].level!==l.level&&r[a].type!=="link_open";)a--;continue}if(l.type==="html_inline"&&(dW(l.content)&&s>0&&s--,fW(l.content)&&s++),!(s>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,c=e.md.linkify.match(u),d=[],f=l.level,p=0;c.length>0&&c[0].index===0&&a>0&&r[a-1].type==="text_special"&&(c=c.slice(1));for(let h=0;h<c.length;h++){let m=c[h].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let b=c[h].text;c[h].schema?c[h].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 v=c[h].index;if(v>p){let A=new e.Token("text","",0);A.content=u.slice(p,v),A.level=f,d.push(A)}let y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);let x=new e.Token("text","",0);x.content=b,x.level=f,d.push(x);let C=new e.Token("link_close","a",-1);C.level=--f,C.markup="linkify",C.info="auto",d.push(C),p=c[h].lastIndex}if(p<u.length){let h=new e.Token("text","",0);h.content=u.slice(p),h.level=f,d.push(h)}o.push({index:a,nodes:d})}}if(o.length>0){let a=r.length;for(let d of o)a+=d.nodes.length-1;let l=new Array(a),u=0,c=0;o.reverse();for(let d=0;d<r.length;d++){let f=o[u];if(f?.index===d){for(let p of f.nodes)l[c++]=p;u++}else l[c++]=r[d]}t[n].children=l}}}var e4=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pW=/\((c|tm|r)\)/i,hW=/\((c|tm|r)\)/ig,mW={c:"\xA9",r:"\xAE",tm:"\u2122"};function gW(e,t){return mW[t.toLowerCase()]}function bW(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(hW,gW)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function vW(e){let t=0;for(let n=e.length-1;n>=0;n--){let i=e[n];i.type==="text"&&!t&&e4.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 tv(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(pW.test(e.tokens[t].content)&&bW(e.tokens[t].children),e4.test(e.tokens[t].content)&&vW(e.tokens[t].children))}var yW=/['"]/,t4=/['"]/g,n4="\u2019",kW=1e3;function r4(e,t,n){for(;e.length>n;){let i=e.pop();i.isSingleQuote?t.single=i.prevSameQuoteIdx:t.double=i.prevSameQuoteIdx}}function kf(e,t,n,i){e[t]||(e[t]=[]),e[t].push({pos:n,ch:i})}function xW(e,t){let n="",i=0;t.sort((r,o)=>r.pos-o.pos);for(let r=0;r<t.length;r++){let o=t[r];n+=e.slice(i,o.pos)+o.ch,i=o.pos+1}return n+e.slice(i)}function wW(e,t){let n,i=[],r={single:-1,double:-1},o={};for(let s=0;s<e.length;s++){let a=e[s],l=e[s].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(r4(i,r,n+1),a.type!=="text")continue;let u=a.content,c=0,d=u.length;e:for(;c<d;){t4.lastIndex=c;let f=t4.exec(u);if(!f)break;let p=!0,h=!0;c=f.index+1;let m=f[0]==="'",g=32;if(f.index-1>=0)g=u.charCodeAt(f.index-1);else for(n=s-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c<d)b=u.charCodeAt(c);else for(n=s+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}let v=Fi(g)||Li(g),y=Fi(b)||Li(b),x=Pi(g),C=Pi(b);if(C?p=!1:y&&(x||v||(p=!1)),x?h=!1:v&&(C||y||(h=!1)),b===34&&f[0]==='"'&&g>=48&&g<=57&&(h=p=!1),p&&h&&(p=v,h=y),!p&&!h){m&&kf(o,s,f.index,n4);continue}if(h&&(n=m?r.single:r.double,n>=0&&i[n].level===l)){let A=i[n],D,z;m?(D=t.md.options.quotes[2],z=t.md.options.quotes[3]):(D=t.md.options.quotes[0],z=t.md.options.quotes[1]),kf(o,s,f.index,z),kf(o,A.tokenIdx,A.contentPos,D),r4(i,r,n);continue e}if(p){if(i.length>=kW)return;i.push({tokenIdx:s,contentPos:f.index,isSingleQuote:m,level:l,prevSameQuoteIdx:m?r.single:r.double}),m?r.single=i.length-1:r.double=i.length-1}else h&&m&&kf(o,s,f.index,n4)}}Object.keys(o).forEach(function(s){e[s].content=xW(e[s].content,o[s])})}function nv(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!yW.test(e.tokens[t].content)||wW(e.tokens[t].children,e)}function rv(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 iv=[["normalize",Xb],["block",Yb],["inline",Qb],["linkify",ev],["replacements",tv],["smartquotes",nv],["text_join",rv]];function ov(){this.ruler=new ji;for(let e=0;e<iv.length;e++)this.ruler.push(iv[e][0],iv[e][1])}ov.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)};ov.prototype.State=Qz;var i4=ov;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(ye(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 _r(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(!ye(i))break}return t};Jn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ye(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(ye(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=_r;var o4=Jn;var _W=65536;function sv(e,t){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function s4(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 av(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&&!ye(a)||s===45&&ye(a))return!1;for(;o<e.eMarks[r];){let x=e.src.charCodeAt(o);if(x!==124&&x!==45&&x!==58&&!ye(x))return!1;o++}let l=sv(e,t+1),u=l.split("|"),c=[];for(let x=0;x<u.length;x++){let C=u[x].trim();if(!C){if(x===0||x===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?c.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=sv(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=s4(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 g=e.push("thead_open","thead",1);g.map=[t,t+1];let b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let x=0;x<u.length;x++){let C=e.push("th_open","th",1);c[x]&&(C.attrs=[["style","text-align:"+c[x]]]);let A=e.push("inline","",0);A.content=u[x].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,y=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let x=!1;for(let A=0,D=p.length;A<D;A++)if(p[A](e,r,n,!0)){x=!0;break}if(x||(l=sv(e,r).trim(),!l)||e.sCount[r]-e.blkIndent>=4||(u=s4(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),y+=d-u.length,y>_W))break;if(r===t+2){let A=e.push("tbody_open","tbody",1);A.map=v=[t+2,0]}let C=e.push("tr_open","tr",1);C.map=[r,r+1];for(let A=0;A<d;A++){let D=e.push("td_open","td",1);c[A]&&(D.attrs=[["style","text-align:"+c[A]]]);let z=e.push("inline","",0);z.content=u[A]?u[A].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 lv(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 uv(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 cv(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 y=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&&!y){let C=e.sCount[h]+1,A,D;e.src.charCodeAt(r)===32?(r++,C++,D=!1,A=!0):e.src.charCodeAt(r)===9?(A=!0,(e.bsCount[h]+C)%4===3?(r++,C++,D=!1):D=!0):A=!1;let z=C;for(a.push(e.bMarks[h]),e.bMarks[h]=r;r<o;){let V=e.src.charCodeAt(r);if(ye(V))V===9?z+=4-(z+e.bsCount[h]+(D?1:0))%4:z++;else break;r++}p=r>=o,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(A?1:0),u.push(e.sCount[h]),e.sCount[h]=z-C,c.push(e.tShift[h]),e.tShift[h]=r-e.bMarks[h];continue}if(p)break;let x=!1;for(let C=0,A=d.length;C<A;C++)if(d[C](e,h,n,!0)){x=!0;break}if(x){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 g=e.push("blockquote_open","blockquote",1);g.markup=">";let b=[t,0];g.map=b,e.md.block.tokenize(e,t,h);let v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,b[1]=e.line;for(let y=0;y<c.length;y++)e.bMarks[y+t]=a[y],e.tShift[y+t]=c[y],e.sCount[y+t]=u[y],e.bsCount[y+t]=l[y];return e.blkIndent=m,!0}function dv(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&&!ye(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 a4(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(!ye(o))return-1}return i}function l4(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),!ye(o))?-1:r}function SW(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 fv(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=l4(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=a4(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 g=[l,0];a.map=g,a.markup=String.fromCharCode(h);let b=!1,v=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";l<n;){o=p,r=e.eMarks[l];let x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]),C=x;for(;o<r;){let ae=e.src.charCodeAt(o);if(ae===9)C+=4-(C+e.bsCount[l])%4;else if(ae===32)C++;else break;o++}let A=o,D;A>=r?D=1:D=C-x,D>4&&(D=1);let z=x+D;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);let V=[l,0];a.map=V,d&&(a.info=e.src.slice(s,p-1));let ce=e.tight,ze=e.tShift[l],nt=e.sCount[l],He=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=z,e.tight=!0,e.tShift[l]=A-e.bMarks[l],e.sCount[l]=C,A>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||b)&&(u=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=He,e.tShift[l]=ze,e.sCount[l]=nt,e.tight=ce,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,V[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let De=!1;for(let ae=0,I=v.length;ae<I;ae++)if(v[ae](e,l,n,!0)){De=!0;break}if(De)break;if(d){if(p=l4(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=a4(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),g[1]=l,e.line=l,e.parentType=y,u&&SW(e,m),!0}function pv(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 y=e.lineMax;if(v>=y||e.isEmpty(v))return null;let x=!1;if(e.sCount[v]-e.blkIndent>3&&(x=!0),e.sCount[v]<0&&(x=!0),!x){let D=e.md.block.ruler.getRules("reference"),z=e.parentType;e.parentType="reference";let V=!1;for(let ce=0,ze=D.length;ce<ze;ce++)if(D[ce](e,v,y,!0)){V=!0;break}if(e.parentType=z,V)return null}let C=e.bMarks[v]+e.tShift[v],A=e.eMarks[v];return e.src.slice(C,A+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 y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(v===92&&(r++,r<o&&l.charCodeAt(r)===10)){let y=a(s);y!==null&&(l+=y,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 y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(!ye(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 y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(!ye(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 g;for(r<o&&h!==r&&m.ok?(g=m.str,r=m.pos):(g="",r=f,s=p);r<o;){let v=l.charCodeAt(r);if(!ye(v))break;r++}if(r<o&&l.charCodeAt(r)!==10&&g)for(g="",r=f,s=p;r<o;){let v=l.charCodeAt(r);if(!ye(v))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;let b=Bi(l.slice(1,u));return b?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:g,href:d}),e.line=s),!0):!1}var u4=["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 EW="[a-zA-Z_:][a-zA-Z0-9:._-]*",$W="[^\"'=<>`\\x00-\\x20]+",CW="'[^']*'",TW='"[^"]*"',IW="(?:"+$W+"|"+CW+"|"+TW+")",AW="(?:\\s+"+EW+"(?:\\s*=\\s*"+IW+")?)",c4="<[A-Za-z][A-Za-z0-9\\-]*"+AW+"*\\s*\\/?>",d4="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",MW="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",zW="<[?][\\s\\S]*?[?]>",DW="<![A-Za-z][^>]*>",NW="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",f4=new RegExp("^(?:"+c4+"|"+d4+"|"+MW+"|"+zW+"|"+DW+"|"+NW+")"),p4=new RegExp("^(?:"+c4+"|"+d4+")");var Zi=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+u4.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(p4.source+"\\s*$"),/^$/,!1]];function hv(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<Zi.length&&!Zi[a][0].test(s);a++);if(a===Zi.length)return!1;if(i)return Zi[a][2];let l=t+1,u=Zi[a][1].test("");if(!Zi[a][1].test(s)){for(;l<n&&!(e.sCount[l]<e.blkIndent&&(u||!e.isEmpty(l)));l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],s=e.src.slice(r,o),Zi[a][1].test(s)){s.length!==0&&l++;break}}e.line=l;let c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0}function mv(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&&!ye(s))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);let l=e.skipCharsBack(o,35,r);l>r&&ye(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=Ui(e.src.slice(r,o)),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 gv(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 e.parentType=r,!1;let l=Ui(e.getLines(t,a,e.blkIndent,!1));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 bv(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=Ui(e.getLines(t,o,e.blkIndent,!1));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 xf=[["table",av,["paragraph","reference"]],["code",lv],["fence",uv,["paragraph","reference","blockquote","list"]],["blockquote",cv,["paragraph","reference","blockquote","list"]],["hr",dv,["paragraph","reference","blockquote","list"]],["list",fv,["paragraph","reference","blockquote"]],["reference",pv],["html_block",hv,["paragraph","reference","blockquote"]],["heading",mv,["paragraph","reference","blockquote"]],["lheading",gv],["paragraph",bv]];function wf(){this.ruler=new ji;for(let e=0;e<xf.length;e++)this.ruler.push(xf[e][0],xf[e][1],{alt:(xf[e][2]||[]).slice()})}wf.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)}};wf.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)};wf.prototype.State=o4;var h4=wf;function ul(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}ul.prototype.pushPending=function(){let e=new _r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ul.prototype.push=function(e,t,n){this.pending&&this.pushPending();let i=new _r(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};ul.prototype.scanDelims=function(e,t){let n=this.posMax,i=this.src.charCodeAt(e),r;if(e===0)r=32;else if(e===1)r=this.src.charCodeAt(0),(r&63488)===55296&&(r=65533);else if(r=this.src.charCodeAt(e-1),(r&64512)===56320){let g=this.src.charCodeAt(e-2);r=(g&64512)===55296?65536+(g-55296<<10)+(r-56320):65533}else(r&64512)===55296&&(r=65533);let o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;let s=o-e,a=o<n?this.src.charCodeAt(o):32;if((a&64512)===55296){let g=this.src.charCodeAt(o+1);a=(g&64512)===56320?65536+(a-55296<<10)+(g-56320):65533}else(a&64512)===56320&&(a=65533);let l=Fi(r)||Li(r),u=Fi(a)||Li(a),c=Pi(r),d=Pi(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}};ul.prototype.Token=_r;var m4=ul;function OW(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 vv(e,t){let n=e.pos;for(;n<e.posMax&&!OW(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}function RW(e){return e>=65&&e<=90||e>=97&&e<=122}function PW(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function yv(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=n-Math.min(10,e.pending.length,n),o=n;for(;o>r&&PW(e.src.charCodeAt(o-1));)o--;if(o===n||!RW(e.src.charCodeAt(o)))return!1;let s=n-o,a=e.md.linkify.matchAtStart(e.src.slice(o));if(!a)return!1;let l=a.url;if(l.length<=s)return!1;let u=l.length;for(;u>0&&l.charCodeAt(u-1)===42;)u--;u!==l.length&&(l=l.slice(0,u));let c=e.md.normalizeLink(l);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-s);let d=e.push("link_open","a",1);d.attrs=[["href",c]],d.markup="linkify",d.info="auto";let f=e.push("text","",0);f.content=e.md.normalizeLinkText(l);let p=e.push("link_close","a",-1);p.markup="linkify",p.info="auto"}return e.pos+=l.length-s,!0}function kv(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&&ye(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var xv=[];for(let e=0;e<256;e++)xv.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){xv[e.charCodeAt(0)]=1});function wv(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),!!ye(r));)n++;return e.pos=n,!0}if(r===32){if(!t){let a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}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&&xv[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function _v(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 LW(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 g4(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 FW(e){let t=e.tokens_meta,n=e.tokens_meta.length;g4(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&g4(e,t[i].delimiters)}var Sv={tokenize:LW,postProcess:FW};function BW(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 b4(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 UW(e){let t=e.tokens_meta,n=e.tokens_meta.length;b4(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&b4(e,t[i].delimiters)}var Ev={tokenize:BW,postProcess:UW};function $v(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),!(!ye(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),!(!ye(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),!(!ye(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[Bi(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),g=[["href",s]];m.attrs=g,a&&g.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),!(!ye(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),!(!ye(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),!(!ye(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[Bi(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 g=e.push("image","img",0),b=[["src",c],["alt",""]];g.attrs=b,g.children=m,g.content=i,l&&b.push(["title",l])}return e.pos=o,e.posMax=f,!0}var jW=/^([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])?)*)$/,ZW=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Tv(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(ZW.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(jW.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 HW(e){return/^<a[>\s]/i.test(e)}function qW(e){return/^<\/a\s*>/i.test(e)}function WW(e){let t=e|32;return t>=97&&t<=122}function Iv(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&&!WW(r))return!1;let o=e.src.slice(i).match(f4);if(!o)return!1;if(!t){let s=e.push("html_inline","",0);s.content=o[0],HW(s.content)&&e.linkLevel++,qW(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}var VW=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,KW=/^&([a-z][a-z0-9]{1,31});/i;function Av(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(VW);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=yf(s)?es(s):es(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{let o=e.src.slice(n).match(KW);if(o){let s=ll(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 v4(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 Mv(e){let t=e.tokens_meta,n=e.tokens_meta.length;v4(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&v4(t[i].delimiters)}function zv(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 Dv=[["text",vv],["linkify",yv],["newline",kv],["escape",wv],["backticks",_v],["strikethrough",Sv.tokenize],["emphasis",Ev.tokenize],["link",$v],["image",Cv],["autolink",Tv],["html_inline",Iv],["entity",Av]],Nv=[["balance_pairs",Mv],["strikethrough",Sv.postProcess],["emphasis",Ev.postProcess],["fragments_join",zv]];function cl(){this.ruler=new ji;for(let e=0;e<Dv.length;e++)this.ruler.push(Dv[e][0],Dv[e][1]);this.ruler2=new ji;for(let e=0;e<Nv.length;e++)this.ruler2.push(Nv[e][0],Nv[e][1])}cl.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};cl.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()};cl.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)};cl.prototype.State=m4;var y4=cl;function k4(e){let t={};e=e||{},t.src_Any=ff.source,t.src_Cc=pf.source,t.src_Z=mf.source,t.src_P=Xo.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}|[@/\\[\\]()]).){1,50}@)?`,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_]{0,63}',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 Ov(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function Sf(e){return Object.prototype.toString.call(e)}function JW(e){return Sf(e)==="[object String]"}function GW(e){return Sf(e)==="[object Object]"}function XW(e){return Sf(e)==="[object RegExp]"}function x4(e){return Sf(e)==="[object Function]"}function YW(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var _4={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function QW(e){return Object.keys(e||{}).reduce(function(t,n){return t||_4.hasOwnProperty(n)},!1)}var eV={"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}}},tV="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]",nV="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function rV(e){return function(t,n){let i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function w4(){return function(e,t){t.normalize(e)}}function _f(e){let t=e.re=k4(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(tV),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.email_fuzzy_global=RegExp(i(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(i(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(i(t.tpl_link_no_ip_fuzzy),"ig"),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,GW(l)){XW(l.validate)?u.validate=rV(l.validate):x4(l.validate)?u.validate=l.validate:o(a,l),x4(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=w4();return}if(JW(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:w4()};let s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(YW).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")}function S4(e,t,n,i){let r=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=r,this.text=r,this.url=r}function an(e,t){if(!(this instanceof an))return new an(e,t);t||QW(e)&&(t=e,e={}),this.__opts__=Ov({},_4,t),this.__schemas__=Ov({},eV,e),this.__compiled__={},this.__tlds__=nV,this.__tlds_replaced__=!1,this.re={},_f(this)}an.prototype.add=function(t,n){return this.__schemas__[t]=n,_f(this),this};an.prototype.set=function(t){return this.__opts__=Ov(this.__opts__,t),this};an.prototype.test=function(t){if(!t.length)return!1;let n,i;if(this.re.schema_test.test(t)){for(i=this.re.schema_search,i.lastIndex=0;(n=i.exec(t))!==null;)if(this.testSchemaAt(t,n[2],i.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};an.prototype.pretest=function(t){return this.re.pretest.test(t)};an.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0};an.prototype.match=function(t){let n=[],i=[],r=[],o=[],s,a,l;function u(f,p){return f?p?f.index!==p.index?f.index<p.index?f:p:f.lastIndex>=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(t))!==null;)a=this.testSchemaAt(t,s[2],l.lastIndex),a&&i.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)r.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let c=[0,0,0],d=0;for(;;){let f=[i[c[0]],o[c[1]],r[c[2]]],p=u(u(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?c[0]++:p===f[1]?c[1]++:c[2]++,p.index<d)continue;let h=new S4(t,p.schema,p.index,p.lastIndex);this.__compiled__[h.schema].normalize(h,this),n.push(h),d=p.lastIndex}return n.length?n:null};an.prototype.matchAtStart=function(t){if(!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);if(!i)return null;let r=new S4(t,n[2],n.index+n[1].length,n.index+n[0].length+i);return this.__compiled__[r.schema].normalize(r,this),r};an.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(),_f(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_f(this),this)};an.prototype.normalize=function(t){t.schema||(t.url=`http://${t.url}`),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url=`mailto:${t.url}`)};an.prototype.onCompile=function(){};var E4=an;var iV=/^xn--/,oV=/[^\0-\x7F]/,sV=/[\x2E\u3002\uFF0E\uFF61]/g,aV={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Rv=35,Gn=Math.floor,Pv=String.fromCharCode;function Gr(e){throw new RangeError(aV[e])}function lV(e,t){let n=[],i=e.length;for(;i--;)n[i]=t(e[i]);return n}function C4(e,t){let n=e.split("@"),i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(sV,".");let r=e.split("."),o=lV(r,t).join(".");return i+o}function T4(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 uV=e=>String.fromCodePoint(...e),cV=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},$4=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},I4=function(e,t,n){let i=0;for(e=n?Gn(e/700):e>>1,e+=Gn(e/t);e>Rv*26>>1;i+=36)e=Gn(e/Rv);return Gn(i+(Rv+1)*e/(e+38))},A4=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&&Gr("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&&Gr("invalid-input");let f=cV(e.charCodeAt(a++));f>=36&&Gr("invalid-input"),f>Gn((2147483647-i)/c)&&Gr("overflow"),i+=f*c;let p=d<=o?1:d>=o+26?26:d-o;if(f<p)break;let h=36-p;c>Gn(2147483647/h)&&Gr("overflow"),c*=h}let u=t.length+1;o=I4(i-l,u,l==0),Gn(i/u)>2147483647-r&&Gr("overflow"),r+=Gn(i/u),i%=u,t.splice(i++,0,r)}return String.fromCodePoint(...t)},M4=function(e){let t=[];e=T4(e);let n=e.length,i=128,r=0,o=72;for(let l of e)l<128&&t.push(Pv(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>Gn((2147483647-r)/u)&&Gr("overflow"),r+=(l-i)*u,i=l;for(let c of e)if(c<i&&++r>2147483647&&Gr("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(Pv($4(p+h%m,0))),d=Gn(h/m)}t.push(Pv($4(d,0))),o=I4(r,u,a===s),r=0,++a}++r,++i}return t.join("")},dV=function(e){return C4(e,function(t){return iV.test(t)?A4(t.slice(4).toLowerCase()):t})},fV=function(e){return C4(e,function(t){return oV.test(t)?"xn--"+M4(t):t})},pV={version:"2.3.1",ucs2:{decode:T4,encode:uV},decode:A4,encode:M4,toASCII:fV,toUnicode:dV};var Lv=pV;var z4={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 D4={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 N4={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 hV={default:z4,zero:D4,commonmark:N4},mV=/^(vbscript|javascript|file|data):/,gV=/^data:image\/(gif|png|jpeg|webp);/;function bV(e){let t=e.trim().toLowerCase();return mV.test(t)?gV.test(t):!0}var O4=["http:","https:","mailto:"];function vV(e){let t=al(e,!0);if(t.hostname&&(!t.protocol||O4.indexOf(t.protocol)>=0))try{t.hostname=Lv.toASCII(t.hostname)}catch{}return uf(Go(t))}function yV(e){let t=al(e,!0);if(t.hostname&&(!t.protocol||O4.indexOf(t.protocol)>=0))try{t.hostname=Lv.toUnicode(t.hostname)}catch{}return sl(Go(t),sl.defaultChars+"%")}function _n(e,t){if(!(this instanceof _n))return new _n(e,t);t||vf(e)||(t=e||{},e="default"),this.inline=new y4,this.block=new h4,this.core=new i4,this.renderer=new Xz,this.linkify=new E4,this.validateLink=bV,this.normalizeLink=vV,this.normalizeLinkText=yV,this.utils=Wb,this.helpers=Qo({},Gb),this.options={},this.configure(e),t&&this.set(t)}_n.prototype.set=function(e){return Qo(this.options,e),this};_n.prototype.configure=function(e){let t=this;if(vf(e)){let n=e;if(e=hV[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};_n.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};_n.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};_n.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};_n.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};_n.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};_n.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};_n.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Xr=_n;var kV=new bi({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 xV(e,t){if(e.isText&&t.isText&&xe.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var Uv=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:xe.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=xV(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:xe.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}};function dl(e,t,n,i){return e.getAttrs?e.getAttrs(t,n,i):e.attrs instanceof Function?e.attrs(t):e.attrs}function Fv(e,t){return e.noCloseToken||t=="code_inline"||t=="code_block"||t=="fence"}function R4(e){return e[e.length-1]==`
`?e.slice(0,e.length-1):e}function Bv(){}function wV(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);Fv(r,i)?n[i]=(s,a,l,u)=>{s.openNode(o,dl(r,a,l,u)),s.addText(R4(a.content)),s.closeNode()}:(n[i+"_open"]=(s,a,l,u)=>s.openNode(o,dl(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,dl(r,a,l,u))}else if(r.mark){let o=e.marks[r.mark];Fv(r,i)?n[i]=(s,a,l,u)=>{s.openMark(o.create(dl(r,a,l,u))),s.addText(R4(a.content)),s.closeMark(o)}:(n[i+"_open"]=(s,a,l,u)=>s.openMark(o.create(dl(r,a,l,u))),n[i+"_close"]=s=>s.closeMark(o))}else if(r.ignore)Fv(r,i)?n[i]=Bv:(n[i+"_open"]=Bv,n[i+"_close"]=Bv);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 jv=class{constructor(t,n,i){this.schema=t,this.tokenizer=n,this.tokens=i,this.tokenHandlers=wV(t,i)}parse(t,n={}){let i=new Uv(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 P4(e,t){for(;++t<e.length;)if(e[t].type!="list_item_open")return e[t].hidden;return!1}var due=new jv(kV,Xr("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:P4(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:P4(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}}),_V={open:"",close:"",mixable:!0},Zv=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 fl(this.nodes,this.marks,n);return i.renderContent(t),i.out}},Nn=new Zv({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("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/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=SV(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 L4(n.child(i),-1)},close(e,t,n,i){return L4(n.child(i-1),1)},escape:!1}});function L4(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 SV(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 fl=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=_V}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 g=t.child(l+1);return m.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let c=r;if(r="",s&&s.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!m.isInSet(i)})){let[m,g,b]=/^(\s*)(.*)$/m.exec(s.text);g&&(c+=g,s=b?s.withText(b):null,s||(u=i))}if(s&&s.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!this.isMarkAhead(t,l+1,m)})){let[m,g,b]=/^(.*?)(\s*)$/m.exec(s.text);b&&(r=b,s=g?s.withText(g):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 g=u[m];if(!this.getMark(g.type.name).mixable)break;for(let b=0;b<i.length;b++){let v=i[b];if(!this.getMark(v.type.name).mixable)break;if(g.eq(v)){m>b?u=u.slice(0,b).concat(g).concat(u.slice(b,m)).concat(u.slice(m+1,p)):b>m&&(u=u.slice(0,m).concat(u.slice(m+1,b)).concat(g).concat(u.slice(b,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 V4=gy(Z4(),1);var RV=Object.defineProperty,PV=(e,t,n)=>t in e?RV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ef=(e,t,n)=>(PV(e,typeof t!="symbol"?t+"":t,n),n),LV=Ae.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))}}}}}),H4=Xr();function K4(e,t){return H4.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new H4.inline.State(e,null,null,[]).scanDelims(t,!0)}function J4(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 FV(e,t,n,i){let r=n,o=e;for(;r<i&&!K4(o,r).can_open;)o=J4(o,t,r,1),r++;return{text:o,from:r,to:i}}function BV(e,t,n,i){let r=i,o=e;for(;r>n&&!K4(o,r).can_close;)o=J4(o,t,r,-1),r--;return{text:o,from:n,to:r}}function UV(e,t,n,i){let r={text:e,from:n,to:i};return r=FV(r.text,t,r.from,r.to),r=BV(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 Wv=class extends fl{constructor(t,n,i){super(t,n,i??{}),Ef(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=UV(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}}},G4=ft.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(e,t){var n,i;return this.editor.storage.markdown.options.html?(n=(i=q4(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=q4(t))===null||i===void 0?void 0:i[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function q4(e){let t=e.type.schema,n=t.text(" ",[e]),r=jo(M.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function Jv(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function jV(e){return e?.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ZV(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 HV(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var Cf=le.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(qV(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 qV(e,t){let n=e.type.schema,i=jo(M.from(e),n);return e.isBlock&&(t instanceof M||t.type.name===n.topNodeType.name)?WV(i):i}function WV(e){let n=Jv(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
${n.innerHTML}
`:`
`,n.outerHTML}var VV=le.create({name:"blockquote"}),KV=VV.extend({addStorage(){return{markdown:{serialize:Nn.nodes.blockquote,parse:{}}}}}),JV=le.create({name:"bulletList"}),X4=JV.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t,"  ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),GV=le.create({name:"codeBlock"}),XV=GV.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>")}}}}}}),YV=le.create({name:"hardBreak"}),Y4=YV.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:{}}}}}),QV=le.create({name:"heading"}),eK=QV.extend({addStorage(){return{markdown:{serialize:Nn.nodes.heading,parse:{}}}}}),tK=le.create({name:"horizontalRule"}),nK=tK.extend({addStorage(){return{markdown:{serialize:Nn.nodes.horizontal_rule,parse:{}}}}}),rK=le.create({name:"image"}),iK=rK.extend({addStorage(){return{markdown:{serialize:Nn.nodes.image,parse:{}}}}}),oK=le.create({name:"listItem"}),sK=oK.extend({addStorage(){return{markdown:{serialize:Nn.nodes.list_item,parse:{}}}}}),aK=le.create({name:"orderedList"});function lK(e,t,n){let i=0;for(;n-i>0&&t.child(n-i-1).type.name===e.type.name;i++);return i}var uK=aK.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=lK(t,n,i)%2?") ":". ";e.renderList(t,s,u=>{let c=String(r+u);return e.repeat(" ",o-c.length)+c+l})},parse:{}}}}}),cK=le.create({name:"paragraph"}),dK=cK.extend({addStorage(){return{markdown:{serialize:Nn.nodes.paragraph,parse:{}}}}});function qv(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 fK=le.create({name:"table"}),pK=fK.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!hK(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 W4(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function hK(e){let t=qv(e),n=t[0],i=t.slice(1);return!(qv(n).some(r=>r.type.name!=="tableHeader"||W4(r)||r.childCount>1)||i.some(r=>qv(r).some(o=>o.type.name==="tableHeader"||W4(o)||o.childCount>1)))}var mK=le.create({name:"taskItem"}),gK=mK.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())})}}}}}}),bK=le.create({name:"taskList"}),vK=bK.extend({addStorage(){return{markdown:{serialize:X4.storage.markdown.serialize,parse:{setup(e){e.use(V4.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),yK=le.create({name:"text"}),kK=yK.extend({addStorage(){return{markdown:{serialize(e,t){e.text(jV(t.text))},parse:{}}}}}),xK=ft.create({name:"bold"}),wK=xK.extend({addStorage(){return{markdown:{serialize:Nn.marks.strong,parse:{}}}}}),_K=ft.create({name:"code"}),SK=_K.extend({addStorage(){return{markdown:{serialize:Nn.marks.code,parse:{}}}}}),EK=ft.create({name:"italic"}),$K=EK.extend({addStorage(){return{markdown:{serialize:Nn.marks.em,parse:{}}}}}),CK=ft.create({name:"link"}),TK=CK.extend({addStorage(){return{markdown:{serialize:Nn.marks.link,parse:{}}}}}),IK=ft.create({name:"strike"}),AK=IK.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),MK=[KV,X4,XV,Y4,eK,nK,Cf,iK,sK,uK,dK,pK,gK,vK,kK,wK,SK,G4,$K,TK,AK];function $f(e){var t,n;let i=(t=e.storage)===null||t===void 0?void 0:t.markdown,r=(n=MK.find(o=>o.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return i||r?{...r,...i}:null}var Vv=class{constructor(t){Ef(this,"editor",null),this.editor=t}serialize(t){let n=new Wv(this.nodes,this.marks,{hardBreakNodeName:Y4.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(G4)])),...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=$f(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=$f(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}},Kv=class{constructor(t,n){Ef(this,"editor",null),Ef(this,"md",null);let{html:i,linkify:r,breaks:o}=n;this.editor=t,this.md=this.withPatchedRenderer(Xr({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=$f(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=Jv(i);return this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=$f(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")&&ZV(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}HV(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}},zK=Ae.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new fe({key:new _e("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 Tn.fromSchema(this.editor.schema).parseSlice(Jv(i),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),Q4=Ae.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=M6.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 Kv(this.editor,this.options),serializer:new Vv(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[LV.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),zK.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function DK(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 Hi(e){return DK(e)}function qi(){let e=new Map,t=new Set;return n=>{let i=Hi(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 rs(e){return/^[A-Za-z]:[\\/]/.test(e)}function hl(e){return e.replace(/\\/g,"/")}function Xn(e){return hl(e).replace(/\/+/g,"/")}function pl(e){let t=Xn(e);return rs(t)?t.slice(0,3):t.startsWith("/")?"/":""}function Tf(e){let t=Xn(e),n=pl(t);return t.slice(n.length).split("/").filter(Boolean)}function Wi(e){let t=pl(e),n=Tf(e);return n.length<=1?t||".":`${t}${n.slice(0,-1).join("/")}`}function e3(e){let t=pl(e),n=Tf(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 t3(e,t){let n=Xn(e),i=Xn(t),r=pl(n),o=pl(i);if(r!==o)return i;let s=Tf(n),a=Tf(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 NK=/\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]/g,OK=/^(`{3,}|~{3,})/;function Af(e){return encodeURI(hl(e))}function Gv(e){try{return decodeURIComponent(e)}catch{return e}}function i3(e){let t=e.match(/^\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]$/);return t?{path:(t[1]??"").trim(),anchor:t[2]?.trim(),alias:t[3]?.trim()}:null}function RK(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 PK(e){return/\.[A-Za-z0-9_-]+$/.test(e)?e:`${e}.md`}function o3(e){if(!e.path)return e.anchor?`#${Hi(e.anchor)}`:"#";let t=PK(hl(e.path)),n=t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||rs(t)?t:`./${t}`,i=Af(n);return e.anchor?`${i}#${Hi(e.anchor)}`:i}function n3(e){return e.replace(NK,t=>{let n=i3(t);if(!n)return t;let i=RK(n),r=o3(n);return`[${i}](${r} "mcp-wiki:${encodeURIComponent(t)}")`})}function LK(e){let t="",n=0;for(;n<e.length;){let i=e.indexOf("`",n);if(i===-1){t+=n3(e.slice(n));break}t+=n3(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 If(e){if(!(!e||e.length===0))return Gv(e)}function FK(e){let t=e.indexOf("#");return t===-1?{pathPart:e}:{pathPart:e.slice(0,t),anchorPart:e.slice(t+1)}}function BK(e){let t=Xn(e),n=t.endsWith("/")?t:`${t}/`;return rs(n)?new URL(`file:///${Af(n)}`):n.startsWith("/")?new URL(`file://${Af(n)}`):new URL(`file:///${Af(n)}`)}function UK(e){let t=Gv(e.pathname);return/^\/[A-Za-z]:\//.test(t)?t.slice(1):t}function jK(e){return/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e)&&!rs(e)}function r3(e,t){let n=hl(Gv(t));if(n.startsWith("/")||rs(n))return Xn(n);let i=Wi(e);if(i==="."&&!Xn(e).includes("/"))return Xn(n);let r=new URL(encodeURI(n),BK(i));return Xn(UK(r))}function s3(e){return e.replace(/\[([^\]]*)\]\(([^)\s]*)(?:\s+"mcp-wiki:([^"]+)")\)/g,(t,n,i,r)=>{try{return decodeURIComponent(r)}catch{return`[[${r}]]`}})}function ml(e){let t=e.split(`
`),n=null;return t.map(i=>{let o=i.trimStart().match(OK);if(o){let s=o[1];return n?s[0]===n[0]&&s.length>=n.length&&(n=null):n=s,i}return n?i:LK(i)}).join(`
`)}function a3(e,t){let n=i3(t);if(n){let o=o3(n);if(o.startsWith("#"))return{kind:"anchor",href:t,anchor:If(o.slice(1))};let[s,a]=o.split("#");return{kind:"file",href:t,targetPath:r3(e,s),...a?{anchor:If(a)}:{}}}if(jK(t))return{kind:"external",href:t,url:t};if(t.startsWith("#"))return{kind:"anchor",href:t,anchor:If(t.slice(1))};let{pathPart:i,anchorPart:r}=FK(t);return{kind:"file",href:t,targetPath:r3(e,i),...r?{anchor:If(r)}:{}}}var ZK=/^(---\r?\n[\s\S]*?\r?\n---\r?\n)/,HK=/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,qK=/\*\*([^*\n]*?`[^`\n]+`[^*\n]*?)\*\*/g,h3="TIPTAPPIPEESCX";function WK(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 VK(e){let t=e.includes(`\r
`)?`\r
`:`
`,n=t===`\r
`?e.replace(/\r\n/g,`
`):e,i=n.match(ZK),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(HK,(m,g,b)=>{if(!WK(g,b))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(qK,m=>{let g=`TIPTAPBOLDCODE${String(f).padStart(4,"0")}`;return d.push({placeholder:g,original:m}),f+=1,g});let p=0;return u=u.replace(/\\\|/g,()=>(p+=1,h3)),{editorInput:ml(u),context:{originalInput:e,frontmatter:r,frontmatterGap:s,trailingNewline:a,eol:t,codeLinks:l,boldCodeRuns:d,pipeEscapeCount:p}}}function KK(e,t){let n=s3(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(h3).join("\\|")),n=YK(n,t.originalInput),n=QK(n,t.originalInput),n=eJ(n,t.originalInput),n=JK(n,t.originalInput),n=GK(n,t.originalInput),n=n.replace(/^\n+/,""),n=XK(n,t.originalInput),n=tJ(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 JK(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 GK(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 XK(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&&(l3(o)||l3(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 l3(e){return/^\s*(#{1,6}\s|[-*+]\s|\d+\.\s|>\s|```|\|.*\|\s*$|---|\s*$)/.test(e)}function YK(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=u3(s);if(n.some(u=>u3(u)===a)){if(n.find(c=>c===s)!==void 0)continue;r[o]=a}}return r.join(`
`)}function u3(e){return e.replace(/\\([\[\]~])/g,"$1")}function QK(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=c3(s);!n.some(c=>c3(c)===a)||n.find(c=>c===s)!==void 0||(r[o]=a)}return r.join(`
`)}function c3(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function eJ(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 tJ(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 nJ(){return[qM.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}),WM.configure({allowBase64:!0,inline:!0}),Lb.configure({resizable:!1,HTMLAttributes:{class:"markdown-table"}}),ol,il,rl,Q4.configure({html:!0,tightLists:!0,bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!0,transformCopiedText:!1})]}function d3(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 Yv(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 Yv(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[...Yv(e,t,n,l,r,c.index),...Yv(e,t,l+1,i,c.index+1,o)]}return[{fromLine:Math.max(1,r-3),toLine:Math.max(r+1,o+3)}]}function f3(e,t){let n=t.relatedTarget,i=e?.closest(".tool-shell");return!!(n&&(e?.contains(n)||i?.contains(n)))}function rJ(){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">&#10077;</button>
      <button class="markdown-format-button" type="button" data-format="list" title="List" aria-label="List">&#8226;</button>
      <button class="markdown-format-button" type="button" data-format="link" title="Link" aria-label="Link">&#128279;</button>
      <button class="markdown-format-button" type="button" data-format="code" title="Code" aria-label="Code">&lsaquo;&rsaquo;</button>
    `}function p3(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 iJ(e,t){return e.filter(i=>i.text===t.text).length<=1?t.text:`${t.text} (#${t.id})`}function m3(){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 g3(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">${p3("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">${p3("markdown")}<span>Preview</span></button>
      </div>
    `}function b3(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>${rJ()}</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 oJ(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 Xv(e){let t=qi(),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 v3(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"),g=t?.querySelector("#markdown-link-apply"),b=t?.querySelector("#markdown-link-cancel"),v="file",y=[],x=null,C="Search for a file to link",A=0,D=0;if(e.view==="markdown"){e.target.replaceChildren();let ae=!1,I=()=>{ae=!0},{editorInput:W,context:Z}=VK(e.value),te=()=>{let N=w.storage.markdown?.getMarkdown()??"";return KK(N,Z)},de="",w=new z6({element:e.target,extensions:nJ(),content:W,editorProps:{attributes:{class:"markdown-editor-surface markdown-editor-surface--markdown markdown markdown-doc",role:"textbox","aria-multiline":"true"}},onUpdate:({editor:E})=>{if(Xv(E.view.dom),!ae)return;let N=te(),U=d3(de,N);de=N,e.onChange(N,U)},onSelectionUpdate:()=>{O()},onBlur:({event:E})=>{f3(t,E)||(n&&(n.hidden=!0),e.onBlur?.())}});de=te();let S=w.view.dom;Xv(S);let O=()=>{if(!n)return;let{from:E,to:N,empty:U}=w.state.selection;if(U||!w.isFocused){n.hidden=!0;return}let se=w.view.coordsAtPos(E),Se=w.view.coordsAtPos(N),at=t;if(!at)return;let Pn=at.getBoundingClientRect(),ei=(se.left+Se.right)/2;n.hidden=!1;let fs=Math.max(12,ei-Pn.left-n.offsetWidth/2),Ff=Math.max(12,se.top-Pn.top-n.offsetHeight-10);n.style.left=`${fs}px`,n.style.top=`${Ff}px`},L=(E=[],N="None")=>{if(!f)return;f.replaceChildren();let U=document.createElement("option");U.value="",U.textContent=N,f.appendChild(U);for(let se of E){let Se=document.createElement("option");Se.value=se.id,Se.textContent=iJ(E,se),Se.dataset.headingText=se.text,f.appendChild(Se)}},re=async E=>{if(!f)return;let N=++D;L([],"Loading\u2026");try{let U=await e.loadHeadings?.(E.path)??[];if(N!==D||x?.path!==E.path)return;L(U)}catch{if(N!==D||x?.path!==E.path)return;L([],"Failed to load headings")}},Q=()=>{if(!d)return;if(y.length===0){let N=document.createElement("div");N.className="markdown-link-results-empty",N.textContent=C,d.replaceChildren(N);return}let E=document.createDocumentFragment();for(let N of y){let U=document.createElement("button");U.type="button",U.className=`markdown-link-result${x?.path===N.path?" is-active":""}`,U.dataset.linkPath=N.path;let se=document.createElement("span");se.className="markdown-link-result-title",se.textContent=N.title;let Se=document.createElement("span");Se.className="markdown-link-result-path",Se.textContent=N.relativePath,U.append(se,Se),U.addEventListener("click",()=>{x=N,Q(),re(N)}),E.appendChild(U)}d.replaceChildren(E)},Ce=E=>{v=E,s?.classList.toggle("is-active",E==="file"),a?.classList.toggle("is-active",E==="url"),l&&(l.hidden=E!=="file"),u&&(u.hidden=E!=="url")},pt=async()=>{if(!c||!e.searchLinks)return;let E=c.value.trim();if(E.length===0){A+=1,y=[],x=null,C="Search for a file to link",L(),Q();return}let N=++A;try{let U=await e.searchLinks(E);if(N!==A||E!==c.value.trim())return;y=U,x=U[0]??null,C=U.length===0?"No matching files found":"Search for a file to link",Q(),x?re(x):L()}catch{if(N!==A)return;y=[],x=null,C="Search failed. Try again.",L(),Q()}},ke=()=>{o?.setAttribute("hidden",""),h&&(h.value=""),m&&(m.value=""),p&&(p.value=""),c&&(c.value=""),L(),y=[],x=null,C="Search for a file to link",Q()},Pe=()=>{if(!o)return;let E=w.state.doc.textBetween(w.state.selection.from,w.state.selection.to," ").trim();o.removeAttribute("hidden"),Ce("url"),m&&(m.value=E),h&&(h.value="",h.focus()),y=[],x=null,C="Search for a file to link",L(),Q()},wt=()=>{if(I(),v==="url"){let E=h?.value?.trim();if(!E){ke();return}let N=m?.value?.trim()||E,{from:U,to:se,empty:Se}=w.state.selection;Se?w.chain().focus().insertContent({type:"text",text:N,marks:[{type:"link",attrs:{href:E}}]}).run():w.chain().focus().deleteRange({from:U,to:se}).insertContent({type:"text",text:N,marks:[{type:"link",attrs:{href:E}}]}).run()}else if(x){let E=f?.value?.trim(),N=f?.selectedOptions[0]?.dataset.headingText?.trim(),U=p?.value?.trim(),Se=`[[${x.path===e.currentFilePath?"":x.wikiPath}${E?`#${E}`:""}${U?`|${U}`:""}]]`,at=`${x.relativePath}${E?`#${E}`:""}`,Pn=U||N||x.title,{from:ei,to:fs,empty:Ff}=w.state.selection,hy=w.chain().focus();Ff||hy.deleteRange({from:ei,to:fs}),hy.insertContent({type:"text",text:Pn,marks:[{type:"link",attrs:{href:at,title:`mcp-wiki:${encodeURIComponent(Se)}`}}]}).run()}ke()},Mt=E=>{let U=E.currentTarget.dataset.format;if(U)switch(I(),U){case"bold":w.chain().focus().toggleBold().run();break;case"italic":w.chain().focus().toggleItalic().run();break;case"strike":w.chain().focus().toggleStrike().run();break;case"quote":w.chain().focus().toggleBlockquote().run();break;case"list":w.chain().focus().toggleBulletList().run();break;case"code":w.chain().focus().toggleCode().run();break;case"link":Pe();break}},Ye=()=>{let E=r?.value;if(!E)return;if(E==="p"){I(),w.chain().focus().setParagraph().run();return}let N=/^h([1-6])$/.exec(E);if(N){I();let U=Number.parseInt(N[1],10);w.chain().focus().toggleHeading({level:U}).run()}},Oe=document.createElement("div");Oe.className="markdown-link-popover",Oe.hidden=!0,S.parentElement?.appendChild(Oe);let Qe=null,Vi=E=>{Qe&&(clearTimeout(Qe),Qe=null);let N=E.getAttribute("href")??"";Oe.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>',Oe.hidden=!1,Oe.querySelector("#link-popover-open")?.addEventListener("click",at=>{at.preventDefault(),at.stopPropagation(),Oe.hidden=!0,E.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))},{once:!0}),Oe.querySelector("#link-popover-edit")?.addEventListener("click",at=>{if(at.preventDefault(),at.stopPropagation(),Oe.hidden=!0,!o)return;let Pn=w.view.posAtDOM(E,0);if(Pn>=0){let fs=Pn+(E.textContent?.length??0);w.chain().focus().setTextSelection({from:Pn,to:fs}).run()}let ei=E.textContent?.trim()??"";o.removeAttribute("hidden"),Ce("url"),h&&(h.value=N),m&&(m.value=ei)},{once:!0});let U=E.getBoundingClientRect(),se=S.parentElement;if(!se)return;let Se=se.getBoundingClientRect();Oe.style.left=`${Math.max(4,U.left-Se.left)}px`,Oe.style.top=`${U.bottom-Se.top+4}px`},On=()=>{Qe=setTimeout(()=>{Oe.hidden=!0},200)},oe=E=>{let N=E.target?.closest?.("a[href]");N&&S.contains(N)&&Vi(N)},ds=E=>{E.target?.closest?.("a[href]")&&On()},st=()=>{Qe&&(clearTimeout(Qe),Qe=null)},Ne=()=>{On()},Qr=()=>Ce("file"),Rn=()=>{Ce("url"),h?.focus()},Ki=()=>{pt()},Ji=E=>{E.target===o&&ke()};return S.addEventListener("beforeinput",I),S.addEventListener("paste",I),S.addEventListener("cut",I),S.addEventListener("drop",I),S.addEventListener("mouseover",oe),S.addEventListener("mouseout",ds),Oe.addEventListener("mouseenter",st),Oe.addEventListener("mouseleave",Ne),i.forEach(E=>E.addEventListener("click",Mt)),r?.addEventListener("change",Ye),s?.addEventListener("click",Qr),a?.addEventListener("click",Rn),c?.addEventListener("input",Ki),g?.addEventListener("click",wt),b?.addEventListener("click",ke),o?.addEventListener("click",Ji),typeof e.initialScrollTop=="number"&&(S.scrollTop=e.initialScrollTop),Q(),{destroy:()=>{S.removeEventListener("beforeinput",I),S.removeEventListener("paste",I),S.removeEventListener("cut",I),S.removeEventListener("drop",I),S.removeEventListener("mouseover",oe),S.removeEventListener("mouseout",ds),Oe.removeEventListener("mouseenter",st),Oe.removeEventListener("mouseleave",Ne),i.forEach(E=>E.removeEventListener("click",Mt)),r?.removeEventListener("change",Ye),s?.removeEventListener("click",Qr),a?.removeEventListener("click",Rn),c?.removeEventListener("input",Ki),g?.removeEventListener("click",wt),b?.removeEventListener("click",ke),o?.removeEventListener("click",Ji),Oe.remove(),Qe&&clearTimeout(Qe),w.destroy(),e.target.replaceChildren()},focus:()=>{w.commands.focus()},getValue:()=>te(),setValue:E=>{w.commands.setContent(ml(E),{emitUpdate:!1}),de=te(),Xv(S)},revealLine:(E,N)=>{if(N){let U=S.querySelector(`#${CSS.escape(N)}`);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}}w.commands.focus()},setScrollTop:E=>{S.scrollTop=Math.max(0,E)}}}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 V=z.value;e.target.replaceChildren(z);let ce=()=>{z.style.height="auto",z.style.height=`${Math.max(z.scrollHeight,640)}px`},ze=()=>{let ae=z.value,I=d3(V,ae);V=ae,e.onChange(ae,I)},nt=()=>{ce(),ze()},He=ae=>{f3(t,ae)||e.onBlur?.()},De=ae=>{ae.key==="Tab"&&(ae.preventDefault(),oJ(z),ce(),ze())};return z.addEventListener("input",nt),z.addEventListener("keydown",De),z.addEventListener("focusout",He),ce(),typeof e.initialScrollTop=="number"&&(z.scrollTop=e.initialScrollTop),{destroy:()=>{z.removeEventListener("input",nt),z.removeEventListener("keydown",De),z.removeEventListener("focusout",He),e.target.replaceChildren()},focus:()=>{z.focus()},getValue:()=>z.value,setValue:ae=>{z.value=ae,V=ae,ce()},revealLine:ae=>{let I=Math.max(1,Math.floor(ae)),W=z.value.split(`
`),Z=0;for(let de=1;de<I&&de<=W.length;de+=1)Z+=W[de-1].length+1;z.focus(),z.setSelectionRange(Z,Z);let te=Number.parseFloat(window.getComputedStyle(z).lineHeight||"20")||20;z.scrollTop=Math.max(0,(I-1)*te-te*2)},setScrollTop:ae=>{z.scrollTop=Math.max(0,ae)}}}function y3(){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 sJ(){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 aJ(){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 lJ(){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 uJ(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 k3(e){let t=Gt(e.payload.content),n=e.body.notice?`<div class="notice">${e.body.notice}</div>`:"",i=HC(e.payload.filePath),r=t?t.toLine-t.fromLine+1:o0(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 A=tt(e.markdownWorkspace.draftContent),D=A.trim().split(/\s+/).filter(Boolean).length,z=o0(A);a=`${o} \u2022 EDIT MODE \u2022 ${z} LINES \u2022 ${D} 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,g=t?.isPartial&&t.toLine<t.totalLines&&t.totalLines-t.toLine>1,b=m?`<button class="load-lines-banner" id="load-before">\u2191 Load lines 1\u2013${t.fromLine-1}</button>`:"",v=g?`<button class="load-lines-banner" id="load-after">\u2193 Load lines ${t.toLine+1}\u2013${t.totalLines}</button>`:"",y=e.isExpanded||l,x=e.capabilities.canOpenInFolder,C=e.capabilities.canCopy;return{effectiveExpanded:y,html:`
          <main id="tool-shell" class="shell tool-shell ${y?"expanded":"collapsed"}${e.hideSummaryRow?" host-framed":""}${l?" fullscreen":""}">
            ${l?"":pa({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="${gn(e.payload.filePath)}">${i}</span>`}
                <span class="panel-topbar-actions">
                    ${f?uJ(e.markdownWorkspace):""}
                    ${u}
                    ${f&&l?g3(e.markdownWorkspace.editorView):""}
                    ${d&&!l&&e.canGoFullscreen?`<button class="panel-action" id="expand-fullscreen" title="Expand" aria-label="Expand">${lJ()}</button>`:""}
                    ${f?`<button class="panel-action" id="revert-markdown" ${l?"":'title="Undo" aria-label="Undo" '}${p?"disabled":""}>${aJ()}${l?" Undo":""}</button>`:""}
                    ${f&&l?m3():""}
                    ${d&&!l?`<button class="panel-action" id="copy-active-markdown" title="Copy" aria-label="Copy">${y3()}</button>`:""}
                    ${C&&e.capabilities.supportsPreview&&!d?`<button class="panel-action" id="copy-source" title="Copy source" aria-label="Copy source">${y3()}</button>`:""}
                    ${x&&f&&l?`<button class="panel-action" id="open-in-editor" ${h?"disabled":""}>${e.markdownEditorAppIcon} Open in ${gn(e.defaultMarkdownEditorName??"editor")}</button>`:""}
                    ${x&&!(f&&l)?`<button class="panel-action" id="open-in-folder" title="Open in folder" aria-label="Open in folder" ${f&&h?"disabled":""}>${sJ()}</button>`:""}
                </span>
              </div>
              ${n}
              <div class="panel-content-wrapper">
                ${b}
                ${e.body.html}
                ${v}
              </div>
              <div class="panel-footer">
                <span>${a}</span>
              </div>
            </section>
          </main>
        `}}var cJ={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 dJ(e){let t=e.toLowerCase().match(/\.([a-z0-9]+)$/);return t?t[1]:""}function Qv(e){let t=dJ(e);return cJ[t]??"text"}function x3(e,t){if(Qv(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 gl(e,t="text",n=1){let o=vc(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 fJ(){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 pJ(e){let t=fJ(),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="${$t(n)}"></iframe>`}function w3(e,t){if(t==="source")return{html:`<div class="panel-content source-content">${gl(e,"html")}</div>`};try{return{html:`<div class="panel-content html-content">${pJ(e)}</div>`}}catch{return{html:`<div class="panel-content source-content">${gl(e,"html")}</div>`,notice:"HTML renderer failed. Showing source instead."}}}var hJ=new Set(["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/svg","image/svg+xml"]);function ey(e){return e?e.toLowerCase().split(";",1)[0].trim():""}function _3(e){let t=ey(e);return t.length>0&&hJ.has(t)}function S3(e){return`<pre class="code-viewer"><code class="hljs language-text">${$t(e)}</code></pre>`}function mJ(e){let t=ey(e.mimeType);if(!_3(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="${$t(n)}" alt="${$t(e.fileName)}" loading="eager" decoding="async"></div></div>`}}function bl(e,t){return{supportsPreview:!0,canCopy:t,canOpenInFolder:!Nr(e.filePath)}}var ty={directory:{getCapabilities:e=>bl(e,!1),renderBody:({payload:e})=>WC(tt(e.content),e.filePath)},html:{getCapabilities:e=>bl(e,!0),renderBody:({payload:e,htmlMode:t})=>w3(tt(e.content),t)},image:{getCapabilities:e=>bl(e,!1),renderBody:({payload:e})=>mJ(e)},markdown:{getCapabilities:e=>bl(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">${S3(tt(e.content))}</div>`}}}},text:{getCapabilities:e=>bl(e,!0),renderBody:({payload:e,startLine:t})=>{let n=tt(e.content),i=Qv(e.filePath),r=x3(n,e.filePath);return{notice:r.notice,html:`<div class="panel-content source-content">${gl(r.content,i,t)}</div>`}}},unsupported:{getCapabilities:e=>{let t=tt(e.content).trim().length>0;return{supportsPreview:t,canCopy:t,canOpenInFolder:!Nr(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">${S3(t)}</div>`}}}};function E3(e){return ty[e.fileType]?.getCapabilities(e)??{supportsPreview:!1,canCopy:!1,canOpenInFolder:!Nr(e.filePath)}}function $3(e){return(ty[e.payload.fileType]??ty.text).renderBody(e)}function is(e){return`'${e.replace(/'/g,"'\\''")}'`}function C3(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 ny(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 ${C3(o)}`}return i.includes("mac")?`open -R ${is(n)}`:`xdg-open ${is(Wi(n))}`}function T3(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 ${is(r.appPath)} ${is(i)}`;let o=navigator.userAgent.toLowerCase();if(o.includes("win")){let a=`Start-Process -FilePath '${i.replace(/'/g,"''")}'`;return`powershell.exe -NoProfile -NonInteractive -EncodedCommand ${C3(a)}`}return o.includes("mac")?`open ${is(i)}`:`xdg-open ${is(i)}`}function I3(){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 A3(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,g=p.top-h.top+n.scrollTop-32,b=r.offsetWidth||200;m=Math.max(8,Math.min(m-b/2,n.clientWidth-b-8)),g=Math.max(4,g),r.style.left=`${m}px`,r.style.top=`${g}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 g=Math.min(h,m),b=Math.max(h,m);return g===b?`line ${g}`:`lines ${g}\u2013${b}`}}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),g=m?` (${m})`:"",b=`User selected text from file ${e.payload.filePath}${g}:
\`\`\`
${f}
\`\`\``;e.updateContext?.(b),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 ry(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 M3(e,t){return e.map(n=>`<button class="document-outline-link markdown-toc-link${n.id===t?" is-active":""}" type="button" data-toc-id="${gn(n.id)}" data-level="${n.level}" aria-current="${n.id===t?"location":"false"}">${gn(n.text)}</button>`).join("")}function z3(){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 gJ(){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 D3(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">${z3()}</button>
        </div>
        <nav class="document-outline-nav markdown-toc-nav">${M3(e,t)}</nav>
      </aside>
    `}function N3(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),ry(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);ry(t,u)},o=e.shell.querySelector("#toc-toggle"),s=()=>{let a=e.shell.classList.toggle("markdown-toc-collapsed");o&&(o.innerHTML=a?gJ():z3(),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=M3(n,l),ry(t,l??null),r()}}}function O3(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 bJ=Xr;function Mf(e={}){return new bJ({html:!1,linkify:!0,typographer:!1,...e.highlight?{highlight:e.highlight}:{}})}function zf(e){return ml(e)}function Df(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=O3(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 vJ=Mf();function ss(e){let t=vJ.parse(zf(e),{}),n=qi(),i=[];for(let r=0;r<t.length;r+=1){let o=Df(t,r,n);o&&i.push(o)}return i}var vl=Mf({highlight(e,t){let n=(t||"text").toLowerCase(),i=vc(e,n);return`<pre class="code-viewer"><code class="hljs language-${n}">${i}</code></pre>`}}),R3=vl.renderer.rules.heading_open;vl.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:qi();r.nextSlug=s;let a=Df(t,n,s),l=t[n];return a&&(l.attrSet?.("id",a.id),l.attrSet?.("data-heading-id",a.id)),typeof R3=="function"?R3(...e):o.renderToken(t,n,i)};var P3=vl.renderer.rules.link_open;vl.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 P3=="function"?P3(...e):r.renderToken(t,n,i)};function L3(e){return vl.render(zf(e),{nextSlug:qi()})}function F3(e){return L3(e).replace(/<\s*br\s*\/?>/gi,`
`).replace(/<\/p>/gi,`

`).replace(/<\/h[1-6]>/gi,`

`).replace(/<\/li>/gi,`
`).replace(/<li>/gi,"- ").replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#39;/g,"'").replace(/&quot;/g,'"').replace(/\n{3,}/g,`

`).trim()}var U3=40;function yJ(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 kJ(e){return e.split(`
`).map(t=>t.trim()).filter(Boolean)}function xJ(e){return e.split(`
`).map(t=>t.trim()).filter(t=>t.startsWith("\u{1F4C1} ")).map(t=>t.slice(3).trim())}function B3(e){return e.replace(/\.md$/i,"")}function wJ(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 _J(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 j3(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 SJ(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 EJ(e,t){return iy(e,t,0,e.length,0,t.length)}function iy(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[...iy(e,t,n,l,r,c.index),...iy(e,t,l+1,i,c.index+1,o)]}return[{oldStart:n,oldEnd:i,newStart:r,newEnd:o}]}function Z3(e,t){let n=e.split(`
`),i=t.split(`
`),r=Math.ceil(Math.max(n.length,i.length)/U3),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 $J(e){return e.flatMap(t=>Math.max(t.old_string.split(`
`).length,t.new_string.split(`
`).length)>U3?Z3(t.old_string,t.new_string):[t])}function CJ(e,t,n=[]){if(e===t)return[];let i=e.split(`
`),r=t.split(`
`),o=i.length*r.length>1e6?EJ(i,r):wJ(i,r);if(o.length===0)return[];let s=3,a=j3(n),u=_J(o,s*2+1).filter(c=>SJ(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?Z3(e,t):$J(u)}function TJ(e,t){return t.reduce((n,i)=>n.replace(i.old_string,i.new_string),e)}function IJ(e){return typeof e=="object"&&e!==null}function AJ(e){if(!IJ(e)||e.isError!==!0)return!1;let t=Xt(e)?.toLowerCase()??"";return t.includes("not found")||t.includes("no such file")||t.includes("enoent")}function H3(e){let t,n,i,r=null,o=1e3;function s(){r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,I()},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(w){return tt(w.content)}function d(w,S,O={}){let L=O.keepDraft?w.draftContent:S;w.sourceContent=S,w.fullDocumentContent=S,w.draftContent=L,w.outline=ss(S),w.dirty=L!==S,w.dirtyLineRanges=[],w.fileDeleted=!1,w.outline.some(re=>re.id===w.activeHeadingId)||(w.activeHeadingId=w.outline[0]?.id??null)}async function f(w,S,O){let L=await e.callTool?.("read_file",{path:w,...typeof S=="number"?{offset:O??0,length:S}:{},origin:"ui"});return{rawResult:L,payload:xc(L)??null}}async function p(w,S,O){return(await f(w,S,O)).payload}async function h(w){let S=Gt(w.content);return S?.isPartial?await p(w.filePath,S.totalLines)??w:w}async function m(w){let S=await p(w);return S?h(S):null}function g(w){let S=tt(w.content);if(!t||t.filePath!==w.filePath||t.sourceContent!==S){let O=ss(S);t={filePath:w.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 b(w){return w.draftContent!==w.fullDocumentContent}function v(w){let S=g(w),O=S.outline,re=e.getCurrentDisplayMode()==="fullscreen"?D3(O,S.activeHeadingId):"";return!S.activeHeadingId&&O.length>0&&(S.activeHeadingId=O[0].id),{notice:[S.error,S.notice].find(Ce=>typeof Ce=="string"&&Ce.trim().length>0),html:`
              <div class="panel-content markdown-content markdown-content--workspace">
                <div class="markdown-workspace markdown-workspace--edit${re?" markdown-workspace--with-toc":""}">
                  ${re}
                  <section class="markdown-workspace-main markdown-workspace-main--editor">
                    ${b3({view:S.editorView})}
                  </section>
                </div>
              </div>
            `}}async function y(w){let S=e3(w),O=new Set(["[DIR] .git","[DIR] .obsidian","[FILE] package.json","[FILE] pnpm-workspace.yaml","[FILE] turbo.json"]);for(let L of S)try{let re=await e.callTool?.("list_directory",{path:L,depth:1,origin:"ui"}),Q=Xt(re)??"";if(kJ(Q).some(pt=>O.has(pt)))return L}catch{}return Wi(w)}async function x(w,S){let O=S.trim();if(O.length===0)return[];let L=await y(w),re=await e.callTool?.("start_search",{path:L,pattern:O,searchType:"files",filePattern:"*.md",maxResults:20,earlyTermination:!1,literalSearch:!0,origin:"ui"}),Q=Xt(re)??"",Ce=xJ(Q),pt=Wi(w);return Ce.map(ke=>{let Pe=ke.replace(/\\/g,"/"),wt=Pe.split("/").pop()??Pe,Mt=B3(wt),Ye=t3(pt,Pe),Oe=B3(Ye.startsWith("./")?Ye.slice(2):Ye);return{path:Pe,title:Mt,wikiPath:Oe,relativePath:Ye}})}async function C(w,S){if(S===w&&t)return t.outline.map(L=>({id:L.id,text:L.text}));let O=await m(S);return O?ss(c(O)).map(L=>({id:L.id,text:L.text})):[]}function A(w){let S=w.trim();return S?document.getElementById(S)??document.getElementById(Hi(S)):null}function D(w){let S=A(w);if(!S)return!1;let O=[],L=S.parentElement;for(;L;){let Ce=window.getComputedStyle(L).overflowY;(Ce==="auto"||Ce==="scroll"||Ce==="overlay")&&L.scrollHeight>L.clientHeight&&O.push(L),L=L.parentElement}S.scrollIntoView({block:"start",inline:"nearest"});for(let Q of O){let Ce=Q.getBoundingClientRect(),pt=S.getBoundingClientRect(),ke=Math.max(Q.scrollTop+(pt.top-Ce.top)-24,0);Q.scrollTop=ke}let re=document.scrollingElement;if(re){let Q=S.getBoundingClientRect().top,Ce=Math.max(re.scrollTop+Q-24,0);re.scrollTop=Ce}return S.setAttribute("tabindex","-1"),S.focus({preventScroll:!0}),t&&(t.activeHeadingId=S.id||Hi(w)),!0}function z(){let w=t?.pendingAnchor;!t||!w||(t.pendingAnchor=null,D(w)||(t.error=`Heading not found: ${w}`,e.rerender()))}function V(w,S,O,L){e.updateSaveStatus(w,S),window.setTimeout(()=>{L&&!L()||e.updateSaveStatus("","")},O)}async function ce(w){try{let S=Gt(w.content),{rawResult:O,payload:L}=S?.isPartial?await f(w.filePath,S.toLine-S.fromLine+1,S.readOffset):await f(w.filePath);if(!L){AJ(O)&&(t&&(t.fileDeleted=!0),e.updateSaveStatus("File deleted","saved"));return}let re=c(L),Q=c(w);if(re===Q)return;e.storePayloadOverride(L),t=void 0,e.rerender()}catch{}}async function ze(w,S={}){let O=g(w),L=Gt(w.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 re=await p(w.filePath,L.totalLines);if(!re){O.error="Failed to load the full document.",O.notice=null,O.loadingDocument=!1,e.rerender();return}e.syncPayload?.(re);let Q=g(re);Q.loadingDocument=!1,Q.notice=null,Q.error=null,d(Q,Q.sourceContent),S.keepEditMode&&(Q.mode="edit",Q.editorView="markdown",e.rerender())}catch{O.loadingDocument=!1,O.notice=null,O.error="Failed to load the full document.",e.rerender()}}async function nt(w,S){let O=g(w);if(O.dirty&&!window.confirm("Discard unsaved changes and follow this link?"))return;let L=a3(w.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){!D(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 Q=await p(L.targetPath);if(!Q){t&&(t.error=`Unable to open ${L.targetPath}.`,e.rerender());return}e.syncPayload?.(Q);let Ce=g(Q);Ce.pendingAnchor=L.anchor??null,Ce.error=null,Ce.notice=null,e.rerender()}}async function He(w){let S=g(w);if(S.error=null,S.notice=null,jC(w.content)){await ze(w,{keepEditMode:!0});return}S.mode="edit",S.draftContent=S.fullDocumentContent,S.dirty=!1,S.editorView="markdown",e.setExpanded(!0),e.rerender()}async function De(){return yc({availableDisplayModes:e.getAvailableDisplayModes()}).canFullscreen?await e.requestDisplayMode?.("fullscreen")==="fullscreen":!1}function ae(){if(!t)return;let w=t.filePath;t.draftContent=t.fullDocumentContent,t.dirty=!1,t.dirtyLineRanges=[],t.error=null,t.notice=null,e.rerender(),V("Reverted","saved",1500),e.trackUiEvent?.("markdown_reverted",{file_extension:Ht(w)})}async function I(){if(!t||t.saving||!t.dirty||t.fileDeleted)return;a();let w=t;w.saving=!0,w.saveIndicator="saving",w.error=null,w.notice=null;try{let S=CJ(w.fullDocumentContent,w.draftContent,w.dirtyLineRanges);if(S.length===0){w.saving=!1,w.saveIndicator="idle",w.dirty=!1,w.dirtyLineRanges=[];return}let O=0,L=[],re=null;for(let ke of S)try{let Pe=await e.callTool?.("edit_block",{file_path:w.filePath,old_string:ke.old_string,new_string:ke.new_string,expected_replacements:1,origin:"ui"});ZC(Pe),O++}catch(Pe){L.push(ke),re=Pe}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=re,ke}let Q=TJ(w.fullDocumentContent,S);w.fullDocumentContent=Q,w.sourceContent=Q,w.draftContent=Q,w.outline=ss(w.sourceContent),w.dirty=!1,w.dirtyLineRanges=[],w.saving=!1,w.saveIndicator="saved",w.outline.some(ke=>ke.id===w.activeHeadingId)||(w.activeHeadingId=w.outline[0]?.id??null);let Ce=e.getCurrentPayload();if(Ce){let Pe=Ce.content.match(/^(\[Reading [^\]]+\]\r?\n(?:\r?\n)?)/)?.[1]??"";e.storePayloadOverride({...Ce,content:Pe+Q})}let pt=document.getElementById("revert-markdown");pt&&(pt.disabled=!b(w)),V("Saved","saved",1800,()=>!w.dirty&&!w.saving?(w.saveIndicator="idle",!0):!1),e.trackUiEvent?.("markdown_saved",{file_extension:Ht(w.filePath),blocks:S.length})}catch(S){w.saving=!1,w.saveIndicator="idle";let O=S,L=typeof O.appliedCount=="number"?O.appliedCount:0,re=typeof O.skippedCount=="number"?O.skippedCount:0,Q=typeof O.totalCount=="number"?O.totalCount:0,Ce=L>0&&re>0,pt=L===0&&re>0,ke=await m(w.filePath).catch(()=>null),Pe=!1,wt=null;if(ke){let Mt=c(ke);Mt!==w.fullDocumentContent&&(d(w,Mt,{keepDraft:!0}),e.storePayloadOverride(ke),Pe=!0,wt=Mt)}if(w.notice=null,Ce)w.error=`${L} of ${Q} edit${Q===1?"":"s"} saved. ${re} ${re===1?"edit":"edits"} did not apply because that text changed on disk \u2014 your draft still has them; save again to merge.`,e.rerender(),V("Saved (partial)","saved",3e3),e.trackUiEvent?.("markdown_save_partial",{file_extension:Ht(w.filePath),applied:L,skipped:re,total:Q});else if(pt&&Pe&&e.showConflictDialog&&wt!==null){let Mt=wt,Oe=w.filePath.replace(/\\/g,"/").split("/").pop()||w.filePath;w.error=null,e.rerender(),e.trackUiEvent?.("markdown_save_conflict_shown",{file_extension:Ht(w.filePath)}),e.showConflictDialog({fileName:Oe,onUseDiskVersion:()=>{t===w&&(d(w,Mt),e.rerender()),e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ht(w.filePath),action:"use_disk"})},onSaveMyChanges:()=>{e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ht(w.filePath),action:"save_mine"}),I()},onCancel:()=>{t===w&&(w.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:Ht(w.filePath),action:"dismissed"})}})}else w.error=Pe?"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(),V("Save failed","saving",3e3);e.trackUiEvent?.("markdown_save_failed",{file_extension:Ht(w.filePath),reloaded_from_disk:Pe,applied:L,skipped:re,total:Q})}}function W(w,S){let O=g(w),L=document.querySelector(".panel-content-wrapper");O.editorScrollTop=L?.scrollTop??0;let re=O.editorView;O.editorView=S,O.notice=null,O.error=null,e.rerender(),re!==S&&e.trackUiEvent?.("markdown_view_toggled",{file_extension:Ht(w.filePath),view:S}),typeof O.editorScrollTop=="number"&&window.requestAnimationFrame(()=>{let Q=document.querySelector(".panel-content-wrapper");Q&&(Q.scrollTop=O.editorScrollTop)})}function Z(w){let S=g(w),O=document.querySelector(".panel-content-wrapper"),L=S.outline,re=Ht(w.filePath),Q=!1;{let ke=document.getElementById("markdown-editor-root");ke&&(n=v3({target:ke,value:S.draftContent,view:S.editorView,initialScrollTop:S.editorScrollTop,currentFilePath:w.filePath,searchLinks:Ye=>x(w.filePath,Ye),loadHeadings:Ye=>C(w.filePath,Ye),onChange:(Ye,Oe)=>{if(Ye===S.draftContent)return;if(S.draftContent=Ye,S.dirty=Ye!==S.fullDocumentContent,S.dirty){let On=Oe&&Oe.length>0?Oe:[{fromLine:1,toLine:Ye.split(`
`).length}];S.dirtyLineRanges=j3([...S.dirtyLineRanges,...On])}else S.dirtyLineRanges=[];S.dirty&&!Q&&(Q=!0,e.trackUiEvent?.("markdown_edit_started",{file_extension:re,view:S.editorView})),S.dirty&&s();let Qe=ss(Ye);yJ(S.outline,Qe)||(S.outline=Qe,S.outline.some(On=>On.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 Vi=document.getElementById("revert-markdown");Vi&&(Vi.disabled=!b(S))},onBlur:()=>{S.dirty&&(a(),I())}}),n.focus()),document.getElementById("revert-markdown")?.addEventListener("click",()=>{ae()}),document.getElementById("markdown-mode-raw")?.addEventListener("click",()=>{W(w,"raw")}),document.getElementById("markdown-mode-markdown")?.addEventListener("click",()=>{W(w,"markdown")})}document.getElementById("expand-fullscreen")?.addEventListener("click",()=>{De()}),O&&O.addEventListener("click",ke=>{let wt=ke.target?.closest("a[href]");if(!wt||!wt.closest(".markdown-doc"))return;let Mt=wt.getAttribute("href");Mt&&(ke.preventDefault(),nt(w,Mt))});let pt=document.querySelector(".document-outline-shell");pt&&O&&(i=N3({shell:pt,outline:L,scrollContainer:O,onSelect:ke=>{let Pe=S.outline.find(wt=>wt.id===ke);Pe&&typeof Pe.line=="number"&&(n?.revealLine(Pe.line,Pe.id),S.activeHeadingId=Pe.id)}})??void 0),window.setTimeout(()=>{z()},0)}function te(w){let S=g(w),O=S.draftContent;return S.editorView==="raw"?O:F3(O)||O}async function de(w){let S=t?.saveIndicator==="saved"||t?.dirty;if(t&&(t.notice=null,t.editorView="markdown"),S&&w){let O=Gt(w.content);if(O?.isPartial){let L=await p(w.filePath,O.toLine-O.fromLine+1,O.readOffset);if(L)return L}}}return{attachHandlers:Z,buildBody:v,clear:u,disposeHandles:l,ensureCompletePayload:h,getCopyText:te,getState:g,handleInlineExitFromFullscreen:de,isUndoAvailable:b,readCompletePayload:m,readPayload:p,readPayloadContent:c,refreshFromDisk:ce,requestEditMode:He,requestFullscreen:De,saveDocument:I,setEditorView:W}}function q3(){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 W3(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(x=>!!x);if(m.length===0)return;let g=document.activeElement,b=g?m.indexOf(g):-1,v=h.shiftKey?-1:1,y=b===-1?v===1?0:m.length-1:(b+v+m.length)%m.length;h.preventDefault(),m[y].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 V3(e){let t=b=>e.container.querySelector(`#${b}`),n=b=>{let v=document.createElement("textarea");v.value=b,v.setAttribute("readonly",""),v.style.position="fixed",v.style.top="-9999px",document.body.appendChild(v),v.select();let y=document.execCommand("copy");return document.body.removeChild(v),y},i=(b,v,y,x)=>{b.setAttribute("title",v),b.setAttribute("aria-label",v),b.textContent=v,x&&setTimeout(()=>{b.textContent=y,b.setAttribute("title",y),b.setAttribute("aria-label",y)},x)},r=(b,v,y,x)=>{b.setAttribute("title",v),b.setAttribute("aria-label",v),b.dataset.status=v,x&&setTimeout(()=>{b.setAttribute("title",y),b.setAttribute("aria-label",y),delete b.dataset.status},x)},o=async b=>{try{return navigator.clipboard?.writeText?(await navigator.clipboard.writeText(b),!0):n(b)}catch{return n(b)}},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 b=await o(tt(e.payload.content));i(a,b?"Copied!":"Copy failed","Copy",1500)});let l=t("copy-active-markdown");l?.addEventListener("click",async()=>{let b=e.markdownController.getCopyText(e.payload);if(!b)return;let v=await o(b);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 b=e.htmlMode==="rendered"?"source":"rendered";e.trackUiEvent?.("html_view_toggled",{file_type:e.payload.fileType,file_extension:s}),e.render(e.payload,b,e.getIsExpanded())});let c=t("open-in-folder");if(c){let b=e.buildOpenInFolderCommand(e.payload.filePath);b?c.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_folder",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:b,timeout_ms:12e3,origin:"ui"})}catch{}}):c.disabled=!0}let d=t("open-in-editor");if(d){let b=e.buildOpenInEditorCommand(e.payload.filePath);b?d.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_editor",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:b,timeout_ms:12e3,origin:"ui"})}catch{}}):d.disabled=!0}let f=t("load-before"),p=t("load-after");if(!f&&!p)return;let h=Gt(e.payload.content);if(!h?.isPartial)return;let m=tt(e.payload.content),g=async(b,v)=>{let y=b.textContent;b.textContent="Loading\u2026",b.disabled=!0,e.trackUiEvent?.(v==="before"?"load_lines_before":"load_lines_after",{file_type:e.payload.fileType,file_extension:s});try{let x=v==="before"?{path:e.payload.filePath,offset:0,length:h.fromLine-1,origin:"ui"}:{path:e.payload.filePath,offset:h.toLine,origin:"ui"},C=await e.callTool?.("read_file",x),A=Xt(C);if(A&&typeof A=="string"){let D=tt(A),z=v==="before"?`${D}${D.endsWith(`
`)?"":`
`}${m}`:`${m}${m.endsWith(`
`)?"":`
`}${D}`,V=v==="before"?1:h.fromLine,ce=v==="after"?h.totalLines:h.toLine,ze=ce-V+1,nt=h.totalLines-ce,De=V>1||ce<h.totalLines?`[Reading ${ze} lines from ${V===1?"start":`line ${V}`} (total: ${h.totalLines} lines, ${nt} remaining)]
`:"";e.render({...e.payload,content:De+z},e.htmlMode,e.getIsExpanded());return}}catch{}b.textContent="Failed to load",setTimeout(()=>{b.textContent=y,b.disabled=!1},2e3)};f?.addEventListener("click",()=>{g(f,"before")}),p?.addEventListener("click",()=>{g(p,"after")})}var Sn=!1,Rf=!1,Sr,ls,cy,dy,G3,fy,py,yl,xt,X3="rendered",_l,Of,Y3,Q3,Yr,oy,sy,as,us=null,ay=new Map;function MJ(e){return typeof e?.sourceTool=="string"?e.sourceTool:"read_file"}async function Pf(e,t){return dy?dy(e,t):void 0}function eD(){let e=_l?.availableDisplayModes;return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function cs(){return typeof _l?.displayMode=="string"?_l.displayMode:null}function zJ(e){Yr=e,xt=e,Q3?.(e)}function Nf(e){if(!Yr)return e;if(Yr.filePath!==e.filePath)return Yr=void 0,e;let t=tt(e.content),n=tt(Yr.content);return t===n?e:Yr}function tD(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 ln=H3({callTool:Pf,openExternalLink:async e=>fy?fy(e):void 0,requestDisplayMode:async e=>py?py(e):void 0,getAvailableDisplayModes:eD,getCurrentDisplayMode:cs,getCurrentPayload:()=>xt,setExpanded:e=>{Sn=e},syncPayload:e=>Y3?.(e),storePayloadOverride:zJ,rerender:()=>{Of?.()},updateSaveStatus:tD,trackUiEvent:(e,t)=>ls?.(e,t),showConflictDialog:e=>{if(cy){cy.open(e);return}console.warn("[file-preview] conflictDialogController not ready; firing onCancel fallback"),e.onCancel?.()}}),DJ=["path","offset","length","sheet","range","isUrl"];function NJ(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 DJ)r!=="path"&&t[r]!==void 0&&(i[r]=t[r]);return i}function OJ(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 K3=8e3,ly;async function J3(e,t,n){let i=typeof e.path=="string"?e.path:void 0;if(!i){n();return}if(ly!==i){ly=i;try{let r=await Promise.race([Pf("read_file",{...e,origin:"ui"}),new Promise((s,a)=>{setTimeout(()=>a(new Error(`RPC read_file did not respond within ${K3}ms`)),K3)})]),o=xc(r);if(o){t(o);return}}catch{}finally{ly=void 0}n()}}var RJ=1e4,kl;function Lf(){kl!==void 0&&(clearTimeout(kl),kl=void 0)}function xl(e,t){Lf(),e.innerHTML=`
      <main class="shell">
        ${pa({label:t,variant:"status",interactive:!1})}
      </main>
    `,document.body.classList.add("dc-ready")}function uy(e){e.innerHTML=`
      <main class="shell">
        ${pa({label:"Preparing preview\u2026",variant:"loading",interactive:!1})}
      </main>
    `,document.body.classList.add("dc-ready"),Lf(),kl=setTimeout(()=>{kl=void 0,xl(e,"Unable to generate preview in this environment.")},RJ)}function wl(e,t,n="rendered",i=!1){if(Lf(),Sn=i,X3=n,yl?.dispose(),yl=void 0,!t||t.fileType!=="markdown"?ln.clear():ln.disposeHandles(),!t){us?.abort(),us=null,xt=void 0,xl(e,"No preview available for this response."),Sr?.();return}xt=t;let r=E3(t);!r.supportsPreview&&Rf&&(Sn=!1);let o=Gt(t.content),s=$3({payload:t,htmlMode:n,startLine:o?.fromLine??1,markdownController:ln}),a=t.fileType==="markdown"?ln.getState(t):void 0,l=Ht(t.filePath),c=!(cs()==="fullscreen")&&yc({availableDisplayModes:eD()}).canFullscreen;t.fileType==="markdown"&&t.defaultEditorName&&ay.set(t.filePath,{appName:t.defaultEditorName,appPath:t.defaultEditorPath});let d=t.fileType==="markdown"?ay.get(t.filePath):void 0,f=k3({payload:t,body:s,capabilities:r,fileExtension:l,htmlMode:n,currentDisplayMode:cs(),isExpanded:Sn,hideSummaryRow:Rf,markdownWorkspace:a,canGoFullscreen:c,isMarkdownUndoAvailable:a?ln.isUndoAvailable(a):!1,defaultMarkdownEditorName:d?.appName,markdownEditorAppIcon:I3(),hasDirectoryBackButton:!!as});e.innerHTML=f.html,document.body.classList.add("dc-ready"),V3({container:e,payload:t,htmlMode:n,getIsExpanded:()=>Sn,callTool:Pf,trackUiEvent:ls,getFileExtensionForAnalytics:Ht,buildOpenInFolderCommand:m=>ny(m,Nr),buildOpenInEditorCommand:m=>T3(m,Nr,ay),render:(m,g="rendered",b=Sn)=>{wl(e,m,g,b)},updateSaveStatus:tD,markdownController:ln}),t.fileType==="markdown"&&ln.attachHandlers(t),us=A3({payload:t,isMarkdownEditing:t.fileType==="markdown"&&!!a,updateContext:G3,trackUiEvent:ls,getFileExtensionForAnalytics:Ht,previousAbortController:us}),t.fileType==="directory"&&VC({container:e,callTool:Pf,buildOpenInFolderCommand:m=>ny(m,Nr),onOpenPayload:m=>{as=t,wl(e,m,"rendered",!0)}});let p=document.getElementById("dir-back");if(p&&as){let m=as;p.addEventListener("click",()=>{as=void 0,wl(e,m,"rendered",!0)})}t.fileType==="directory"&&(as=void 0);let h=document.getElementById("compact-toggle");yl=H$({shell:document.getElementById("tool-shell"),compactRow:h,initialExpanded:f.effectiveExpanded,onToggle:m=>{Sn=m,ls?.(m?"expand":"collapse",{file_type:t.fileType,file_extension:l})},onScrollAfterExpand:()=>{ls?.("scroll_after_expand",{file_type:t.fileType,file_extension:l})},onRender:Sr}),Sr?.()}function nD(){let e=document.getElementById("app");if(!e)return;if(uy(e),!document.getElementById("md-conflict-modal")){let b=document.createElement("div");b.innerHTML=q3();let v=b.firstElementChild;v&&document.body.appendChild(v)}cy=W3({container:document});let t=new vu({name:"Desktop Commander File Preview",version:"1.0.0"},{updateModelContext:{text:{}}},{autoResize:!0}),n={expanded:Sn,hideSummaryRow:Rf},i=()=>{Sn=n.expanded,Rf=n.hideSummaryRow},r=W$(b=>kc(b)&&typeof b.content=="string"),o=b=>{b&&r.write(b),wl(e,b,"rendered",Sn)},s=()=>{let b=r.read();b&&(xt&&xt.filePath===b.filePath&&tt(xt.content)===tt(b.content)||o(b))};Y3=o,Q3=b=>{r.write(b)},Of=()=>{wl(e,xt,X3,Sn)};let a,l,u,c=!1,d=!1,f=(b,v)=>{if(!d){if(d=!0,b){oy=b,o(b),b.fileType==="markdown"&&cs()==="fullscreen"&&ln.requestEditMode(b),b.fileType==="markdown"&&ln.refreshFromDisk(b);return}xl(e,v??"No preview available for this response."),Sr?.()}};Sr=()=>{},dy=(b,v)=>t.callServerTool({name:b,arguments:v}),G3=b=>{let v=b?{content:[{type:"text",text:b}]}:{content:[]};t.updateModelContext(v).catch(()=>{})},fy=async b=>(await t.openLink({url:b})).isError!==!0,py=async b=>{let v=await t.requestDisplayMode({mode:b});return typeof v.mode=="string"?v.mode:null};let p=J$((b,v)=>t.callServerTool({name:b,arguments:v}),{component:"file_preview"});ls=(b,v={})=>p(b,{tool_name:MJ(xt??oy),...v}),t.ontoolinput=b=>{let v=typeof b.arguments?.path=="string"?b.arguments.path:void 0,y=NJ(b.arguments);if(u=OJ(b.arguments),y&&(l=y),!d&&a&&v&&a.filePath===v){let x=a;a=void 0,f(x);return}uy(e),Sr?.(),c=!1,y&&!u&&J3(y,x=>{c=!0,d?o(Nf(x)):f(Nf(x))},()=>{})},t.ontoolresult=b=>{if(a=void 0,c)return;let v=Xt(b),y=b?.isError===!0,x=l??(xt?.filePath?{path:xt.filePath}:void 0),C=D=>{c=!0;let z=u?{...D,sourceTool:u}:D;d?o(Nf(z)):f(Nf(z))},A=()=>{v&&(d?(xl(e,v),Sr?.()):f(void 0,v))};if(!y&&x){uy(e),Sr?.(),J3(x,C,A);return}A()},t.ontoolcancelled=b=>{f(void 0,b.reason??"Tool was cancelled.")};let h=()=>{document.visibilityState==="visible"&&s()},m=()=>{document.visibilityState!=="visible"&&s()},g=()=>{Lf(),yl?.dispose(),yl=void 0,ln.disposeHandles(),us?.abort(),us=null,document.removeEventListener("visibilitychange",h),window.removeEventListener("focus",m)};document.addEventListener("visibilitychange",h),window.addEventListener("focus",m),t.onteardown=async()=>(g(),{}),K$({app:t,chrome:n,onContextApplied:()=>{let b=cs();i(),_l=t.getHostContext();let v=cs(),y=b!==v;if(b==="fullscreen"&&v==="inline"&&xt?.fileType==="markdown"){Sn=!0,n.expanded=!0;let x=sy??oy;(x?Gt(x.content)?.isPartial===!0:!1)&&x?(Yr=x,xt=x,r.write(x),ln.handleInlineExitFromFullscreen(x).then(A=>{A&&(xt=A,Yr=A,r.write(A),Of?.())})):ln.handleInlineExitFromFullscreen(),sy=void 0}b!=="fullscreen"&&v==="fullscreen"&&xt?.fileType==="markdown"&&(sy=xt,Gt(xt.content)?.isPartial&&ln.requestEditMode(xt)),d&&y&&Of?.()},onConnected:()=>{_l=t.getHostContext(),a=r.read()??void 0}}).catch(()=>{xl(e,"Failed to connect to host."),Sr?.()}),window.addEventListener("beforeunload",()=>{g()},{once:!0})}nD();})();